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
Render a success TwiML and optionally sends notifications To notify via SMS: req.query.notify = sms:4081234567 req.query.notify = 4081234567 To notify via yo: req.query.notify = yo:recipient:apikey
function renderSuccess(req, res, identifier) { var notifyQuery = req.query.notify || ''; var notify = notifyQuery.split(':'); var protocol = notify[0]; var successParams = parseNotify(req, identifier); return res.render('success', successParams); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sendNotification() {\n // overrides default that no notifs will show when app is in foregruond\n Notifications.setNotificationHandler({\n handleNotification: async () => ({\n shouldShowAlert: true\n })\n });\n\n Notifications.scheduleNotificationAsync({\n content: {\n title: 'Your Service Request',\n body: `Your request for ${selectedService}, ${date} has been submitted`\n },\n // causes notif to fire immed. cd also set to future or repeat or both\n trigger: null\n });\n }", "function showNotificationWhenSuccess(res) {\n iSuccess.css('display', 'inline-block');\n iError.css('display', 'none');\n iMessage.html(res);\n notification.removeClass('error').addClass('success slide-left');\n notification.css('display', 'flex');\n }", "function display_notification(response) {\n $.notify({\n message: response[\"message\"]\n }, {\n type: (response[\"status\"] ? 'success' : 'danger'), \n placement: {\n from: \"bottom\",\n align: \"center\"\n }\n })\n}", "function notify(text, type, translate) {\n\tif (typeof type == undefined) {\n\t\ttype = 'info';\n\t}\n\tif (typeof translate == undefined) {\n\t\ttranslate = true;\n\t}\n\t$('#notifications').append('<div data-alert class=\"alert-message fade in ' + type + '\"><a class=\"close\" href=\"#\">×</a><p>' + (translate ? str(text) : text ) + '</p></div>');\n}", "function respondSimpleMessage(res, message) {\n res.render('simpleStatus', { \n pageTitle: message,\n status: message,\n bodyID: 'body_simplestatus',\n mainTitle: message\n });\n}", "function notify(json){\r\n\t//console.log(json);\r\n\tnotification = json2message(json); //Convert error message into readable message\r\n\tnotification.message = prettyPiget(notification.message); //Prettify piget\r\n\tdisplay_alert(notification.message, notification.type); //Display notifications\r\n}", "function notify(string) {\n // Construct email template for notifications\n // Must have to, subject, htmlBody\n var emailTemplate = {\n to: emailForNotify,\n subject: accountName,\n htmlBody: \"<h1>Comporium Media Services Automation Scripts</h1>\" + \"<br>\" + \"<p>This account has encountered an issue</p>\" + accountName +\n \"<br>\" + \"<p>The issue is with this campaign: </p>\" + campaignName + \"<br>\" + \"<p>This is what is wrong - </p>\" + \"<br>\"\n + string + \"<br>\" + \"Ads Disapproved = \" + adDisapproval +\"<p>If something is incorrect with this notification please forward this email to [email protected]. Thanks!</p>\"\n }\n MailApp.sendEmail(emailTemplate);\n }", "function notify() {\n console.log(\"fire alarm\");\n\n notifySMS();\n\n var payload = { value: \"fire alarm\", datetime: new Date().toISOString() };\n datastore.log(config, payload);\n mqtt.log(config, payload);\n}", "function notificationToMentor(obj,callback) {\n if(typeof obj === \"object\"){\n $.ajax({\n type: 'POST',\n data: obj,\n url: '/notifications/notificationtomentor',\n dataType: 'JSON'\n }).done(function( response ) {\n\n callback(response);\n // Check for successful (blank) response\n if (response.msg === '') { //This condition needs to be modified\n // Show success message\n console.log(\"success\");\n\n //Make an entry in the notification collection/doc with the notification type \"\".\n } else {\n\n // If something goes wrong, alert the error message that our service returned\n //alert('Error: ' + response.msg);\n\n }\n }); \n }\n}", "function notifyMe(data) {\n const textsPerType = {\n idle: {\n title: \"Don't stay idle!!!\",\n body: data => {\n return \"Hey there! You've been idle for \" + data.idleTime + ' minute(s)';\n }\n },\n done: {\n title: 'Timer complete',\n body: data => {\n return \"Feel free to take a break! Do it!\";\n }\n }\n };\n const texts = textsPerType[data.type];\n // Request permission if not yet granted\n if (Notification.permission !== \"granted\") {\n Notification.requestPermission();\n }\n else {\n var notification = new Notification(texts.title, {\n icon: 'https://ares.gods.ovh/img/Tomato_icon-icons.com_68675.png',\n body: texts.body(data),\n });\n\n notification.onclick = function () {\n window.open(\"http://stackoverflow.com/a/13328397/1269037\"); \n };\n }\n }", "function notify(req, res) {\n News.findOne({\n isNotified: false\n }, function(err, result) {\n if (err || !result) {\n console.log(err);\n return res.status(400).send(err);\n } \n console.log(result);\n notifier.sendNewsToUsers(result, () => {\n console.log('done')\n News.findByIdAndUpdate(result._id, {$set:{\n isNotified: true\n }}, function(err) {\n console.log(err)\n res.send('Success');\n })\n })\n });\n}", "function notify(string) {\n // Construct email template for notifications\n // Must have to, subject, htmlBody\n var emailTemplate = {\n to: emailForNotify,\n subject: accountName,\n htmlBody: \"<h1>Comporium Media Services Automation Scripts</h1>\" + \"<br>\" + \"<p>This account has encountered an issue</p>\" + accountName +\n \"<br>\" + \"<p>The issue is with this campaign: </p>\" + campaignName + \"<br>\" + \"<p>This is what is wrong - </p>\" + \"<br>\"\n + string + \"<p>Total Impressions Currently: \" + avgImpressions + \"<br>\" +\"<p>If something is incorrect with this notification please reply to this email. Thanks!</p>\"\n }\n MailApp.sendEmail(emailTemplate);\n }", "function notifySMS() {\n if (!config.TWILIO_ACCT_SID || !config.TWILIO_AUTH_TOKEN) {\n return;\n }\n\n // only send an SMS every 1 minute\n if (smsSent) {\n return;\n }\n\n var opts = { to: config.NUMBER_TO_SEND_TO,\n from: config.TWILIO_OUTGOING_NUMBER,\n body: \"fire alarm\" };\n\n // send SMS\n twilio.sendMessage(opts, function(err, response) {\n if (err) { return console.error(\"err:\", err); }\n console.log(\"SMS sent\", response);\n });\n\n smsSent = true;\n setTimeout(function() {\n smsSent = false;\n }, 1000 * 60);\n}", "success(notification) {\n notification = normalize(notification, \"success\");\n return notification;\n }", "function showNewNotification(subject,body,link,date,notification_id,status_id,receiver_id) {\n\n $('#notificationModal .modal-title').text(subject);\n $('#notificationModal .modal-body').html(body + '<br /><br /><a href=\"' + link + '\">' + link + '</a>');\n $('#notificationModal').modal();\n\n // Mark as read & update totals\n $.ajax({\n url: notificationsApiPath + '/notifications/' + notification_id,\n dataType: 'json',\n method: 'PUT',\n data: {\n receiver_id: receiver_id,\n status_id: status_id\n },\n beforeSend: function (xhr) {\n xhr.setRequestHeader('Authorization', accessToken());\n },\n complete: function () {\n getNewNotifications();\n // getNotifications();\n }\n });\n}", "function updateNotification(data){\n \n if(data.notification[0]['new'].length)\n {\n //console.log(' send notification receive status to server',data);\n data.action_flag = 'update';\n data.submitted = 1;\n delete data.initial_flag;\n socket.emit('getsurveylist',data);\n }\n }", "function Nitication(titles,messages)\n{\n notifier.notify({\n title: titles,\n message: messages,\n }, function (err, response) {\n // Response is response from notification\n });\n}", "function showNotification(subject, text, url, timestamp) {\n $('#notificationModal .modal-title').text(subject);\n $('#notificationModal .modal-body').html(text + '<br /><br /><a href=\"' + url + '\">' + url + '</a>');\n // Show modal\n $('#notificationModal').modal();\n\n // Mark as read & update totals\n $.ajax({\n url: notificationsPath + '/' + integerID + '/' + timestamp,\n dataType: 'json',\n method: 'POST',\n complete: function () {\n // Get notifications\n getNotifications();\n }\n });\n}", "function slackSend() {\n var total = 0\n var attachments = []\n var statusColor\n Object.keys(stats).map(function(objectKey, i) {\n total += stats[objectKey][0]\n if (stats[objectKey][0] > stats[objectKey][3]) {\n statusColor = disqusRed\n statusIcon = \"🔥\"\n } else if (stats[objectKey][0] <= 5) {\n statusColor = disqusGreen\n statusIcon = \":partyporkchop:\"\n } else {\n statusColor = disqusGreen\n statusIcon = \"🆒\"\n }\n attachments.push({\n \"fallback\": stats[objectKey][0] + \" total\" + stats[objectKey][1] + \" new\" + stats[objectKey][2] + \" open\",\n \"color\": statusColor, \n \"title\": statusIcon + \" \" + objectKey + \": \" + stats[objectKey][0],\n \"text\": stats[objectKey][1] + \" new, \" + stats[objectKey][2] + \" open\"\n })\n });\n \n let statusMessage = {\n \"response_type\": \"in_channel\",\n \"text\": total + \" total cases right now.\",\n \"attachments\": attachments\n }\n // depending on request origin, also send the response as webhook for daily notifications\n if (type === 'notification') {\n webhook({text:\"Morning report incoming!\"});\n webhook(statusMessage);\n }\n res.send(statusMessage);\n // TODO Write function that stores this data to database\n //store(stats);\n }", "function respond(message) {\n var twiml = new MessagingResponse();\n twiml.message(message);\n res.type('text/xml');\n res.send(twiml.toString());\n }", "function showNotification(msg, type) {\n if (!(new RegExp(/^(success|normal|error|warning)$/).test(type))) {\n type = \"normal\";\n }\n msg = ScapString(msg);\n\n if (type === \"success\") {\n $.growl.notice({ message: msg });\n } else if (type === \"error\") {\n $.growl.error({ message: msg });\n } else if (type === \"warning\") {\n $.growl.warning({ message: msg });\n } else {\n $.growl({ title: \"Information\", message: msg });\n }\n}", "async function sendSMS(req, res) {\n const {contactId} = req.params;\n const response = await autopilot.journeys.add('0001', xss(contactId));\n console.log(response);\n res.success();\n}", "static notifySuccess()\n\t\t{\n\t\t\tthis.notify(NotificationFeedbackType.Success);\n\t\t}", "function twilioSend(res, data) {\n res.type('text/xml')\n res.send(data)\n}", "function OnSuccessCallMaladie(data, status, jqXHR) {\n\t\t\tnotif(\"success\", \"Brief envoyé avec <strong>succès</strong> !\");\n\t\t}", "function sendNotificationEmail(){\n \n var htmlBody = '<html><body>Your AdWords URL Checker Summary for ' + ACCOUNT_NAME + ' is available at ' + SPREADSHEET_URL + '.</body></html>';\n var date = new Date();\n var subject = 'AdWords URL Checker Summary Results for ' + ACCOUNT_NAME + ' ' + date;\n var body = subject;\n var options = { htmlBody : htmlBody };\n \n for(var i in NOTIFY) {\n MailApp.sendEmail(NOTIFY[i], subject, body, options);\n Logger.log(\"An Email has been sent.\");\n }\n}", "function acceptNotification(email, name, appId) {\n //email = '[email protected]';\n //name = 'name';\n //appId = '222';\n \n var html = \"<p>Dear \"+name+\",\"+\"</p><p>We are happy to inform you that your iBoost application has been accepted.\"+\n \"</p><p> Please follow these next steps to officially register your team. Ensure you read through the information carefully, ALSO PLEASE SECURELY SAVE YOUR iBoost Team ID. You will need this throughout your time at iBoost\"+\n \n \"</p><p>Your iBoost Team ID: \"+appId+\"</p><p>Please click <a href='www.iboostzone.com/onboarding/registration'>here</a> to register your team at iBoost.<br><br><br><br><p>Best,</p><br><img src='cid:logo' height='50' width='150'>\";\n var template = HtmlService.createHtmlOutput(html).getContent();\n //Logger.log(template)\n MailApp.sendEmail(email, \"iBoost Application Review\",\"\", {htmlBody: template, inlineImages:{logo: imageLogo}});\n \n}", "function notification(html) {\n\n\t$('.message-ajax #message-here').html(html);\n\t$('.message-ajax').show();\n\t$('.message-ajax').fadeOut(4000);\n}", "function renderTicketMessage() {\n res.render('index', {title: 'Ticket Checker', message: message, errorMessage: errorMessage});\n }", "function emailPending(id) {\n //Trigger email\n uri = \"/remindPayment/\"+id;\n $.getJSON(uri, function( data ) {\n if (data.status = \"TRUE\") {\n alert(\"A email notification has been sent\")\n } else {\n alert(\"An Error occurred\")\n }\n });\n}", "function displayNotifications() {\n\tvar request = $.ajax({\n\t\turl: \"feed.php\",\n\t\t//type: \"POST\";\n\t\tdataType: \"json\"\n\t});\n\trequest.done(function(data) {\n\t\t//$('#notifications').prepend(\"<div>\"+data.length+\"</div>\");\n\t\t//$('#notifications').prepend(\"<div>\"+data+\"</div>\");\n\t\tvar i;\n\t\tfor(i = 0; i < data.length; i++) {\n\t\t\tif(data[i].type == \"Invite\") {\n\t\t\t\tif(data[i].displayed == \"false\") {\n\t\t\t\t\tvar notif = \"<div class='notification'>\" + data[i].fromUser + \" has invited you to the event <a href='./calendar.php'>\" + data[i].text + \"</a></div>\";\n\t\t\t\t\t$('#notifications').prepend(notif);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(data[i].type == \"addFriend\") {\n\t\t\t\t//format for 'addFriend'\n\t\t\t}\n\t\t\telse if(data[i].type == \"comment\") {\n\t\t\t\t//format for 'comment'\n\t\t\t}\n\t\t}\n\t});\n}", "function sendRiderMsg\n(\n lift,\n msg\n)\n{\n var phoneNumber = lift.phone; \n// var name = $('response returnVal firstName',owner).text()\n// +' '+ $('response returnVal lastName'\n// ,owner).text(); \n phoneNumber = phoneNumber.split('-').join('');\n \n// var msg = $('#messageContent').val() +'\\n'+' '+ SITE_URL+\n// 'confirmRider.php' + link;\n var hasSent = sendTextMessage(phoneNumber, msg);\n return hasSent; \n}", "function senmailtoyou(add, x, y) {\n\n //http://maps.googleapis.com/maps/api/staticmap?center=25.0468495,121.51270500000001&zoom=16&size=600x300&maptype=roadmap&language=TW&markers=color:red%7Clabel:S%7C25.0468495,121.51270500000001&markers=color:green%7Clabel:G%7C25.0468495,121.51270500000001=false\n //'http://maps.googleapis.com/maps/api/staticmap?center='+x+','+y+'&zoom=16&size=600x300&maptype=roadmap&markers=color:red%7Clabel:S%7C'+x+','+y+'&markers=color:green%7Clabel:G%7C'+x+','+y+'=false'\n //console.log(x + ', ' + y);\n var gimg = 'http://maps.googleapis.com/maps/api/staticmap?center=' + x + ',' + y + '&zoom=16&size=600x300&maptype=roadmap&language=TW&markers=color:red%7Clabel:S%7C' + x + ',' + y + '&markers=color:green%7Clabel:G%7C' + x + ',' + y + '=false';\n //console.log(add);\n var mailhtml = '<h1>Your Honey or Baby in here!!!</h1><h2>' + add + '</h2><div><img src=\"' + gimg + '\"></div>'\n\n $.ajax({\n type: 'POST',\n url: 'https://mandrillapp.com/api/1.0/messages/send.json',\n data: {\n 'key': 'tXtr_OIX1LaJD5styt91rg',\n 'message': {\n 'from_email': '[email protected]',\n 'to': [{\n 'email': '[email protected]',\n 'name': 'chen',\n 'type': 'to'\n }, {\n 'email': '[email protected]',\n 'name': 'sea',\n 'type': 'to'\n }, {\n 'email': '[email protected]',\n 'name': 'ray',\n 'type': 'to'\n }, {\n 'email': '[email protected]',\n 'name': 'Will',\n 'type': 'to'\n }],\n 'autotext': 'true',\n 'subject': '[Catch Monkey] Dear Where!!!',\n 'html': mailhtml\n }\n }\n }).done(function(response) {\n //console.log(response);\n //if you're into that sorta thing\n });\n\n }", "function notify(data) {\n var mailOptions = {\n from: config.from,\n to: config.to, // comma separated list of receivers\n subject: config.subject, // Subject line\n html: '<b>' + data + '</b>' // html body};\n }\n smtpTransport.sendMail(mailOptions, function(err) {\n if (err)\n console.log(\"ohhh\", err);\n else\n \tconsole.log('Message sent.');\n\t});\n}", "function requestCallback(response) {\n if(response){\n $('.notice-area').html(\"<div class='alert alert-success'>Thanks! Your invite was successfully sent.</div>\");\n alertInfo();\n }\n}", "function email_sent_notify(data)\n{\n\tvar message = new Array();\n\n\tmessage.push(\"<label class=\\\"l1\\\">&nbsp;</label>\");\n\tmessage.push(\"<div class=\\\"err_msg\\\" style=\\\"width:280px;\\\">\");\n\tmessage.push(data);\n\tmessage.push('</div></div>');\n\n\t$(\"#email_err\").html(message.join(''));\n\n}", "function sendSuccessMessages(mobileNumber, donationConfig, projectUrl) {\n var mobileNumber = mobileNumber;\n var donationConfig = donationConfig;\n var projectUrl = projectUrl;\n\n // First message user receives. \n mobilecommons.profile_update(mobileNumber, donationConfig.donation_complete_project_info_A);\n\n // Second message user receives. \n setTimeout(function() {\n mobilecommons.profile_update(mobileNumber, donationConfig.donation_complete_project_info_B);\n }, END_MESSAGE_DELAY)\n\n // Last message user receives. Uses Bitly to shorten the link, then updates the user's MC profile.\n setTimeout(function() {\n shortenLink(projectUrl, function(shortenedLink) {\n var customFields = {\n SS_donation_url: shortenedLink\n };\n mobilecommons.profile_update(donorPhone, donationConfig.donation_complete_give_url, customFields);\n });\n }, END_MESSAGE_DELAY + END_MESSAGE_DELAY)\n }", "function onSuccess() {\n\tset2SendView();\n\n\tconsole.log('success');\n\tvar detail = document.getElementById(\"detail\");\n\tdetail.innerHTML = \"success\";\n}", "function addNotificationToHTML(result,bool) {\n\n if (result.length>0) {\n var totalUnseen=result[0];\n result=result[1];\n }\n\n if (bool) {\n //ul for notification container\n var ul=document.createElement(\"ul\");\n ul.setAttribute(\"class\",\"collection\");\n }\n else {\n //ul for dropdown notification icon\n var ul=document.getElementById(\"notification\");\n }\n\n if (result.length==0){\n $('#countOfNotification').html('Notification');\n var li=document.createElement(\"li\");\n var a=document.createElement(\"a\");\n var text=document.createTextNode(\"No notification\");\n a.setAttribute(\"href\",\"#!\");\n a.appendChild(text);\n li.appendChild(a);\n ul.appendChild(li);\n }\n else {\n if (totalUnseen!=0) {\n $('.notification-badge').css(\"background-color\",\"#ff0000\");\n $('.notification-badge').html(totalUnseen);\n }\n else {\n $('.notification-badge').css(\"background-color\",\"transparent\");\n $('.notification-badge').empty();\n }\n $('#linkNotification').attr(\"href\",\"javascript:showNotification();\");\n $('#countOfNotification').html('Notification <span style=\"color:red;\">('+totalUnseen+')</span>');\n\n for (var i=0;i<result.length;i++) {\n var li_divider=document.createElement(\"li\");\n li_divider.setAttribute(\"class\",\"divider\");\n li_divider.setAttribute(\"tabindex\",\"-1\");\n var li=document.createElement(\"li\");\n var text=document.createTextNode(result[i][2]);\n var date=document.createTextNode(result[i][1]);\n var a=document.createElement(\"a\");\n a.setAttribute(\"href\",\"javascript:void(0);\");\n a.setAttribute(\"onclick\",\"javascript:openNotification(event,'\"+result[i][3]+\"')\");\n a.setAttribute(\"id\",result[i][0]);\n\n if (result[i][4]==1) {\n li.style.backgroundColor=\"#f3f4f7\";\n }\n\n if (bool) {\n li.setAttribute(\"class\",\"collection-item avatar\");\n var span=document.createElement('span');\n var t=document.createTextNode(\"New notification\");\n var p=document.createElement('p');\n p.appendChild(text);\n p.appendChild(document.createElement('br'));\n p.appendChild(date);\n span.appendChild(t);\n li.appendChild(span);\n li.appendChild(p);\n a.appendChild(li);\n ul.appendChild(a);\n }\n else {\n a.appendChild(text);\n a.appendChild(document.createElement('br'));\n a.appendChild(date);\n li.appendChild(a);\n ul.appendChild(li);\n ul.appendChild(li_divider);\n }\n }\n if (bool) {\n var div=document.getElementById('notificationContainer');\n div.appendChild(ul);\n }\n else {\n var liEnd=document.createElement(\"li\");\n var aEnd=document.createElement(\"a\");\n var textEnd=document.createTextNode(\"See all\");\n aEnd.appendChild(textEnd);\n aEnd.setAttribute(\"id\",\"seeMoreNotif\");\n aEnd.setAttribute(\"href\",\"javascript:showNotification();\");\n liEnd.appendChild(aEnd);\n ul.appendChild(liEnd);\n }\n }\n}", "function showNotificationWhenError(res) {\n iSuccess.css('display', 'none');\n iError.css('display', 'inline-block');\n iMessage.html(res);\n notification.removeClass('success').addClass('error slide-left');\n notification.css('display', 'flex');\n }", "function notifyUsers(data) {\n s.notificationEmpty.addClass('hide');\n s.notificationsWrapper.prepend(data.notificationPartial);\n $('.notification-nav__count-wrapper').html(data.notificationCountPartial);\n\n }", "success(message, options) {\n // eslint-disable-next-line no-use-before-define\n notifications.notify(message, {\n type: 'message',\n // @todo rename it to success\n dismiss: true,\n ...options\n });\n }", "async sendSlackNotification() {\n if (!this.slackEndpoint || !this.slackChannel) {\n return;\n }\n\n const webhook = new IncomingWebhook(this.slackEndpoint);\n\n const data = {\n channel: this.slackChannel,\n text: `New ${this.replaceTags(this.formConfig.subject)}`\n };\n\n return webhook\n .send(data)\n .then(result => {\n console.log(`Slack notification sent.`, result);\n })\n .catch(err => console.log(err));\n }", "function notify(messsages){\n const totalMessages=messsages.length;\n if(totalMessages!=0){\n const notifyString=`You have ${totalMessages} new ${totalMessages==1?\"message\":\"messages\"}`;\n notifier.notify({\n title:\"GmailFilteredNotify\",\n message:notifyString\n });\n console.log(\"**************************************\");\n console.log(notifyString);\n const currentTime=new Date().toString();\n console.log(currentTime);\n console.log(\"**************************************\");\n messsages.forEach(message=>{\n console.log(message.from);\n console.log(message.snippet);\n console.log(\"-------------------\");\n })\n }\n else{\n console.log(\"**************************************\");\n console.log(\"No New Message\");\n const currentTime=new Date().toString();\n console.log(currentTime);\n console.log(\"**************************************\");\n }\n}", "function showNotifications(msg, type) {\n $.notify({\n // options\n message: msg\n },{\n // settings\n type: type,\n delay: 1500,\n placement:{from: \"top\",\n align: \"left\"}\n \n });\n}", "function noteBuilder(){\n message = '<b>A small note from Yumi 🐶</b><br/><br/>'\n message += '<b>✅ Yumi found these recent <em>Inspections:</em></b><br/>'\n \n //inspection message\n var inspection_id = inspection_data['i_id'];\n var inspection_folder_id = inspection_data['i_folder_id'];\n var inspection_created_at = inspection_data['i_created_at'];\n\n for(var i in inspection_id){\n var url = \"https://manage.happyco.com/folder/\"+inspection_folder_id[i]+\"/inspections/\"+inspection_id[i];\n var date = inspection_created_at[i];\n message += \"<a href=\"+url+\">\"+url+\"</a>\";\n }\n message += \"<br/><br/>\";\n \n //report message\n var report_id = report_data['r_id'];\n var report_created_at = report_data['r_created_at'];\n\n for(var i in report_id){\n var url = \"https://manage.happyco.com/reports/\"+report_id[i];\n var date = report_created_at[i];\n message += \"<a href=\"+url+\"target=\\\"_blank\\\">\"+url+\"</a>\";\n }\n message += \"<br/><br/>\";\n //optional iap message\n if(iap_data.iap_expired_at.length==1)\n message += \"IAP expires on \"+iap_data.iap_expired_at; console.log(message);\n\n message += \"<br/><br/>\";\n\n //optional business notes message \n if (business_notes_data.b_body.length>=1) {\n message +=\"Business notes from admin: \"+ business_notes_data.b_body;\n }\n}", "function en(ic,ti,msg,ur,tar,bgColor,color){\n $(document).ready(function() {\n setTimeout(function() {\n $.notify({\n // options\n icon: ic,\n title: ti,\n message: msg,\n //\turl: ur,\n target: tar\n },{\n // settings\n element: 'body',\n position: null,\n type: \"info\",\n allow_dismiss: true,\n newest_on_top: false,\n showProgressbar: false,\n placement: {\n from: \"top\",\n align: \"right\"\n },\n offset: 20,\n spacing: 10,\n z_index: 1031,\n delay: 5000,\n timer: 1000,\n url_target: '_blank',\n mouse_over: null,\n animate: {\n enter: 'animated fadeInDown',\n exit: 'animated fadeOutUp'\n },\n onShow: null,\n onShown: null,\n onClose: null,\n onClosed: null,\n icon_type: 'class',\n template: '<div data-notify=\"container\" class=\"col-xs-11 bg-'+bgColor+' text-'+color+' col-sm-3 alert alert-{0}\" role=\"alert\">' +\n '<button type=\"button\" aria-hidden=\"true\" class=\"close text-light\" data-notify=\"dismiss\">×</button>' +\n '<i class=\"material-icons text-white\">'+ic+'</i> ' +\n '<span data-notify=\"title\" style=\"font-weight:bold;\">{1}</span><hr> ' +\n '<i class=\"fas fa-comment-dots text-light\"></i><span data-notify=\"message\">{2}</span>' +\n '<a href=\"Enquiry_Manager.php\" aria-hidden=\"true\" class=\"ml-3 mt-3 btn btn-secondary btn-round text-dark\" data-notify=\"dismiss\" >Show</a>' +\n '<div class=\"progress\" data-notify=\"progressbar\">' +\n '<div class=\"progress-bar progress-bar-{0}\" role=\"progressbar\" aria-valuenow=\"0\" aria-valuemin=\"0\" aria-valuemax=\"100\" style=\"width: 0%;\"></div>' +\n '</div>' +\n '<a href=\"{3}\" target=\"{4}\" data-notify=\"url\"></a>' +\n '</div>' \n });\n },0);\n });\n }", "function sendAlert(){\n\t\n\t// Request\n\tvar request = require('request');\n\t\n\t// Somebody has been detected\n\tif (value['value'] == true){\n\t\t\n\t\tvar subject = 'Alerte intrusion';\n\t\tvar message = 'Une présence a été détectée';\n\n\t// Nobody's here since few minutes\n\t} else {\n\n\t\tvar subject = 'Alerte intrusion terminée';\n\t\tvar message = 'Aucune présence détectée depuis 4 minutes';\n\t}\n\t\n // Configure the request to the multipush service\n var options = {\n url: \"http://localhost:9091/multipush\",\n method: 'GET',\n qs: {'subject': subject, 'message': message, 'canal': 'mail,sms,openkarotz'}\n } \n \n // Sending the request\n request(options, function (error, response, body) {\n if (!error && response.statusCode == 201) {\n \tconsole.info('Alert sent');\n } else {\n \tconsole.error('Alert error : %s', error);\n }\n });\n}", "function sendOffRampNotifcation(identity, offRampValue,txHash){\n let html = generateOffRampHTML(identity, offRampValue,txHash)\n let plainText = `The vendor ${identity.name} with address ${identity.address} has requested to initate a Wyre transfer for ${offRampValue} USD. Please check your email`\n let SMSText = `${identity.name} (${identity.address}) requested Wyre transfer for ${offRampValue} USD`\n for(var i = 0; i < adminList.length; i++){ // iterate through admin list and send notifications\n let admin = adminList[i]\n sendOffRampEmail(html, plainText, admin.email)\n sendSMSAlerts(SMSText,admin.phoneNumber)\n }\n}", "function enviarFormNotificacao() {\n var app_id = \"c88e9cdf-f914-4d60-a768-e84d82c4f89a\"; //Id do App no OneSignal\n var included_segments = \"All\"; // Enviar mensagem para todos de uma vez . nao usando pois esta usando individual\n var tituloMensagem = $(\"textarea#tituloMensagem\").val(); // recupera o titulo da mensagem\n var contents = $(\"textarea#corpoMensagem\").val();//recupera texto da mensagem \n\n var players_ids = new Array(); // array de usuarios cadastrados para receber as notificacoes\n var total_lista_players; // Varivel para retornar o total de usuario (por empresa) que tem cadastro no OneSignal \n var total_selecionados;//Retorna o total de selecionados para receber a mensagem de notificacao\n\n\n//Cria o Array para enviar as Notificações\n $(\"#my_multi_select2 option:selected\").each(function (i) {\n players_ids[i] = $(this).val();\n });\n\n// Recupera o Total da Lista de Usuarios \n var select = document.getElementById('my_multi_select2');\n total_lista_players = select.options.length;\n\n// Recupera o Total da Selecionados\n total_selecionados = players_ids.length;\n $(\"#totalSelecionado\").html(total_selecionados);\n\n if (players_ids.length === 0) {\n $.Notification.autoHideNotify('black', 'button right', '', 'Selecione ao menos 1 Cliente ou Representante.', '');\n return;\n }\n\n if (contents === \"\") {\n $.Notification.autoHideNotify('black', 'button right', '', 'Por favor digite uma mensagem.', '');\n return;\n\n } else if (contents.length < 20) {\n $.Notification.autoHideNotify('black', 'button right', '', 'A mensagem deve ser maior que 20 caracteres');\n return;\n }\n\n $.ajax({\n type: 'POST',\n url: 'https://onesignal.com/api/v1/notifications',\n data: {\n \"app_id\": app_id,\n \"include_player_ids\": players_ids,\n \"headings\": {\"en\": tituloMensagem}, // Título\n \"data\": {\"foo\": \"bar\"},\n \" big_picture\": \"https://cdn.pixabay.com/photo/2017/09/16/16/09/sea-2755908_960_720.jpg\",\n// \"send_after\":\"2018-02-08 18:39:00 GMT-2\", // Envia uma mensagem automatica escolhendo a data e a hora \n \"android_accent_color\": \"ff0000\", //Define a cor de fundo do círculo de notificação à esquerda do texto de notificação. Aplica-se apenas a aplicações que visam a API Android nível 21+ em dispositivos Android 5.0+.\n \"contents\": {\"en\": contents} // Mensagem \n },\n beforeSend: function (xhr) {\n xhr.setRequestHeader('Authorization', 'Basic Y2RlMDcxNWEtNDA5ZC00OTc0LWEyOGItMDUwNGZlNTlmN2Qx');\n },\n success: function (textStatus) {\n if (textStatus) {\n $.Notification.autoHideNotify('success', 'button right', 'Parabéns...', 'Sua mensagem foi enviada com sucesso para ' + players_ids.length + ' dispositivos.');\n }\n },\n error: function () {\n $.Notification.autoHideNotify('error', 'button right', 'Erro...', 'Sua mensagem não foi enviada!');\n }\n });\n}", "function buildNotification(notifInfos, body) {\n let notification = {\n \"id\" : \"urn:ngsi-ld:Notification:\"+getRandomIntInclusive(1, 100000),\n \"type\" : \"Notification\",\n \"subscriptionId\" : notifInfos.subscriptionId,\n \"context\" : \"http://uri.etsi.org/ngsi-ld/notification\",\n \"notifiedAt\": Date(),\n \"data\": body\n };\n return notification;\n}", "function updateNotifications(number) {\n $(\"#notificationNumber\").text(number);\n $(\"#notificationWindow\").text(number + \" new personal notes\");\n }", "async function showNotification (type, message){\n const timer = 5000\n if (type === \"error\"){\n NotificationManager.error(message, \"\", timer);\n }\n else if (type === \"success\"){\n NotificationManager.success(message, \"\", timer);\n }\n else if (type === \"warning\"){\n NotificationManager.warning(message, \"\", timer);\n }\n}", "async handle(data) {\n return SMS.send({\n view: data.template,\n data: data.data,\n to: data.to,\n is_fast: data.is_fast\n })\n }", "function sendAlert() {\r\n console.log(\"Sending SMS Alert message\");\r\n var xhr = new XMLHttpRequest();\r\n var alertMessage = \"TrusTee Warn ! Temperature \"+T+\"°C reached on TTController number \"+ID+\". Please check it now !\";\r\n xhr.open(\"GET\", \"https://platform.clickatell.com/messages/http/send?apiKey=1g_OYHPZQp2haOQSpVGgaA==&to=33651044499&content=\"+alertMessage, true);\r\n xhr.onreadystatechange = function(){\r\n if (xhr.readyState == 4 && xhr.status == 200) {\r\n console.log('success');\r\n }\r\n };\r\n xhr.send();\r\n console.log(\"SMS Alert message sent\");\r\n}", "function notify(text){\n $.achtung(notice_settings, {\n message: text\n });\n}", "function notification(message, type)\n{\n\n\tif(type == \"error\")\n\t\t$.notify(message,{position:\"top right\", className: 'error'} );\n\n\tif(type == \"warning\")\n\t\t$.notify(message,{position:\"top right\",className: 'warn'});\n\n\tif(type == null || type == \"success\")\n\t\t$.notify(message,{position:\"top right\",className: 'success'});\n}", "function notifyusers() {\n\n var locazio = location.pathname;\n var queri = location.search;\n queri = queri.replace('&response', '');\n queri = queri.replace('?response', '');\n queri = queri.replace('?del', '?nodel');\n queri = queri.replace('&del', '&nodel');\n if (queri == \"\") { queri = \"?\" } else { queri = queri + \"&\"; }\n\n var anyUserChecked = $('#userslist :checkbox:checked').length > 0;\n\n if (anyUserChecked == true) {\n\n var now = $.now();\n var userslist = $(\"#userslist\").serialize();\n\n $.ajax({\n cache: false,\n type: \"POST\",\n url: \"vfm-admin/ajax/sendupnotif.php?t=\" + now,\n data: userslist\n\n })\n .done(function (msg) {\n setTimeout(function () {\n location.href = locazio + queri + \"response\"\n }, 800);\n });\n\n } else {\n setTimeout(function () {\n location.href = locazio + queri + \"response\"\n }, 800);\n }\n}", "function bfln_notification_html(json_data) {\r\n\tif( typeof( json_data ) == \"undefined\" || json_data==\"\" ){\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\t/*\r\n\t * 1) check for new notification ids and match them with old notifications ids\r\n\t * 2) if any new found, simply genrate the html for it and append\r\n\t * 3) if old, match the text and if new, replace the old one with new one\r\n\t*/\r\n\tvar bfln_n_n_count = 0;//count of new notifications\r\n\t\r\n\tfor( i = 0; i < json_data.length; i++ ){\r\n\t\tvar notf_id = json_data[i].id;\r\n\t\tif( typeof( notf_id )!=\"undefined\" && notf_id!=null ){\r\n\t\t\tvar found = false;\r\n\t\t\tvar textChanged = false;\r\n\t\t\t\r\n\t\t\tfor( j=0; j<BFLN_.cached_notf_ids.length; j++){\r\n\t\t\t\tif(BFLN_.debug)\r\n\t\t\t\t\tconsole.log('matching new : ' + notf_id + ' and old : '+ BFLN_.cached_notf_ids[j][0]);\r\n\t\t\t\tif( notf_id==BFLN_.cached_notf_ids[j][0] ){\r\n\t\t\t\t\t//this notification id was already found in previous requests\r\n\t\t\t\t\t//lets check if the text is changed. e.g: previous 'you have 1 message', current 'you have 2 messages'\r\n\t\t\t\t\tif( json_data[i].content != BFLN_.cached_notf_ids[j][1] ){\r\n\t\t\t\t\t\tif(BFLN_.debug)\r\n\t\t\t\t\t\t\tconsole.log('old id ' + notf_id + ' but updated text');\r\n\t\t\t\t\t\t//text different, its a new one\r\n\t\t\t\t\t\ttextChanged = true;\r\n\t\t\t\t\t\tBFLN_.cached_notf_ids[j][1] = json_data[i].content;\r\n\t\t\t\t\t\tjq( \"#\" + BFLN_.sm_ulid + \" > li#wp-admin-bar-notification-\"+notf_id+\" > a\" ).html( json_data[i].content );\r\n\t\t\t\t\t\ttextChangedAt = j;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\tfound = true;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif( textChanged==true ){\r\n\t\t\t\tbfln_n_n_count++;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t//if its new add to the found list and increment the new count\r\n\t\t\t\tif( !found ){ \r\n\t\t\t\t\tBFLN_.cached_notf_ids.push( new Array( notf_id, json_data[i].content ) );\r\n\t\t\t\t\tvar bfln_n_html = \"<li id='wp-admin-bar-notification-\" + json_data[i].id + \"' class=''>\";\r\n\t\t\t\t\tbfln_n_html += \"<a class='ab-item' href='\"+json_data[i].href+\"'>\"+json_data[i].content+\"</a>\";\r\n\t\t\t\t\tbfln_n_html += \"</li>\";\r\n\t\t\t\t\tjq( \"#\" + BFLN_.top_parent + \" #\" + BFLN_.sm_ulid ).append( bfln_n_html );\r\n\t\t\t\t\tbfln_n_n_count++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//lets update the browser window title\r\n\t//and displayed-count-of-total-notification\r\n\tif( bfln_n_n_count > 0 ){\r\n\t\tvar bfln_n_n_updated_count = (BFLN_.newnotification * 1) + (bfln_n_n_count * 1);//just to make sure it 'adds' rather than 'appending'\r\n\t\tBFLN_.newdoctitle = \"(\"+bfln_n_n_updated_count+\") \"+BFLN_.doctitle;\r\n\t\tBFLN_.newnotification = bfln_n_n_updated_count;\r\n\t\t\r\n\t\tBFLN_.stop_blinking = false;\r\n\t\tbfln_blink_browser_title();//start dancing\r\n\t\t\r\n\t\t//ab-pending-notifications is the id of the span which displays notificatio count in admin bar\r\n\t\tjq(\"#ab-pending-notifications\").html(bfln_n_n_updated_count);\r\n\t\tif (jq(\"#ab-pending-notifications\").hasClass('no-alert')) { //initially there were no notifications\r\n\t\t\t//remove old class(es) and assign new class(es)\r\n\t\t\tjq(\"#ab-pending-notifications\").removeClass(\"no-alert\").removeClass(\"count\").addClass(\"pending-count\").addClass(\"alert\");\r\n\t\t}\r\n\t\t\r\n\t\t//remove the item which says 'no notifiations'\r\n\t\tjq(\"#wp-admin-bar-no-notifications\").remove();\r\n\t}\r\n\t//phew! it was lengthy\r\n}", "function displayWelcomeMessage(){\n DisplayNotification(\n config[\"welcome\"][\"title\"],\n welcome_message,\n [],\n true\n );\n}", "renderInfoPage() {\n return (\n <p>\n Thanks! An email with a reset link should arrive in your inbox shortly.\n If it does not, please check your spam folder or <ContactLink text=\"contact us\"/>.\n </p>\n );\n }", "sendContactForm(values) {\n const { contactDetails, addNotification, reset } = this.props;\n contactDetails(values)\n .then((response) => {\n if (response.payload.status === 200) {\n addNotification('Contact Send Successfully', 'success', 'tc');\n reset('ContactForm');\n } else {\n addNotification(\n 'Sorry, there was an error while submitting your request. Please try again',\n 'error',\n 'tc'\n );\n }\n });\n }", "function notifyShow(text, opts) {\n\n if (text == undefined) {\n text= \"Action successfully completed!\";\n }\n\n let defaultOpts = {\n text: text,\n type: \"success\",\n theme: \"bootstrap-v4\",\n timeout: 2000,\n animation: {\n open: \"animated bounceInDown\",\n close: \"animated bounceOutUp\"\n },\n layout: 'topCenter',\n closeWith: ['click', 'button']\n };\n\n opts = $.extend(defaultOpts, opts);\n\n new Noty(opts).show();\n}", "async function SMS(req, res) {\n try {\n const {client_email, client_name, income_per_annum, savings_per_annum, mobile_number} = req.body;\n var options = { authorization: process.env.API_KEY, message: ` Your Details :\\n Email ID :${client_email}\\n Name : ${client_name}\\n Income Per Annum: ${income_per_annum}\\n Savings Per Annum: ${savings_per_annum}\\n Contact : ${mobile_number}\\n Thankyou for your response`, numbers: [mobile_number] };\n const response = await fast2sms.sendMessage(options); //Asynchronous Function.\n res.send(response.message);\n } catch (err) {\n res.send(\"Failed to send SMS to the Client\");\n }\n}", "function update_notify(){\r\n $(\"#notify-list\").html(\"刷新中...\");\r\n $.post(BASE_PATH + 'notify/get_notify_html',{'other_token' : $(\"#other-csrf\").val()},\r\n function(result){\r\n if(result.code != 0){\r\n $(\"#notify-list\").html('加载失败(' + result.code + '):' + result.msg);\r\n }else {\r\n $(\"#notify-list\").html(result.data);\r\n }\r\n }, 'json');\r\n}", "function otp_sent_regular(){\n swal({\n title: \"OTP SENT!\",\n text: \"Please check your mobile phone\",\n icon: \"success\",\n button: \"Ok\",\n });\n }", "function OnSuccess(data, status){\t\t\r\n\t\t\r\n\t\t// Set default status image and banner text\r\n\t\tvar statusImage = \"nf.png\";\r\n\t\tvar statusBannerText = \"STATUS: NOT FOUND\";\r\n\t\t\r\n\t\t// Cast data.message to string\r\n\t\tvar str = data.message;\t\t\r\n\t\t\r\n\t\t// Change status image and banner text based on message code\r\n\t\t// Message code is first character of message string\r\n\t\tif (str.substring(0,1) == \"1\") {\r\n\t\t\tvar statusImage = \"nf.png\";\r\n\t\t\tvar statusBannerText = \"STATUS: NOT FOUND\";\t\t\t\r\n\t\t\t}\r\n\t if (str.substring(0,1) == \"2\") {\r\n\t\t\tvar statusImage = \"pr.png\";\r\n\t\t\tvar statusBannerText = \"STATUS: PROCESSING\";\r\n\t \t} \r\n\t if (str.substring(0,1) == \"3\") {\r\n\t\t\tvar statusImage = \"pr.png\";\r\n\t\t\tvar statusBannerText = \"STATUS: PROCESSING\";\r\n\t \t} \r\n if (str.substring(0,1) == \"4\") {\r\n\t\t\tvar statusImage = \"pr.png\";\r\n\t\t\tvar statusBannerText = \"STATUS: COMPLETE\";\r\n \t} \t\t\r\n\t\t\r\n\t\t// Hide all form elements on wmrForm page and make room for return status message\r\n\t $(\"#formElements\").parent().hide();\t \r\n\t \r\n\t // Append status image, status banner text and return status message to DIV\r\n\t $('#results').append(\"<div data-role='content' class='resultsOuterPanel'>\" +\r\n\t \t\t\"<div id='results' data-role='content' class='resultsInnerPanel'>\" +\r\n\t \t\t\"<img src='images/\"+statusImage+\"' class='statusImage' />\" +\r\n\t \t\t\"<p class='statusBannerText'>\"+statusBannerText+\"</p>\" +\r\n\t \t\t\"<p id='refundResultsMessage'><br /><br />\" +str.substring(1,(str.length)) + \"</p>\" +\r\n\t \t\t\"</div>\" +\r\n\t \t\t\"</div>\" );\t \r\n\t \r\n\t // Hide the loader icon\r\n\t $.mobile.loading('hide'); \r\n\t\t}", "function newNotification(str) {\n notifier.notify({\n title: 'Bitmark Node App',\n message: `${str}`,\n icon: path.join(__dirname, 'assets/icons/app_icon.png'),\n sound: true,\n wait: false\n });\n}", "static async shipnotify(req, res) {\n try {\n // fetch order\n const order = await Order.findOne({\n order_number: req.body.shipnotice.ordernumber,\n });\n if (!order) {\n throw new Error('Order not found');\n }\n\n // update order\n order.status = 'shipped';\n order.tracking_number = req.body.shipnotice.trackingnumber;\n order.ship_date = moment(req.body.shipnotice.shipdate, 'M/D/YYYY').toDate();\n await order.save();\n\n await ShipstationHookController._sendOrderShippedNotification(order);\n\n // update stock qty if an order is shipped\n await ItemProductController.decreaseProductQuantity(order);\n\n return res.success('success');\n } catch (err) {\n return res.error(err.message);\n }\n }", "function newTeamNotify(com_id, comName){\n //com_id = '22';\n //comName = 'aaa';\n MailApp.sendEmail({to:\"[email protected],[email protected], [email protected]\" , subject: \"New Team Registered\", htmlBody: \"The Following Team has Registered: <br><br><br> Company Name: \" + comName + \"<br><br> iBoost Team ID : \" + com_id+\"<br><br><br><br> Best, <br><br> <img src='cid:logo' height='50' width='150'>\", inlineImages:{logo: imageLogo}});\n}", "sendNotifications() {\n var _a, _b;\n return this.notifications.send(services_notifications_1.NotificationType.EMAIL, {\n to: (_b = (_a = this.config.thrizer) === null || _a === void 0 ? void 0 : _a.email) === null || _b === void 0 ? void 0 : _b.to,\n subject: 'send test email',\n text: 'test',\n });\n }", "function newResponse(recipientId, text) {\n text = text || \"\";\n var testimonios = text.match(/testimonios/gi);\n\n if(testimonios != null) {\n var query = \"\";\n\n //sendMessage(recipientId, message);\n if(testimonios != null) {\n query = \"Historias\";\n } \n sendButtonMessage(recipientId, query);\n return true\n }\n return false;\n}", "function newMsj( data ) {\n var icon = 'info-sign';\n\n if( data.type == 'success' ) icon = \"ok-sign\";\n\n else if( data.type == 'warning' ) icon = \"exclamation-sign\";\n\n else if( data.type == 'danger' ) icon = \"remove-sign\";\n\n lsnoti.push( data );\n\n var remite = '';\n\n if( data.remitente.length > 0 ) {\n remite = '<div class=\"remitente\"><span>De: <b>' + data.remitente + '</b></span></div>';\n }\n return '<div class=\"notification-item ' + data.type + ' fade-enter\" id=\"nt' + data.id + '\">' +\n '<div class=\"icon\">' +\n '<span class=\"glyphicon glyphicon-' + icon + '\"></span>' +\n '</div>' +\n '<div class=\"contenido\">' +\n remite +\n '<span class=\"title\">' + data.title + '</span>' +\n '<span class=\"content\">' + data.content + '</span>' +\n '</div>' +\n '</div>';\n }", "function showMessagePage() {\r\n var objForm = nlapiCreateForm('Changing Accounting Periods');\r\n objForm.addField('custpage_result', 'inlinehtml', '').setDisplayType('normal').setDefaultValue(\r\n\t\t\t'Your Request has been submitted to be processed. You will be notified by email when the process is complete.');\r\n return objForm;\r\n}", "static show(req, res, next) {\n NotificationBusiness.findOne({_id: req.params.id})\n .then(notification => {\n if (!notification) {\n return res.status(404).end();\n }\n res.json(notification);\n })\n .catch(err => next(err));\n }", "showNotification(params) {\n params = Object.assign({\n id: GLib.DateTime.new_now_local().to_unix(),\n title: this.name,\n body: '',\n icon: new Gio.ThemedIcon({name: `${this.icon_name}-symbolic`}),\n priority: Gio.NotificationPriority.NORMAL,\n action: null,\n buttons: []\n }, params);\n\n let notif = new Gio.Notification();\n notif.set_title(params.title);\n notif.set_body(params.body);\n notif.set_icon(params.icon);\n notif.set_priority(params.priority);\n\n // Default Action\n if (params.action) {\n let hasParameter = (params.action.parameter !== null);\n\n if (!hasParameter) {\n params.action.parameter = new GLib.Variant('s', '');\n }\n\n notif.set_default_action_and_target(\n 'app.deviceAction',\n new GLib.Variant('(ssbv)', [\n this.id,\n params.action.name,\n hasParameter,\n params.action.parameter\n ])\n );\n }\n\n // Buttons\n for (let button of params.buttons) {\n let hasParameter = (button.parameter !== null);\n\n if (!hasParameter) {\n button.parameter = new GLib.Variant('s', '');\n }\n\n notif.add_button_with_target(\n button.label,\n 'app.deviceAction',\n new GLib.Variant('(ssbv)', [\n this.id,\n button.action,\n hasParameter,\n button.parameter\n ])\n );\n }\n\n this.service.send_notification(`${this.id}|${params.id}`, notif);\n }", "function notyMessage(statue) {\n $.noty.defaults.killer = true; //closes existing notys\n noty({\n text: 'Congratulations, you found <span class = \"emph\">' + statue.name + '</span>. <span class = \"close\">X</span> ',\n layout: 'topCenter',\n closeWith: ['click'],\n type: 'success'\n });\n}", "function emailSuccess() {}", "renderNotification() {\n if (this.props.state.recordVerified) {\n return (\n <h3 className='notification-text'><FontAwesomeIcon icon={faCheck} className='check' />School has been notified.</h3>\n )\n } else {\n return (\n <>\n <div className='col-sm-3'></div>\n <div className='col-sm-6 verify-content'>\n <a href='verify' className='issue-link-button btn btn-success shadow btn-block' onClick={this.onClick} id='notify-button'>Notify Last School of New Enrollment</a>\n </div>\n </>\n )\n\n }\n }", "function notifications(notificationMessage, callBackList)\n{\n\tvar colorHex = callBackList.colorCode.code;\n\t\tcolorHex = colorHex.replace('range-', '#');\n\tvar notificationTheme = 'notificationTheme';\n\t noty({\n\t\ttext: notificationMessage + '&nbsp;&nbsp;<span class=\"\" style=\"color:'+ colorHex +'\"><i class=\"fa fa-square\"></i></span>',\n\t\ttheme: notificationTheme, // 'relax' or 'defaultTheme'\n\t\ttemplate: '<div class=\"noty_message\"><span class=\"noty_text\"></span><div class=\"noty_close\"></div></div>',\n\t\tcloseWith: ['click'], // ['click', 'button', 'hover', 'backdrop'] // backdrop click will close all notifications\n\t\tbuttons: [\n\t\t{addClass: 'btn btn-primary notyButtonstyle glyphicon glyphicon-remove', text: '', onClick: function($noty) {\n\t\t\t\t$noty.close();\n\t\t\t}\n\t\t},\n\t\t{addClass: 'btn btn-primary notyButtonstyle glyphicon glyphicon-tasks', text: '', onClick: function($noty) {\n\n\t\t\t\tif(callBackList.colorCode.apply) {\n\t\t\t\t\tvar listing = getFilteredDisplayList(callBackList);\n\t\t\t\t\t$('#filteredlisting-display').empty();\n\t\t\t\t\t$('#filteredlisting-display').append(listing);\n\t\t\t\t\t$(\"#mapFilterNotificationModal\").modal({show: true});\n\t\t\t\t}\n\n\t\t\t}\n\t\t}],\n\t\tkiller : true\n\t});\n}", "function sendSms(numberPhone, message, flashSms = false) {\n const oAuthHeaders = { Authorization: `Bearer ${access_token}` };\n\n fetch('https://api.nvoip.com.br/v2/sms', {\n method: 'POST',\n headers: { ...defaultHeaders, ...oAuthHeaders },\n body: JSON.stringify({\n numberPhone,\n message,\n flashSms,\n }),\n })\n .then((res) => res.json())\n .then((data) => console.log(data))\n .catch((error) => console.log(error));\n}", "notify(text,title,type='success') {\n toastr.options.timeOut = 4500;\n toastr.options.hideDuration = 250;\n toastr.options.showDuration = 250;\n toastr.options.onShown = () => { this.getTemplateRanking(); };\n if (type === 'success') {\n toastr.success(text, title);\n }else {\n toastr.error(text, title);\n }\n }", "notifyTemplate(item) {\n if (this._addon) {\n this._addon.onAsyncResponse.notify({ item }, undefined, this);\n }\n }", "showNotification(data) {\n var opt = {\n type: \"basic\",\n title: \"TeamPlay\",\n message: \"Your final score was \" + data.score + \".\",\n iconUrl: \"./images/icon-32.png\"\n }\n chrome.notifications.create(this.uuidv4(), opt, null);\n }", "function probando(req, res) {\n res.status(200).send({ message: 'Probando desde del controladaor Message.' });\n}", "function showNotification(task) {\n const notify = (task) => {\n const title =\n task.type == taskTypes.rest\n ? \"Descanso finalizado\"\n : `Tarea \"${task.name}\" finalizada`;\n const options = {\n body: `Duración: ${Math.floor(task.length / 60)} minuto(s)\\n${\n task.type == taskTypes.rest\n ? \"A por la siguiente tarea\"\n : `Hora de un descanso`\n }`,\n icon: \"/MIW-NEW-Activities/res/notification-icon.png\",\n tag: notificationTag,\n renotify: true,\n };\n const notification = new Notification(title, options);\n\n // Return to pomodoro on notification click\n notification.onclick = () => window.focus();\n };\n\n if (Notification.permission === \"granted\") {\n notify(task);\n } else if (Notification.permission !== \"denied\") {\n Notification.requestPermission().then((permission) => {\n if (permission === \"granted\") notify(task);\n });\n }\n}", "function notifyContactForm(responses, form){\n\tvar resultMessages = {\n\t\tsuccess: 'Votre message a été envoyé, merci.',\n\t\tinvalidEmail: 'Erreur&nbsp;: Veuillez entrer une adresse email valide.',\n\t\tmissingFields: 'Erreur&nbsp;: Des champs requis n\\'ont pas été remplis.',\n\t\tinvalidCharacters: 'Erreur&nbsp;: L’email contient des caractères invalides.',\n\t\tfailure: 'Erreur&nbsp;: Votre message n’a pas pu être envoyé, veuillez réessayer plus tard.'\n\t};\n\n\tvar resultBox = form.querySelector('.result-box');\n\tvar fields = form.querySelectorAll('input, textarea');\n\tfields = [].slice.call(fields, 1);\n\n\tresultBox.innerHTML = '';\n\n\tconsole.log(responses);\n\n\tresponses.forEach(function(response){\n\t\tvar newMessage = document.createElement('p');\n\t\tnewMessage.innerHTML = resultMessages[response];\n\t\taddClass(newMessage, 'result-message');\n\n\t\tif(response === 'missingFields' || response === 'invalidEmail' || response === 'invalidCharacters')\n\t\t\taddClass(newMessage, 'error');\n\t\telse\n\t\t\taddClass(newMessage, response);\n\n\t\tresultBox.appendChild(newMessage);\n\n\n\t\tif (response === 'missingFields') {\n\t\t\tforEachNl(fields, function(field){\n\t\t\t\tif (field.value === '' && !hasClass(field.parentNode, 'optionnal')) {\n\t\t\t\t\taddClass(field.parentNode, 'invalid');\n\t\t\t\t} else {\n\t\t\t\t\tremoveClass(field.parentNode, 'invalid');\n\t\t\t\t}\n\t\t\t});\n\t\t} else if (response === 'invalidEmail' || response === 'invalidCharacters') {\n\t\t\taddClass(form.querySelector('.email'), 'invalid');\n\t\t} else {\n\t\t\tforEachNl(fields, function(field){\n\t\t\t\tremoveClass(field.parentNode, 'invalid');\n\t\t\t\tif(response === 'success') {\n\t\t\t\t\tfield.value = '';\n\t\t\t\t\tfield.focus();\n\t\t\t\t\tfield.blur();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\n}", "call(onResult) {\n const message = this.response.message || '';\n this.api.sendMessage(this.user.platformId, message,\n {\n disable_notification: !message.includes('🔔'),\n reply_markup: JSON.stringify({ hide_keyboard: true }),\n }).catch(console.log.bind(console));\n onResult();\n }", "function sendReminder() {\r\n//create the HTML file and send the email\r\nvar email = retrieveAnnouncement(reminder_doc_id);\r\n//send email\r\nGmailApp.sendEmail(labEmail, \"Newsletter Submission Reminder\", \"Error Sending Email\", {htmlBody: email});\r\n}", "function notifySuccess(msg, action, on_action) {\n const icon = {\n type: 'icon',\n class: 'material-icons',\n content: 'done',\n };\n console.debug(msg);\n notify('success', msg, action, on_action, icon);\n}", "generateMessage (callback) {\n\t\tthis.doApiRequest(\n\t\t\t{\n\t\t\t\tmethod: 'get',\n\t\t\t\tpath: this.path,\n\t\t\t\ttestTracking: true,\n\t\t\t\treallyTrack: true,\n\t\t\t\trequestOptions: {\n\t\t\t\t\tnoJsonInResponse: true,\n\t\t\t\t\texpectRedirect: true\n\t\t\t\t}\n\t\t\t},\n\t\t\tcallback\n\t\t);\n\t}", "function notify(string) {\n MailApp.sendEmail(emailForNotify, accountName, string);\n }", "function requestMessage() {\n\n var styles = `\n background-color: #E0E5CF;\n opacity: 0;\n border-radius: 10px;\n width: auto;\n height: auto;\n float: left;\n clear: right;\n padding-left: 6%;\n padding-top: 4%;\n padding-right: 4%;\n padding-bottom: 0.2%;\n margin-right: 22%;\n margin-bottom: 5%;\n box-shadow: -1px -1px -1px #888888;\n `;\n\n // uText.append(\"We will make sure that you found what you are looking for. Thank You!\");\n //sample response comment it out\n // userTyped.append(uText);\n //userTyped.append(document.createElement('br'));\n var xhttp = new XMLHttpRequest();\n xhttp.onreadystatechange = function() {\n if (this.readyState == 4 && this.status == 200) {\n var myObj = JSON.parse(this.responseText);\n console.log(this.responseText);\n var length = myObj.result.fulfillment.messages.length;\n console.log(\"The length is \" + length);\n if (length > 1) {\n console.log(\"Entered multiple messages loop\");\n var myObj = myObj.result.fulfillment.messages;\n for (var i = 0; i < length; i++) {\n\n if (typeof myObj[i].speech != \"undefined\") {\n var userTyped = document.createElement('p');\n userTyped.style = styles;\n userTyped.id = \"reServer\";\n var temp;\n var uText = document.createElement(\"p\");\n var str = myObj[i].speech;\n if (str.includes('https')) {\n\n temp = document.createElement('a');\n temp.href = str;\n temp.innerHTML = str;\n temp.target = \"_blank\";\n console.log('contains url');\n //userTyped.append(lk);\n } else {\n temp = myObj[i].speech;\n }\n uText.append(temp);\n userTyped.append(uText);\n\n document.getElementById('info').append(userTyped);\n\n\n //resource = 1;\n anim(userTyped, who = 2);\n //userTyped.append(document.createElement('br'));\n elem = document.getElementById('info');\n elem.scrollTop = elem.scrollHeight;\n\n } else if (typeof myObj[i].payload != \"undefined\") {\n var img_styles = `\n width: 90%;\n height: 60%;\n margin-top: 2%;\n margin-bottom: 5%;\n `;\n var userTyped = document.createElement('p');\n //userTyped.style = styles;\n var lk = document.createElement('a');\n lk.href = myObj[i].payload.image;\n lk.target = \"_blank\";\n var imgg = document.createElement('img');\n imgg.src = myObj[i].payload.image;\n imgg.style = img_styles;\n lk.append(imgg);\n\n\n userTyped.append(lk);\n\n document.getElementById('info').append(userTyped);\n\n\n anim(userTyped, who = 2);\n //userTyped.append(document.createElement('br'));\n elem = document.getElementById('info');\n elem.scrollTop = elem.scrollHeight;\n\n }\n\n\n elem = document.getElementById('info');\n elem.scrollTop = elem.scrollHeight;\n\n\n }\n\n } else {\n var userTyped = document.createElement('p');\n userTyped.style = styles;\n userTyped.id = \"reServer\";\n\n var uText = document.createElement(\"p\");\n\n uText.append(JSON.parse(xhttp.responseText).result.fulfillment.speech);\n userTyped.append(uText);\n\n document.getElementById('info').append(userTyped);\n //resource = 1;\n anim(userTyped, who = 2);\n //userTyped.append(document.createElement('br'));\n elem = document.getElementById('info');\n elem.scrollTop = elem.scrollHeight;\n\n }\n }\n };\n xhttp.open(\"POST\", baseUrl + \"query?v=20180101\", true);\n xhttp.setRequestHeader(\"Authorization\", \"Bearer \" + accessToken);\n xhttp.setRequestHeader(\"Content-Type\", \"application/json;charset=UTF-8\");\n data = JSON.stringify({ query: global_message, lang: \"en\", sessionId: \"somerandomthing\" }),\n xhttp.send(data);\n\n //use this code to send user message to server using ajax\n\n}", "function emailTech(infoID, techEmail, techName, subject){\n var string = $('#' + infoID + '');\n string.find('script').remove();\n\n var without = string.wrap(\"<div>\").parent().html();\n\n\n var html = \"<h1>Hello \" + techName + \", this week you will be cutting grass for: </h1>\" + without;\n\n $.get('/sent', {to:techEmail, subject:subject, html:html}, function(data){\n if(data == \"sent\") {\n $(\"#message\").text(\"Email Sent!\");\n $(\"#message\").attr(\"class\", \"alert alert-success\");\n }\n else {\n $(\"#message\").text(\"Email was not sent\");\n $(\"#message\").attr(\"class\", \"alert alert-danger\");\n }\n });\n \n}", "function changeNote(responseXML) {\n //parse the needed info from XML response and change note accordingly\n var noteObject = responseXML.getElementsByTagName(\"note\")[0];\n var title = noteObject.getElementsByTagName(\"title\")[0];\n var target = noteObject.getElementsByTagName(\"targetUser\")[0];\n var author = noteObject.getElementsByTagName(\"author\")[0];\n var message = noteObject.getElementsByTagName(\"message\")[0];\n var deadline = noteObject.getElementsByTagName(\"deadline\")[0];\n var category = noteObject.getElementsByTagName(\"category\")[0];\n title = title.childNodes[0].nodeValue;\n target = target.childNodes[0].nodeValue;\n author = author.childNodes[0].nodeValue;\n message = message.childNodes[0].nodeValue;\n deadline = deadline.childNodes[0].nodeValue;\n category = category.childNodes[0].nodeValue;\n $(\"#noteTitle\").text(title);\n $(\"#noteTarget\").text(\"Targeted to: \" + target);\n $(\"#noteAuthor\").text(\"Sent by \" + author);\n $(\"#noteMessage\").text(\"Message: \" + message);\n $(\"#noteDueDate\").text(\"Due by: \" + deadline);\n $(\"#noteCategory\").text(\"Category: \" + category);\n //when tect changed, show to user\n note.show();\n }", "function notifyWechat(msg) {\n return rp({\n method: 'POST',\n uri: functions.config().wechat.common_notify_url,\n body: {\n msgtype: 'text',\n text: {\n content: msg\n },\n },\n json: true,\n });\n}", "function getNewNotifications() {\n var unreadNotifications = 0;\n var ulHtml = '';\n var subject = '';\n var body = '';\n var link = '';\n var date = '';\n var notification_id = '';\n var receiver_id = '';\n var status_id = '';\n var user_receiver={};\n var decoded_token = decodeToken();\n var user_id = decoded_token['https://linuxacademy.com/auth/uuid'];\n\n $.ajax({\n url: notificationsApiPath + '/notifications?per_p=10&status_id='+notification_unread_status,\n dataType: 'json',\n beforeSend: function (xhr) {\n xhr.setRequestHeader('Authorization', accessToken());\n },\n success: function (data) {\n unreadNotifications = data.pagination.records;\n\n data.data.forEach(function (notification) {\n\n //find the receiver belonging to this user\n notification.receivers.forEach(function (receiver){\n if(receiver.user_id == user_id){\n user_receiver = receiver;\n }\n });\n\n // set up the params\n subject = cleanNotificationSubject(notification['subject']);\n body = cleanNotificationText(notification['body']);\n link = ((typeof notification['links'][0] !== 'undefined') ? notification['links'][0]['link'] : '');\n date = notification['created_at'];\n notification_id = notification.id;\n status_id = notification_read_status;\n receiver_id = user_receiver.id;\n\n\n //build the html list\n ulHtml += '<li>';\n ulHtml += '<a onclick=\"showNewNotification(\\''+subject+'\\',\\''+body+'\\',\\''+link+'\\',\\''+date+'\\',\\''+notification_id+'\\',\\''+status_id+'\\',\\''+receiver_id+'\\')\" data-toggle=\"modal\" href=\"#\">' + subject + '</a>';\n ulHtml += '</li>';\n });\n\n // view all link for bottom of menu\n ulHtml += '<li><a class=\"la-link\" href=\"' + notificationsPagePath + '\">View all</a></li>';\n $('#notification_overlay').html(ulHtml);\n },\n error: function (error) {\n //console.log(error)\n },\n complete: function () {\n $('#num_notifications').text(unreadNotifications);\n }\n });\n}", "async function notifyNewMessages(auth){\n try{\n // Get all the new filtered messages\n const newMessages=await getNewFilteredMessages(auth);\n\n // Notify the user, desktop & console\n notify(newMessages);\n }\n catch(err){\n console.log(\"Error in notifyNewMessages\")\n throw err;\n }\n \n}", "function notifyToSeller(product_id)\r\n{\r\n var isValidEmail = false;\r\n if( $(\"notify_to_seller_email\").value == '' )\r\n $(\"notify_to_me_email_error\").style.display = 'block';\r\n else\r\n {\r\n var emailText = document.getElementById('notify_to_seller_email').value;\r\n var pattern = /^[a-zA-Z0-9\\-_]+(\\.[a-zA-Z0-9\\-_]+)*@[a-z0-9]+(\\-[a-z0-9]+)*(\\.[a-z0-9]+(\\-[a-z0-9]+)*)*\\.[a-z]{2,4}$/;\r\n if (pattern.test(emailText)) \r\n {\r\n $(\"notify_to_me_email_error\").style.display = 'none';\r\n isValidEmail = true;\r\n }\r\n else \r\n {\r\n $(\"notify_to_me_email_error\").style.display = 'block';\r\n return;\r\n }\r\n }\r\n \r\n // IF VIEWER ENTER A VALID EMAIL ADDRESS, THEN ONLY SEND MAIL TO SELLER\r\n if( isValidEmail )\r\n {\r\n en4.core.request.send(new Request.JSON({\r\n url : en4.core.baseUrl + 'sitestoreproduct/product/notify-to-seller/product_id/'+product_id,\r\n onRequest: function(){\r\n $('notify_to_me_loading').innerHTML = '<img src=\"'+en4.core.staticBaseUrl+'application/modules/Sitestoreproduct/externals/images/loading.gif\" />';\r\n },\r\n data : {\r\n 'format' : 'json',\r\n 'buyer_email' : $(\"notify_to_seller_email\").value\r\n },\r\n onSuccess: function(responseJSON)\r\n {\r\n $('notify_to_me_loading').removeClass('loading');\r\n if( responseJSON.successMessage )\r\n $(\"notify_to_seller\").innerHTML = responseJSON.successMessage;\r\n }\r\n }\r\n ))\r\n }\r\n}", "function emailMessage(){\n if (req.body.frequency == 'Hourly'){\n return 'Hello ' + req.body.firstName.charAt(0).toUpperCase() + req.body.firstName.slice(1) + '!\\n\\n' + \n 'You will be reminded every ' + req.body.timeLine + ' hours via email to take your ' + req.body.medicineName + '.'; \n }else{\n return 'Hello ' + req.body.firstName.charAt(0).toUpperCase() + req.body.firstName.slice(1) + '!\\n\\n' +\n 'You will be reminded every ' + req.body.timeLine + ' minutes via email to take your ' + req.body.medicineName + '.'; \n }\n }" ]
[ "0.5794008", "0.5759697", "0.55709374", "0.55594426", "0.55066866", "0.5472384", "0.5464021", "0.54527056", "0.54133725", "0.5389886", "0.5381415", "0.5357388", "0.533699", "0.5305945", "0.5287527", "0.5271591", "0.52711457", "0.52659965", "0.52626544", "0.5260453", "0.5222309", "0.51904666", "0.518942", "0.5171512", "0.51713425", "0.51636755", "0.5162745", "0.5152761", "0.5148935", "0.51435995", "0.513565", "0.5128096", "0.5122298", "0.5117234", "0.51117885", "0.5098807", "0.5086352", "0.50735205", "0.50669146", "0.5060845", "0.505899", "0.5052658", "0.50517464", "0.5046702", "0.5042587", "0.5041053", "0.50368655", "0.50319517", "0.50234973", "0.5021309", "0.5018043", "0.5014903", "0.50077385", "0.50058717", "0.5002107", "0.5001024", "0.4993711", "0.4989171", "0.49879602", "0.4986656", "0.49818087", "0.49786675", "0.4977992", "0.49575073", "0.4953931", "0.4948146", "0.49458206", "0.4944166", "0.49434924", "0.49421415", "0.49405965", "0.49396232", "0.49311706", "0.49283782", "0.49218857", "0.4913846", "0.4898869", "0.4897343", "0.48972225", "0.48946774", "0.48922256", "0.48892424", "0.4888609", "0.4885396", "0.4884672", "0.4874788", "0.4872947", "0.4867891", "0.48651835", "0.48650575", "0.48646778", "0.48625875", "0.48596838", "0.48578784", "0.4855837", "0.4849927", "0.48480472", "0.48456162", "0.4843941", "0.4843677" ]
0.6763276
0
Output: the number of valleys traversed constraints: the number of steps will be more than 1 and less than or equal to 10^6 Edge Cases: After going down, when you go back up, the number of valleys increases by one if previous direction is "D" and current direction is "U" increment valleys by one
function countingValleys(steps, path) { // create an altitude variable representing sea level and equal to zero let altitude = 0; // create a previousAlt variable equal to zero let previousAlt = 0; // create a valleys variable let valleys = 0; // iterate over the path string for (let i = 0; i < path.length; i++) { // previousAlt equals altitude let previousAlt = altitude; // if the current value is U increment sea level, if the value is D decrement the value if (path[i] === "U") { altitude++; } else { altitude--; } // if previousAlt < 0 && altitude === 0 then increment valleys if (previousAlt < 0 && altitude === 0) { valleys++; } } // return valleys return valleys; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function countingValleys(steps, path) {\n let map = {\n D: -1,\n U: 1,\n };\n let counter = 0;\n let initial = 0;\n let tempArr = [];\n let index = [];\n let result = 0;\n while (counter <= steps) {\n if (initial == 0 && path[counter - 1]) {\n index.push(counter - 1);\n }\n initial += map[path[counter]];\n tempArr.push(initial);\n counter++;\n }\n\n if (index.length) {\n index.forEach((idx) => {\n if (tempArr[idx - 1] < 0) {\n result++;\n }\n });\n }\n\n return result;\n}", "function countingValleys(steps, path) {\r\n\t// Write your code here\r\n\tlet u = 0;\r\n\tlet d = 0;\r\n\tlet currLevel = 0;\r\n\tlet valleys = 0;\r\n\tlet mountains = 0;\r\n\tfor (let i = 0; i < steps; i++) {\r\n\t\t//update the current level\r\n\t\tif (path[i] === 'U') {\r\n\t\t\tcurrLevel += 1;\r\n\t\t\t// check if going up will bring me back to sea level\r\n\t\t\tif (currLevel == 0) valleys += 1;\r\n\t\t} else {\r\n\t\t\tcurrLevel -= 1;\r\n\t\t\t// check if going down will bring me back to sea level\r\n\t\t\tif (currLevel == 0) mountains += 1;\r\n\t\t}\r\n\t}\r\n\t\r\n\treturn valleys;\r\n}", "function countingValleys(steps, path) {\n let pathArr = path.split('');\n let vallies = 0;\n let seaLevel = 0;\n let inValley = false;\n for (let step of pathArr) {\n step === 'U' ? seaLevel++ : seaLevel--;\n if (seaLevel < 0 && !inValley) {\n vallies++;\n inValley = true;\n } else if (seaLevel >= 0 && inValley) {\n inValley = false;\n }\n }\n return vallies;\n}", "function countingValleys(steps, path) {\n const array = path.split('').map(el => {if (el==='U') { return 1} else {return -1}});\n let valleys = 0\n let actions = array[0];\n\n for (let i=1; i<steps; i++) { \n actions+=array[i];\n if (actions === 0 && array[i]>0) {\n valleys++; \n } \n }\n \n return valleys;\n \n}", "function countingValleys(n, s) {\n let seaLevel = 0;\n let mountains = 0;\n let valleys = 0;\n let currentAltitude = 0;\n let stepsSeen = [];\n\n\n for (let step of s) {\n \n step == 'U' ? (++currentAltitude && stepsSeen.push(1)) : (--currentAltitude && stepsSeen.push(-1));\n\n if (currentAltitude == seaLevel) {\n // we have finished a mountain or a valley.\n let positiveTotal = stepsSeen.filter((element) => element > 0).length\n let negativeTotal = stepsSeen.filter((element) => element < 0).length\n\n if (positiveTotal > negativeTotal) {\n ++mountains;\n }\n if (positiveTotal < negativeTotal) {\n ++valleys;\n }\n if (positiveTotal == negativeTotal) {\n if (stepsSeen[0] > 1) {\n ++mountains\n }\n else {\n ++valleys\n }\n }\n stepsSeen = []; // reset;\n }\n \n\n }\n console.log('Mountains seen: ', mountains)\n console.log('Valleys seen: ', valleys)\n return valleys;\n}", "function countingValleys(n, s) {\n let steps = s.split('');\n let valleyCount = 0;\n let currentSeaLevel = 0;\n let valleyStatus = false;\n steps.forEach((step) => {\n step === 'U' ? currentSeaLevel++ : currentSeaLevel--;\n if (currentSeaLevel < 0 && !valleyStatus) {\n valleyCount++;\n valleyStatus = true;\n } else if (currentLevel >= 0 && valleyStatus) {\n valleyStatus = false;\n }\n });\n return valleyCount;\n}", "function countingValleys(n, s) {\n let level = 0;\n let valley = 0;\n s.split('').forEach((item) => {\n if (item === 'U') {\n ++level;\n } else {\n --level;\n }\n if (item === 'U' && level === 0) {\n // if current is UP AND it is at level 0, means it came from a valley!\n ++valley;\n }\n });\n\n return valley;\n}", "function countingValleys(s) {\n let counter = 0\n let valleys = 0\n for(var i=0; i<s.length;i++){\n if(s[i] == \"F\"){\n console.log(\"forward\")\n } else if (s[i] == \"D\"){\n counter -= 1\n } else if (s[i] == \"U\"){\n counter += 1\n if(counter == 0){\n valleys += 1\n }\n }\n }\n return valleys\n }", "function countingValleys(n, s) {\n // n = steps\n // s = string of steps. i.e. DDUUDUDDUU\n // prev_num used to determine if upon reaching sea level (elevation = 0), was I on a hill or a valley.\n // elevation used to track current position\n let i = 0;\n let prev_elevation;\n let elevation = 0; // sea level\n let valley = 0\n while(i<n){\n\n if(s.charAt(i) === \"D\"){\n prev_elevation = elevation\n elevation -= 1\n i++\n console.log(\"ELEVATION from D: \", elevation)\n }\n if(s.charAt(i) === \"U\"){\n prev_elevation = elevation\n elevation += 1\n i++\n console.log(\"ELEVATION from U: \", elevation)\n if(elevation == 0 && prev_elevation < 0){\n valley += 1\n }\n }\n }\n console.log(`VALLEYS: ${valley}`)\n return valley\n}", "function countingValleys(n, s) {\n let seaLevel = 0;\n let currLevel = 0;\n let valleys = 0;\n\n s = s.split('');\n for (let i = 0; i < s.length; i++) {\n //update the current level\n if (s[i] === 'U') {\n currLevel += 1;\n if (currLevel == 0) {\n valleys += 1;\n }\n } else {\n currLevel -= 1;\n }\n\n\n }\n\n return valleys;\n\n}", "function countingValleys(n, s) {\n let heights = [];\n let height = 0;\n let numValleys = 0;\n\n for(let i = 0; i < s.length; i++) {\n if(s[i] === \"D\") {\n height -= 1;\n }\n if(s[i] === \"U\") {\n height += 1;\n }\n heights.push(height);\n }\n\n for(let j = 0; j < heights.length; j++) {\n if(heights[j] === -1 && heights[j+1] === 0) {\n numValleys += 1;\n }\n }\n return numValleys;\n}", "function numberOfWaysToTraverseGraph(width, height) {\n const array = new Array(height)\n for (let i = 0; i < array.length; ++i) {\n array[i] = new Array(width).fill(0)\n }\n for (let widthIdx = 0; widthIdx < array.length; ++widthIdx) {\n for (let heightIdx = 0; heightIdx < array[widthIdx].length; ++heightIdx) {\n if (heightIdx === 0 || widthIdx === 0) {\n array[widthIdx][heightIdx] = 1;\n } else {\n const left = array[widthIdx][heightIdx - 1];\n const up = array[widthIdx - 1][heightIdx];\n array[widthIdx][heightIdx] = left + up\n }\n }\n }\n\n return array[height - 1][width - 1]\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 getChainLength(x:int, y: int, xIncrement: int, yIncrement: int){\n\tvar countUp = 0;\n\tvar countDown = 0;\n\twhile (cells[x + countUp * xIncrement, y + countUp * yIncrement].cellStatus == cells[x,y].cellStatus){\n\t\tcountUp ++;\n\t\tif (Mathf.Max(x + countUp * xIncrement, y + countUp * yIncrement) > xSize - 1 || Mathf.Min(x + countUp * xIncrement, y + countUp * yIncrement) < 0){\n\t\t\tbreak;\n\t\t}\n\t}\n\twhile (cells[x - countDown * xIncrement, y - countDown * yIncrement].cellStatus == cells[x,y].cellStatus){\n\t\tcountDown ++;\n\t\tif (Mathf.Max(x - countDown * xIncrement, y - countDown * yIncrement) > xSize - 1 || Mathf.Min(x - countDown * xIncrement, y - countDown * yIncrement) < 0){\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn countUp + countDown - 1;\n}", "countEvens() {\n let count = 0;\n if ([this.root][0] === null) return 0;\n const totalValues = [this.root];\n while (totalValues.length) {\n let current = totalValues.pop();\n if (current.val % 2 === 0) {\n count = count + 1;\n }\n if (current.children) {\n for (let child of current.children) {\n totalValues.push(child);\n }\n }\n } return count;\n\n }", "function countingValleys(n, s) {\n var sArr=s.split('');\n var seaLevel = 0;\n var valley = 0;\n var counter = 0;\n var increment;\n while(counter!=n){\n if(sArr[counter]=='D'){\n increment =-1;\n }\n else if(sArr[counter]=='U'){\n increment = 1;\n }\n if(counter !=0 && seaLevel<0 && seaLevel+increment ==0){\n valley+=1;\n }\n seaLevel+=increment;\n counter+=1;\n }\n return valley;\n}", "list_possibles() {\n let factor = 1;\n\n this.nodes.forEach(node => {\n if (node.solved) return;\n factor = factor * node.possibles.length;\n console.log(`${node.index} (${node.possibles.length}): ${node.possibles}`);\n });\n\n console.log(factor);\n }", "getNumActiveDiagnosed() { return this.E1[1] + this.I0[1] + this.I1[1] + this.I2[1] + this.I3[1]; }", "function findLengthInDirection(position, gameState, value, change) {\n let {row, column} = position; // current position of move\n let upwardLength = 0; // continuous upward chain length of same values\n let downwardLength = 0; // continuous downward chain length of same values\n // positive direction\n while(row >= 0 && row < gameState.length && column >= 0 && column < gameState.length && gameState[row][column]) {\n if(gameState[row][column] === value){\n downwardLength++;\n row = row + change[0];\n column = column + change[1];\n } else {\n break;\n }\n }\n row = position.row - change[0];\n column = position.column - change[1];\n while(row >= 0 && row < gameState.length && column >= 0 && column < gameState.length && gameState[row][column]) {\n if(gameState[row][column] === value) {\n upwardLength++;\n row = row - change[0];\n column = column - change[1];\n } else {\n break;\n }\n }\n return upwardLength + downwardLength;\n}", "get constraintStepsY() {\n return +this.getAttribute('constraint-steps-y') || 0;\n }", "function countUpAndDown(n) {\nconsole.log(\"Going up!\");\nfor (let i = 0; i < n; i++) {\n console.log(i);\n}\nconsole.log(\"At the top!\\nGoing down...\");\nfor (let j = n - 1; j >= 0; j--) {\n console.log(j);\n}\nconsole.log(\"Back down. Bye!\");\n}", "calculateObjective (patternVerticalOffsets, minStopPerPattern, maxStopPerPattern, transfersFromPattern) {\n let objective = 0\n for (let pattern of patternVerticalOffsets.keys()) {\n if (!transfersFromPattern.has(pattern)) continue\n\n let txx = transfersFromPattern.get(pattern)\n txx.forEach(transfer => {\n let from = transfer.fromStop - minStopPerPattern.get(pattern) + patternVerticalOffsets.get(pattern)\n let to = transfer.toStop - minStopPerPattern.get(transfer.toPattern) + patternVerticalOffsets.get(transfer.toPattern)\n\n // this transfer goes the wrong way\n if (to <= from) objective += from - to + 1\n })\n }\n\n return objective\n }", "getNumOfEdges() {\n let numOfRelations = 0;\n for (let node of this.nodes) {\n numOfRelations += node.adjacent.size;\n }\n return numOfRelations / 2;\n }", "getPriorityBasedOnPrev(current, prev, referencePriorityValue) {\n if (current == ConnectionModel_1.Direction.south) { // current moves from top to down\n switch (prev) {\n case ConnectionModel_1.Direction.east:\n case ConnectionModel_1.Direction.northEast:\n case ConnectionModel_1.Direction.southEast: // came from left side\n return ++referencePriorityValue; // increment because the highest value will be drawn on left\n case ConnectionModel_1.Direction.west:\n case ConnectionModel_1.Direction.northWest:\n case ConnectionModel_1.Direction.southWest: // came from right\n return --referencePriorityValue; // decrement because the lowest value will be drawn on right\n }\n }\n if (current == ConnectionModel_1.Direction.north) { // current moves from down to top\n switch (prev) {\n case ConnectionModel_1.Direction.east:\n case ConnectionModel_1.Direction.northEast:\n case ConnectionModel_1.Direction.southEast:\n return --referencePriorityValue;\n case ConnectionModel_1.Direction.west:\n case ConnectionModel_1.Direction.northWest:\n case ConnectionModel_1.Direction.southWest:\n return ++referencePriorityValue;\n }\n }\n if (current == ConnectionModel_1.Direction.west) {\n switch (prev) {\n case ConnectionModel_1.Direction.south:\n case ConnectionModel_1.Direction.southWest:\n case ConnectionModel_1.Direction.southEast:\n return ++referencePriorityValue;\n case ConnectionModel_1.Direction.north:\n case ConnectionModel_1.Direction.northWest:\n case ConnectionModel_1.Direction.northEast:\n return --referencePriorityValue;\n }\n }\n if (current == ConnectionModel_1.Direction.east) {\n switch (prev) {\n case ConnectionModel_1.Direction.south:\n case ConnectionModel_1.Direction.southWest:\n case ConnectionModel_1.Direction.southEast:\n return --referencePriorityValue;\n case ConnectionModel_1.Direction.north:\n case ConnectionModel_1.Direction.northWest:\n case ConnectionModel_1.Direction.northEast:\n return ++referencePriorityValue;\n }\n }\n if (current == ConnectionModel_1.Direction.southEast) {\n switch (prev) {\n case ConnectionModel_1.Direction.north:\n case ConnectionModel_1.Direction.east:\n case ConnectionModel_1.Direction.northEast:\n return ++referencePriorityValue;\n case ConnectionModel_1.Direction.south:\n case ConnectionModel_1.Direction.west:\n case ConnectionModel_1.Direction.southWest:\n return --referencePriorityValue;\n }\n }\n if (current == ConnectionModel_1.Direction.northWest) {\n switch (prev) {\n case ConnectionModel_1.Direction.north:\n case ConnectionModel_1.Direction.east:\n case ConnectionModel_1.Direction.northEast:\n return --referencePriorityValue;\n case ConnectionModel_1.Direction.south:\n case ConnectionModel_1.Direction.west:\n case ConnectionModel_1.Direction.southWest:\n return ++referencePriorityValue;\n }\n }\n if (current == ConnectionModel_1.Direction.northEast) {\n switch (prev) {\n case ConnectionModel_1.Direction.south:\n case ConnectionModel_1.Direction.east:\n case ConnectionModel_1.Direction.southEast:\n return --referencePriorityValue;\n case ConnectionModel_1.Direction.north:\n case ConnectionModel_1.Direction.west:\n case ConnectionModel_1.Direction.northWest:\n return ++referencePriorityValue;\n }\n }\n if (current == ConnectionModel_1.Direction.southWest) {\n switch (prev) {\n case ConnectionModel_1.Direction.south:\n case ConnectionModel_1.Direction.east:\n case ConnectionModel_1.Direction.southEast:\n return ++referencePriorityValue;\n case ConnectionModel_1.Direction.north:\n case ConnectionModel_1.Direction.west:\n case ConnectionModel_1.Direction.northWest:\n return --referencePriorityValue;\n }\n }\n return referencePriorityValue;\n }", "function countingValleys(n, s) {\n let hight = 0;\n let count = 0;\n \n for(var i = 0; i < n; i++) {\n if(s.charAt(i) === \"D\" && hight == 0) {\n count++;\n hight--;\n } else if (s.charAt(i) === \"D\" && hight !== 0) {\n hight--;\n } else if (s.charAt(i) === \"U\") {\n hight++;\n }\n }\n return count;\n\n}", "function traverse(cur_pos, tc, b, visited, optPaths) {\n if(tc<0) return -2;\n\n if(cur_pos==b){\n optPaths[b][\"spt\"] = tc;\n optPaths[b][\"path\"] = [];\n optPaths[b][\"path\"].push(b);\n optPaths[b][\"res\"] = graph_vertices[b];\n console.log(\"base case\");\n return optPaths[b][\"res\"];\n }\n\n // let copiedOptPaths = JSON.parse(JSON.stringify(optPaths));\n let maxRes = -1, rec_ans, maxST = -1;\n visited[cur_pos] = 1;\n let temp_path = [];\n\n for(let i=0; i<graph_edges[cur_pos].length; i++){\n let toVis = graph_edges[cur_pos][i][0];\n let nbr_wt = graph_edges[cur_pos][i][1];\n console.log(toVis, nbr_wt);\n \n if(visited[toVis]==0){\n visited[toVis]=1;\n rec_ans = traverse(toVis, tc-nbr_wt, b, visited, optPaths);\n visited[toVis]=0;\n\n // if(rec_ans>maxRes || (rec_ans==maxRes && (maxST<optPaths[b][\"spt\"]))){\n if(parseInt(rec_ans)>parseInt(maxRes) || (rec_ans==maxRes && (maxST<optPaths[b][\"spt\"]))){\n maxRes = rec_ans;\n maxST = optPaths[b][\"spt\"];\n\n temp_path = optPaths[toVis][\"path\"];\n // optPaths[cur_pos] = optPaths[toVis];\n console.log(\"max res update:\", maxRes, optPaths[cur_pos][\"path\"]);\n }\n }\n\n }\n\n if(maxRes != -1){\n optPaths[cur_pos][\"res\"] = maxRes + graph_vertices[cur_pos];\n temp_path.unshift(cur_pos);\n }\n \n optPaths[cur_pos][\"path\"] = temp_path;\n optPaths[cur_pos][\"spt\"] = maxST;\n // optPaths[cur_pos][\"res\"] += graph_vertices[cur_pos];\n\n visited[cur_pos] = 0; // backtracking\n if(maxRes==-1) return -2;\n\n console.log(\"return value:\", optPaths[cur_pos][\"res\"]);\n return optPaths[cur_pos][\"res\"];\n}", "function countingValleys(n, s) {\r\n var altitude=0; var result=0;\r\n for(var i=0;i<n;i++)\r\n {\r\n if(s[i]=='U')\r\n {\r\n altitude++;\r\n \r\n if(altitude==0)\r\n {\r\n result++;\r\n }\r\n }\r\n else{\r\n //console.log(altitude--);\r\n altitude--;\r\n }}\r\n \r\n return result;\r\n }", "_countUp() {\n if (this.__pageUpMode) {\n var newValue = this.getValue() + this.getPageStep();\n } else {\n var newValue = this.getValue() + this.getSingleStep();\n }\n\n // handle the case where wrapping is enabled\n if (this.getWrap()) {\n if (newValue > this.getMaximum()) {\n var diff = this.getMaximum() - newValue;\n newValue = this.getMinimum() - diff - 1;\n }\n }\n\n this.gotoValue(newValue);\n }", "function staircaseTraversal(height, maxSteps) {\n // Write your code here.\n let currNumberOfWays = 0;\n\tlet waysToTop = [1]; \n\t\n\tfor(let currHeight = 1; currHeight <= height; currHeight ++) {\n\t\tlet startOfWindow = currHeight - maxSteps - 1;\n\t\tlet endOfWindow = currHeight - 1;\n\t\tif(startOfWindow >= 0) {\n\t\t\tcurrNumberOfWays -= waysToTop[startOfWindow];\n\t\t}\n\t\tcurrNumberOfWays += waysToTop[endOfWindow];\n\t\twaysToTop.push(currNumberOfWays); \n\t}\n\treturn waysToTop[height]; \n}", "function traverse(index) {\n let numWays = 0;\n\n if (index == s.length) return 1;\n\n if (memo[index] !== null) return memo[index];\n\n if (s[index] > 0) {\n numWays += traverse(index + 1);\n }\n\n if (s[index] != 0 && s[index + 1] != null && s[index] + s[index + 1] < 27) {\n numways += traverse(index + 2);\n }\n\n memo[index] = numWays;\n\n return numWays;\n }", "function staircaseTraversal(height, maxSteps) {\n // Write your code here.\n\tconst ways = new Array(height + 1).fill(0); \n\tways[0] = 1; \n\tways[1] = 1;\n\t\n\tfor(let i = 2; i < height + 1; i++) {\n\t\tlet step = 1; \n\t\twhile(step <= maxSteps && step <= i) {\n\t\t\tways[i] += ways[i - step]; \n\t\t\tstep += 1;\n\t\t}\n\t}\n\treturn ways[height]; \n}", "function Treecount(right, down) {\n let counter = 0; //counts tress\n let counter2 = 1; //counts items in file\n let sledPosition = 0;\n \n\n for ( let i = 0; i < dataList.length; i=i+down) {\n if (sledPosition>30) sledPosition = sledPosition-31;\n if (dataList[i][sledPosition]== \"#\") counter++;\n console.log(dataList[i], dataList[i][sledPosition], sledPosition, counter, counter2); \n sledPosition = sledPosition+right; \n counter2++ \n }\n return counter;\n}", "function changeIterCount(value, denoms) {\r\n // -------------------- Your Code Here --------------------\r\n\r\n \r\n \r\n\r\n \r\n // -------------------- End Code Area ---------------------\r\n}", "function checkSoftConstSix()\n{\n const shifts = nurseShifts[0].length;\n const nurses = nurseShifts.length; \n var numberOfBrokenConstraints = 0;\n //console.log('+------------------------------------------Ograniczenie miękkie nr. 6------------------------------------------+')\n for(var nurse = 0; nurse < nurses; nurse++)\n {\n //zmiana 0 oznacza zmianę dzienną, \n for(var shift = 0; shift < shifts; shift += 4)\n {\n //Jeśli zmiana dzienna jest zajeta i zmiana wczesna dnia następnego przez tę samą pielęgniarke to ograniczenie zostaje złamane.\n if((nurseShifts[nurse][shift] === 1) && (nurseShifts[nurse][shift + 5] === 1))\n {\n //cconsole.log('* Pielęgniarka nr.: ' + nurse + ', ogarniczenie nr. 6 złamne w miejscu zmiany nr.: ' + shift); \n //for(var i = shift; i <= (shift + 5); ++i) console.log('**Zmiana nr.: '+ i + ' | ' + nurseShifts[nurse][i]);\n //cconsole.log('#################################################################');\n numberOfBrokenConstraints++;\n }\n }\n \n }\n\n //console.log('+--------------------------------------------------------------------------------------------------------------+')\n return numberOfBrokenConstraints;\n}", "N() {\n return this.maxIteration - this.iteration;\n }", "get numberOfVampiresFromOriginal() {\n let numberOfVampires = 0;\n let currentVampire = this;\n // climb \"up\" the tree (using iteration), counting nodes, until no boss is found\n while (currentVampire.creator) {\n currentVampire = currentVampire.creator;\n numberOfVampires++;\n }\n return numberOfVampires;\n }", "function countUpAndDown(n) {\n\tconsole.log('Going up!');\n\tfor (let i = 0; i < n; i++) {\n\t\tconsole.log(i);\n\t}\n\tconsole.log('At the top!\\nGoing down...');\n\tfor (let j = n - 1; j >= 0; j--) {\n\t\tconsole.log(j);\n\t}\n\tconsole.log('Back down. Bye!');\n}", "function steps(statues) {\n let max = Math.max(...statues);\n let min = Math.min(...statues);\n let length = statues.length;\n let result = max - min + 1 - length;\n return length;\n}", "get totalDescendents() {\n let totalVamps = 0;\n\n for (let child of this.offspring) {\n totalVamps += child.totalDescendents + 1;\n }\n return totalVamps;\n }", "degree(u) {\n\t\tea && assert(this.validVertex(u));\n\t\tlet d = 0;\n\t\tfor (let e = this.firstAt(u); e != 0; e = this.nextAt(u,e)) d++;\n\t\treturn d;\n\t}", "stepsIn(el) {\n return Number(el.max) - Number(el.min) + 1;\n}", "countEvens() {\n let count = 0;\n if (this.root === null){\n return count;\n }\n const queue = [this.root];\n while (queue.length){\n const currentNode = queue.shift();\n if (currentNode.val%2==0){\n count+=1;\n }\n for (let child of currentNode.children){\n queue.push(child);\n }\n }\n return count;\n }", "_countDown() {\n if (this.__pageDownMode) {\n var newValue = this.getValue() - this.getPageStep();\n } else {\n var newValue = this.getValue() - this.getSingleStep();\n }\n\n // handle the case where wrapping is enabled\n if (this.getWrap()) {\n if (newValue < this.getMinimum()) {\n var diff = this.getMinimum() + newValue;\n newValue = this.getMaximum() + diff + 1;\n }\n }\n\n this.gotoValue(newValue);\n }", "function up_down(x, y) { //black is 1----white is 2\r\n var currentChess = array[x][y];\r\n var sumOfChess = 1; // how many chess we have\r\n //upsite y--\r\n for (let i = y - 1; i >= 0; i--) {\r\n if (array[x][i] == currentChess) {\r\n sumOfChess = sumOfChess + 1;\r\n } else {\r\n break;\r\n }\r\n }\r\n //downsite y++\r\n for (let i = y + 1; i <= 14; i++) {\r\n if (array[x][i] == currentChess) {\r\n sumOfChess = sumOfChess + 1;\r\n } else {\r\n break;\r\n }\r\n }\r\n return sumOfChess;\r\n }", "levelUpDifficulty() {\n if (gameState.maxNumber < 900) {\n gameState.maxNumber += 5; // Increase the maximum number found in a cell.\n }\n if (gameState.expressNum < 100) {\n gameState.expressNum += 4; // Increase how much the expressions can deviate by.\n }\n }", "function numRollsToTarget (d, f, t) {\n let dp = [...Array(d + 1)].map(() => Array(t + 1).fill(0));\n dp[0][0] = 1;//each index corresponds to the number of ways you can get to that position\n for (let i=1; i <= d; i++)//number of dice\n for (let j=1; j <= t; j++)//amount\n for (let k=1; k <= f; k++)//number of sides\n if (j - k >= 0)//current amount has to be greater than or equal to the number on current side\n dp[i][j] = (dp[i][j] + dp[i - 1][j - k]) % (1e9 + 7);//how many ways witht he previous die could you reach this amount before adding the current die\n console.log(dp);\n return dp[d][t];\n}", "function countingValleys(n, s) {\n // Step 1: Convert string to an array of 1's and -1's\n\n // Step 2: Reduce array. If the current elevation is zero and the current value is -1, increment valleyCount\n\n const { valleyCount } = s\n .split(\"\")\n .map(val => (val === \"U\" ? 1 : -1))\n .reduce(\n (acc, val) => ({\n elevation: acc.elevation + val,\n valleyCount:\n !acc.elevation && val === -1 ? acc.valleyCount + 1 : acc.valleyCount\n }),\n { elevation: 0, valleyCount: 0 }\n );\n\n return valleyCount;\n}", "get edgeCount() {\n return this.next.length >> 1\n }", "size() {\n let output = 0;\n this.traverse((currentNode) => {\n output++;\n });\n return output;\n }", "get totalDescendents() {\n let vampTotal = 0;\n for (let vampChild of this.offspring) {\n vampTotal += vampChild.totalDescendents + 1;\n } \n return vampTotal;\n }", "function countingValleys(n, s) {\n let count = 0;\n let altitude = 0;\n for (var i=0; i<s.length; i++){\n switch(s.charAt(i)) {\n case \"D\": {\n if (altitude === 0) count++;\n altitude--;\n break;\n }\n case \"U\": {\n altitude++;\n break;\n }\n }\n }\n return count;\n}", "function growingPlant(upSpeed, downSpeed, desiredHeight) {\n let initHeight = 0;\n let days = 0;\n while (initHeight < desiredHeight) {\n console.log(initHeight);\n initHeight += upSpeed;\n\n if (initHeight < desiredHeight) {\n initHeight -= downSpeed;\n }\n\n days++;\n }\n return days;\n}", "numValidDirections(board) {\n let count = 0;\n\n if (this.isValidMove(board, DIRECTION.UP)) count++;\n if (this.isValidMove(board, DIRECTION.DOWN)) count++;\n if (this.isValidMove(board, DIRECTION.RIGHT)) count++;\n if (this.isValidMove(board, DIRECTION.LEFT)) count++;\n return count;\n }", "get numberOfVampiresFromOriginal() {\n let numberOfVampires = 0;\n let currentVampire = this;\n\n // climb \"up\" the tree (using iteration), counting nodes, until no creator is found\n while (currentVampire.creator) {\n currentVampire = currentVampire.creator;\n numberOfVampires++;\n }\n\n return numberOfVampires;\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 }", "numGreater(lowerBound) {\n let count = 0;\n if ([this.root][0] === null) return 0;\n const totalValues = [this.root];\n while (totalValues.length) {\n let current = totalValues.pop();\n if (current.val > lowerBound) {\n count = count + 1;\n }\n if (current.children) {\n for (let child of current.children) {\n totalValues.push(child);\n }\n }\n } return count;\n }", "function solution(A) {\n // write your code in JavaScript (Node.js 8.9.4)\n let west_cars = 0;\n let passing_cars = 0;\n \n for(let i=A.length-1; i>=0; i--){\n switch(A[i]){\n case 0:\n passing_cars += west_cars;\n break;\n case 1:\n west_cars++;\n break;\n }\n if(passing_cars > 1000000000){\n return -1;\n }\n }\n \n return passing_cars;\n}", "function totalOptions(x, y, z, w) {\n let result = 0;\n\n const start = Date.now();\n\n let xCount, yCount, zCount;\n for(xCount = 0; xCount <= w; xCount += x) {\n // console.log(\"for 1: xCount=\" + xCount);\n for(yCount = 0; yCount <= w - xCount; yCount += y) {\n // console.log(\"----for 2: yCount=\" + yCount);\n for(zCount = 0; zCount <= w - yCount - xCount; zCount += z) {\n // console.log(\"--------for 3: zCount=\" + zCount);\n if(xCount + yCount + zCount === w) {\n // console.log(\"xCount:\",xCount, \"+\",\"yCount:\",yCount,\"+\",\"zCount\",zCount);\n result++;\n } \n }\n }\n }\n\n console.log(\"time: \" + (Date.now() - start));\n\n return result;\n}", "inversionCount() {\n //make array of # of inversions per tile\n var invArray = this.tiles.map((num, i) => {\n var inversions = 0;\n for (let j = i + 1; j < this.tiles.length; j++) {\n if (this.tiles[j] != 0 && this.tiles[j] < num) {\n inversions++;\n }\n }\n return inversions;\n });\n\n //sum up all inversions and return total\n return invArray.reduce(function(a, b) {\n return a + b;\n });\n }", "function CalcFromStartToCurrent_gg(){ //2. Step 2 // LeavesActiveInScene = name & LeafAllWeights = weights\n\t\tfor (var a : int = 0; a < LeavesActiveInSceneInt.Length; a++ ){ \n\t\t\tWeighTheLeaves(LeavesActiveInSceneInt[a], FromStartToCurrentWeight_gg[a]);} \n\t}", "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 }", "function sol26(arr = [2, 3, 1, 1, 2, 4, 2, 0, 1, 1]) {\n // number at idx is the max number of jumps can take\n const dp = arr.slice().fill(Infinity);\n dp[0] = 0;\n\n for (let i = 1; i < arr.length; i++) {\n for (let j = 0; j < i; j++) {\n if (arr[j] + j >= i) {\n if (dp[j] + 1 < dp[i]) {\n dp[i] = dp[j] + 1;\n }\n }\n }\n }\n\n return dp[dp.length - 1];\n}", "function newphase() {\n\tfor (let u = 1; u <= g.n; u++) {\n\t\tlevel[u] = g.n; nextEdge[u] = g.firstAt(u); steps++;\n\t}\n\tlet q = new List(g.n);\n\tq.enq(g.source); level[g.source] = 0;\n\twhile (!q.empty()) {\n\t\tlet u = q.deq();\n\t\tfor (let e = g.firstAt(u); e != 0; e = g.nextAt(u, e)) {\n\t\t\tsteps++;\n\t\t\tlet v = g.mate(u, e);\n\t\t\tif (g.res(e, u) > 0 && level[v] == g.n) {\n\t\t\t\tlevel[v] = level[u] + 1;\n\t\t\t\tif (v == g.sink) return true;\n\t\t\t\tq.enq(v);\n\t\t\t}\n\t\t}\n\t}\n\treturn false;\n}", "get totalDescendents() {\n let counter = 0;\n for (let descendent of this.offspring) {\n counter += descendent.totalDescendents;\n counter++;\n }\n return counter;\n }", "get edgeCount() {\n return this.next.length;\n }", "function main() {\n var testCases = nextInt();\n var AC, AJ, DC, JK, full, DCSUm, JKSum, res, gaps, gapsDC, gapsJK;\n\n for (var testCase = 1; testCase <= testCases; ++testCase) {\n res = 0;\n AC = nextInt();\n AJ = nextInt();\n\n DC = [];\n for (var i = 0; i < AC; i++) {\n DC.push({\n start: nextInt(),\n end: nextInt(),\n parent: 0\n });\n }\n\n JK = [];\n for (var i = 0; i < AJ; i++) {\n JK.push({\n start: nextInt(),\n end: nextInt(),\n parent: 1\n });\n }\n\n full = DC.concat(JK).sort((a, b) => a.start - b.start);\n\n DCSUm = full.filter(interv => interv.parent === 0).reduce((a, b) => a + (b.end - b.start), 0);\n JKSum = full.filter(interv => interv.parent === 1).reduce((a, b) => a + (b.end - b.start), 0);\n\n gapsDC = [];\n gapsJK = [];\n for (let i = 0; i < full.length; i++) {\n if (i === full.length - 1) {\n if (full[i].parent !== full[0].parent) {\n res++;\n } else {\n let gap = 24 * 60 + (full[0].start - full[i].end);\n full[i].parent ? gapsJK.push(gap) : gapsDC.push(gap);\n }\n } else {\n if (full[i].parent !== full[i + 1].parent) {\n res++;\n } else {\n let gap = full[i + 1].start - full[i].end;\n full[i].parent ? gapsJK.push(gap) : gapsDC.push(gap);\n }\n }\n }\n\n\n gapsDC = gapsDC.sort((a, b) => a - b);\n gapsJK = gapsJK.sort((a, b) => a - b);\n // console.log(DCSUm, JKSum, gapsDC, gapsJK);\n\n while (DCSUm <= 12 * 60 && gapsDC.length > 0) {\n DCSUm += gapsDC.shift();\n }\n\n if (DCSUm > 12 * 60) {\n res += (gapsDC.length + 1) * 2;\n }\n\n // console.log(DCSUm, gapsDC);\n\n while (JKSum <= 12 * 60 && gapsJK.length > 0) {\n JKSum += gapsJK.shift();\n }\n\n if (JKSum > 12 * 60) {\n res += (gapsJK.length + 1) * 2;\n }\n\n // console.log(JKSum, gapsJK);\n\n\n // console.log(res);\n\n\n print(\"Case #\" + testCase + \": \" + (res < 2 ? 2 : res));\n }\n}", "function numberOfWaysToMakeChange(n, denoms) {\n\tif (n === 0) return 1;\n\tlet ways = new Array(n + 1).fill(0);\n\tways[0] = 1;\n for (let denom of denoms) {\n\t\tfor (let i = 1; i <= n; i++) {\n\t\t\tif (denom <= i) {\n\t\t\t\tways[i] += ways[i - denom];\n\t\t\t}\n\t\t}\n\t}\n\treturn ways[n];\n}", "function computeForwardSlotSegs(levels){var i;var level;var j;var seg;var k;for(i=0;i<levels.length;i++){level=levels[i];for(j=0;j<level.length;j++){seg=level[j];seg.forwardSegs=[];for(k=i+1;k<levels.length;k++){computeSlotSegCollisions(seg,levels[k],seg.forwardSegs);}}}}// Figure out which path forward (via seg.forwardSegs) results in the longest path until", "get constraintStepsX() {\n return +this.getAttribute('constraint-steps-x') || 0;\n }", "function levelCount(){\n var temp=\"\";\n if (configuration.levelDetails[level-1].rule==\"minimum\")\n temp=\"+\";\n return \"/\"+configuration.levelDetails[level-1].count+temp;\n}", "examine_possibles(count) {\n let updates = 0;\n //Loop through diagonally (hitting all rows/columns in n iterations)\n for (var i = 0; i < this.size; i++) {\n let node = this.nodes[i * (this.size + 1)];\n updates += this.calculate_frequencies(node, 0, count); //Row\n updates += this.calculate_frequencies(node, 1, count); //Col\n }\n\n let inc = Math.sqrt(this.size);\n\n //Loop through top left of all sub_squares\n for (var y = 0; y < this.size; y += inc) {\n for (var x = 0; x < this.size; x += inc) {\n updates += this.calculate_frequencies(this.nodes[x_y_to_index(x, y, this.size)], 2, count); //Sqr\n }\n }\n\n return updates;\n }", "function computeVStep() {\n\tvar xLabelWidth = 0;\n\tif (typeof obj.xData !== \"undefined\") {\t \t\t\n\t\tvar xfont = obj.xData.font;\t\t\n if (adjustableTextFontSize) {\n\t\t\txfont.size=getAdjustableLabelFontSize();\n\t\t}\n\t\tvar b = \" \";\n\t\tc.font = xfont.weight + b + xfont.size + \"px\" + b + xfont.family; \t\t\n\t}\n\tif (showLabels) {\n\t\tfor(var i=0; i<labels.length; i++) { \n\t\t var labelWidth = computeXLabelSpace(labels[i]);\n\t\t if (labelWidth > xLabelWidth) {\n\t\t xLabelWidth = labelWidth;\n\t\t } \n\t\t} \n\t}\n\tvar _xLegendSpace = 0;\n\tif (typeof obj.xLegend !== \"undefined\") {\t\t\t\t\n\t\tvar f = obj.xLegend.font;\n\t\tif (f === undefined) {\n\t\t\tf.weight = \"bold\";\n\t\t\tf.size = 12;\n\t\t\tf.family = \"sans-serif\";\n\t\t}\t\t \n if (adjustableTextFontSize) { \n\t\t\tf.size = getAdjustableLabelFontSize();\n\t\t}\n var legendPadding = 20;\t\t\n\t\tif (adjustableTextFontSize) {\n\t\t\tlegendPadding = getAdjustableLabelFontSize();\n\t\t}\n\t\t_xLegendSpace = +legendPadding + +f.size; \n\t}\t\t\t\n\tif ((step < xLabelWidth+_xLegendSpace) || adjustableTextFontSize) { \n\t step = xLabelWidth+_xLegendSpace;\t \t\t\n\t}\t\n\treturn xLabelWidth;\n}", "function countLineages(node, xVal, count) {\n if (node.parent === null && node.x === xVal) {\n // Root\n return node.desc.length;\n } else if (node.parent != null && node.x > xVal && node.parent.x <= xVal) {\n count++;\n }\n if (node.desc != null) {\n for (let i = 0; i < node.desc.length; i++) {\n count = countLineages(node.desc[i], xVal, count);\n }\n }\n return count;\n}", "function jumpingOnClouds(c) {\n let jumpCount = 0;\n let takeJump = 0;\n c.forEach((ele, i, arr) => {\n if (arr[i + 1] < 1) {\n if (arr[i] > 0) {\n jumpCount++;\n } else {\n takeJump++;\n }\n } else {\n takeJump = 0;\n }\n if (takeJump === 2) {\n takeJump = 0;\n }\n jumpCount += takeJump;\n })\n return jumpCount;\n}", "calcNewState() {\n let n=0;\n for (let i=0; i<N; i++) {\n for (let j=0; j<N; j++) {\n // If there's only one option, put it\n if (this.state[i][j] == X && this.options[i][j].length == 1) \n {\n this.state[i][j] = this.options[i][j][0];\n document.write(\"CNS: (\" + (i+1) + \",\" + (j+1) + \") : \" + this.state[i][j] + \"<br/>\")\n n++;\n }\n }\n }\n return n;\n }", "constraintsWithWorstSatisfactionDegree() {\n\t\tconst cs = [];\n\t\tlet cur = 1;\n\t\tfor (const c of this._cons) {\n\t\t\tconst s = c.satisfactionDegree();\n\t\t\tif (s < cur) {\n\t\t\t\tcur = s;\n\t\t\t\tcs.length = 0;\n\t\t\t\tcs.push(c);\n\t\t\t} else if (s - cur < Number.MIN_VALUE * 10) {\n\t\t\t\tcs.push(c);\n\t\t\t}\n\t\t}\n\t\treturn [cs, cur];\n\t}", "worstSatisfactionDegree() {\n\t\tlet cs = 1;\n\t\tfor (const c of this._cons) {\n\t\t\tconst s = c.satisfactionDegree();\n\t\t\tif (s === Constraint.UNDEFINED) return Constraint.UNDEFINED;\n\t\t\tif (s < cs) cs = s;\n\t\t}\n\t\treturn cs;\n\t}", "function solution(A) {\n let jumps = []\n let i = 0\n while (i<=A.length){\n i= i+A[i]\n jumps.push(A[i])\n if (jumps.length >= A.length) {\n return -1}\n } \n return jumps.length \n }", "function numWays(steps){\n var stairs = new Array(steps+1);\n stairs[0] = 1;\n stairs[1] = 1;\n for(var i=2;i<stairs.length;i++){\n stairs[i] = stairs[i-1]+stairs[i-2];\n }\n return stairs[steps]\n}", "function solution(X, Y, D) {\n let jumps = 0;\n let curNum = X;\n while (curNum < Y) {\n curNum += D;\n jumps++;\n }\n return jumps;\n}", "get size() {\n // Return the triple count if if was cached\n var size = this._size;\n if (size !== null)\n return size;\n\n // Calculate the number of triples by counting to the deepest level\n size = 0;\n var graphs = this._graphs, subjects, subject;\n for (var graphKey in graphs)\n for (var subjectKey in (subjects = graphs[graphKey].subjects))\n for (var predicateKey in (subject = subjects[subjectKey]))\n size += Object.keys(subject[predicateKey]).length;\n return this._size = size;\n }", "calcNUV() {\n this.N = this.viewingPoint.subtract(this.position).unit();\n this.U = this.N.crossProduct(this.UP).unit();\n this.V = this.U.crossProduct(this.N);\n }", "get dof() {\n let dof = 0;\n for (const node of this.nodes)\n dof += node.dof;\n for (const constraint of this.constraints)\n dof -= (2 - constraint.dof);\n return dof;\n }", "function computeNodeValues(nodes) {\n\t each(nodes, function (node) {\n\t var value1 = sum(node.outEdges, getEdgeValue);\n\t var value2 = sum(node.inEdges, getEdgeValue);\n\t var nodeRawValue = node.getValue() || 0;\n\t var value = Math.max(value1, value2, nodeRawValue);\n\t node.setLayout({\n\t value: value\n\t }, true);\n\t });\n\t }", "computeMaxDepth() {\n let d = 0;\n for (const child of this.components) {\n d = Math.max(d + 1, child.children.computeMaxDepth());\n }\n return d;\n }", "function initCounts() {\n var cids = cgraph.constraints();\n for (var i = 0, l = cids.length; i < l; ++i) {\n var cid = cids[i];\n if (g.isStayConstraint(cid)) {\n continue;\n }\n if (selected[cid]) {\n // Mark output variables so they are never considered free\n var vids = cgraph.outputsForMethod(selected[cid]);\n for (var j = 0, m = vids.length; j < m; ++j) {\n vidCounts[vids[j]] = -1;\n }\n }\n else {\n cidsLeft[cid] = true;\n ++numCidsLeft;\n var vids = cgraph.outputsForConstraint(cid);\n for (var j = 0, m = vids.length; j < m; ++j) {\n var vid = vids[j];\n var count = vidCounts[vid];\n if (count != -1) {\n vidCounts[vid] = count ? count + 1 : 1;\n }\n }\n }\n }\n freeVarQueue = cgraph.variables().filter(isFreeVar);\n }", "function main() {\n //let [n, k] = readLine().split(' ').map(Number), c = readLine().split(' ').map(Number);\n\n let n = 8, k = 2, c = [0, 0, 1, 0, 0, 1, 1, 0]; // 4\n\n let E = 100, i;\n for (i = 0; i < n; i += k) {\n if(c[i]) {\n E -= 3;\n } else {\n E -= 1;\n }\n }\n console.log(E);\n}", "function staircaseTraversal(height, maxSteps) {\n\treturn stairsHelper(height, maxSteps, {0:1, 1:1}); \n // Write your code here.\n\tfunction stairsHelper(height, maxSteps, memoize) {\n\t\tif(height in memoize) return memoize[height];\n\t\t\n\t\tlet ways = 0;\n\t\tfor(let step = 1; step < Math.min(maxSteps, height) + 1; step++) {\n\t\t\tways += stairsHelper(height - step, maxSteps, memoize); \n\t\t}\n\t\tmemoize[height] = ways;\n\t\t\n\t\treturn ways; \n\t}\n}", "countEvens() {\n return (this.root ? this.root.evensCounter() : 0);\n }", "function changeStepSizePEST(){\n\t\t\n\t\t//Variable to store if this step is a reversal of the previous step\n\t\tvar reversal;\n\t\t\n\t\t//For the first step, just set the reversal to false\n\t\tif (firstStep){\n\t\t\treversal = false;\n\t\t\t//Change firstStep to be false because subsequent steps will have a previousStepDirection to compare it to\n\t\t\tfirstStep = false;\n\t\t}\n\t\t//Else, set the reversal to whether the previous step direction corresponsds to the current step direction\n\t\telse{\n\t\t\treversal = (previousStepDirection == currentStepDirection) ? false : true;\n\t\t}\n\t\t\n\t\tconsole.log(\"Reversal: \" + reversal);\n\t\t\n\t\t//If current step is a reversal of the previous step\n\t\tif(reversal){\n\t\t\t\n\t\t\t//Reset the streak counter to include this step (therefore it is 1 instead of zero)\n\t\t\tstepStreakCounter = 1;\n\t\t\t\n\t\t\t//If the reversal did not follow a double in step size, then the threshold should be 3\n\t\t\tif (!stepSizeJustDoubled){\n\t\t\t\tcurrentStepThreshold = 3;\n\t\t\t}\n\t\t\t//If the step size just doubled in the previous step, increase the step threshold to 4 [Rule 4]\n\t\t\telse{\n\t\t\t\tcurrentStepThreshold = 4;\n\t\t\t}\n\t\t\t\n\t\t\t//Half the step size everytime it reverses [Rule 1]\n\t\t\thalveStepSize();\n\t\t\t\n\t\t\t//Step size did not double, so we reset it back to false (this variable is used below in the else statement)\n\t\t\tstepSizeJustDoubled = false;\n\t\t}\n\t\t//If step was not a reversal (went in the same direction) AND it is not at the limit\n\t\telse if(!limitHit){\n\t\t\t\n\t\t\t//Increment the streak counter\n\t\t\tstepStreakCounter++;\n\t\t\t\n\t\t\t//If the streak has hit the streak threshold, then increase the step size by doubling it [Rule 3]\n\t\t\tif (stepStreakCounter >= currentStepThreshold){\n\t\t\t\tdoubleStepSize();\n\t\t\t\tstepSizeJustDoubled = true;\n\t\t\t\tconsole.log(\"Step size doubled.\");\n\t\t\t}\n\t\t\t//Else step size did not double\n\t\t\telse{\n\t\t\t\tstepSizeJustDoubled = false;\n\t\t\t\tconsole.log(\"Step size remained the same because not hit threshold yet.\");\n\t\t\t}\n\t\t\t\n\t\t\t//If we go in the same direction, we stay with the same step size [Rule 2]\n\t\t\t//Unless we go 3 steps in the same direction, in which case we implement Rule 3 above\n\t\t\t\n\t\t}//End of else (not reversal)\n\t\t\n\t}//End of changeStepSizePEST", "get newLength() {\n let result = 0;\n for (let i = 0; i < this.sections.length; i += 2) {\n let ins = this.sections[i + 1];\n result += ins < 0 ? this.sections[i] : ins;\n }\n return result;\n }", "size() {\n\t\tvar runner = this.head;\n\t\tvar counter = 0;\n\n\t\twhile (runner != null) {\n\t\t\tcounter += 1;\n\t\t\trunner = runner.next;\n\t\t}\n\t\treturn counter;\n\t}", "size() {\n\t\tvar runner = this.head;\n\t\tvar counter = 0;\n\n\t\twhile (runner != null) {\n\t\t\tcounter += 1;\n\t\t\trunner = runner.next;\n\t\t}\n\t\treturn counter;\n\t}", "function countingValleys(n, s) {\n s = s.split('');\n let level = 0, countValey = 0;\n for (let el of s) {\n el === 'U' ? level++ : level--;\n el === 'U' && level === 0 ? countValey++ : ''\n }\n return countValey;\n}", "getNumOfConnectedComponents() {\n let numOfConnectedComponents = 0;\n\n const notVisited = new Set(this.nodes);\n while (notVisited.size) {\n const notVisitedArr = Array.from(notVisited);\n const source = notVisitedArr[0];\n const toVisitStack = [source];\n notVisited.delete(source);\n while (toVisitStack.length) {\n const currNode = toVisitStack.pop();\n for (let neighbor of currNode.adjacent) {\n if (notVisited.has(neighbor)) {\n toVisitStack.push(neighbor);\n notVisited.delete(neighbor);\n }\n }\n }\n numOfConnectedComponents++;\n }\n return numOfConnectedComponents;\n }", "function tour() {\n let target = pointMaker(Number(document.getElementById('x').value), Number(document.getElementById('y').value));\n let count = 0;\n let tmp = target;\n let i = 1;\n console.log(JSON.stringify(tmp));\n do {\n if (tmp.x >= 2 && tmp.y >= 1 && tmp.x > tmp.y) { // BOTH POS\n tmp.x -= 2;\n tmp.y -= 1;\n count++;\n console.log(\"1st \" + count);\n console.log(\"Values :\" + tmp.x + \",\" + tmp.y);\n } else if (tmp.x >= 1 && tmp.y >= 2 && tmp.x < tmp.y) { // BOTH POS\n tmp.x -= 1;\n tmp.y -= 2;\n count++;\n console.log(\"2nd \" + count);\n console.log(\"Values :\" + tmp.x + \",\" + tmp.y);\n } else if (tmp.x <= -1 && tmp.y <= -2 && tmp.x > tmp.y) { // BOTH NEG\n tmp.x += 1;\n tmp.y += 2;\n count++;\n console.log(\"3rd \" + count);\n console.log(\"Values :\" + tmp.x + \",\" + tmp.y);\n } else if (tmp.x <= -2 && tmp.y <= -1 && tmp.x < tmp.y) { // BOTH NEG\n tmp.x += 2;\n tmp.y += 1;\n count++;\n console.log(\"4th \" + count);\n console.log(\"Values :\" + tmp.x + \",\" + tmp.y);\n } else if (tmp.x <= -1 && tmp.y >= 2 && tmp.x < tmp.y) { //X is NEG\n tmp.x += 1;\n tmp.y -= 2;\n count++;\n console.log(\"5th \" + count);\n console.log(\"Values :\" + tmp.x + \",\" + tmp.y);\n } else if (tmp.x <= -2 && tmp.y >= 1 && tmp.x < tmp.y) { //X is NEG\n tmp.x += 2;\n tmp.y -= 1;\n count++;\n console.log(\"6th \" + count);\n console.log(\"Values :\" + tmp.x + \",\" + tmp.y);\n } else if (tmp.x >= 1 && tmp.y <= -2 && tmp.x > tmp.y) { //Y is NEG\n tmp.x -= 1;\n tmp.y += 2;\n count++;\n console.log(\"7th \" + count);\n console.log(\"Values :\" + tmp.x + \",\" + tmp.y);\n } else if (tmp.x >= 2 && tmp.y <= -1 && tmp.x > tmp.y) { //Y is NEG\n tmp.x -= 2;\n tmp.y += 1;\n count++;\n console.log(\"8th \" + count);\n console.log(\"Values :\" + tmp.x + \",\" + tmp.y);\n } else if (tmp.x === 0 && tmp.y >= 2) {\n tmp.x += 1;\n tmp.y -= 2;\n count++;\n console.log(\"9th \" + count);\n console.log(\"Values :\" + tmp.x + \",\" + tmp.y);\n } else if (tmp.x === 0 && tmp.y >= 1) {\n tmp.x += 2;\n tmp.y -= 1;\n count++;\n console.log(\"10th \" + count);\n console.log(\"Values :\" + tmp.x + \",\" + tmp.y);\n } else if (tmp.x === 0 && tmp.y <= -2) {\n tmp.x -= 1;\n tmp.y += 2;\n count++;\n console.log(\"11th \" + count);\n console.log(\"Values :\" + tmp.x + \",\" + tmp.y);\n } else if (tmp.x === 0 && tmp.y <= -1) {\n tmp.x -= 2;\n tmp.y += 1;\n count++;\n console.log(\"12th \" + count);\n console.log(\"Values :\" + tmp.x + \",\" + tmp.y);\n } else if (tmp.x >= 2 && tmp.y === 0) {\n tmp.x -= 2;\n tmp.y += 1;\n count++;\n console.log(\"13th \" + count);\n console.log(\"Values :\" + tmp.x + \",\" + tmp.y);\n } else if (tmp.x >= 1 && tmp.y === 0) {\n tmp.x -= 1;\n tmp.y += 2;\n count++;\n console.log(\"14th \" + count);\n console.log(\"Values :\" + tmp.x + \",\" + tmp.y);\n } else if (tmp.x <= -2 && tmp.y === 0) {\n tmp.x += 2;\n tmp.y -= 1;\n count++;\n console.log(\"15th \" + count);\n console.log(\"Values :\" + tmp.x + \",\" + tmp.y);\n } else if (tmp.x <= -1 && tmp.y === 0) {\n tmp.x -= 1;\n tmp.y -= 2;\n count++;\n console.log(\"16th \" + count);\n console.log(\"Values :\" + tmp.x + \",\" + tmp.y);\n } else if ((tmp.x === tmp.y) && (tmp.x !== 0) && (tmp.y !== 0)) {\n tmp.x -= 2;\n tmp.y -= 1;\n count++;\n console.log(\"end \" + count);\n } else if (tmp.x === 0 && tmp.y === 0) {\n i = 0;\n }\n } while (i === 1);//(tmp.x !== 0) && (tmp.y !== 0));//\n alert(\"Solution: \" + count);\n console.log(\"Solution: \" + count);\n}", "function quickestWayUp(ladders, snakes) {\n const START_POSITION = 1, END_POSITION = 100, MAX_STEPS = 6;\n let ladderMap = new Map(), snakeMap = new Map();\n for (let i = 0; i < ladders.length; i++)\n ladderMap.set(ladders[i][0], ladders[i][1]);\n for (let i = 0; i < snakes.length; i++)\n snakeMap.set(snakes[i][0], snakes[i][1]);\n\n function findNextChoices(prev, ladderMap, snakeMap) {\n let choices = [], prevPosition = prev.position;\n if (prevPosition >= END_POSITION || prevPosition < START_POSITION)\n throw Error(`Shouldn't happen when plan the game step by step, prevPosition: ${prevPosition}`);\n\n let normalCaseProcessed = false, snakeCases = 0;\n for (let nextPosition = Math.min(END_POSITION, prevPosition + MAX_STEPS); nextPosition > prevPosition; nextPosition--) {\n if (ladderMap.has(nextPosition)) {\n choices.push({ position: ladderMap.get(nextPosition), steps: prev.steps + 1 });\n }\n else if (snakeMap.has(nextPosition)) {\n choices.push({ position: snakeMap.get(nextPosition), steps: prev.steps + 1 });\n snakeCases++;\n }\n else if (normalCaseProcessed === false) {\n // only add [normal next position] once, which means no snake and no ladder\n choices.push({ position: nextPosition, steps: prev.steps + 1 });\n normalCaseProcessed = true;\n }\n\n }\n\n if (snakeCases >= MAX_STEPS)\n return; // therefore -1 will be returned;\n else\n return choices;\n }\n\n // use BFS way to push all choices when try to find the next position\n let queue = [{ position: START_POSITION, steps: 0 }];\n while (queue.length > 0) {\n let prev = queue.shift();\n let choices = findNextChoices(prev, ladderMap, snakeMap);\n if (choices === undefined || choices.length === 0)\n return -1;\n else {\n for (let i = 0; i < choices.length; i++) {\n let nextChoice = choices[i];\n if (nextChoice.position === END_POSITION)\n return prev.steps + 1;\n queue.push(nextChoice);\n }\n }\n }\n\n return -1;\n}", "function computeNodeValues() {\n nodes.forEach(function (node) {\n //console.log(\"check\");\n node.value = node.w;\n // node.value = Math.max(\n // d3.sum(node.sourceLinks, value),\n // d3.sum(node.targetLinks, value)\n // );\n });\n }", "function startCount(obj) {\n valueIncrease();\n valueDecrease();\n \n}", "get verifierCount () {\n return ['constraints', 'ioexamples', 'properties']\n .reduce((fullsum, key) => {\n const base = fullsum + Object.keys(this[key]).length;\n if (key !== 'properties') return base;\n return values(this.properties)\n .reduce((sum, child) => sum + child.verifierCount, base);\n }, 0);\n }" ]
[ "0.6984388", "0.691723", "0.66361725", "0.6502837", "0.64528304", "0.63422596", "0.6294426", "0.6286671", "0.5958027", "0.58783156", "0.58524394", "0.5809789", "0.57957804", "0.57602507", "0.5732075", "0.5691815", "0.5675534", "0.5654533", "0.5646687", "0.5598278", "0.5582963", "0.5561502", "0.55593246", "0.55437964", "0.5534641", "0.55177313", "0.5505474", "0.5480225", "0.5442614", "0.54037863", "0.53995293", "0.539541", "0.5390688", "0.53817403", "0.53498024", "0.53412896", "0.5340281", "0.5332122", "0.53294957", "0.5325384", "0.53207505", "0.53187054", "0.52880967", "0.5281098", "0.52770203", "0.5270262", "0.5269453", "0.5265464", "0.52493453", "0.52483004", "0.5247986", "0.5232954", "0.52285624", "0.52016324", "0.5201276", "0.51830816", "0.5180124", "0.51764804", "0.5168752", "0.51650566", "0.5156315", "0.5154132", "0.51501137", "0.514955", "0.5139675", "0.51387423", "0.51352596", "0.5129692", "0.51287293", "0.5120261", "0.51141876", "0.51141775", "0.51137954", "0.5113333", "0.5112436", "0.5111703", "0.5101924", "0.5101631", "0.50991327", "0.50902224", "0.5087192", "0.50841475", "0.5078188", "0.5075415", "0.5073593", "0.5065854", "0.5063409", "0.50610596", "0.5059557", "0.5056299", "0.5053605", "0.5050723", "0.5050723", "0.5039174", "0.5037286", "0.503386", "0.50337267", "0.5023489", "0.50173485", "0.5017089" ]
0.6450738
5
computations : calculations on store
get isValidLogin() { return !!this.userName && !!this.password }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calculate(){}", "function maintCalc(dataStore) {}", "function maintCalc(dataStore){\n\n}", "compute() {\n let result;\n let lastnum = parseFloat(this.lastOperand);\n let currnum = parseFloat(this.currOperand);\n if (isNaN(lastnum) || isNaN(currnum)) {\n return;\n }\n switch (this.operator) {\n case \"+\":\n result = lastnum + currnum;\n break;\n case \"-\":\n result = lastnum - currnum;\n break;\n case \"*\":\n result = lastnum * currnum;\n break;\n case \"/\":\n result = lastnum / currnum;\n break;\n default:\n return;\n }\n this.currOperand = result;\n this.lastOperand = \"\";\n this.operator = undefined;\n }", "compute(){\n let computation\n //converting strings to number for computation\n const prev = parseFloat(this.previousOperand)\n const current = parseFloat(this.currentOperand)\n //to check if numbers were actually inputed before any computation\n if (isNaN(prev) || isNaN(current)) return\n switch (this.operation) {\n case '+' :\n computation = prev + current\n break\n case '-' :\n computation = prev - current\n break\n case '×' :\n computation = prev * current\n break\n case '÷' :\n computation = prev / current\n break\n default:\n return\n }\n this.toReset = true,\n this.currentOperand = computation\n this.operation = undefined\n this.previousOperand = ''\n }", "function calculate() {\n\n calculator.calculate();\n\n }", "do_calculation( bunch_of_numerical_data)\n {\n var total = 0 ;\n bunch_of_numerical_data.forEach(element => {\n total += element\n });\n return total ;\n }", "function priceTotal(product) {\n let prixTotalCalcul = []\n console.log(product)\n // Definition du code HTML \n const displayPrice = document.querySelector(\"#priceTotal\")\n if(productSaveLocalStorage !== null) {\n // On va chercher les prix dans le panier\n for (l = 0; l < productSaveLocalStorage.length; l++) {\n // A changer et selectionner l'endroit ou prendre les valeurs\n let prixProductInCart = product[l].price * productSaveLocalStorage[l].quantite\n console.log(prixProductInCart)\n // Mettre les prix du panier dans la variable prixTotal\n prixTotalCalcul.push(prixProductInCart)\n }\n }\n\n\n // Addition des prix dans le tableau à la variable prix total\n const reducer = (accumulator, currentValue) => accumulator + currentValue\n const prixTotal = prixTotalCalcul.reduce(reducer, 0)\n\n // Code HTML du prix total à afficher\n const affichagePrixHtml = `\n <span class=\"affichage-prix-html\"> ${price(prixTotal)}</span>\n `\n const displayPrixTotal = displayPrice.insertAdjacentHTML(\"afterBegin\", affichagePrixHtml)\n store(\"totalPrice\", prixTotal)\n\n}", "calculatePrice() {\n \t\tfor (let key in this.elementsCounted) {\n \t\t\tconst count = this.elementsCounted[key];\n \t\t\tconst elementConfig = this.config[key];\n \t\t\tvar price = 0;\n \t\t\tif (elementConfig === undefined) {\n \t\t\t\tthrow new Error('Element : ' + key + ', non existent in the store.');\n \t\t\t} else if (elementConfig.solded === undefined) {\n \t\t\t\tprice = count * elementConfig.unitPrice;\n \t\t\t} else {\n \t\t\t\tlet countSoldedLots = Math.floor(count / elementConfig.solded.FOR);\n \t\t\t\tlet priceSoldedLot = elementConfig.unitPrice * elementConfig.solded.AS;\n \t\t\t\tlet leftItems = count % elementConfig.solded.FOR;\n \t\t\t\tprice = countSoldedLots * priceSoldedLot + leftItems * elementConfig.unitPrice;\n \t\t\t}\n \t\t\tthis.ticket[key] = price\n \t\t}\n }", "compute() {\r\n let computation\r\n //parseFloat converts a string argument and converts it to a float\r\n const prev = parseFloat(this.previousOperand)\r\n const current = parseFloat(this.currentOperand)\r\n //NaN means Not a Number\r\n if (isNaN(prev) || isNaN(current)) return\r\n //here, you are matching up the values and operations buttons\r\n switch (this.operation) {\r\n case '+':\r\n computation = prev + current\r\n break\r\n case '-':\r\n computation = prev - current\r\n break\r\n case 'x':\r\n computation = prev * current\r\n break\r\n case '/':\r\n computation = prev / current\r\n break\r\n \r\n default:\r\n return\r\n }\r\n //actual computation taking place\r\n this.currentOperand = computation\r\n this.operation = undefined\r\n this.previousOperand = ''\r\n }", "function totalcalc() {\n let total = 1299 + rmemory + ssd + deli;\n return total;;\n}", "function calculate() {\r\n\teval();\r\n\tstopAll();\r\n}", "calculate() {\n\treturn this.exercise.calculate(this.weight, this.distance, this.time);\n }", "compute(){\r\n let computation;\r\n const prev = parseFloat(this.previousOperand);\r\n const current = parseFloat(this.currentOperand);\r\n \r\n // if user clicks equals only\r\n // return cancels the function completely further\r\n if (isNaN(prev) || isNaN(current)) return;\r\n \r\n switch(this.operation){\r\n case'+':\r\n computation = prev + current;\r\n break;\r\n case '-':\r\n computation = prev - current;\r\n break;\r\n case '*':\r\n computation = prev * current;\r\n break;\r\n case '÷':\r\n computation = prev / current; \r\n break;\r\n default:\r\n return;\r\n }\r\n this.readyToReset = true;\r\n this.currentOperand = computation\r\n this.operation = undefined\r\n this.previousOperand = ''\r\n }", "function calculateAll() {\n\t\tcalculatePrice();\n\t\tcompileSpecs();\n\t\tcalculateUSD();\n\t}", "function doComputation(){\n let computation;\n const prev = parseFloat(previousOperand);\n const current = parseFloat(currentOperand);\n\n if(isNaN(prev) || isNaN(current)) return;\n switch(operation){\n case '+':\n computation=prev + current;\n break;\n case '-':\n computation=prev - current;\n break;\n case 'x':\n computation=prev * current;\n break;\n case '/':\n computation= prev / current;\n break;\n default :\n return;\n }\n\n currentOperand=computation;\n operation=undefined;\n previousOperand=''; \n}", "function $compute() {\n var sold = 0.0,\n montant = 0.0;\n sold = parseFloat($('#bank_extract_begin_sold').val(), 10) + parseFloat($('#bank_extract_total_credit').val(), 10)\n - parseFloat($('#bank_extract_total_debit').val());\n $('.public_bank_extracts #bank_extract_end_sold').val(sold.toFixed(2));\n // mise à deux décimales du montant saisi\n montant = parseFloat($('#bank_extract_total_credit').val(), 10);\n $('.public_bank_extracts #bank_extract_total_credit').val(montant.toFixed(2));\n montant = parseFloat($('#bank_extract_total_debit').val(), 10);\n $('.public_bank_extracts #bank_extract_total_debit').val(montant.toFixed(2));\n montant = parseFloat($('#bank_extract_begin_sold').val(), 10);\n $('.public_bank_extracts #bank_extract_begin_sold').val(montant.toFixed(2));\n}", "function calculate() {\n\t\tvar servings = 0;\n\t\tvar standardDrinks = 0;\n\t\tvar calories = 0;\n\n\t\t$('.calculator-carousel .single-drink').each(function(){\n\t\t\tvar currentDrinkType = $(this).data('drinktypes').split(',')[$(this).data('currenttype')].split('|');\n\t\t\tservings += $(this).data('quantity');\n\t\t\tstandardDrinks += $(this).data('quantity') * (currentDrinkType[2] / 1000) * drinkDefinitions[currentDrinkType[1]]['abv'] * 0.789;\n\t\t\tcalories += $(this).data('quantity') * (currentDrinkType[2] / 100) * drinkDefinitions[currentDrinkType[1]]['calories'];\n\t\t\t//Only render if the values change\n\t\t\tvar renderId = String(servings) + \",\" + String(standardDrinks) + \",\" + String(calories);\n\t\t\tif (renderId != calculationId) {\t\t\t\n\t\t\t\t\n\t\t\t\trenderResults(servings, standardDrinks, calories);\n\t\t\t}\n\t\t\tcalculationId = renderId;\n\t\t});\n\t}", "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 calculate() {\n if (operator == 1) { currentInput = eval(memory) * eval(currentInput); };\n if (operator == 2) { currentInput = eval(memory) / eval(currentInput); };\n if (operator == 3) { currentInput = eval(memory) + eval(currentInput); };\n if (operator == 4) { currentInput = eval(memory) - eval(currentInput); };\n\n operator = 0; //clear operator\n memory = \"0\"; //clear memory\n displayCurrentInput();\n}", "static Sum(a,b) {\n //create new object, good for data + actions\n let calculation = new Calculation(a,b,Sum);\n Calculator.Calculations.push(calculation);\n return calculation.GetResults();\n }", "calc() {\n if (this.operation.length < 2) return;\n let result;\n\n //calculation if the operation is less than 2 operators\n if (this.operation.length == 2) {\n //calculation if the last operator is raised to power\n if (this.getLastPosition() == 'x²') {\n this.raisedPower(this.getLastPosition(false));\n return;\n }\n //calculation if the last operator is square root\n if (this.getLastPosition() == '√') {\n this.squareRoot(this.getLastPosition(false));\n return;\n }\n\n let firstNumber = this.operation[0];\n if (!this.lastOperator) this.lastOperator = this.getLastPosition();\n if (!this.lastNumber) this.pushOperator(firstNumber);\n if (this.lastNumber) this.pushOperator(this.lastNumber);;\n }\n\n //calculation if the operation is 3 or more operators\n if (this.operation.length > 3) {\n this.lastOperator = this.destroyLastOperator();\n } else if (this.operation.length == 3) {\n this.lastNumber = this.getLastPosition(false);\n this.lastOperator = this.getLastPosition();\n }\n\n //execute the of operation\n result = this.getResult();\n //validates of the last operator\n if (this.lastOperator == '%') {\n result /= 100;\n this.operation = [result];\n } else if (this.lastOperator == 'x²') {\n result *= result;\n this.operation = [result];\n } else {\n this._operation = [result, this.lastOperator];\n }\n\n this.updateDisplay(); \n }", "function calculate()\n {\n if (operator == 1)\n {\n current_input = eval(memory) * eval(current_input);\n };\n if (operator == 2)\n {\n current_input = eval(memory) / eval(current_input);\n // If divide by 0 give an ERROR message\n var initial_value = current_input.toString();\n if (initial_value == \"Infinity\")\n {\n current_input = \"ERROR\"\n };\n };\n if (operator == 3)\n {\n current_input = eval(memory) + eval(current_input);\n };\n if (operator == 4)\n {\n current_input = eval(memory) - eval(current_input);\n };\n if (operator == 5)\n {\n current_input = Math.pow(eval(memory), eval(current_input));\n };\n operator = 0; //clear operator\n memory = \"0\"; //clear memory\n displayCurrentInput();\n }", "calcVars () {}", "function priceCalculation() {\n\n const bestPrice = getValue('primary-price');\n const extraMemory = getValue('extra-memory');\n const extraStorage = getValue('extra-storage');\n const fastDelivery = getValue('extra-delivery');\n const priceTotal = bestPrice + extraStorage + fastDelivery + extraMemory;\n return priceTotal;\n}", "function calculate() {\n\tgetTempBonuses();\n\tgetNumberBoonsValues();\n\tgetRelicBonuses();\n\tgetFatebondBonuses();\n\tgetCoreTraitsValues();\n\tgetAttributesValues();\n\tgetSkillsValues();\n\tgetVirtuesValues();\n\tgetBoonsDiceValues();\n\tgetPresetRolls();\n\tgetAttackBonuses();\n}", "compute(operation) {\n const modes = this.getMode()\n const mode_1 = this.getDigitFromRight(modes, 1)\n const mode_2 = this.getDigitFromRight(modes, 2)\n const mode_3 = this.getDigitFromRight(modes, 3)\n const param_1 = this.program[this.PC+1]\n const param_2 = this.program[this.PC+2]\n const param_3 = this.program[this.PC+3]\n\n const value_1 = this.getValue(mode_1, param_1)\n const value_2 = this.getValue(mode_2, param_2)\n const ans_index = this.getIndex(param_3, mode_3)\n switch (operation) {\n case 1:\n this.program[ans_index] = value_1 + value_2\n break;\n case 2:\n this.program[ans_index] = value_1 * value_2\n break;\n case 7:\n this.program[ans_index] = (value_1 < value_2) ? 1 : 0\n break;\n case 8:\n this.program[ans_index] = (value_1 === value_2) ? 1 : 0\n break;\n default:\n return;\n }\n this.PC += 4\n }", "function calculate() {\n // prevents hitting calculate as first entry\n if (previous) {\n let result;\n current = parseFloat(current);\n previous = parseFloat(previous);\n switch (operant) {\n case 'divide':\n result = previous / current;\n break;\n case 'times':\n result = previous * current;\n break;\n case 'minus':\n result = previous - current;\n break;\n case 'plus':\n result = previous + current;\n default:\n break;\n }\n current = current.toString();\n previous = result.toString();\n viewer.textContent = result;\n rePrint = true;\n if (!equalPressed) {\n equalPressed = true;\n }\n return;\n }\n}", "function calculateCurrentPrice() {\n console.log(\"RECALCULATING PRICE\");\n console.log(store.store);\n let currPrice = 0;\n if (store.get(\"type\") === \"hoodie\") {\n currPrice += parseFloat(store.get(\"settings\")[0][1]);\n } else if (store.get(\"type\") && store.get(\"type\") === \"crewneck\") {\n currPrice += parseFloat(store.get(\"settings\")[1][1]);\n }\n if (store.get(\"color\") === \"green\") {\n currPrice += parseFloat(store.get(\"settings\")[2][1]);\n } else if (store.get(\"color\") && store.get(\"color\") === \"gray\") {\n currPrice += parseFloat(store.get(\"settings\")[3][1]);\n }\n if (document.getElementById(\"front_select\").selectedIndex === 2) {\n currPrice += parseFloat(store.get(\"settings\")[4][1]);\n }\n if (document.getElementById(\"left_arm_select\").selectedIndex === 2) {\n currPrice += parseFloat(store.get(\"settings\")[5][1]);\n }\n if (document.getElementById(\"right_arm_select\").selectedIndex === 2) {\n currPrice += parseFloat(store.get(\"settings\")[6][1]);\n }\n if (document.getElementById(\"back_select\").selectedIndex === 2) {\n currPrice += parseFloat(store.get(\"settings\")[7][1]);\n }\n if (document.getElementById(\"hood_select\").selectedIndex === 2) {\n currPrice += parseFloat(store.get(\"settings\")[8][1]);\n }\n store.set(\"total_price\", \"$\" + currPrice);\n document.getElementById(\"price_display\").innerHTML =\n \"Total: \" + numToPrice(currPrice);\n}", "calculate(modify) {\n return this.total = [].slice.call(arguments, 1)\n .reduce((total, y) => modify(total, y), this.total);\n }", "function calculation () {\n omega = 2*Math.PI*ny; // Kreisfrequenz (1/s)\n if (dPhi == 0) i0 = u0/r; // Maximale Stromstärke (A, für Widerstand)\n else if (dPhi > 0) i0 = u0*omega*c; // Maximale Stromstärke (A, für Kondensator)\n else i0 = u0/(omega*l); // Maximale Stromstärke (A, für Spule)\n }", "total (itens) {\n prod1 = list[0].amount\n prod2 = list[1].amount\n prod3 = list[2].amount\n prod4 = list[3].amount\n\n itens = prod1 + prod2 + prod3 + prod4\n\n return itens\n }", "function Calculate() {\r\n if(lastOperation === '/') {\r\n result = parseFloat(result) / parseFloat(current);\r\n }else if(lastOperation === 'x') {\r\n result = parseFloat(result) * parseFloat(current);\r\n }else if (lastOperation === '-') {\r\n result = parseFloat(result) - parseFloat(current);\r\n }else if (lastOperation === '+') {\r\n result = parseFloat(result) + parseFloat(current);\r\n }else if (lastOperation === '%') {\r\n result = parseFloat(result) % parseFloat(current);\r\n }\r\n}", "function performCalculation() {\r\n if (calculator.firstNumber == null || calculator.operator == null) {\r\n alert(\"Anda belum menetapkan operator\");\r\n return;\r\n }\r\n\r\n let result = 0;\r\n if (calculator.operator === \"+\") {\r\n result = parseInt(calculator.firstNumber) + parseInt(calculator.displayNumber)\r\n }\r\n\r\n if (calculator.operator === \"-\") {\r\n result = parseInt(calculator.firstNumber) - parseInt(calculator.displayNumber)\r\n }\r\n calculator.displayNumber = result;\r\n}", "calc() {\n\n let last = '';\n\n this._lastOperator = this.getLastItem(true); //verifica o ultimo operador\n //a variavel e menor que tres elementos \n if (this._operation.length < 3) {\n let firstItem = this._operation[0]; //primeiro item do array e 0\n this._operation = [firstItem, this._lastOperator, this._lastNumber]; //o array fica o primeiro, o ultimo operador e o numero\n }\n //tira o ultimo se for maior que 3 itens\n if (this._operation.length > 3) {\n last = this._operation.pop();\n this._lastNumber = this.getResult();\n } else if (this._operation.length == 3) {\n this._lastNumber = this.getLastItem(false);\n }\n\n let result = this.getResult();\n\n if (last == '%') {\n result /= 100;\n this._operation = [result];\n } else {\n this._operation = [result];\n //se for diferente de vazio\n if (last) this._operation.push(last);\n }\n\n this.setLastNumberToDisplay();\n\n }", "compute() {\n const prev = parseFloat(this.previousOperand);\n const current = parseFloat(this.currentOperand);\n const operations = {\n '+': prev + current,\n '-': prev - current,\n '*': prev * current,\n '/': prev / current\n }\n \n if (this.isEqualPressedAgain) {\n this.previousResult = this.currentOperand;\n this.currentOperand = this.performSameCalculation();\n }\n\n if (isNaN(prev) || isNaN(current)) return;\n this.currentOperand = this.checkForErrors(current, prev, operations);\n this.previousOperation = this.operation;\n this.operation = undefined;\n this.previousOperand = '';\n }", "function questionCalculations()\r\n\t{\r\n\t\t// here, calculations for all the above variables should occur\r\n\t}", "calc(){\n let lastIndex =\"\";\n //armazenando o ultimo operador\n this._lastOperator = this.getLastItem(true);\n\n if(this._operation.length < 3){\n let firstNumber = this._operation[0];\n this._operation =[];\n this._operation = [firstNumber, this._lastOperator, this._lastNumber];\n }\n\n //arrumando para quando o método for chamado pelo sinal de igual =\n if(this._operation.length > 3){\n\n lastIndex = this._operation.pop();\n //armazenando o ultimo número digitado na calcl\n this._lastNumber = this.getResult();\n\n }else if(this._operation.length == 3){\n //armazenando o ultimo número digitado na calcl\n this._lastNumber = this.getLastItem(false);\n }\n\n //transforma um vetor em uma string, usando um separador, qo separador é definido pelo parametro passado no método\n let result = this.getResult();\n\n if(lastIndex == \"%\"){\n result /= 100;\n this._operation = [result];\n }else{\n this._operation =[result];\n //se o ultimo index for diferente de vazio, então adiciona ele no vetor\n if(lastIndex){\n this._operation.push(lastIndex);\n }\n \n }\n this.setLastNumberToDisplay();\n \n }", "function calculate() {\n this.divideByZero = false;\n if (this.operator == 1) {\n this.currentInput = eval(this.memory) * eval(this.currentInput);\n };\n if (this.operator == 2) {\n if (eval(this.currentInput) == 0) {\n this.currentInput = \"undefined- cannot divide by zero\";\n this.divideByZero = true;\n }\n else {\n this.currentInput = eval(this.memory) / eval(this.currentInput);\n }\n };\n if (this.operator == 3) {\n this.currentInput = eval(this.memory) + eval(this.currentInput);\n };\n if (this.operator == 4) {\n this.currentInput = eval(this.memory) - eval(this.currentInput);\n };\n if (this.operator == 5 && this.currentInput < 0) {\n this.power_of = -1 * eval(this.currentInput);\n var base = eval(this.memory);\n var final = 1;\n for (i = 0; i < power_of; i++) {\n final = final * base;\n console.log(base + \"^\" + (i + 1) + \" = \" + final);\n }\n this.currentInput = 1 / final;\n }\n else if (this.operator == 5) {\n var power_of = eval(this.currentInput);\n var base = eval(this.memory);\n var final = 1;\n for (i = 0; i < power_of; i++) {\n final = final * base;\n console.log(base + \"^\" + (i + 1) + \" = \" + final);\n }\n this.currentInput = final;\n };\n this.operator = 0; //clear operator\n this.memory = \"0\"; //clear memory\n this.displayCurrentInput();\n}", "function operate(){\n\t\n\t// Triggers when second operator is '='\n\t// Call giveResult function which actually calculates formula\n\t// Write result into display\n\t// Set first number/operand as result for further calculations\n\t// Clear the rest of calculation object\n\tif (calculation['operator2'] == '='){\n\t\tlet result = giveResult();\n\t\tdisplay.textContent = result;\n\t\t\n\t\tcalculation['operand'] = parseFloat(result);\n\t\tcalculation['operand2'] = '';\n\t\tcalculation['operator'] = '';\n\t\tcalculation['operator2'] = '';\n\n\t// Same as above, but when second operator is other than '=' give result\n\t// and set first operator as second operator\n\t// Clear the rest\n\t}else{\n\t\tlet result = giveResult()\n\t\tdisplay.textContent = result;\n\t\t\n\t\tcalculation['operand'] = result\n\t\tcalculation['operand2'] = ''\n\t\tcalculation['operator'] = calculation['operator2'];\n\t\tcalculation['operator2'] = '';\n\t}\n}", "function Calculation() {\n }", "function calculation(){\n const bestPrice = getCosting('bestPrice');\n const extraMemoryCost = getCosting('extraMemoryCost');\n const extraStorageCost = getCosting('extraStorageCost');\n const deliveryCharge = getCosting('deliveryCharge');\n const totalSubPrice = bestPrice + extraMemoryCost + extraStorageCost + deliveryCharge; \n document.getElementById(\"totalPrice\").innerText = totalSubPrice;\n \n}", "sumOfMovables()\n {\n let sum = 0;\n for(let a of this.getValues())\n {\n sum+=a;\n }\n\n return sum;\n\n }", "function calculate(e){\n if(!x){\n return\n }\n //needs to clear numberArray\n console.log('operand event', e.target.innerText)\n //is the operand available? if so calculate x and y following the math hash map\n operand ? x = math[operand](x, y) : null\n display(x)\n operand = e.target.innerText\n setX ? setX = !setX : null\n numberArray = []\n console.log('x', x, 'y', y)\n\n}", "function compute () {\n // set value\n util.forEach(expressions, function(exp, index) {\n var v = that.$exec(exp)\n if (!v[0]) caches[index] = v[1]\n })\n // get content\n var str = ''\n util.forEach(parts, function(item, index) {\n str += emptyStr(item)\n if (index < expressions.length) {\n str += emptyStr(caches[index])\n }\n })\n return Expression.unveil(str)\n }", "function calculation(oper, v, field, rc) {\r\n\t\t\t\tvar ret;\r\n\t\t\t\tswitch (oper) {\r\n\t\t\t\t\tcase \"sum\" : \r\n\t\t\t\t\t\tret = parseFloat(v||0) + parseFloat((rc[field]||0));\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"count\" :\r\n\t\t\t\t\t\tif(v===\"\" || v == null) {\r\n\t\t\t\t\t\t\tv=0;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(rc.hasOwnProperty(field)) {\r\n\t\t\t\t\t\t\tret = v+1;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tret = 0;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"min\" : \r\n\t\t\t\t\t\tif(v===\"\" || v == null) {\r\n\t\t\t\t\t\t\tret = parseFloat(rc[field]||0);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tret =Math.min(parseFloat(v),parseFloat(rc[field]||0));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"max\" : \r\n\t\t\t\t\t\tif(v===\"\" || v == null) {\r\n\t\t\t\t\t\t\tret = parseFloat(rc[field]||0);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tret = Math.max(parseFloat(v),parseFloat(rc[field]||0));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\treturn ret;\r\n\t\t\t}", "function calculateBasedMem() {\n\t//var theForm = document.forms[\"capacity_form\"];\n var qtyAppNode = document.getElementById('qtyAppNode').value;\n var appNodeMem = document.getElementById('memNodeSize').value;\n var memPodSize = document.getElementById('memPodSize').value;\n var totalAppNodeMem = appNodeMem * qtyAppNode;\n var totalPodPerMem = totalAppNodeMem / memPodSize;\n return totalPodPerMem;\n\t//display the result\n //document.getElementById('ccapacity').innerHTML = \"Total pod por Mem: \"+totalPodPerMem;\n}", "calculateCal(){\n let BMR;\n BMR = (66 + (6.3*this.props.user.weight) + (12.9*this.props.user.height) - (6.8 * this.props.user.age))\n return BMR * 1.55;\n }", "function calculation () {\n omega1 = Math.sqrt(G/L); // 1. Eigen-Kreisfrequenz (parallele Schwingung)\n omega2 = Math.sqrt(G/L+2*D/M); // 2. Eigen-Kreisfrequenz (antiparallele Schwingung)\n a1 = (alpha01+alpha02)/2; // Hilfsgröße \n a2 = (alpha01-alpha02)/2; // Hilfsgröße\n }", "totalStockValue()\n {\n return this.shares*this.price;\n }", "function calcAll() {\n let subTotal = 0;\n [...cart.children].forEach(product => subTotal += updateSubtot(product));\n document.querySelector('h2 > span').innerHTML = subTotal;\n}", "function compute(){\n while(calcScreen!= \"\"){\n transfer();\n }\n if(stack.length == 1){ \n calcScreen+= stack.shift(); \n display();\n return;\n }\n let saver = stack.slice(0,3);\n stack.splice(0,3); \n while(stack.length> 0){\n if( !checkOp(stack[0])){ \n saver.push(evaluate(saver.shift(),saver.shift(),saver.shift())); \n saver = saver.concat(stack.slice(0,2));\n stack.splice(0,2);\n }\n else{\n saver.push(evaluate(saver.pop(),stack.shift(),stack.shift())); \n }\n\n }\n saver.push(evaluate(saver.shift(),saver.shift(),saver.shift())); \n calcScreen+= saver.pop();\n display();\n}", "function calculate() {\n if (operator == 1) {\n current_input = eval(memory) * eval(current_input);\n }\n if (operator == 2) {\n if (eval(current_input) == 0) {\n current_input = \"undefined\";\n }\n else {\n current_input = eval(memory) / eval(current_input);\n }\n }\n if (operator == 3) {\n current_input = eval(memory) + eval(current_input);\n }\n if (operator == 4) {\n current_input = eval(memory) - eval(current_input);\n }\n if (operator == 5 && current_input < 0) {\n var power_of = -1 * eval(current_input);\n var base = eval(memory);\n var final = 1;\n for (i = 0; i < power_of; i++) {\n final = final * base;\n console.log(base + \"^\" + (i + 1) + \" = \" + final);\n }\n current_input = 1 / final;\n }\n else if (operator == 5) {\n var power_of = eval(current_input);\n var base = eval(memory);\n var final = 1;\n for (i = 0; i < power_of; i++) {\n final = final * base;\n console.log(base + \"^\" + (i + 1) + \" = \" + final);\n }\n current_input = final;\n }\n operator = 0; //clear operator\n memory = \"0\"; //clear memory\n displayCurrentInput();\n}", "function calculateTotal(){\r\n\r\n var product;\r\n\r\n var priceArray = [];\r\n\r\n for(var key in localStorage){\r\n\r\n if(key.match(sessionId)){\r\n \r\n\r\n var product = JSON.parse(localStorage.getItem(key));\r\n \r\n //remove euro symbol from price\r\n var price = product.price.split(\"€ \").pop();\r\n\r\n priceArray.push(parseFloat(price));\r\n\r\n }\r\n\r\n } \r\n\r\n /*sum all prices in prices array with reduce method applying a fuction accumulator\r\n for each value of the array to 'reduce' it to a single value. A really cool function!*/\r\n if(priceArray.length == 0){\r\n return 0;\r\n }\r\n else {\r\n return priceArray.reduce(function(a, b){return a+b;});\r\n }\r\n\r\n }", "function calculatePrice() {\n\t\tmodelPrice = 26000;\n\t\tmodelPrice += +$('input[name=\"cpu\"]:checked', '#autoForm').val();\n\t\tmodelPrice += +$('input[name=\"gpu\"]:checked', '#autoForm').val();\n\t\tmodelPrice += +$('input[name=\"ssd\"]:checked', '#autoForm').val();\n\n\t\tlet chassisSRC = $('#imgHolder img').attr('src');\n\t\tlet chassisPrice = +$('#chassisSelector img[data-flag=\"1\"]').attr('data-price');\n\t\tmodelPrice += chassisPrice;\n\n\n\t\tmodelPriceHolder.text(addSpace(modelPrice) + ' грн');\n\t}", "calcularCostoAlmacenamientoTotal(){\n let {loteOptimo, costoDeAlmacenamiento, demanda, velocidadDeProduccion,tiempoTotalEnDias} = this.state;\n this.setState({costoDeAlmacenamientoTotal: ( (1/2) * Number(costoDeAlmacenamiento) * (1 - ((Number(demanda)/Number(tiempoTotalEnDias))/Number(velocidadDeProduccion))) ) })\n }", "function evaluate(indexStart, indexEnd, operators, operands) {\r\n\r\n for (var index = indexStart; index < indexEnd; index++) {\r\n\r\n var indexFirstOperand = index\r\n var indexNextOperand = index + 1\r\n var indexNextOperator = index\r\n\r\n if (operators[indexNextOperator] == null) {\r\n for (var indexNext = indexNextOperator + 1; indexNext < operators.length; indexNext++) {\r\n if (operators[indexNext] != null) {\r\n indexNextOperator = indexNext\r\n indexFirstOperand = indexNext\r\n indexNextOperand = indexNext + 1\r\n index = indexNext - 1\r\n break\r\n }\r\n }\r\n }\r\n\r\n if (operands[indexNextOperand] == null) {\r\n for (var indexNext = indexNextOperand + 1; indexNext < operands.length; indexNext++) {\r\n if (operands[indexNext] != null) {\r\n indexNextOperand = indexNext\r\n index = indexNext - 1\r\n break\r\n }\r\n }\r\n }\r\n\r\n // MULTIPLICATION \r\n if (operators[indexNextOperator] == '*') {\r\n result = operands[indexFirstOperand] * operands[indexNextOperand]\r\n\r\n operands[indexNextOperand] = result\r\n operands[indexFirstOperand] = null\r\n operators[indexNextOperator] = null\r\n finalResult = result\r\n result = 0\r\n\r\n console.log(operands)\r\n console.log(operators)\r\n }\r\n // DIVISION\r\n else if (operators[indexNextOperator] == '/') {\r\n result = operands[indexFirstOperand] / operands[indexNextOperand]\r\n\r\n operands[indexNextOperand] = result\r\n operands[indexFirstOperand] = null\r\n operators[indexNextOperator] = null\r\n finalResult = result\r\n result = 0\r\n\r\n console.log(operands)\r\n console.log(operators)\r\n }\r\n }\r\n\r\n // ADDITION and SUBSTRACTION\r\n for (var index = indexStart; index < indexEnd; index++) {\r\n\r\n var indexFirstOperand = index\r\n var indexNextOperand = index + 1\r\n var indexNextOperator = index\r\n\r\n if (operators[indexNextOperator] == null) {\r\n for (var indexNext = indexNextOperator + 1; indexNext < operators.length; indexNext++) {\r\n if (operators[indexNext] != null) {\r\n indexNextOperator = indexNext\r\n indexFirstOperand = indexNext\r\n indexNextOperand = indexNext + 1\r\n index = indexNext - 1\r\n break\r\n }\r\n }\r\n }\r\n\r\n if (operands[indexNextOperand] == null) {\r\n for (var indexNext = indexNextOperand + 1; indexNext < operands.length; indexNext++) {\r\n if (operands[indexNext] != null) {\r\n indexNextOperand = indexNext\r\n index = indexNext - 1\r\n break\r\n }\r\n }\r\n }\r\n\r\n // ADDITION \r\n if (operators[indexNextOperator] == '+') {\r\n result = operands[indexFirstOperand] + operands[indexNextOperand]\r\n\r\n operands[indexNextOperand] = result\r\n operands[indexFirstOperand] = null\r\n operators[indexNextOperator] = null\r\n finalResult = result\r\n result = 0\r\n\r\n console.log(operands)\r\n console.log(operators)\r\n }\r\n // SUBSTRACTION\r\n else if (operators[indexNextOperator] == '-') {\r\n result = operands[indexFirstOperand] - operands[indexNextOperand]\r\n\r\n operands[indexNextOperand] = result\r\n operands[indexFirstOperand] = null\r\n operators[indexNextOperator] = null\r\n finalResult = result\r\n result = 0\r\n\r\n console.log(operands)\r\n console.log(operators)\r\n }\r\n }\r\n return finalResult\r\n}", "promedio(){\n let promedio = 0;\n let i =0;\n for(let x of this._data){\n i = i++;\n promedio = promedio + x;\n }\n return promedio/i;\n }", "checkout(){\n\n let total = 0\n this.products.forEach(item =>{\n GRAPHQL.decrementQuantity(item.id)\n total += item.price\n })\n\n return total\n }", "reduce (){\n this.hunger -= 2\n this.energy -= 1\n this.hygiene -= 1\n this.fun -= 2\n }", "calculate(){\r\n \r\n switch(this.operator){//evaluate the operator \r\n case \"^\"://if the operator is ^, then use the power formula\r\n return Math.pow(this.num1,this.num2); \r\n case \"*\"://if the operator is *, multiple the two numbers\r\n return this.num1*this.num2;\r\n case \"/\"://if the operator is ^,divide the two numbers\r\n return this.num1/this.num2; \r\n case \"+\"://if the operator is ^, add the two numbers\r\n return this.num1+this.num2;\r\n case \"-\"://if the operator is ^, subtract the two numbers\r\n return this.num1-this.num2; \r\n default://else error\r\n return \"ERROR\" \r\n }\r\n }", "function calculate() {\n console.log('basenumber' + baseNumber);\n console.log('currNumber' + currNumber);\n if (!makeCalcPer) {\n if (baseNumber == 0) {\n baseNumber = parseFloat(inputMain.textContent);\n }\n result = eval(inputReserve.textContent + inputMain.textContent);\n inputReserve.textContent = `${result} ${op}`\n inputMain.textContent = `${result}`;\n makeCalc = false;\n mathOpCount = 1;\n } else {\n result = eval(inputReserve.textContent);\n inputReserve.textContent = `${result} ${op}`\n inputMain.textContent = `${result}`;\n makeCalc = false;\n mathOpCount = 1;\n makeCalcPer = false;\n }\n}", "calcularCostoPreparacionTotal(){\n let {demanda, loteOptimo, costoDePreparacion} = this.state;\n this.setState({costoDePreparacionTotal: ((Number(demanda)/Number(loteOptimo))*Number(costoDePreparacion)) })\n }", "inventoryValue() {\n return this.inventory.reduce((total, book) => total + book.price, 0);\n }", "calcularCostoProductoTotal(){\n let {costoDeProducto, demanda} = this.state;\n this.setState({costoDeProductoTotal: (Number(costoDeProducto)*Number(demanda)) })\n }", "function calculation(e) {\r\n // Default char variable for keyboard input.\r\n let char = e.key;\r\n\r\n // If event fired from mouse then char value change based on DOM element value;\r\n // and fire the native keyboard events excep memory operation\r\n // Memory operation only available via DOM events.\r\n if (e.type == \"click\") {\r\n switch (e.target.textContent) {\r\n case \"÷\":\r\n char = \"/\";\r\n break;\r\n case \"×\":\r\n char = \"*\";\r\n break;\r\n case \"«\":\r\n char = \"Backspace\";\r\n break;\r\n case \"00\":\r\n char = \"00\";\r\n break;\r\n case \"c\":\r\n input = \"\";\r\n output = \"\";\r\n break;\r\n case \"=\":\r\n char = \"Enter\";\r\n break;\r\n case \"m+\":\r\n handleMemory(\"plus\");\r\n break;\r\n case \"m-\":\r\n handleMemory(\"substract\");\r\n break;\r\n case \"mr\":\r\n handleMemory(\"read\");\r\n break;\r\n case \"mc\":\r\n handleMemory(\"clear\");\r\n break;\r\n default:\r\n char = e.target.textContent;\r\n }\r\n }\r\n\r\n // Checking and validating input output variable, input max lenght 32 chars\r\n if (input.length <= 32) {\r\n if (operands.includes(char)) {\r\n input += char;\r\n output = evalInput(input);\r\n } else if (char in operators) {\r\n input += operators[char];\r\n } else if (char == \"=\" || char == \"Enter\") {\r\n input = handleSubmit(input, output);\r\n output = \"\";\r\n } else if (char == \"Backspace\") {\r\n input = handleDelete(input);\r\n output = evalInput(input);\r\n }\r\n } else {\r\n input = handleDelete(input);\r\n }\r\n\r\n // DOM display update with input output memory variable\r\n let inputDisplay = document.querySelector(\".calc-dis-in\");\r\n let outputDisplay = document.querySelector(\".calc-dis-out\");\r\n let memoryIndicator = document.querySelector(\".calc-dis-mi\");\r\n let memoryDisplay = document.querySelector(\".calc-dis-mo\");\r\n inputDisplay.innerHTML = input;\r\n outputDisplay.innerHTML = output;\r\n if (hasMemory) {\r\n memoryIndicator.innerHTML = \"M\";\r\n memoryDisplay.innerHTML = memory;\r\n } else {\r\n memoryIndicator.innerHTML = \"\";\r\n memoryDisplay.innerHTML = \"\";\r\n }\r\n}", "totalSpent(){\n return this.meals().reduce((a,b)=>(a += b.price), 0);\n }", "function calculate(screen)\n{\n\tvar currentValue = parseFloat(screen.text);\n\tvar answer = 0;\n\t\n\tif (operation == \"+\") \n\t\tanswer = lastValue + currentValue;\n\telse if (operation == \"-\") \n\t\tanswer = lastValue - currentValue;\n\telse if (operation == \"/\") \n\t\tanswer = lastValue / currentValue;\n\telse if (operation == \"*\") \n\t\tanswer = lastValue * currentValue;\n\t\t\n\tscreen.text = answer.toString();\n}", "function getTotal() {\n if (!runningTotal) {\n operate(x, sign, y);\n runningTotal = true;\n } else if (runningTotal) {\n operate(total, sign, y);\n } \n}", "function storeInput () {\n document.querySelectorAll('.operator').forEach(operand => {operand.onclick = function () {\n calculation[\"numbers\"].push(display);\n calculation[\"operators\"].push(operand.innerText);\n currentTotal(calculation[\"numbers\"], calculation[\"operators\"])\n reenterDisplay();\n }\n }\n )\n //getDisplayValue();\n }", "function Store(name, minHr, maxHr, avgCups, pounds) {\n this.loc = name;\n this.minHr = minHr;\n this.maxHr = maxHr;\n this.avgCups = avgCups;\n this.pounds = pounds;\n this.hourlyCust = [];\n this.hourlyCups = [];\n this.cupsBeansLbs = [];\n this.totalBeans = [];\n this.go = [];\n this.combined = 0;\n this.hourlyCustomers = function() {\n for (var i = 0; i < timeHr.length; i++){\n this.hourlyCust[i] = (Math.floor((Math.random() * (this.maxHr - this.minHr + 1)) + this.minHr));\n console.log(this.hourlyCust[i] + ' customers this hour.');\n }\n };\n\n this.generateHourlyCups = function() {\n this.hourlyCustomers();\n for (var i = 0; i < timeHr.length; i++) {\n this.hourlyCups[i] = Math.floor(this.avgCups * this.hourlyCust[i]);\n //console.log(this.hourlyCups[i] + ' cups needed per hour');\n this.cupsBeansLbs[i] = (this.hourlyCups[i] / 20);\n //console.log(this.cupsBeansLbs[i] + ' pounds for cups');\n this.go[i] = this.hourlyCust[i] * this.pounds;\n //console.log(this.go[i] + ' pounds needed to-go');\n //console.log(this.cupsBeansLbs[i] + ' Lbs of customer')\n this.totalBeans[i] = this.go[i] + this.cupsBeansLbs[i];\n //console.log(this.totalBeans[i] + ' total');\n }\n };\n this.totalTotals = function() {\n for ( var i = 0; i < timeHr.length; i++) {\n this.combined += this.totalBeans[i];\n }\n } //TOAL BEANS FOR GRAPH\n\n }", "function calculate () {\n const finalPrice = priceArray.reduce(getSum);\n priceDisplay.textContent = 'Total - Price $' + finalPrice;\n}", "totalPrice() {\n let sum = 0;\n\n for(let i = 0; i < this.state.items.length; i++){\n sum += this.totalItemPrice(this.state.items[i]);\n }\n return sum;\n }", "function calculated (operator, a, b) {\n if (operator === '+') {\n return Math.round((a + b) * 1000000) / 1000000\n } else if (operator === '-') {\n return Math.round((a - b) * 1000000) / 1000000\n } else if (operator === '*') {\n return Math.round((a * b) * 1000000) / 1000000\n } else if (operator === '/') {\n return Math.round((a / b) * 1000000) / 1000000\n }\n }", "calc() {\n let currentLast = '';\n this._lastOperator = this.getLastItem();\n\n if (this._operation.length < 3) {\n let firstItem = this._operation[0];\n this._operation = [firstItem, this._lastOperator, this._lastNumber]\n }\n\n if (this._operation.length > 3) {\n currentLast = this._operation.pop();\n this._lastNumber = this.getResult();\n } else if (this._operation.length == 3) {\n this._lastNumber = this.getLastItem(false);\n }\n\n let currentResult = this.getResult();\n if (currentLast == '%') {\n currentResult /= 100;\n this._operation = [currentLast]\n } else {\n this._operation = [currentResult];\n if (currentLast) this._operation.push(currentLast);\n }\n this.setLastNumberToDisplay();\n }", "compute() {\n const v = {}\n const ev = this.electric.compute()\n const tv = this.thermal.compute()\n\n let cv\n let tev\n\n if (this.electric.source == this.thermal.source) {\n cv = this.combinedPowerBlockRequirements(this.electric.source, ev, tv)\n tev = this.totalEnergyBlockCosts(ev, tv, cv)\n } else if (this.electric.source == 'NGCC w/ CCS') {\n tev = this.ngUtilitySection(ev, tv)\n } else {\n throw 'TODO: handle case with mismatched energy sources'\n }\n\n const dv = this.dac.compute()\n\n // Total Capital Cost [M$]\n v['Total Capital Cost [M$]'] =\n tev['Total Capital Cost [M$]'] +\n dv['Capital Cost (including Lead Time) [M$]']\n\n // Capital Recovery [$/tCO2eq]\n v['Capital Recovery [$/tCO2eq]'] =\n (v['Total Capital Cost [M$]'] * this.recoveryFactor() * MILLION) /\n this.params['Scale [tCO2/year]']\n\n // Fixed O&M [$/tCO2eq]\n v['Fixed O&M [$/tCO2eq]'] =\n tev['Fixed O&M [$/tCO2eq]'] + dv['Fixed O&M [$/tCO2eq]']\n\n // Variable O&M [$/tCO2eq]\n v['Variable O&M [$/tCO2eq]'] =\n tev['Variable O&M [$/tCO2eq]'] + dv['Variable O&M [$/tCO2eq]']\n\n // Natural Gas Cost [$/tCO2]\n v['Natural Gas Cost [$/tCO2]'] = tev['Natural Gas Cost [$/tCO2eq]']\n\n // Emitted [tCO2eq/tCO2]\n v['Emitted [tCO2/tCO2]'] = tev['Emitted [tCO2/tCO2]']\n\n const emissionsFactor = this.calcEmissionsFactor(\n tev['Natural Gas Use [mmBTU/tCO2eq]'],\n v['Emitted [tCO2/tCO2]']\n )\n\n // Capital Recovery [$/tCO2eq Net Removed]\n v['Capital Recovery [$/tCO2eq Net Removed]'] =\n v['Capital Recovery [$/tCO2eq]'] / emissionsFactor\n\n // Variable O&M [$/tCO2eq Net Removed]\n v['Variable O&M [$/tCO2eq Net Removed]'] =\n v['Variable O&M [$/tCO2eq]'] / emissionsFactor\n\n // Natural Gas Cost [$/tCO2 Net Removed]\n v['Natural Gas Cost [$/tCO2 Net Removed]'] =\n v['Natural Gas Cost [$/tCO2]'] / emissionsFactor\n\n // Fixed O&M [$/tCO2eq Net Removed]\n v['Fixed O&M [$/tCO2eq Net Removed]'] =\n v['Fixed O&M [$/tCO2eq]'] / emissionsFactor\n\n // Total Cost [$/tCO2]\n v['Total Cost [$/tCO2 Net Removed]'] =\n v['Capital Recovery [$/tCO2eq Net Removed]'] +\n v['Fixed O&M [$/tCO2eq Net Removed]'] +\n v['Variable O&M [$/tCO2eq Net Removed]'] +\n v['Natural Gas Cost [$/tCO2 Net Removed]']\n\n return v\n }", "calc() {\n let last = '';\n\n this._lastOperator = this.getLastItem();\n\n\n if (this._operation.length < 3) {\n let firstItem = this._operation[0];\n this._operation = [firstItem, this._lastOperator, this._lastNumber];\n }\n\n if (this._operation.length > 3) {\n\n last = this._operation.pop();\n this._lastNumber = this.getResult();\n\n } else if (this._operation.length == 3) {\n this._lastNumber = this.getLastItem(false);\n }\n\n console.log(\"operador\", this._lastOperator);\n console.log(\"numero\", this._lastNumber);\n\n let result = this.getResult();\n\n if (last == \"%\") {\n result /= 100;\n this._operation = [result];\n } else {\n this._operation = [result];\n\n if (last) this._operation.push(last);\n }\n\n this.lastNumberToDisplay();\n\n }", "inventoryValue() {\n return this.inventory.reduce(total, book) => {\n total += book.price;\n }", "calculate() {\n let answer = 0;\n\n if(this.type === 0) {\n answer = this.permutation();\n } else if(this.type === 1){\n answer = this.combination();\n }\n\n return Math.ceil(answer);\n }", "calculate() {\n if (this.store.length == 0) return 0;\n let intervals = [];\n let total = 0;\n for (var i = 1; i < this.store.length; i++) {\n let interval = this.store[i] - this.store[i - 1];\n if (isNaN(interval)) debugger;\n intervals.push(interval);\n total += interval;\n }\n\n if (this.store[0] < performance.now() - 5000) {\n // Haven't received any pulses for a while, reset\n this.store = [];\n return 0;\n }\n if (total == 0) return 0;\n return total / (this.store.length - 1);\n }", "calculateAdvancedMedical() {\n var scale = this.isMonthly ? 1 : 1 / 12; // divide by 12 if the user input yearly numbers \n this.cost = parseInt( ( parseInt(this.dentalCost) + parseInt(this.healthInsuranceCost) + parseInt(this.medicationCost) + parseInt(this.otherMedicalCost) ) * scale);\n // this.cost = this.cost.toFixed(2);\n\n this.eventAggregator.publish('update', {name: 'Medical', value: this.cost});\n }", "function evaluate(criterios){\n for(let criterio of criterios){\n let modelo = criterio.notas.modelo\n let resultado = criterio.resultado\n \n /*\n #1\n modelo: {\n peso: 1,\n intervalo: {\n tipo: discreto,\n valor: [0, 5]\n }\n }\n resultado: 3\n \n #2\n modelo: {\n peso: 2,\n lista: [{\n texto: Danificada,\n valor: -1\n }, {...}, ...]\n }\n resultado: [0, 3]\n\n #3\n modelo: {\n peso: 2,\n boleano: {\n texto: Pets,\n valor: true/false\n }\n }\n resultado: true\n */\n \n let normal;\n if(modelo.intervalo){\n normal = (resultado - modelo.intervalo.valor[0])/(modelo.intervalo.valor[1] - modelo.intervalo.valor[0])\n }else if(modelo.booleano){\n normal = +(resultado == modelo.booleano.valor) * modelo.booleano.peso\n }else if(modelo.lista){\n let soma = modelo.lista.filter((v, i) => {\n return i in resultado\n }).reduce((acc, cur) => {\n return acc + cur.valor\n }, 0)\n let lista_ordenada = modelo.lista.sort((a, b) => a.valor - b.valor)\n let len_lista = modelo.lista.length\n \n let minimo = lista_ordenada[0].valor\n let maximo = lista_ordenada[len_lista-1].valor\n \n normal = (soma - minimo) / (maximo - minimo)\n }\n \n criterio.normal = normal\n criterio.normal_ponderada = normal * modelo.peso \n }\n \n let peso_total = criterios.reduce((acc, cur) => {\n return acc + cur.notas.peso\n }, 0)\n let nota_normal_ponderada_total = criterios.reduce((acc, cur) => acc + cur.normal_ponderada, 0)\n \n let nota_final = nota_normal_ponderada_total / peso_total\n \n return {\n final: nota_final,\n criterios: criterios.map(c => {\n return {\n resultado: c.resultado,\n normal: c.normal,\n peso: c.notas.peso,\n ponderada: c.ponderada\n }\n })\n }\n }", "sum() {}", "function tempTransfer() {\r\n supplies[MONEY] = supplies[MONEY] - ((price[OXEN_COST] * tempSupplies[OXEN]) + (price[CLOTHING_COST] * tempSupplies[CLOTHING]) + (price[FOOD_COST] * tempSupplies[FOOD]) + (price[BAIT_COST] * tempSupplies[BAIT]) + (price[WAGON_COST] * tempSupplies[PARTS]));\r\n var i;\r\n for (i = 0; i < supplies.length; i++) supplies[i] += tempSupplies[i];\r\n for (i = 0; i < parts.length; i++) parts[i] += tempParts[i];\r\n tempSupplies = [0, 0, 0, 0, 0, 0];\r\n tempParts = [0, 0, 0];\r\n}", "total(){\n return operations.incomes() + operations.expenses()\n }", "updateTotal() {\n let total = 0;\n for (let index in this.items) {\n let item = this.items[index];\n total += item.price * item.quantity;\n }\n this.total = total;\n }", "function compute () {\n\t // set value\n\t util.forEach(expressions, function(exp, index) {\n\t var v = that.$exec(exp)\n\t if (!v[0]) caches[index] = v[1]\n\t })\n\t // get content\n\t var frags = []\n\t util.forEach(parts, function(item, index) {\n\t frags.push(item)\n\t if (index < expressions.length) {\n\t frags.push(caches[index])\n\t }\n\t })\n\t return Expression.unveil(frags.join(''))\n\t }", "function calcSum(){\n var sum = 0;\n for (var i = 0; i < data.length ; i++) {\n if (data[i].type === 'inc') {\n sum += parseInt(data[i].value);\n\n }else if (data[i].type === 'exp') {\n sum -= parseInt(data[i].value);\n }\n }\n return sum;\n}", "function goukei_4_10() {\n var total_c1 = 0;\n var total_c2 = 0;\n var total_c3 = 0;\n var total_c4 = 0;\n if (vm.property.men4_10_5 && vm.property.men4_10_5.length > 0) {\n vm.property.men4_10_5.forEach(function (item) {\n total_c1 += item.c1;\n total_c2 += item.c2;\n total_c3 += item.c3;\n var c4 = item.c2 + item.c3;\n item.c4 = c4;\n total_c4 += c4;\n });\n }\n\n vm.property.men4_10_1 = total_c1;\n vm.property.men4_10_2 = total_c2;\n vm.property.men4_10_3 = total_c3;\n vm.property.men4_10_4 = total_c4;\n }", "function calculPrice () {\n for (var i = 0; i < deliveries.length; i++) {\n for (var j = 0; j < truckers.length; j++) {\n if (deliveries[i].truckerId == truckers[j].id) {\n var pricePerKm = truckers[j].pricePerKm;\n var pricePerVolume = truckers[j].pricePerVolume;\n break;\n }\n }\n deliveries[i].price = deliveries[i].distance * pricePerKm + deliveries[i].volume * pricePerVolume * decreazingPrice(deliveries[i].volume);\n }\n}", "function calculate(e) {\n\n\t\t// prevent submit\n\t\tif (e && e.type == 'submit') e.preventDefault();\n\n\t\t// invalid key?\n\t\tif (e && e.type == 'keydown') {\n\t\t\tvar k = e.keyCode;\n\t\t\tif (k > 105 || (k > 57 && k < 96)) e.preventDefault();\n\t\t\treturn;\n\t\t}\n\n\t\t// active value\n\t\tvar t = e && e.target;\n\t\tif (t == dom.set2.number || t == dom.set1.currency) {\n\t\t\tinp = dom.set2;\n\t\t\tout = dom.set1;\n\t\t\tlocalStorage.setItem('input', 'set2');\n\t\t\tlocalStorage.setItem('output', 'set1');\n\t\t}\n\t\telse {\n\t\t\tinp = dom.set1;\n\t\t\tout = dom.set2;\n\t\t\tlocalStorage.setItem('input', 'set1');\n\t\t\tlocalStorage.setItem('output', 'set2');\n\t\t}\n\n\t\t// conversion calculation\n\t\tvar\n\t\t\tvalueInp = lib.int(inp.number.value),\n\t\t\tvalueOut = lib.int(valueInp * (1 / (forex.rates[inp.currency.value] || 1)) * (forex.rates[out.currency.value] || 1));\n\n\t\t// output values\n\t\tif (String(valueInp) !== String(inp.number.value)) inp.number.value = valueInp;\n\t\tif (String(valueOut) !== String(out.number.value)) out.number.value = valueOut;\n\n\t\t// store user defaults\n\t\tlocalStorage.setItem('currency1', dom.set1.currency.selectedIndex);\n\t\tlocalStorage.setItem('number1', dom.set1.number.value);\n\t\tlocalStorage.setItem('currency2', dom.set2.currency.selectedIndex);\n\t\tlocalStorage.setItem('number2', dom.set2.number.value);\n\n\t}", "function calculerTotal(){ \r\n var total = 0\r\n for (var i in achats) {\r\n total = total + achats[i].nbre*achats[i].prix;\r\n }\r\n setElem(\"tot\", total.toFixed(2));\r\n }", "getCalculate() {\n const price = 100000 * this.#rom + 150000 * this.#ram;\n console.log(\n `The Price of Smartphone ${this.#name} with ROM ${this.#rom} GB and RAM ${\n this.#ram\n } GB is Rp ${price}`\n );\n }", "computeTotals()\n {\n if (this.file.transactions.length == 0)\n return\n\n this.totalSpendings = this.file.transactions\n .map(x => Math.min(x.amount, 0))\n .reduce((acc, x) => acc + x)\n\n this.totalIncome = this.file.transactions\n .map(x => Math.max(x.amount, 0))\n .reduce((acc, x) => acc + x)\n }", "function calculBasket (){\n let basketFromLocalStorage = JSON.parse(localStorage.getItem(\"myBasket\"));\n let prixTotal= [];\n \n for (m = 0; m<basketFromLocalStorage.length; m++){\n let prixProduits =basketFromLocalStorage[m].price*basketFromLocalStorage[m].quantity\n \n prixTotal.push(prixProduits)\n \n }\n \n ///addtioner le tableau\n const reducer = (accumulator, currentValue) => accumulator + currentValue;\n const prixTotalProduits = prixTotal.reduce(reducer,0)/100;\n \n total.textContent = prixTotalProduits + \" € \"\n if (prixTotalProduits==0){text.innerHTML = `<p> Votre panier est vide<br> <a href=\"./index.html\">Retour a l'accueil</a></p>`}\n }", "_getPrice(){\n return this._stuffing.price+ this._size.price;\n }", "getAmount(){ \n var totalAmount = (this.gallonsRequested * this.getPrice());\n\n return totalAmount;\n }", "function total(){\n // regular price area call here \n const regularPrice = document.getElementById(\"regular-price\").innerText;\n // final memory price area call here \n const finalMemoryPrice =document.getElementById('previous-memory-cost').innerText;\n // final storage price area call here \n const finalStoragePrice = document.getElementById(\"previous-storage-cost\").innerText;\n // final delivery charge area call here \n const finalDeliveryFee = document.getElementById(\"delivery-fee\").innerText;\n // total price showing area call here \n const totalPrice = document.getElementById('previous-total');\n // pomo total price showing here \n const pomoFinalTotal = document.getElementById(\"before-pomo\");\n // total price calculation \n const sumTotalPrice = parseFloat(regularPrice) + parseFloat(finalMemoryPrice) + parseFloat(finalStoragePrice) + parseFloat(finalDeliveryFee );\n totalPrice.innerText = sumTotalPrice;\n pomoFinalTotal.innerText = sumTotalPrice;\n}", "function computeSaltDailies(){\n\t\t\t\t\tsp=0;pu=0;sf=0;\n\t\t\t\t //if(no!=1)\n\t\t\t\t for(i=1;i<=lastRowId;++i){\n\t\t\t\t $(\"#saltFortified_\"+i).val((($('#saltProduced_'+i).val()*1000)/$('#premixUsed_'+i).val()).toFixed(2));\n\t\t\t\t\t sp=sp+parseFloat($('#saltProduced_'+i).val());\n\t\t\t\t\t pu=pu+parseFloat($('#premixUsed_'+i).val());\n\t\t\t\t\t sf=sf+parseFloat($(\"#saltFortified_\"+i).val());\n\t\t\t\t\t \n\t\t\t\t\t //alert(sp+' '+pu+' '+sf);\n\t\t\t\t\t }\n\t\t\t\t\t // alert(sf);\n\t\t\t\t\t $('#saltProduced2').val(sp.toFixed(2));\n\t\t\t\t\t $('#premixUsed2').val(pu.toFixed(2));\n\t\t\t\t\t $('#saltFortified2').val(sf.toFixed(2));\n\t\t\t\t\t \n\t\t\t\t\t $('#saltProduced3').val($('#saltProduced2').val());\n\t\t\t\t\t $('#premixUsed3').val($('#premixUsed2').val());\n\t\t\t\t\t $('#saltFortified3').val($('#saltFortified2').val());\n\t\t\t\t}", "function calcular(){\r\n num1 = parseFloat(num1);\r\n num2 = parseFloat(num2);\r\n switch(operador){\r\n case operacion.SUMAR:\r\n num1+=num2;\r\n break;\r\n case operacion.RESTAR:\r\n num1 = num1-num2;\r\n break;\r\n case operacion.MULTIPLICAR:\r\n num1*=num2;\r\n break;\r\n case operacion.DIVIDIR:\r\n num1 = (num1/num2);\r\n break;\r\n case operacion.PORTENCIA:\r\n num1 = Math.pow(num1,num2);\r\n break;\r\n }\r\n actualizarValor1();\r\n num2 = 0;\r\n actualizarValor2();\r\n}", "function budgetCalculator(watch, phone, laptop){\n // cost every single item\n var watchCost = watch * 50;\n var phoneCost = phone * 100;\n var laptopCost = laptop * 500;\n //total cost of all item.\n var totalCost = watchCost + phoneCost + laptopCost;\n return totalCost;\n\n}" ]
[ "0.70780784", "0.6922537", "0.675253", "0.64578205", "0.64027846", "0.6395897", "0.63805926", "0.62794995", "0.6271258", "0.6236262", "0.6226813", "0.6190717", "0.6182904", "0.61458254", "0.61312705", "0.61271846", "0.61223537", "0.61117136", "0.6070157", "0.6038322", "0.5995947", "0.59764725", "0.59738183", "0.59610534", "0.5949719", "0.5947217", "0.5938422", "0.58992773", "0.58833826", "0.585682", "0.5836043", "0.58243424", "0.5817695", "0.5816338", "0.5814118", "0.58063006", "0.57920855", "0.57879317", "0.57726794", "0.5764053", "0.57477504", "0.574167", "0.5726402", "0.57250524", "0.5723616", "0.57171094", "0.5716715", "0.5696233", "0.5695472", "0.5689043", "0.5683995", "0.5681121", "0.56784505", "0.5663623", "0.5660172", "0.5657307", "0.5655549", "0.56508636", "0.5648993", "0.56461906", "0.56427646", "0.5633829", "0.5630058", "0.5624839", "0.56239796", "0.56174314", "0.56145036", "0.56102294", "0.560861", "0.56022", "0.5601853", "0.56003684", "0.55994064", "0.55986", "0.55985606", "0.55954206", "0.55913246", "0.55887324", "0.5585546", "0.55855227", "0.5584922", "0.55809957", "0.55803746", "0.55686694", "0.5567766", "0.5552465", "0.5546561", "0.553139", "0.5529843", "0.55260956", "0.5524857", "0.5524164", "0.5522947", "0.5522235", "0.55111843", "0.55105454", "0.5506926", "0.5501035", "0.5500941", "0.54987556", "0.54977167" ]
0.0
-1
retunrs to the customer overview state
_cancel(){ this.state.go('customer-overview'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function viewcustomer(a) {\n $(\".inventorydisp .unactivate\").toggleClass(\"deactivate unactivate\");\n $(\"#customer-list .deactivate\").toggleClass(\"deactivate\");\n /*$(\".customerdisp .unactivate\").toggleClass(\"deactivate\")*/\n $(\"li.actparent\").toggleClass(\"actparent\");\n if ($(\".inventorydisp .tab1\").css(\"display\") == \"none\") {\n $(\".inventorydisp .tab1\").toggle();\n $(\".inventorydisp .tab2\").toggle();\n }\n $(\".customer_name.act\").toggleClass(\"act\");\n //name = $(\".username.act\").html()\n $(a).find(\".customer_name\").toggleClass(\"act\");\n $(a).toggleClass(\"actparent\");\n name = $(\".customer_name.act\").html();\n console.log(name);\n $(\".customername\").text(name);\n $(\"#customerhistorypane\").css(\"opacity\", \"0\");\n dbOperations(\"inventory\", \"select_operation\", [\"customerinvoice\", \"customer\", String($(\".customername\").html())]);\n check_for_active_row(\"customer_name\", \"inventory\");\n $(\"#customerhistorypane\").animate({\n opacity: 1\n });\n}", "_changeCustomer() {\n this.customerRenderer.showCustomerSearch();\n }", "getCustomersList(state) {\n return state.customersList;\n }", "goToCustomerListPage(){\n this.getListOfCustomers();//calling function that will retrieve list of customers with server\n }", "function fetchingActiveCustomerDetails() {\n return {\n type: FETCHING_ACTIVECUSTOMERS_DETAILS\n };\n}", "function showCustomers() {\n var app = new CustomerDB();\n var resources = app.getResources();\n for(i=0;i<resources.length;i++) {\n var resource = resources[i];\n if(resource instanceof Customers) {\n customersObj = resource;\n var customers = customersObj.getItems();\n var headers = new Array();\n headers[0] = 'ID';\n headers[1] = 'Name';\n headers[2] = 'Email';\n headers[3] = 'Address';\n headers[4] = 'Action';\n var node = document.getElementById('vw_pl_content');\n node.innerHTML = createCustomersTable(headers, customers) ;\n doShowContent('vw_pl');\n }\n } \n}", "function customerView () {\n common.openConnection(connection);\n let querySQL = 'SELECT item_id, product_name, stock_quantity, price FROM products where stock_quantity > 0'; // exclude from \"where\" to premit out-of-stock items\n connection.query(querySQL, (error, result) => {\n if (error) throw error;\n let msg = ''; \n let title = 'LIST OF PRODUCTS FOR SALE';\n common.displayProductTable(title, result) // pass title and queryset to function that will print out information\n console.log('\\n');\n customerSelect();\n });\n \n}", "function showList() {\n\t\t\t$state.go('flight.list');\n\t\t}", "function getCustomerList() {\n\t// TODO: add logic to call backend system\n\n\n}", "function show() {\n\tapp.getView().render('content/folder/customerserviceaboutus');\n}", "function customerInfo() {\n let currentCustomer = vm.customers[vm.currentIndices.customer];\n let customerInfoElement = document.getElementById(\"CUSTOMER_INFO\").children;\n customerInfoElement[1].innerText = currentCustomer.name;\n customerInfoElement[4].innerText = currentCustomer.age;\n customerInfoElement[7].innerText = currentCustomer.email;\n customerInfoElement[10].innerText = currentCustomer.phone;\n customerInfoElement[13].innerText = currentCustomer.address;\n customerInfoElement[16].innerText = currentCustomer.registered;\n customerInfoElement[19].innerText = currentCustomer.about;\n }", "function goToAccRec() {\n $('#peInvoiceInformation').show();\n $('#invoiceInformation').hide();\n $('#financialSection').show();\n updatePricingInfo();\n fillPeInvsTable(DATA);\n}", "function backToScreenDtl(){\n\tupdateAccountListInfo(); \n\tnavController.initWithRootView('corp/account/list_info/acc_list_account_info_dtl', true, 'xsl');\n}", "updateCustomers(state, payload){\n state.customers = payload;\n }", "function showList() {\n\t\t\t$state.go('cart.list');\n\t\t}", "setCustomersList(state, payload) {\n state.customersList = payload;\n }", "function displayClients() {\n getCensus(parseCensus);\n}", "function directUserFromViewInfo() {\n if (nextStep == \"Departments\") {\n viewDepartments();\n }\n if (nextStep == \"Roles\") {\n viewRoles();\n }\n if (nextStep == \"Employees\") {\n viewEmployees();\n }\n if (nextStep == \"All Information\") {\n viewAll();\n } \n }", "function init (){\n getStates().then(function (){\n if(customerId !== 0){\n var user = localStorageService.get('id');\n customersService.findCustomer(user).then(function (customer){\n vm.customer = customer;\n vm.title = 'Edit';\n vm.buttonText = 'Update';\n }, processError);\n } else {\n customersService.newCustomer().then(function(customer){\n vm.customer = customer;\n });\n }\n \n });\n\n //warn user if he or she is leaving page and did not save changes\n //$on returns a deregistration function that can be called to remove the listener\n onRouteChangeOff = $scope.$on('$locationChangeStart', routeChange);\n \n }", "function refreshPage() {\n vm.overallStats = timelineCalculationService.overallCostTRIEconomie(vm.actions.getByBuildingId( vm.currentBuilding ));\n vm.actionsFiltered = vm.actions.getByIsPlanified( vm.showPlanifiedActions );\n }", "function updateTransferView(customerData) {\n var customer = customerData.customers[0];\n transferSection.find('.glyphicon-customer-id').css(\"display\", \"\");\n transferSection.find('.searchButton').css(\"margin-left\", \"10px\");\n transferSection.find('#cancelReasonDropdown').css(\"display\", \"\");\n transferSection.find('#customerInfoPlaceholder').css(\"display\", \"\").text(\"\");\n if (typeof customer.email !== 'undefined' && customer.email !== null) {\n transferSection.find('#customerInfoPlaceholder').append(customer.name + \"<br>\" + customer.email + \n \"<br>\" + customer.address + \"<br>\" + customer.postNumber + \" \" + customer.postOffice);\n } else {\n transferSection.find('#customerInfoPlaceholder').append(customer.name + \"<br>\" + customer.address + \n \"<br>\" + customer.postNumber + \" \" + customer.postOffice);\n }\n \n }", "getListSiteByCustomer() {\n let self = this, curItem = this.state.curItem, params = {\n id_customer: !Libs.isBlank(this.user) ? this.user.id_user : null\n };\n CustomerViewService.instance.getListSiteByCustomer(params, (data, total_row) => {\n if (Libs.isArrayData(data)) {\n var findItem = Libs.find(data, 'site_default', true);\n if (!Libs.isObjectEmpty(findItem)) {\n curItem = Object.assign(curItem, findItem);\n } else {\n if (!Libs.isObjectEmpty(data[0]) && !Libs.isBlank(data[0].id)) {\n curItem = Object.assign(curItem, data[0]);\n } else {\n curItem = {};\n }\n }\n\n self.setState({ dataListSite: data, curItem: curItem }, () => {\n self.getCustomerViewInfo();\n });\n } else {\n curItem = {};\n self.setState({ dataListSite: [], curItem: curItem });\n }\n })\n }", "function select(customer){\n if (vm.selectedCustomer === customer ) {return;} // no change\n vm.selectedCustomer = customer;\n var id = customer && customer.id;\n if (id && id !== customerState.selectedCustomerId){\n // customer changed, get its orderHeaders and update customerState\n customerState.selectedCustomerId = id;\n getCustomerOrderHeaders(customer);\n }\n }", "function getCustomers() {\n CustomerService.getCustomers()\n .success(function(custs) {\n $scope.gridOpts.data = custs;\n })\n .error(function(error) {\n $scope.status = 'Unable to load customer data: ' + error.message;\n });\n }", "function OrganizationCustomerDetailView() {\n BaseView.apply(this, arguments);\n }", "getListOfCustomers () {\n fetch(this.ROUTING_URL+\"getCustomersList\")\n .then(response=>response.json())\n .then(json=>json.map(c=>[customer(c), false])).then(json=>{\n this.listOfCustomers = json; // assigning json response to list of customer global array.\n const customerListDiv = select(\"customerListView\");\n setAnElementClassToVisible(\"customerListContainer\");//making div visible\n customerListDiv.innerHTML = this.showCustomersResult(); // drawing html table element\n });\n }", "open () {\n return super.open('customer/account/create');\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 }", "function refreshPage() {\n var where = {\n firstParm: 'archived',\n operater: '==',\n secondParm: true\n };\n\n return Q.all([\n datacontext.getEntityList(paymentsList, model.entityNames.customerPayment, false, null, null, 10, null, null, 'customerPaymentID desc'),\n datacontext.getEntityList(customerList, datacontext.entityAddress.customer, false, null, null, 10, null, null, 'customerID desc'),\n datacontext.getEntityList(achievedlist, datacontext.entityAddress.customer, false, null, where, null, null, null, 'customerID desc')]);\n }", "startCreation() {\n CustomerActions.createCustomer(this.state); //**! Place Action Method Here and pass the state of this component */\n }", "function ResetCustomerList() {\n BindOrReloadCustomerTable('Reset');\n}", "function activate() {\n\t\t\tgetEmployees();\n\t\t}", "function printAllAccountInfo(customer) {\n printAccountInfo(customer.accountHolder,\n customer.accountNumber,\n customer.businessName);\n printAddresses(customer.addresses);\n printPhoneNums(customer.phoneNumbers);\n console.log(`Starting Balance: ${customer.startingBalance}`);\n let endBalance = customer.startingBalance;\n for (let amt of customer.transactions.values()) {\n endBalance = endBalance + amt;\n }\n showBalanceStatus(endBalance);\n if (isPreferred(customer)) {\n console.log('Congratulations on being a premier customer!');\n }\n}", "function getCustomers(){\n $scope.customer.action = \"fetchAll\";\n $http.post('/customerActions',$scope.customer).success(function(response){\n if(response == \"fail\"){\n $timeout(function (){\n $scope.isLoading = null; \n }, 2000);\n $scope.user = \"Guest\";\n $scope.isLoading = \"Error in fetching customers!\";\n }\n else if(response == \"connection_error\"){\n // when the service connection was not successful\n $scope.isLoading = \"Error in fetching customers!\";\n swal({title: \"Connection Error!\", text: \"Connection could not be established! Please Refresh\", type: \"error\", confirmButtonText: \"ok\" });\n swal.close();\n }\n else{\n $scope.isLoading = null;\n $scope.customers =response;\n }\n });\n }", "function customersTable(index) {\n var table = getTableByIndex(index);\n customersActiveTable = table.tableid;\n var selectedTable = document.getElementById('selected-table');\n selectedTable.innerHTML = `<h2 class=\"section-header\">Table ${table.tableid}</h2>`;\n}", "function showPurchases() {\n app.getView().render('account/giftregistry/purchases');\n}", "function cartstate(state) {\n /*\n * = redundant and will be replaced / removed \n\n 1 = show cart product details\n 2 = show customer details screen\n 3 = customer detals back*\n 4 = custmer details pay click\n 5 = bitcoin details back click*\n 6 = shipping button clicked\n 7 = check payment result\n 8 = show lightning view\n */\n switch (state) {\n case 1:\n stopPaymentCheck()\n //hide the pay button\n hideClass(document.getElementById('sr-pay'));\n //hide the paid view\n hideClass(document.getElementById('sr-paid'));\n //hide the shipping view\n hideClass(document.getElementById('sr-shipping'));\n //hide the address\n hideClass(document.getElementById('sr-addresswrapper'));\n //hide the check out button\n showClass(document.getElementById('sr-checkout'));\n //hide btc stuff\n hideClass(document.getElementById('sr-bitcoinaddresswrapper'));\n //hide lightning view\n hideClass(document.getElementById('sr-lightningwrapper'));\n //hide the payment toggle, not necessary but may clear up some odd ux flows and costs us nothing. \n hideClass(document.getElementById('sr-choosepaymenttype'));\n //hide the customer details\n hideClass(document.getElementById('sr-customerdetailswrapper'));\n //hide back button\n hideClass(document.getElementById('sr-back-button'));\n //open it\n addClass(document.querySelector('.sr-cart-container'), 'cart-open');\n //show the product details\n showClass(document.getElementById('sr-cartlistitems'));\n break;\n case 2:\n //show the pay button\n showClass(document.getElementById('sr-pay'));\n //check address\n checkAddressState();\n //hide btc stuff\n hideClass(document.getElementById('sr-checkout'));\n //hide the product details\n hideClass(document.getElementById('sr-cartlistitems'));\n //show the customer details\n showClass(document.getElementById('sr-customerdetailswrapper'));\n showClass(document.getElementById('sr-back-button'));\n //hide btc stuff\n hideClass(document.getElementById('sr-bitcoinaddresswrapper'));\n break;\n case 3: //btc address cart mode 0\n //set the amount to pay in the btc address screen\n //hide the pay button\n hideClass(document.getElementById('sr-pay'));\n //hide the product details\n hideClass(document.getElementById('sr-cartlistitems'));\n //show btc stuff \n showClass(document.getElementById('sr-bitcoinaddresswrapper'));\n //hide the customer details \n showClass(document.getElementById('sr-back-button'));\n hideClass(document.getElementById('sr-customerdetailswrapper'));\n checkLightning();\n //call the check payment\n //note in serverless mode we will have to make it move to the payment successful page. \n if (serverless == 0) {\n checkpaymentres = setInterval(startPaymentCheck, 3000)\n }\n break;\n case 4:\n //stop payment timer\n stopPaymentCheck()\n //hide back button\n hideClass(document.getElementById('sr-back-button'));\n //hide payment details\n hideClass(document.getElementById('sr-bitcoinaddresswrapper'))\n //hide lightning view\n hideClass(document.getElementById('sr-lightningwrapper'));\n //hide the payment toggle, not necessary but may clear up some odd ux flows and costs us nothing. \n hideClass(document.getElementById('sr-choosepaymenttype'));\n //show paid screeb\n showClass(document.getElementById('sr-paid'));\n break;\n case 5: //donaton mode (cart mode 2)\n //get the total no product so this is just the amount in the sr button\n carttotal();\n checkLightning();\n //sto the payment checker\n stopPaymentCheck();\n //hide the pay button\n hideClass(document.getElementById('sr-pay'));\n //hide the paid view\n hideClass(document.getElementById('sr-paid'));\n //hide the shiping view\n hideClass(document.getElementById('sr-shipping'));\n //hide the cart header\n hideClass(document.getElementById('sr-cart-header'));\n //hide the customer details\n hideClass(document.getElementById('sr-customerdetailswrapper'));\n //hide back button\n hideClass(document.getElementById('sr-back-button'));\n //hide the product details\n hideClass(document.getElementById('sr-cartlistitems'));\n //hide the check out button\n hideClass(document.getElementById('sr-checkout'));\n //show btc stuff \n showClass(document.getElementById('sr-bitcoinaddresswrapper'));\n //hide lightning view\n hideClass(document.getElementById('sr-lightningwrapper'));\n //open it\n addClass(document.querySelector('.sr-cart-container'), 'cart-open');\n break;\n case 8: //lightning view\n //debug\n //console.log(lightningaddress);\n //set address type to lightning\n addresstype = 1;\n //show lightning view\n showClass(document.getElementById('sr-lightningwrapper'));\n //hide the btc view\n hideClass(document.getElementById('sr-bitcoinaddresswrapper'));\n //start the payment checker again\n if (serverless == 0) {\n checkpaymentres = setInterval(startPaymentCheck, 3000)\n }\n break;\n }\n }", "function goBackCustomer() {\n inquirer.prompt({\n message: \"What would you like to do next?\",\n type: \"list\",\n name: \"action\",\n choices: [\"go back to Customer Portal\", \"proceed to Employee Portal\", \"Exit\"]\n }).then(function (answer) {\n if (answer.action === \"go back to Customer Portal\") {\n customerPortal();\n } else if (answer.action === \"proceed to Employee Portal\") {\n //need to export this\n employeePortal();\n\n } else if (answer.action === \"Exit\") {\n connection.end();\n }\n\n })\n }", "function getCustomers() {\n console.log('8');\n $.get(\"/api/customers\", renderCustomerList);\n }", "produceCustomer(id, vname, vemail, vphone, activated, nbcommand) {\n let key = id;\n // remove all spaces\n vname = vname.trim();\n vemail = vemail.trim();\n vphone = vphone.trim();\n return {\n id: key,\n name: vname,\n email: vemail,\n phone: vphone,\n activated: activated?true:false,\n activatedString: activated?\"Active\":\"Inactive\",\n nbcommand: nbcommand,\n actions: (\n // we've added some custom button actions\n <div className=\"actions-right\">\n {/* use this button to add a edit kind of action */}\n <Button\n onClick={() => {\n let obj = this.state.data.find(o => o.id === key);\n this.editToggle(obj); // Launch the edit modal\n }}\n color=\"warning\"\n size=\"sm\"\n round\n icon\n >\n <i className=\"fa fa-edit\"/>\n </Button>{\" \"}\n {/* use this button to remove the data row */}\n <Button\n onClick={() => {\n var data = this.state.data;\n data.find((o, i) => {\n if (o.id === key) {\n data.splice(i, 1); // Delete from table.\n this.CustomerService.delete(o.id).then(res => {\n var options = {};\n options = {\n place: \"tr\",\n message: \"One customer is deleted.\",\n type: \"info\",\n icon: \"now-ui-icons ui-1_bell-53\",\n autoDismiss: 3\n };\n this.refs.notificationAlert.notificationAlert(options);\n });\n return true;\n }\n return false;\n });\n this.setState({data: data});\n }}\n color=\"danger\"\n size=\"sm\"\n round\n icon\n >\n <i className=\"fa fa-times\"/>\n </Button>{\" \"}\n <Button\n onClick={() => {\n let obj = this.state.data.find(o => o.id === key);\n this.onShow(obj);\n }}\n color=\"info\"\n size=\"sm\"\n round\n icon\n >\n\n <i className=\"fa fa-eye\"/>\n </Button>\n </div>\n )\n };\n }", "function activate() {\n get_product_details();\n }", "function showAll() {\n setAll(true)\n setObtained(false)\n setNotObtained(false)\n setSoft(false)\n setTech(false)\n }", "function manageDataCustomer() {\n $.ajax({\n dataType: 'json',\n url: '/customer/show',\n data:{page:page}\n }).done(function(data){\n manageRow(data.data);\n });\n }", "function getCustomerEditView(data) {\n\treturn {\n\t\tcustomerEditView: {\n\t\t\tname: getPersonNameView(data),\n\t\t\thr: null,\n\t\t\tdiv: 'Address:',\n\t\t\taddress: getAddressEditView(data)\n\t\t}\n\t};\n}", "function menuFetchDefaultCustomer() {\n\tvar isCreditChecked = false;\n\tif (g_currentUser().Role && (g_currentUser().Role.toUpperCase().indexOf('CUST') != -1)) {\n\t\tvar dao = new Dao();\n\t\tdao.fetchCompanies('', function(company) {\n\t\t\tsessionStorage.setItem('currentCompany', JSON.stringify(company));\n\t\t\t if (DaoOptions.getValue('LiveCreditCheckURL') && !isCreditChecked) {\n\t\t\t\t g_fetchAvailableCredit();\n\t\t\t\t isCreditChecked = true;\n\t\t\t }\n\n\t\t});\n\t}\n}", "function showCustomerSale(customerId,product_id){\n $(\".shopInfo\").css(\"display\", \"block\");\n custModule.queryCustomerRecord(customerId,product_id,function(responseData) {\n var httpResponse = JSON.parse(responseData.response);\n if (responseData.ack == 1 && httpResponse.retcode ==200) {\n var retData = httpResponse.retbody;\n $(\"#sale_dt\").html(common.isNotnull(retData.sale_dt) ? retData.sale_dt : '-');\n $(\"#last_sale_price\").html(common.isNotnull(retData.sale_price) ?'¥'+ retData.sale_price : '-');\n $(\"#last_sale_num\").html(common.isNotnull(retData.sale_num) ? retData.sale_num + retData.unit: '-');\n if(retData.sale_price){\n $(\".product_price\").val(retData.sale_price);\n }\n } else {\n $.toast(\"本地网络连接有误\", 2000, 'error');\n }\n });\n }", "function showCostIndexTransDetails(context){\n\tvar costIndexTransId = context.row.getFieldValue(\"cost_tran_recur.cost_index_trans_id\");\n\tif (valueExistsNotEmpty(costIndexTransId)) {\n\t\tvar restriction = new Ab.view.Restriction();\n\t\trestriction.addClause(\"cost_index_trans.cost_index_trans_id\", costIndexTransId, \"=\");\n\t\tView.panels.get(\"abRepmCostLsProfileCostIndexTrans\").refresh(restriction);\n\t\tView.panels.get(\"abRepmCostLsProfileCostIndexTrans\").showInWindow({closeButton: true});\n\t}\n}", "constructor(props) {\n super(props);\n this.state = {\n customer: [],\n //Pagination code begins. Initialising the current page and customer per page values.\n currentPage: 1,\n customerPerPage: 5\n //pagination code ends\n };\n }", "getCustomer(){\n return(\n this.formState ?\n this.storage.getItem('customers', this.customerId) : {}\n )\n }", "function showState() {\n let checkboxes = document.querySelectorAll(UISelectors.checkbox_ADDRESS)\n checkboxes.forEach((checkbox) => {\n checkbox.classList.add('show')\n })\n UISelectors.btn_back.classList.add('show')\n UISelectors.btn_delete.textContent = 'Delete'\n }", "updateCustomer() {\r\n\t\treturn null\r\n\t}", "function viewInv() {\n $('#invoiceTable tr').css('background-color', '');\n\n let updateMessage =\n 'These changes will not be saved, are you sure you want to leave the screen?';\n let createMessage =\n 'This Invoice will not be added, are you sure you want to leave this screen?';\n let displayedMessage;\n\n if (INV_ACTION == 'createInv') displayedMessage = createMessage;\n else displayedMessage = updateMessage;\n\n if (confirm(displayedMessage)) {\n document.getElementById('invoiceInformation').style.width = '100%';\n $('#invoiceCreationZone').hide();\n $('#invoiceDisplay').show();\n $('#returnAccountsReceivable').show();\n }\n\n $('#invoiceCreationZone').find('#percentOrAmountRow').hide();\n\n $('#invoiceCreationZone').find('#invoiceStatusSelectionRow').show();\n}", "function getCust(){ \n if(window.location.href.indexOf(\"customers\") > -1 || window.location.href.indexOf(\"editCustomer\") > -1 || window.location.href.indexOf(\"addCustomer\") > -1){\n $('#loader').show();\n $.getJSON(\"/customers/allCustomers\",\n function(data){\n if(data.length > 0 && typeof(data) != 'undefined'){ \n var table = \"<table class='table table-striped table-hover' id='custTable'>\\n\\\n <thead><tr><th></th>\\n\\\n <th scope='col'>Code</th>\\n\\\n <th scope='col'>Company Name</th>\\n\\\n <th scope='col'>Main Phone</th>\\n\\\n <th scope='col'>Main Email</th>\\n\\\n <th scope='col'>Hosted Pulse</th>\\n\\\n <th scope='col'>PulseStore</th>\\n\\\n <th scope='col'>Stock</th>\\n\\\n <th scope='col'>Date Paid Until</th>\\n\\\n <th scope='col'>On Hold</th>\\n\\\n </tr>\\n\\\n </thead>\\n\\\n <tbody>\"; \n $(data).each(function(key, item){ \n var id = item.custID;\n if(item.OnHold == 1){\n table += \"<tr style='background-color:#d9534f' id='custRow' onclick='editCust(\" + id + \")'>\";\n } else {\n table += \"<tr id='custRow' onclick='editCust(\" + id + \")'>\";\n }\n table += \"<th><input type='checkbox'></th>\";\n table += \"<th>\" + item.CustCode +\"</th>\";\n table += \"<th>\" + item.CustName +\"</th>\";\n table += \"<th>\" + item.MainPhone +\"</th>\";\n table += \"<th>\" + item.MainEmail +\"</th>\";\n if(item.hosted == 1){\n table += \"<th>Yes</th>\"; \n } else {\n table += \"<th>No</th>\"; \n }\n if(item.PulseStore == 1){\n table += \"<th>Yes</th>\";\n } else {\n table += \"<th>No</th>\";\n }\n if(item.StockControl == 1){\n table += \"<th>No</th>\";\n } else {\n table += \"<th>Yes</th>\";\n }\n table += \"<th>\" + item.DatePaidTo +\"</th>\";\n if(item.OnHold == 1){\n table += \"<th>Yes</th>\";\n } else {\n table += \"<th>No</th>\";\n } \n table += \"</tr>\";\n }); \n table += \"</tbody>\";\n table += \"</table>\"; \n $('#custTableDiv').html(table);\n $('#custTable').DataTable(); \n $('#loader').hide();\n }\n \n });\n } \n }", "function showCustomer1(idField, resultRegion) {\r\n\tvar baseAddress = \"find-staff-by-id\";\r\n\tvar data = \"customerID=\" + getValue(idField);\r\n\tvar address = baseAddress + \"?\" + data;\r\n\tajaxResult(address, resultRegion);\r\n}", "function getAllCustomers() {\n return datacontext.get('Product/GetAllCustomers');\n }", "get customersList() {\n\t\treturn this._customersList;\n\t}", "list() {\n return this.iugu.makePagedRequest('GET', '/customers');\n }", "function back() {\n $location.path('/customer');\n }", "onClick(business){\n\t\tBusinessActions.viewBusiness(business.id);\n\t\tNavigationActions.goTo('/businesses/'+business.id)\n\t}", "function updateGrid(result) {\n customersTableView.set_dataSource(result);\n customersTableView.dataBind();\n if (result.length > 0) {\n customersTableView.selectItem(0);\n EMP_ID = result[0][\"EMP_ID\"];\n }\n else {\n EMP_ID = \"\";\n }\n if (customersCommandName == \"Filter\" || customersCommandName == \"Load\") {\n CRM.WebApp.webservice.EmployeeWebService.GetCustomersCount(updateVirtualItemCount);\n }\n //loadOrders();\n}", "getCustomerDetails(id) {\n\t\tconsole.log(\"samplejson/customer\" + id + \".json\");\n\t\taxios.get(\"samplejson/customer\" + id + \".json\").then(response => {\n\t\t\tthis.setState({ CustomerDetails: response });\n\t\t});\n\t}", "function goToChangeManagerHome() {\n $('#main').show();\n $('#navbuttons').hide();\n $('#requestdetails').hide();\n\n // $('#btnFilter').hide();\n // $('#btnResetFilter').hide();\n // $('.nav-tabs a[href=\"#myAssign\"]').tab('show');\n\n\n //refresh the grids\n showChangeRecords();\n showChangeRequests();\n showMyChangeRecords();\n showMyChangeRequests();\n getMyChangeTasks();\n getAllChangeTasks();\n}", "function listCustomers() {\n let customersList;\n db.getAll('customers', (succ, data) => {\n customersList = data;\n });\n\n var tblString = '';\n for (var i = 0; i < customersList.length; i++) {\n tblString += '<tr class=\"main-container\">';\n tblString += '<td>' + customersList[i].name + '</td>';\n tblString += '<td>' + customersList[i].address + '</td>';\n tblString += '<td>' + customersList[i].id + '</td>';\n tblString += '<td><a class=\"btn btn-default\" href=\"#\" id=\"' + customersList[i].id + '\" onclick=\"showCustomerDetails(this)\">Details</a></td>';\n tblString += '</tr>';\n }\n\n document.getElementById('table-customers').innerHTML = tblString;\n}", "function severRefresh(newValue) {\n if (newValue) {\n if (datacontext.updateList().customer()) {\n refreshPage();\n }\n datacontext.completedRefresh();\n }\n }", "function viewFullProfile() {\n history.push('/supported-employees/'+employee.id)\n }", "function loadAsEditAddress() {\n\n var customerInfo = customerAddress.addresses;\n\n $.addressLbl.setText(\"EDIT ADDRESS\");\n\n $.fname.setValue(customerInfo.firstname || \"\");\n $.lname.setValue(customerInfo.lastname || \"\");\n $.phoneNo.setValue(customerInfo.mobile || \"\");\n $.stateLbl.setText(customerInfo.state || \"\");\n $.cityLbl.setText(customerInfo.city || \"\");\n $.addressLine1.setValue(customerInfo.street1 || \"\");\n $.addressLine2.setValue(customerInfo.street2 || \"\");\n $.pinCode.setValue(customerInfo.pincode || \"\");\n\n $.stateLbl.region_id = \"\";\n\n if (customerInfo.state != null) {\n\n // Ti.API.info('customerInfo.state--->' + customerInfo.state);\n\n var regionId = _.where(regionList, {\n \"default_name\" : ((customerInfo.state)).trim(),\n });\n\n //Ti.API.info('default_name--->' + JSON.stringify(regionId));\n\n if (regionId.length != 0) {\n //Ti.API.info('********** region_id *************' +regionId[0].region_id +\"\\t \" + JSON.stringify(regionId[0].region_id));\n \n $.stateLbl.region_id = ((regionId[0].region_id) || \"\");\n $.stateLbl.setText((regionId[0].default_name).toUpperCase());\n $.stateLbl.default_name = regionId[0].default_name;\n }\n\n }\n\n _.each(regionList, function(value, k) {\n if (value.default_name === customerInfo.state) {\n setCity(value.city);\n }\n });\n\n}", "findAllCustomer() {\n\n axios.get(\"http://localhost:9000/api/viewallcustomers\")\n .then(response => response.data)\n .then((data) => {\n this.setState({ customer: data });\n });\n }", "function goToCustomerEditPage() {\n $('#name').val(window.customerRecord.item.object.name);\n $('#location_number').val(window.customerRecord.item.object.location_number);\n $('#address').val(window.customerRecord.item.object.address);\n $('#city').val(window.customerRecord.item.object.city);\n $('#state').val(window.customerRecord.item.object.state);\n $('#zip').val(window.customerRecord.item.object.zip);\n $('#fax').val(window.customerRecord.item.object.fax);\n $('#contact').val(window.customerRecord.item.object.contact);\n $('#phone').val(window.customerRecord.item.object.phone);\n $('#email').val(window.customerRecord.item.object.email);\n $('textarea#cus_internal_notes').val(window.customerRecord.item.object.internal_notes);\n $('#customer_id').val(window.customerRecord.item.object.id);\n }", "fetchCustomers() {\r\n return Api().get('/customers')\r\n }", "function getStateEnrollment(state) {\n var record = getEnrollmentData(state);\n displayEnrollmentResult(record);\n}", "render() {\n // const [{basket}] = this.context;\n // console.log({basket});\n const { customerList, isLoading } = this.state;\n return isLoading ?\n (\n <LoadingBar />\n ) : ( \n <div className=\"homePage\">\n <div className=\"home_flex_row\">\n { typeof(customerList) === 'undefined' ? <p>No result</p> : customerList.map(customer => {\n return (\n <div className=\"product\" id={customer.id}>\n <div className=\"product_info\">\n <p><b>{customer.firstName}</b></p>\n <p><b>{customer.lastName}</b></p>\n <p>{customer.email}</p>\n <p>{customer.address}</p>\n </div>\n <button><Link to={`/admin/managercustomers/viewOrders/${customer.id}`}>View Customer Orders</Link></button>\n \n </div>\n )\n })\n }\n \n \n </div>\n\n </div>\n );\n }", "function loadCustomers() {\n $.ajax({\n url: \"/Customers\",\n type:\"GET\"\n }).done(function (resp) {\n self.Customers(resp);\n }).error(function (err) {\n self.ErrorMessage(\"Error!!!!\" + err.status);\n });\n }", "function showList() {\n\t\t\t$state.go('^');\n\t\t}", "function showList() {\n\t\t\t$state.go('^');\n\t\t}", "function ReturningCustomer() {\n document.getElementById('ReturningCustomer').style.display = 'block';\n document.getElementById('ReturningButton').style.display = 'none'; \n document.getElementById('RegisterButton').style.display = 'none'; \n}", "function showDoctorEditDisplay()\n {\n $scope.reset();\n staffControllerVM.isVisibleDoctorEditDisplay = true;\n staffControllerVM.isVisibleDoctorEdit = false;\n\n }", "function displayStatus() {\n Reddcoin.messenger.getconnectionState(function(data){\n Reddcoin.viewWalletStatus.getView(data);\n\n Reddcoin.messenger.getReleaseVersion( function(data) {\n Reddcoin.viewWalletStatus.getView(data);\n });\n });\n}", "function openEditUser() {\n routingBase.goToCurrentState('userDetails');\n }", "function navigateToReviewOrder(){\n document.getElementById('checkoutBillingInfo').style.display = 'none';\n document.getElementById('checkoutReview').style.display = 'flex';\n}", "function updateCustomer() {\n var cust = $scope.customer;\n\n CustomerService.save(cust)\n .success(function() {\n $location.path('/customer');\n $scope.status = 'Updated Customer! Refreshing customer list.';\n })\n .error(function(error) {\n $scope.status = 'Unable to update customer: ' + error.message;\n });\n }", "function viewInv() {\n\t\n\tlet updateMessage = \"These changes will not be saved, are you sure you want to leave the screen?\";\n\tlet createMessage = \"This Invoice will not be added, are you sure you want to leave this screen?\";\n\tlet displayedMessage;\n\t\n\tif(INV_ACTION == \"createInv\")\n\t\tdisplayedMessage = createMessage;\n\telse \n\t\tdisplayedMessage = updateMessage;\n\t\n\tif(confirm(displayedMessage))\n\t{\n\t\t//document.getElementById('invoiceInformation').style.width = \"100%\";\n\t\t$('#invoiceCreationZone').hide();\n\t\t$('#invoiceDisplay').show();\n\t\t//$('#returnAccountsReceivable').show();\n\t}\n\t\n\t$('#invoiceCreationZone').find('#percentOrAmountRow').hide();\n\t\n\t$('#invoiceCreationZone').find('#invoiceStatusSelectionRow').show();\n}", "toggleViewAllEmployeeTable(){\n\n if(this.viewAllEmployeeTable == false){\n this.viewAllEmployeeTable =true;\n }else {\n this.viewAllEmployeeTable = false;\n }\n\n }", "function generateCustomerList(){\n var customerData = JSON.parse(sessionStorage.getItem(\"customerInfo\"))\n document.getElementById('custList').innerHTML += '<a href=\"./itemSelect.html\" class=\"list-group-item list-group-item-action pText p-4 background\" >' + customerData.firstName + \" \" + customerData.lastName + '</a>'\n}", "function viewBackFromOther() {\n\tlogInfo('Back send info user approve');\n}", "_onCustomerSearch() {\n EventEmitter.on(eventMap.customerSearched, (response) => {\n this.activeSearchRequest = null;\n this.customerRenderer.hideSearchingCustomers();\n\n if (response.customers.length === 0) {\n EventEmitter.emit(eventMap.customersNotFound);\n\n return;\n }\n\n this.customerRenderer.renderSearchResults(response.customers);\n });\n }", "getCustomerList() {\n axios.get('http://localhost:3001/customers')\n .then((response) => {\n this.setState({\n customers: response.data\n });\n })\n .catch((error) => {\n console.log(error);\n })\n }", "function goToState(stateObj) {\n\t$(\"#usa\").hide(delay);\n\t$(\"#back_button\").show(delay);\n\t$(\"#stateBox\").val(stateObj.attr(\"title\"));\n\t$(\"#map_div\").append(\"<br class='state'><img class='state' src='img/state/\" + stateObj.attr(\"alt\") + \".gif'></img>\");\n\t$(\"#stateBox, #statePara\").hide(delay);\n\tgetCountiesForState(stateObj.attr(\"title\"));\n\t$(\"#countyBox\").prop('disabled', false);\n\t$(\"#raceBox\").prop('disabled', false);\n\t$(\"#genderBox\").prop('disabled', false);\n\t$(\"#ageBox\").prop('disabled', false);\n}", "goToConfirmationPage() {\n if (\n this.orderInformation.fromDate &&\n this.orderInformation.toDate &&\n this.activeCustomer &&\n this.orderInformation.dropoffLocation &&\n this.orderInformation.pickupLocation\n ) {\n this.order = [];\n this.order.push(this.bike, this.equipment, this.orderInformation);\n this.props.sendStateToParent([this.order, this.activeCustomer]);\n }\n }", "function showOrder(){\r\n var path=\"/orders/\";\r\n orderOperations.newSearch(callBackForOrder,path);\r\n}", "function getAndDisplayBusinessData() {\n\tgetBusinessData(displayBusinessData);\n\n}", "function GetFlightULDSTACKDetails() {\n ShowIndexView(\"divStackDetail\", \"Services/FlightControl/FlightControlService.svc/GetFlightTransGridData/FLIGHTCONTROL/FlightControl/ULDSTACK/\" + CurrentFlightSno + \"/STACK\");\n}", "_onCustomerSelect() {\n EventEmitter.on(eventMap.customerSelected, (event) => {\n const $chooseBtn = $(event.currentTarget);\n this.customerId = $chooseBtn.data('customer-id');\n\n const createAddressUrl = this.router.generate(\n 'admin_addresses_create',\n {\n 'liteDisplaying': 1,\n 'submitFormAjax': 1,\n 'id_customer': this.customerId,\n }\n );\n $(createOrderMap.addressAddBtn).attr('href', createAddressUrl);\n\n this.customerRenderer.displaySelectedCustomerBlock($chooseBtn);\n });\n }", "function processRestoreCumulativeView() \n{ \n\n\tif (currentPage == \"Campus\"){generateSummaryfromEntireDateSelection();}\n\telse{generateZoneSummaryfromEntireDateSelection();}\n\t\n}", "function getAllCases(){\n // console.log(\"https://kea-alt-del.dk/customersupport/\"\");\n fetch(\"https://kea-alt-del.dk/customersupport/\")\n .then(res=>res.json())\n .then(show)\n \n }", "function viewDeptSales() {\n salesByDept();\n}", "function getCustomer(id) {\n if (id === 'new') {\n $scope.customer = {};\n } else {\n CustomerService.getCustomer(id).success(function(cust) {\n $scope.customer = cust;\n }).error(function() {\n $location.path('/customer');\n });\n }\n\n }", "function getProdCustRebates(prodId, custId) {\n $scope.appliedRebates = Rebate.getAppliedRebate({prod: 'product', cust: 'customer', pid: prodId, cid: custId});\n $scope.rebatePrices = Rebate.getAppliedRebate({price: 'price', prod: 'product', cust: 'customer', pid: prodId, cid: custId});\n }", "function init() {\n $scope.customers = customersService.getCustomers();\n }", "function getCustomer() {\n return customer;\n }", "backToSearchUser() {\n\n this.setState({\n\n find: null,\n using: \"fullName\",\n role: \"student\",\n searchCriteria: \"containsSearchCriteria\",\n status: null,\n erorrs: null,\n success: null,\n userdata: null,\n redirectSearchUserToUsers: false,\n searchText: \"\",\n\n searchUsersView: true,\n usersView: false,\n\n chosenSearchValue: null,\n\n dataSource: [],\n\n searchBarResponse: null,\n\n userDetails: null,\n\n studentDetails: null,\n\n // Action type for deciding where to redirect\n // Redirect to AddFee page if 'actionTypeForSearchUser' is 'RedirectToAddFee' (which means searchUser request is coming from AddFee page)\n actionTypeForSearchUser: null\n });\n }" ]
[ "0.674723", "0.63421756", "0.63407016", "0.62649995", "0.61854523", "0.59932137", "0.5991928", "0.58703834", "0.5868765", "0.57848847", "0.57763255", "0.57411873", "0.5737792", "0.5700536", "0.5678702", "0.56628174", "0.5587754", "0.5583161", "0.55756086", "0.5559265", "0.55566764", "0.5530741", "0.55131865", "0.54857475", "0.5454955", "0.5450464", "0.5416899", "0.54063815", "0.5404841", "0.53994596", "0.5393389", "0.53850263", "0.538468", "0.537195", "0.5369977", "0.53606427", "0.53304285", "0.53138435", "0.528313", "0.5278669", "0.52724624", "0.5267933", "0.5256921", "0.5253852", "0.5249582", "0.5240378", "0.52375114", "0.5227651", "0.5227275", "0.5225698", "0.5224261", "0.5220284", "0.52167654", "0.52133083", "0.52015835", "0.52008754", "0.519442", "0.51902574", "0.5189772", "0.5185521", "0.5180744", "0.51793975", "0.5172445", "0.51721865", "0.51695967", "0.5167191", "0.5162226", "0.5158091", "0.5148086", "0.51462376", "0.51442975", "0.51423645", "0.51381177", "0.51381177", "0.51356363", "0.51265204", "0.5122408", "0.5121725", "0.51159644", "0.51119155", "0.51109695", "0.51039785", "0.5102937", "0.5099372", "0.50984615", "0.50965995", "0.50953025", "0.5082905", "0.50719124", "0.50697833", "0.50663495", "0.5062996", "0.5062542", "0.50615877", "0.506003", "0.5050158", "0.50496995", "0.5045085", "0.50437963", "0.5042794" ]
0.56434107
16
saves th customer to the localstorage and rettturns customer overview state
_saveCustomer(){ if (Object.keys(this.customer).length === 7) { this.storage.setData('customers', this.customer, this.formState); this._cancel(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getCustomer(){\n return(\n this.formState ?\n this.storage.getItem('customers', this.customerId) : {}\n )\n }", "function CustomerLocal(customer){\n localStorage.clear();\n localStorage.setItem(\"customerId\", parseInt(customer.id));\n localStorage.setItem(\"customerEmail\", customer.email);\n if(customer.id == 1){\n window.location.href = \"ManagerProduct.html\";\n }\n else {\n window.location.href = \"CustomerIndex.html\";\n }\n}", "saveData(){\n\t\t\t\tlocalStorage.clear();\n\t\t\t\tlet postData = {\n\t\t\t\t\t\t\t\t\t invoice: {\n\t\t\t\t\t\t\t\t\t customers: [\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t name: this.state.name,\n\t\t\t\t\t\t\t\t\t email: this.state.email,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdate: window.selectedDate,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tamountTotal: this.state.amountTotal.toFixed(2),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlineItems: this.state.lineItemsArray\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t ]\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t};\n\t\t\t\tlocalStorage.setItem('storeData', JSON.stringify(postData));\n\t\t\t\tnotify.show(\"Invoice successfully saved/sent\", \"success\", 2000,\"#0E1717\");\n\t\t\t\twindow.setTimeout(function(){location.reload()},1000)\n\t\t}", "function on_customer_save() {\n var username = $(\"#widget-customers-manage input#username\").val();\n var selected_type = $(\"#user_type option:selected\").val();\n afrimesh.customers.generate(username, selected_type, 0, function(error, result) {\n console.debug(\"Inserted: \" + dump_object(result[0]));\n $(\"ul#menu ul#customers li#manage\").click();\n });\n }", "function saveCustomerData(form){\n // pick the data from the inputs\n let first = $(\"input[name=first]\").val();\n let email = $(\"input[name=email]\").val();\n let products = $(\"select[name=products]\").val();\n let quantity = $(\"input[name=quantity]\").val();\n\n // store the data in the object\n let CustomerData = {\n first: first,\n\t\temail: email,\n products:products,\n quantity:quantity\n\t};\n console.log(CustomerData);\n //stroing all the input in the local variable\n\tlocalStorage[\"CustomerData\"]=JSON.stringify(CustomerData);\n form.submit();\n}", "function finish() {\n const customer = {\n fullName: fullName.value,\n identifyCard: identifyCard.value,\n birthday: birthday.value,\n email: email.value,\n address: address.value,\n customerType: customerType.value,\n discount: discount.value,\n quantityInclude: quantityInclude.value,\n rentDays: rentDays.value,\n typeOfService: typeOfService.value,\n typeOfRoom: typeOfRoom.value,\n totalPay: totalPay.innerHTML,\n };\n customers.push(customer);\n console.log(customers);\n displayCustomer();\n editData();\n}", "function storingBottlesaAndState(){\n\n\t\tvar purchaseDetails = {\n\t\t\t\n\t\t\tbottleTotal: quantitySelected(),\n\t\t\tstateChosen: document.getElementById(\"selectStateOption\").value\n\t\t};\n\t\t\n\t\tvar json = JSON.stringify(purchaseDetails);\n\t\tlocalStorage.setItem(\"purchaseDetails\", json);\n\t} // End localStorage ", "function storeCityInfo() {\n localStorage.setItem('cities', JSON.stringify(cities));\n }", "_save() {\n if (this.store && localStorage) {\n localStorage.setItem(this.store, JSON.stringify(this.records));\n }\n }", "function storeOpportunityDetails(opportunityObj){\n\tlocalStorage.konyOpportunityDetails = opportunityObj; //storing the corresponding opportunity details in localstorage\n\tchangePage('opportunitydetailspage','');\n}", "function save() {\n localStorage.productData = JSON.stringify(Product.allProducts);\n localStorage.totalCounter = totalCounter;\n}", "function storeCurrentCity() {\n\n localStorage.setItem(\"currentCity\", JSON.stringify(cityname));\n}", "function saveCity() {\n localStorage.setItem(\"lscity\", JSON.stringify(cities));\n }", "function storeCities(){\n localStorage.setItem(\"savedCity\", JSON.stringify(savedCity));\n }", "function updateCustomer() {\n var cust = $scope.customer;\n\n CustomerService.save(cust)\n .success(function() {\n $location.path('/customer');\n $scope.status = 'Updated Customer! Refreshing customer list.';\n })\n .error(function(error) {\n $scope.status = 'Unable to update customer: ' + error.message;\n });\n }", "updateCustomer() {\r\n\t\treturn null\r\n\t}", "function saveManageBusinessFields() {\n // Save business details in local Storage\n var businessName = document.getElementById('businessName').value;\n if (businessName != null) {\n localStorage.setItem('businessName', businessName);\n }\n\n var businessPhone = document.getElementById('businessPhone').value;\n if (businessPhone != null) {\n localStorage.setItem('businessPhone', businessPhone);\n }\n\n var businessAddress = document.getElementById('set-address').value;\n if (businessAddress != null) {\n localStorage.setItem('businessAddress', businessAddress);\n }\n}", "updateCustomers(state, payload){\n state.customers = payload;\n }", "function viewcustomer(a) {\n $(\".inventorydisp .unactivate\").toggleClass(\"deactivate unactivate\");\n $(\"#customer-list .deactivate\").toggleClass(\"deactivate\");\n /*$(\".customerdisp .unactivate\").toggleClass(\"deactivate\")*/\n $(\"li.actparent\").toggleClass(\"actparent\");\n if ($(\".inventorydisp .tab1\").css(\"display\") == \"none\") {\n $(\".inventorydisp .tab1\").toggle();\n $(\".inventorydisp .tab2\").toggle();\n }\n $(\".customer_name.act\").toggleClass(\"act\");\n //name = $(\".username.act\").html()\n $(a).find(\".customer_name\").toggleClass(\"act\");\n $(a).toggleClass(\"actparent\");\n name = $(\".customer_name.act\").html();\n console.log(name);\n $(\".customername\").text(name);\n $(\"#customerhistorypane\").css(\"opacity\", \"0\");\n dbOperations(\"inventory\", \"select_operation\", [\"customerinvoice\", \"customer\", String($(\".customername\").html())]);\n check_for_active_row(\"customer_name\", \"inventory\");\n $(\"#customerhistorypane\").animate({\n opacity: 1\n });\n}", "function saveState() {\n const state = {\n cf: cfSelect.value,\n gf: gfSelect.value,\n mf: mfSelect.value,\n am: amSelect.value,\n };\n localStorage.setItem('collecting_together_form', JSON.stringify(state));\n }", "saveToStorage() {\r\n localStorage.setItem('accountList', JSON.stringify(this._accountList));\r\n localStorage.setItem('settings', JSON.stringify(this._settings));\r\n localStorage.setItem('lastAssignedID', JSON.stringify(this._lastAssignedID));\r\n }", "function updateStudent() {\n studentString = JSON.stringify(Student.all);\n localStorage.setItem(\"studentinfo\", studentString);\n}", "function savCities() {\n localStorage.setItem(\"saveCity\", JSON.stringify(cities));\n }", "function updateLocalStorage() {\r\n localStorage.setItem('transactions', JSON.stringify(transactions));\r\n}", "function storeCases()\n{\n localStorage.setItem('caseList', JSON.stringify(caseList));\n}", "function updateTransferView(customerData) {\n var customer = customerData.customers[0];\n transferSection.find('.glyphicon-customer-id').css(\"display\", \"\");\n transferSection.find('.searchButton').css(\"margin-left\", \"10px\");\n transferSection.find('#cancelReasonDropdown').css(\"display\", \"\");\n transferSection.find('#customerInfoPlaceholder').css(\"display\", \"\").text(\"\");\n if (typeof customer.email !== 'undefined' && customer.email !== null) {\n transferSection.find('#customerInfoPlaceholder').append(customer.name + \"<br>\" + customer.email + \n \"<br>\" + customer.address + \"<br>\" + customer.postNumber + \" \" + customer.postOffice);\n } else {\n transferSection.find('#customerInfoPlaceholder').append(customer.name + \"<br>\" + customer.address + \n \"<br>\" + customer.postNumber + \" \" + customer.postOffice);\n }\n \n }", "function storeOpportunityDetails(opportunityObj){\n\tlocalStorage.konyOpportunityDetails = JSON.stringify(opportunityObj); //storing the corresponding opportunity details in localstorage\n\twindow.location.href = \"opportunityDetails.html\"; //redirecting to details page\n}", "function updateLocalStorage(){\n localStorage.setItem('transactions',JSON.stringify(transactions));\n}", "function storeCities(){\n localStorage.setItem(\"cities\", JSON.stringify(cities)); \n}", "_commit() {\n localStorage.setItem('degree_plan', JSON.stringify(this.store));\n }", "function saveCustomers(customerId){ \n $scope.editCustomerValues = {\n \"action\": \"edit\",\n \"cAddress\": $scope.customer.customerAddress,\n \"cContact\": $scope.customer.customerContact,\n \"cDOB\": $scope.customer.customerDOB,\n \"cEmail\": $scope.customer.customerEmail,\n \"cID\":customerId,\n \"cName\":$scope.customer.customerName\n };\n $scope.customer.action = \"edit\";\n $http.post('/customerActions',$scope.editCustomerValues).success(function(response){\n if(response == '\"fail\"' || response == '\"junk data\"'){\n swal({title: \"Not edited!\", text: \"Please retry\", type: \"error\", confirmButtonText: \"ok\" });\n }\n else if(response == '\"connection_error\"'){\n $scope.isLoading = null;\n swal({title: \"Connection Error!\", text: \"Connection could not be established\", type: \"error\", confirmButtonText: \"ok\" });\n }\n else{\n for (var i = 0; i < $scope.customers.length; i++){\n if ($scope.customers[i].Id == customerId){\n $scope.customers[i].Name = $scope.customerName;\n $scope.customers[i].City = $scope.customerCity;\n }\n }\n $scope.onEdit = null;\n }\n });\n }", "function updateLocalStorage() {\n\tlocalStorage.setItem(\"transactions\", JSON.stringify(transactions));\n}", "function saveCities(){\n localStorage.setItem(\"currentCity\", JSON.stringify(city));\n localStorage.setItem(\"citiesList\", JSON.stringify(cityList));\n}", "function storeCities() {\n localStorage.setItem(\"cities\", JSON.stringify(cities));\n }", "function saveState(loan) {\n localStorage['loan'] = JSON.stringify(loan)\n localStorage['mode'] = getCalcMode()\n}", "function storeCity() {\n localStorage.setItem(\"stored\", JSON.stringify(recentCities));\n}", "function updateCountryStorage() {\n localStorage.setItem(\"countries\", JSON.stringify(countries));\n }", "function updateLocalStorage() {\n localStorage.setItem('transactions', JSON.stringify(transactions));\n}", "function customerInfo() {\n let currentCustomer = vm.customers[vm.currentIndices.customer];\n let customerInfoElement = document.getElementById(\"CUSTOMER_INFO\").children;\n customerInfoElement[1].innerText = currentCustomer.name;\n customerInfoElement[4].innerText = currentCustomer.age;\n customerInfoElement[7].innerText = currentCustomer.email;\n customerInfoElement[10].innerText = currentCustomer.phone;\n customerInfoElement[13].innerText = currentCustomer.address;\n customerInfoElement[16].innerText = currentCustomer.registered;\n customerInfoElement[19].innerText = currentCustomer.about;\n }", "backup_to_local_storage(){\n window.localStorage.setItem('vue-mini-shop', JSON.stringify(this.get_all()))\n }", "function storage() {\n let string = JSON.stringify(Product.allProduct);\n localStorage.setItem('product', string)\n\n}", "function setChosenCityLS() {\n localStorage.setItem(\"chosenCity\", JSON.stringify(chosenCity));\n}", "function getCustomer() {\n return customer;\n }", "function saveWallet() {\n localStorage.setItem(\"currentWallet\", JSON.stringify(currentWallet));\n}", "getCustomerData() {\n const newCustomer = {\n id: $.uuid(),\n name: customerNameInput.val(),\n phone: customerPhoneInput.val(),\n address: customerAddressInput.val(),\n district: customerDistrictInput.val(),\n note: {\n note: customerNoteInput.val(),\n caution: customerCautionInput.val()\n },\n debt: {\n installment: installmentDebtInput.val() === '' ? 0 : parseInt(installmentDebtInput.val()),\n overlapping: overlappingDebtInput.val() === '' ? 0 : parseInt(overlappingDebtInput.val()),\n old: oldDebtInput.val() === '' ? 0 : parseInt(oldDebtInput.val()),\n new: newDebtInput.val() === '' ? 0 : parseInt(newDebtInput.val())\n }\n }\n return newCustomer\n }", "function storeIdName(data) {\n localStorage.setItem(\"orderNumber\", data.orderId);\n localStorage.setItem(\"UserName\", data.contact.firstName);\n window.location.href = \"./order.html\";\n }", "function stateSaveCallback(settings, data) {\n var stado = $('#GIbuscarIdeaInnovadora').DataTable().state();\n localStorage.setItem('GIbuscarIdeaInnovadora' + window.location.pathname, JSON.stringify(stado))\n }", "function saveCurrentWeatherDataToLocalDb() {\n localStorage.setItem(currentWeather.city + \"_curr\", JSON.stringify(currentWeather))\n}", "function store(){\n var inputFirstName= document.getElementById(\"first_name\");\n var inputLastName= document.getElementById(\"last_name\");\n var inputAddress= document.getElementById(\"address\");\n var inputCity= document.getElementById(\"city\");\n var inputState= document.getElementById(\"state\");\n var inputZipcode= document.getElementById(\"zipcode\");\n localStorage.setItem(\"first_name\", inputFirstName.value);\n localStorage.setItem(\"last_name\", inputLastName.value);\n localStorage.setItem(\"address\", inputAddress.value);\n localStorage.setItem(\"city\", inputCity.value);\n localStorage.setItem(\"state\", inputState.value);\n localStorage.setItem(\"zipcode\", inputZipcode.value);\n \n console.log(inputFirstName.value, inputLastName.value, inputAddress.value, inputCity.value, inputState.value, inputZipcode.value);\n }", "save() {\n localStorage.setItem(\"state\", this.getStateString());\n if (this.debug) {\n console.log(\"state saved\");\n console.log(this.state);\n }\n }", "function saveNominations(){\n localStorage.clear();\n // if there's no nominations, don't bother saving\n if(nominationState.nominations.length === 0){\n return;\n }\n var storage = JSON.stringify(nominationState.nominations);\n localStorage.setItem(\"Shoppies\", storage);\n }", "function saveCustomer(customerObj, options) {\n return datacontext.post('Customer/SaveCustomer/', customerObj, options);\n }", "async writeToStorage() {\r\n const fetchedInfo = {\r\n fetchedUsername: this.state.fetchedUsername,\r\n fetchedPassword: this.state.fetchedPassword,\r\n };\r\n\r\n //Save the user info\r\n localStorage.setItem(\"fetchedInfo\", JSON.stringify(fetchedInfo));\r\n }", "function setProfileFromLS() {\n if (\n localStorage.getItem('customer') != null &&\n localStorage.getItem('customer') != 'undefined'\n ) {\n let localST = JSON.parse(localStorage.getItem('customer'))\n $('#validationCustom01').val(localST.firstName)\n $('#validationCustom02').val(localST.lastName)\n $('#validationCustom03').val(localST.email)\n $('#validationCustom04').val('*************')\n $('#validationCustom05').val(localST.number)\n $('#validationCustom06').val(localST.address.street)\n $('#validationCustom07').val(localST.address.city)\n $('#validationCustom08').val(localST.address.zipcode)\n $('#welcomeText').text('Hej ' + localST.firstName + ' ' + localST.lastName)\n $('#welcomeEmail').text(localST.email)\n }\n}", "function storeLocal() {\n const jsonUserData = JSON.stringify(userData);\n localStorage.setItem('fullname', jsonUserData);\n}", "function storeCustomer(param){\n return CustomerResource.save(param).$promise;\n }", "function storeCities() {\n localStorage.setItem(\"city\", JSON.stringify(previousCities));\n}", "updateRecords() {\r\n\t\tlocalStorage.setItem( this.type, JSON.stringify(this.data) );\r\n\t}", "function savingInLocalStorage() {\n\n\n //1.get all the calaculated data from the BudgetController:\n let sendDataToLocalStorage = budgetCtrl.getAllData();\n\n //2.send data to UIcontroller for storing it in local storage:\n document.querySelector(DOMClassNames.savingData).addEventListener('click', () => {\n\n //update the data to be sent:\n if (input && input.description !== '' && !isNaN(input.value) && input.value > 0) {\n\n sendDataToLocalStorage.total_income = budget.totalInc;\n sendDataToLocalStorage.total_expenditure = budget.totalExp\n sendDataToLocalStorage.final_budget = budget.budget;\n sendDataToLocalStorage.percentage = budget.percentage;\n\n UIctrl.saving(sendDataToLocalStorage);\n }\n })\n\n }", "function onCustomerSaveComplete(response, status)\n{\n\t\tif (status == \"success\")\n\t\t{\n\t\t\t\tvar resultSet = JSON.parse(response);\n\t\t\t\t\n\t\t\t\tif (resultSet.status.trim() == \"success\")\n\t\t\t\t{\n\t\t\t\t\t$(\"#alertSuccess\").text(\"Successfully saved.\");\n\t\t\t\t\t$(\"#alertSuccess\").show();\n\t\t\t\t\t$(\"#divCustomerGrid\").html(resultSet.data);\n\t\t\t\t} else if (resultSet.status.trim() == \"error\")\n\t\t\t\t{\n\t\t\t\t\t$(\"#alertError\").text(resultSet.data);\n\t\t\t\t\t$(\"#alertError\").show();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else if (status == \"error\")\n\t\t\t{\n\t\t\t\t$(\"#alertError\").text(\"Error while saving customer.\");\n\t\t\t\t$(\"#alertError\").show();\n\t\t\t} else\n\t\t\t{\n\t\t\t\t$(\"#alertError\").text(\"Unknown error while saving the customer\");\n\t\t\t\t$(\"#alertError\").show();\n\t\t\t}\n\t\t\t$(\"#hidCustomerID\").val(\"\");\n\t\t\t$(\"#formCustomer\")[0].reset();\n}", "function storeState() {\n\n localStorage.setItem(STORAGE_KEY, JSON.stringify(data));\n }", "saveToLocalStorage() {\n\t\t\tvar json = JSON.stringify(angular.copy(this.items));\n\t\t\tlocalStorage.setItem(\"cart\", json);\n\t\t}", "function saveAcc() {\n localStorage.setItem(\"accounts\", JSON.stringify(accounts));\n if (localStorage.getItem(\"loginUser\")) {\n curAcc = accounts.find(findCurUser);\n localStorage.setItem(\"loginUser\", JSON.stringify(curAcc));\n }\n}", "save() {\n localStorage.setItem(this.localStorage_key, JSON.stringify(this.collection));\n }", "static saveAccount (obj) {\n const array = accounts === undefined ? [] : accounts\n array.push(obj)\n localStorage.set('cashaccounts', array)\n }", "function save() {\n localStorage && localStorage.setItem(key, Y.JSON.stringify(data));\n }", "setCustomersList(state, payload) {\n state.customersList = payload;\n }", "function storeCities(){\n localStorage.setItem(\"cities\", JSON.stringify(citiesArray));\n }", "saveData() {\n window.localStorage.setItem(\"HVACData\", JSON.stringify(this.hvacData.getHashmap()));\n }", "function createLocalStorage(){\n\n let convertS= JSON.stringify(Busmall.allBus);\n // console.log(convertS);\n localStorage.setItem('myProducts', convertS);\n\n}", "function saveInformation () {\n\t\t numOfCreditFun();\n\t\t bestMthContFun();\n\t\t var info = {};\n\t\t \tinfo.major = [\"Major Choice:\", $('#departments').val()];\n\t\t info.cName = [\"Course Name:\", $('#courseName').val()];\n\t\t info.cSection = [\"Course Section:\", $('#courseSection').val()];\n\t\t info.topicAndSec = [\"Topic and Section:\", $('#topicAndSection').val()];\n\t\t info.todaysDate = [\"Today's Date:\", $('#todaysDate').val];\n\t\t info.dueDate = [\"Due Date:\", $('#dueDate').val()];\n\t\t info.weeksOfClass = [\"Is the Class on Campus or Online:\", $('#weeksOfClass').val()];\n\t\t info.slideValue = [\"Due Date:\", $('#weeksOfClass').val()];\n\t\t info.courseNumCredits = [\"Number of Credits:\", numOfCreditFun];\n\t\t info.teacherName = [\"Teacher Name:\", $('#teacherName').val()];\n\t\t info.teacherEmail = [\"Teacher Email:\", $('#teacherEmail').val()];\n\t\t info.teacherPhone = [\"Teacher Phone:\", $('#teacherPhone').val()];\n\t\t info.bestMthCont = [\"Best Method To Get In Contact:\", bestMthContFun];\n\t\t info.note = [\"Note Section:\", $('#noteSection').val()];\n\t\t //localStorage.setItem(id, JSON.stringify(info));\n\t\t couchDBSave(info);\n\t\t}", "function saveUsers(){\n $(\"#create-account\").css(\"display\",\"none\");\n var str = JSON.stringify(users);\n console.log(str);\n localStorage.setItem(\"users\", str);\n}", "function saveUsers(){\n $(\"#create-account\").css(\"display\",\"none\");\n var str = JSON.stringify(users);\n console.log(str);\n localStorage.setItem(\"users\", str);\n}", "saveAllData(){\n localStorage.setItem(CYCLING_LS, JSON.stringify(this.allUserData))\n localStorage.setItem(CYCLING_TM, JSON.stringify(this.timestampData)) \n }", "function storeLookupCity() {\n\n localStorage.setItem(\"SearchedCity\", JSON.stringify(searchedCity));\n}", "function save() {\n localStorage.setItem(\"toys\", toys);\n localStorage.setItem(\"click\", mClickUpgrade.amount);\n localStorage.setItem(\"autoClicker\", mAutoClicker.amount);\n localStorage.setItem(\"multiplier\", mMultiplier.amount);\n localStorage.setItem(\"toyShop\", mToyShop.amount);\n localStorage.setItem(\"toyFactory\", mToyFactory.amount);\n localStorage.setItem(\"hiddenToyLayer\", mHiddenToyLayer.amount);\n}", "function saveContacts() {\n window.localStorage.setItem('contacts', JSON.stringify(contacts))\n sortContacts(sortType)\n drawContacts()\n}", "function SaveItem() {\n\t\t\t\n\tvar name = document.forms.ShoppingList.name.value;\n\tvar data = document.forms.ShoppingList.data.value;\n\twindow.localStorage.setItem(name,data);\n\tdoShowAll();\n\t\n}", "function save(){\n\t const checkbox = document.getElementById('emailNotification');\n\t localStorage.setItem('emailNotification', checkbox.checked);\n\t const checkbox2 = document.getElementById('publicProfile');\n\t localStorage.setItem('publicProfile', checkbox2.checked);\n\t const timeLocation = document.getElementById('timezone');\n\t localStorage.setItem('timezone', timeLocation.value);\n\t}", "function saveRecents() {\n // // saves entire Object to local storage\n localStorage.setItem('Recent Cities', JSON.stringify(recentSearches));\n }", "function saveContacts() {\n window.localStorage.setItem(\"contacts\", JSON.stringify(contacts))\n drawContacts()\n}", "function saveContacts() {\n window.localStorage.setItem(\"contacts\", JSON.stringify(contacts))\n drawContacts()\n}", "function saveResultsToLocalStorage() {\n localStorage.setItem('bus-mall-product-choices', JSON.stringify(product));\n}", "function GetCustomerInfo(){\n if(ValidateEmail(document.querySelector('#userEmail').value)){\n localStorage.clear();\n let email = document.querySelector('#userEmail').value;\n let url = 'https://localhost:5001/MainMenu/get/' + email;\n fetch(url)\n .then(result=> result.json())\n .then(result=>\n {if(result.id == 0){\n alert(\"No Customer with the email\");\n } else{\n \n CustomerLocal(result);\n }\n });\n}}", "function storedCityArray() {\n localStorage.setItem(\"cities\", JSON.stringify(cityList));\n }", "function ImportCustomerData() {\n BindOrReloadCustomerTable('Export');\n}", "getCustomersList(state) {\n return state.customersList;\n }", "function store(obj) {\n var json = JSON.stringify(obj);\n return localStorage.setItem(storageKey, json);\n }", "saveData(){\n localStorage.setItem(\"wish_list\", JSON.stringify(this.asDict()));\n }", "function storeInformation() {\n localStorage.setItem('todaysTimes', JSON.stringify(todaysTimes));\n}", "save () {\n localStorage.setItem(STORAGE_KEY, JSON.stringify(this.allMyTrips))\n }", "function saveBopsAndHops() {\n localStorage.setItem(\"currentAlcohol\", JSON.stringify(alcohol));\n localStorage.setItem(\"currentArtist\", JSON.stringify(artist));\n}", "function savedData() {\n var storedDay = JSON.parse(localStorage.getItem(\"dayPlan\"));\n\n if (storedDay) {\n dayPlan = storedDay;\n };\n\n rememberReminders();\n showReminders();\n}", "function saveLocalStore(){\n for(i = 0; i < generalInfo.length; i++){\n var displayNow = ($(\"#inputEvent\"+generalInfo[i].display).val());\n var notesNow = generalInfo[i].notes;\n generalInfo[i].notes = displayNow;\n console.log(\"grabo vacio\");\n\n }\n localStorage.setItem(\"generalInfo\", JSON.stringify(generalInfo));\n }", "function savePurchase() {\n var purchaseCounter = localStorage.getItem(\"purchase\");\n if (purchaseCounter == null) {\n purchaseCounter = 1;\n } else {\n purchaseCounter++;\n }\n\n localStorage.setItem(\"purchase\", purchaseCounter);\n\n var purchaseData = [];\n purchaseData.push(\"Película: \" + $(\"#titleFilm .emphasis\").text());\n purchaseData.push(\"Nombre: \" + $(\"#first-name\").val());\n purchaseData.push(\"Apellidos: \" + $(\"#last-name\").val());\n purchaseData.push(\"Email: \" + $(\"#address\").val());\n purchaseData.push($(\"#totalPrice .subtotal\").text());\n purchaseData.push(\"Asientos: \" + seatIDs);\n\n localStorage.setItem(\"purchase_\" + purchaseCounter, JSON.stringify(purchaseData));\n}", "function storeDetails() {\n localStorage.setItem(\"details\", JSON.stringify(details));\n localStorage.setItem(\"detailsScore\", JSON.stringify(detailsScore));\n}", "function savePomoData() {\n localStorage.setItem(\"cpid\", currentPomoID);\n localStorage.setItem(\"pomoData\", JSON.stringify(pomoData));\n}", "function init (){\n getStates().then(function (){\n if(customerId !== 0){\n var user = localStorageService.get('id');\n customersService.findCustomer(user).then(function (customer){\n vm.customer = customer;\n vm.title = 'Edit';\n vm.buttonText = 'Update';\n }, processError);\n } else {\n customersService.newCustomer().then(function(customer){\n vm.customer = customer;\n });\n }\n \n });\n\n //warn user if he or she is leaving page and did not save changes\n //$on returns a deregistration function that can be called to remove the listener\n onRouteChangeOff = $scope.$on('$locationChangeStart', routeChange);\n \n }", "store() {\n\t\tlet storeData = this.data.map(wfItem => wfItem.storeVersion());\n\t\tlocalStorage.setItem('data', JSON.stringify(storeData));\n\t}", "function storeGroceryItems()\r\n{\r\n\tlocalStorage.setObject(\"shoppinglist\", groceryItems);\r\n}" ]
[ "0.7025117", "0.6902631", "0.68171936", "0.67184013", "0.66212994", "0.6575759", "0.6474541", "0.64126784", "0.63545185", "0.6304186", "0.62972", "0.6262501", "0.6237662", "0.6190239", "0.6167383", "0.6164728", "0.6147107", "0.61382836", "0.6115855", "0.6076733", "0.6071015", "0.6065002", "0.60557806", "0.60417897", "0.602839", "0.60263526", "0.601496", "0.60109836", "0.6009395", "0.5987644", "0.59872746", "0.59748924", "0.5965575", "0.5963678", "0.594292", "0.59405947", "0.59308094", "0.5929581", "0.5925981", "0.5912667", "0.5907252", "0.5885716", "0.5870855", "0.5870143", "0.5855511", "0.5850204", "0.58463156", "0.5845555", "0.5842262", "0.5841094", "0.58400005", "0.5836852", "0.58150864", "0.5803242", "0.5793455", "0.579239", "0.57908416", "0.5788468", "0.5788399", "0.57710975", "0.5764115", "0.57606256", "0.57536525", "0.5752042", "0.5748172", "0.5746383", "0.57386065", "0.57355666", "0.57350534", "0.573033", "0.57186854", "0.5718127", "0.5718127", "0.57179266", "0.5717678", "0.57113", "0.5705008", "0.569908", "0.5693786", "0.56896263", "0.5689453", "0.5689453", "0.5687371", "0.5686273", "0.56794125", "0.5677894", "0.5670223", "0.5669794", "0.5666612", "0.56643057", "0.56618863", "0.5654053", "0.5651335", "0.5651023", "0.56494445", "0.5647045", "0.5640353", "0.563911", "0.56285304", "0.5625779" ]
0.7455452
0
if formState is true we are editing the customer and gets the data form the local storage. else we are creating new customer.
getCustomer(){ return( this.formState ? this.storage.getItem('customers', this.customerId) : {} ) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_saveCustomer(){\n if (Object.keys(this.customer).length === 7) {\n this.storage.setData('customers', this.customer, this.formState);\n this._cancel();\n }\n }", "getCustomerData() {\n const newCustomer = {\n id: $.uuid(),\n name: customerNameInput.val(),\n phone: customerPhoneInput.val(),\n address: customerAddressInput.val(),\n district: customerDistrictInput.val(),\n note: {\n note: customerNoteInput.val(),\n caution: customerCautionInput.val()\n },\n debt: {\n installment: installmentDebtInput.val() === '' ? 0 : parseInt(installmentDebtInput.val()),\n overlapping: overlappingDebtInput.val() === '' ? 0 : parseInt(overlappingDebtInput.val()),\n old: oldDebtInput.val() === '' ? 0 : parseInt(oldDebtInput.val()),\n new: newDebtInput.val() === '' ? 0 : parseInt(newDebtInput.val())\n }\n }\n return newCustomer\n }", "updateFormFromStorage() {\n // check for data if none return\n let data = localStorage.getItem('formData');\n if (!data) {\n this.setTransactions([]);\n // Looks like new user without data show tips modal.\n setTimeout(() => $('#tipsModal').modal(), 10000);\n return;\n }\n this.setForm(JSON.parse(data));\n // set the interface (transactions) options on the form\n this.setFormTransactions(JSON.parse(localStorage.getItem('transactions')));\n }", "function saveCustomerData(form){\n // pick the data from the inputs\n let first = $(\"input[name=first]\").val();\n let email = $(\"input[name=email]\").val();\n let products = $(\"select[name=products]\").val();\n let quantity = $(\"input[name=quantity]\").val();\n\n // store the data in the object\n let CustomerData = {\n first: first,\n\t\temail: email,\n products:products,\n quantity:quantity\n\t};\n console.log(CustomerData);\n //stroing all the input in the local variable\n\tlocalStorage[\"CustomerData\"]=JSON.stringify(CustomerData);\n form.submit();\n}", "render() {\n const {properties} = this.props;\n const {\n onChangeFirstName, customerInfo, onChangeLastName, onChangeEmail, onChangePhone,\n onChangeShippingAddress, onSaveCustomer\n } = properties;\n return (\n <div className=\"container\">\n <h2>Customer</h2>\n <div className=\"form-group\">\n <label htmlFor=\"usr\">Name:</label>\n <input type=\"text\" value={customerInfo.firstName} className=\"form-control\" id=\"usr\" onChange={\n ({target: {value}}) => {\n onChangeFirstName(value)\n }\n }/>\n </div>\n <div className=\"form-group\">\n <label htmlFor=\"pwd\">Last Name:</label>\n <input type=\"text\" value={customerInfo.lastName} className=\"form-control\" id=\"pwd\"\n onChange={({target: {value}}) => {\n onChangeLastName(value)\n }}/>\n </div>\n <div className=\"form-group\">\n <label htmlFor=\"pwd\">Email:</label>\n <input type=\"text\" value={customerInfo.email} className=\"form-control\" id=\"pwd\"\n onChange={({target: {value}}) => {\n onChangeEmail(value)\n }}/>\n </div>\n <div className=\"form-group\">\n <label htmlFor=\"pwd\">Phone</label>\n <input type=\"text\" value={customerInfo.phone} className=\"form-control\" id=\"pwd\"\n onChange={({target: {value}}) => {\n onChangePhone(value)\n }}/>\n </div>\n <div className=\"form-group\">\n <label htmlFor=\"pwd\">Shipping Address</label>\n <input type=\"text\" value={customerInfo.shippingAddress} className=\"form-control\" id=\"pwd\"\n onChange={({target: {value}}) => {\n onChangeShippingAddress(value)\n }}/>\n </div>\n <button type=\"text\" className=\"btn btn-primary\" onClick={() => onSaveCustomer(customerInfo)}>Save customer\n </button>\n </div>\n );\n }", "function formCustomer(value){\n let kode_customer = $('#kode_customer').val(value.kode_customer);\n let nama_customer = $('#nama_customer').val(value.nama_customer);\n let nama_pimpinan = $('#nama_pimpinan').val(value.nama_pimpinan);\n let alamat = $('#alamat').val(value.alamat);\n let kode_provinsi = $('#kode_provinsi').val(value.kode_provinsi);\n let kode_kabupaten = $('#kode_kabupaten').val(value.kode_kabupaten);\n let sales_group = $('#sales_group').val(value.sales_group);\n let no_telepon = $('#no_telepon').val(value.no_telepon);\n let npwp = $('#npwp').val(value.npwp);\n let email = $('#email').val(value.email);\n let active = $('#active').val(value.active);\n }", "addCustomer() {\n if (this.validationService.isFormValid()) // check the modal form if its data is valid.\n {\n let type = this.state.type;\n // call external api to add a new customer\n this.CustomerService.add(type[\"required\"], type[\"email\"], type[\"number\"], type[\"activated\"])\n .then(res => {\n var id = res.id;\n let data = this.state.data;\n data.push(this.produceCustomer(id, type[\"required\"], type[\"email\"], type[\"number\"], type[\"activated\"], 0));\n this.setState({data});\n let options = {\n place: \"tr\",\n message: \"A new customer is added successfully.\",\n type: \"info\",\n icon: \"now-ui-icons ui-1_bell-53\",\n autoDismiss: 3\n };\n this.refs.notificationAlert.notificationAlert(options);\n });\n this.setState({ // close the modal\n modal: !this.state.modal\n });\n }\n }", "renderCreateForm() {\n return (\n <form onSubmit={this.handleSave} > \n <Errors errors={this.state.errors} />\n \n <div className=\"form-group row\" >\n <input type=\"hidden\" name=\"id\" value={this.state.customers.id} />\n </div>\n < div className=\"form-group row\" >\n <label className=\" control-label col-md-12\" htmlFor=\"Name\">First Name</label>\n <div className=\"col-md-4\">\n <input className=\"form-control\" type=\"text\" name=\"firstName\" defaultValue={this.state.customers.firstName} required onChange={(evt) => this.setState({ firstName: evt.target.value })} />\n </div> \n </div >\n < div className=\"form-group row\" >\n <label className=\" control-label col-md-12\" htmlFor=\"Name\">Last Name</label>\n <div className=\"col-md-4\">\n <input className=\"form-control\" type=\"text\" name=\"lastName\" defaultValue={this.state.customers.lastName} required onChange={(evt) => this.setState({ lastName: evt.target.value })}/>\n </div> \n </div >\n < div className=\"form-group row\" >\n <label className=\" control-label col-md-12\" htmlFor=\"Name\">Date of birth</label>\n <div className=\"col-md-4\">\n <input className=\"form-control\" type=\"date\" name=\"dateOfBirth\" defaultValue={this.state.customers.dateOfBirth} required onChange={(evt) => this.setState({ dateOfBirth: evt.target.value })} />\n </div> \n </div >\n <div className=\"form-group\">\n <button type=\"submit\" className=\"btn btn-primary\">Save</button>\n <button className=\"btn\" onClick={this.handleCancel}>Cancel</button>\n </div >\n </form >\n )\n }", "handleSave(event) {\n event.preventDefault(); \n const data = new FormData(event.target);\n // PUT request for Edit customer. \n if (this.state.customers.id) {\n var id = this.state.customers.id;\n fetch('api/Customer/Edit/'+id, {\n method: 'PUT',\n body: data,\n })\n .then((response) => {\n if (response.ok) {\n this.props.history.push(\"/\");\n }\n return response.json();\n })\n .then((responseJson) => { \n this.setState({ errors: this.handleErrors(responseJson) });\n })\n .catch(function (error) {\n this.setState({ errors: error });\n }.bind(this));\n }\n // POST request for Add customer. \n else {\n fetch('api/Customer/Create', {\n method: 'POST',\n body: data,\n }) \n .then((response) => {\n if (response.ok) {\n this.props.history.push(\"/\"); \n }\n return response.json();\n })\n .then((responseJson) => { \n this.setState({ errors: this.handleErrors(responseJson) });\n }) \n .catch(function (error) {\n this.setState({ errors: error });\n }.bind(this)); \n }\n }", "updateCustomer() {\r\n\t\treturn null\r\n\t}", "function editCust(id){\n $.getJSON(\"customers/singleCustomer\",{\n queryString: id\n }, \n function(data){\n if(data.length > 0 && typeof(data) != 'undefined'){\n var token = \"{{ csrf_token() }}\";\n var custForm = \"<button class='uk-modal-close' type='button' style='float: right' uk-close></button><br><div class='alert alert-danger' id='requiredFields' hidden>\\n\\\n <p>The following fields are required before the account can be created.</p>\\n\\\n </div>\\n\\\n <div id='issueDrops'>\\n\\\n <form class='uk-grid-small uk-form-horizontal' method='post' uk-grid action='/editCustomer' >\\n\\\n <ul class='uk-subnav uk-subnav-pill' uk-switcher>\\n\\\n <li><a href='#'>Customer Information</a></li>\\n\\\n <li><a href='#'>System Information</a></li>\\n\\\n <li><a href='#'>Accounts Information</a></li>\\n\\\n <li><a href='#'>Wholesaler Link Information</a>\\n\\\n </ul>\\n\\\n <ul class='uk-switcher uk-margin' style='width: 100%'>\\n\\\n <li>\\n\\\n <div class='uk-width-1-2@s'>\\n\\\n <label class='uk-form-label' for='form-horizontal-text'>Account Code</label>\\n\\\n <div class='uk-form-controls'>\\n\\\n <input class='uk-input' type='text' placeholder='\" + data[0].CustCode + \"' + +'' value='\" + data[0].CustCode + \"' name='code' required>\\n\\\n </div>\\n\\\n </div>\\n\\\n <br>\\n\\\n <div class='uk-width-1-2@s'>\\n\\\n <label class='uk-form-label' for='form-horizontal-text'>Company Name</label>\\n\\\n <div class='uk-form-controls'>\\n\\\n <input class='uk-input' type='text' placeholder='\" + data[0].CustName + \"' name='companyName' value='\" + data[0].CustName + \"' required>\\n\\\n </div>\\n\\\n </div><br>\\n\\\n \\n\\<input type='hidden' name='id' value='\" + id + \"'\\n\\\n <br>\\n\\\n <input type='hidden' name='_token' value='\" + token + \"'>\\n\\\n <div class='uk-width-1-2@s'>\\n\\\n <label class='uk-form-label' for='form-horizontal-text'>Street 1</label>\\n\\\n <div class='uk-form-controls'>\\n\\\n <input class='uk-input' type='text' placeholder='\" + data[0].Street1 + \"' name='street1' value='\" + data[0].Street1 + \"'required>\\n\\\n </div>\\n\\\n </div>\\n\\\n <br>\\n\\\n <div class='uk-width-1-2@s'>\\n\\\n <label class='uk-form-label' for='form-horizontal-text'>Street 2</label>\\n\\\n <div class='uk-form-controls'>\\n\\\n <input class='uk-input' type='text' placeholder='\" + data[0].Street2 + \"' name='street2' value='\" + data[0].Street2 + \"' >\\n\\\n </div>\\n\\\n </div>\\n\\\n <br>\\n\\\n <div class='uk-width-1-2@s'>\\n\\\n <label class='uk-form-label' for='form-horizontal-text'>Town</label>\\n\\\n <div class='uk-form-controls'>\\n\\\n <input class='uk-input' type='text' placeholder='\" + data[0].Town + \"' name='town' value='\" + data[0].Town + \"' required>\\n\\\n </div>\\n\\\n </div>\\n\\\n <br>\\n\\\n <div class='uk-width-1-2@s'>\\n\\\n <label class='uk-form-label' for='form-horizontal-text'>County</label>\\n\\\n <div class='uk-form-controls'>\\n\\\n <input class='uk-input' type='text' placeholder='\" + data[0].County + \"' value='\" + data[0].County + \"' name='county' required>\\n\\\n </div>\\n\\\n </div>\\n\\\n <br>\\n\\\n <div class='uk-width-1-2@s'>\\n\\\n <label class='uk-form-label' for='form-horizontal-text'>Postcode</label>\\n\\\n <div class='uk-form-controls'>\\n\\\n <input class='uk-input' type='text' placeholder='\" + data[0].Postcode + \"' value='\" + data[0].Postcode + \"' name='postcode' required>\\n\\\n </div>\\n\\\n </div>\\n\\\n <br>\\n\\\n <div class='uk-width-1-2@s'>\\n\\\n <label class='uk-form-label' for='form-horizontal-text'>Main Phone</label>\\n\\\n <div class='uk-form-controls'>\\n\\\n <input class='uk-input' type='text' placeholder='\" + data[0].MainPhone + \"' value='\" + data[0].MainPhone + \"' name='mainphone' required>\\n\\\n </div>\\n\\\n </div>\\n\\\n <br>\\n\\\n <div class='uk-width-1-2@s'>\\n\\\n <label class='uk-form-label' for='form-horizontal-text'>Fax</label>\\n\\\n <div class='uk-form-controls'>\\n\\\n <input class='uk-input' type='text' placeholder='\" + data[0].Fax + \"' value='\" + data[0].Fax + \"' name='fax' >\\n\\\n </div>\\n\\\n </div>\\n\\\n <br>\\n\\\n <div class='uk-width-1-2@s'>\\n\\\n <label class='uk-form-label' for='form-horizontal-text'>Main Email</label>\\n\\\n <div class='uk-form-controls'>\\n\\\n <input class='uk-input' type='email' placeholder='\" + data[0].MainEmail + \"' value='\" + data[0].MainEmail + \"' name='mainemail' required>\\n\\\n </div>\\n\\\n </div>\\n\\\n <br>\\n\\\n <div class='uk-width-1-2@s'>\\n\\\n <label class='uk-form-label' for='form-horizontal-text'>Comments</label>\\n\\\n <div class='uk-form-controls'>\\n\\\n <textarea class='uk-textarea' rows='6' placeholder='\" + data[0].Comments + \"' value='\" + data[0].Comments + \"' name='comments' ></textarea>\\n\\\n </div>\\n\\\n </div>\\n\\\n <br>\\n\\\n <div class='uk-width-1-2@s'>\\n\\\n <label class='uk-form-label' for='form-horizontal-text'>Install Date</label>\\n\\\n <div class='uk-form-controls'>\\n\\\n <input class='uk-input' type='date' placeholder='\" + data[0].InstallDate + \"' value='\" + data[0].InstallDate + \"' name='install' >\\n\\\n </div>\\n\\\n </div>\\n\\\n </li>\\n\\\n <li>\\n\\\n <div class='uk-width-1-2@s'>\\n\\\n <label class='uk-form-label' for='form-horizontal-text'>Hosted Pulse?</label>\\n\\\n <div class='uk-form-controls'>\\n\\\n <input class='uk-checkbox' type='checkbox' name='hosted'>\\n\\\n </div>\\n\\\n </div>\\n\\\n <br>\\n\\\n <div class='uk-width-1-2@s'>\\n\\\n <label class='uk-form-label' for='form-horizontal-text'>Stock?</label>\\n\\\n <div class='uk-form-controls'>\\n\\\n <input class='uk-checkbox' type='checkbox' name='stock'>\\n\\\n </div>\\n\\\n </div>\\n\\\n <br>\\n\\\n <div class='uk-width-1-2@s'>\\n\\\n <label class='uk-form-label' for='form-horizontal-text'>PulseStore?</label>\\n\\\n <div class='uk-form-controls'>\\n\\\n <input class='uk-checkbox' type='checkbox' name='pulseStore'>\\n\\\n </div>\\n\\\n </div>\\n\\\n <br>\\n\\\n <div class='uk-width-1-2@s'>\\n\\\n <label class='uk-form-label' for='form-horizontal-text'>Terminal Server?</label>\\n\\\n <div class='uk-form-controls'>\\n\\\n <input class='uk-checkbox' type='checkbox' name='terminalserver' >\\n\\\n </div>\\n\\\n </div>\\n\\\n <br>\\n\\\n <div class='uk-width-1-2@s'>\\n\\\n <label class='uk-form-label' for='form-horizontal-text'>PulseOffice Version #</label>\\n\\\n <div class='uk-form-controls'>\\n\\\n <input class='uk-input' type='text' placeholder='\" + data[0].PulseVersion + \"' value='\" + data[0].PulseVersion + \"' name='pulseVersion'>\\n\\\n </div>\\n\\\n </div>\\n\\\n <br>\\n\\\n <div class='uk-width-1-2@s'>\\n\\\n <label class='uk-form-label' for='form-horizontal-text'>OPXML PC</label>\\n\\\n <div class='uk-form-controls'>\\n\\\n <input class='uk-input' type='text' placeholder='\" + data[0].OPXMLPC + \"' value='\" + data[0].OPXMLPC + \"' name='opxmlpc'>\\n\\\n </div>\\n\\\n </div>\\n\\\n <br>\\n\\\n <div class='uk-width-1-2@s'>\\n\\\n <label class='uk-form-label' for='form-horizontal-text'>Sage PC</label>\\n\\\n <div class='uk-form-controls'>\\n\\\n <input class='uk-input' type='text' placeholder='\" + data[0].SageLinkPC + \"' value='\" + data[0].SageLinkPC + \"' name='sagepc'>\\n\\\n </div>\\n\\\n </div>\\n\\\n <br>\\n\\\n <div class='uk-width-1-2@s'>\\n\\\n <label class='uk-form-label' for='form-horizontal-text'>PulseLink PC</label>\\n\\\n <div class='uk-form-controls'>\\n\\\n <input class='uk-input' type='text' placeholder='\" + data[0].PulseLinkPC + \"' value='\" + data[0].PulseLinkPC + \"' name='pulselinkpc'>\\n\\\n </div>\\n\\\n </div>\\n\\\n <br>\\n\\\n <div class='uk-width-1-2@s'>\\n\\\n <label class='uk-form-label' for='form-horizontal-text'>Sage Version #</label>\\n\\\n <div class='uk-form-controls'>\\n\\\n <input class='uk-input' type='text' placeholder='\" + data[0].SageVersion + \"' value='\" + data[0].SageVersion + \"' name='sagenum'>\\n\\\n </div>\\n\\\n </div>\\n\\\n <br>\\n\\\n <div class='uk-width-1-2@s'>\\n\\\n <label class='uk-form-label' for='form-horizontal-text'>PulseStore Shop #</label>\\n\\\n <div class='uk-form-controls'>\\n\\\n <input class='uk-input' type='text' placeholder='\" + data[0].PulseStoreShopNumber + \"' value='\" + data[0].PulseStoreShopNumber + \"' name='pulsestorenumber'>\\n\\\n </div>\\n\\\n </div>\\n\\\n <br>\\n\\\n <div class='uk-width-1-2@s'>\\n\\\n <label class='uk-form-label' for='form-horizontal-text'>PulseStore Password</label>\\n\\\n <div class='uk-form-controls'>\\n\\\n <input class='uk-input' type='text' placeholder='\" + data[0].PulseStorePassword + \"' value='\" + data[0].PulseStorePassword + \"' name='pulsestorepassword'>\\n\\\n </div>\\n\\\n </div>\\n\\\n <br>\\n\\\n <div class='uk-width-1-2@s'>\\n\\\n <label class='uk-form-label' for='form-horizontal-text'>Special Upgrade Requirements</label>\\n\\\n <div class='uk-form-controls'>\\n\\\n <textarea class='uk-textarea' rows='6' placeholder='\" + data[0].SpecialUpgradeNotes + \"' value='\" + data[0].SpecialUpgradeNotes + \"' name='upgradeNotes' ></textarea>\\n\\\n </div>\\n\\\n </div>\\n\\\n <div class='uk-width-1-2@s'>\\n\\\n <label class='uk-form-label' for='form-horizontal-text'>Network Details</label>\\n\\\n <div class='uk-form-controls'>\\n\\\n <textarea class='uk-textarea' rows='6' placeholder='\" + data[0].NetworkDetails + \"' value='\" + data[0].NetworkDetails + \"' name='network' ></textarea>\\n\\\n </div>\\n\\\n </div>\\n\\\n </li>\\n\\\n <li>\\n\\\n <div class='uk-width-1-2@s'>\\n\\\n <label class='uk-form-label' for='form-horizontal-text'>Licence Expiry Date</label>\\n\\\n <div class='uk-form-controls'>\\n\\\n <input class='uk-input' type='date' placeholder='date' name='expiry'>\\n\\\n </div>\\n\\\n </div>\\n\\\n <br>\\n\\\n <div class='uk-width-1-2@s'>\\n\\\n <label class='uk-form-label' for='form-horizontal-text'>Licence To Date</label>\\n\\\n <div class='uk-form-controls'>\\n\\\n <input class='uk-input' type='date' placeholder='date' name='licenceToDate'>\\n\\\n </div>\\n\\\n </div>\\n\\\n <br>\\n\\\n <div class='uk-width-1-2@s'>\\n\\\n <label class='uk-form-label' for='form-horizontal-text'>On hold?</label>\\n\\\n <div class='uk-form-controls'>\\n\\\n <input class='uk-checkbox' type='checkbox' name='onhold' >\\n\\\n </div>\\n\\\n </div>\\n\\\n <br>\\n\\\n <div class='uk-width-1-2@s'>\\n\\\n <label class='uk-form-label' for='form-horizontal-text'>Date paid until</label>\\n\\\n <div class='uk-form-controls'>\\n\\\n <input class='uk-input' type='date' placeholder='\" + data[0].DatePaidTo + \"' value='\" + data[0].DatePaidTo + \"' name='paidto'>\\n\\\n </div>\\n\\\n </div>\\n\\\n <br>\\n\\\n <div class='uk-width-1-2@s'>\\n\\\n <label class='uk-form-label' for='form-horizontal-text'>Licence Notes</label>\\n\\\n <div class='uk-form-controls'>\\n\\\n <textarea class='uk-textarea' rows='6' placeholder='\" + data[0].LicenceNotes + \"' value='' name='licenceNotes' ></textarea>\\n\\\n </div>\\n\\\n </div>\\n\\\n </li>\\n\\\n <li>\\n\\\n <div class='uk-width-1-2@s'>\\n\\\n <label class='uk-form-label' for='form-horizontal-text'>Vow Account #</label>\\n\\\n <div class='uk-form-controls'>\\n\\\n <input class='uk-input' type='text' placeholder='\" + data[0].VowAccNo + \"' value='\" + data[0].VowAccNo + \"' name='vowacc'>\\n\\\n </div>\\n\\\n </div>\\n\\\n <br>\\n\\\n <div class='uk-width-1-2@s'>\\n\\\n <label class='uk-form-label' for='form-horizontal-text'>Vow Password</label>\\n\\\n <div class='uk-form-controls'>\\n\\\n <input class='uk-input' type='text' placeholder='\" + data[0].VowPasword + \"' value='\" + data[0].VowPassword + \"' name='vowpass'>\\n\\\n </div>\\n\\\n </div>\\n\\\n <br>\\n\\\n <div class='uk-width-1-2@s'>\\n\\\n <label class='uk-form-label' for='form-horizontal-text'>Vow Discount %</label>\\n\\\n <div class='uk-form-controls'>\\n\\\n <input class='uk-input' type='number' min='0' max='100' placeholder='\" + data[0].VowDiscount + \"' value='\" + data[0].VowDiscount + \"' name='vowdisc'>\\n\\\n </div>\\n\\\n </div>\\n\\\n <br>\\n\\\n <div class='uk-width-1-2@s'>\\n\\\n <label class='uk-form-label' for='form-horizontal-text'>Spicer Account #</label>\\n\\\n <div class='uk-form-controls'>\\n\\\n <input class='uk-input' type='text' placeholder='\" + data[0].SpicerAccNo + \"' value='\" + data[0].SpicerAccNo + \"' name='spicacc'>\\n\\\n </div>\\n\\\n </div>\\n\\\n <br>\\n\\\n <div class='uk-width-1-2@s'>\\n\\\n <label class='uk-form-label' for='form-horizontal-text'>Spicers Password</label>\\n\\\n <div class='uk-form-controls'>\\n\\\n <input class='uk-input' type='text' placeholder='\" + data[0].SpicerPassword + \"' \" + data[0].SpicerPassword + \" name='spicpass'>\\n\\\n </div>\\n\\\n </div>\\n\\\n <br>\\n\\\n <div class='uk-width-1-2@s'>\\n\\\n <label class='uk-form-label' for='form-horizontal-text'>Antalis Account #</label>\\n\\\n <div class='uk-form-controls'>\\n\\\n <input class='uk-input' type='text' placeholder='\" + data[0].AntalisAccNo + \"' value='\" + data[0].AntalisAccNo + \"' name='antacc'>\\n\\\n </div>\\n\\\n </div>\\n\\\n <br>\\n\\\n <div class='uk-width-1-2@s'>\\n\\\n <label class='uk-form-label' for='form-horizontal-text'>Antalis Password</label>\\n\\\n <div class='uk-form-controls'>\\n\\\n <input class='uk-input' type='text' placeholder='\" + data[0].AntalisPassword + \"' value='\" + data[0].AntalisPassword + \"' name='antpass'>\\n\\\n </div>\\n\\\n </div>\\n\\\n <br>\\n\\\n <div class='uk-width-1-2@s'>\\n\\\n <label class='uk-form-label' for='form-horizontal-text'>Truline Account #</label>\\n\\\n <div class='uk-form-controls'>\\n\\\n <input class='uk-input' type='text' placeholder='\" + data[0].TrulineAccNo + \"' value='\" + data[0].TrulineAccNo + \"' name='truacc'>\\n\\\n </div>\\n\\\n </div>\\n\\\n <br>\\n\\\n <div class='uk-width-1-2@s'>\\n\\\n <label class='uk-form-label' for='form-horizontal-text'>Truline Password</label>\\n\\\n <div class='uk-form-controls'>\\n\\\n <input class='uk-input' type='text' placeholder='\" + data[0].TrulinePassword + \"' value='\" + data[0].TrulinePassword + \"' name='trupass'>\\n\\\n </div>\\n\\\n </div>\\n\\\n <br>\\n\\\n <div class='uk-width-1-2@s'>\\n\\\n <label class='uk-form-label' for='form-horizontal-text'>Beta Account</label>\\n\\\n <div class='uk-form-controls'>\\n\\\n <input class='uk-input' type='text' placeholder='\" + data[0].BeteAccNo + \"' value='\" + data[0].BetaAccNo + \"' name='betaacc'>\\n\\\n </div>\\n\\\n </div>\\n\\\n <br>\\n\\\n <div class='uk-width-1-2@s'>\\n\\\n <label class='uk-form-label' for='form-horizontal-text'>Beta Password</label>\\n\\\n <div class='uk-form-controls'>\\n\\\n <input class='uk-input' type='text' placeholder='\" + data[0].BetaPassword + \"' value='\" + data[0].BetaPassword + \"' name='betapass'>\\n\\\n </div>\\n\\\n </div>\\n\\\n <br>\\n\\\n <div class='uk-width-1-2@s'>\\n\\\n <label class='uk-form-label' for='form-horizontal-text'>Exertis Account #</label>\\n\\\n <div class='uk-form-controls'>\\n\\\n <input class='uk-input' type='text' placeholder='\" + data[0].ExertisAccNo + \"' value='\" + data[0].ExertisAccNo + \"' name='exertacc'>\\n\\\n </div>\\n\\\n </div>\\n\\\n <br>\\n\\\n <div class='uk-width-1-2@s'>\\n\\\n <label class='uk-form-label' for='form-horizontal-text'>Exertis Password</label>\\n\\\n <div class='uk-form-controls'>\\n\\\n <input class='uk-input' type='text' placeholder='\" + data[0].ExertisPassword + \"' value='\" + data[0].ExertisPassword + \"' name='exertpass'>\\n\\\n </div>\\n\\\n </div>\\n\\\n <br>\\n\\\n <div class='uk-width-1-2@s'>\\n\\\n <label class='uk-form-label' for='form-horizontal-text'>Buying Group</label>\\n\\\n <div class='uk-form-controls'>\\n\\\n <input class='uk-input' type='text' placeholder='\" + data[0].BuyingGroup + \"' value='\" + data[0].BuyingGroup + \"' name='buyinggroup'>\\n\\\n </div>\\n\\\n </div>\\n\\\n </li>\\n\\\n </ul>\\n\\\n <br>\\n\\\n <input type='submit' class='btn btn-primary' value='save' >\\n\\\n </form>\\n\\\n </div>\\n\\ \"; \n UIkit.modal.alert(\"<div id='editCustForm'><h3 style='text-align: center;'>Editing customer : \" + data[0].CustName + \"</h3><br> \" + custForm + \"</div>\");\n $('.uk-modal-dialog').css('width','80%');\n if(data[0].PulseStore == 1){\n $(\"input[name='pulseStore']\").prop('checked', true);\n }\n if(data[0].hosted == 1){\n $(\"input[name='hosted']\").prop('checked', true);\n }\n if(data[0].StockControl == 0){\n $(\"input[name='stock']\").prop('checked', true);\n }\n $('.uk-modal-footer').hide(); \n if(data[0].TerminalServer == 1){\n $(\"input[name='terminalserver']\").prop('checked', true);\n }\n } else {\n //made a whoops\n };\n }); \n}", "function editCustomer() {\n let $row = jQuery(this).closest('tr');\n let $columns = $row.find('td');\n\n $(\"#addButton\").hide();\n $(\"#customer-form\").slideDown();\n $(\"#back-button\").show();\n $(\"#update-button\").show();\n $(\"#delete-button\").show();\n $(\"#submit-button\").hide();\n\n global_selectedCustomer = $columns[0].innerHTML;\n\n $(\"#input-name\").val($columns[1].innerHTML);\n $(\"#input-address\").val($columns[2].innerHTML);\n $(\"#input-city\").val($columns[3].innerHTML);\n $(\"#input-state\").val($columns[4].innerHTML);\n $(\"#input-zip\").val($columns[5].innerHTML);\n}", "function updateCustomer() {\n var cust = $scope.customer;\n\n CustomerService.save(cust)\n .success(function() {\n $location.path('/customer');\n $scope.status = 'Updated Customer! Refreshing customer list.';\n })\n .error(function(error) {\n $scope.status = 'Unable to update customer: ' + error.message;\n });\n }", "showEditForm(data) {\n const newData = {\n id: data.id,\n title: data.title,\n city: data.city_id,\n oldTitle: data.title\n };\n\n this.showCreateForm(newData);\n }", "function goToCustomerEditPage() {\n $('#name').val(window.customerRecord.item.object.name);\n $('#location_number').val(window.customerRecord.item.object.location_number);\n $('#address').val(window.customerRecord.item.object.address);\n $('#city').val(window.customerRecord.item.object.city);\n $('#state').val(window.customerRecord.item.object.state);\n $('#zip').val(window.customerRecord.item.object.zip);\n $('#fax').val(window.customerRecord.item.object.fax);\n $('#contact').val(window.customerRecord.item.object.contact);\n $('#phone').val(window.customerRecord.item.object.phone);\n $('#email').val(window.customerRecord.item.object.email);\n $('textarea#cus_internal_notes').val(window.customerRecord.item.object.internal_notes);\n $('#customer_id').val(window.customerRecord.item.object.id);\n }", "handleEdit(id){\n this.setState({showEditForm: true, applicantIdToEdit: id});\n sessionStorage.setItem('showEditForm', 'true');\n sessionStorage.setItem('applicantIdToEdit', id);\n }", "handleSubmit(e) {\n\n e.preventDefault();\n\n // get form data\n const name = document.getElementById('name');\n const surname = document.getElementById('surname');\n const email = document.getElementById('email');\n const age = document.getElementById('age');\n const city = document.getElementById('city');\n\n // create a copy of customer data\n let newCustomerData = [...this.state.customerData];\n\n console.log(newCustomerData);\n\n let newCustomer = {\n name: name.value,\n surname: surname.value,\n email: email.value,\n age: age.value,\n city: city.value\n }\n\n newCustomerData.unshift(newCustomer);\n\n this.setState({\n customerData: newCustomerData\n })\n\n // reset form data\n name.value = '';\n surname.value = '';\n email.value = '';\n age.value = '';\n city.value = '';\n\n // close modal\n this.setState({\n isModalOpen: false\n });\n\n // remove body fixed class\n document.body.classList.remove('is-fixed');\n\n }", "function CustomerLocal(customer){\n localStorage.clear();\n localStorage.setItem(\"customerId\", parseInt(customer.id));\n localStorage.setItem(\"customerEmail\", customer.email);\n if(customer.id == 1){\n window.location.href = \"ManagerProduct.html\";\n }\n else {\n window.location.href = \"CustomerIndex.html\";\n }\n}", "function on_customer_save() {\n var username = $(\"#widget-customers-manage input#username\").val();\n var selected_type = $(\"#user_type option:selected\").val();\n afrimesh.customers.generate(username, selected_type, 0, function(error, result) {\n console.debug(\"Inserted: \" + dump_object(result[0]));\n $(\"ul#menu ul#customers li#manage\").click();\n });\n }", "function customerAddSuccess(customer) {\n customerAddRow(customer);\n formClear();\n}", "function saveCustomers(customerId){ \n $scope.editCustomerValues = {\n \"action\": \"edit\",\n \"cAddress\": $scope.customer.customerAddress,\n \"cContact\": $scope.customer.customerContact,\n \"cDOB\": $scope.customer.customerDOB,\n \"cEmail\": $scope.customer.customerEmail,\n \"cID\":customerId,\n \"cName\":$scope.customer.customerName\n };\n $scope.customer.action = \"edit\";\n $http.post('/customerActions',$scope.editCustomerValues).success(function(response){\n if(response == '\"fail\"' || response == '\"junk data\"'){\n swal({title: \"Not edited!\", text: \"Please retry\", type: \"error\", confirmButtonText: \"ok\" });\n }\n else if(response == '\"connection_error\"'){\n $scope.isLoading = null;\n swal({title: \"Connection Error!\", text: \"Connection could not be established\", type: \"error\", confirmButtonText: \"ok\" });\n }\n else{\n for (var i = 0; i < $scope.customers.length; i++){\n if ($scope.customers[i].Id == customerId){\n $scope.customers[i].Name = $scope.customerName;\n $scope.customers[i].City = $scope.customerCity;\n }\n }\n $scope.onEdit = null;\n }\n });\n }", "handleCustomerNameChange(event) {\n //Error message should disappear once corrected\n //Invoice sent message should disappear when starting new invoice\n this.setState({\n errorMessage: '',\n showErrorMessage: false,\n invoiceSent:false\n })\n //Validate customer name\n if(!validCustomerName(event.target.value)){\n this.setState({\n errorMessage: 'Customer name can only contain letters A-Z, a-z and spaces',\n showErrorMessage: true\n })\n return;\n }\n let currentCustomerInfo = this.state.customerInfo;\n currentCustomerInfo.customerName = event.target.value;\n this.setState({\n customerInfo: currentCustomerInfo\n });\n }", "function CollectData(customer) {\n try {\n if(customer.name){customerModal.name = customer.name};\n if(customer.address){customerModal.address = customer.address};\n if(customer.phone){customerModal.phone = customer.phone};\n } catch (e) {\n console.log('customer.field undefined now');\n }\n }", "function submitAccount(){\n let customerInfo = {\n \"first_name\" : $(\"#firstName_input\").val(),\n \"middle_name\" : $(\"#middleName_input\").val(),\n \"last_name\" : $(\"#lastName_input\").val(),\n \"email\" : $(\"#email_input\").val(),\n \"phone\" : $(\"#phone_input\").val(),\n \"address_line1\" : $(\"#address1_input\").val(),\n \"address_line2\" : $(\"#address2_input\").val(),\n \"city\" : $(\"#city_input\").val(),\n \"state\" : $(\"#state_input\").val(),\n \"zip\" : $(\"#zip_input\").val(),\n \"notes\" : $(\"#customerNotes_input\").val()\n }\n\n createCustomer(customerInfo);\n}", "function finish() {\n const customer = {\n fullName: fullName.value,\n identifyCard: identifyCard.value,\n birthday: birthday.value,\n email: email.value,\n address: address.value,\n customerType: customerType.value,\n discount: discount.value,\n quantityInclude: quantityInclude.value,\n rentDays: rentDays.value,\n typeOfService: typeOfService.value,\n typeOfRoom: typeOfRoom.value,\n totalPay: totalPay.innerHTML,\n };\n customers.push(customer);\n console.log(customers);\n displayCustomer();\n editData();\n}", "function onSubmit() {\n props.addCustomerModal(customerModal);\n }", "function saveManageBusinessFields() {\n // Save business details in local Storage\n var businessName = document.getElementById('businessName').value;\n if (businessName != null) {\n localStorage.setItem('businessName', businessName);\n }\n\n var businessPhone = document.getElementById('businessPhone').value;\n if (businessPhone != null) {\n localStorage.setItem('businessPhone', businessPhone);\n }\n\n var businessAddress = document.getElementById('set-address').value;\n if (businessAddress != null) {\n localStorage.setItem('businessAddress', businessAddress);\n }\n}", "function UpdateCustomers({match}) {\n const [values, setValues] = useState({\n firstName: \"\",\n lastName: \"\",\n email: \"\",\n phone: \"\",\n address: \"\",\n description: \"\",\n })\n\n useEffect(() => {\n if(match.params && match.params.pk)\n {\n CustomersAPI.getCustomer(match.params.pk).then((c)=> {\n setValues({\n firstName: c.first_name,\n lastName: c.last_name,\n email: c.email,\n phone: c.phone,\n address: c.address,\n description: c.description,\n })\n })\n }\n }, [])\n\n const handleChange = name => event => {\n setValues({ ...values, [name]: event.target.value });\n };\n\n function handleCreate() {\n console.log(\"handle create called\")\n CustomersAPI.createCustomer({\n \"first_name\": values.firstName,\n \"last_name\": values.lastName,\n \"email\": values.email,\n \"phone\": values.phone,\n \"address\": values.address,\n \"description\": values.description,\n }).then((result) => {\n alert(\"Customer created!!\")\n }).catch((error)=>{\n alert('There was an error! Please re-check your form.' + error);\n });\n }\n\n function handleUpdate(pk){\n CustomersAPI.updateCustomer(\n {\n \"pk\": pk,\n \"first_name\": values.firstName,\n \"last_name\": values.lastName,\n \"email\": values.email,\n \"phone\": values.phone,\n \"address\": values.address,\n \"description\": values.description\n }\n ).then((result)=>{\n alert(\"Customer updated!\");\n }).catch(()=>{\n alert('There was an error! Please re-check your form.');\n });\n }\n\n function handleSubmit(event) {\n if(match.params && match.params.pk){\n handleUpdate(match.params.pk);\n }\n else\n {\n handleCreate();\n }\n event.preventDefault();\n }\n return (\n <form onSubmit={handleSubmit}>\n <div className=\"form-group\">\n <label>\n First Name:</label>\n <input className=\"form-control\" type=\"text\"\n value={values.firstName}\n onChange={handleChange('firstName')}\n />\n\n <label>\n Last Name:</label>\n <input className=\"form-control\" type=\"text\"\n value={values.lastName}\n onChange={handleChange('lastName')}\n />\n\n <label>\n Phone:</label>\n <input className=\"form-control\" type=\"text\"\n value={values.phone}\n onChange={handleChange('phone')}\n />\n\n <label>\n Email:</label>\n <input className=\"form-control\" type=\"text\"\n value={values.email}\n onChange={handleChange('email')}\n />\n\n <label>\n Address:</label>\n <input className=\"form-control\" type=\"text\"\n value={values.address}\n onChange={handleChange('address')}\n />\n\n <label>\n Description:</label>\n <textarea className=\"form-control\"\n value={values.description}\n onChange={handleChange('description')}\n ></textarea>\n\n\n <input className=\"btn btn-primary\" type=\"submit\" value=\"Submit\" />\n </div>\n </form>\n );\n\n}", "function handleChangeFields(event) {\n setNewCustomers({\n ...newCustomer,\n [event.target.name]: event.target.value,\n });\n }", "handleEditChanges(event){\n this.setState({canSubmit: true});\n const field = event.target.name;\n const storeinformation = this.state.storeinformation;\n storeinformation[field] = event.target.value;\n\n if(!!this.state.errors[event.target.name]) {\n let errors = Object.assign({}, this.state.errors);\n delete errors[event.target.name];\n this.setState({errors});\n }\n var domainuniquekey = window.sessionStorage.getItem(\"domainuniquekey\");\n storeinformation[\"domainuniquekey\"] = domainuniquekey;\n //console.log(storeinformation);\n\n window.sessionStorage.setItem('storeinformation', JSON.stringify(storeinformation));\n}", "handleEdit(member) {\n this.setState({\n form: {\n id: member.id,\n first_name: member.first_name,\n last_name: member.last_name,\n phone: member.phone,\n email: member.email\n },\n create: false\n });\n }", "function customer_validate()\n{\n\tvar errmsg = \"\";\n\tvar result = true;\n\tvar state = document.getElementById(\"bil-state\").value;\n\tvar postcode = parseInt(document.getElementById(\"bil-postcode\").value);\n\tx = parseInt(postcode/1000);\n\tvar bil_addr = postcodecheck(state, x);\n\tif(!bil_addr)\n\t{\n\t\tresult = false;\n\t\terrmsg += \"Enter valid Post Code for Billing Address.\\n\";\n\t}\n\t\n\tstate = document.getElementById(\"del-state\").value;\n\tpostcode = parseInt(document.getElementById(\"del-postcode\").value);\n\tx = parseInt(postcode/1000);\n\tvar del_addr = postcodecheck(state, x);\n\tif(!del_addr)\n\t{\n\t\tresult = false;\n\t\terrmsg += \"Enter valid Post Code for Delivery Address.\\n\";\n\t}\n\t\n\tvar phone_number = document.getElementById(\"phone\").value; \n\tvar re10digit = /^\\d{10}$/ //regular expression defining a 10 digit number\n\tif (phone_number.search(re10digit)==-1)\n\t{\t//if match failed\n\t\tresult = false;\n\t\terrmsg += \"Please enter a valid 10 digit phone number inside form. \\n\";\n\t}\n\t\n\tif(result)\n\t{\n\t\tlocalStorage.fname = document.getElementById(\"fname\").value;\n\t\tlocalStorage.lname = document.getElementById(\"lname\").value;\n\t\tlocalStorage.dob = document.getElementById(\"dob\").value;\n\t\tlocalStorage.bil_st_addr = document.getElementById(\"bil-st-addr\").value;\n\t\tlocalStorage.bil_sub_addr = document.getElementById(\"bil-sub-addr\").value;\n\t\tlocalStorage.bil_state = document.getElementById(\"bil-state\").value;\n\t\tlocalStorage.bil_postcode = document.getElementById(\"bil-postcode\").value;\n\t\tlocalStorage.del_st_addr = document.getElementById(\"del-st-addr\").value;\n\t\tlocalStorage.del_sub_addr = document.getElementById(\"del-sub-addr\").value;\n\t\tlocalStorage.del_state = document.getElementById(\"del-state\").value;\n\t\tlocalStorage.del_postcode = document.getElementById(\"del-postcode\").value;\n\t\tlocalStorage.email = document.getElementById(\"email\").value;\n\t\tlocalStorage.phone = document.getElementById(\"phone\").value;\n\t}\n\telse\n\t{\n\t\talert(errmsg);\n\t}\n\treturn result;\n}", "setExistingCustomer(customer) {\r\n let customerDetails = customer\r\n\r\n if (customerDetails !== null && typeof customerDetails['customer'] !== 'undefined') {\r\n let customer = customerDetails['customer']\r\n\r\n try {\r\n this.payload.order.customerId = customer['customer_id']\r\n this.payload.order.firstname = customer['firstname']\r\n this.payload.order.firstname = customer['firstname']\r\n this.payload.order.lastname = customer['lastname']\r\n this.payload.order.email = customer['email']\r\n this.payload.order.telephone = customer['telephone']\r\n this.payload.order.fax = customer['fax']\r\n\r\n let address = []\r\n \r\n // Handle array of billing addresses\r\n if (customerDetails['addresses'] instanceof Array && customerDetails['addresses'].length > 1) {\r\n for (let customerAddress in customerDetails['addresses']) {\r\n if (customerAddress['addressId'] === customer['addressId']) {\r\n address = customerAddress\r\n break\r\n }\r\n }\r\n\r\n if (address.length > 0) {\r\n this.setBillingAddress(address)\r\n }\r\n // Single billing address object\r\n } else if (typeof customerDetails['billingAddress'] !== 'undefined' && customerDetails.billingAddress !== null) {\r\n this.setBillingAddress(customerDetails.billingAddress)\r\n }\r\n \r\n // Handle array of shipping addresses\r\n if (customerDetails['addresses'] instanceof Array && customerDetails['addresses'].length > 1) {\r\n for (let customerAddress in customerDetails['addresses']) {\r\n if (customerAddress['addressId'] === customer['addressId']) {\r\n address = customerAddress\r\n break\r\n }\r\n }\r\n\r\n if (address.length > 0) {\r\n this.setShippingAddress(address)\r\n }\r\n // Single shipping address object\r\n } else if (typeof customerDetails['shippingAddress'] !== 'undefined' && customerDetails.shippingAddress !== null) {\r\n this.setShippingAddress(customerDetails.shippingAddress)\r\n }\r\n } catch (err) {\r\n console.log(JSON.stringify(err))\r\n }\r\n }\r\n }", "produceCustomer(id, vname, vemail, vphone, activated, nbcommand) {\n let key = id;\n // remove all spaces\n vname = vname.trim();\n vemail = vemail.trim();\n vphone = vphone.trim();\n return {\n id: key,\n name: vname,\n email: vemail,\n phone: vphone,\n activated: activated?true:false,\n activatedString: activated?\"Active\":\"Inactive\",\n nbcommand: nbcommand,\n actions: (\n // we've added some custom button actions\n <div className=\"actions-right\">\n {/* use this button to add a edit kind of action */}\n <Button\n onClick={() => {\n let obj = this.state.data.find(o => o.id === key);\n this.editToggle(obj); // Launch the edit modal\n }}\n color=\"warning\"\n size=\"sm\"\n round\n icon\n >\n <i className=\"fa fa-edit\"/>\n </Button>{\" \"}\n {/* use this button to remove the data row */}\n <Button\n onClick={() => {\n var data = this.state.data;\n data.find((o, i) => {\n if (o.id === key) {\n data.splice(i, 1); // Delete from table.\n this.CustomerService.delete(o.id).then(res => {\n var options = {};\n options = {\n place: \"tr\",\n message: \"One customer is deleted.\",\n type: \"info\",\n icon: \"now-ui-icons ui-1_bell-53\",\n autoDismiss: 3\n };\n this.refs.notificationAlert.notificationAlert(options);\n });\n return true;\n }\n return false;\n });\n this.setState({data: data});\n }}\n color=\"danger\"\n size=\"sm\"\n round\n icon\n >\n <i className=\"fa fa-times\"/>\n </Button>{\" \"}\n <Button\n onClick={() => {\n let obj = this.state.data.find(o => o.id === key);\n this.onShow(obj);\n }}\n color=\"info\"\n size=\"sm\"\n round\n icon\n >\n\n <i className=\"fa fa-eye\"/>\n </Button>\n </div>\n )\n };\n }", "fillForm() {\n\n if (localStorage.getItem(\"lastname\") !== undefined)\n $(\"form\")[0].lastname.value = localStorage.getItem(\"lastname\");\n\n if (localStorage.getItem(\"firstname\") !== undefined)\n $(\"form\")[0].firstname.value = localStorage.getItem(\"firstname\");\n\n }", "function handleSave(event) {\n event.preventDefault();\n setSaving(true);\n if (addOrEditContactType === messages.Add) onAddContact(addOrEditContact);\n else onUpdateContact(addOrEditContact);\n history.push('/contact-list');\n const contact = { ...addOrEditContact };\n const name = `${contact.firstname} ${contact.lastname}`;\n toast.success(`${messages.toastcontact} ${name} ${messages.toastsaved}`);\n }", "updateCustomers(state, payload){\n state.customers = payload;\n }", "function addCustomer(){\n var check = true\n check = validateform()\n if(check){\n $.ajax({\n url: baseUrl + 'admin/customer/add',\n headers : {'X-CSRF-Token': csrfToken},\n type: 'post',\n data: {\n 'CustomerID':$('#CustomerID').val(),\n 'CustomerName':$('#CustomerName').val(),\n 'Phone':$('#Phone').val(),\n 'Address':$('#Address').val(),\n 'Type':$('#Type').val(),\n 'Provision':$('#Provision').val(),\n 'Category':$('#Category').val(),\n 'PresidentName':$('#PresidentName').val(),\n },\n success:function(response){\n if(response == 1){\n $('#CustomerID').val(''),\n $('#CustomerName').val(''),\n $('#Phone').val(''),\n $('#Address').val(''),\n $('#Type').val(''),\n $('#Provision').val(''),\n $('#Category').val(''),\n $('#PresidentName').val(''),\n $('#modalCustomer').modal('hide')\n swal({\n title: \"Added Successfully!\",\n icon: \"success\",\n });\n }\n },\n error:function(){\n alert('Have error. Please double check that the customer ID & Name are not duplicates in the Database.')\n }\n })\n getListCustomer(\"\")\n }\n}", "function customerAddressForm() {\n var $newAddressForm = $('#AddressNewForm');\n\n if (!$newAddressForm.length) {\n return;\n }\n\n // Initialize observers on address selectors, defined in shopify_common.js\n if (Shopify) {\n // eslint-disable-next-line no-new\n new Shopify.CountryProvinceSelector('AddressCountryNew', 'AddressProvinceNew', {\n hideElement: 'AddressProvinceContainerNew'\n });\n }\n\n // Initialize each edit form's country/province selector\n $('.address-country-option').each(function() {\n var formId = $(this).data('form-id');\n var countrySelector = 'AddressCountry_' + formId;\n var provinceSelector = 'AddressProvince_' + formId;\n var containerSelector = 'AddressProvinceContainer_' + formId;\n\n // eslint-disable-next-line no-new\n new Shopify.CountryProvinceSelector(countrySelector, provinceSelector, {\n hideElement: containerSelector\n });\n });\n\n // Toggle new/edit address forms\n $('.address-new-toggle').on('click', function() {\n $newAddressForm.toggleClass('hide');\n });\n\n $('.address-edit-toggle').on('click', function() {\n var formId = $(this).data('form-id');\n $('#EditAddress_' + formId).toggleClass('hide');\n });\n\n $('.address-delete').on('click', function() {\n var $el = $(this);\n var formId = $el.data('form-id');\n var confirmMessage = $el.data('confirm-message');\n\n // eslint-disable-next-line no-alert\n if (confirm(confirmMessage || 'Are you sure you wish to delete this address?')) {\n Shopify.postLink('/account/addresses/' + formId, {parameters: {_method: 'delete'}});\n }\n });\n }", "handleSubmitClick(customer) {\n this.setState({\n customerId: customer.id\n });\n fetch('http://localhost:8090/customers/' + customer.id, {\n method: 'PUT',\n headers: {\n 'Accept': 'application/json',\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n id: customer.id,\n name: customer.name,\n lastName: customer.lastName,\n email: customer.email,\n city: customer.city,\n deliveryAddress: customer.deliveryAddress,\n phone: customer.phone,\n street: customer.street,\n streetNumber: customer.streetNumber,\n neighbourhood: customer.neighbourhood,\n fiscalNumber: customer.fiscalNumber,\n account: customer.account,\n accountDays: customer.accountDays,\n accountAmount: customer.accountAmount,\n vatCondition: customer.vatCondition,\n enabled: customer.enabled\n })\n })\n }", "toggleCompanyInformationEditing(state) {\n // Set the state to specified state\n this.setState({\n editingCompanyInformation: state\n });\n \n // If editing is being canceled\n // Set state to either old values or the new values that were updated\n if (state === false) {\n // get state values\n let meta = this.state.metadata,\n userMeta = this.state.user.metadata,\n address = '', phone = '';\n \n // Remove undefined error & set metadata values to returned user object\n typeof userMeta.address === 'undefined' ? '' : address = userMeta.address;\n typeof userMeta.phone === 'undefined' ? '' : phone = userMeta.phone;\n\n // Set state based on returned user metadata\n this.setState({\n metadata: Object.assign(\n {},\n meta,\n {\n address: address,\n phone: phone\n }\n )\n })\n }\n }", "function updateTransferView(customerData) {\n var customer = customerData.customers[0];\n transferSection.find('.glyphicon-customer-id').css(\"display\", \"\");\n transferSection.find('.searchButton').css(\"margin-left\", \"10px\");\n transferSection.find('#cancelReasonDropdown').css(\"display\", \"\");\n transferSection.find('#customerInfoPlaceholder').css(\"display\", \"\").text(\"\");\n if (typeof customer.email !== 'undefined' && customer.email !== null) {\n transferSection.find('#customerInfoPlaceholder').append(customer.name + \"<br>\" + customer.email + \n \"<br>\" + customer.address + \"<br>\" + customer.postNumber + \" \" + customer.postOffice);\n } else {\n transferSection.find('#customerInfoPlaceholder').append(customer.name + \"<br>\" + customer.address + \n \"<br>\" + customer.postNumber + \" \" + customer.postOffice);\n }\n \n }", "saveContact(oldContactId, newName, newEmail, newNumber) {\n const {contacts} = this.state\n const foundContact = _.find(contacts, contact => contact.id === oldContactId);\n foundContact.name = newName;\n foundContact.email = newEmail;\n foundContact.number = newNumber;\n this.setState({\n contacts\n }, () => updateLocalStorage(\"contacts\", contacts))\n }", "function updateContact() {\n var contacts = getStoredContacts();\n var idEdited = JSON.parse(localStorage.idEdited);\n\n contacts.forEach(function (contact) {\n if(idEdited == contact.id) { // capitalize name initials (a little sanitation)\n contact.firstname = form.firstname.value[0].toUpperCase() + form.firstname.value.slice(1).toLowerCase(),\n contact.lastname = form.lastname.value[0].toUpperCase() + form.lastname.value.slice(1).toLowerCase(),\n contact.phone = form.phone.value,\n contact.address = form.address.value,\n contact.email = form.email.value\n }\n });\n\n // add contact to local storage\n localStorage.contacts = JSON.stringify(contacts);\n localStorage.idEdited = JSON.stringify('updated');\n}", "function setSavedState() {\n const state = JSON.parse(localStorage.getItem('collecting_together_form'));\n if (state) {\n cfSelect.value = state.cf ? state.cf : '';\n gfSelect.value = state.gf ? state.gf : '';\n mfSelect.value = state.mf ? state.mf : '';\n amSelect.value = state.am ? state.am : '';\n }\n }", "function Save() {\n if ($('#ab041AddEdit').valid()) {\n if (vm.isNew) {\n dataContext.add(\"/api/ab041\",vm.ab041).then(function (data) {\n notify.showMessage('success', \"ab041 record added successfully!\");\n\t\t\t\t\t\twindow.location.hash = \"/ab041/\";\n });\n } else {\n dataContext.upDate(\"/api/ab041\", vm.ab041).then(function (data) {\n notify.showMessage('success', \"ab041 record updated successfully!\");\n\t\t\t\t\t\twindow.location.hash = \"/ab041/\";\n });\n }\n }\n }", "function new_customer(e){\r\n\t\te.preventDefault();\r\n\t\ttest.templateScenariosPromise = prepare_scenario_check();\r\n\t\t//after the template data has loaded, we create the the customer\r\n\t\ttest.templateScenariosPromise.always(create_customer);\r\n \t}", "onChange(e) {\n this.setState({\n customer: e.target.value\n });\n }", "function setProfileFromLS() {\n if (\n localStorage.getItem('customer') != null &&\n localStorage.getItem('customer') != 'undefined'\n ) {\n let localST = JSON.parse(localStorage.getItem('customer'))\n $('#validationCustom01').val(localST.firstName)\n $('#validationCustom02').val(localST.lastName)\n $('#validationCustom03').val(localST.email)\n $('#validationCustom04').val('*************')\n $('#validationCustom05').val(localST.number)\n $('#validationCustom06').val(localST.address.street)\n $('#validationCustom07').val(localST.address.city)\n $('#validationCustom08').val(localST.address.zipcode)\n $('#welcomeText').text('Hej ' + localST.firstName + ' ' + localST.lastName)\n $('#welcomeEmail').text(localST.email)\n }\n}", "function formCustomerDataToJSON () {\n var customer = JSON.stringify ({\n \"id\": $ ('#customerDetails').find ('#tmpId').val (),\n \"cust_name\": $ ('#customerDetails').find ('#custName').val (),\n \"phone\": $ ('#customerDetails').find ('#custPhone').val (),\n \"address\": $ ('#customerDetails').find ('#custAddress').val ()\n });\n return customer;\n}", "function previewForm(amount, ship_state, ship_country) {\n var address = new Object();\n var billing = new Object();\n var shipping = new Object();\n var previeworder = new Object();\n //Retrive Save action Flag\n var saveaction = $(\"#saveaction\").is(':checked') ? 1 : 0;\n //Retrive Billing Address\n billing[\"prefix\"] = \"\";\n billing[\"firstname\"] = $(\"#name\").val();\n billing[\"lastname\"] = $(\"#blname\").val();\n billing[\"company\"] = \"\";\n billing[\"street\"] = $(\"#address\").val();\n billing[\"city\"] = $(\"#city\").val();\n billing[\"region\"] = $(\"#state\").val();\n billing[\"country\"] = $(\"#country\").val();\n billing[\"postcode\"] = $(\"#pincode\").val();\n billing[\"phone\"] = $(\"#phone\").val();\n billing[\"email\"] = $(\"#email\").val();\n //Retrive Shipping Address\n shipping[\"prefix\"] = \"\";\n shipping[\"firstname\"] = $(\"#recName\").val();\n shipping[\"lastname\"] = $(\"#recLName\").val();\n shipping[\"company\"] = \"\";\n shipping[\"street\"] = $(\"#Saddress\").val();\n shipping[\"city\"] = $(\"#Scity\").val();\n shipping[\"region\"] = $(\"#Sstate\").val();\n shipping[\"country\"] = $(\"#Scountry\").val();\n shipping[\"postcode\"] = $(\"#Spincode\").val();\n shipping[\"phone\"] = $(\"#recMobile\").val();\n address[\"billing\"] = billing;\n address[\"shipping\"] = shipping;\n previeworder[\"address\"] = address;\n localStorage[config.data[0].storage_key+\"_address\"] = Base64.encode(JSON.stringify(address));\n console.log(previeworder);\n var dirPath = dirname(location.href);\n // var fullPath = dirPath + \"/shipping_method.html\";\n var fullPath =\"shipping_method.html\";\n Page.redirect(fullPath, 'slide', 'down')\n //window.location = fullPath;\n}", "function openEditCustomerModal(customer) {\n $(\"#editCustomerModal\").modal(\"toggle\");\n $(\"#CustomerId\").val(customer.CustomerId);\n $(\"#editCustomerModal #CustomerName\").val(customer.CustomerName);\n $(\"#editCustomerModal #CustomerAddress\").val(customer.CustomerAddress);\n}", "handleAddContact() {\n const { firstName, sirName, date, contactItems } = this.state;\n const contactItem = {\n firstName: firstName,\n sirName: sirName,\n date: date\n };\n\n const newItems = [...contactItems, contactItem];\n localStorage.setItem('contactItems', JSON.stringify(newItems));\n this.setState({ contactItems: newItems, firstName: \"\", sirName: \"\" });\n }", "function save(cust) {\n var operation = cust.id ? updateCustomer : insertCustomer;\n return operation(cust);\n }", "function AddCustomer()\n{\n if(ValidateEmail(document.querySelector('#newemail').value)){\n let customer = {};\n customer.firstName = document.querySelector('#firstName').value;\n customer.lastName = document.querySelector('#lastName').value;\n customer.email = document.querySelector('#newemail').value;\n\n let xhr = new XMLHttpRequest();\n xhr.onreadystatechange = function(){\n if(this.readyState == 4 && this.status > 199 && this.status < 300)\n {\n document.querySelector('#firstName').value = '';\n document.querySelector('#lastName').value = '';\n document.querySelector('#newemail').value = '';\n }\n };\n xhr.open(\"POST\", 'https://localhost:5001/MainMenu/add', false);\n xhr.setRequestHeader('Content-Type', 'application/json');\n xhr.send(JSON.stringify(customer));\n \n let url = 'https://localhost:5001/MainMenu/get/' + customer.email;\n fetch(url)\n .then(response => response.json())\n .then(result => CustomerLocal(result));\n\n}\n}", "handleSubmit() {\r\n var staff = this.state.id;\r\n //alert(staff);\r\n localStorage.setItem('Staff', staff);\r\n \r\n this.getOrder();\r\n\r\n this.props.history.push(\"/Products\");\r\n\r\n }", "edit (student){\n localStorage.setItem(\"currentStudent\", JSON.stringify(student));\n this.setState({redirect : \"/editStudent\"})\n\n\n }", "saveData(){\n\t\t\t\tlocalStorage.clear();\n\t\t\t\tlet postData = {\n\t\t\t\t\t\t\t\t\t invoice: {\n\t\t\t\t\t\t\t\t\t customers: [\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t name: this.state.name,\n\t\t\t\t\t\t\t\t\t email: this.state.email,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdate: window.selectedDate,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tamountTotal: this.state.amountTotal.toFixed(2),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlineItems: this.state.lineItemsArray\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t ]\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t};\n\t\t\t\tlocalStorage.setItem('storeData', JSON.stringify(postData));\n\t\t\t\tnotify.show(\"Invoice successfully saved/sent\", \"success\", 2000,\"#0E1717\");\n\t\t\t\twindow.setTimeout(function(){location.reload()},1000)\n\t\t}", "function Save() {\n if ($('#ab121sgAddEdit').valid()) {\n if (vm.isNew) {\n dataContext.add(\"/api/ab121sg\",vm.ab121sg).then(function (data) {\n notify.showMessage('success', \"ab121sg record added successfully!\");\n\t\t\t\t\t\twindow.location.hash = \"/ab121sg/\";\n });\n } else {\n dataContext.upDate(\"/api/ab121sg\", vm.ab121sg).then(function (data) {\n notify.showMessage('success', \"ab121sg record updated successfully!\");\n\t\t\t\t\t\twindow.location.hash = \"/ab121sg/\";\n });\n }\n }\n }", "function customerController($scope, $http) {\n \n // declare variable for main ajax load and entry or edit mode\n $scope.loading = true;\n $scope.addMode = false;\n \n // get all customer information\n $http.get('/customers/').success(function (data) {\n $scope.customers = data;\n $scope.loading = false;\n }).error(function () {\n $scope.error = \"An error has occured while loading customers!\";\n $scope.loading = false;\n });\n \n // by pressing toggleEdit button ng-click in html, this method will be hit\n $scope.toggleEdit = function () {\n this.customer.editMode = !this.customer.editMode;\n };\n \n // by pressing toggleAdd button ng-click in html, this method will be hit\n $scope.toggleAdd = function () {\n $scope.addMode = !$scope.addMode;\n };\n \n // Insert Customer\n $scope.add = function () {\n $scope.loading = true;\n $http.post('/customers/', this.newcustomer).success(function (data) {\n alert(\"Added Sucessfully!!\");\n $scope.addMode = false;\n $scope.customers.push(data);\n $scope.loading = false;\n }).error(function (data) {\n $scope.error = \"An error has occured while Adding Customer! \" + data;\n $scope.loading = false;\n });\n };\n \n // Update Customer\n $scope.saveCustomer = function () {\n var cstmr = this.customer;\n $http.put('/customers/' + cstmr._id, cstmr).success(function (data) {\n alert(\"Saved Successfully!!\");\n cstmr.editMode = false;\n $scope.loading = false;\n }).error(function (data) {\n $scope.error = \"An Error has occured while Saving customer! \" + data;\n $scope.loading = false;\n });\n };\n \n // Delete Customer\n $scope.deleteCustomer = function () {\n $scope.loading = true;\n var Id = this.customer._id;\n $http.delete('/customers/' + Id).success(function (data) {\n alert(\"Deleted Sucessfully!!\");\n $.each($scope.customers, function (i) {\n if ($scope.customers[i].Id === Id) {\n $scope.customers.splice(i, 1);\n return false;\n }\n });\n $scope.loading = false;\n }).error(function (data) {\n $scope.error = \"An error occured while Deleting Customer! \" + data;\n $scope.loading = false;\n });\n };\n \n // Sort Customers - using angular-utils-pagination\n $scope.sort = function (keyname) {\n $scope.sortKey = keyname; //set the sortKey to the param passed\n $scope.reverse = !$scope.reverse; //if true make it false and vice versa\n }\n}", "save (state, payload) {\n state.firstName = payload.firstName\n state.lastName = payload.lastName\n state.age = payload.age\n state.mobileNumber = payload.mobileNumber\n state.emailAddress = payload.emailAddress\n state.dateOfBirth = payload.dateOfBirth\n state.customerQuery = payload.customerQuery\n }", "function addNewCoffee(e) {\n e.preventDefault(); // don't submit the form, we just want to update the data\n\n console.log(localStorage);\n\n // Declare empty newCoffee object to store the new coffee info (id, name, roast)\n const newCoffee = {};\n\n // Add the id property to newCoffee object by using coffees array length plus 1\n newCoffee.id = coffees.length + 1;\n\n // Declare newCoffee variable to store the new user coffee name\n const newCoffeeName = addCoffee.value;\n if (newCoffeeName.length > 0 && isNaN(newCoffeeName)) {\n newCoffee.name = newCoffeeName;\n } else {\n console.log(\"Invalid coffee name entry.\");\n\n //set default for undefined coffee name entry\n newCoffee.name = \"newCoffee\";\n }\n\n // Declare newRoast variable to store the new user selected roast type\n const newRoast = addRoast.value;\n newCoffee.roast = newRoast;\n\n // Add newly created coffee object to coffees and filteredCoffees array then re-render\n coffees.push(newCoffee);\n filteredCoffees.push(newCoffee);\n\n // Add newly created coffee object to localStorage\n localStorage.setItem(`${newCoffee.id}`, JSON.stringify(newCoffee));\n tbody.innerHTML = renderCoffees(filteredCoffees);\n}", "function loadAsEditAddress() {\n\n var customerInfo = customerAddress.addresses;\n\n $.addressLbl.setText(\"EDIT ADDRESS\");\n\n $.fname.setValue(customerInfo.firstname || \"\");\n $.lname.setValue(customerInfo.lastname || \"\");\n $.phoneNo.setValue(customerInfo.mobile || \"\");\n $.stateLbl.setText(customerInfo.state || \"\");\n $.cityLbl.setText(customerInfo.city || \"\");\n $.addressLine1.setValue(customerInfo.street1 || \"\");\n $.addressLine2.setValue(customerInfo.street2 || \"\");\n $.pinCode.setValue(customerInfo.pincode || \"\");\n\n $.stateLbl.region_id = \"\";\n\n if (customerInfo.state != null) {\n\n // Ti.API.info('customerInfo.state--->' + customerInfo.state);\n\n var regionId = _.where(regionList, {\n \"default_name\" : ((customerInfo.state)).trim(),\n });\n\n //Ti.API.info('default_name--->' + JSON.stringify(regionId));\n\n if (regionId.length != 0) {\n //Ti.API.info('********** region_id *************' +regionId[0].region_id +\"\\t \" + JSON.stringify(regionId[0].region_id));\n \n $.stateLbl.region_id = ((regionId[0].region_id) || \"\");\n $.stateLbl.setText((regionId[0].default_name).toUpperCase());\n $.stateLbl.default_name = regionId[0].default_name;\n }\n\n }\n\n _.each(regionList, function(value, k) {\n if (value.default_name === customerInfo.state) {\n setCity(value.city);\n }\n });\n\n}", "function CreateCustomerComponent(_sharedDataService, _formBuilder) {\n this._sharedDataService = _sharedDataService;\n this._formBuilder = _formBuilder;\n this.customerAdd = new _Common_Customer__WEBPACK_IMPORTED_MODULE_1__[\"Customer\"](0, \"\", \"\");\n this.customerAdded = new _Common_Customer__WEBPACK_IMPORTED_MODULE_1__[\"Customer\"](0, \"\", \"\");\n this.showTable = false;\n }", "renderCreateForm() {\n return (\n <form onSubmit={this.handleSave} >\n <div className=\"form-group row\" >\n <input type=\"hidden\" name=\"id\" value={this.state.contactData.id} />\n </div>\n <div className=\"form-group row\" >\n <input type=\"hidden\" name=\"userId\" value={this.state.contactData.userId} />\n </div>\n < div className=\"form-group row\" >\n <label className=\" control-label col-md-12\" htmlFor=\"type\">Contact Type</label>\n <div className=\"col-md-4\">\n <input className=\"form-control\" type=\"text\" name=\"type\" defaultValue={this.state.contactData.type}\n onChange={this.handleInputChange} required />\n </div>\n </div >\n < div className=\"form-group row\" >\n <label className=\" control-label col-md-12\" htmlFor=\"lastName\">Contact value</label>\n <div className=\"col-md-4\">\n <input className=\"form-control\" type=\"text\" name=\"value\" defaultValue={this.state.contactData.value}\n onChange={this.handleInputChange} required />\n </div>\n </div >\n <div className=\"form-group\">\n <button type=\"submit\" className=\"btn btn-secondary\">Save</button>\n <button className=\"btn btn-secondary\" onClick={this.handleCancel}>Cancel</button>\n </div >\n </form >\n )\n }", "function editCustomer() {\n var customer = {\n CustomerId: $(\"#CustomerId\").val(),\n CustomerName: $(\"#editCustomerModal #CustomerName\").val(),\n CustomerAddress: $(\"#editCustomerModal #CustomerAddress\").val()\n };\n\n $.post(\"/Customers/EditCustomer\", customer, function (data, status) {\n updateCustomerTable();\n });\n}", "function handleSubmit(event) {\n event.preventDefault();\n new Service(\n document.getElementById('customerName').value,\n document.getElementById('customerlocation').value,\n document.getElementById('service').value,\n document.getElementById('serviceTime').value);\n //this line to set data in local storig\n localStorage.setItem('Service', JSON.stringify(Service.allService));\n\n serviceForm.reset();\n renderOrderedServices();\n}", "populateForm() {\n const {name, description, status} = this.props;\n this.setState({\n editName: name,\n editDescription: description,\n editStatus: status,\n editForm: true\n });\n }", "function prepareToEditInvoice() {\n\t\t\tvar invoiceId = $state.params.invoiceId;\n\t\t\tif (!invoiceId) return;\n\n\t\t\tvar custId = $state.params.customerId;\n\n\t\t\tshowLoader();\n\t\t\t$q.when(LoadRequiredData())\n\t\t\t\t.then(function(msg) {\n\t\t\t\treturn $q.when(invoiceService.getInvoice(invoiceId));\n\t\t\t})\n\t\t\t\t.then(function (invoice) {\n\t\t\t\t//\tconsole.log(invoice);\n\t\t\t\t$scope.invoice = invoice;\n\t\t\t\t$scope.invoiceItems = [];\n\t\t\t\t$scope.deletedItems = [];\n\t\t\t\t$scope.itemsWithOutId = 0;\n\t\t\t\t$scope.itemsWithIdinDel = 0;\n\n\t\t\t\tif(custId){\n\t\t\t\t\t$scope.selectedCustomer = $scope.customers.filter(function(cust) {\n\t\t\t\t\t\treturn custId === cust.entity.id;\n\t\t\t\t\t})[0];\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$scope.selectedCustomer = $scope.customers.filter(function(cust) {\n\t\t\t\t\t\treturn invoice.entity.get('customer').id === cust.entity.id;\n\t\t\t\t\t})[0];\n\t\t\t\t}\n\n\t\t\t\treturn $q.when(customerChangedHelper());\n\t\t\t})\n\t\t\t\t.then(function() {\n\t\t\t\tprepareEditForm();\n\n\t\t\t}, function(error) {\n\t\t\t\thideLoader();\n\t\t\t\tconsole.log(error.message);\n\t\t\t});\n\t\t}", "function setChangeCustomer(value){\r\n\r\n\tvar id \t\t\t= document.getElementById(\"id\"+value).textContent;\r\n\tvar name \t\t= document.getElementById(\"name\"+value).textContent;\r\n\tvar surname \t= document.getElementById(\"surname\"+value).textContent;\r\n\tvar birth \t\t= document.getElementById(\"birth\"+value).textContent;\r\n\tvar place \t\t= document.getElementById(\"place\"+value).textContent;\r\n\tvar addressC \t= document.getElementById(\"address\"+value).textContent;\r\n\tvar parts \t\t= addressC.split(\",\");\r\n\tvar address\t\t= parts[0];\r\n\tvar civicNumber = parts[1];\r\n\tvar city \t\t= document.getElementById(\"city\"+value).textContent;\r\n\tvar province\t= document.getElementById(\"province\"+value).textContent;\r\n\tvar cap \t\t= document.getElementById(\"cap\"+value).textContent;\r\n\tvar phone \t\t= document.getElementById(\"phone\"+value).textContent;\r\n\tvar email \t\t= document.getElementById(\"email\"+value).textContent;\r\n\tvar cap1\t\t= parseInt(cap);\r\n\tvar civ\t\t\t= parseInt(civicNumber);\r\n\t$('#idCustomer').val(id);\r\n\t$('#modNameCl').val(name);\r\n\t$('#modSurnameCl').val(surname);\r\n\t$('#modBirthCl').val(birth);\r\n\t$('#modPlaceCl').val(place);\r\n\t$('#modAddressCl').val(address);\r\n\t$('#modCivicNumberCl').val(civ);\r\n\t$('#modCityCl').val(city);\r\n\t$('#modProvinceCl').val(province);\r\n\t$('#modCapCl').val(cap1);\r\n\t$('#modPhoneCl').val(phone);\r\n\t$('#modEmailCl').val(email);\r\n\r\n}", "function getCustomer(id) {\n if (id === 'new') {\n $scope.customer = {};\n } else {\n CustomerService.getCustomer(id).success(function(cust) {\n $scope.customer = cust;\n }).error(function() {\n $location.path('/customer');\n });\n }\n\n }", "function getUserData() {\n return customer = {\n 'fullname' : document.getElementById('firstname').value + \" \" + document.getElementById('lastname').value,\n 'addressline1' : document.getElementById('address').value,\n 'postalcode' : document.getElementById('zip').value,\n 'country' : document.getElementById('country').value\n }\n}", "function basicInfo($scope, $http, toaster, $state, $window, $uibModal, commonServices, formEditService) {\n $scope.formStatus = false;\n $scope.formEditStatus = false;\n $scope.submitText = \"Save\";\n function get_age(born, now) {\n var birthday = new Date(born.getFullYear(), born.getMonth(), born.getDate());\n if (now >= birthday)\n return now.getFullYear() - born.getFullYear();\n else\n return now.getFullYear() - born.getFullYear() - 1;\n }\n\n\n $scope.basicInfoFormData = {\n gender: 'male',\n NRI: 'RI',\n is_married: 'single',\n spouse_age: '',\n children: 0,\n dependents: 0,\n token: window.localStorage.getItem(\"token\"),\n _userid: (IsAdmin())?window.currentUesrId:window.localStorage.getItem(\"userid\")\n };\n $scope.init = function () {\n if(!IsAdmin()){formStatus();}\n var options = {\n types: ['(cities)']\n };\n var input = document.getElementById('geo-location');\n new google.maps.places.Autocomplete(input, options);\n getDefaultValue();\n };\n\n var explodeLocation = function (location) {\n var locationArray = location.split(', ');\n return {\n city: locationArray[0],\n state: locationArray.length == 3 ? locationArray[1] : locationArray[0],\n country: locationArray.length == 3 ? locationArray[2] : locationArray.length == 2 ? locationArray[1] : locationArray[0]\n };\n };\n\n $scope.submitBasicInfoForm = function () {\n var formObj = document.getElementById(\"basicInfoForm\");\n\n var now = moment().startOf('day');\n var dob = moment(formObj.dob.value).startOf('day');\n if (now.diff(dob, 'years', true) < 18){\n var modalInstance = $uibModal.open({\n templateUrl: 'views/basic_modal.html',\n controller: modelButtonController,\n windowClass: \"animated fadeIn\"\n });\n return;\n }\n if($scope.basicInfoFormData.is_married === 'married') {\n if ($scope.basicInfoFormData.spouse_age < 18 || $scope.basicInfoFormData.spouse_age > 100) {\n toaster.error({body: \"Spouse age should be between 18 years and 100 years\"});\n return false;\n }\n }\n if($scope.formStatus){\n $state.go('forms.wizard.service_request');\n }else{\n $scope.basicInfoFormData.dob = moment.utc(formObj.dob.value).format();\n $scope.basicInfoFormData.location = formObj.location.value;\n $scope.basicInfoFormData = angular.extend($scope.basicInfoFormData, explodeLocation($scope.basicInfoFormData.location));\n var url = window.link.basics;\n var userId = (IsAdmin())?window.currentUesrId:window.localStorage.getItem(\"userid\");\n if($scope.formEditStatus || IsAdmin()){\n url = window.link.basics+\"/\"+userId;\n }\n $http({\n method: 'POST',\n url: url,\n data: $.param($scope.basicInfoFormData),\n headers: {'Content-Type': 'application/x-www-form-urlencoded'}\n }).then(function successCallback(response) {\n toaster.success(\"Saved\");\n if(!$scope.formEditStatus) {\n var isFormEdit = {\n personal: false,\n bank: true,\n nominee: true,\n kyc: true,\n docs: true,\n service: true\n };\n commonServices.setIsEditable(false);\n formEditService.setIsEditable(isFormEdit);\n }\n if($scope.formEditStatus){\n $state.go(\"forms.wizard.personal-info\");\n } else {\n $state.go(\"forms.my_finatwork\");\n }\n }, function errorCallback(response) {\n //toaster.error({body: response.data.err});\n });\n }\n };\n\n function getDefaultValue(){\n var userId = (IsAdmin())?window.currentUesrId:window.localStorage.getItem(\"userid\");\n $http({\n method: 'GET',\n url: window.link.basics+\"/\"+userId,\n headers : { 'x-access-token': window.localStorage.getItem('token') }\n }).then(function successCallback(response) {\n if (response.data != null) {\n $scope.basicInfoFormData = {\n gender: response.data.gender,\n NRI: response.data.NRI,\n is_married:response.data.is_married,\n spouse_age: response.data.spouse_age,\n children: response.data.children,\n dependents: response.data.dependents,\n dob: moment(response.data.dob, \"YYYY-MM-DD\").format('YYYY-MM-DD'),\n token: window.localStorage.getItem(\"token\"),\n _userid: userId\n };\n if(response.data.city === response.data.state && response.data.state === response.data.country){\n $scope.basicInfoFormData.location = response.data.city;\n } else if(response.data.city === response.data.state) {\n $scope.basicInfoFormData.location = response.data.city +', ' + response.data.country;\n } else {\n $scope.basicInfoFormData.location = response.data.city +', ' + response.data.state +', ' + response.data.country;\n }\n }\n }, function errorCallback(response) {\n $scope.basicInfoFormData = {\n gender: 'male',\n NRI: 'RI',\n location: '',\n is_married: 'single',\n spouse_age: 0,\n children: 0,\n dependents: 0,\n token: window.localStorage.getItem(\"token\"),\n _userid: userId\n };\n });\n }\n\n function formStatus() {\n $http({\n method: 'GET',\n url: window.link.engagement + \"/\" + window.localStorage.getItem(\"userid\"),\n headers: {'x-access-token': window.localStorage.getItem('token')}\n }).then(function successCallback(response) {\n try {\n var isActive = false;\n for (var i = 0; i < response.data.registration.length; i++) {\n if (response.data.registration[i].status == \"acct_verified\") {\n isActive = true;\n }\n }\n $scope.formStatus = isActive;\n if(isActive) {\n $(\"#basicInfoForm :input\").attr(\"disabled\", true);\n $(\"#basicInfoForm :submit\").attr(\"disabled\", false);\n }\n var isEditable = false;\n for (var i = 0; i < response.data.accountInfo.length; i++) {\n if (response.data.accountInfo[i].state == \"basicInfo\") {\n isEditable = true;\n }\n }\n if(isEditable)\n $scope.submitText = \"Update\";\n $scope.formEditStatus = isEditable;\n } catch (e) {\n alert('State name is incorrect!');\n }\n }, function errorCallback(response) {\n console.log(response);\n });\n }\n}", "function createAddressBook() {\n\n var firstName = document.getElementById('firstName').value;\n var lastName = document.getElementById('lastName').value;\n var address = document.getElementById('address').value;\n var city = document.getElementById('city').value;\n var state = document.getElementById('state').value;\n var zip = document.getElementById('zip').value;\n var mobile = document.getElementById('mobile').value;\n if (validate(firstName, lastName, address, city, state, zip, mobile)) {\n\n\n var addressObject = {\n firstName: firstName,\n lastName: lastName,\n address: address,\n city: city,\n state: state,\n zip: zip,\n mobile: mobile\n };\n\n if (selectedIndex === -1) {\n addresBookArray.push(addressObject);\n } else {\n addresBookArray.splice(selectedIndex, 1, addressObject);\n }\n\n localStorage.AddressBookRecord = JSON.stringify(addresBookArray);\n init();\n document.getElementById(\"flag\").innerHTML = \"Record Added\";\n } else {\n document.getElementById(\"flag1\").innerHTML = \"Fill all Field Properly\";\n }\n\n\n}", "function loadManageBusinessFields() {\n // Pull business details from local storage\n var businessName = localStorage.getItem('businessName');\n console.log(localStorage.getItem('businessName'));\n if (businessName != null && businessName != 'undefined') {\n document.getElementById('businessName').value = businessName;\n }\n\n var businessPhone = localStorage.getItem('businessPhone');\n if (businessPhone != null && businessPhone != 'undefined') {\n document.getElementById('businessPhone').value = localStorage.getItem('businessPhone');\n }\n\n var businessAddress = localStorage.getItem('businessAddress');\n if (businessAddress != null && businessAddress != 'undefined') {\n document.getElementById('set-address').value = localStorage.getItem('businessAddress');\n }\n}", "render() {\n\n let { currentContact } = this.state\n\n if (!this.state.editMode) {\n\n return (\n <div>\n <div className=\"details\">\n <img src={currentContact.imgUrl} alt=\"\" />\n <h1>{currentContact.firstName} {currentContact.lastName}</h1>\n <p>{currentContact.email}</p> <p>{currentContact.phone}</p>\n <button className=\"btn btn-info\" onClick={() => { this.toggleEditMode() }}>Edit Contact</button>\n <Link to=\"/contacts\"> Back </Link>\n </div>\n </div>\n )\n } else {\n\n return (\n <div>\n <div className=\"row add-contact\">\n <div className=\"col-md-9\">\n <label>First Name</label>\n <input type=\"text\" className=\"form-control\" value={currentContact.firstName}\n onChange={event => this.updateState('firstName', event.target.value)} />\n </div>\n\n <div className=\"col-md-9\">\n <label>Last Name</label>\n <input type=\"text\" className=\"form-control\" value={currentContact.lastName}\n onChange={event => this.updateState('lastName', event.target.value)} />\n </div>\n\n <div className=\"col-md-9\">\n <label>Email</label>\n <input type=\"text\" className=\"form-control\" value={currentContact.email}\n onChange={event => this.updateState('email', event.target.value)} />\n </div>\n <div className=\"col-md-9\">\n <label>Phone #</label>\n <input type=\"text\" className=\"form-control\" value={currentContact.phone}\n onChange={event => this.updateState('phone', event.target.value)} />\n </div>\n <div className=\"col-md-9\">\n <label>Pic URL</label>\n <input type=\"text\" className=\"form-control\" value={currentContact.imgUrl}\n onChange={event => this.updateState('imgUrl', event.target.value)} />\n <br />\n </div>\n </div>\n <button className=\"btn btn-success\" onClick={() => {\n if (!this._emailValidation(currentContact.email)) {\n alert(\"Invalid Email\");\n return\n }\n if (!currentContact.firstName && !currentContact.lastName) {\n alert(\"Enter at least a first or last name\");\n return\n }\n this.toggleEditMode()\n }}>Confirm Edit</button>\n </div>\n )\n }\n }", "function addedSuccess (){\n $scope.vm.editForm.$dirty = false;\n vm.addCustomer = true;\n vm.addMessage = \"Customer Added\";\n vm.title = 'Edit';\n vm.buttonText = 'Update';\n startTimer();\n }", "function saveObject(form) {\n /// know the object\n var which = form.dataset.which;\n // save values as vars\n let objectName = document.getElementById('' + which + 'Name');\n /// preparing form final validation\n //// checking what object to save in DB\n switch (which) {\n case 'student':\n /// gets all checkBox of courses selected to add them to Deals Table.\n var selectedCoursesArray = [];\n var myCheckBoxContChildren = $('#' + which + 'Courses').children();\n for (var i = 0; i < myCheckBoxContChildren.length; i++) {\n if (myCheckBoxContChildren[i].checked) {\n selectedCoursesArray.push(myCheckBoxContChildren[i].dataset.courseid)\n }\n }\n // phone and email validations happened onblur events\n var objectPhone = document.getElementById('' + which + 'Phone');\n var objectEmail = document.getElementById('' + which + 'Email');\n var formOk = (objectName.value.length > 0 && letSaveEmail && letSavePhone);\n break;\n case 'course':\n var objectDescription = document.getElementById('' + which + 'Description');\n ///Course name existence checked ontop on blur event.\n var formOk = (courseName.value.length > 0 && letSaveCName && objectDescription.value.length > 0);\n break;\n case 'administator':\n // phone and email validations happened onblur events\n var objectPhone = document.getElementById('' + which + 'Phone');\n var objectEmail = document.getElementById('' + which + 'Email');\n if (changePassword) {\n /// determine first if user clicked on change password button\n var objectPassword = document.getElementById('' + which + 'Password').value;\n ///add case\n if (objectPassword.length >= 4) {\n //letSavePass stays true\n $('#passErrMsg').hide();\n $('#passErrMsg').empty();\n /// edit case\n if (letSavePass === null) {\n ///null happens only in edit case: if no request to change its still a null.\n letSavePass = false;\n }\n ;\n } else {\n ///err.. password is too short\n $('#passErrMsg').html(\"password is too short-minimum length: 4 digits.\");\n $('#passErrMsg').show();\n }\n ;\n }\n ;\n var objectPassword = document.getElementById('' + which + 'Password');\n var objectRole = document.getElementById('beautifulSelect');\n if (letSavePass === null) {\n //edit case\n if (changePassword) {\n //need to add password.\n var formOk = (objectName.value.length > 0 && $('#' + which + 'Password').val().length >= 4 && letSaveEmail && letSavePhone && letAddRole);\n\n } else {\n //no need to add password.\n var formOk = (objectName.value.length > 0 && letSaveEmail && letSavePhone && letAddRole);\n }\n } else if (letSavePass === false || letSavePass === true) {\n // need to add password.\n var formOk = (objectName.value.length > 0 && $('#' + which + 'Password').val().length >= 4 && letSaveEmail && letSavePhone && letAddRole);\n }\n ;\n break;\n }\n ;\n let addingSucsMsg = document.getElementById('addingSucsMsg');\n let addingErrMsg = document.getElementById('addingErrMsg');\n addingSucsMsg.style.display = \"none\";\n //// make sure didn't upload any wrong type of image\n if ((letSaveImage) || letSaveImage === null) {\n ////\n ///// make sure name is set and email is in the right format.\n if (formOk) {\n addingErrMsg.innerHTML = \"\";\n addingErrMsg.style.display = \"none\";\n ////\n /// last modifying before calling controller.\n var formData = new FormData();\n formData.append('name', objectName.value);\n /// modifying depends on which object\n switch (which) {\n case 'student':\n formData.append('email', objectEmail.value);\n formData.append('phone', objectPhone.value.split('-').join(''));\n formData.append('selectedCourses', JSON.stringify(selectedCoursesArray));\n formData.append('addStudent', null);\n break;\n case 'course':\n formData.append('description', objectDescription.value);\n formData.append('addCourse', null);\n break;\n case 'administator':\n formData.append('email', objectEmail.value);\n formData.append('phone', objectPhone.value.split('-').join(''));\n if (!(letSavePass === null)) {\n ///user want to update password\n formData.append('password', objectPassword.value);\n } else {\n //no change needed\n formData.append('password', \"no\");\n }\n ;\n formData.append('role', objectRole.value);\n formData.append('addAdministator', null);\n break;\n }\n ;\n //// if chose to not use image - give him default image\n if (letSaveImage === null) {\n formData.append('image', 'useDefault');\n } else {\n //// user uploaded an image\n let fileSelect = document.getElementById('' + which + 'Image');\n let file = fileSelect.files[0];\n //// name is going to be student_id for future uses..\n let filename = '.jpg';\n formData.append('image', file, filename);\n }\n ;\n // use hidden\n var hidden = $('#hiddenInput')[0];\n var what = hidden.dataset.what;\n //check what we are doing right now.\n switch (what) {\n case 'add':\n //// calling XHR post Function. for adding new object\n XHRcall(formData, which);\n break;\n case 'edit':\n // gather data about the user and send it along with form\n let who = hidden.dataset.who;\n formData.append('objectID', who);\n formData.append('edit', null);\n setTimeout(() => {\n saveNUpdate(formData, which);\n }, 50);\n if (($('#existingImageOpinion')[0].checked)) {\n removeExistingImage(who, which);\n }\n ;\n break;\n }\n ;\n\n } else {\n ///// not everything is as requested.\n addingErrMsg.innerHTML = \"Some of the required fields are empty or not as requested.\";\n addingErrMsg.style.display = \"block\";\n /// wait 4 seconds, let this error gone away.\n setTimeout(function () {\n addingErrMsg.style.display = \"none\";\n }, 4000)\n }\n }\n ;\n}", "function onCustomerSaveComplete(response, status)\n{\n\t\tif (status == \"success\")\n\t\t{\n\t\t\t\tvar resultSet = JSON.parse(response);\n\t\t\t\t\n\t\t\t\tif (resultSet.status.trim() == \"success\")\n\t\t\t\t{\n\t\t\t\t\t$(\"#alertSuccess\").text(\"Successfully saved.\");\n\t\t\t\t\t$(\"#alertSuccess\").show();\n\t\t\t\t\t$(\"#divCustomerGrid\").html(resultSet.data);\n\t\t\t\t} else if (resultSet.status.trim() == \"error\")\n\t\t\t\t{\n\t\t\t\t\t$(\"#alertError\").text(resultSet.data);\n\t\t\t\t\t$(\"#alertError\").show();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else if (status == \"error\")\n\t\t\t{\n\t\t\t\t$(\"#alertError\").text(\"Error while saving customer.\");\n\t\t\t\t$(\"#alertError\").show();\n\t\t\t} else\n\t\t\t{\n\t\t\t\t$(\"#alertError\").text(\"Unknown error while saving the customer\");\n\t\t\t\t$(\"#alertError\").show();\n\t\t\t}\n\t\t\t$(\"#hidCustomerID\").val(\"\");\n\t\t\t$(\"#formCustomer\")[0].reset();\n}", "toggleAddEmployeeForm(){\n\n if(this.addEmployeeForm == false){\n this.addEmployeeForm =true;\n }else {\n this.addEmployeeForm = false;\n }\n\n }", "handleSave(event) {\n event.preventDefault();\n const data = new FormData(event.target);\n\n // PUT request for Edit user contact. \n if (this.state.contactData.id) {\n fetch('api/usercontacts/' + this.state.contactData.id, {\n method: 'PUT',\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify(this.state.contactData),\n\n }).then((response) => response.json())\n .then((responseJson) => {\n this.props.history.push(\"/view-user-contacts/\" + this.state.contactData.userId);\n })\n }\n\n // POST request for Add user contact. \n else {\n fetch('api/usercontacts', {\n method: 'POST',\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify(this.state.contactData),\n\n }).then((response) => response.json())\n .then((responseJson) => {\n this.props.history.push(\"/view-user-contacts/\" + this.state.contactData.userId);\n })\n }\n }", "function competitorEditForm() {\n\t\tvar idWithString = this.id;\n\t\t//substring to get the id only\n\t\tvar id = idWithString.substr(1);\n\t\t// set value to hidden input \n\t\t$('#competitorId').val(id);\n\t\t// get the current row\n\t\tvar currentRow = $(this).closest(\"tr\");\n\t\t///get value\n\t\tvar competitorName = currentRow.find(\"td:eq(0)\").text(); // get current row 1st TD value\n\t\tcompetitorName = competitorName.trim();\n\t\tvar competitorField = currentRow.find(\"td:eq(1)\").text(); // get current row 2nd TD\n\t\tcompetitorField = competitorField.trim()\n\t\tvar competitorDetail = currentRow.find(\"td:eq(2)\").text(); // get current row 3rd TD\n\t\tcompetitorDetail = competitorDetail.trim();\n\n\n\t\t// insert data to form\n\t\t$('#competitorEditName').val(competitorName);\n\t\t$('#competitorEditField').val(competitorField);\n\t\t$('#competitorEditDetail').val(competitorDetail);\n\n\t}", "function formToJSONforCustomer() {\n var customerId = $('#custId').val();\n return JSON.stringify({\n \"id\": customerId == \"\" ? null : customerId,\n \"dateborn\": $('#custDb').val(),\n \"email\": $('#custEmail').val(),\n \"firstname\": $('#custFn').val(),\n \"lastname\": $('#custLn').val(),\n \"pass\": $('#custPass').val()\n });\n}", "function PassCard({ edit, data, formData, onDelete, handleSubmit, handleEdit, handleChange }) {\n\treturn (\n\t\t<form onSubmit={(event) => { handleSubmit(event) }} className=\"flex flex-col p-8 rounded-lg mb-8 bg-white border-2 bg-opacity-20 shadow-lg pin-r pin-y md:w-4/5\">\n\t\t\t<div className=\"flex justify-between\">\n\t\t\t\t<input type=\"hidden\" name=\"id\" value={formData.id} />\n\t\t\t\t<span className=\"featuredTitle\">\n\t\t\t\t\t{edit ? <input name=\"name\" className=\"w-full border-2 rounded-md hover:border-blue-400 my-1\" style={{ width: \"70%\" }} type=\"text\" value={formData.name} onChange={handleChange} /> : <>{data.name}</>}\n\t\t\t\t</span>\n\t\t\t\t<div className=\"flex justify-end items-end\">\n\t\t\t\t\t<button className=\"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded\" onClick={(event) => { handleEdit(event) }}>{edit ? \"Cancel\" : \"Edit\"}</button>\n\t\t\t\t\t<DeleteOutline className=\"text-red-600 cursor-pointer\" style={{fontSize: 40}} onClick={onDelete} />\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div className=\"featuredMoneyContainer\">\n\t\t\t\t<span className=\"featuredMoney\">{edit ? <input name=\"price\" className=\"w-full border-2 rounded-md hover:border-blue-400 my-1\" type=\"text\" style={{ width: \"80px\" }} value={formData.total_cost} onChange={handleChange} /> : <>{data.total_cost}</>}</span>\n\t\t\t</div>\n\n\n\t\t\t<span className=\"featuredSub\">\n\t\t\t\t{edit ? <input name=\"sessions_per_week\" className=\"w-full border-2 rounded-md hover:border-blue-400 my-1\" type=\"text\" value={formData.class_cost} onChange={handleChange} /> : <>{data.class_cost}</>}\n\t\t\t</span>\n\n\t\t\t<br />\n\t\t\t{edit ? <button className=\"bg-red-500 hover:bg-red-700 text-white font-bold py-2 px-4 rounded\" type=\"submit\">Update</button> : \"\"}\n\t\t</form>\n\t)\n}", "function loadCustomerInModal(customerId) {\n \n\tGetCustomerInfo(function(data) {\n \n\t\t$(\"#CusFirstnameUp\").val(data.customer_firstname);\n\t\t$(\"#CusMiddlenameUp\").val(data.customer_middlename);\n\t\t$('#CusLastnameUp').val(data.customer_lastname);\n\t\t$(\"#CusMeternumberUp\").val(data.customer_meter_no);\n\t\t$(\"#CusContactUp\").val(data.customer_contact);\n\t\t$(\"#CusAddressUp\").val(data.customer_address);\n\t\t$('#loadingImageUpdateCustomer').hide();\n\t}, customerId);\n}", "handleSaveButton() {\r\n let email = document.getElementById(\"email\");\r\n let phoneNumber = document.getElementById(\"phoneNumber\");\r\n let isActive = document.getElementsByName(\"isActive\")[0];\r\n let department = document.getElementById(\"department\");\r\n let password = document.getElementById(\"password\");\r\n let confirmPassword = document.getElementById(\"confirmPassword\");\r\n if((this.state.fullNameControl.touched && this.state.fullNameControl.hasSuccess) && \r\n (this.state.contactPreferenceControl.touched && !this.state.contactPreferenceControl.hasError) &&\r\n ((email.required && this.state.emailControl.touched && this.state.emailControl.hasSuccess && !this.state.emailControl.invalid) || !email.required) && \r\n ((phoneNumber.required && this.state.phoneNumberControl.touched && this.state.phoneNumberControl.hasSuccess) || !phoneNumber.required) &&\r\n (this.state.genderControl.touched && this.state.genderControl.hasSuccess) && \r\n ((isActive.required && !this.state.isActiveControl.invalid) || !isActive.required) &&\r\n ((department.required && (this.state.departmentControl.touched && !this.state.departmentControl.hasError)) || !department.required) &&\r\n ((password.required && (this.state.passwordControl.touched && !this.state.passwordControl.hasError)) || !password.required) &&\r\n ((confirmPassword.required && (this.state.confirmPasswordControl.touched && !this.state.confirmPasswordControl.hasError)) || !confirmPassword.required) &&\r\n this.state.employee.password === this.state.employee.confirmPassword){\r\n this.setState({employeeForm : {invalid: false}});\r\n } else {\r\n this.setState({employeeForm : {invalid: true}});\r\n }\r\n }", "function handleChange(event) {\n setCustomerCurrentState({\n ...customerCurrentState,\n [event.target.name]: event.target.value,\n });\n }", "function storeForm() {\n /*jshint validthis:true */\n var form = $(this);\n var formId = form[0].id;\n if (!formId) return;\n var formJSON = app.formToData(form);\n if (!formJSON) return;\n app.formStoreData(formId, formJSON);\n form.trigger('store form:storedata', {data: formJSON});\n }", "static setEditState(state) {\n window.localStorage.setItem(\"edit\", JSON.stringify({\n game: state.game.getSaveState(),\n params: state.params\n }));\n }", "function saveState() {\n const state = {\n cf: cfSelect.value,\n gf: gfSelect.value,\n mf: mfSelect.value,\n am: amSelect.value,\n };\n localStorage.setItem('collecting_together_form', JSON.stringify(state));\n }", "function previewShipMyIdForm(amount) {\n var name = $(\"#name\").val();\n var lname = $(\"#blname\").val();\n var phone = $(\"#phone\").val();\n var email = $(\"#email\").val();\n var address = $(\"#address\").val();\n var city = $(\"#city\").val();\n var state = $(\"#state\").val();\n var country = $(\"#country\").val();\n var pincode = $(\"#pincode\").val();\n var PreviewOrder = new Object();\n PreviewOrder[\"name\"] = name;\n PreviewOrder[\"lname\"] = lname;\n PreviewOrder[\"phone\"] = phone;\n PreviewOrder[\"email\"] = email;\n PreviewOrder[\"address\"] = address;\n PreviewOrder[\"city\"] = city;\n PreviewOrder[\"state\"] = state;\n PreviewOrder[\"country\"] = country;\n PreviewOrder[\"pincode\"] = pincode;\n PreviewOrder[\"totamt\"] = amount;\n var ship_order = JSON.stringify(PreviewOrder);\n localStorage[config.data[0].storage_key+\"_PreviewOrder\"] = ship_order;\n var dirPath = dirname(location.href);\n var fullPath = dirPath + \"/shiptomyid.html\";\n window.location = fullPath;\n}", "constructor(props) {\n super(props);\n\n if (props.orderID) {\n // EDIT mode\n const order = OrdersData.findOne({ _id: props.orderID });\n const product = ProductsData.findOne({ _id: order.productID });\n const account = AccountsData.findOne({ _id: product.accountID });\n\n initialState = {\n mode: 'EDIT',\n orderID: props.orderID,\n product,\n orderedAt: moment(order.orderedAt),\n deliverBefore: moment(order.deliverBefore),\n orderQuantity: comma(order.orderQuantity),\n deliverDateStrict: order.deliverDateStrict,\n deliverFast: order.deliverFast,\n plateStatus: order.plateStatus, // \"confirm\" : 확인, \"new\" : 신규, \"edit\" : 수정\n workMemo: order.workMemo,\n deliverMemo: order.deliverMemo,\n status: order.status, // 작업지시 직후: 압출중, --> 'printing' --> 'cutting'\n isCompleted: false,\n isDelivered: false,\n completedQuantity: '',\n completedAt: '',\n deliveredAt: '',\n orderedAtEmpty: false,\n deliverBeforeEmpty: false,\n orderQuantityEmpty: false,\n isConfirmationModalOpen: false,\n confirmationTitle: '',\n confirmationDescription: [],\n error: account ? '' : '업체 정보가 없습니다. 작업지시가 불가능합니다.'\n };\n } else {\n // ADDNEW mode\n const product = ProductsData.findOne({ _id: props.productID });\n const account = AccountsData.findOne({ _id: product.accountID });\n\n initialState = {\n mode: 'ADDNEW',\n orderID: '',\n product,\n orderedAt: moment(),\n deliverBefore: moment(),\n orderQuantity: '',\n deliverDateStrict: false,\n deliverFast: false,\n plateStatus: 'confirm', // \"confirm\" : 확인, \"new\" : 신규, \"edit\" : 수정\n workMemo: '',\n deliverMemo: '',\n status: 'extruding',\n isCompleted: false,\n isDelivered: false,\n completedQuantity: '',\n completedAt: '',\n deliveredAt: '',\n orderedAtEmpty: false,\n deliverBeforeEmpty: false,\n orderQuantityEmpty: false,\n isConfirmationModalOpen: false,\n confirmationTitle: '',\n confirmationDescription: [],\n error: account ? '' : '업체 정보가 없습니다. 작업지시가 불가능합니다.'\n };\n }\n\n this.state = initialState;\n\n this.onInputChange = this.onInputChange.bind(this);\n this.onClickOK = this.onClickOK.bind(this);\n this.onConfirmationModalClose = this.onConfirmationModalClose.bind(this);\n this.onClickCancel = this.onClickCancel.bind(this);\n }", "saveOrEdit(e){\n\n // e.preventDefault(); // Prevent form to be submitted naturally\n const jobData = Object.assign({},this.state.job,\n {\n selected_programming_dept: this.state.recurring_departments_job_selection,\n selected_programmer: this.state.programmers_selection,\n programming_dept_id: this.props.programming_dept_id\n });\n\n // Validate your Job creation here\n if($('.ui.form').form(\"is valid\")){\n \n this.setState((prevState, props) => ({isSaving: 1}) );\n this.props.manage_job_add_new_edit(this.props.settings,jobData);\n }\n\n }", "function fetchStorage() {\n txtFName.value = localStorage.getItem(\"input-name\");\n txtLName.value = localStorage.getItem(\"input-lastname\");\n txtPhone.value = localStorage.getItem(\"input-phone\");\n txtEmail.value = localStorage.getItem(\"input-email\");\n }", "function storeForm() {\n /*jshint validthis:true */\n var form = $(this);\n var formId = form[0].id;\n if (!formId) return;\n var formJSON = app.formToJSON(form);\n if (!formJSON) return;\n app.formStoreData(formId, formJSON);\n form.trigger('store', {\n data: formJSON\n });\n }", "function customerLocationAdded(customerLocationAdded, entityState) {\n entityState.customerLocationId = customerLocationAdded.customerLocationId;\n entityState.added = true;\n entityState.accessToken = customerLocationAdded.accessToken;\n entityState.email = customerLocationAdded.email;\n\n // And return the new state.\n return entityState;\n}", "_onRegistrationInitiated(event) {\n this._assignFields(event);\n this._state = this.STATES.creatingCustomer;\n }", "editForm(props){\n this.setState({\n type: 'Edit',\n id: props.edit.id,\n name: props.edit.name,\n description: props.edit.description,\n address: props.edit.address ,\n start_date: props.edit.start_date ,\n end_date: props.edit.end_date ,\n price: props.edit.price,\n neighborhood: props.neighborhoods.find(hood => hood.id === props.edit.neighborhood_id),\n formValid: true,\n })\n }", "function saveFormState() {\n const form = d.querySelector('form');\n const data = objectFromEntries(new FormData(form).entries());\n /*if (!wifi_store.checked) {\n data.json_config = '';\n }*/\n let formJson = JSON.stringify(data);\n storage.setItem('form', formJson);\n}", "update(customer) {\n if (!customer.id) {\n return Promise.reject(new Error('invalid_id'));\n }\n const id = customer.id;\n // Deep clone!\n let localCustomer = JSON.parse(JSON.stringify(customer));\n // Remove Object fields if needed\n delete localCustomer.id;\n delete localCustomer.created_at;\n delete localCustomer.updated_at;\n return this.iugu.makeRequest('PUT', `/customers/${id}`).begin(localCustomer).then(outCustomer => object_1.recreateDateFields(outCustomer));\n }" ]
[ "0.73254466", "0.64708704", "0.6376936", "0.6292517", "0.62639695", "0.6226702", "0.622496", "0.6151249", "0.6150682", "0.614703", "0.61087084", "0.6080229", "0.60107684", "0.59823847", "0.5976923", "0.59622717", "0.59557474", "0.5948932", "0.5936509", "0.59264094", "0.5919963", "0.5903166", "0.589976", "0.5894067", "0.5889249", "0.5888318", "0.5884978", "0.58727115", "0.5847789", "0.58379793", "0.58332723", "0.5800359", "0.57994264", "0.5782544", "0.5753079", "0.5748338", "0.5738976", "0.5722479", "0.57202196", "0.57134986", "0.5713149", "0.57081985", "0.56978637", "0.5693768", "0.5691397", "0.5689954", "0.56827414", "0.5678475", "0.566771", "0.5665636", "0.5656792", "0.56553304", "0.5654779", "0.5653362", "0.56516725", "0.5650809", "0.56404066", "0.56361794", "0.56358147", "0.5635565", "0.5631692", "0.5630204", "0.5620524", "0.56123126", "0.5602212", "0.56011873", "0.5588628", "0.5583695", "0.5581719", "0.5571471", "0.556956", "0.55626273", "0.55366164", "0.5533728", "0.552748", "0.55263525", "0.55239594", "0.552355", "0.5511595", "0.5498479", "0.5496592", "0.5494785", "0.5493749", "0.5488485", "0.5487525", "0.5475802", "0.5472456", "0.5467559", "0.5455098", "0.54531306", "0.5450019", "0.54458535", "0.54436594", "0.5443471", "0.5442446", "0.5432546", "0.54302424", "0.5429456", "0.54277205", "0.54228234" ]
0.7083344
1
NOTE: Remember > devs <3 PropTypes. Built in documentation/guides!
constructor(props) { super(props); this.state = { text: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem Loremlorem Lorem Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem Loremlorem Lorem Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem Loremlorem Lorem Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem Loremlorem Lorem Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem Loremlorem Lorem Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem Loremlorem Lorem Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem Loremlorem Lorem Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem Loremlorem Lorem Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem Loremlorem Lorem Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem Loremlorem Lorem Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem Loremlorem Lorem Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem Loremlorem Lorem Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem Loremlorem Lorem Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem Loremlorem Lorem ' }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static get propTypes() { \n return {\n error: PropTypes.bool,\n title: PropTypes.string,\n stats: PropTypes.number,\n statsSymbol: PropTypes.string,\n footerInfo: PropTypes.object,\n }; \n }", "static get propTypes() {\n return {\n config: React.PropTypes.object,\n test: React.PropTypes.string,\n };\n }", "all(types) {\n return (props, propName, componentName) => {\n types.forEach((type) => {\n PropTypes.checkPropTypes(\n { [propName]: type },\n props,\n 'prop',\n componentName,\n );\n });\n };\n }", "function isReactPropTypes(path) {\n return (\n (path.node.object.type === 'MemberExpression' &&\n path.node.object.object &&\n path.node.object.object.name === 'PropTypes') || (\n path.node.object.name === 'PropTypes' && !path.node.object.object)\n );\n}", "function shim() {\n\t\t\t\t\t\tinvariant(false, 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use PropTypes.checkPropTypes() to call them. ' + 'Read more at http://fb.me/use-check-prop-types');\n\t\t\t\t\t}", "function shim() {\n\t invariant(\n\t false,\n\t 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n\t 'Use PropTypes.checkPropTypes() to call them. ' +\n\t 'Read more at http://fb.me/use-check-prop-types'\n\t );\n\t }", "function shim() {\n\t invariant(\n\t false,\n\t 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n\t 'Use PropTypes.checkPropTypes() to call them. ' +\n\t 'Read more at http://fb.me/use-check-prop-types'\n\t );\n\t }", "function shim() {\n\t invariant(\n\t false,\n\t 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n\t 'Use PropTypes.checkPropTypes() to call them. ' +\n\t 'Read more at http://fb.me/use-check-prop-types'\n\t );\n\t }", "function shim() {\n\t invariant(\n\t false,\n\t 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n\t 'Use PropTypes.checkPropTypes() to call them. ' +\n\t 'Read more at http://fb.me/use-check-prop-types'\n\t );\n\t }", "function shim() {\n\t invariant(\n\t false,\n\t 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n\t 'Use PropTypes.checkPropTypes() to call them. ' +\n\t 'Read more at http://fb.me/use-check-prop-types'\n\t );\n\t }", "function shim() {\n\t invariant(\n\t false,\n\t 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n\t 'Use PropTypes.checkPropTypes() to call them. ' +\n\t 'Read more at http://fb.me/use-check-prop-types'\n\t );\n\t }", "function shim() {\n\t invariant(\n\t false,\n\t 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n\t 'Use PropTypes.checkPropTypes() to call them. ' +\n\t 'Read more at http://fb.me/use-check-prop-types'\n\t );\n\t }", "function shim() {\n\t invariant(\n\t false,\n\t 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n\t 'Use PropTypes.checkPropTypes() to call them. ' +\n\t 'Read more at http://fb.me/use-check-prop-types'\n\t );\n\t }", "function shim() {\n\t invariant(\n\t false,\n\t 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n\t 'Use PropTypes.checkPropTypes() to call them. ' +\n\t 'Read more at http://fb.me/use-check-prop-types'\n\t );\n\t }", "function shim() {\n\t invariant(\n\t false,\n\t 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n\t 'Use PropTypes.checkPropTypes() to call them. ' +\n\t 'Read more at http://fb.me/use-check-prop-types'\n\t );\n\t }", "function shim() {\n invariant(false, 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use PropTypes.checkPropTypes() to call them. ' + 'Read more at http://fb.me/use-check-prop-types');\n }", "function shim() {\n invariant(\n false,\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n }", "function shim() {\n invariant(\n false,\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n }", "function shim() {\n invariant(\n false,\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n }", "function shim() {\n invariant(\n false,\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n }", "function shim() {\n invariant(\n false,\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n }", "function shim() {\n invariant(\n false,\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n }", "function shim() {\n invariant(\n false,\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n }", "function shim() {\n invariant(\n false,\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n }", "function testPropTypes (Component, tests) {\n\n if (!testPropTypes.warned) {\n console.warn(\n 'testPropTypes tests are currently ignored because the new' +\n 'schema proptypes syntax currently does nothing')\n testPropTypes.warned = true\n }\n\n // getDescriber(this) <- replace describe.skip with this when <proptypes/> supported\n describe.skip(`testing propTypes for ${Component.name}`, () => {\n\n let propTypes\n before(() => {\n propTypes = Component && Component.propTypes\n })\n\n it(`proptypes is defined for component ${Component.name}`, () => {\n expect(is.objectOf.func(propTypes)).to.be.equal(true)\n })\n\n if (!is.func(tests))\n return\n\n const expectError = props => {\n\n if (!is.object(props))\n throw new Error('props must be an object')\n\n for (const propName in propTypes) {\n const result = propTypes[propName](props, propName, Component.name)\n if (result instanceof Error)\n return expect(result.message)\n }\n\n return expect(null)\n }\n\n tests(expectError)\n })\n\n}", "static propTypes () {\n return {\n cards: PropTypes.array.isRequired,\n containerStyle: PropTypes.object.isRequired,\n firstCard: PropTypes.number,\n getNextCard: PropTypes.func,\n getPrevCard: PropTypes.func,\n prevButton: PropTypes.element,\n nextButton: PropTypes.element,\n onTransitionStart: PropTypes.func,\n onTransitionEnd: PropTypes.func,\n onChangeCard: PropTypes.func\n };\n }", "function checkPropTypes(props) {\n var component = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'component';\n\n // TODO - check for production (unless done by prop types package?)\n if (props.debug) {\n _propTypes2.default.checkPropTypes(propTypes, props, 'prop', component);\n }\n}", "function getPropType(propValue) {\n\t\t var propType = typeof propValue;\n\t\t if (Array.isArray(propValue)) {\n\t\t return 'array';\n\t\t }\n\t\t if (propValue instanceof RegExp) {\n\t\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t\t // passes PropTypes.object.\n\t\t return 'object';\n\t\t }\n\t\t if (isSymbol(propType, propValue)) {\n\t\t return 'symbol';\n\t\t }\n\t\t return propType;\n\t\t }", "eval(fn) {\n return (props, propName, componentName) => {\n PropTypes.checkPropTypes(\n { [propName]: fn() },\n props,\n 'prop',\n componentName,\n );\n };\n }", "function getPropType(propValue) {\n\t var propType = typeof propValue === 'undefined' ? 'undefined' : _typeof(propValue);\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function checkPropTypes(props) {\n var component = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'component';\n\n // TODO - check for production (unless done by prop types package?)\n if (props.debug) {\n __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.checkPropTypes(propTypes, props, 'prop', component);\n }\n}", "static get requiredProps() {\n\t\treturn [];\n\t}", "function buildTreePropTypeForShape(shape) {\n if (shape.type === \"content\") {\n return PropTypes.shape({\n // TODO(mdr): Remove #LegacyContentNode support.\n __type: PropTypes.oneOf([\"content\", \"item\"]).isRequired,\n content: PropTypes.string,\n images: PropTypes.objectOf(PropTypes.any),\n widgets: PropTypes.objectOf(PropTypes.any),\n });\n } else if (shape.type === \"hint\") {\n return PropTypes.shape({\n __type: PropTypes.oneOf([\"hint\"]).isRequired,\n content: PropTypes.string,\n images: PropTypes.objectOf(PropTypes.any),\n widgets: PropTypes.objectOf(PropTypes.any),\n replace: PropTypes.bool,\n });\n } else if (shape.type === \"tags\") {\n return PropTypes.arrayOf(PropTypes.string.isRequired);\n } else if (shape.type === \"array\") {\n const elementPropType = buildTreePropTypeForShape(shape.elementShape);\n return PropTypes.arrayOf(elementPropType.isRequired);\n } else if (shape.type === \"object\") {\n const valueShapes = shape.shape;\n const propTypeShape = {};\n Object.keys(valueShapes).forEach(key => {\n propTypeShape[key] =\n buildTreePropTypeForShape(valueShapes[key]).isRequired;\n });\n return PropTypes.shape(propTypeShape);\n } else {\n throw new Error(`unexpected shape type ${shape.type}`);\n }\n}", "function exhaustivePropTypes(propTypes) {\n \"use strict\";\n\n propTypes[INTERNAL_PROP_TYPE_FIELD] = function(props, propName, componentName) {\n // Find all the props which were not in propTypes\n var invalidProps = Object.keys(props).reduce(function(missingPropTypes, prop) {\n if (!propTypes.hasOwnProperty(prop) && prop !== INTERNAL_PROP_TYPE_FIELD) {\n missingPropTypes.push(prop);\n }\n return missingPropTypes;\n }, []);\n // If we found some, create an error for all of them\n if (invalidProps.length === 1) {\n return new Error(\n \"The prop `\" + invalidProps[0] + \"` isn't defined in `\" + componentName + \"` propTypes.\"\n );\n } else if (invalidProps.length > 1) {\n return new Error(\n \"The props `\" + invalidProps.join('`, `') + \"` aren't defined in `\" + componentName + \"` propTypes.\"\n );\n }\n }\n\n return propTypes;\n}", "function getPropType(propValue) {\n\t\t var propType = typeof propValue;\n\t\t if (Array.isArray(propValue)) {\n\t\t return 'array';\n\t\t }\n\t\t if (propValue instanceof RegExp) {\n\t\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t\t // passes PropTypes.object.\n\t\t return 'object';\n\t\t }\n\t\t if (isSymbol(propType, propValue)) {\n\t\t return 'symbol';\n\t\t }\n\t\t return propType;\n\t\t}", "function getPropType(propValue) {\n\t\t var propType = typeof propValue;\n\t\t if (Array.isArray(propValue)) {\n\t\t return 'array';\n\t\t }\n\t\t if (propValue instanceof RegExp) {\n\t\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t\t // passes PropTypes.object.\n\t\t return 'object';\n\t\t }\n\t\t if (isSymbol(propType, propValue)) {\n\t\t return 'symbol';\n\t\t }\n\t\t return propType;\n\t\t}", "function buildTreePropTypeForShape(shape) {\n if (shape.type === \"content\") {\n return PropTypes.shape({\n // TODO(mdr): Remove #LegacyContentNode support.\n __type: PropTypes.oneOf([\"content\", \"item\"]).isRequired,\n content: PropTypes.string,\n images: PropTypes.objectOf(PropTypes.any),\n widgets: PropTypes.objectOf(PropTypes.any)\n });\n } else if (shape.type === \"hint\") {\n return PropTypes.shape({\n __type: PropTypes.oneOf([\"hint\"]).isRequired,\n content: PropTypes.string,\n images: PropTypes.objectOf(PropTypes.any),\n widgets: PropTypes.objectOf(PropTypes.any),\n replace: PropTypes.bool\n });\n } else if (shape.type === \"tags\") {\n return PropTypes.arrayOf(PropTypes.string.isRequired);\n } else if (shape.type === \"array\") {\n var elementPropType = buildTreePropTypeForShape(shape.elementShape);\n return PropTypes.arrayOf(elementPropType.isRequired);\n } else if (shape.type === \"object\") {\n var valueShapes = shape.shape;\n var propTypeShape = {};\n Object.keys(valueShapes).forEach(key => {\n propTypeShape[key] = buildTreePropTypeForShape(valueShapes[key]).isRequired;\n });\n return PropTypes.shape(propTypeShape);\n } else {\n throw new Error(\"unexpected shape type \".concat(shape.type));\n }\n}", "function validateProps(element,props){{// This mirrors the code path above, but runs for hydration too.\n// Warn about invalid children here so that client and hydration are consistent.\n// TODO: this seems like it could cause a DEV-only throw for hydration\n// if children contains a non-element object. We should try to avoid that.\nif(_typeof(props.children)==='object'&&props.children!==null){React.Children.forEach(props.children,function(child){if(child==null){return;}if(typeof child==='string'||typeof child==='number'){return;}if(typeof child.type!=='string'){return;}if(!didWarnInvalidChild){didWarnInvalidChild=true;error('Only strings and numbers are supported as <option> children.');}});}// TODO: Remove support for `selected` in <option>.\nif(props.selected!=null&&!didWarnSelectedSetOnOption){error('Use the `defaultValue` or `value` props on <select> instead of '+'setting `selected` on <option>.');didWarnSelectedSetOnOption=true;}}}", "function getPropType(propValue) {\r\n\t var propType = typeof propValue;\r\n\t if (Array.isArray(propValue)) {\r\n\t return 'array';\r\n\t }\r\n\t if (propValue instanceof RegExp) {\r\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\r\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\r\n\t // passes PropTypes.object.\r\n\t return 'object';\r\n\t }\r\n\t if (isSymbol(propType, propValue)) {\r\n\t return 'symbol';\r\n\t }\r\n\t return propType;\r\n\t}", "function validateProps(element,props){{// This mirrors the codepath above, but runs for hydration too.\n// Warn about invalid children here so that client and hydration are consistent.\n// TODO: this seems like it could cause a DEV-only throw for hydration\n// if children contains a non-element object. We should try to avoid that.\nif(_typeof(props.children)==='object'&&props.children!==null){React.Children.forEach(props.children,function(child){if(child==null){return;}if(typeof child==='string'||typeof child==='number'){return;}if(typeof child.type!=='string'){return;}if(!didWarnInvalidChild){didWarnInvalidChild=true;error('Only strings and numbers are supported as <option> children.');}});}// TODO: Remove support for `selected` in <option>.\nif(props.selected!=null&&!didWarnSelectedSetOnOption){error('Use the `defaultValue` or `value` props on <select> instead of '+'setting `selected` on <option>.');didWarnSelectedSetOnOption=true;}}}", "function getPropType(propValue) {\n\t var propType = typeof propValue === 'undefined' ? 'undefined' : _typeof(propValue);\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue === 'undefined' ? 'undefined' : _typeof(propValue);\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue === 'undefined' ? 'undefined' : _typeof(propValue);\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function validateProps(element,props){{// This mirrors the code path above, but runs for hydration too.\n// Warn about invalid children here so that client and hydration are consistent.\n// TODO: this seems like it could cause a DEV-only throw for hydration\n// if children contains a non-element object. We should try to avoid that.\nif(typeof props.children==='object'&&props.children!==null){React.Children.forEach(props.children,function(child){if(child==null){return;}if(typeof child==='string'||typeof child==='number'){return;}if(typeof child.type!=='string'){return;}if(!didWarnInvalidChild){didWarnInvalidChild=true;error('Only strings and numbers are supported as <option> children.');}});}// TODO: Remove support for `selected` in <option>.\nif(props.selected!=null&&!didWarnSelectedSetOnOption){error('Use the `defaultValue` or `value` props on <select> instead of '+'setting `selected` on <option>.');didWarnSelectedSetOnOption=true;}}}", "function getPropType(propValue) {\n\t\t\t\t\t\tvar propType = typeof propValue === 'undefined' ? 'undefined' : _typeof(propValue);\n\t\t\t\t\t\tif (Array.isArray(propValue)) {\n\t\t\t\t\t\t\treturn 'array';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (propValue instanceof RegExp) {\n\t\t\t\t\t\t\t// Old webkits (at least until Android 4.0) return 'function' rather than\n\t\t\t\t\t\t\t// 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t\t\t\t\t\t\t// passes PropTypes.object.\n\t\t\t\t\t\t\treturn 'object';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (isSymbol(propType, propValue)) {\n\t\t\t\t\t\t\treturn 'symbol';\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn propType;\n\t\t\t\t\t}", "function validateProps(element,props){{// This mirrors the codepath above, but runs for hydration too.\n// Warn about invalid children here so that client and hydration are consistent.\n// TODO: this seems like it could cause a DEV-only throw for hydration\n// if children contains a non-element object. We should try to avoid that.\nif(typeof props.children==='object'&&props.children!==null){React.Children.forEach(props.children,function(child){if(child==null){return;}if(typeof child==='string'||typeof child==='number'){return;}if(typeof child.type!=='string'){return;}if(!didWarnInvalidChild){didWarnInvalidChild=true;error('Only strings and numbers are supported as <option> children.');}});}// TODO: Remove support for `selected` in <option>.\nif(props.selected!=null&&!didWarnSelectedSetOnOption){error('Use the `defaultValue` or `value` props on <select> instead of '+'setting `selected` on <option>.');didWarnSelectedSetOnOption=true;}}}", "function validateProps(element,props){{// This mirrors the codepath above, but runs for hydration too.\n// Warn about invalid children here so that client and hydration are consistent.\n// TODO: this seems like it could cause a DEV-only throw for hydration\n// if children contains a non-element object. We should try to avoid that.\nif(typeof props.children==='object'&&props.children!==null){React.Children.forEach(props.children,function(child){if(child==null){return;}if(typeof child==='string'||typeof child==='number'){return;}if(typeof child.type!=='string'){return;}if(!didWarnInvalidChild){didWarnInvalidChild=true;error('Only strings and numbers are supported as <option> children.');}});}// TODO: Remove support for `selected` in <option>.\nif(props.selected!=null&&!didWarnSelectedSetOnOption){error('Use the `defaultValue` or `value` props on <select> instead of '+'setting `selected` on <option>.');didWarnSelectedSetOnOption=true;}}}", "function getPropType(propValue) {\n\t var propType = typeof propValue === 'undefined' ? 'undefined' : _typeof$1(propValue);\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }", "function forgo(propName) {\n return Component.propTypes && Component.propTypes.hasOwnProperty(propName);\n }", "function getPropType(propValue) {\n\t\t var propType = typeof propValue;\n\t\t if (Array.isArray(propValue)) {\n\t\t return 'array';\n\t\t }\n\t\t if (propValue instanceof RegExp) {\n\t\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t\t // passes PropTypes.object.\n\t\t return 'object';\n\t\t }\n\t\t return propType;\n\t\t}", "function validateProps(element,props){{// This mirrors the codepath above, but runs for hydration too.\n// Warn about invalid children here so that client and hydration are consistent.\n// TODO: this seems like it could cause a DEV-only throw for hydration\n// if children contains a non-element object. We should try to avoid that.\nif(_typeof(props.children)==='object'&&props.children!==null){React.Children.forEach(props.children,function(child){if(child==null){return;}if(typeof child==='string'||typeof child==='number'){return;}if(typeof child.type!=='string'){return;}if(!didWarnInvalidChild){didWarnInvalidChild=true;warning$1(false,'Only strings and numbers are supported as <option> children.');}});}// TODO: Remove support for `selected` in <option>.\nif(props.selected!=null&&!didWarnSelectedSetOnOption){warning$1(false,'Use the `defaultValue` or `value` props on <select> instead of '+'setting `selected` on <option>.');didWarnSelectedSetOnOption=true;}}}", "function validateProps(element,props){{// This mirrors the codepath above, but runs for hydration too.\n// Warn about invalid children here so that client and hydration are consistent.\n// TODO: this seems like it could cause a DEV-only throw for hydration\n// if children contains a non-element object. We should try to avoid that.\nif(_typeof(props.children)==='object'&&props.children!==null){React.Children.forEach(props.children,function(child){if(child==null){return;}if(typeof child==='string'||typeof child==='number'){return;}if(typeof child.type!=='string'){return;}if(!didWarnInvalidChild){didWarnInvalidChild=true;warning$1(false,'Only strings and numbers are supported as <option> children.');}});}// TODO: Remove support for `selected` in <option>.\nif(props.selected!=null&&!didWarnSelectedSetOnOption){warning$1(false,'Use the `defaultValue` or `value` props on <select> instead of '+'setting `selected` on <option>.');didWarnSelectedSetOnOption=true;}}}", "function checkSelectPropTypes(props){{ReactControlledValuePropTypes.checkPropTypes('select',props);for(var i=0;i<valuePropNames.length;i++){var propName=valuePropNames[i];if(props[propName]==null){continue;}var isArray=Array.isArray(props[propName]);if(props.multiple&&!isArray){error('The `%s` prop supplied to <select> must be an array if '+'`multiple` is true.%s',propName,getDeclarationErrorAddendum());}else if(!props.multiple&&isArray){error('The `%s` prop supplied to <select> must be a scalar '+'value if `multiple` is false.%s',propName,getDeclarationErrorAddendum());}}}}" ]
[ "0.7431138", "0.7074378", "0.696054", "0.6659031", "0.64007896", "0.6125638", "0.6125638", "0.6125638", "0.6125638", "0.6125638", "0.6125638", "0.6125638", "0.6125638", "0.6125638", "0.6125638", "0.597449", "0.59094316", "0.59094316", "0.59094316", "0.59094316", "0.59094316", "0.59094316", "0.59094316", "0.59094316", "0.5846454", "0.5762964", "0.5693797", "0.5683851", "0.5653505", "0.5645803", "0.5632212", "0.5631043", "0.5619872", "0.561003", "0.5596417", "0.5596417", "0.55711585", "0.55702287", "0.5556303", "0.55550885", "0.5553682", "0.5553682", "0.5553682", "0.55530375", "0.55530375", "0.55530375", "0.55530375", "0.55530375", "0.55530375", "0.55530375", "0.55530375", "0.55530375", "0.55530375", "0.55530375", "0.55530375", "0.55530375", "0.55530375", "0.55530375", "0.55530375", "0.55530375", "0.55530375", "0.55530375", "0.55530375", "0.55530375", "0.55530375", "0.55530375", "0.55530375", "0.55530375", "0.55530375", "0.55530375", "0.55530375", "0.55530375", "0.55530375", "0.55530375", "0.55530375", "0.55530375", "0.55530375", "0.55530375", "0.55530375", "0.55530375", "0.55530375", "0.55530375", "0.55530375", "0.55530375", "0.55530375", "0.55530375", "0.55530375", "0.55530375", "0.55530375", "0.55530375", "0.55530375", "0.55528176", "0.55397594", "0.5538758", "0.5538758", "0.55311626", "0.552309", "0.55173075", "0.5494698", "0.5494698", "0.54932106" ]
0.0
-1
NOTE: 'value' on textarea makes it a Controlled Component NOTE '::' operator is equivalent to a .bind() transferrence of 'this' scope, just use bind for now
render() { return( <div className='container' style={{ marginTop: '50px' }}> <div className='col-lg-8 col-lg-offset-2 form-group'> <textarea value={this.state.text} onChange={this.updateText.bind(this)} className='form-control' style={{ height: '500px', resize: 'none' }}> </textarea> </div> <ReadingTime text={this.state.text} className='col-lg-2 well' /> </div> ) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleTextInput() {\n this.value = this.control.value;\n }", "handleChangeTextArea(event) {\n this.setState({content: event.target.value});\n }", "addToTextArea(value){\n let field = document.getElementById('formControlTextarea');\n this.insertAtCursor(field, value);\n }", "handleTextAreaValueChange (a, b) {\n console.info('text area value change', a, b);\n }", "drawTextArea() {\n return (\n <TextField\n className=\"tyyli1\"\n onChange={event => {\n // this.state.fieldvalue = event.target.value;\n this.setState({ fieldvalue: event.target.value });\n }}\n >\n {' '}\n </TextField>\n );\n }", "setValue(e){\n this.setState({\n txt: e.target.value\n })\n }", "get value(){ return this.input.value; }", "onInput() {\n this.elements.on('input', (event) => {\n let text = $(event.target).val();\n this.value = text;\n });\n /*other way for get correct context\n create fn onInput(){\n let that=this;\n this.elements.on('input',function(){\n let text=$(this).val();\n that.value=text;\n })\n }\n\n */\n }", "getInputValue(evt){\n let inputBox = this.inputBoxRef.current.value;\n this.inputString = inputBox;\n \n }", "handleValueChange(event) {\n this.value = event.target.value;\n }", "setup () {\n var textArea = this.options.el,\n optionsValue = this.options.value || textArea.value;\n\n // add internal class if doesnt already exist\n textArea.classList.add(this.options.inputClass);\n\n this._container = this._buildUIElement(textArea);\n\n if (textArea.value !== optionsValue) {\n textArea.value = optionsValue;\n }\n\n this.origValue = optionsValue;\n this.origDisabled = textArea.disabled;\n\n // handle disabled state\n if (this.origDisabled) {\n this._container.classList.add(this.options.disabledClass);\n }\n\n this._bindEvents();\n\n }", "handleTextChange(e, value) {\n this.setState({ value: value })\n }", "handleText(event) {\n this.message = event.target.value;\n }", "setTextboxValue(value) {\n var input = this.control_input;\n var changed = input.value !== value;\n\n if (changed) {\n input.value = value;\n triggerEvent(input, 'update');\n this.lastValue = value;\n }\n }", "function MyTextAreaPrototype() {\n this.setText = function(text) {\n var ta = this.el.querySelector('textarea');\n ta.textContent = text;\n };\n\n this.reset = function() {\n var ta = this.el.querySelector('textarea');\n ta.textContent = '';\n };\n\n\n this.handleInput = function(ev) {\n var span = this.el.querySelector('.val');\n span.textContent = this.el.querySelector('textarea').value.length;\n }\n\n}", "handleChangeText(event) {\n this.setState({textValue: event.target.value});\n }", "handleChange(e) {\n const value = e.target.value\n this.setState({\n textValue: value\n })\n}", "onChange(e){\n this.setState({text: e.target.value})\n }", "function composeTextBox( ) {\n\n\t\t\t_widget[ \"impl\" ] = elem;\n\t\t\t_widget[ \"content\" ] = { };\n\n\t\t\t_widget[ \"content\" ][ \"impl\" ] = document.createElement( \"input\" );\n\n\t\t\t_widget[ \"content\" ][ \"impl\" ].setAttribute( \"type\", \"text\" );\n\t\t\t_widget[ \"impl\" ].appendChild( _widget[ \"content\" ][ \"impl\" ] );\t\t\t\n\n\n\t\t\tif ( _dataBind != undefined ) {\n\t\t\t\t\n\t\t\t\t_widget[ \"content\" ][ \"impl\" ].setAttribute( \"data-bind\", _dataBind );\n\t\t\t}\n\n\t\t\tif ( _prompt != undefined ) {\n\t\t\t\t\n\t\t\t\tif ( _state == _stateEnum[\"prompt\"] ) {\n\n\t\t\t\t\t_widget[ \"content\" ][ \"impl\" ].className = \"prompt\";\n\t\t\t\t\t_widget[ \"content\" ][ \"impl\" ].setAttribute( \"value\", _prompt );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( options && options.mode && options.mode == \"entry\" ) {\n\n\t\t\t\t_state = _stateEnum[ \"entry\" ];\n\t\t\t\t_widget[ \"content\" ][ \"impl\" ].className = \"entry\";\n\n\t\t\t\tif ( _widget[\"content\"][\"impl\"].value == _prompt ) {\n\n\t\t\t\t\t_widget[\"content\"][\"impl\"].value = \"\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tx$.bind( _widget[ \"content\" ][\"impl\"], \"blur\", onTxtBoxChange );\n\t\t\tx$.bind( _widget[ \"content\" ][\"impl\"], \"change\", onTxtBoxChange );\n\t\t\tx$.bind( _widget[ \"content\" ][\"impl\"], \"focus\", onWidgetClick );\n\t\t}", "onInput(event) {\n this.$emit(\"input\", {\n content: event.target.value\n });\n }", "handleChange(e) {\n this.setState({ text: e.target.value });\n }", "function TextAreaWidget(initVal,rows,cols) {\n\tInputWidget.apply(this,[TEXTAREA({rows:rows,cols:cols},initVal)]);\n}", "_onChange() {\n let value = this.get('value');\n return this.attrs.onChange(value, this);\n }", "editorChange(event){\n this.setState({ input: event.target.value});\n }", "handleEvent(e) {\n this.setState({ text: e.target.value });\n }", "handleOnChange(event) {\n this.setState({\n inputText: event.target.value\n })\n }", "handleChange(event) {\r\n this.setState({\r\n content: event.target.value\r\n });\r\n }", "valueChanged() {\n const inputEl = this.nativeInput;\n if (inputEl && inputEl.value !== this.value) {\n inputEl.value = this.value;\n }\n }", "set value(val) {\n const input = this.refs.myInput\n input.value = val\n }", "get valueInput() {\n return this._value;\n }", "onChangeValue(e){\n this.setState({ \n value: e.target.value \n })\n }", "_handleChange(){\n\t\tlet text = this._text.value;\n\t\tthis.props.onChange(this.props.id, text);\n\t}", "value() {\n return this.refs.input.value;\n }", "handleContentChange(e) {\n this.setState({content: e.target.value});\n }", "set value(v) {\n this.input.value = v;\n }", "onTextContent(event) {\n this.setState({\n text: event.target.value\n });\n }", "getValue() { return this.input.value; }", "_changeHandler(e) {\n this.setState({ text : e.target.value });\n }", "get value() {\n return this.input.value;\n }", "onChangeMessage(event) {\n this.setState({\n content: event.target.value\n });\n }", "renderEntry() {\n return (\n <textarea id=\"capture\" name=\"capture\" rows=\"25\" cols=\"100\" onInput={(event) => this.handleCapture(event.target.value)}></textarea>\n );\n }", "set TextB(value) {\n this._inputTextB = value;\n }", "onTextChange(e) {\n const value = e.target.value;\n const {handleTextChange} = this.props;\n this.setState({\n value\n });\n if (typeof handleTextChange === 'function') {\n handleTextChange(value);\n }\n }", "captureInputField(myEvent)\n {\n //target is the input text box and target.value gives the val of the text\n console.log(myEvent.target.value)\n this.setState({textValue : myEvent.target.value})\n\n }", "changeValue(event) {\n this.setValue(event.currentTarget.value);\n }", "setInputValue(value) {\n\t\tthis._input.value = value;\n\t}", "render(){\n\t\tlet text = this.props.text;\n\t\treturn(\n\t\t\t<p className=\"editField\">\n\t\t\t<input type=\"text\" onChange={this._handleChange.bind(this)}\n\t\t\tonBlur={this._handleBlur.bind(this)}\n\t\t\t value={text} ref={(input) => this._text = input}/>\n\t\t\t \n\t\t\t<ButtonSave />\n\t\t\t</p>\n\t\t);\n\t}", "get value() {\n return this.input_.value;\n }", "handleChange(event) {\n this.setState({\n content: event.target.value,\n });\n }", "@action\n onChange(newValue) {\n this.text = newValue;\n this.onChangeEvents++;\n }", "handleTerm(event){\r\n let wantedValue = event.target.value;\r\n this.handleTermChange(wantedValue);\r\n}", "update( e ) {\n\t\tthis.setState({txt: e.target.value})\n\t}", "handleText(e) {\n this.setState({text: e.target.value});\n document.getElementById('text').className = 'materialize-textarea validate';\n }", "updateText(event) {\n this.setState({ text: event.target.value });\n }", "updateSettingsTextArea(e){\n const SerftopiaWidget = {\n init: (data)=>{\n console.log(data);\n this.updateFormWidgetTheme(data.formSettings);\n this.updateButtonWidgetTheme(data.buttonSettings);\n this.setState({\n company: data.company\n })\n }\n }\n this.setState({\n textAreaSettings: e.target.value \n });\n\n try {\n eval(e.target.value ); \n } catch (err) {\n if (err instanceof SyntaxError) {\n console.error(err.message);\n }\n }\n }", "function ɵɵtextBinding(value) {\n var lView = getLView();\n var index = getSelectedIndex();\n var bound = bind(lView, value);\n if (bound !== NO_CHANGE) {\n textBindingInternal(lView, index, renderStringify(bound));\n }\n}", "set Input(value) {\n this._input = value;\n }", "onInput(e){\n this.setState({\n inputValue: e.target.value\n })\n\n }", "handleTextChange(e) {\n this.setState({inputText : e.target.value});\n }", "handleChange(event) {\n\t\tthis.setState({ text:event.target.value }); \n\t}", "bindUI() {\n super.bindUI();\n\n this.on('focus', this.onFocus);\n this.on('blur', this.onBlur);\n this.on('change', this.onChange);\n this.on('keydown', this.onKeyDown); \n \n this.onAttributeChange('required', this.setRequired);\n this.onAttributeChange('maxlength', this.setMaxLength); \n }", "constructor(props){\n super(props);\n this.state = {\n text: '',\n color: '',\n };\n // binding the function.\n this.changedInput = this.changedInput.bind(this);\n }", "function textChangeHandler(e) {\r\n // console.log(ref);\r\n setState((s) => ({ ...s, value: e.target.value })); // UPDATE THE STATE ON CHANGE\r\n }", "onMessageTextChange(event) {\n this.setState({messageText: event.target.value});\n }", "updateText(event) {\n this.setState({text: event.target.value});\n }", "handleContentChange(e) {\n this.setState({newContent: e.target.value});\n }", "handleContentChange(event) {\n this.setState({\n content: event.target.value,\n });\n }", "handleChange(event) {\n if (event.key !== 'Tab') {\n this.isValid = true;\n this.element ? this.element.querySelector('textarea').setAttribute('aria-invalid', 'true')\n : this.element.querySelector('textarea').setAttribute('aria-invalid', 'true');\n }\n // emit value for other components to consume\n this.changeText.emit({ value: event.target.value });\n this.value = event.target.value;\n if (this.isBackspace) {\n if (this.value.length === 0) {\n if (!this.required) {\n this.isValid = true;\n this.element ?\n this.element.querySelector('textarea').setAttribute(ARIA_INVALID, 'true')\n :\n this.element.querySelector('textarea').setAttribute(ARIA_INVALID, 'true');\n this.isBackspace = false;\n return;\n }\n }\n }\n if (this.value && this.value.trim().length === 0) {\n this.value = this.value.trim();\n const validationArray = [];\n validationArray.push(this.isRequiredProvided(this.value));\n this.isValid = validationArray.every(it => it);\n }\n else {\n this.isValid = this.isValidInput(this.value);\n }\n }", "function Textarea(props) {\n var _this;\n\n (0, _classCallCheck2.default)(this, Textarea);\n _this = (0, _possibleConstructorReturn2.default)(this, (Textarea.__proto__ || Object.getPrototypeOf(Textarea)).call(this, props)); // <Input> expects the components it renders to respond to 'value'\n // so that it can check whether they are filled.\n\n _this.isControlled = _this.props.value != null;\n _this.shadowRef = null;\n _this.singlelineShadowRef = null;\n _this.inputRef = null;\n _this.value = null;\n _this.handleResize = (0, _debounce.default)(function () {\n _this.syncHeightWithShadow();\n }, 166);\n _this.state = {\n height: null\n };\n\n _this.handleRefInput = function (ref) {\n _this.inputRef = ref;\n var textareaRef = _this.props.textareaRef;\n\n if (textareaRef) {\n if (typeof textareaRef === 'function') {\n textareaRef(ref);\n } else {\n textareaRef.current = ref;\n }\n }\n };\n\n _this.handleRefSinglelineShadow = function (ref) {\n _this.singlelineShadowRef = ref;\n };\n\n _this.handleRefShadow = function (ref) {\n _this.shadowRef = ref;\n };\n\n _this.handleChange = function (event) {\n _this.value = event.target.value;\n\n if (!_this.isControlled) {\n // The component is not controlled, we need to update the shallow value.\n _this.shadowRef.value = _this.value;\n\n _this.syncHeightWithShadow();\n }\n\n if (_this.props.onChange) {\n _this.props.onChange(event);\n }\n };\n\n _this.value = props.value || props.defaultValue || '';\n _this.state = {\n height: Number(props.rows) * ROWS_HEIGHT\n };\n return _this;\n }", "textBox(e) {\n console.log(\"TextBox\");\n let value = e.target.value;\n this.setState(prevState => ({\n variables: {\n ...prevState.variables, description: value\n }\n }), ()=>console.log(this.state.variables))\n }", "updateValue(value) {\n if (this.control) {\n this.control.control.setValue(value);\n }\n else {\n this.target.value = value;\n }\n }", "handleInput(e) {\n this.setState({ value: e.target.value });\n }", "@action handleTextareaBlur() {\n let that = this;\n let textComponent = document.getElementById(that.textareaId);\n let selection = '';\n let startPos = '';\n let endPos = '';\n let lastchar = '\\n';\n\n startPos = textComponent.selectionStart;\n endPos = textComponent.selectionEnd;\n selection = textComponent.value.substring(startPos, endPos);\n\n if (startPos) {\n lastchar = textComponent.value.substring(startPos - 1, startPos);\n }\n\n that.startPos = startPos;\n that.endPos = endPos;\n that.selection = selection;\n that.lastchar = lastchar;\n }", "updateValue(event){\n this.setState({value: event.target.value})\n }", "applyBindingSet() {\n // set the attribute mappings\n this.binder.attributeMappings = {\n placeholder: 'placeholder', // map placeholder to placeholder\n 'value-state': '_valueState',\n name: 'name',\n maxlength: 'maxlength', // for the input element itself\n };\n\n // set the label mappings\n this.binder.labelMappings = {\n 'show-value-help-icon': 'showValueHelpIcon',\n 'show-suggestions': 'showSuggestions',\n readonly: '__readonly',\n required: 'required',\n disabled: 'disabled',\n modified: 'modified',\n highlight: 'highlight',\n };\n\n // set attributes to constrains mapping for furo.fat types\n this.binder.fatAttributesToConstraintsMappings = {\n maxlength: 'value._constraints.max.is', // for the fieldnode constraint\n required: 'value._constraints.required.is', // for the fieldnode constraint\n };\n\n // set constrains to attributes mapping for furo.fat types\n this.binder.constraintsTofatAttributesMappings = {\n max: 'maxlength',\n required: 'required',\n };\n\n /**\n * check overrides from the used component, attributes set on the component itself overrides all\n */\n this.binder.checkLabelandAttributeOverrrides();\n\n // update the value on input changes\n this.addEventListener('input', val => {\n // update the value\n this.binder.fieldValue = val.target.value;\n\n /**\n * Fired when value changed\n * @type {Event}\n */\n const customEvent = new Event('value-changed', { composed: true, bubbles: true });\n customEvent.detail = val.target.value;\n this.dispatchEvent(customEvent);\n\n // set flag empty on empty strings (for fat types)\n if (val.target.value) {\n this.binder.deleteLabel('empty');\n } else {\n this.binder.addLabel('empty');\n }\n // if something was entered the field is not empty\n this.binder.addLabel('modified');\n });\n }", "function updateInput( e ) {\r\n this.set( \"value\", e.newVal );\r\n }", "onChange(e) {\n this.setState({inputValue: e.target.value});\n }", "set value(value){\n const thisWidget = this;\n const newValue = thisWidget.parseValue(value);\n \n //add validation\n if (newValue != thisWidget.correctValue && thisWidget.isValid(newValue)) {\n thisWidget.correctValue = newValue;\n thisWidget.announce();\n } \n thisWidget.renderValue();\n }", "function textBindingInternal(lView, index, value) {\n ngDevMode && assertString(value, 'Value should be a string');\n ngDevMode && assertNotSame(value, NO_CHANGE, 'value should not be NO_CHANGE');\n ngDevMode && assertIndexInRange(lView, index);\n var element = getNativeByIndex(index, lView);\n ngDevMode && assertDefined(element, 'native element should exist');\n updateTextNode(lView[RENDERER], element, value);\n }", "onChange(evt){\n this.setState({\n comment: evt.target.value,\n })\n }", "valueDisplayCopiable() {\n this._value.addEventListener('click', () => {\n let dValue = this.value;\n let input = document.createElement('input');\n document.body.appendChild(input);\n input.value = dValue;\n input.select();\n input.setSelectionRange(0, 99999); // For mobile devices\n document.execCommand('copy');\n document.body.removeChild(input);\n this.value = 'Copied!';\n setTimeout(() => {this.value = dValue;}, 285);\n }, false);\n }", "setValue(value, {update=true} = {}) {\n let numpad = this.numpad.querySelector('.value')\n if (numpad) numpad.setAttribute('text', {value})\n this.el.setAttribute('text', {value})\n this.inputField.value = value\n if (update && this.data.target)\n {\n this.data.target.setAttribute(this.data.component, {[this.data.property]: value})\n }\n }", "onChange(value) {\n this.setState({\n content: value.content\n });\n }", "handleUserInput(e){\n this.setState({\n newNoteContent: e.target.value, // the value of the text input\n })\n }", "handleUserInput(e){\n this.setState({\n newNoteContent: e.target.value, // the value of the text input\n })\n }", "handleChange(e) {\n this.props.onTextChange(e.target.value);\n }", "function Textarea(props) {\n var _this;\n\n (0, _classCallCheck2.default)(this, Textarea);\n _this = (0, _possibleConstructorReturn2.default)(this, (Textarea.__proto__ || Object.getPrototypeOf(Textarea)).call(this, props)); // <Input> expects the components it renders to respond to 'value'\n // so that it can check whether they are filled.\n\n _this.shadow = null;\n _this.singlelineShadow = null;\n _this.input = null;\n _this.value = null;\n _this.handleResize = (0, _debounce.default)(function () {\n _this.syncHeightWithShadow();\n }, 166);\n _this.state = {\n height: null\n };\n\n _this.handleRefInput = function (node) {\n _this.input = node;\n var textareaRef = _this.props.textareaRef;\n\n if (textareaRef) {\n if (typeof textareaRef === 'function') {\n textareaRef(node);\n } else {\n textareaRef.current = node;\n }\n }\n };\n\n _this.handleRefSinglelineShadow = function (node) {\n _this.singlelineShadow = node;\n };\n\n _this.handleRefShadow = function (node) {\n _this.shadow = node;\n };\n\n _this.handleChange = function (event) {\n _this.value = event.target.value;\n\n if (typeof _this.props.value === 'undefined' && _this.shadow) {\n // The component is not controlled, we need to update the shallow value.\n _this.shadow.value = _this.value;\n\n _this.syncHeightWithShadow();\n }\n\n if (_this.props.onChange) {\n _this.props.onChange(event);\n }\n };\n\n _this.value = props.value || props.defaultValue || '';\n _this.state = {\n height: Number(props.rows) * ROWS_HEIGHT\n };\n return _this;\n }", "function Textarea(props) {\n var _this;\n\n (0, _classCallCheck2.default)(this, Textarea);\n _this = (0, _possibleConstructorReturn2.default)(this, (Textarea.__proto__ || Object.getPrototypeOf(Textarea)).call(this, props)); // <Input> expects the components it renders to respond to 'value'\n // so that it can check whether they are filled.\n\n _this.shadow = null;\n _this.singlelineShadow = null;\n _this.input = null;\n _this.value = null;\n _this.handleResize = (0, _debounce.default)(function () {\n _this.syncHeightWithShadow();\n }, 166);\n _this.state = {\n height: null\n };\n\n _this.handleRefInput = function (node) {\n _this.input = node;\n var textareaRef = _this.props.textareaRef;\n\n if (textareaRef) {\n if (typeof textareaRef === 'function') {\n textareaRef(node);\n } else {\n textareaRef.current = node;\n }\n }\n };\n\n _this.handleRefSinglelineShadow = function (node) {\n _this.singlelineShadow = node;\n };\n\n _this.handleRefShadow = function (node) {\n _this.shadow = node;\n };\n\n _this.handleChange = function (event) {\n _this.value = event.target.value;\n\n if (typeof _this.props.value === 'undefined' && _this.shadow) {\n // The component is not controlled, we need to update the shallow value.\n _this.shadow.value = _this.value;\n\n _this.syncHeightWithShadow();\n }\n\n if (_this.props.onChange) {\n _this.props.onChange(event);\n }\n };\n\n _this.value = props.value || props.defaultValue || '';\n _this.state = {\n height: Number(props.rows) * ROWS_HEIGHT\n };\n return _this;\n }", "function Textarea(props) {\n var _this;\n\n (0, _classCallCheck2.default)(this, Textarea);\n _this = (0, _possibleConstructorReturn2.default)(this, (Textarea.__proto__ || Object.getPrototypeOf(Textarea)).call(this, props)); // <Input> expects the components it renders to respond to 'value'\n // so that it can check whether they are filled.\n\n _this.shadow = null;\n _this.singlelineShadow = null;\n _this.input = null;\n _this.value = null;\n _this.handleResize = (0, _debounce.default)(function () {\n _this.syncHeightWithShadow();\n }, 166);\n _this.state = {\n height: null\n };\n\n _this.handleRefInput = function (node) {\n _this.input = node;\n var textareaRef = _this.props.textareaRef;\n\n if (textareaRef) {\n if (typeof textareaRef === 'function') {\n textareaRef(node);\n } else {\n textareaRef.current = node;\n }\n }\n };\n\n _this.handleRefSinglelineShadow = function (node) {\n _this.singlelineShadow = node;\n };\n\n _this.handleRefShadow = function (node) {\n _this.shadow = node;\n };\n\n _this.handleChange = function (event) {\n _this.value = event.target.value;\n\n if (typeof _this.props.value === 'undefined' && _this.shadow) {\n // The component is not controlled, we need to update the shallow value.\n _this.shadow.value = _this.value;\n\n _this.syncHeightWithShadow();\n }\n\n if (_this.props.onChange) {\n _this.props.onChange(event);\n }\n };\n\n _this.value = props.value || props.defaultValue || '';\n _this.state = {\n height: Number(props.rows) * ROWS_HEIGHT\n };\n return _this;\n }", "setTextInputRef(element){\n this.textInput = element;\n }", "_inputPasteHandler() {\n const that = this;\n\n requestAnimationFrame(() => that.$.fireEvent('changing', { 'currentValue': that.$.input.value, 'validValue': that.value, 'radix': that._radixNumber }));\n }", "onChange() {\n this.$emit('change', this.autocompleteText);\n }", "renderValue(){\n const thisWidget = this;\n \n thisWidget.dom.wrapper.innerHTML = thisWidget.correctvalue;\n }", "onChange(event){\n this.setState({comment: event.target.value});\n }", "entryEditorValueChanged(value) {\n this.setState({\n entryEditorValue: value\n });\n }", "render() {\n // 2\n // atau tanpa create handler baru\n // return <input onChange={event => console.log(event.target.value)} />;\n\n // 3\n // set state untuk digunakan di this.state\n return (\n <div>\n <input\n value = {this.state.term}\n onChange={event => this.setState({ term: event.target.value })} \n />\n \n </div>\n );\n // 1\n // use metheod on change\n // return <input onChange = { this.onInputChange }/>;\n }", "set value(value){\n const thisWidget=this;\n const newValue = thisWidget.parseValue(value);\n\n /*Add validiation */\n if(\n newValue != thisWidget.correctValue && thisWidget.isValid(newValue)){\n thisWidget.correctValue = newValue;\n thisWidget.announce();\n }\n\n thisWidget.renderValue();\n\n }", "get value() {\n var textbox = this.getElement({type: \"textbox\"});\n return textbox.getNode().value;\n }", "function Textarea(props) {\n var _this;\n\n (0, _classCallCheck2.default)(this, Textarea);\n _this = (0, _possibleConstructorReturn2.default)(this, (Textarea.__proto__ || Object.getPrototypeOf(Textarea)).call(this));\n _this.isControlled = null;\n _this.shadowRef = null;\n _this.singlelineShadowRef = null;\n _this.inputRef = null;\n _this.value = null;\n _this.handleResize = (0, _debounce.default)(function () {\n _this.syncHeightWithShadow();\n }, 166);\n _this.state = {\n height: null\n };\n\n _this.handleRefInput = function (ref) {\n _this.inputRef = ref;\n var textareaRef = _this.props.textareaRef;\n\n if (textareaRef) {\n if (typeof textareaRef === 'function') {\n textareaRef(ref);\n } else {\n textareaRef.current = ref;\n }\n }\n };\n\n _this.handleRefSinglelineShadow = function (ref) {\n _this.singlelineShadowRef = ref;\n };\n\n _this.handleRefShadow = function (ref) {\n _this.shadowRef = ref;\n };\n\n _this.handleChange = function (event) {\n _this.value = event.target.value;\n\n if (!_this.isControlled) {\n // The component is not controlled, we need to update the shallow value.\n _this.shadowRef.value = _this.value;\n\n _this.syncHeightWithShadow();\n }\n\n if (_this.props.onChange) {\n _this.props.onChange(event);\n }\n };\n\n _this.isControlled = props.value != null; // <Input> expects the components it renders to respond to 'value'\n // so that it can check whether they are filled.\n\n _this.value = props.value || props.defaultValue || '';\n _this.state = {\n height: Number(props.rows) * ROWS_HEIGHT\n };\n return _this;\n }", "handleChange(e, idControl) { \n this.handleAttributeChange(e); \n this.setState({value: e.target.value});\n }", "handleChange(e){\n this.setState({value: e.target.value});\n }" ]
[ "0.7079677", "0.70782715", "0.6841276", "0.66888994", "0.652561", "0.6497197", "0.64825594", "0.647295", "0.6469688", "0.6380233", "0.63799286", "0.63118094", "0.62782794", "0.62708354", "0.62551993", "0.6216273", "0.62078184", "0.6200425", "0.6187997", "0.61474484", "0.6144207", "0.61341083", "0.61322385", "0.61166996", "0.611484", "0.6110685", "0.61092013", "0.6102323", "0.60902923", "0.6077939", "0.6076808", "0.6067409", "0.60646355", "0.60631996", "0.6059863", "0.6056507", "0.6026597", "0.6024931", "0.60174656", "0.6015279", "0.6012685", "0.60078174", "0.5997646", "0.59896904", "0.59832877", "0.59788626", "0.5964992", "0.59644735", "0.5959787", "0.5938803", "0.5932984", "0.5921948", "0.59190917", "0.5911111", "0.59110475", "0.59078425", "0.59077454", "0.5906698", "0.5903423", "0.5898421", "0.5894016", "0.58895326", "0.588822", "0.58837444", "0.5873292", "0.5873128", "0.58731043", "0.58616847", "0.5861238", "0.5859412", "0.58353287", "0.58350194", "0.5826597", "0.5824019", "0.5823688", "0.58170843", "0.5810026", "0.5808846", "0.5801804", "0.5801454", "0.58003", "0.5796297", "0.57901174", "0.5782613", "0.5782613", "0.5775573", "0.57741934", "0.57741934", "0.57741934", "0.5766048", "0.5765713", "0.5761264", "0.575612", "0.57509875", "0.5749028", "0.5743355", "0.5740531", "0.57392067", "0.57372934", "0.5736368", "0.572775" ]
0.0
-1
Create a nonreversible reaction
function notRevStep(substrate, product, enzyme, firstRectMidX, firstRectMidY, ctx, moduleNumber) { //create starting protein ctx.closePath(); ctx.beginPath(); ctx.rect(firstRectMidX - 100, firstRectMidY - 25, 100, 50); ctx.fillStyle = calculateColor(moduleNumber, 1); ctx.fill(); ctx.closePath(); ctx.beginPath(); //create arrow to second protein ctx.moveTo(firstRectMidX, firstRectMidY); ctx.arcTo(firstRectMidX + 50, firstRectMidY, firstRectMidX + 50, firstRectMidY + 50, 50); ctx.arcTo(firstRectMidX + 50, firstRectMidY + 100, firstRectMidX, firstRectMidY + 100, 50); ctx.lineTo(firstRectMidX + 10, firstRectMidY + 90); ctx.moveTo(firstRectMidX + 10, firstRectMidY + 110); ctx.lineTo(firstRectMidX, firstRectMidY + 100); ctx.stroke(); //create second protein ctx.closePath(); ctx.beginPath(); ctx.rect(firstRectMidX - 100, firstRectMidY + 75, 100, 50); ctx.fillStyle = calculateColor(moduleNumber, 0); ctx.fill(); ctx.closePath(); ctx.beginPath(); //create arrow for other substrates (inputs) into the reaction (such as ATP) ctx.moveTo(firstRectMidX + 100, firstRectMidY); ctx.arcTo(firstRectMidX + 50, firstRectMidY, firstRectMidX + 50, firstRectMidY + 50, 50); ctx.arcTo(firstRectMidX + 50, firstRectMidY + 100, firstRectMidX + 100, firstRectMidY + 100, 50); ctx.lineTo(firstRectMidX + 90, firstRectMidY + 90); ctx.moveTo(firstRectMidX + 90, firstRectMidY + 110); ctx.lineTo(firstRectMidX + 100, firstRectMidY + 100); ctx.fillStyle = "black"; ctx.stroke(); //create enzyme at center of reaction ctx.beginPath(); ctx.font = "12px Arial"; var fontMeasures = ctx.measureText(enzyme); var xCoord = firstRectMidX + 45 - (fontMeasures.width / 2); ctx.moveTo(xCoord, firstRectMidY + 50); ctx.bezierCurveTo( xCoord, firstRectMidY + 30, xCoord + fontMeasures.width + 10, firstRectMidY + 30, xCoord + fontMeasures.width + 10, firstRectMidY + 50); ctx.bezierCurveTo( xCoord + fontMeasures.width + 10, firstRectMidY + 70, xCoord, firstRectMidY + 70, xCoord, firstRectMidY + 50); ctx.fillStyle = "white"; ctx.fill(); //Label the proteins(rectangles) and enzyme(oval) ctx.font = "20px Arial"; ctx.fillStyle = "white"; ctx.fillText(substrate, firstRectMidX - 90, firstRectMidY + 5); ctx.fillText(product, firstRectMidX - 90, firstRectMidY + 105); ctx.stroke(); ctx.closePath(); ctx.beginPath(); ctx.fillStyle = "black"; ctx.font = "12px Arial"; ctx.fillText(enzyme, firstRectMidX + 50 - fontMeasures.width / 2, firstRectMidY + 54); ctx.fillText("ATP", firstRectMidX + 110, firstRectMidY + 5); ctx.fillText("ADP", firstRectMidX + 110, firstRectMidY + 105); ctx.stroke(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function reactionReverse () {\n direction = -direction; // Stromrichtung umkehren\n reset(); // Ausgangsstellung\n }", "function pattern_7_reaction() {\n return choice([\"OKAY\", \"YEAH\", \"WHAT\"]) + '!';\n}", "get reaction () {\n\t\treturn this._reaction;\n\t}", "norecord(state, action) {\n return this.record(state, action, false, true);\n }", "function complementOfConverse(r) {\n\treturn complement(converse(r));\n }", "function spawnReactionSignal() {\n $('#actionButton').css('background','blue');\n $('#actionButton').css('color','9bbc0f');\n $('#actionButton').text('PUSH !');\n $('#instructionsContent').text(\"clique !!!!\");\n\n\n hasSpawned = true;\n}", "createAction() {}", "async function fightreactions(){\r\n //if the user is taming, don't mess with reactions\r\n if(endfight == \"taming\") return\r\n // --- clears old reactions\r\n await encmsg.clearReactions().catch(allerrors)\r\n // --- reacts with all possible actions\r\n encmsg.react(fightmoji).then(() => encmsg.react(pausemoji).then(async() => {\r\n await encmsg.react(escapemoji);\r\n // --- gets all abilities the pet has\r\n let rows = await sql.all(`SELECT * FROM userabilities WHERE pet = \"${petrow.name}\" AND petowner = \"${message.author.id}\"`)\r\n // --- doesnt do anything if the pet has no abilities\r\n if(rows == \"\") return\r\n // --- cycles through all abiities the pet has and adds them as reactions\r\n else{rows.forEach(async(row) => {\r\n //gets the name of the ability\r\n let abrow = await sql.get(`SELECT * FROM abilities WHERE name = \"${row.name}\"`) //gets the ability row for the emoji ID\r\n if(!abrow) return //doesn't do anything if no ability is found\r\n //looks for an emoji with that ID and reacts with it if found\r\n encmsg.react(bot.emojis.get(abrow.emojiid)).catch(allerrors)\r\n })\r\n }\r\n }))\r\n }", "function reaction() {\n input(); // Aceptar valores ingresados ​​(posiblemente corregidos)\n calculation(); // cálculos\n}", "function inverse(flag){\n\tif (flag==0)\n\t\treturn \"b\";\n\tif (flag==1)\n\t\treturn \"w\";\n}", "static async chip(reaction, user) {\n const msg = reaction.message;\n\n // Calculate magnitude from message: more rocks, greater reward.\n const textMagnitude = Math.floor(msg.content.length / 2);\n const rewardRemaining = STATE.CHANCE.natural({ min: 1, max: textMagnitude * 2 });\n\n // Check if has a pickaxe\n const userPickaxesNum = await ItemsHelper.getUserItemQty(user.id, 'PICK_AXE');\n const noPickText = `${user.username} tried to mine the rocks, but doesn't have a pickaxe.`;\n // Remove reaction and warn.\n // if (userPickaxesNum <= 0) DELETE REACTION\n if (userPickaxesNum <= 0) return MessagesHelper.selfDestruct(msg, noPickText, 10000);\n\n // Handle chance of pickaxe breaking\n const pickaxeBreakPerc = Math.min(25, rewardRemaining);\n\n // Calculate number of extracted pickaxe with applied collab buff/modifier.\n const numCutters = ReactionHelper.countType(msg, '⛏️') - 1;\n const extractedOreNum = Math.ceil(rewardRemaining / 1.5) * numCutters;\n\n // Test the pickaxe for breaking.\n const didBreak = STATE.CHANCE.bool({ likelihood: pickaxeBreakPerc });\n if (didBreak) {\n const pickaxeUpdate = await ItemsHelper.use(user.id, 'PICK_AXE', 1);\n if (pickaxeUpdate) {\n const brokenPickDamage = -2;\n const pointsDamageResult = await PointsHelper.addPointsByID(user.id, brokenPickDamage);\n \n // Update mining economy statistics.\n EconomyNotifications.add('MINING', {\n playerID: user.id,\n username: user.username,\n brokenPickaxes: 1,\n pointGain: brokenPickDamage\n }); \n\n const actionText = `${user.username} broke a pickaxe trying to mine, ${userPickaxesNum - 1} remaining!`;\n const damageText = `${brokenPickDamage} points (${pointsDamageResult}).`;\n ChannelsHelper.propagate(msg, `${actionText} ${damageText}`, 'ACTIONS');\n }\n } else {\n // See if updating the item returns the item and quantity.\n const addMetalOre = await ItemsHelper.add(user.id, 'METAL_ORE', extractedOreNum);\n const addPoints = await PointsHelper.addPointsByID(user.id, 1);\n let diamondsFound = 0;\n\n if (STATE.CHANCE.bool({ likelihood: 3.33 })) {\n diamondsFound = 1;\n const addDiamond = await ItemsHelper.add(user.id, 'DIAMOND', diamondsFound);\n ChannelsHelper.propagate(msg, `${user.username} found a diamond whilst mining! (${addDiamond})`, 'ACTIONS');\n }\n \n if (STATE.CHANCE.bool({ likelihood: 0.25 })) {\n diamondsFound = STATE.CHANCE.natural({ min: 5, max: 25 });\n await ItemsHelper.add(user.id, 'DIAMOND', diamondsFound);\n ChannelsHelper.propagate(msg, `${user.username} hit a major diamond vein, ${diamondsFound} found!`, 'ACTIONS');\n }\n\n EconomyNotifications.add('MINING', {\n pointGain: 1,\n recOre: extractedOreNum,\n playerID: user.id,\n username: user.username,\n diamondsFound\n });\n\n // Reduce the number of rocks in the message.\n if (textMagnitude > 1) await msg.edit(EMOJIS.ROCK.repeat(textMagnitude - 1));\n else await msg.delete();\n \n // Provide feedback.\n const actionText = `${user.username} successfully mined a rock.`;\n const rewardText = `+1 point (${addPoints}), +${extractedOreNum} metal ore (${addMetalOre})!`;\n ChannelsHelper.propagate(msg, `${actionText} ${rewardText}`, 'ACTIONS');\n }\n }", "function negate(s) {\n //these are cheap ways to negate s meaning\n // ('none' is ambiguous because it could mean (all or some) )\n var logic_negate = {\n //some logical ones work\n \"everyone\": \"no one\",\n \"everybody\": \"nobody\",\n \"someone\": \"no one\",\n \"somebody\": \"nobody\",\n // everything:\"nothing\",\n \"always\": \"never\",\n //copulas\n \"is\": \"isn't\",\n \"are\": \"aren't\",\n \"was\": \"wasn't\",\n \"will\": \"won't\",\n //modals\n \"didn't\": \"did\",\n \"wouldn't\": \"would\",\n \"couldn't\": \"could\",\n \"shouldn't\": \"should\",\n \"can't\": \"can\",\n \"won't\": \"will\",\n \"mustn't\": \"must\",\n \"shan't\": \"shall\",\n \"shant\": \"shall\",\n \"did\": \"didn't\",\n \"would\": \"wouldn't\",\n \"could\": \"couldn't\",\n \"should\": \"shouldn't\",\n \"can\": \"can't\",\n \"must\": \"mustn't\"\n };\n //loop through each term..\n for (var i = 0; i < s.tokens.length; i++) {\n var tok = s.tokens[i];\n // handle ambiguous contractions\n if (tok.pos_reason === 'ambiguous_contraction') {\n tok.text = tok.normalised;\n }\n //turn 'is' into 'isn't', etc - make sure 'is' isnt followed by a 'not', too\n if (logic_negate[tok.normalised] && (!s.tokens[i + 1] || s.tokens[i + 1].normalised !== \"not\")) {\n tok.text = logic_negate[tok.normalised];\n tok.normalised = logic_negate[tok.normalised];\n if (tok.capitalised) {\n tok.text = _.toTitlecase(tok.text);\n }\n return s;\n }\n // find s first verb..\n if (tok.pos.parent === \"verb\") {\n // if verb is already negative, make it not negative\n if (tok.analysis.negative()) {\n if (s.tokens[i + 1] && s.tokens[i + 1].normalised === \"not\") {\n s.tokens.splice(i + 1, 1);\n }\n return s;\n }\n //turn future-tense 'will go' into \"won't go\"\n if (tok.normalised.match(/^will /i)) {\n tok.text = tok.text.replace(/^will /i, \"won't \");\n tok.normalised = tok.text;\n if (tok.capitalised) {\n tok.text = _.toTitlecase(tok.text);\n }\n return s;\n }\n // - INFINITIVE-\n // 'i walk' -> \"i don't walk\"\n if (tok.analysis.form === \"infinitive\" && tok.analysis.form !== \"future\") {\n tok.text = \"don't \" + (tok.analysis.conjugate().infinitive || tok.text);\n tok.normalised = tok.text.toLowerCase();\n return s;\n }\n // - GERUND-\n // if verb is gerund, 'walking' -> \"not walking\"\n if (tok.analysis.form === \"gerund\") {\n tok.text = \"not \" + tok.text;\n tok.normalised = tok.text.toLowerCase();\n return s;\n }\n // - PAST-\n // if verb is past-tense, 'he walked' -> \"he did't walk\"\n if (tok.analysis.tense === \"past\") {\n tok.text = \"didn't \" + (tok.analysis.conjugate().infinitive || tok.text);\n tok.normalised = tok.text.toLowerCase();\n return s;\n }\n // - PRESENT-\n // if verb is present-tense, 'he walks' -> \"he doesn't walk\"\n if (tok.analysis.tense === \"present\") {\n tok.text = \"doesn't \" + (tok.analysis.conjugate().infinitive || tok.text);\n tok.normalised = tok.text.toLowerCase();\n return s;\n }\n // - FUTURE-\n // if verb is future-tense, 'will go' -> won't go. easy-peasy\n if (tok.analysis.tense === \"future\") {\n if (tok.normalised === \"will\") {\n tok.normalised = \"won't\";\n tok.text = \"won't\";\n }\n else {\n tok.text = tok.text.replace(/^will /i, \"won't \");\n tok.normalised = tok.normalised.replace(/^will /i, \"won't \");\n }\n if (tok.capitalised) {\n tok.text = _.toTitlecase(tok.text);\n }\n return s;\n }\n return s;\n }\n }\n return s;\n}", "function addReactions(string, msg){\n\n // Get the json object of the unicode emojis for each letter in the alphabet.\n let unicodeMap = require(\"./../data/unicode_map.json\");\n\n // Iterate over each character in the heterogram and react with each character.\n for(let char in string){\n msg.react(unicodeMap[string[char]]);\n }\n\n}", "async function reactionMenu(message, embedNum, reactions) {\n\t\tawait message.reactions.removeAll();\n\t\tawait message.edit(embed.setDescription(embedmsgs[embedNum]));\n\t\tawait reactMultiple(message, reactions);\n\t\tfilter = (reaction, user) => reactions.includes(reaction.emoji.name) && user.id === usersid;\n\t\tcollected = await message.awaitReactions(filter, { max: 1, time: 60000, errors: ['time'] });\n\t\treaction = collected.first();\n\t\treturn reaction;\n\t}", "_send_unary_action(player1) {\n this.socket.send(\"set_unary_action\\x00\" + player1);\n }", "function roleReact(message) {\n const roleEmbed = new Discord.MessageEmbed\n roleEmbed.setTitle(\"Roles\")\n roleEmbed.setDescription(\"🐷: Peppa Pig\\n\"\n + \"🐸: Kermit the Frog\")\n roleEmbed.setColor([198, 181, 217])\n \n message.channel.send(roleEmbed).then(async msg => {\n msg.react('🐷')\n msg.react('🐸')\n const emojis = Object.keys(roles)\n for (const emoji of emojis) {\n await msg.react(emoji)\n }\n const collector = msg.createReactionCollector(({emoji}) => emojis.includes(emoji.name))\n // Handles role assignment once emoji is clicked\n collector.on('collect', ({emoji, message}, user) => {\n message.guild.members.fetch(user).then(member => {\n // Case where user already has role\n if (member.roles.cache.has(roles[emoji.name])) {\n message.reply(\"You already have that role!\")\n } else {\n // Case where user gets new role\n member.roles.add(roles[emoji.name])\n console.log(user.tag + \" reacted with \" + emoji.name + \" role\")\n message.guild.roles.fetch(roles[emoji.name])\n .then(role => message.reply(\"Congrats! You are now \" + role.name))\n }\n })\n })\n // Note: Seems like there are some widespread issues with the \"remove\" event,\n // so this function might not work until the next update\n collector.on('remove', ({emoji, message}, user) => {\n message.guild.members.fetch(user).then(member => {\n console.log(user.username + \" removed a role\")\n if (member.roles.cache.has(roles[emoji.name])) {\n console.log(user.username + \" has the role they want to remove\")\n member.roles.remove(roles[emoji.name])\n message.guild.roles.fetch(roles[emoji.name])\n .then(role => message.reply(\"You are no longer \" + role.name))\n }\n })\n })\n })\n}", "async function promptMessage(message, author, time, reactions) {\n// We gaan eerst de tijd * 1000 doen zodat we seconden uitkomen.\ntime *= 1000;\n\n// We gaan ieder meegegeven reactie onder de reactie plaatsen.\nfor (const reaction of reactions) {\n await message.react(reaction);\n}\n\n// Als de emoji de juiste emoji is die men heeft opgegeven en als ook de auteur die dit heeft aangemaakt er op klikt\n// dan kunnen we een bericht terug sturen.\nconst filter = (reaction, user) => reactions.includes(reaction.emoji.name) && user.id === author.id;\n\n// We kijken als de reactie juist is, dus met die filter en ook het aantal keren en binnen de tijd.\n// Dan kunnen we bericht terug sturen met dat icoontje dat is aangeduid.\nreturn message.awaitReactions(filter, { max: 1, time: time }).then(collected => collected.first() && collected.first().emoji.name);\n}", "function reactionRadio () {\n genDC = rb2.checked; // Flag für Gleichspannungs-Generator (mit Kommutator) \n reset(); // Ausgangsstellung\n }", "function mostraNotas(){}", "get not() {\n this.negate = !this.negate;\n return this;\n }", "_sendDontComprehendMessage(channel) {\n const REPLIES = [\n 'Jag förstår inte riktigt.',\n 'Det där är utanför min kompetens.',\n 'Jag har inte betalt för att svara på det.',\n 'Hmm, jag vet inte riktigt vad du menar?',\n 'Du säger säkert något viktigt, men jag förstår inte.',\n 'Jag är ledsen, men du får ta det där med någon annan.',\n ];\n\n const msg = `\n ${pickRandomMessage(REPLIES)} Skriv !help i ett DM om du vill veta vad du kan fråga mig.\n `;\n this.sendMessage(msg, channel);\n }", "PostReferenceAsEmbed(Message) {\n const embed = new Discord.MessageEmbed();\n\n var desc = '';\n if (this.action !== undefined) {\n desc = '**' + locale.casttime + '** ' + this.action + '\\n';\n }\n desc += this.description;\n var truncateddesc = desc;\n if (truncateddesc.length >= limits.fieldvalue) {\n truncateddesc = truncateddesc.substring(0, limits.fieldvalue - 4);\n truncateddesc += '...';\n }\n\n embed.setAuthor(this.name)\n .setThumbnail(Message.author.avatarURL())\n .setDescription(truncateddesc);\n\n var sent = Message.channel.send(embed).then(async sentEmbed => {\n // React to our own embed to allow users to receive full text\n // if it has been truncated\n var filterbuilder = [];\n\n if (config.allowfulltextreact === true) {\n if (this.description.length >= limits.fieldvalue - 1) {\n filterbuilder.push('📝');\n await sentEmbed.react('📝');\n }\n }\n\n // Only collect the proper reacts from non-self users\n const filter = (reaction, user) => {\n return filterbuilder.includes(reaction.emoji.name) && user.id === message.author.id;\n };\n\n sentEmbed.awaitReactions(filter, { max: 1, time: 60000, errors: ['time']})\n .then(collected => {\n const reaction = collected.first();\n\n if (reaction.emoji.name === '📝') {\n // Send the entire reference text through dms\n // This may take several dms and can be disabled in the config\n // Option only available if description was truncated\n var substrlength = 0;\n var s = '**' + this.name + '**\\n' + desc;\n\n // Prune output to dm char limit breaking at last line before limit reached\n while (s.length > limits.dm - 1) {\n substrlength = s.substring(0, limits.dm - 1).lastIndexOf(' ');\n Message.author.send(s.substring(0, substrlength));\n s = s.substring(substrlength, s.length);\n }\n Message.author.send(s);\n }\n }).catch(() => {});\n });\n return sent;\n }", "action(cache) {\n const data = cache.actions[cache.index];\n const storage = parseInt(data.channel, 10);\n const varName = this.evalMessage(data.varName, cache);\n const channel = this.getChannel(storage, varName, cache);\n const reason = this.evalMessage(data.reason, cache);\n /** @type {import('discord.js').CreateInviteOptions} */\n const options = {};\n if (data.maxUses) {\n options.maxUses = parseInt(this.evalMessage(data.maxUses, cache), 10);\n } else {\n options.maxUses = 0;\n }\n if (data.lifetime) {\n options.maxAge = parseInt(this.evalMessage(data.lifetime, cache), 10);\n } else {\n options.maxAge = 0;\n }\n if (options.maxAge > 86400) options.maxAge = 86400;\n if (reason) options.reason = reason;\n options.temporary = data.temporary === \"true\";\n options.unique = data.unique === \"true\";\n if (Array.isArray(channel)) {\n this.callListFunc(channel, \"createInvite\", [options]).then((invite) => {\n const varName2 = this.evalMessage(data.varName2, cache);\n const storage2 = parseInt(data.storage, 10);\n this.storeValue(invite.url, storage2, varName2, cache);\n this.callNextAction(cache);\n });\n } else if (channel?.createInvite) {\n channel\n .createInvite(options)\n .then((invite) => {\n const varName2 = this.evalMessage(data.varName2, cache);\n const storage2 = parseInt(data.storage, 10);\n this.storeValue(invite.url, storage2, varName2, cache);\n this.callNextAction(cache);\n })\n .catch((err) => this.displayError(data, cache, err));\n } else {\n this.callNextAction(cache);\n }\n }", "function ge_neg(pub) {\n pub[31] ^= 0x80;\n}", "function correctReaction(data){\r\n\t\t\t$box = $('#' + data.id);\r\n\t\t\t$box.children(\".reactBox\").hide();\r\n\t\t\t$box.effect(\"highlight\", {color: \"#FFE0C7\"}, 500, function(){\r\n\t\t\t\t$box.animate({backgroundColor: \"#FFE0C7\"}, 500, function(){\r\n\t\t\t\t\t$box.children(\"strong\").append(\" & \" + data.reactingNick);\r\n\t\t\t\t});\r\n\t\t\t})\r\n\t\t}", "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 }", "@POST('/rescues/:id/relationships/rats')\n @websocket('rescues', 'rats', 'create')\n @parameters('id')\n @authenticated\n async relationshipRatsCreate (ctx) {\n const result = await this.relationshipChange({\n ctx,\n databaseType: Rescue,\n change: 'add',\n relationship: 'rats',\n })\n const query = new DatabaseQuery({ connection: ctx })\n const document = new DatabaseDocument({ query, result, type: RescueView })\n Event.broadcast('fuelrats.rescueupdate', ctx.state.user, ctx.params.id, document)\n\n ctx.response.status = StatusCode.noContent\n return true\n }", "negate() {\n this._truth = !this._truth;\n }", "negate() {\n this._truth = !this._truth;\n }", "async function react(addOrRemove, channel, ts, reaction) {\n return fetch('https://slack.com/api/reactions.' + addOrRemove, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n Authorization: `Bearer ${process.env.SLACK_BOT_TOKEN}`\n },\n body: JSON.stringify({ channel: channel, name: reaction, timestamp: ts })\n }).then(r => r.json()).catch(err => console.error(err))\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 }", "static async onReaction(reaction, user) {\n // High chance of preventing any mining at all to deal with rate limiting.\n if (STATE.CHANCE.bool({ likelihood: 40 })) return false;\n\n const isOnlyEmojis = MessagesHelper.isOnlyEmojis(reaction.message.content);\n const isPickaxeReact = reaction.emoji.name === '⛏️';\n const isCooperMsg = UsersHelper.isCooperMsg(reaction.message);\n const isUserReact = !UsersHelper.isCooper(user.id);\n \n // Mining minigame guards.\n if (!isUserReact) return false;\n if (!isCooperMsg) return false;\n if (!isPickaxeReact) return false;\n if (!isOnlyEmojis) return false;\n\n const msgContent = reaction.message.content;\n\n const firstEmojiString = (msgContent[0] || '') + (msgContent[1] || '');\n const firstEmojiUni = MessagesHelper.emojiToUni(firstEmojiString);\n const rockEmojiUni = MessagesHelper.emojiToUni(EMOJIS.ROCK);\n const isRocksMsg = firstEmojiUni === rockEmojiUni;\n\n if (isRocksMsg) this.chip(reaction, user);\n }", "negate ()\n\t{\n\t\treturn new Quaternion(-this._w,-this._x,-this._y,-this._z);\n\t}", "function setupReactions() {\n \n const isAnalyst = environment.isAnalystTask();\n \n function noDuplicateValues(_, __, group) {\n const getText = (proxy) => {\n const trimmed = proxy.value\n .replace(/\\/?((index)?.(html|htm|php))?#?\\??$$/, '')\n .replace(/^https?:\\/\\/(www[.])?/, 'https://');\n return util.normaliseUrl(trimmed).toLowerCase();\n };\n shared.noDuplicateValues(group, getText);\n }\n\n ー({\n name: 'Text',\n rootSelect: '#extraction-editing',\n select: 'textarea',\n pick: isAnalyst\n ? [1, 5, 9, 13, 17]\n : [1, 4, 7, 10, 13],\n onClick: (proxy, idx) => {\n util.attention(ref.addItem0.slice(-3), idx - 2, 'click');\n util.attention([proxy], 0, 'focus');\n },\n onFocusout: [\n shared.trim,\n noDuplicateValues,\n shared.noDuplicateVerbs,\n shared.removeQuotes,\n ],\n onInteract: [\n shared.checkCapitals,\n shared.noMoreThanXChars,\n noDuplicateValues,\n shared.noDuplicateVerbs,\n noForbiddenPhrase,\n ],\n onKeydown_CtrlShiftAltArrowLeft:\n (_, idx) => shared.item.swapLeft(idx),\n onKeydown_CtrlShiftAltArrowRight:\n (_, idx) => shared.item.swapRight(idx),\n onKeydown_CtrlAltArrowLeft:\n (_, idx) => shared.item.moveLeft(idx),\n onKeydown_CtrlAltArrowRight:\n (_, idx) => shared.item.moveRight(idx),\n onKeydown_CtrlDelete: (_, idx) => shared.item.remove(idx),\n onLoad: [\n shared.trim,\n shared.checkCapitals,\n shared.noMoreThanXChars,\n noDuplicateValues,\n shared.noDuplicateVerbs,\n noForbiddenPhrase,\n ],\n ref: 'textAreas0',\n });\n\n ー({\n name: 'Link',\n rootSelect: '#extraction-editing',\n select: 'textarea',\n pick: isAnalyst\n ? [2, 6, 10, 14, 18]\n : [2, 5, 8, 11, 14],\n onFocusout: [\n shared.requireUrl,\n shared.removeScreenshot,\n shared.removeQuotes,\n shared.noPdfLinks,\n shared.noMalformedLinks,\n shared.noHomepageLinks,\n ],\n onInteract: shared.noPdfLinks,\n onKeydown_CtrlAlt: (_, idx) => shared.item.focus(idx),\n onLoad: [\n shared.disableSpellcheck,\n shared.keepAlive,\n shared.noHomepageLinks,\n shared.noMalformedLinks,\n shared.noPdfLinks,\n ],\n onPaste: [\n shared.requireUrl,\n shared.removeBannedDomains,\n shared.removeScreenshot,\n shared.noHomepageLinks,\n shared.noMalformedLinks,\n shared.noPdfLinks,\n ],\n ref: 'linkAreas0',\n });\n \n ー({\n name: 'Screenshot',\n rootSelect: isAnalyst\n ? '#extraction-editing'\n : '.extraction-screenshots',\n select: 'textarea',\n pick: isAnalyst\n ? [3, 7, 11, 15, 19]\n : [0, 1, 2, 3, 4],\n onFocusout: [\n shared.requireUrl,\n shared.requireScreenshot,\n shared.removeQuotes,\n ],\n onKeydown_CtrlAlt: (_, idx) => shared.item.focus(idx),\n onLoad: shared.disableSpellcheck,\n onPaste: [\n shared.requireUrl,\n shared.requireScreenshot,\n ],\n ref: 'screenshots0',\n });\n\n ー({\n name: 'Dashes',\n rootSelect: '#extraction-editing',\n select: 'textarea',\n pick: isAnalyst\n ? [4, 8, 12, 16, 20]\n : [3, 6, 9, 12, 15],\n onFocusin: shared.removeDashes,\n onFocusout: [\n shared.removeQuotes,\n shared.addDashes,\n ],\n onKeydown_CtrlAlt: (_, idx) => shared.item.focus(idx),\n onLoad: [\n shared.addDashes,\n shared.tabOrder.remove,\n shared.disableSpellcheck,\n ],\n });\n\n ー({\n name: 'Analyst Comment',\n select: '.feedback-display-text',\n pick: [0],\n ref: 'analystComment',\n });\n\n ー({\n name: 'Extraction Page Url',\n rootSelect: '#extraction-editing',\n select: 'textarea',\n pick: [0],\n onKeydown_CtrlAltArrowRight: () => {\n util.attention(ref.editButton0, 0, 'click');\n shared.item.focus(0);\n },\n onLoad: [\n shared.disableSpellcheck,\n shared.removeScreenshot,\n shared.requireUrl,\n ],\n ref: 'extractionUrl0',\n });\n\n ー({\n name: 'LinksAndLP',\n rootSelect: '#extraction-editing',\n select: 'textarea',\n pick: isAnalyst\n ? [2, 6, 10, 14, 18, 0]\n : [2, 5, 8, 11, 14, 0],\n onInteract: [\n shared.noDomainMismatch,\n noDuplicateValues,\n ],\n onLoad: [\n shared.noDomainMismatch,\n noDuplicateValues,\n ],\n onPaste: [\n shared.noDomainMismatch,\n noDuplicateValues,\n ],\n ref: 'openInTabs',\n });\n\n ー({\n name: 'Final Url',\n select: 'textarea',\n pick: [65],\n ref: 'finalUrl',\n });\n\n ー({\n name: 'InvalidScreenshot',\n rootSelect: '.errorbox-good',\n rootNumber: 1,\n select: 'textarea',\n onKeydown_CtrlAltArrowRight: shared.comment.focus,\n onFocusout: shared.removeQuotes,\n onLoad: [\n shared.disableSpellcheck,\n shared.requireUrl,\n shared.requireScreenshot,\n ],\n onPaste: [\n shared.requireUrl,\n shared.requireScreenshot,\n ],\n ref: 'invalidScreenshot',\n });\n\n ー({\n name: 'Creative',\n rootSelect: '.context-item',\n rootNumber: [2],\n select: '*',\n pick: [3, 6, 8],\n onLoad: [\n shared.checkEmptyCreative,\n checkDomainMismatch,\n ],\n ref: 'creative',\n });\n\n const fall = isAnalyst\n ? [[1, 2],[5, 6],[9, 10],[13, 14],[17, 18]]\n : [[1, 2],[4, 5],[7, 8],[10, 11],[13, 14]];\n for (let pair of fall) {\n ー({\n name: 'Fall',\n rootSelect: '#extraction-editing',\n select: 'textarea',\n pick: pair,\n onPaste: fallThrough,\n });\n }\n\n const remaining = isAnalyst\n ? [0, 8, 17, 26, 35]\n : [0, 6, 13, 20, 27];\n for (let rootNumber of remaining) {\n ー({\n name: 'Remaining',\n rootSelect: '.extraction-item table',\n rootNumber,\n select: 'div, textarea',\n pick: [2, 3],\n onChange: shared.updateCharacterCount,\n onFocusin: shared.updateCharacterCount,\n onKeydown: shared.updateCharacterCount,\n onLoad: shared.updateCharacterCount,\n });\n }\n\n ー({\n name: 'StatusDropdown',\n select: 'select',\n pick: [0, 1, 2],\n ref: 'statusDropdown',\n });\n\n ー({\n name: 'Add Data',\n rootSelect: '.extraction',\n select: 'label',\n withText: 'Add Data',\n onKeydown_CtrlAltArrowRight: () => {\n util.attention(ref.addDataButton0, 0, 'click');\n shared.item.focus(0);\n },\n ref: 'addDataButton0',\n });\n\n ー({\n name: 'Edit',\n rootSelect: '.extraction',\n select: 'label',\n withText: 'Edit',\n onKeydown_CtrlAltArrowRight: () => {\n util.attention(ref.editButton0, 0, 'click');\n shared.item.focus(0);\n },\n onLoad: shared.tabOrder.add,\n ref: 'editButton0',\n });\n\n ー({\n name: 'Add Item',\n rootSelect: '#extraction-editing',\n select: 'label',\n withText: 'Add Item',\n ref: 'addItem0',\n });\n\n ー({\n name: 'Leave Blank',\n rootSelect: '#extraction-editing',\n select: 'label',\n withText: 'Leave Blank',\n ref: 'leaveBlank0',\n });\n\n ー({\n name: 'ApprovalButtons',\n rootSelect: '.primaryContent',\n rootNumber: 3,\n select: 'label',\n pick: [0, 1],\n ref: 'approvalButtons',\n });\n\n ー({\n name: 'Comment Box',\n rootSelect: '.addComments',\n select: 'textarea',\n pick: [0],\n onFocusout: util.delay(start, 200),\n onInteract: shared.removeQuotes,\n onKeydown_CtrlAltArrowRight: () => shared.item.focus(0),\n ref: 'finalCommentBox',\n });\n\n ー({\n name: 'CanOrCannotExtract',\n select: 'label',\n pick: [0, 1],\n onKeydown_CtrlAltArrowRight: () => shared.item.focus(0),\n ref: 'canOrCannotExtractButtons',\n });\n \n ー({\n name: 'Visit LP',\n select: '.lpButton button',\n pick: [0],\n css: {opacity: 1},\n });\n \n function manualSubmit() {\n const msg =\n 'Please use the Submit Hotkey instead of clicking manually.';\n user.log.warn(\n msg,\n {save: true, print: true, toast: true}\n );\n alert(msg);\n };\n manualSubmit = util.debounce(manualSubmit, 4000);\n\n ー({\n name: 'Submit Button',\n select: '.submitTaskButton',\n pick: [0],\n css: {opacity: 1},\n onFocusin: manualSubmit,\n ref: 'submitButton',\n })[0].textContent = 'Ready to submit';\n\n ー({\n name: 'Skip Button',\n select: '.taskIssueButton',\n pick: [0],\n ref: 'skipButton'\n });\n\n ー({\n name: 'Task Title',\n select: '.taskTitle',\n ref: 'taskTitle'\n });\n\n ー({\n name: 'TabRemove',\n select: 'label, button',\n onLoad: shared.tabOrder.remove,\n });\n\n ー({\n name: 'Extractions2And3',\n select: '.extraction',\n pick: [1, 2],\n css: {display: 'none'},\n });\n\n ー({\n name: 'Preview Extractions',\n select: '.extraction-preview',\n pick: [1, 2],\n css: {display: 'none'},\n });\n \n const setStatus = shared.setStatus;\n const statusReactions = {\n onKeydown_CtrlAltDigit0: setStatus('canExtract'),\n onKeydown_CtrlAltDigit1: setStatus('insufficient'),\n onKeydown_CtrlAltDigit2: setStatus('pageError'),\n onKeydown_CtrlAltDigit3: setStatus('dynamic'),\n onKeydown_CtrlAltDigit4: setStatus('nonLocale'),\n onKeydown_CtrlAltDigit5: setStatus('other'),\n onKeydown_CtrlAltDigit6: setStatus('pII'),\n onKeydown_CtrlAltDigit7: setStatus('drugDomain'),\n onKeydown_CtrlAltDigit8: setStatus('alcoholDomain'),\n onKeydown_CtrlAltDigit9: setStatus('adultDomain'),\n onKeydown_CtrlShiftAltDigit0: setStatus('canExtract'),\n onKeydown_CtrlShiftAltDigit1: setStatus('other'),\n onKeydown_CtrlShiftAltDigit2: setStatus('urlsUnchanged'),\n onKeydown_CtrlShiftAltDigit3: setStatus('urlMismatch'),\n onKeydown_CtrlShiftAltDigit4: setStatus('emptyCreative'),\n };\n \n const experimentalEscapeApprove = () => {\n if (user.config.get('use escape-key to approve')) {\n approve();\n }\n };\n \n const experimentalSubmit = () => {\n if (user.config.get('use escape-key to approve')) {\n submit();\n }\n };\n \n const submitKeys = {\n onKeydown_CtrlEnter: submit,\n onKeydown_CtrlAltEnter: submit,\n onKeydown_CtrlNumpadEnter: submit,\n onKeydown_CtrlShiftEscape: experimentalSubmit,\n };\n \n const otherKeys = {\n onKeydown_Backquote: beginTask,\n onKeydown_CtrlAltBackquote: beginTask,\n onKeydown_CtrlAltBracketLeft: shared.resetCounter,\n onKeydown_CtrlAltBracketRight: shared.skipTask,\n onKeydown_NumpadSubtract: shared.skipTask,\n onKeydown_NumpadAdd: approve,\n onKeydown_Backslash: approve,\n onKeydown_Escape: experimentalEscapeApprove,\n onKeydown_CtrlShiftDelete: shared.item.removeAll,\n };\n\n eventReactions.setGlobal({\n ...statusReactions,\n ...submitKeys,\n ...otherKeys,\n });\n }", "_createMessage() {\n let messageArr = ['абонент', 'абонента', 'абонентов'];\n\n function createMessage(number, startWord) {\n let endMessage = null;\n let startMessage = (number === 1) ? startWord : (startWord + \"o\");\n\n if(number === 1) {\n endMessage = messageArr[0];\n } else if (number == 12\n || number == 13\n || number == 14) {\n\n endMessage = messageArr[2];\n } else if( number.toString()[number.toString().length - 1] === '2'\n || number.toString()[number.toString().length - 1] === '3'\n || number.toString()[number.toString().length - 1] === '4') {\n\n endMessage = messageArr[1];\n } else {\n endMessage = messageArr[2];\n }\n\n return startMessage + \" \" + number + \" \" + endMessage;\n }\n\n noty({\n text: createMessage( (this._correctData.length), 'Загружен'),\n type: 'success',\n timeout: '3000'\n });\n\n if(this._inCorrectData.length) {\n noty({\n text: createMessage( (this._inCorrectData.length - 1), 'Не загружен'),\n type: 'error',\n timeout: '3000'\n });\n }\n }", "function Conversation() {}", "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 }", "async function OnboardingWithoutRole(Actorwithrole, Holder, Verifier, VerifierWalletConfig, VerifierWalletCredential){\n //3.1 EL HOLDER SE CREA UN DID QUE UTILIZARÁ PARA COMUNICARSE CON EL OTRO ACTOR.\n const [FromHolderToDid,FromHolderToverkey] = await didnormal.createDid(Holder.wh);\n\n //3.2 EL HOLDER CREA UN REQUEST PARA EL STEWARD\n //let ActornormalRequest = await indy.buildNymRequest(Holder.didForAFM, FromHolderToDid, FromHolderToverkey, null, null);\n //console.log(\"ACTOR NORMAL REQUEST\")\n //console.log(ActornormalRequest)\n //let realRequest = await indy.appendRequestEndorser(ActornormalRequest, Actorwithrole.did)\n //console.log(\" \")\n //console.log(\"REQUEST REAL\")\n //console.log(realRequest)\n //let ActornormalsignedRequest= await indy.multiSignRequest(Holder.wh, Holder.didForAFM, realRequest ) \n //console.log(\" \")\n //console.log(\"Signed real request\")\n //console.log(ActornormalsignedRequest)\n\n //3.2 EL STEWARD O TRUST ANCHOR REALIZA UNA TRANSACCIÓN NYM A LA RED PARA REGISTRAR EL DID Y VERKEY DEL HOLDER.\n //resultadoregistrodeactorsinrol = await sendnymwithoutroletransaction.SendNymWithoutRole(Actorwithrole.poolHandle,Actorwithrole.wh, Actorwithrole.did,ActornormalsignedRequest)\n //console.log(\"SEND NYM WITHOUT ROLE\")\n //console.log(resultadoregistrodeactorsinrol)\n resultadoregistro = await sendnymtransaction.sendNym(Actorwithrole.poolHandle,Actorwithrole.wh, Actorwithrole.did,FromHolderToDid, FromHolderToverkey,null)\n \n //3.3 EL HOLDER CREA UNA SOLICITUD DE CONEXIÓN\n nonce1 = await indy.generateNonce();\n Holder.connectionRequest = {\n 'did': FromHolderToDid ,\n 'nonce': nonce1\n }\n //EL holder le envía la solicitud a el verifier.\n Verifier.connectionRequest = Holder.connectionRequest\n \n //3.4 EL VERIFIER SE CREA UN DID PARA COMUNICARSE CON EL HOLDER\n Verifier.wh = await wallet.createWallet(VerifierWalletConfig,VerifierWalletCredential);\n [FromVerifierToDid,FromVerifierToverkey] = await didnormal.createDid(Verifier.wh);\n \n\n //3.5 EL VERIFIER CREA UN CONNECTION RESPONSE\n Verifier.connectionResponse = JSON.stringify({\n 'did': FromVerifierToDid,\n 'verkey': FromVerifierToverkey,\n 'nonce': Verifier.connectionRequest['nonce']\n })\n\n //3.6 EL VERIFIER CIFRA LA RESPUESTA\n //Para cifrar la respuesta primero necesita la clave pública del Holder\n Verifier.HoldersVerkeyForActornormal = await indy.keyForDid(Verifier.poolHandle,Verifier.wh, Verifier.connectionRequest['did']);\n \n //Ya puede utilizar la clave pública del Holder para cifrar la respuesta de conexión.\n Verifier.anoncryptedConnectionResponse = await indy.cryptoAnonCrypt(Verifier.HoldersVerkeyForActornormal, Buffer.from(Verifier.connectionResponse, 'utf8'));\n //El Verifier le envía la respuesta cifrada al Holder\n Holder.anoncryptedConnectionResponse = Verifier.anoncryptedConnectionResponse\n \n //3.7 EL HOLDER DESCIFRA LA RESPUESTA CON SU CLAVE PRIVADA\n Holder.decryptedConnectionResponse = JSON.parse(Buffer.from(await indy.cryptoAnonDecrypt(Holder.wh, FromHolderToverkey, Holder.anoncryptedConnectionResponse)));\n //3.8 EL HOLDER AUTENTICA AL OTRO ACTOR\n if ( Holder.connectionRequest['nonce'] !== Holder.decryptedConnectionResponse['nonce']) {\n throw Error(\"Los nonces no coinciden\");\n }\n\n //3.9 EL STEWARD ENVÍA EL DID Y VERKEY DEL VERIFIER A LA RED MEDIANTE UNA TRANSACCIÓN NYM\n resultadoregistro2 = await sendnymtransaction.sendNym(Actorwithrole.poolHandle,Actorwithrole.wh, Actorwithrole.did, Holder.decryptedConnectionResponse['did'], Holder.decryptedConnectionResponse['verkey'], null)\n return [FromHolderToDid,FromHolderToverkey,FromVerifierToDid,FromVerifierToverkey,Verifier.connectionRequest]\n}", "async function createChan()\n{\n\tlet choice = [\n\t\t{\n\t\t\tname: \"vocal\",\n\t\t\tvalue: \"vocal\"\n\t\t},\n\t\t{\n\t\t\tname: \"text\",\n\t\t\tvalue: \"text\"\n\t\t},\n\t\t{\n\t\t\tname: \"Retourner au menu précédent !\",\n\t\t\tvalue: -1\n\t\t},\n\t\treturnObjectLeave()\n\t]\n\tlet response = await ask(\n\t{\n\t\ttype: \"list\",\n\t\tmessage: \"Quelle type de channel voulez vous créer ?\",\n\t\tname: \"chanType\",\n\t\tchoices: choice\n\t})\n\tif (response.chanType == -1)\n\t{\n\t\taskWhatToDoChan()\n\t}\n\telse if (response.chanType == -2)\n\t{\n\t\tendProcess()\n\t}\n\telse\n\t{\n\t\tlet responseName = await ask(\n\t\t{\n\t\t\ttype: \"input\",\n\t\t\tmessage: \"Quelle nom souhaitez vous donner a ce chan ?\",\n\t\t\tname: \"chanName\"\n\t\t})\n\t\tdoCreateChan(responseName.chanName, response.chanType)\n\t\taskWhatToDoChan()\n\n\t}\n\n}", "function createRole(message) {\n message.reply(\"Enter a name for this role\")\n .then(function() {\n // collect the role name\n const messageFilter = msg => msg.author.id === message.author.id\n const collector = message.channel.createMessageCollector(messageFilter, {max: 1, time: 60000})\n collector.on(\"collect\", collected => {\n // save the role name\n let roleName = collected.content\n message.reply(\"Now react to this message with the associated emoji\")\n .then(msg => {\n // filter for desired emoji\n const emojiFilter = (reaction, user) => {\n return user.id === message.author.id\n }\n msg.awaitReactions(emojiFilter, { max: 1, time: 30000, errors: ['time'] })\n .then(collected => {\n //collect desired emoji\n let roleEmoji = collected.first().emoji.name\n msg.guild.roles.create({\n data: {\n name: roleName\n }\n })\n console.log(roleName + \" \" + roleEmoji + \" created\")\n //push to emojis.json\n pushToFile(roleName, roleEmoji) \n })\n })\n })\n })\n}", "function sendReaction(id, reaction) {\n\n const myReaction = reaction == react[0] ? \"A\" : reaction == react[1] ? \"B\" : reaction == react[2] ? \"C\" :\n reaction == react[3] ? \"D\" : reaction == react[4] ? 'E' : \"F\";\n\n let reactionObject = {\n post_id: id,\n text: reaction,\n text_match: myReaction\n };\n isInternetConnected()\n .then(() => {\n props.reactionOnPostRequest(reactionObject)\n })\n .catch(() => {\n toast('Error', 'Please Connect To Internet')\n })\n }", "function sendVersionNeg () {\n\t//sample version data here\n\tVersionNegotiation(0x01, 0x02, 0x1234);\n}", "function werewolf(recep,assignmap,mid) {\n var wolfcount = 0;\n var msg = \"The Werewolves are: \";\n for (const [player,role] of assignmap.entries()) {\n if (role == \"werewolf\") {\n msg += client.users.cache.get(player).username;\n msg += ' ';\n wolfcount++;\n }\n }\n client.users.cache.get(recep).send(msg);\n if (wolfcount == 1) {\n client.users.cache.get(recep).send(\"Looks like you're the only wolf, choose a center role to view!\")\n .then(async function (botmessage) {\n for (emoj in settings.emoji_middle) {\n botmessage.react(settings.emoji_middle[emoj]);\n }\n const filter = (reaction, user) => {\n return settings.emoji_middle.includes(reaction.emoji.name) && user.id ===recep;\n };\n const collector = botmessage.createReactionCollector(filter, {max:1, time: 120000});\n \n collector.on('collect', (reaction, user) => {\n console.log(`Collected ${reaction.emoji.name} from ${user.tag}`);\n client.users.cache.get(recep).send(`The ${reaction.emoji.name} role is a ${mid[settings.emoji_middle.indexOf(reaction.emoji.name)]}`);\n });\n \n collector.on('end', collected => {\n console.log('Lone wolf task completed');\n actionsleft--;\n });\n });\n }\n console.log('werewolf task completed');\n return;\n}", "function reactionButton () {\n dir = -dir; // Stromrichtung umkehren\n dxA = 3*dir; dyA = 2*dir; // Hilfsgrößen für Pfeilspitzen\n }", "getReaction(event) {\n event.preventDefault()\n const { saveGame, game } = this.props\n const now = new Date().getTime()\n if(this.isPlayerOne()){\n saveGame(game, { p1Reaction: now - game.p1Start })\n } else {\n saveGame(game, { p2Reaction: now - game.p2Start })\n }\n}", "makeReverbRouteButton() {\n this.reverbRouteActive = false;\n this.reverbRouteButton = createButton('DELAY -> VERB');\n this.reverbRouteButton.position(0.2 * this.parentXpos, this.parentYpos + 1.1 * this.parentButHt);\n this.reverbRouteButton.size(0.5 * this.parentButWd, 0.5 * this.parentButHt);\n this.reverbRouteButton.mousePressed(() => {\n this.reverbRouteActive = this.reverbRouteActive ? this.reverbRouteActive = false : this.reverbRouteActive = true;\n if (this.reverbRouteActive) {this.delay.connect(this.verb);}\n else {this.delay.disconnect(this.verb);}\n \n })\n }", "setNegate() {\nRQ.setNegateQV(this.xyzw);\nreturn this;\n}", "get state() {\r\n return reactionState;\r\n }", "function transformTestAction(normRep, blackboard) {\n normRep.renderAs = 'action';\n}", "function reactionButton1 () {\n t0 = new Date(); // Anfangszeitpunkt (s) \n on = true; // Animation einschalten\n order(); // Falls nötig, Nummerierung der Einzelkräfte ändern\n }", "get inverse() {\n let [a, b, c, d] = this.coeffs;\n return new MobiusTransform([\n d, b.neg,\n c.neg, a\n ]);\n }", "function Not(factA){\n return {type:\"composite\",verify:game=>!factA.verify(game)}\n}", "function liftAction(action) { // 187\n var liftedAction = { // 188\n type: ActionTypes.PERFORM_ACTION, // 189\n action: action, // 190\n timestamp: Date.now() // 191\n }; // 192\n return liftedAction; // 193\n} // 194", "static onReaction(reaction, user) {\n try {\n if (UsersHelper.isCooper(user.id)) return false;\n if (!UsersHelper.isCooperMsg(reaction.message)) return false;\n if (!this.calculateRarityFromMessage(reaction.message)) return false;\n if (this.isCrateOpen(reaction.message)) return false;\n if (reaction.emoji.name !== '🪓') return false;\n\n const emojiIdentifier = MessagesHelper.getEmojiIdentifier(reaction.message);\n const crateEmojiNames = _.map(_.values(CRATE_DATA), \"emoji\");\n if (!crateEmojiNames.includes(emojiIdentifier)) return false;\n \n this.axeHit(reaction, user);\n } catch(e) {\n console.error(e);\n }\n }", "generateActions(g)\n {\n return [\"attack\", \"wait\"];\n }", "function togglePower() {\n let message = '{\"id\":1,\"method\":\"toggle\",\"params\":[]}'\n rtm({\n type: 'request',\n message: message\n });\n}", "setInvert() {\nRQ.setConjugateQV(this.xyzw);\nreturn this;\n}", "noAction() {\n this.damage = 0;\n this.player.blocking = false;\n }", "function reactionRadioButton () {\n if (rbR.checked) {dPhi = 0; r = 500;} // Für Widerstand: Phasenverschiebung, Widerstand\n else if (rbC.checked) {dPhi = Math.PI/2; c = 0.0001;} // Für Kondensator: Phasenverschiebung, Kapazität\n else {dPhi = -Math.PI/2; l = 200;} // Für Spule: Phasenverschiebung, Induktivität\n reaction(false); // Eingabefelder aktualisieren, rechnen, Ausgabe aktualisieren\n }", "function reactionStart () {\n if (bu2.state != 1) t0 = new Date(); // Falls Animation angeschaltet, neuer Anfangszeitpunkt\n switchButton2(); // Zustand des Schaltknopfs ändern\n enableInput(false); // Eingabefelder deaktivieren\n if (bu2.state == 1) startAnimation(); // Entweder Animation starten bzw. fortsetzen ...\n else stopAnimation(); // ... oder stoppen\n reaction(); // Eingegebene Werte übernehmen und rechnen\n paint(); // Neu zeichnen\n }", "function reactionStart () {\n if (bu2.state != 1) t0 = new Date(); // Falls Animation angeschaltet, neuer Anfangszeitpunkt\n switchButton2(); // Zustand des Schaltknopfs ändern\n enableInput(false); // Eingabefelder deaktivieren\n on = (bu2.state == 1); // Flag für Animation\n slow = cbSlow.checked; // Flag für Zeitlupe\n reaction(true); // Eingegebene Werte übernehmen, rechnen, Ausgabe aktualisieren\n }", "use(currentPlayer, itemName, channel){\n let message\n let consequences\n let item = this.utils.resolveNamable(itemName, currentPlayer.inventory.items)\n if(item){\n if(item.consequences.length < 1){\n message = `This ${item.name.name} does nothing at all, you don't even know how to use it.`\n } else {\n consequences = item.consequences\n }\n }else{\n let interaction = this.utils.resolveNamable(itemName, this.maps[currentPlayer.position].interactions)\n if(interaction && interaction.type === \"activable\"){\n if(interaction.consequences.length < 1){\n message = `You tried to use the ${interaction.name.name}, and it did nothing at all.`\n } else {\n consequences = interaction.consequences\n }\n }else if(interaction && interaction.type === \"grabbable\"){\n message = \"Shouldn't you try to pick it up instead?\"\n }else{\n message = \"Doesn't seems to do anything.\"\n }\n }\n if(consequences){\n this.makeItHappen(currentPlayer, consequences, channel)\n }else {\n channel.send(message).catch(err => {console.error(err)})\n }\n }", "function ellaborate(choice){\n if (choice == \"r\"){\n return \"🗿\"\n }else if(choice == \"p\"){\n return \"🧻\"\n }else{\n return \"✂️\"\n }\n}", "loadOriginalAction() {\n this.abilities.actions = [];\n this.action({\n title: 'Steal an honor',\n cost: AbilityDsl.costs.bowSelf(),\n condition: context => context.player.opponent && context.player.isLessHonorable(),\n gameAction: AbilityDsl.actions.takeHonor()\n });\n }", "resolveAsNormalAttack(message) {\n const success = message.getFlag(\"urbanjungle\", \"resistSuccess\");\n const successes = message.getFlag(\"urbanjungle\", \"resistSuccessCount\");\n\n if (successes > opposingsuccesses) {\n this.successfulAttackToChat(success, successes);\n }\n else {\n this.failedAttackToChat();\n }\n }", "instruct(){\n var text1;\n var determinant;\n\n \n if(this.on == 1){\n determinant = 0;\n text1 = 'TURN '+this.name+' to off';\n }\n else if(this.on == 0){\n determinant = 1;\n text1 = 'TURN '+this.name+' to on';\n }\n\n //when at initial state\n //this.on is not initialized yet\n else if(this.on == -1){\n //console.log(this.flip);\n if(this.flip == 1){\n determinant = 0;\n text1 = 'TURN '+this.name+' to off';\n }\n else{\n determinant = 1;\n text1 = 'TURN '+this.name+' to on';\n }\n }\n \n //return:\n //the name of the interacts\n //the instruction texts\n //the state that needs to be achieved \n return [this.name,text1,determinant];\n }", "function interactions() {\n\n\tvar end;\n\t\n\tif (f['giver']=='iPurse' && f['receiver']=='box1') {\n\t\td+=\"Ppurse doesn't like it. Not a good use of purse.\";\n\t\tend=1;\n\t}\n\t\n\t\n\tif (!end) {\n\t\t\n\t\tif(f['receiver']==\"box1\") {\n\t\t\n\t\t\t\t \n\t\t\tswitch(f['giver']) {\n\t\t\t\tcase \"iMenu\":\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\td+=\"<p>You request a sandwich. He nods and takes the menu.</p>\";\n\t\t\t\t\t\n\t\n\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t\tdefault:\n\t\t\t\td+=\"<p>Doesn't go in box.</p> \";\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}\n\t\t} else if(f['receiver']=='cat') {\n\t\t\t\n\t\t\tswitch(f['giver']) {\n\t\t\t\tcase \"invMouse\":\n\t\t\t\t\td+=\"It plays with the mouse\";\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t\tdefault:\n\t\t\t\td+=\"It doesn't seem interested. Cats are that way sometimes. \";\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}\n\t\t} else if(f['receiver']=='start2') {\n\t\t\tswitch(f['giver']) {\n\t\t\t\tdefault:\n\t\t\t\t\td+=\"start 2 doesn't want it\";\n\t\t\t\t\t//build(\"Start2 doesn't want it\");\n\t\t\t}\n\t\t} else if(f['receiver']=='start3') {\n\t\t\tswitch(f['giver']) {\n\t\t\t\tcase \"invApple\":\n\t\t\t\t\t//noBack=1;\n\t\t\t\t\td+=\"it eats the {apple|start} sdfdsf sdsd f dsfd sdfdsf sdsd f dsfdfsdfsfsdfs\";\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase \"invOrange\":\n\t\t\t\t\t\n\t\t\t\t\td+=\"IT doesT doesn't want orangeT doesn't want orangeT doesn't want orangeT doesn't want orangeT doesn't want orangeT doesn't want orangeT doesn't want orangeT doesn't want orangeT doesn't want orangeT doesn't want orangeT doesn't want orangeT doesn't want orangeT doesn't want orangeT doesn't want orangeT doesn't want orangeT doesn't want orangeT doesn't want orangeT doesn't want orangeT doesn't want orangeT doesn't want orangen't want orange\";\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t\td+=\"It doesn't want it\";\n\t\t\t\t\t//for (i in fname) {\n\t\t\t\t\t//\tbuild(fname[i]) + build(\": \") + build(f[fname[i]]) + build(\"<br>\");\n\t\t\t\t\t//}\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t}\t\n}", "function createChannel() {\n return message.guild.channels.create(`mafia-${gameNumber}`, \"text\").then(chnl => {\n chnl.setParent(\"732742979701309532\");\n chnl.overwritePermissions([\n {\n id: message.guild.id,\n deny: ['VIEW_CHANNEL']\n }\n ])\n return chnl;\n \n }).catch(console.error);\n }", "createNewReply() {\n let content = this.state.new_reply_content;\n\n this.updateState({new_reply_content: \"\"});\n api.create_new_reply(this.props.session.token, this.post_id, content, this.fetchPost.bind(this));\n }", "function actionChannel(pattern$1, buffer$1) {\n if (false) {}\n\n return makeEffect(ACTION_CHANNEL, {\n pattern: pattern$1,\n buffer: buffer$1\n });\n}", "function createNegativeNotification(message, seconds){\n\tcreateNotification(message, \"negative\", seconds);\n}", "function toUnary(msg) {\n let unaryMsg = \"\";\n let prevDigit = false; // false = 0, true = 1\n let character;\n\n // first character\n if (msg.length >= 1) {\n character = msg[0];\n if (character === '0') {\n unaryMsg += \"00 0\"; // new sequence of zeros\n } else {\n unaryMsg += \"0 0\"; // new sequence of ones\n prevDigit = true;\n }\n }\n\n for (let i = 1; i < msg.length; ++i) {\n character = msg[i];\n if ((character === '0') && prevDigit) { // Switch from 1 to 0\n unaryMsg += \" 00 0\";\n prevDigit = false;\n } else if ((character == '1') && !prevDigit) { // Switch from 0 to 1\n unaryMsg += \" 0 0\";\n prevDigit = true;\n } else { // Repeated 0 or 1\n unaryMsg += \"0\";\n }\n }\n return unaryMsg;\n}", "get reasonNotPerformed() {\n\t\treturn this.__reasonNotPerformed;\n\t}", "function sendEmbed(message, description, type, suppression) {\n\tcolorList = [\"AQUA\", \"GREEN\", \"BLUE\", \"PURPLE\", \"GOLD\", \"ORANGE\", \"0xFF7F00\", \"0xFFFF00\", \"0x22FF00\", \"0x2200FF\", \"0x663399\", \"0x7851a9\"];\n\tvar color = colorList[Math.floor(Math.random() * colorList.length)];\n\tvar embed = new Discord.RichEmbed();\n\tembed.setColor(color).setDescription(description);\n\n\tif (type === 'send') {\n\t\treturn message.channel.send({ embed: embed }).then((msg) => { if (suppression) { msg.delete(10000) } }).catch(console.error);\n\t}\n\tif (type === 'reply') {\n\t\treturn message.reply({ embed: embed }).then(msg => { if (suppression) { msg.delete(10000) } }).catch(console.error);\n\t}\n\n}", "function actionChannel(pattern$1, buffer$1) {\n if (false) {}\n\n return chunk_e922c950_makeEffect(ACTION_CHANNEL, {\n pattern: pattern$1,\n buffer: buffer$1\n });\n}", "function MessageContent(_a) {\n var _b, _c, _d;\n\n var channel = _a.channel,\n _e = _a.chainBottom,\n chainBottom = _e === void 0 ? false : _e,\n _f = _a.chainTop,\n chainTop = _f === void 0 ? false : _f,\n className = _a.className,\n message = _a.message,\n // nicknamesMap,\n userId = _a.userId,\n // useReaction = false,\n // useReplying,\n scrollToMessage = _a.scrollToMessage,\n showEdit = _a.showEdit,\n showFileViewer = _a.showFileViewer,\n showRemove = _a.showRemove,\n showReply = _a.showReply,\n resendMessage = _a.resendMessage,\n _g = _a.disabled,\n disabled = _g === void 0 ? false : _g;\n var stringSet = useContext(LocalizationContext).stringSet;\n var messageTypes = getUIKitMessageTypes();\n var avatarRef = useRef(null);\n var isByMe = isPendingMessage(channel, message) || !isSentMessage(channel, message) || isMessageSentByMe(userId, message);\n var isOperatorMessage = isMessageSentByOperator(message);\n var isByMeClassName = isByMe ? 'rogu-message-content--outgoing' : 'rogu-message-content--incoming';\n var chainBottomClassName = chainBottom ? 'rogu-message-content--chain-bottom' : '';\n var chainTopClassName = chainTop ? 'rogu-message-content--chain-top' : '';\n\n if (((_b = message === null || message === void 0 ? void 0 : message.isAdminMessage) === null || _b === void 0 ? void 0 : _b.call(message)) || (message === null || message === void 0 ? void 0 : message.messageType) === 'admin') {\n return /*#__PURE__*/React__default$1.createElement(AdminMessage, {\n message: message\n });\n }\n\n return /*#__PURE__*/React__default$1.createElement(\"div\", {\n className: getClassName([className, 'rogu-message-content', isByMeClassName, chainBottomClassName, chainTopClassName])\n }, !isByMe && !chainTop && /*#__PURE__*/React__default$1.createElement(Avatar$2, {\n className: \"rogu-message-content__avatar\",\n src: ((_c = message === null || message === void 0 ? void 0 : message.sender) === null || _c === void 0 ? void 0 : _c.profileUrl) || '',\n ref: avatarRef,\n height: \"32px\",\n width: \"32px\"\n }), /*#__PURE__*/React__default$1.createElement(\"div\", {\n className: \"rogu-message-content__content\"\n }, /*#__PURE__*/React__default$1.createElement(\"div\", {\n className: \"rogu-message-content__bubble\"\n }, /*#__PURE__*/React__default$1.createElement(\"div\", {\n className: \"rogu-message-content__bubble__header\"\n }, !isByMe && !chainTop && /*#__PURE__*/React__default$1.createElement(React__default$1.Fragment, null, /*#__PURE__*/React__default$1.createElement(\"div\", {\n className: \"rogu-message-content__id-container\"\n }, /*#__PURE__*/React__default$1.createElement(Label, {\n className: \"rogu-message-content__sender-name\",\n color: LabelColors.ONBACKGROUND_2,\n style: {\n color: generateColorFromString(((_d = message === null || message === void 0 ? void 0 : message.sender) === null || _d === void 0 ? void 0 : _d.nickname) || '')\n },\n type: LabelTypography.CAPTION_1\n }, getSenderName(message)), isOperatorMessage && !chainTop && /*#__PURE__*/React__default$1.createElement(Label, {\n className: \"rogu-message-content__operator-label\",\n type: LabelTypography.CAPTION_3\n }, stringSet.LABEL__OPERATOR)), !channel.isFrozen && /*#__PURE__*/React__default$1.createElement(MessageItemMenu, {\n className: \"rogu-message-content__menu\",\n channel: channel,\n message: message,\n isByMe: isByMe,\n disabled: disabled,\n showEdit: showEdit,\n showRemove: showRemove,\n resendMessage: resendMessage,\n showFileViewer: showFileViewer,\n showReply: showReply\n }))), /*#__PURE__*/React__default$1.createElement(\"div\", {\n className: \"rogu-message-content__bubble__body\"\n }, /*#__PURE__*/React__default$1.createElement(\"div\", {\n className: \"rogu-message-content__bubble__body__inner\"\n }, isTextMessage(message) && /*#__PURE__*/React__default$1.createElement(TextMessageItemBody, {\n isByMe: isByMe,\n message: message,\n onClickRepliedMessage: scrollToMessage\n }), isOGMessage(message) && /*#__PURE__*/React__default$1.createElement(OGMessageItemBody, {\n message: message,\n isByMe: isByMe,\n onClickRepliedMessage: scrollToMessage\n }), isAssignmentMessage(message.customType) && /*#__PURE__*/React__default$1.createElement(AssignmentMessageItemBody, {\n message: message,\n isByMe: isByMe\n }), isMaterialMessage(message.customType) && /*#__PURE__*/React__default$1.createElement(MaterialMessageItemBody, {\n message: message,\n isByMe: isByMe\n }), isThumbnailMessage(message) && /*#__PURE__*/React__default$1.createElement(ThumbnailMessageItemBody, {\n message: message,\n isByMe: isByMe,\n showFileViewer: showFileViewer,\n isClickable: getOutgoingMessageState(channel, message) !== OutgoingMessageStates.PENDING,\n onClickRepliedMessage: scrollToMessage\n }), !isThumbnailMessage(message) && getUIKitMessageType(message) === messageTypes.FILE && /*#__PURE__*/React__default$1.createElement(FileMessageItemBody, {\n message: message,\n isByMe: isByMe\n }), getUIKitMessageType(message) === messageTypes.UNKNOWN && /*#__PURE__*/React__default$1.createElement(UnknownMessageItemBody, {\n message: message,\n isByMe: isByMe\n })), (!isByMe && chainTop || isByMe) && !channel.isFrozen && /*#__PURE__*/React__default$1.createElement(MessageItemMenu, {\n className: \"rogu-message-content__menu\",\n channel: channel,\n message: message,\n isByMe: isByMe,\n disabled: disabled,\n showEdit: showEdit,\n showRemove: showRemove,\n resendMessage: resendMessage,\n showFileViewer: showFileViewer,\n showReply: showReply\n }))), !chainBottom && /*#__PURE__*/React__default$1.createElement(\"div\", {\n className: 'rogu-message-content__misc'\n }, isByMe ? /*#__PURE__*/React__default$1.createElement(MessageStatus, {\n message: message,\n status: getOutgoingMessageState(channel, message)\n }) : /*#__PURE__*/React__default$1.createElement(Label, {\n className: 'rogu-message-content__created-at',\n type: LabelTypography.CAPTION_3,\n color: LabelColors.ONBACKGROUND_2\n }, getMessageCreatedAt$1(message)))));\n}", "function Truck () {}", "buildResonance(message) {\n return __awaiter(this, void 0, void 0, function* () {\n return new DiscordResonance_1.DiscordResonance(message.content, message, this.bot, this);\n });\n }", "function addReaction()\n{\n getCurrentReactionInfo();\n displayModelInfo();\n if(currentReactionNumber == 1)\n { //if there is at least one reaction allow user to add pathway to database\n document.getElementById('login-button').style.display = 'block';\n }\n}", "revertAction(action){\n\t\tif (Object.keys(Actions).indexOf(action.type) == -1) {\n\t\t\tthrow new Error(\"Invalid action! Action: \" + JSON.stringify(action));\n\t\t}\n\n\t\tswitch(action.type){\n\t\t\tcase Actions.move:\n\t\t\t\taction.direction *= -1;\n\t\t\t\tbreak;\n\t\t\tcase Actions.rotate:\n\t\t\t\taction.orientation *= -1;\n\t\t\t\tbreak;\n\t\t}\n\t\tthis[PrivateActions[action.type]](action);\n\t}", "revertAction() {\n this.activator();\n if (this.secondaryTransformation != null) {\n this.transformationMatrix = this.secondaryTransformation;\n }\n\n this.emitUpdateEvent();\n }", "function buildSemanticPredicate(node, context) {\n var result = new Result();\n var negate = node.type === 'semantic_not';\n var reg = context.getResultReg(result);\n result.block = [`${language.savedPos} = ${language.currPos};`];\n var funcId = makeActionFunc(node.code, context);\n var call = makeActionCall(funcId, context);\n result.block = [\n `${language.savedPos} = ${language.currPos};`,\n `${reg} = ${call};`\n ];\n if (negate) {\n result.condition = '!' + reg;\n } else {\n result.condition = reg;\n }\n result.onSuccess([`${reg} = ${language.assertionSuccess};`]);\n result.onFailure([`${reg} = ${language.failed};`]);\n return result;\n }", "run (message) {\n // separting the message into cmd & args\n const messageArry = message.content.split(' ')\n const messageLength = messageArry.length - 1\n // `.ticket create issue #1` is turned into\n // cmd = `.ticket`, option = `create`, issue = `issue #1`\n const option = messageArry[1]\n const issue = messageArry.slice(2, messageLength)\n const errorEmbed = new Discord.RichEmbed()\n .setTitle('Incorrect Usage!')\n .addField('Please use as:', `\\`${this.client.commandPrefix}ticket [create/new] [Your Issue]\\``)\n .setFooter('Made by - nukestye™', `${this.client.user.avatarURL}`)\n\n const permEmbed = new Discord.RichEmbed()\n .setTitle(message.author.tag)\n .setDescription('You do not have perms to close ticket, ask staff to do so.')\n .setFooter('Made by - nukestye™', `${this.client.user.avatarURL}`)\n\n if (option === 'create' || option === 'new') {\n const name = `Ticket-${message.author.discriminator}`\n if (issue.length < 1) return message.channel.send(errorEmbed)\n message.guild.createChannel(name, 'text').then(c => {\n const role = message.guild.roles.find('name', 'Staff')\n const role2 = message.guild.roles.find('name', '@everyone')\n\n c.overwritePermissions(role, {\n SEND_MESSAGES: true,\n READ_MESSAGES: true\n })\n c.overwritePermissions(role2, {\n SEND_MESSAGES: false,\n READ_MESSAGES: false\n })\n c.overwritePermissions(message.author, {\n SEND_MESSAGES: true,\n READ_MESSAGES: true\n })\n const category = message.guild.channels.find(c => c.name === 'Support' && c.type === 'category')\n\n if (category) {\n c.setParent(category.id)\n } else {\n if (!category) {\n message.guild.createChannel('Support', 'category').then(Category => {\n c.setParent(Category.id)\n })\n } else {\n console.error(`Category channel is missing:\\nCategory: ${!!category}`)\n return message.channel.send(`Category channel is missing:\\nCategory: ${!!category}`)\n }\n }\n\n message.channel.send(`:white_check_mark: Your ticket has been created, #${c.name}.`)\n const embed = new Discord.RichEmbed()\n .setColor(0xCF40FA)\n .addField(`Hey ${message.author.username}!`, `Please try explain why you opened this ticket with as much detail as possible. Our **Support Team** will be here soon to help.\\n**Your Issue**\\n ${issue.join(' ')}`)\n .setTimestamp()\n\n c.send({ embed: embed })\n }).catch(console.error)\n } else if (option === 'close') {\n if (message.member.roles.some(role => role.name === 'Staff')) {\n if (!message.channel.name.startsWith('ticket-')) return message.channel.send('You can\\'t use the close command outside of a ticket channel.')\n\n message.channel.send(`Are you sure? Once confirmed, you cannot reverse this action!\\nTo confirm, type \\`${this.client.commandPrefix}confirm\\`. This will time out in 10 seconds and be cancelled.`)\n .then((m) => {\n message.channel.awaitMessages(response => response.content === `${this.client.commandPrefix}confirm`, {\n max: 1,\n time: 10000,\n errors: ['time']\n })\n .then((collected) => {\n message.channel.delete()\n })\n .catch(() => {\n m.edit('Timed out, the ticket will not closed.')\n .then(m2 => {\n m2.delete()\n }, 3000)\n })\n })\n } else {\n message.channel.send({ embed: permEmbed })\n }\n } else {\n message.channel.send(errorEmbed)\n }\n }", "function choisir_prochaine_action( sessionId, context, entities ) {\n // ACTION PAR DEFAUT CAR AUCUNE ENTITE DETECTEE\n if(Object.keys(entities).length === 0 && entities.constructor === Object) {\n // Affichage message par defaut : Je n'ai pas compris votre message !\n }\n // PAS DINTENTION DETECTEE\n if(!entities.intent) {\n\n }\n // IL Y A UNE INTENTION DETECTEE : DECOUVRONS LAQUELLE AVEC UN SWITCH\n else {\n switch ( entities.intent && entities.intent[ 0 ].value ) {\n case \"Bonjour\":\n var msg = {\n \"attachment\": {\n \"type\": \"template\",\n \"payload\": {\n \"template_type\": \"generic\",\n \"elements\": [\n {\n \"title\": \"NutriScore\",\n \"image_url\": \"https://mon-chatbot.com/nutribot2018/images/nutriscore-good.jpg\",\n \"subtitle\": \"Recherchez ici un produit alimentaire et ses équivalents plus sains.\",\n \"buttons\": [\n {\n \"type\": \"postback\",\n \"title\": \"❓ Informations\",\n \"payload\": \"INFOS_SUR_LE_NUTRI\"\n },\n\n {\n \"type\": \"postback\",\n \"title\": \"🔍 Rechercher\",\n \"payload\": \"PRODUIT_PLUS_SAIN\"\n },\n {\n \"type\": \"postback\",\n \"title\": \"🍏 Produit + sain\",\n \"payload\": \"ALTERNATIVE_BEST\"\n }\n\n ]\n },\n {\n \"title\": \"Le sucre\",\n \"image_url\": \"https://mon-chatbot.com/nutribot2018/images/sucre.jpg\",\n \"subtitle\": \"Connaissez-vous réellement le Sucre ? Percez ici tous ses mystères !\",\n \"buttons\": [\n {\n \"type\": \"postback\",\n \"title\": \"En Savoir +\",\n \"payload\": \"CAT_SUCRE\"\n }\n ]\n },\n {\n \"title\": \"Les aliments\",\n \"image_url\": \"https://mon-chatbot.com/nutribot2018/images/aliments.jpg\",\n \"subtitle\": \"Quels aliments contiennent du sucre ? Vous allez être surpris !\",\n \"buttons\": [\n {\n \"type\": \"postback\",\n \"title\": \"En Savoir +\",\n \"payload\": \"CAT_ALIMENTS\"\n }\n ]\n },\n {\n \"title\": \"Les additifs\",\n \"image_url\": \"https://mon-chatbot.com/nutribot2018/images/additifs.jpg\",\n \"subtitle\": \"C'est quoi un additif ? Où les trouvent-on ?\",\n \"buttons\": [\n {\n \"type\": \"postback\",\n \"title\": \"En Savoir +\",\n \"payload\": \"CAT_ADDITIFS\"\n }\n ]\n },\n {\n \"title\": \"Les nutriments\",\n \"image_url\": \"https://mon-chatbot.com/nutribot2018/images/nutriments.jpg\",\n \"subtitle\": \"Eléments indispensables à l'Homme ! Découvrez tous les secrets des nutriments.\",\n \"buttons\": [\n {\n \"type\": \"postback\",\n \"title\": \"En Savoir +\",\n \"payload\": \"CAT_NUTRIMENTS\"\n }\n ]\n },\n {\n \"title\": \"La diététique\",\n \"image_url\": \"https://mon-chatbot.com/nutribot2018/images/diet.jpg\",\n \"subtitle\": \"Découvrez ici tous mes conseils concernant la diététique !\",\n \"buttons\": [\n {\n \"type\": \"postback\",\n \"title\": \"En Savoir +\",\n \"payload\": \"CAT_DIETETIQUE\"\n }\n ]\n },\n {\n \"title\": \"L'organisme\",\n \"image_url\": \"https://mon-chatbot.com/nutribot2018/images/organisme.jpg\",\n \"subtitle\": \"Ici vous découvrirez tous les secrets concernant votre corps et le sucre !\",\n \"buttons\": [\n {\n \"type\": \"postback\",\n \"title\": \"En Savoir +\",\n \"payload\": \"CAT_ORGANISME\"\n }\n ]\n }\n\n\n ]\n }\n }\n };\n var response_text = {\n \"text\": \"PS : Si vous voulez je peux vous proposer des sujets pour débuter :\"\n };\n actions.reset_context( entities, context, sessionId ).then(function() {\n actions.getUserName( sessionId, context, entities ).then( function() {\n actions.envoyer_message_text( sessionId, context, entities, 'Bonjour '+context.userName+'. Enchanté de faire votre connaissance. Je suis NutriBot, un robot destiné à vous donner des informations sur le sucre, la nutrition et tout particulièrement le Nutriscore : le logo nutritionel de référence permettant de choisir les aliments pour mieux se nourrir au quotidien.').then(function() {\n actions.timer(entities, context, sessionId, temps_entre_chaque_message).then(function() {\n actions.envoyer_message_text(sessionId, context, entities, \"PS : Si vous voulez je peux vous proposer des sujets pour débuter :\").then(function() {\n actions.timer(entities, context, sessionId, temps_entre_chaque_message).then(function() {\n actions.envoyer_message_bouton_generique(sessionId, context, entities, msg);\n })\n })\n })\n })\n })\n })\n break;\n case \"RETOUR_ACCUEIL\":\n // Revenir à l'accueil et changer de texte\n actions.reset_context( entities,context,sessionId ).then(function() {\n actions.choixCategories_retour( sessionId,context );\n })\n break;\n case \"Dire_aurevoir\":\n actions.getUserName( sessionId, context, entities ).then( function() {\n actions.envoyer_message_text( sessionId, context, entities, \"A bientôt \"+context.userName+\" ! N'hésitez-pas à revenir nous voir très vite !\").then(function() {\n actions.envoyer_message_image( sessionId, context, entities, \"https://mon-chatbot.com/img/byebye.jpg\" );\n })\n })\n break;\n case \"FIRST_USE_OF_TUTO_OK\":\n actions.getUserName( sessionId, context, entities ).then( function() {\n actions.envoyer_message_text( sessionId, context, entities, \"Bonjour \"+context.userName+\". Je suis NutriBot ! Voici un petit peu d'aide concernant mon fonctionnement !\").then(function() {\n actions.timer(entities, context, sessionId, temps_entre_chaque_message).then(function() {\n actions.afficher_tuto( sessionId,context );\n })\n })\n })\n break;\n case \"Thanks\":\n actions.remerciements(entities,context,sessionId);\n break;\n case \"GO_TO_MENU_DEMARRER\":\n actions.reset_context( entities,context,sessionId ).then(function() {\n actions.choixCategories( sessionId,context );\n })\n break;\n case \"SCAN\":\n actions.ExplicationScan(sessionId,context);\n break;\n\n case \"MANUELLE\":\n actions.envoyer_message_text( sessionId, context, entities, \"Quelle est la marque, le nom ou bien le type de produit que vous souhaitez rechercher ? (Ex : Nutella, Pain de mie, croissant, etc). Je vous écoute :\");\n // then mettre dans le context qu'on est dans recherche manuelle\n break;\n // SIMPLE\n case \"Combien de sucre\":\n actions.go_reste_from_howmuchsugar(entities,context,sessionId);\n break;\n case \"CAT_NUTRIMENTS\":\n actions.go_leg_prot_vital(entities,context,sessionId);\n break;\n case \"Insuline\":\n actions.go_reste_from_insuline(entities,context,sessionId);\n break;\n case \"Betterave\":\n actions.go_legume(entities,context,sessionId);\n break;\n case \"CAT_ORGANISME\":\n actions.go_tout_organisme(entities,context,sessionId);\n break;\n case \"Glucides\":\n actions.go_nutriments(entities,context,sessionId);\n break;\n\n case \"Saccharose\":\n actions.go_glucose_canne_betterave_fructose(entities,context,sessionId);\n break;\n case \"CAT_SUCRE\":\n actions.go_saccharose(entities,context,sessionId);\n break;\n case \"Glucides complexes\":\n actions.go_relance_nutriments_from_glucomplexes(entities,context,sessionId);\n break;\n case \"Index glycémique lent\":\n actions.go_reste_index_lent(entities,context,sessionId);\n break;\n case \"Aliments transformés\":\n actions.go_additifs(entities,context,sessionId);\n break;\n case \"Produit allégé en sucre\":\n actions.go_reste_from_allege(entities,context,sessionId);\n break;\n case \"Nutriments\":\n actions.go_leg_prot_vital(entities,context,sessionId);\n break;\n case \"Besoins\":\n actions.go_reste_from_besoins(entities,context,sessionId);\n break;\n case \"Canne à sucre\":\n actions.go_relance_aliments_from_sugar_canne(entities,context,sessionId);\n break;\n case \"Les sucres\":\n actions.go_amidon_glucides_from_les_sucres(entities,context,sessionId);\n break;\n case \"CAT_DIETETIQUE\":\n actions.go_tout_diet(entities,context,sessionId);\n break;\n case \"Combien de fruits\":\n actions.go_reste_from_howmuchfruits(entities,context,sessionId);\n break;\n case \"Fructose\":\n actions.go_relance_aliments_from_fructose(entities,context,sessionId);\n break;\n case \"Légumes secs\":\n actions.go_prot(entities,context,sessionId);\n break;\n case \"ASTUCE\":\n actions.astuces(entities,context,sessionId);\n break;\n case \"Index glycémique rapide\":\n actions.go_reste_index_rapide(entities,context,sessionId);\n break;\n case \"Apports\":\n actions.go_reste_from_apports(entities,context,sessionId);\n break;\n case \"Aliments\":\n actions.go_aliments_alitransfo(entities,context,sessionId);\n break;\n case \"Produit vital\":\n actions.go_relance_from_vital(entities,context,sessionId);\n break;\n case \"Trop de sucre\":\n actions.go_reste_from_toomuchsugar(entities,context,sessionId);\n break;\n case \"Calorie ou Kcal\":\n actions.go_reste_kcal(entities,context,sessionId);\n break;\n case \"Sucre simple ou sucre rapide\":\n actions.go_reste_sucre_rapide_lent(entities,context,sessionId);\n break;\n case \"CAT_ADDITIFS\":\n actions.go_amidon_glucides(entities,context,sessionId);\n break;\n case \"Amidon\":\n actions.go_glucides_glucomplexes(entities,context,sessionId);\n break;\n case \"Protéines\":\n actions.go_vital(entities,context,sessionId);\n break;\n case \"Légume\":\n actions.go_relance_aliments_from_legume(entities,context,sessionId);\n break;\n case \"Pancréas\":\n actions.go_reste_from_pancreas(entities,context,sessionId);\n break;\n case \"Alimentation équilibrée\":\n actions.go_reste_from_alimentation_equ(entities,context,sessionId);\n break;\n case \"Glucose\":\n actions.go_relance(entities,context,sessionId);\n break;\n case \"Morceau de sucre\":\n actions.go_reste_from_morceau(entities,context,sessionId);\n break;\n case \"Composition\":\n actions.go_alitransfo(entities,context,sessionId);\n break;\n case \"Additifs\":\n actions.go_amidon_glucides(entities,context,sessionId);\n break;\n case \"CAT_ALIMENTS\":\n actions.go_aliments_alitransfo(entities,context,sessionId);\n break;\n // RESTE COMPLEXE\n case \"PRODUIT_PLUS_SAIN\":\n var element = {\n \"attachment\":{\n \"type\":\"template\",\n \"payload\":{\n \"template_type\":\"button\",\n \"text\":\"Utilisez le formulaire ci-dessous et obtenez toutes les informations nécessaires au sujet d'un produit alimentaire ou bien scannez directement un code barre.\",\n \"buttons\":[\n {\n \"type\":\"web_url\",\n \"messenger_extensions\": true,\n \"url\":\"https://mon-chatbot.com/nutribot2018/recherche.html\",\n \"title\":\"Rechercher\"\n },\n {\n \"type\":\"postback\",\n \"title\":\"Scanner\",\n \"payload\":\"SCANSCANSCAN\"\n }\n ]\n }\n }\n };\n sessions[sessionId].recherche = 'normale';\n actions.envoyer_message_bouton_generique( sessionId, context, entities, element);\n break;\n case \"ALTERNATIVE_BEST\":\n var element = {\n \"attachment\":{\n \"type\":\"template\",\n \"payload\":{\n \"template_type\":\"button\",\n \"text\":\"Recherchez ici un produit alimentaire et ses équivalents plus sains.\",\n \"buttons\":[\n {\n \"type\":\"web_url\",\n \"messenger_extensions\": true,\n \"url\":\"https://mon-chatbot.com/nutribot2018/recherche.html\",\n \"title\":\"Rechercher\"\n }\n ]\n }\n }\n };\n sessions[sessionId].recherche = 'autre';\n actions.envoyer_message_bouton_generique( sessionId, context, entities, element);\n break;\n case \"Rechercher_un_produit\":\n actions.queryManuelleSearch2(entities,context,sessionId);\n break;\n case \"INFOS_SUR_LE_NUTRI\":\n actions.afficher_infos_nutriscore(entities,context,sessionId);\n break;\n case \"SCANSCANSCAN\":\n actions.afficher_infos_nutriscore(entities,context,sessionId);\n break;\n case \"AstuceAstuce\":\n actions.astuces( sessionId,context );\n break;\n case \"ByeByeBye\":\n actions.byebye( sessionId,context );\n break;\n\n case \"GENESE\":\n actions.go_relance_from_glycemie(entities, context, sessionId);\n break;\n case \"Glycémie\":\n actions.go_relance_from_glycemie(entities, context, sessionId);\n break;\n case \"RECHERCHE\":\n actions.go_relance_from_glycemie(entities, context, sessionId);\n break;\n\n case \"SPECIFICSPECIFIC\":\n actions.go_relance_from_glycemie(entities, context, sessionId);\n break;\n case \"Insultes\":\n actions.go_relance_from_glycemie(entities, context, sessionId);\n break;\n case \"Sucre\":\n actions.go_relance_from_glycemie(entities, context, sessionId);\n break;\n\n case \"TAPER\":\n actions.go_relance_from_glycemie(entities, context, sessionId);\n break;\n case \"AUTRE_AUTRE_AUTRE\":\n actions.go_relance_from_glycemie(entities, context, sessionId);\n break;\n };\n }\n}", "function specialButtonCreator() {\n if (buttonWrapper.contains(specialButton)) {\n return\n } else {\n specialButton.setAttribute('class', 'special glow');\n specialButton.textContent = \"Special\"\n specialButton.addEventListener('click', battle);\n buttonWrapper.appendChild(specialButton);\n }\n}", "function negated() {\n return (options.negate) ? '' : 'not ';\n }", "function STEP_looseCannon(target) {\r\n\tvar myID;\r\n\tfor (var i = 0; i < g.playerList.length; i++) {\r\n\t\tif (g.playerList[i].role == 12) {\r\n\t\t\tmyID = i;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\tg.log += \"%\";\r\n\tvar myMessage = \"\";\r\n\tvar lcDies = true;\r\n\tvar targetValid = true;\r\n\tvar targetDies = true;\r\n\tif (myID == target) {\r\n\t\tif (g.playerList[myID].extraLives > 1) {\r\n\t\t\tg.playerList[myID].extraLives -= 2;\r\n\t\t\tlcDies = false;\r\n\t\t\ttargetDies = false;\r\n\t\t\tmyMessage += \"<p class='modVoice'>\" + pn(myID) + \" the Loose Cannon sacrificed an extra life to hang another extra life.</p>\";\r\n\t\t\tmyMessage += \"<p class='modVoice'>And yet, is still here. Everyone has <i>so many questions</i>.</p>\";\r\n\t\t} else if (g.playerList[myID].extraLives == 1) {\r\n\t\t\tlcDies = false;\r\n\t\t\tmyMessage += \"<p class='modVoice'>\" + pn(myID) + \" the Loose Cannon sacrificed an extra life to hang... themselves.</p>\";\r\n\t\t\tmyMessage += \"<p class='modVoice'>And so \" + pn(myID) + \" is dead. Amazing.</p>\";\r\n\t\t} else {\r\n\t\t\ttargetValid = false;\r\n\t\t\tmyMessage += \"<p class='modVoice'>\" + pn(myID) + \" the Loose Cannon hanged... themselves.</p>\";\r\n\t\t\tmyMessage += \"<p class='modVoice'>And so \" + pn(myID) + \" is dead.</p>\";\r\n\t\t}\r\n\t} else {\r\n\t\tif (g.playerList[myID].extraLives > 0) {\r\n\t\t\tg.playerList[myID].extraLives -= 1;\r\n\t\t\tlcDies = false;\r\n\t\t\tif (g.playerList[target].extraLives > 0) {\r\n\t\t\t\tg.playerList[target].extraLives -= 1;\r\n\t\t\t\tmyMessage += \"<p class='modVoice'>\" + pn(myID) + \" the Loose Cannon sacrificed an extra life to hang \" + pn(target) + \".</p>\";\r\n\t\t\t\tmyMessage += \"<p class='modVoice'>Except it turns out, \" + pn(target) + \" mysteriously survived too!</p>\";\r\n\t\t\t\tmyMessage += \"<p class='modSecret'>(\" + pn(target) + \" had an extra life.)</p>\";\r\n\t\t\t\ttargetDies = false;\r\n\t\t\t} else if (g.playerList[target].role == 18 && g.cycleNum < 4) { //emissary\r\n\t\t\t\tmyMessage += \"<p class='modVoice'>\" + pn(myID) + \" the Loose Cannon sacrificed an extra life to hang \" + pn(target) + \".</p>\";\r\n\t\t\t\tmyMessage += \"<p class='modVoice'>Except it turns out, \" + pn(target) + \" mysteriously survived too!</p>\";\r\n\t\t\t\tmyMessage += \"<p class='modSecret'>(\" + pn(target) + \" is the Emissary.)</p>\";\r\n\t\t\t\ttargetDies = false;\r\n\t\t\t} else if (g.playerList[target].role == 0 && g.cycleNum == 1 && villageHandicap) { //priest, handicap\r\n\t\t\t\tmyMessage += \"<p class='modVoice'>\" + pn(myID) + \" the Loose Cannon sacrificed an extra life to hang \" + pn(target) + \".</p>\";\r\n\t\t\t\tmyMessage += \"<p class='modVoice'>Except it turns out, \" + pn(target) + \" mysteriously survived too!</p>\";\r\n\t\t\t\tmyMessage += \"<p class='modSecret'>(\" + pn(target) + \" is the Priest, and the Village team handicap is in effect.)</p>\";\r\n\t\t\t\ttargetDies = false;\r\n\t\t\t} else {\r\n\t\t\t\tmyMessage += \"<p class='modVoice'>\" + pn(myID) + \" the Loose Cannon sacrificed an extra life to hang \" + pn(target) + \".</p>\";\r\n\t\t\t\tmyMessage += \"<p class='modVoice'>This sort of feels like cheating.</p>\";\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (g.playerList[target].extraLives > 0) {\r\n\t\t\t\tg.playerList[target].extraLives -= 1;\r\n\t\t\t\tmyMessage += \"<p class='modVoice'>\" + pn(myID) + \" the Loose Cannon sacrificed themselves to hang \" + pn(target) + \".</p>\";\r\n\t\t\t\tmyMessage += \"<p class='modVoice'>But \" + pn(target) + \" mysteriously survived. How embarrassing!</p>\";\r\n\t\t\t\tmyMessage += \"<p class='modSecret'>(\" + pn(target) + \" had an extra life.)</p>\";\r\n\t\t\t\ttargetDies = false;\r\n\t\t\t} else if (g.playerList[target].role == 18 && g.cycleNum < 4) { //emissary\r\n\t\t\t\tmyMessage += \"<p class='modVoice'>\" + pn(myID) + \" the Loose Cannon sacrificed themselves to hang \" + pn(target) + \".</p>\";\r\n\t\t\t\tmyMessage += \"<p class='modVoice'>But \" + pn(target) + \" mysteriously survived. How embarrassing!</p>\";\r\n\t\t\t\tmyMessage += \"<p class='modSecret'>(\" + pn(target) + \" is the Emissary.)</p>\";\r\n\t\t\t\ttargetDies = false;\r\n\t\t\t} else if (g.playerList[target].role == 0 && g.cycleNum == 1 && villageHandicap) { //priest, handicap\r\n\t\t\t\tmyMessage += \"<p class='modVoice'>\" + pn(myID) + \" the Loose Cannon sacrificed themselves to hang \" + pn(target) + \".</p>\";\r\n\t\t\t\tmyMessage += \"<p class='modVoice'>But \" + pn(target) + \" mysteriously survived. How embarrassing!</p>\";\r\n\t\t\t\tmyMessage += \"<p class='modSecret'>(\" + pn(target) + \" is the Priest, and the Village team handicap is in effect.)</p>\";\r\n\t\t\t\ttargetDies = false;\r\n\t\t\t} else {\r\n\t\t\t\tmyMessage += \"<p class='modVoice'>\" + pn(myID) + \" the Loose Cannon sacrificed themselves to hang \" + pn(target) + \".</p>\";\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif (lcDies) {\r\n\t\tkill(myID);\r\n\t\tonDeath(myID);\r\n\t} else {\r\n\t\tmyMessage += onSurvival(myID);\r\n\t}\r\n\tif (targetValid) {\r\n\t\tif (targetDies) {\r\n\t\t\tkill(target);\r\n\t\t\tonDeath(target);\r\n\t\t} else {\r\n\t\t\tmyMessage += onSurvival(target);\r\n\t\t}\r\n\t}\r\n\t$('#infoPrompt').html(myMessage);\r\n\treturn 0;\r\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 }", "async function playDialogue (member, dname) {\n usrD[member.user.id].currentDialogue = dname;\n usrD[member.user.id].nextDialogue = \"\";\n wtf();\n var inthebed = new Discord.RichEmbed(); // initiates the rich message (= \"embed message\" but I call it \"in the bed\" because this is funny)\n var dial = dg.corp[dname];\n inthebed.setTitle(dial.npc.name); // embed title = name of the npc/thing speaking\n inthebed.setColor(0x000000);\n descr = await dial.texte(member, usrD[member.user.id].answerMaterial);\n inthebed.setDescription(textSeparator+\"\\n\"+descr+\"\\n\"+textSeparator); // creates a dialogue box within the embed which contains theDialogue.texte function output\n if (descr == \"\") {\n inthebed.setDescription(\"\");\n }\n inthebed.setFooter(dial.footer(member)); // sets the footer text with theDialogue.footer() function output\n inthebed.setThumbnail(dial.npc.picture); // sets the thumbnail as the speaking npc's picture\n if (dial.thumb != undefined) inthebed.setThumbnail(dial.thumb);\n if (dial.image != undefined) inthebed.setImage(dial.image(member));\n console.log(inthebed.thumbnail);\n var ans = dial.answers(member);\n var emoteList = [];\n var ansList = [];\n\n // vvv adds answers list below the dialogue box\n\n for (var i=1; i <= ans[0] ; i++) {\n emoteList.push(dg.rep[ans[i]].emote(member));\n ansList.push(ans[i]);\n inthebed.addField(\" \"+emoteList[i-1]+\" | \"+dg.rep[ansList[i-1]].texte(member)+\"\",\"\"+textSeparator+\"\",);\n }\n let guildy = bot.guilds.find(\"id\", serverID);\n channel = guildy.channels.find(\"id\", usrD[member.user.id].channel);\n bigbug = false;\n const filter = m => {\n if(m.author.id == botID) bigbug = true;\n return m.author.id == botID;\n }\n await channel.awaitMessages(filter, { max: 1, time: 1000});\n if (bigbug == true) {\n return;\n }\n if(channel.type != \"dm\") {\n await channel.bulkDelete(2);\n }\n channel.send(inthebed)\n .then(async message => {\n\n for (var i=1; i <= ans[0] ; i++) {\n await message.react(emoteList[i-1]);\n }\n\n const emojiFilter = (reaction, user) => {\n condition = emoteList.indexOf(reaction.emoji.name) != -1 && user.id === member.user.id;\n return condition;\n };\n col = await message.awaitReactions(emojiFilter, { max: 1, time: 60000*5, errors: ['time']})\n .catch(()=>{\n });\n\n colv = col.array();\n for (var i in colv) {\n j = emoteList.indexOf(colv[i]._emoji.name);\n await message.delete().catch();\n exit = await dg.rep[ans[j+1]].exit(member);\n await playDialogue(member, exit);\n }\n\n }).catch();\n}", "dispatchMessageReactionActivity(context) {\n const _super = Object.create(null, {\n onMessageReactionActivity: { get: () => super.onMessageReactionActivity }\n });\n return __awaiter(this, void 0, void 0, function* () {\n if (context.activity.reactionsAdded || context.activity.reactionsRemoved) {\n yield _super.onMessageReactionActivity.call(this, context);\n }\n else {\n yield this.defaultNextEvent(context)();\n }\n });\n }", "async recruit(channel, targetName) {\n\t\tlet nemesis = await sql.getNemesis(channel);\n\t\tlet player = await sql.getPlayerById(nemesis.id);\n\t\tlet embed = new Discord.RichEmbed();\n\t\t\n\t\tif(targetName) {\n\t\t\tlet target = await sql.getPlayer(channel, targetName);\n\t\t\t// Send an offer\n\t\t\tembed.setTitle('HENCHMAN RECRUITMENT')\n\t\t\t\t.setColor(0x00AE86)\n\t\t\t\t.setDescription(`**${player.name}** wishes for **${target.name}** to join ${this.their(player.config.pronoun)} army of evil! ` +\n\t\t\t\t`If you join, you'll become more powerful, and your power will make the Nemesis stronger. ` +\n\t\t\t\t`${target.name}, enter \\`!join ${player.name}\\` to accept the offer and serve the Nemesis in battle.`);\n\t\t\tawait sql.addOffer(player, target, enums.OfferTypes.Recruit);\n\t\t\treturn {embed: embed};\n\t\t} else {\n\t\t\tawait sql.addOffer(player, null, enums.OfferTypes.Recruit);\n\t\t\tembed.setTitle('HENCHMAN RECRUITMENT')\n\t\t\t\t.setColor(0x00AE86)\n\t\t\t\t.setDescription(`**${player.name}** wishes for anyone to join ${this.their(player.config.pronoun)} army of evil! ` +\n\t\t\t\t`If you join, you'll become more powerful, and your power will make the Nemesis stronger. ` +\n\t\t\t\t`the next person to enter \\`!join ${player.name}\\` will accept the offer and serve the Nemesis in battle.`);\n\t\t\treturn {embed: embed};\n\t\t}\n\t}", "async function onReactionChange(message, emoji, userID, add) {\n if (emoji.id) {\n emoji = `${emoji.name}:${emoji.id}`;\n\n if (!message.author) message = await client.bot.getMessage(message.channel.id, message.id);\n message.author.bot = client.bot.users.get(userID).bot;\n messageCreateMethods.scoreEmojis(message, emoji, add);\n } else {\n emoji = emoji.name;\n }\n\n let guildID = client.bot.channelGuildMap[message.channel.id];\n if (!guildID) return;\n\n if (!message.member || !message.content) {\n try {\n message = await client.bot.getMessage(message.channel.id, message.id);\n } catch (error) {\n return;\n }\n }\n\n let guild = await client.getGuild(guildID);\n\n if (!guild.starboard || guild.starboard === 0) return;\n if (emoji !== guild.emoji) return;\n if (message.author.id == userID) return;\n\n if (message.channel.id === guild.starboard) {\n if (add === false) return;\n if (!client.bot.guilds.get(guildID).members.get(client.bot.user.id).permission.has(\"manageMessages\")) return;\n\n let res = await client.pg.query({\n text: \"SELECT * FROM starboard WHERE post = $1;\",\n values: [message.id]\n });\n\n let status = res.rows[0];\n\n await client.bot.removeMessageReaction(message.channel.id, message.id, emoji, userID);\n let msg = await client.bot.getMessage(status.channel, status.message);\n return onReactionChange(msg, { name: emoji }, userID, true);\n }\n\n let status = await client.pg.query({\n text: \"SELECT * FROM starboard WHERE message = $1;\",\n values: [message.id]\n });\n\n let row = false;\n if (add === true) {\n try {\n await client.pg.query({\n text: \"INSERT INTO who (message, member) VALUES ($1, $2);\",\n values: [message.id, userID]\n });\n } catch (error) {\n if (error.code !== \"23505\") throw error;\n }\n\n let res = await client.pg.query({\n text: [\n \"INSERT INTO starboard (date, guild, member, channel, message, stars)\",\n \"VALUES ($1, $2, $3, $4, $5, 1)\",\n \"ON CONFLICT (message) DO\",\n \"UPDATE SET stars = (SELECT count(*) FROM who WHERE message = $5) WHERE starboard.message = $5\",\n \"RETURNING *;\"\n ].join(\" \"),\n values: [message.timestamp, message.channel.guild.id, message.author.id, message.channel.id, message.id]\n });\n\n row = res.rows[0];\n } else if (add === false) {\n await client.pg.query({\n text: \"DELETE FROM who WHERE message = $1 AND member = $2;\",\n values: [message.id, userID]\n });\n\n let res = await client.pg.query({\n text: \"UPDATE starboard SET stars = (SELECT count(*) FROM who WHERE message = $1) WHERE message = $1 RETURNING *;\",\n values: [message.id]\n });\n\n row = res.rows[0];\n\n if (res.rows[0].stars === 0) {\n await client.pg.query({\n text: \"DELETE FROM starboard WHERE message = $1;\",\n values: [message.id]\n });\n }\n }\n\n if (!client.bot.channelGuildMap[guild.starboard]) {\n await client.pg.query({\n text: \"UPDATE guilds SET starboard = null WHERE id = $1;\",\n values: [guild.id]\n });\n\n delete client.guildCache[guild.id];\n\n return;\n }\n\n let embed = await client.commands.star.subcommands.show.embed(null, { message });\n let msg = {\n content: `⭐ **${row.stars}** ${message.channel.mention}`,\n embed\n };\n\n try {\n if (row.stars < (guild.starmin ? Number(guild.starmin) : 1)) {\n if (row.post) {\n await client.bot.deleteMessage(guild.starboard, row.post);\n await client.pg.query({\n text: \"UPDATE starboard SET post = null WHERE message = $1;\",\n values: [message.id]\n });\n }\n } else if (row.post) {\n await client.bot.editMessage(guild.starboard, row.post, msg);\n } else {\n let post = await client.bot.createMessage(guild.starboard, msg);\n await client.pg.query({\n text: \"UPDATE starboard SET post = $1 WHERE message = $2;\",\n values: [post.id, message.id]\n });\n }\n } catch (error) {\n console.error(error);\n }\n}", "function generateMessage(){\n \n // A few words we'll use a lot\n var about = \"about\";\n var and = \"and\";\n var space = \" \";\n var a = \"a(n)\";\n var of = \"of\";\n\n var indexAdj = floor(random(adjective.length));\n var indexMed = floor(random(medium.length));\n var indexMat1 = floor(random(material1.length));\n var indexMat2 = floor(random(material2.length));\n var indexAct = floor(random(action.length));\n var indexSubj = floor(random(subject.length));\n \n // print out index number for each message\n var idnum = indexAdj + \".\" + indexMed + \".\" + indexMat1 + \".\" + indexMat2 + \".\" + indexAct + \".\" + indexSubj;\n\n // Check if we want to use recall number to generate old text or generate fresh text\n if(useInputNum){\n var idNumSplit = split(inputNum, \".\");\n // Use key number to create/recreate a message\n var message = assignArticle(adjective[idNumSplit[0]]) + space + medium[idNumSplit[1]] + space + material1[idNumSplit[2]] + space + and + space + material2[idNumSplit[3]] + space + action[idNumSplit[4]] + space + subject[idNumSplit[5]];\n //return message;\n \n } else {\n \n // Compile our final text to output\n var message = idnum + \":\" + space + assignArticle(adjective[indexAdj]) + space + medium[indexMed] + space + \"using\" + space + material1[indexMat1] + space + and + space + material2[indexMat2] + space + action[indexAct] + space + subject[indexSubj];\n\n //return message;\n }\n\n\n var messageElt = document.getElementById(\"messageElt\");\n var latestMessage = message;\n console.log(latestMessage);\n messageElt.innerHTML = latestMessage;\n \n}", "function regular(msg) {\n var moj_kljuc;\n var plainMsg;\n const {clients}=ClientStore.getState()\n\n if(clients&&clients[msg.clientID].key)\n {\n moj_kljuc= clients[msg.clientID].key;\n plainMsg= decrypt(msg.content, moj_kljuc)\n msg.content=plainMsg;\n }\n console.log(\"msg\", msg);\n ServerActionCreator.serverNewMsg(msg)\n\n}", "async addReactions() {\n\t\tfor (const emoji of this.emojis) {\n\t\t\t// If \"await\" is omitted, the emojis are added in a random order.\n\t\t\tawait this.message.react(emoji)\n\t\t\t\t.catch(err => console.warn('[ReactionMenuError] An emoji cannot be added.', err.name, err.code, emoji));\n\t\t}\n\t}", "function createCyclical () {\n const cyclical = { a: 'example' };\n cyclical.cycle = cyclical;\n return cyclical;\n}", "makeBadConfirmCode () {\n\t\tlet newConfirmCode;\n\t\tdo {\n\t\t\tnewConfirmCode = ConfirmCode();\n\t\t} while (newConfirmCode === this.data.confirmationCode);\n\t\tthis.data.confirmationCode = newConfirmCode;\n\t}", "function re(t) {\n return new ne(t);\n}", "applyUndo(e)\n {\n const graph = this.controller.getGraph();\n let edge = graph.getEdgeByElementID(e.eventData.edgeID);\n\n const from = graph.getNodeByElementID(e.eventData.fromID);\n if (!from) throw new Error('Trying to create a sourceless edge');\n const to = graph.getNodeByElementID(e.eventData.toID) || null;\n\n if (!edge)\n {\n edge = graph.createEdge(from, to, e.eventData.edgeID);\n }\n else\n {\n edge.setEdgeFrom(from);\n edge.changeDestinationNode(to);\n }\n\n edge.setEdgeLabel(e.eventData.label);\n edge.setQuadraticRadians(e.eventData.quad.radians);\n edge.setQuadraticLength(e.eventData.quad.length);\n }", "function createLayerMask()\n{\n\tif (hasLayerMask()) return;\n\tvar desc = new ActionDescriptor();\n\tvar ref = new ActionReference();\n\tdesc.putClass( keyNew, typeChannel );\n\tref.putEnumerated( typeChannel, typeChannel, classMask );\n\tdesc.putReference( keyAt, ref );\n\tdesc.putEnumerated( keyUsing, keyUserMaskEnabled, enumRevealAll );\n\texecuteAction( eventMake, desc, DialogModes.NO );\n}", "async createReaction({params, body}, res){\n try {\n const thoughtbyIdReactionAdded = await Thought.findOneAndUpdate(\n { _id: params.thoughtId},\n { $push: { reactions:body } },\n { new: true }\n )\n .populate({path: 'reactions', select: '-__v'})\n .select('-__v');\n if (thoughtbyIdReactionAdded) {\n res.status(200).json({Updated_Thought: thoughtbyIdReactionAdded});\n }\n else {\n return res.status(404).json({ Msg: `No thought found with the Id ${params.thoughtId}` });\n }\n }\n catch (e) {\n res.status(400).json(e);\n }\n }" ]
[ "0.6013368", "0.5889261", "0.52746946", "0.5261357", "0.5240431", "0.52135736", "0.51607203", "0.50808424", "0.50796956", "0.5034377", "0.5014683", "0.50125504", "0.49696535", "0.49422157", "0.49413106", "0.49381098", "0.4935085", "0.49172214", "0.49086636", "0.4901203", "0.49011794", "0.4872539", "0.48632663", "0.48422426", "0.4840264", "0.48282328", "0.48277587", "0.48209557", "0.48209557", "0.48090345", "0.4794329", "0.47824168", "0.47808912", "0.477999", "0.4764978", "0.4752428", "0.47502103", "0.47497565", "0.4749545", "0.4749426", "0.47461665", "0.47339827", "0.47280127", "0.4727118", "0.47096893", "0.4676838", "0.46232888", "0.4619314", "0.46158877", "0.46059144", "0.46014693", "0.45887917", "0.45887262", "0.45882684", "0.4576825", "0.45739847", "0.45614436", "0.45607832", "0.454847", "0.4539924", "0.4532943", "0.45306945", "0.45194274", "0.45190677", "0.4506202", "0.4505837", "0.45017207", "0.45015964", "0.44943166", "0.44870895", "0.4487065", "0.44870454", "0.4486698", "0.44854298", "0.44833988", "0.44782043", "0.4477703", "0.445502", "0.4453231", "0.44531775", "0.44499004", "0.44478506", "0.44330704", "0.4432195", "0.44316062", "0.4430908", "0.4427906", "0.44240338", "0.44220474", "0.4421217", "0.44172508", "0.44164333", "0.44160777", "0.44117248", "0.44115356", "0.44106564", "0.44101772", "0.44093376", "0.44048566", "0.43993127", "0.43965578" ]
0.0
-1
create a reversible reaction
function revStep(firstText, secondText, enzyme, firstRectMidX, firstRectMidY, nextX, nextY, ctx, moduleNumber) { //create first protein ctx.closePath(); ctx.beginPath(); ctx.font = "20px Arial"; //color = yourFunction(max) ctx.rect(firstRectMidX - 100, firstRectMidY - 25, 100, 50); ctx.fillStyle = calculateColor(moduleNumber, 1); ctx.fill(); ctx.closePath(); ctx.beginPath(); //draw arrows between proteins if (nextX) { if (nextX === firstRectMidX) { //reactions are formatted normally ctx.moveTo(firstRectMidX - 65, firstRectMidY + 35); ctx.lineTo(firstRectMidX - 55, firstRectMidY + 25); ctx.lineTo(firstRectMidX - 55, firstRectMidY + 75); ctx.moveTo(firstRectMidX - 45, firstRectMidY + 25); ctx.lineTo(firstRectMidX - 45, firstRectMidY + 75); ctx.lineTo(firstRectMidX - 35, firstRectMidY + 65); ctx.stroke(); ctx.closePath(); ctx.beginPath(); //create second protein ctx.rect(firstRectMidX - 100, firstRectMidY + 75, 100, 50); ctx.fillStyle = calculateColor(moduleNumber, 0); ctx.fill(); ctx.closePath(); ctx.beginPath(); } else { if (nextY === firstRectMidY) { //reactions horizontally connected ctx.moveTo(firstRectMidX + 10, firstRectMidY - 15); ctx.lineTo(firstRectMidX, firstRectMidY - 5); ctx.lineTo(firstRectMidX + 50, firstRectMidY - 5); ctx.moveTo(firstRectMidX, firstRectMidY + 5); ctx.lineTo(firstRectMidX + 50, firstRectMidY + 5); ctx.lineTo(firstRectMidX + 40, firstRectMidY + 15); ctx.stroke(); ctx.closePath(); ctx.beginPath(); ctx.rect(firstRectMidX + 50, firstRectMidY - 25, 100, 50); ctx.fillStyle = calculateColor(moduleNumber, 0); ctx.fill(); ctx.closePath(); ctx.beginPath(); } else { //reactions diagonally connected ctx.moveTo(firstRectMidX - 55, firstRectMidY + 25); ctx.lineTo(firstRectMidX - 55, firstRectMidY + 50); ctx.lineTo(firstRectMidX - 130, firstRectMidY + 75); ctx.moveTo(firstRectMidX - 55, firstRectMidY + 50); ctx.lineTo(firstRectMidX + 20, firstRectMidY + 75); ctx.moveTo(firstRectMidX - 45, firstRectMidY + 25); ctx.lineTo(firstRectMidX - 45, firstRectMidY + 50); ctx.lineTo(firstRectMidX - 120, firstRectMidY + 75); ctx.moveTo(firstRectMidX - 45, firstRectMidY + 50); ctx.lineTo(firstRectMidX + 30, firstRectMidY + 75); ctx.stroke(); ctx.closePath(); ctx.beginPath(); ctx.rect(firstRectMidX - 175, firstRectMidY + 75, 100, 50); ctx.rect(firstRectMidX - 25, firstRectMidY + 75, 100, 50); ctx.fillStyle = calculateColor(moduleNumber, 0); ctx.fill(); ctx.closePath(); ctx.beginPath(); } } } else { ctx.moveTo(firstRectMidX - 65, firstRectMidY + 35); ctx.lineTo(firstRectMidX - 55, firstRectMidY + 25); ctx.lineTo(firstRectMidX - 55, firstRectMidY + 75); ctx.moveTo(firstRectMidX - 45, firstRectMidY + 25); ctx.lineTo(firstRectMidX - 45, firstRectMidY + 75); ctx.lineTo(firstRectMidX - 35, firstRectMidY + 65); ctx.stroke(); ctx.closePath(); ctx.beginPath(); //create second protein ctx.rect(firstRectMidX - 100, firstRectMidY + 75, 100, 50); ctx.fillStyle = calculateColor(moduleNumber, 0); ctx.fill(); ctx.closePath(); ctx.beginPath(); } //Enzyme ctx.beginPath(); ctx.font = "12px Arial"; var fontMeasures = ctx.measureText(enzyme); var xCoord; var yCoord; if (nextX && (nextY === firstRectMidY)) { xCoord = firstRectMidX + 20 - (fontMeasures.width / 2); yCoord = firstRectMidY; } else { xCoord = firstRectMidX - 55 - (fontMeasures.width / 2); yCoord = firstRectMidY + 50; } ctx.moveTo(xCoord, yCoord); ctx.bezierCurveTo( xCoord, yCoord - 20, xCoord + fontMeasures.width + 10, yCoord - 20, xCoord + fontMeasures.width + 10, yCoord); ctx.bezierCurveTo( xCoord + fontMeasures.width + 10, yCoord + 20, xCoord, yCoord + 20, xCoord, yCoord); ctx.fillStyle = "white"; ctx.fill(); ctx.fillStyle = "white"; ctx.font = "20px Arial"; ctx.stroke(); ctx.closePath(); ctx.beginPath(); //add label to first protein ctx.fillText(firstText, firstRectMidX - 90, firstRectMidY + 5); if (!nextY) { //add label to second protein ctx.fillText(secondText, firstRectMidX - 90, firstRectMidY + 105); } ctx.stroke(); ctx.closePath(); ctx.beginPath(); ctx.fillStyle = "black"; ctx.font = "12px Arial"; ctx.fillText(enzyme, xCoord + 5, yCoord + 4); //draw everything to the screen ctx.stroke(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function reactionReverse () {\n direction = -direction; // Stromrichtung umkehren\n reset(); // Ausgangsstellung\n }", "function pattern_7_reaction() {\n return choice([\"OKAY\", \"YEAH\", \"WHAT\"]) + '!';\n}", "get reaction () {\n\t\treturn this._reaction;\n\t}", "function reaction() {\n input(); // Aceptar valores ingresados ​​(posiblemente corregidos)\n calculation(); // cálculos\n}", "function spawnReactionSignal() {\n $('#actionButton').css('background','blue');\n $('#actionButton').css('color','9bbc0f');\n $('#actionButton').text('PUSH !');\n $('#instructionsContent').text(\"clique !!!!\");\n\n\n hasSpawned = true;\n}", "makeReverbRouteButton() {\n this.reverbRouteActive = false;\n this.reverbRouteButton = createButton('DELAY -> VERB');\n this.reverbRouteButton.position(0.2 * this.parentXpos, this.parentYpos + 1.1 * this.parentButHt);\n this.reverbRouteButton.size(0.5 * this.parentButWd, 0.5 * this.parentButHt);\n this.reverbRouteButton.mousePressed(() => {\n this.reverbRouteActive = this.reverbRouteActive ? this.reverbRouteActive = false : this.reverbRouteActive = true;\n if (this.reverbRouteActive) {this.delay.connect(this.verb);}\n else {this.delay.disconnect(this.verb);}\n \n })\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 addReactions(string, msg){\n\n // Get the json object of the unicode emojis for each letter in the alphabet.\n let unicodeMap = require(\"./../data/unicode_map.json\");\n\n // Iterate over each character in the heterogram and react with each character.\n for(let char in string){\n msg.react(unicodeMap[string[char]]);\n }\n\n}", "function correctReaction(data){\r\n\t\t\t$box = $('#' + data.id);\r\n\t\t\t$box.children(\".reactBox\").hide();\r\n\t\t\t$box.effect(\"highlight\", {color: \"#FFE0C7\"}, 500, function(){\r\n\t\t\t\t$box.animate({backgroundColor: \"#FFE0C7\"}, 500, function(){\r\n\t\t\t\t\t$box.children(\"strong\").append(\" & \" + data.reactingNick);\r\n\t\t\t\t});\r\n\t\t\t})\r\n\t\t}", "function reactionButton1 () {\n t0 = new Date(); // Anfangszeitpunkt (s) \n on = true; // Animation einschalten\n order(); // Falls nötig, Nummerierung der Einzelkräfte ändern\n }", "function reactionButton () {\n dir = -dir; // Stromrichtung umkehren\n dxA = 3*dir; dyA = 2*dir; // Hilfsgrößen für Pfeilspitzen\n }", "async function reactionMenu(message, embedNum, reactions) {\n\t\tawait message.reactions.removeAll();\n\t\tawait message.edit(embed.setDescription(embedmsgs[embedNum]));\n\t\tawait reactMultiple(message, reactions);\n\t\tfilter = (reaction, user) => reactions.includes(reaction.emoji.name) && user.id === usersid;\n\t\tcollected = await message.awaitReactions(filter, { max: 1, time: 60000, errors: ['time'] });\n\t\treaction = collected.first();\n\t\treturn reaction;\n\t}", "function complementOfConverse(r) {\n\treturn complement(converse(r));\n }", "function roleReact(message) {\n const roleEmbed = new Discord.MessageEmbed\n roleEmbed.setTitle(\"Roles\")\n roleEmbed.setDescription(\"🐷: Peppa Pig\\n\"\n + \"🐸: Kermit the Frog\")\n roleEmbed.setColor([198, 181, 217])\n \n message.channel.send(roleEmbed).then(async msg => {\n msg.react('🐷')\n msg.react('🐸')\n const emojis = Object.keys(roles)\n for (const emoji of emojis) {\n await msg.react(emoji)\n }\n const collector = msg.createReactionCollector(({emoji}) => emojis.includes(emoji.name))\n // Handles role assignment once emoji is clicked\n collector.on('collect', ({emoji, message}, user) => {\n message.guild.members.fetch(user).then(member => {\n // Case where user already has role\n if (member.roles.cache.has(roles[emoji.name])) {\n message.reply(\"You already have that role!\")\n } else {\n // Case where user gets new role\n member.roles.add(roles[emoji.name])\n console.log(user.tag + \" reacted with \" + emoji.name + \" role\")\n message.guild.roles.fetch(roles[emoji.name])\n .then(role => message.reply(\"Congrats! You are now \" + role.name))\n }\n })\n })\n // Note: Seems like there are some widespread issues with the \"remove\" event,\n // so this function might not work until the next update\n collector.on('remove', ({emoji, message}, user) => {\n message.guild.members.fetch(user).then(member => {\n console.log(user.username + \" removed a role\")\n if (member.roles.cache.has(roles[emoji.name])) {\n console.log(user.username + \" has the role they want to remove\")\n member.roles.remove(roles[emoji.name])\n message.guild.roles.fetch(roles[emoji.name])\n .then(role => message.reply(\"You are no longer \" + role.name))\n }\n })\n })\n })\n}", "async function fightreactions(){\r\n //if the user is taming, don't mess with reactions\r\n if(endfight == \"taming\") return\r\n // --- clears old reactions\r\n await encmsg.clearReactions().catch(allerrors)\r\n // --- reacts with all possible actions\r\n encmsg.react(fightmoji).then(() => encmsg.react(pausemoji).then(async() => {\r\n await encmsg.react(escapemoji);\r\n // --- gets all abilities the pet has\r\n let rows = await sql.all(`SELECT * FROM userabilities WHERE pet = \"${petrow.name}\" AND petowner = \"${message.author.id}\"`)\r\n // --- doesnt do anything if the pet has no abilities\r\n if(rows == \"\") return\r\n // --- cycles through all abiities the pet has and adds them as reactions\r\n else{rows.forEach(async(row) => {\r\n //gets the name of the ability\r\n let abrow = await sql.get(`SELECT * FROM abilities WHERE name = \"${row.name}\"`) //gets the ability row for the emoji ID\r\n if(!abrow) return //doesn't do anything if no ability is found\r\n //looks for an emoji with that ID and reacts with it if found\r\n encmsg.react(bot.emojis.get(abrow.emojiid)).catch(allerrors)\r\n })\r\n }\r\n }))\r\n }", "get state() {\r\n return reactionState;\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 reactionRadio () {\n genDC = rb2.checked; // Flag für Gleichspannungs-Generator (mit Kommutator) \n reset(); // Ausgangsstellung\n }", "function displayReaction(){\n var name;\n var currentX = horizontalBuffer;\n var currentY = verticalBuffer;\n currentX = currentX + setInitialXCoor(countSubstrates);\n drawSubstrates(currentX, currentY);\n\n currentY = currentY + objectHeight + verticalBuffer * 2; //for version with downwards arrow\n currentX = canvas1.width / 2; //for version with downwards arrow\n name = checkedEnzsNames[0];\n drawDownArrow(currentX, currentY, name);\n\n currentX = horizontalBuffer;\n currentY = verticalBuffer * 5 + objectHeight * 2;\n currentX = currentX + setInitialXCoor(countProducts);\n drawProducts(currentX, currentY);\n}", "async function react(addOrRemove, channel, ts, reaction) {\n return fetch('https://slack.com/api/reactions.' + addOrRemove, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n Authorization: `Bearer ${process.env.SLACK_BOT_TOKEN}`\n },\n body: JSON.stringify({ channel: channel, name: reaction, timestamp: ts })\n }).then(r => r.json()).catch(err => console.error(err))\n}", "function setupReactions() {\n \n const isAnalyst = environment.isAnalystTask();\n \n function noDuplicateValues(_, __, group) {\n const getText = (proxy) => {\n const trimmed = proxy.value\n .replace(/\\/?((index)?.(html|htm|php))?#?\\??$$/, '')\n .replace(/^https?:\\/\\/(www[.])?/, 'https://');\n return util.normaliseUrl(trimmed).toLowerCase();\n };\n shared.noDuplicateValues(group, getText);\n }\n\n ー({\n name: 'Text',\n rootSelect: '#extraction-editing',\n select: 'textarea',\n pick: isAnalyst\n ? [1, 5, 9, 13, 17]\n : [1, 4, 7, 10, 13],\n onClick: (proxy, idx) => {\n util.attention(ref.addItem0.slice(-3), idx - 2, 'click');\n util.attention([proxy], 0, 'focus');\n },\n onFocusout: [\n shared.trim,\n noDuplicateValues,\n shared.noDuplicateVerbs,\n shared.removeQuotes,\n ],\n onInteract: [\n shared.checkCapitals,\n shared.noMoreThanXChars,\n noDuplicateValues,\n shared.noDuplicateVerbs,\n noForbiddenPhrase,\n ],\n onKeydown_CtrlShiftAltArrowLeft:\n (_, idx) => shared.item.swapLeft(idx),\n onKeydown_CtrlShiftAltArrowRight:\n (_, idx) => shared.item.swapRight(idx),\n onKeydown_CtrlAltArrowLeft:\n (_, idx) => shared.item.moveLeft(idx),\n onKeydown_CtrlAltArrowRight:\n (_, idx) => shared.item.moveRight(idx),\n onKeydown_CtrlDelete: (_, idx) => shared.item.remove(idx),\n onLoad: [\n shared.trim,\n shared.checkCapitals,\n shared.noMoreThanXChars,\n noDuplicateValues,\n shared.noDuplicateVerbs,\n noForbiddenPhrase,\n ],\n ref: 'textAreas0',\n });\n\n ー({\n name: 'Link',\n rootSelect: '#extraction-editing',\n select: 'textarea',\n pick: isAnalyst\n ? [2, 6, 10, 14, 18]\n : [2, 5, 8, 11, 14],\n onFocusout: [\n shared.requireUrl,\n shared.removeScreenshot,\n shared.removeQuotes,\n shared.noPdfLinks,\n shared.noMalformedLinks,\n shared.noHomepageLinks,\n ],\n onInteract: shared.noPdfLinks,\n onKeydown_CtrlAlt: (_, idx) => shared.item.focus(idx),\n onLoad: [\n shared.disableSpellcheck,\n shared.keepAlive,\n shared.noHomepageLinks,\n shared.noMalformedLinks,\n shared.noPdfLinks,\n ],\n onPaste: [\n shared.requireUrl,\n shared.removeBannedDomains,\n shared.removeScreenshot,\n shared.noHomepageLinks,\n shared.noMalformedLinks,\n shared.noPdfLinks,\n ],\n ref: 'linkAreas0',\n });\n \n ー({\n name: 'Screenshot',\n rootSelect: isAnalyst\n ? '#extraction-editing'\n : '.extraction-screenshots',\n select: 'textarea',\n pick: isAnalyst\n ? [3, 7, 11, 15, 19]\n : [0, 1, 2, 3, 4],\n onFocusout: [\n shared.requireUrl,\n shared.requireScreenshot,\n shared.removeQuotes,\n ],\n onKeydown_CtrlAlt: (_, idx) => shared.item.focus(idx),\n onLoad: shared.disableSpellcheck,\n onPaste: [\n shared.requireUrl,\n shared.requireScreenshot,\n ],\n ref: 'screenshots0',\n });\n\n ー({\n name: 'Dashes',\n rootSelect: '#extraction-editing',\n select: 'textarea',\n pick: isAnalyst\n ? [4, 8, 12, 16, 20]\n : [3, 6, 9, 12, 15],\n onFocusin: shared.removeDashes,\n onFocusout: [\n shared.removeQuotes,\n shared.addDashes,\n ],\n onKeydown_CtrlAlt: (_, idx) => shared.item.focus(idx),\n onLoad: [\n shared.addDashes,\n shared.tabOrder.remove,\n shared.disableSpellcheck,\n ],\n });\n\n ー({\n name: 'Analyst Comment',\n select: '.feedback-display-text',\n pick: [0],\n ref: 'analystComment',\n });\n\n ー({\n name: 'Extraction Page Url',\n rootSelect: '#extraction-editing',\n select: 'textarea',\n pick: [0],\n onKeydown_CtrlAltArrowRight: () => {\n util.attention(ref.editButton0, 0, 'click');\n shared.item.focus(0);\n },\n onLoad: [\n shared.disableSpellcheck,\n shared.removeScreenshot,\n shared.requireUrl,\n ],\n ref: 'extractionUrl0',\n });\n\n ー({\n name: 'LinksAndLP',\n rootSelect: '#extraction-editing',\n select: 'textarea',\n pick: isAnalyst\n ? [2, 6, 10, 14, 18, 0]\n : [2, 5, 8, 11, 14, 0],\n onInteract: [\n shared.noDomainMismatch,\n noDuplicateValues,\n ],\n onLoad: [\n shared.noDomainMismatch,\n noDuplicateValues,\n ],\n onPaste: [\n shared.noDomainMismatch,\n noDuplicateValues,\n ],\n ref: 'openInTabs',\n });\n\n ー({\n name: 'Final Url',\n select: 'textarea',\n pick: [65],\n ref: 'finalUrl',\n });\n\n ー({\n name: 'InvalidScreenshot',\n rootSelect: '.errorbox-good',\n rootNumber: 1,\n select: 'textarea',\n onKeydown_CtrlAltArrowRight: shared.comment.focus,\n onFocusout: shared.removeQuotes,\n onLoad: [\n shared.disableSpellcheck,\n shared.requireUrl,\n shared.requireScreenshot,\n ],\n onPaste: [\n shared.requireUrl,\n shared.requireScreenshot,\n ],\n ref: 'invalidScreenshot',\n });\n\n ー({\n name: 'Creative',\n rootSelect: '.context-item',\n rootNumber: [2],\n select: '*',\n pick: [3, 6, 8],\n onLoad: [\n shared.checkEmptyCreative,\n checkDomainMismatch,\n ],\n ref: 'creative',\n });\n\n const fall = isAnalyst\n ? [[1, 2],[5, 6],[9, 10],[13, 14],[17, 18]]\n : [[1, 2],[4, 5],[7, 8],[10, 11],[13, 14]];\n for (let pair of fall) {\n ー({\n name: 'Fall',\n rootSelect: '#extraction-editing',\n select: 'textarea',\n pick: pair,\n onPaste: fallThrough,\n });\n }\n\n const remaining = isAnalyst\n ? [0, 8, 17, 26, 35]\n : [0, 6, 13, 20, 27];\n for (let rootNumber of remaining) {\n ー({\n name: 'Remaining',\n rootSelect: '.extraction-item table',\n rootNumber,\n select: 'div, textarea',\n pick: [2, 3],\n onChange: shared.updateCharacterCount,\n onFocusin: shared.updateCharacterCount,\n onKeydown: shared.updateCharacterCount,\n onLoad: shared.updateCharacterCount,\n });\n }\n\n ー({\n name: 'StatusDropdown',\n select: 'select',\n pick: [0, 1, 2],\n ref: 'statusDropdown',\n });\n\n ー({\n name: 'Add Data',\n rootSelect: '.extraction',\n select: 'label',\n withText: 'Add Data',\n onKeydown_CtrlAltArrowRight: () => {\n util.attention(ref.addDataButton0, 0, 'click');\n shared.item.focus(0);\n },\n ref: 'addDataButton0',\n });\n\n ー({\n name: 'Edit',\n rootSelect: '.extraction',\n select: 'label',\n withText: 'Edit',\n onKeydown_CtrlAltArrowRight: () => {\n util.attention(ref.editButton0, 0, 'click');\n shared.item.focus(0);\n },\n onLoad: shared.tabOrder.add,\n ref: 'editButton0',\n });\n\n ー({\n name: 'Add Item',\n rootSelect: '#extraction-editing',\n select: 'label',\n withText: 'Add Item',\n ref: 'addItem0',\n });\n\n ー({\n name: 'Leave Blank',\n rootSelect: '#extraction-editing',\n select: 'label',\n withText: 'Leave Blank',\n ref: 'leaveBlank0',\n });\n\n ー({\n name: 'ApprovalButtons',\n rootSelect: '.primaryContent',\n rootNumber: 3,\n select: 'label',\n pick: [0, 1],\n ref: 'approvalButtons',\n });\n\n ー({\n name: 'Comment Box',\n rootSelect: '.addComments',\n select: 'textarea',\n pick: [0],\n onFocusout: util.delay(start, 200),\n onInteract: shared.removeQuotes,\n onKeydown_CtrlAltArrowRight: () => shared.item.focus(0),\n ref: 'finalCommentBox',\n });\n\n ー({\n name: 'CanOrCannotExtract',\n select: 'label',\n pick: [0, 1],\n onKeydown_CtrlAltArrowRight: () => shared.item.focus(0),\n ref: 'canOrCannotExtractButtons',\n });\n \n ー({\n name: 'Visit LP',\n select: '.lpButton button',\n pick: [0],\n css: {opacity: 1},\n });\n \n function manualSubmit() {\n const msg =\n 'Please use the Submit Hotkey instead of clicking manually.';\n user.log.warn(\n msg,\n {save: true, print: true, toast: true}\n );\n alert(msg);\n };\n manualSubmit = util.debounce(manualSubmit, 4000);\n\n ー({\n name: 'Submit Button',\n select: '.submitTaskButton',\n pick: [0],\n css: {opacity: 1},\n onFocusin: manualSubmit,\n ref: 'submitButton',\n })[0].textContent = 'Ready to submit';\n\n ー({\n name: 'Skip Button',\n select: '.taskIssueButton',\n pick: [0],\n ref: 'skipButton'\n });\n\n ー({\n name: 'Task Title',\n select: '.taskTitle',\n ref: 'taskTitle'\n });\n\n ー({\n name: 'TabRemove',\n select: 'label, button',\n onLoad: shared.tabOrder.remove,\n });\n\n ー({\n name: 'Extractions2And3',\n select: '.extraction',\n pick: [1, 2],\n css: {display: 'none'},\n });\n\n ー({\n name: 'Preview Extractions',\n select: '.extraction-preview',\n pick: [1, 2],\n css: {display: 'none'},\n });\n \n const setStatus = shared.setStatus;\n const statusReactions = {\n onKeydown_CtrlAltDigit0: setStatus('canExtract'),\n onKeydown_CtrlAltDigit1: setStatus('insufficient'),\n onKeydown_CtrlAltDigit2: setStatus('pageError'),\n onKeydown_CtrlAltDigit3: setStatus('dynamic'),\n onKeydown_CtrlAltDigit4: setStatus('nonLocale'),\n onKeydown_CtrlAltDigit5: setStatus('other'),\n onKeydown_CtrlAltDigit6: setStatus('pII'),\n onKeydown_CtrlAltDigit7: setStatus('drugDomain'),\n onKeydown_CtrlAltDigit8: setStatus('alcoholDomain'),\n onKeydown_CtrlAltDigit9: setStatus('adultDomain'),\n onKeydown_CtrlShiftAltDigit0: setStatus('canExtract'),\n onKeydown_CtrlShiftAltDigit1: setStatus('other'),\n onKeydown_CtrlShiftAltDigit2: setStatus('urlsUnchanged'),\n onKeydown_CtrlShiftAltDigit3: setStatus('urlMismatch'),\n onKeydown_CtrlShiftAltDigit4: setStatus('emptyCreative'),\n };\n \n const experimentalEscapeApprove = () => {\n if (user.config.get('use escape-key to approve')) {\n approve();\n }\n };\n \n const experimentalSubmit = () => {\n if (user.config.get('use escape-key to approve')) {\n submit();\n }\n };\n \n const submitKeys = {\n onKeydown_CtrlEnter: submit,\n onKeydown_CtrlAltEnter: submit,\n onKeydown_CtrlNumpadEnter: submit,\n onKeydown_CtrlShiftEscape: experimentalSubmit,\n };\n \n const otherKeys = {\n onKeydown_Backquote: beginTask,\n onKeydown_CtrlAltBackquote: beginTask,\n onKeydown_CtrlAltBracketLeft: shared.resetCounter,\n onKeydown_CtrlAltBracketRight: shared.skipTask,\n onKeydown_NumpadSubtract: shared.skipTask,\n onKeydown_NumpadAdd: approve,\n onKeydown_Backslash: approve,\n onKeydown_Escape: experimentalEscapeApprove,\n onKeydown_CtrlShiftDelete: shared.item.removeAll,\n };\n\n eventReactions.setGlobal({\n ...statusReactions,\n ...submitKeys,\n ...otherKeys,\n });\n }", "function reactionStart () {\n if (bu2.state != 1) t0 = new Date(); // Falls Animation angeschaltet, neuer Anfangszeitpunkt\n switchButton2(); // Zustand des Schaltknopfs ändern\n enableInput(false); // Eingabefelder deaktivieren\n if (bu2.state == 1) startAnimation(); // Entweder Animation starten bzw. fortsetzen ...\n else stopAnimation(); // ... oder stoppen\n reaction(); // Eingegebene Werte übernehmen und rechnen\n paint(); // Neu zeichnen\n }", "async function promptMessage(message, author, time, reactions) {\n// We gaan eerst de tijd * 1000 doen zodat we seconden uitkomen.\ntime *= 1000;\n\n// We gaan ieder meegegeven reactie onder de reactie plaatsen.\nfor (const reaction of reactions) {\n await message.react(reaction);\n}\n\n// Als de emoji de juiste emoji is die men heeft opgegeven en als ook de auteur die dit heeft aangemaakt er op klikt\n// dan kunnen we een bericht terug sturen.\nconst filter = (reaction, user) => reactions.includes(reaction.emoji.name) && user.id === author.id;\n\n// We kijken als de reactie juist is, dus met die filter en ook het aantal keren en binnen de tijd.\n// Dan kunnen we bericht terug sturen met dat icoontje dat is aangeduid.\nreturn message.awaitReactions(filter, { max: 1, time: time }).then(collected => collected.first() && collected.first().emoji.name);\n}", "createAction() {}", "[LOAD_REACTIONS](state, reactions) {\n state.reactions = reactions;\n }", "norecord(state, action) {\n return this.record(state, action, false, true);\n }", "getReaction(event) {\n event.preventDefault()\n const { saveGame, game } = this.props\n const now = new Date().getTime()\n if(this.isPlayerOne()){\n saveGame(game, { p1Reaction: now - game.p1Start })\n } else {\n saveGame(game, { p2Reaction: now - game.p2Start })\n }\n}", "function reactionStart () {\n if (bu2.state != 1) t0 = new Date(); // Falls Animation angeschaltet, neuer Anfangszeitpunkt\n switchButton2(); // Zustand des Schaltknopfs ändern\n enableInput(false); // Eingabefelder deaktivieren\n on = (bu2.state == 1); // Flag für Animation\n slow = cbSlow.checked; // Flag für Zeitlupe\n reaction(true); // Eingegebene Werte übernehmen, rechnen, Ausgabe aktualisieren\n }", "@POST('/rescues/:id/relationships/rats')\n @websocket('rescues', 'rats', 'create')\n @parameters('id')\n @authenticated\n async relationshipRatsCreate (ctx) {\n const result = await this.relationshipChange({\n ctx,\n databaseType: Rescue,\n change: 'add',\n relationship: 'rats',\n })\n const query = new DatabaseQuery({ connection: ctx })\n const document = new DatabaseDocument({ query, result, type: RescueView })\n Event.broadcast('fuelrats.rescueupdate', ctx.state.user, ctx.params.id, document)\n\n ctx.response.status = StatusCode.noContent\n return true\n }", "function sendReaction(id, reaction) {\n\n const myReaction = reaction == react[0] ? \"A\" : reaction == react[1] ? \"B\" : reaction == react[2] ? \"C\" :\n reaction == react[3] ? \"D\" : reaction == react[4] ? 'E' : \"F\";\n\n let reactionObject = {\n post_id: id,\n text: reaction,\n text_match: myReaction\n };\n isInternetConnected()\n .then(() => {\n props.reactionOnPostRequest(reactionObject)\n })\n .catch(() => {\n toast('Error', 'Please Connect To Internet')\n })\n }", "static async chip(reaction, user) {\n const msg = reaction.message;\n\n // Calculate magnitude from message: more rocks, greater reward.\n const textMagnitude = Math.floor(msg.content.length / 2);\n const rewardRemaining = STATE.CHANCE.natural({ min: 1, max: textMagnitude * 2 });\n\n // Check if has a pickaxe\n const userPickaxesNum = await ItemsHelper.getUserItemQty(user.id, 'PICK_AXE');\n const noPickText = `${user.username} tried to mine the rocks, but doesn't have a pickaxe.`;\n // Remove reaction and warn.\n // if (userPickaxesNum <= 0) DELETE REACTION\n if (userPickaxesNum <= 0) return MessagesHelper.selfDestruct(msg, noPickText, 10000);\n\n // Handle chance of pickaxe breaking\n const pickaxeBreakPerc = Math.min(25, rewardRemaining);\n\n // Calculate number of extracted pickaxe with applied collab buff/modifier.\n const numCutters = ReactionHelper.countType(msg, '⛏️') - 1;\n const extractedOreNum = Math.ceil(rewardRemaining / 1.5) * numCutters;\n\n // Test the pickaxe for breaking.\n const didBreak = STATE.CHANCE.bool({ likelihood: pickaxeBreakPerc });\n if (didBreak) {\n const pickaxeUpdate = await ItemsHelper.use(user.id, 'PICK_AXE', 1);\n if (pickaxeUpdate) {\n const brokenPickDamage = -2;\n const pointsDamageResult = await PointsHelper.addPointsByID(user.id, brokenPickDamage);\n \n // Update mining economy statistics.\n EconomyNotifications.add('MINING', {\n playerID: user.id,\n username: user.username,\n brokenPickaxes: 1,\n pointGain: brokenPickDamage\n }); \n\n const actionText = `${user.username} broke a pickaxe trying to mine, ${userPickaxesNum - 1} remaining!`;\n const damageText = `${brokenPickDamage} points (${pointsDamageResult}).`;\n ChannelsHelper.propagate(msg, `${actionText} ${damageText}`, 'ACTIONS');\n }\n } else {\n // See if updating the item returns the item and quantity.\n const addMetalOre = await ItemsHelper.add(user.id, 'METAL_ORE', extractedOreNum);\n const addPoints = await PointsHelper.addPointsByID(user.id, 1);\n let diamondsFound = 0;\n\n if (STATE.CHANCE.bool({ likelihood: 3.33 })) {\n diamondsFound = 1;\n const addDiamond = await ItemsHelper.add(user.id, 'DIAMOND', diamondsFound);\n ChannelsHelper.propagate(msg, `${user.username} found a diamond whilst mining! (${addDiamond})`, 'ACTIONS');\n }\n \n if (STATE.CHANCE.bool({ likelihood: 0.25 })) {\n diamondsFound = STATE.CHANCE.natural({ min: 5, max: 25 });\n await ItemsHelper.add(user.id, 'DIAMOND', diamondsFound);\n ChannelsHelper.propagate(msg, `${user.username} hit a major diamond vein, ${diamondsFound} found!`, 'ACTIONS');\n }\n\n EconomyNotifications.add('MINING', {\n pointGain: 1,\n recOre: extractedOreNum,\n playerID: user.id,\n username: user.username,\n diamondsFound\n });\n\n // Reduce the number of rocks in the message.\n if (textMagnitude > 1) await msg.edit(EMOJIS.ROCK.repeat(textMagnitude - 1));\n else await msg.delete();\n \n // Provide feedback.\n const actionText = `${user.username} successfully mined a rock.`;\n const rewardText = `+1 point (${addPoints}), +${extractedOreNum} metal ore (${addMetalOre})!`;\n ChannelsHelper.propagate(msg, `${actionText} ${rewardText}`, 'ACTIONS');\n }\n }", "revertAction() {\n this.activator();\n if (this.secondaryTransformation != null) {\n this.transformationMatrix = this.secondaryTransformation;\n }\n\n this.emitUpdateEvent();\n }", "buildResonance(message) {\n return __awaiter(this, void 0, void 0, function* () {\n return new DiscordResonance_1.DiscordResonance(message.content, message, this.bot, this);\n });\n }", "function revert() {\n socket.emit(\"revert\",{data: \"reload\"});\n }", "setInvert() {\nRQ.setConjugateQV(this.xyzw);\nreturn this;\n}", "function inverse(flag){\n\tif (flag==0)\n\t\treturn \"b\";\n\tif (flag==1)\n\t\treturn \"w\";\n}", "function reactionRadioButton () {\n if (rbR.checked) {dPhi = 0; r = 500;} // Für Widerstand: Phasenverschiebung, Widerstand\n else if (rbC.checked) {dPhi = Math.PI/2; c = 0.0001;} // Für Kondensator: Phasenverschiebung, Kapazität\n else {dPhi = -Math.PI/2; l = 200;} // Für Spule: Phasenverschiebung, Induktivität\n reaction(false); // Eingabefelder aktualisieren, rechnen, Ausgabe aktualisieren\n }", "function doReverse(client, args) {\n var cmd_args = args.args;\n\n client.say(args.replyto, cmd_args.slice(1).join(\" \").split(\"\").reverse().join(\"\"));\n}", "action(cache) {\n const data = cache.actions[cache.index];\n const storage = parseInt(data.channel, 10);\n const varName = this.evalMessage(data.varName, cache);\n const channel = this.getChannel(storage, varName, cache);\n const reason = this.evalMessage(data.reason, cache);\n /** @type {import('discord.js').CreateInviteOptions} */\n const options = {};\n if (data.maxUses) {\n options.maxUses = parseInt(this.evalMessage(data.maxUses, cache), 10);\n } else {\n options.maxUses = 0;\n }\n if (data.lifetime) {\n options.maxAge = parseInt(this.evalMessage(data.lifetime, cache), 10);\n } else {\n options.maxAge = 0;\n }\n if (options.maxAge > 86400) options.maxAge = 86400;\n if (reason) options.reason = reason;\n options.temporary = data.temporary === \"true\";\n options.unique = data.unique === \"true\";\n if (Array.isArray(channel)) {\n this.callListFunc(channel, \"createInvite\", [options]).then((invite) => {\n const varName2 = this.evalMessage(data.varName2, cache);\n const storage2 = parseInt(data.storage, 10);\n this.storeValue(invite.url, storage2, varName2, cache);\n this.callNextAction(cache);\n });\n } else if (channel?.createInvite) {\n channel\n .createInvite(options)\n .then((invite) => {\n const varName2 = this.evalMessage(data.varName2, cache);\n const storage2 = parseInt(data.storage, 10);\n this.storeValue(invite.url, storage2, varName2, cache);\n this.callNextAction(cache);\n })\n .catch((err) => this.displayError(data, cache, err));\n } else {\n this.callNextAction(cache);\n }\n }", "function werewolf(recep,assignmap,mid) {\n var wolfcount = 0;\n var msg = \"The Werewolves are: \";\n for (const [player,role] of assignmap.entries()) {\n if (role == \"werewolf\") {\n msg += client.users.cache.get(player).username;\n msg += ' ';\n wolfcount++;\n }\n }\n client.users.cache.get(recep).send(msg);\n if (wolfcount == 1) {\n client.users.cache.get(recep).send(\"Looks like you're the only wolf, choose a center role to view!\")\n .then(async function (botmessage) {\n for (emoj in settings.emoji_middle) {\n botmessage.react(settings.emoji_middle[emoj]);\n }\n const filter = (reaction, user) => {\n return settings.emoji_middle.includes(reaction.emoji.name) && user.id ===recep;\n };\n const collector = botmessage.createReactionCollector(filter, {max:1, time: 120000});\n \n collector.on('collect', (reaction, user) => {\n console.log(`Collected ${reaction.emoji.name} from ${user.tag}`);\n client.users.cache.get(recep).send(`The ${reaction.emoji.name} role is a ${mid[settings.emoji_middle.indexOf(reaction.emoji.name)]}`);\n });\n \n collector.on('end', collected => {\n console.log('Lone wolf task completed');\n actionsleft--;\n });\n });\n }\n console.log('werewolf task completed');\n return;\n}", "function transformTestAction(normRep, blackboard) {\n normRep.renderAs = 'action';\n}", "instruct(){\n var text1;\n var determinant;\n\n \n if(this.on == 1){\n determinant = 0;\n text1 = 'TURN '+this.name+' to off';\n }\n else if(this.on == 0){\n determinant = 1;\n text1 = 'TURN '+this.name+' to on';\n }\n\n //when at initial state\n //this.on is not initialized yet\n else if(this.on == -1){\n //console.log(this.flip);\n if(this.flip == 1){\n determinant = 0;\n text1 = 'TURN '+this.name+' to off';\n }\n else{\n determinant = 1;\n text1 = 'TURN '+this.name+' to on';\n }\n }\n \n //return:\n //the name of the interacts\n //the instruction texts\n //the state that needs to be achieved \n return [this.name,text1,determinant];\n }", "function createRole(message) {\n message.reply(\"Enter a name for this role\")\n .then(function() {\n // collect the role name\n const messageFilter = msg => msg.author.id === message.author.id\n const collector = message.channel.createMessageCollector(messageFilter, {max: 1, time: 60000})\n collector.on(\"collect\", collected => {\n // save the role name\n let roleName = collected.content\n message.reply(\"Now react to this message with the associated emoji\")\n .then(msg => {\n // filter for desired emoji\n const emojiFilter = (reaction, user) => {\n return user.id === message.author.id\n }\n msg.awaitReactions(emojiFilter, { max: 1, time: 30000, errors: ['time'] })\n .then(collected => {\n //collect desired emoji\n let roleEmoji = collected.first().emoji.name\n msg.guild.roles.create({\n data: {\n name: roleName\n }\n })\n console.log(roleName + \" \" + roleEmoji + \" created\")\n //push to emojis.json\n pushToFile(roleName, roleEmoji) \n })\n })\n })\n })\n}", "async recruit(channel, targetName) {\n\t\tlet nemesis = await sql.getNemesis(channel);\n\t\tlet player = await sql.getPlayerById(nemesis.id);\n\t\tlet embed = new Discord.RichEmbed();\n\t\t\n\t\tif(targetName) {\n\t\t\tlet target = await sql.getPlayer(channel, targetName);\n\t\t\t// Send an offer\n\t\t\tembed.setTitle('HENCHMAN RECRUITMENT')\n\t\t\t\t.setColor(0x00AE86)\n\t\t\t\t.setDescription(`**${player.name}** wishes for **${target.name}** to join ${this.their(player.config.pronoun)} army of evil! ` +\n\t\t\t\t`If you join, you'll become more powerful, and your power will make the Nemesis stronger. ` +\n\t\t\t\t`${target.name}, enter \\`!join ${player.name}\\` to accept the offer and serve the Nemesis in battle.`);\n\t\t\tawait sql.addOffer(player, target, enums.OfferTypes.Recruit);\n\t\t\treturn {embed: embed};\n\t\t} else {\n\t\t\tawait sql.addOffer(player, null, enums.OfferTypes.Recruit);\n\t\t\tembed.setTitle('HENCHMAN RECRUITMENT')\n\t\t\t\t.setColor(0x00AE86)\n\t\t\t\t.setDescription(`**${player.name}** wishes for anyone to join ${this.their(player.config.pronoun)} army of evil! ` +\n\t\t\t\t`If you join, you'll become more powerful, and your power will make the Nemesis stronger. ` +\n\t\t\t\t`the next person to enter \\`!join ${player.name}\\` will accept the offer and serve the Nemesis in battle.`);\n\t\t\treturn {embed: embed};\n\t\t}\n\t}", "function reactionMouseUp (e) { \r\n reactionUp(); // Hilfsroutine aufrufen \r\n }", "function Replayable({\n args,\n body\n}) {\n // Push the arguments onto the stack. The args() function\n // tells us how many stack elements to retain for re-execution\n // when updating.\n let {\n count,\n actions\n } = args(); // Start a new label frame, to give END and RETURN\n // a unique meaning.\n\n return [Object(_encoder__WEBPACK_IMPORTED_MODULE_1__[\"op\"])('StartLabels'), Object(_encoder__WEBPACK_IMPORTED_MODULE_1__[\"op\"])(0\n /* PushFrame */\n ), // If the body invokes a block, its return will return to\n // END. Otherwise, the return in RETURN will return to END.\n Object(_encoder__WEBPACK_IMPORTED_MODULE_1__[\"op\"])(6\n /* ReturnTo */\n , Object(_operands__WEBPACK_IMPORTED_MODULE_0__[\"label\"])('ENDINITIAL')), actions, // Start a new updating closure, remembering `count` elements\n // from the stack. Everything after this point, and before END,\n // will execute both initially and to update the block.\n //\n // The enter and exit opcodes also track the area of the DOM\n // associated with this block. If an assertion inside the block\n // fails (for example, the test value changes from true to false\n // in an #if), the DOM is cleared and the program is re-executed,\n // restoring `count` elements to the stack and executing the\n // instructions between the enter and exit.\n Object(_encoder__WEBPACK_IMPORTED_MODULE_1__[\"op\"])(69\n /* Enter */\n , count), // Evaluate the body of the block. The body of the block may\n // return, which will jump execution to END during initial\n // execution, and exit the updating routine.\n body(), // All execution paths in the body should run the FINALLY once\n // they are done. It is executed both during initial execution\n // and during updating execution.\n Object(_encoder__WEBPACK_IMPORTED_MODULE_1__[\"op\"])('Label', 'FINALLY'), // Finalize the DOM.\n Object(_encoder__WEBPACK_IMPORTED_MODULE_1__[\"op\"])(70\n /* Exit */\n ), // In initial execution, this is a noop: it returns to the\n // immediately following opcode. In updating execution, this\n // exits the updating routine.\n Object(_encoder__WEBPACK_IMPORTED_MODULE_1__[\"op\"])(5\n /* Return */\n ), // Cleanup code for the block. Runs on initial execution\n // but not on updating.\n Object(_encoder__WEBPACK_IMPORTED_MODULE_1__[\"op\"])('Label', 'ENDINITIAL'), Object(_encoder__WEBPACK_IMPORTED_MODULE_1__[\"op\"])(1\n /* PopFrame */\n ), Object(_encoder__WEBPACK_IMPORTED_MODULE_1__[\"op\"])('StopLabels')];\n}", "function Replayable({\n args,\n body\n}) {\n // Push the arguments onto the stack. The args() function\n // tells us how many stack elements to retain for re-execution\n // when updating.\n let {\n count,\n actions\n } = args(); // Start a new label frame, to give END and RETURN\n // a unique meaning.\n\n return [Object(_encoder__WEBPACK_IMPORTED_MODULE_1__[\"op\"])('StartLabels'), Object(_encoder__WEBPACK_IMPORTED_MODULE_1__[\"op\"])(0\n /* PushFrame */\n ), // If the body invokes a block, its return will return to\n // END. Otherwise, the return in RETURN will return to END.\n Object(_encoder__WEBPACK_IMPORTED_MODULE_1__[\"op\"])(6\n /* ReturnTo */\n , Object(_operands__WEBPACK_IMPORTED_MODULE_0__[\"label\"])('ENDINITIAL')), actions, // Start a new updating closure, remembering `count` elements\n // from the stack. Everything after this point, and before END,\n // will execute both initially and to update the block.\n //\n // The enter and exit opcodes also track the area of the DOM\n // associated with this block. If an assertion inside the block\n // fails (for example, the test value changes from true to false\n // in an #if), the DOM is cleared and the program is re-executed,\n // restoring `count` elements to the stack and executing the\n // instructions between the enter and exit.\n Object(_encoder__WEBPACK_IMPORTED_MODULE_1__[\"op\"])(69\n /* Enter */\n , count), // Evaluate the body of the block. The body of the block may\n // return, which will jump execution to END during initial\n // execution, and exit the updating routine.\n body(), // All execution paths in the body should run the FINALLY once\n // they are done. It is executed both during initial execution\n // and during updating execution.\n Object(_encoder__WEBPACK_IMPORTED_MODULE_1__[\"op\"])('Label', 'FINALLY'), // Finalize the DOM.\n Object(_encoder__WEBPACK_IMPORTED_MODULE_1__[\"op\"])(70\n /* Exit */\n ), // In initial execution, this is a noop: it returns to the\n // immediately following opcode. In updating execution, this\n // exits the updating routine.\n Object(_encoder__WEBPACK_IMPORTED_MODULE_1__[\"op\"])(5\n /* Return */\n ), // Cleanup code for the block. Runs on initial execution\n // but not on updating.\n Object(_encoder__WEBPACK_IMPORTED_MODULE_1__[\"op\"])('Label', 'ENDINITIAL'), Object(_encoder__WEBPACK_IMPORTED_MODULE_1__[\"op\"])(1\n /* PopFrame */\n ), Object(_encoder__WEBPACK_IMPORTED_MODULE_1__[\"op\"])('StopLabels')];\n}", "async reverse() {\n this.tl.pause();\n this.angle = 100;\n this._playShieldBounceSound();\n\n await gsap.to(this, {\n x: -50,\n y: 'random(-50,50)',\n duration: 1,\n });\n }", "revertAction(action){\n\t\tif (Object.keys(Actions).indexOf(action.type) == -1) {\n\t\t\tthrow new Error(\"Invalid action! Action: \" + JSON.stringify(action));\n\t\t}\n\n\t\tswitch(action.type){\n\t\t\tcase Actions.move:\n\t\t\t\taction.direction *= -1;\n\t\t\t\tbreak;\n\t\t\tcase Actions.rotate:\n\t\t\t\taction.orientation *= -1;\n\t\t\t\tbreak;\n\t\t}\n\t\tthis[PrivateActions[action.type]](action);\n\t}", "function makeRope()\n\t\t\t{\n\t\t\t\tbranchBank -= 5;\n\t\t\t\tleafBank -= 5;\n\t\t\t\tropeBank++;\n\t\t\t\taction(1,1,1);\n\t\t\t\tadvanceTime();\n\t\t\t\tupdateDisp();\n\t\t\t}", "function reply_click(a){\n a=Number(a);\n var q=((a-1)/n);\n var rem=((a-1)%n);\n q.toFixed(0);\n rem.toFixed(0);\n q=parseInt(q);\n rem=parseInt(rem);\n \n if (v==0 && flag1==1){\n if (prev==-1){\n prev=a;\n p1=q;\n p2=rem;\n}\nelse{\n document.getElementById(prev).style.backgroundColor=\"#282828\";\n prev=a;\n p1=q;\n p2=rem;\n}\n document.getElementById(a).style.backgroundColor =\"#76C470\"; //source\n s1=q;\n s2=rem;\n \n \n }\n else if (v==1 && flag2==1){\nif (prev==-1){\n prev=a;\n p1=q;\n p2=rem;\n}\nelse{\n document.getElementById(prev).style.backgroundColor=\"#282828\";\n mat[p1][p2]=0;\n prev=a;\n p1=q;\n p2=rem;\n}\n \n document.getElementById(a).style.backgroundColor = \"#F25050\"; //dest\n d1=q;\n d2=rem;\n mat[d1][d2]=2;// 2 for destination\n \n \n }\n else if(v>=2){\n document.getElementById(a).style.backgroundColor = \"#c4f6ff\"; //blocks\n mat[q][rem]=-1;//-1 for obstacle\n v++;\n }\n \n }", "rear() {\n\n }", "reverseConvert() {\n\n }", "async createReaction({params, body}, res){\n try {\n const thoughtbyIdReactionAdded = await Thought.findOneAndUpdate(\n { _id: params.thoughtId},\n { $push: { reactions:body } },\n { new: true }\n )\n .populate({path: 'reactions', select: '-__v'})\n .select('-__v');\n if (thoughtbyIdReactionAdded) {\n res.status(200).json({Updated_Thought: thoughtbyIdReactionAdded});\n }\n else {\n return res.status(404).json({ Msg: `No thought found with the Id ${params.thoughtId}` });\n }\n }\n catch (e) {\n res.status(400).json(e);\n }\n }", "async function reactMultiple(message, reactions) {\n\t\tfor (const r of reactions) {\n\t\t\tawait message.react(r);\n\t\t}\n\t}", "function RElement() {}", "function RElement() {}", "function RElement() {}", "actionToState(action,rasp,source,initialRASP){\n var nextRASP={}, delta={}; // nextRASP will be the next state, delta is where all the changes to state are recorded. There may be other properties in the state, only change them deliberatly \n if(action.type===\"TOGGLE\") { // the user clicks on a subject which sends the toggle event, to either open or close the article\n if(rasp.open==='open') { // if the article was open close it, but \n this.toChild['open']({type: \"CLEAR_PATH\"}); // first clear the state of all the sub children, so when they are reopened they are back to their initial state.\n // this is good for 3 reasons: 1) reduces the number of items we need to save state for,\n // 2) reduces the state information we have to encode in to the URL path\n // 3) it fits many use cases that when something becomes visibile it consistently starts in the same state\n delta.open=null; // closed\n delta.minimize=null; // not minimized anymore\n this.qaction(()=>this.props.rasp.toParent({type: \"DESCENDANT_UNFOCUS\"}));\n } else { \n delta.open='open'; // was closed, now open\n delta.minimize=null; // not minimized\n this.qaction(()=>this.props.rasp.toParent({type: \"DESCENDANT_FOCUS\"}))\n }\n } else if(action.type===\"DESCENDANT_FOCUS\" && action.distance > 2 && !rasp.minimize ){\n // a 2+ distant sub child has chanaged to open, so minimize, but don't minimize if already minimized which will change the shape of the propogating message\n delta.minimize=true;\n } else if(action.type===\"DESCENDANT_UNFOCUS\" && action.distance >= 2 && rasp.minimize){\n // a 2+ distant sub child has changed from open, and we are minimized, so unminimize\n delta.minimize=false;\n } else\n return null; // if we don't understand the action, just pass it on\n // we did understand the action and so now calculate the computed state information\n Object.assign(nextRASP,rasp,delta); // calculate the new state based on the previous state and the delta. There may be other properties in the previous state (like depth). Don't clobber them.\n nextRASP.shape= nextRASP.open==='open' ? 'open' : initialRASP.shape; // shape is the piece of state information that all RASP components can understand\n // build the pathSegment out of parts for each state property\n var parts=[];\n if(nextRASP.open==='open') parts.push('o');\n if(nextRASP.minimize) parts.push('m');\n nextRASP.pathSegment= parts.join(','); // pathSegment is be incorporated into the URL path. It should be calculated and the minimal length necessary to do the job\n return nextRASP;\n }", "PostReferenceAsEmbed(Message) {\n const embed = new Discord.MessageEmbed();\n\n var desc = '';\n if (this.action !== undefined) {\n desc = '**' + locale.casttime + '** ' + this.action + '\\n';\n }\n desc += this.description;\n var truncateddesc = desc;\n if (truncateddesc.length >= limits.fieldvalue) {\n truncateddesc = truncateddesc.substring(0, limits.fieldvalue - 4);\n truncateddesc += '...';\n }\n\n embed.setAuthor(this.name)\n .setThumbnail(Message.author.avatarURL())\n .setDescription(truncateddesc);\n\n var sent = Message.channel.send(embed).then(async sentEmbed => {\n // React to our own embed to allow users to receive full text\n // if it has been truncated\n var filterbuilder = [];\n\n if (config.allowfulltextreact === true) {\n if (this.description.length >= limits.fieldvalue - 1) {\n filterbuilder.push('📝');\n await sentEmbed.react('📝');\n }\n }\n\n // Only collect the proper reacts from non-self users\n const filter = (reaction, user) => {\n return filterbuilder.includes(reaction.emoji.name) && user.id === message.author.id;\n };\n\n sentEmbed.awaitReactions(filter, { max: 1, time: 60000, errors: ['time']})\n .then(collected => {\n const reaction = collected.first();\n\n if (reaction.emoji.name === '📝') {\n // Send the entire reference text through dms\n // This may take several dms and can be disabled in the config\n // Option only available if description was truncated\n var substrlength = 0;\n var s = '**' + this.name + '**\\n' + desc;\n\n // Prune output to dm char limit breaking at last line before limit reached\n while (s.length > limits.dm - 1) {\n substrlength = s.substring(0, limits.dm - 1).lastIndexOf(' ');\n Message.author.send(s.substring(0, substrlength));\n s = s.substring(substrlength, s.length);\n }\n Message.author.send(s);\n }\n }).catch(() => {});\n });\n return sent;\n }", "addReplayButton() {\n this.interface.gui.add(this.gameOrchestrator, 'replayMoves').name('Replay Moves');\n }", "_send_unary_action(player1) {\n this.socket.send(\"set_unary_action\\x00\" + player1);\n }", "function reactionStart () {\n if (bu2.state != 1) t0 = new Date(); // Falls Animation angeschaltet, neuer Anfangszeitpunkt\n switchButton2(); // Zustand des Schaltknopfs ändern\n if (bu2.state == 1) startAnimation(); // Entweder Animation fortsetzen ...\n else stopAnimation(); // ... oder stoppen\n }", "dispatchMessageReactionActivity(context) {\n const _super = Object.create(null, {\n onMessageReactionActivity: { get: () => super.onMessageReactionActivity }\n });\n return __awaiter(this, void 0, void 0, function* () {\n if (context.activity.reactionsAdded || context.activity.reactionsRemoved) {\n yield _super.onMessageReactionActivity.call(this, context);\n }\n else {\n yield this.defaultNextEvent(context)();\n }\n });\n }", "reverse() {}", "function behRightIntro( type ) {\r\n return behSeqs(\r\n behLeftIntro( type ),\r\n behMirror( type, typeZero() )\r\n );\r\n}", "function stateReactivatedSurrogatePhase1(state) {\n var surrogate = angular.extend(new SurrogateState(\"reactivate_phase1\"), { locals: state.locals });\n surrogate.self = angular.extend({}, state.self);\n return surrogate;\n }", "function stateReactivatedSurrogatePhase1(state) {\n var surrogate = angular.extend(new SurrogateState(\"reactivate_phase1\"), { locals: state.locals });\n surrogate.self = angular.extend({}, state.self);\n return surrogate;\n }", "revert() { }", "function addReaction()\n{\n getCurrentReactionInfo();\n displayModelInfo();\n if(currentReactionNumber == 1)\n { //if there is at least one reaction allow user to add pathway to database\n document.getElementById('login-button').style.display = 'block';\n }\n}", "function reverseWord(front, rear) {\n\n var length = rear - front;\n\n if (length < 2) {\n return;\n }\n \n for(let i = 0; i<length/2; i++) {\n let temp = message[front + i];\n //console.log(temp); \n message[front + i] = message[front+length-1-i];\n message[front+length-1-i] = temp;\n }\n }", "generateActions(g)\n {\n return [\"attack\", \"wait\"];\n }", "setInvert() {\n//--------\n// (t,r) := (-Rot(r*,t),r*) = (Rot(r*,-t),r*)\nthis._r.setInvert();\n(this._t.setNegate()).setRotate(this._r);\nreturn this;\n}", "static onReaction(reaction, user) {\n try {\n if (UsersHelper.isCooper(user.id)) return false;\n if (!UsersHelper.isCooperMsg(reaction.message)) return false;\n if (!this.calculateRarityFromMessage(reaction.message)) return false;\n if (this.isCrateOpen(reaction.message)) return false;\n if (reaction.emoji.name !== '🪓') return false;\n\n const emojiIdentifier = MessagesHelper.getEmojiIdentifier(reaction.message);\n const crateEmojiNames = _.map(_.values(CRATE_DATA), \"emoji\");\n if (!crateEmojiNames.includes(emojiIdentifier)) return false;\n \n this.axeHit(reaction, user);\n } catch(e) {\n console.error(e);\n }\n }", "function Replayable({\n args,\n body\n}) {\n // Push the arguments onto the stack. The args() function\n // tells us how many stack elements to retain for re-execution\n // when updating.\n let {\n count,\n actions\n } = args(); // Start a new label frame, to give END and RETURN\n // a unique meaning.\n\n return [op('StartLabels'), op(0\n /* PushFrame */\n ), // If the body invokes a block, its return will return to\n // END. Otherwise, the return in RETURN will return to END.\n op(6\n /* ReturnTo */\n , label('ENDINITIAL')), actions, // Start a new updating closure, remembering `count` elements\n // from the stack. Everything after this point, and before END,\n // will execute both initially and to update the block.\n //\n // The enter and exit opcodes also track the area of the DOM\n // associated with this block. If an assertion inside the block\n // fails (for example, the test value changes from true to false\n // in an #if), the DOM is cleared and the program is re-executed,\n // restoring `count` elements to the stack and executing the\n // instructions between the enter and exit.\n op(68\n /* Enter */\n , count), // Evaluate the body of the block. The body of the block may\n // return, which will jump execution to END during initial\n // execution, and exit the updating routine.\n body(), // All execution paths in the body should run the FINALLY once\n // they are done. It is executed both during initial execution\n // and during updating execution.\n op('Label', 'FINALLY'), // Finalize the DOM.\n op(69\n /* Exit */\n ), // In initial execution, this is a noop: it returns to the\n // immediately following opcode. In updating execution, this\n // exits the updating routine.\n op(5\n /* Return */\n ), // Cleanup code for the block. Runs on initial execution\n // but not on updating.\n op('Label', 'ENDINITIAL'), op(1\n /* PopFrame */\n ), op('StopLabels')];\n}", "reverse() {\n }", "function Conversation() {}", "function RElement(){}", "function liftAction(action) { // 187\n var liftedAction = { // 188\n type: ActionTypes.PERFORM_ACTION, // 189\n action: action, // 190\n timestamp: Date.now() // 191\n }; // 192\n return liftedAction; // 193\n} // 194", "static createRedelegate(\n txContext,\n validatorSourceBech32,\n validatorDestBech32,\n uatomAmount\n ) {\n const msgAny = [{ \n typeUrl: TYPE_URLS.msgRedelegate,\n value: MsgBeginRedelegate.fromPartial({\n delegatorAddress: txContext.bech32,\n validatorSrcAddress: validatorSourceBech32,\n validatorDstAddress: validatorDestBech32,\n amount: {\n amount: uatomAmount.toString(),\n denom: txContext.denom,\n },\n }),\n memo: txContext.memo,\n }];\n\n return {msgAny, fee: Meteor.settings.public.fees.redelegate};\n }", "async revive(channel, targetName) {\n\t\tlet target = await sql.getPlayer(channel, targetName);\n\t\tlet nemesis = await sql.getNemesis(channel);\n\t\tlet nemesisPlayer = await sql.getPlayerById(nemesis.id);\n\t\tlet now = new Date().getTime();\n\t\t\n\t\tawait sql.deleteStatus(channel, target.id, enums.StatusTypes.Dead);\n\t\tawait sql.addStatus(channel, target.id, enums.StatusTypes.Ready);\n\t\tnemesis.reviveTime = now + hour * 24;\n\t\tawait sql.setNemesis(channel, nemesis);\n\n\t\treturn `**${nemesisPlayer.name}** breathes new life into **${target.name}**!`;\n\t}", "function raindropeffect() {\n for (var i = 0; i < GUI.decoration.bubblesLength; i++) {\n GUI.decoration.bubbles.push(new raindrop());\n }\n}", "static async onReaction(reaction, user) {\n // High chance of preventing any mining at all to deal with rate limiting.\n if (STATE.CHANCE.bool({ likelihood: 40 })) return false;\n\n const isOnlyEmojis = MessagesHelper.isOnlyEmojis(reaction.message.content);\n const isPickaxeReact = reaction.emoji.name === '⛏️';\n const isCooperMsg = UsersHelper.isCooperMsg(reaction.message);\n const isUserReact = !UsersHelper.isCooper(user.id);\n \n // Mining minigame guards.\n if (!isUserReact) return false;\n if (!isCooperMsg) return false;\n if (!isPickaxeReact) return false;\n if (!isOnlyEmojis) return false;\n\n const msgContent = reaction.message.content;\n\n const firstEmojiString = (msgContent[0] || '') + (msgContent[1] || '');\n const firstEmojiUni = MessagesHelper.emojiToUni(firstEmojiString);\n const rockEmojiUni = MessagesHelper.emojiToUni(EMOJIS.ROCK);\n const isRocksMsg = firstEmojiUni === rockEmojiUni;\n\n if (isRocksMsg) this.chip(reaction, user);\n }", "loadReactions() {\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__awaiter\"])(this, void 0, void 0, function* () {\n });\n }", "function rome_old_roles(reaction, user, apply_db) {\r\n new Promise(resolve => {\r\n //get the reactionmember from the reactions\r\n let reactionmember = reaction.message.guild.member(user);\r\n\r\n //get the temprole, Try to remove the temprole if its valid\r\n let temprole = apply_db.get(reaction.message.guild.id, \"TEMP_ROLE\");\r\n console.log(temprole)\r\n if (temprole != \"0\") {\r\n try {\r\n if (reactionmember.roles.cache.has(temprole))\r\n reactionmember.roles.remove(temprole);\r\n } catch {\r\n /* */\r\n }\r\n }\r\n\r\n //get the one.role, Try to remove the temprole if its valid\r\n let onerole = apply_db.get(reaction.message.guild.id, \"one.role\");\r\n console.log(onerole)\r\n if (onerole != \"0\") {\r\n try {\r\n if (reactionmember.roles.cache.has(onerole))\r\n reactionmember.roles.remove(onerole);\r\n } catch {\r\n /* */\r\n }\r\n }\r\n //get the two.role, Try to remove the temprole if its valid\r\n let tworole = apply_db.get(reaction.message.guild.id, \"two.role\");\r\n if (tworole != \"0\") {\r\n try {\r\n if (reactionmember.roles.cache.has(tworole))\r\n reactionmember.roles.remove(tworole);\r\n } catch {\r\n /* */\r\n }\r\n }\r\n\r\n //get the three.role, Try to remove the temprole if its valid\r\n let threerole = apply_db.get(reaction.message.guild.id, \"three.role\");\r\n if (threerole != \"0\") {\r\n try {\r\n if (reactionmember.roles.cache.has(threerole))\r\n reactionmember.roles.remove(threerole);\r\n } catch {\r\n /* */\r\n }\r\n }\r\n\r\n //get the four.role, Try to remove the temprole if its valid\r\n let fourrole = apply_db.get(reaction.message.guild.id, \"four.role\");\r\n if (fourrole != \"0\") {\r\n try {\r\n if (reactionmember.roles.cache.has(fourrole))\r\n reactionmember.roles.remove(fourrole);\r\n } catch {\r\n /* */\r\n }\r\n }\r\n\r\n //get the five.role, Try to remove the temprole if its valid\r\n let fiverole = apply_db.get(reaction.message.guild.id, \"five.role\");\r\n if (fiverole != \"0\") {\r\n try {\r\n if (reactionmember.roles.cache.has(fiverole))\r\n reactionmember.roles.remove(fiverole);\r\n } catch {\r\n /* */\r\n }\r\n }\r\n })\r\n}", "effect(ui, actions, reverse) {\n const order = Array.from(actions);\n\n // We need to iterate these in reverse order if `reverse` so that interacting actions\n // get executed in the correct order relative to one another.\n if (reverse) {\n order.reverse();\n }\n\n let update_panel = false;\n\n for (const action of order) {\n let kind = action.kind;\n if (reverse) {\n // Actions either have corresponding inverse actions or are self-inverse.\n kind = {\n create: \"delete\",\n delete: \"create\",\n // Self-inverse actions will be automatically preserved.\n }[kind] || kind;\n }\n // Self-inverse actions often work by inverting `from`/`to`.\n const [from, to] = !reverse ? [\"from\", \"to\"] : [\"to\", \"from\"];\n // Actions will often require cells to be rendered transitively.\n const cells = new Set();\n switch (kind) {\n case \"move\":\n // We perform these loops in sequence as cells may move\n // directly into positions that have just been unoccupied.\n for (const displacement of action.displacements) {\n ui.positions.delete(`${displacement[from]}`);\n }\n for (const displacement of action.displacements) {\n displacement.vertex.set_position(ui, displacement[to]);\n ui.positions.set(\n `${displacement.vertex.position}`,\n displacement.vertex,\n );\n cells.add(displacement.vertex);\n }\n // We may need to resize the columns and rows that the cells moved from, if\n // they were what was determining the column/row width/height.\n if (ui.update_col_row_size(...action.displacements.map(\n (displacement) => displacement[from])\n )) {\n // If `update_col_row_size` rerendered all the cells, there's no need to\n // render them again later.\n cells.clear();\n }\n break;\n case \"create\":\n for (const cell of action.cells) {\n ui.add_cell(cell);\n ui.quiver.add(cell);\n }\n update_panel = true;\n break;\n case \"delete\":\n for (const cell of action.cells) {\n ui.remove_cell(cell, this.present);\n }\n update_panel = true;\n break;\n case \"label\":\n for (const label of action.labels) {\n label.cell.label = label[to];\n ui.panel.render_tex(ui, label.cell);\n }\n update_panel = true;\n break;\n case \"label-alignment\":\n for (const alignment of action.alignments) {\n alignment.edge.options.label_alignment = alignment[to];\n alignment.edge.render(ui);\n }\n update_panel = true;\n break;\n case \"offset\":\n for (const offset of action.offsets) {\n offset.edge.options.offset = offset[to];\n cells.add(offset.edge);\n }\n update_panel = true;\n break;\n case \"reverse\":\n for (const cell of action.cells) {\n if (cell.is_edge()) {\n cell.reverse(ui);\n }\n }\n update_panel = true;\n break;\n case \"style\":\n for (const style of action.styles) {\n style.edge.options.style = style[to];\n style.edge.render(ui);\n }\n update_panel = true;\n break;\n case \"connect\":\n const [source, target] = {\n source: [action[to], action.edge.target],\n target: [action.edge.source, action[to]],\n }[action.end];\n action.edge.reconnect(ui, source, target);\n update_panel = true;\n break;\n }\n for (const cell of ui.quiver.transitive_dependencies(cells)) {\n cell.render(ui);\n }\n }\n\n if (update_panel) {\n ui.panel.update(ui);\n }\n // Though we have already updated the `panel` if `update_panel`, `undo` and\n // `redo` may want to update the panel again, if they change which cells are\n // selected, so we pass this flag on.\n return update_panel;\n }", "function renderReactions(webmentions, reactionType, wmProperty) {\n // Process webmentions\n const reactions = parseMentions(webmentions, wmProperty);\n\n if (!reactions || !reactions.length || !document.querySelector(`#${reactionType}-count`) || !document.querySelector(`#${reactionType}-label`)) {\n return;\n }\n\n // Add the count to the reaction tab and, if non-zero then unhide\n document.querySelector(`#${reactionType}-count`).textContent = reactions.length;\n if (reactions.length > 0) {\n document.querySelector(`#${reactionType}-tab`).classList.remove(\"no-reactions\");\n document.querySelector('#reactions').classList.remove(\"no-reactions\");\n }\n const reactionLabel = document.querySelector(`#${reactionType}-label`);\n\n if (reactions && reactions.length) {\n setReactionsLabel(reactions.length, reactionLabel);\n }\n\n // Render logic for the reaction types\n const webmentionReactionsList = document.createElement(\"ul\");\n webmentionReactionsList.setAttribute(\"class\", `webmention-${reactionType}`);\n reactions.forEach(function(reaction) {\n\n const reactionLi = document.createElement(\"li\");\n reactionLi.setAttribute(\"class\", `webmention-${reactionType}-item`);\n\n const reactionA = document.createElement(\"a\");\n reactionA.setAttribute(\"class\", \"webmention-author\");\n reactionA.setAttribute(\"href\", reaction[\"url\"]);\n const authorName = reaction[\"author\"][\"name\"] ? reaction[\"author\"][\"name\"] : reactionA.hostname;\n reactionA.setAttribute(\"title\", authorName);\n reactionA.setAttribute(\"aria-label\", authorName);\n\n if (reaction[\"author\"] && reaction[\"author\"][\"photo\"]) {\n const reactionIMG = document.createElement(\"img\");\n reactionIMG.setAttribute(\"class\", \"webmention-author-avatar\");\n reactionIMG.setAttribute(\"src\", reaction[\"author\"][\"photo\"]);\n reactionIMG.setAttribute(\"alt\", authorName);\n reactionIMG.setAttribute(\"loading\", \"lazy\");\n reactionIMG.setAttribute(\"width\", \"60\");\n reactionIMG.setAttribute(\"height\", \"60\");\n reactionA.appendChild(reactionIMG);\n }\n\n // Replies and mentions have some extra HTML\n const reactionDivContent = document.createElement(\"div\");\n const reactionDivMeta = document.createElement(\"div\");\n if (reactionType === \"replies\" || reactionType === \"mentions\") {\n const reactionSTRONG = document.createElement(\"strong\");\n reactionSTRONG.setAttribute(\"class\", \"webmention-author-name\");\n reactionSTRONG.textContent = authorName;\n reactionA.appendChild(reactionSTRONG);\n\n reactionDivContent.setAttribute(\"class\", \"webmention-content\");\n if (reaction[\"content\"]) {\n\n const maxLength = 350;\n const lookBack = 100;\n\n let webMentionContent = reaction[\"content\"][\"text\"];\n const length = webMentionContent.length;\n\n // If we've a really long webmention then want to only show a subset of it\n if (length > maxLength) {\n\n // Check to see if we can find a mention of us:\n const webMentionFirstMention = webMentionContent.search(/(web ?almanac|http ?archive)/i);\n\n // If there is a mention and it is not near the beginning\n // then start from just before that mention, else start at beginning\n const start = webMentionFirstMention > lookBack ? webMentionFirstMention - lookBack : 0;\n\n // Calculate the end\n const stop = start + Math.min(maxLength, length - start);\n\n // Substring the webmention to the required length\n webMentionContent = webMentionContent.substring(start, stop);\n\n // Add elipses to start or end.\n if (start > 0) webMentionContent = \"…\" + webMentionContent;\n if (stop < length) webMentionContent = webMentionContent + \"…\";\n\n }\n\n reactionDivContent.textContent = webMentionContent;\n }\n\n reactionDivMeta.setAttribute(\"class\", \"webmention-meta\");\n\n const reactionTime = document.createElement(\"time\");\n reactionTime.setAttribute(\"class\", \"webmention-pub-date\");\n const pubDate = reaction[\"published\"] ? reaction[\"published\"] : reaction[\"wm-received\"];\n if (pubDate) {\n reactionTime.setAttribute(\"datetime\", pubDate);\n reactionTime.textContent = formatDate(pubDate);\n }\n\n const reactionSpan = document.createElement(\"span\");\n reactionSpan.setAttribute(\"class\", \"webmention-divider\");\n reactionSpan.setAttribute(\"aria-hidden\", \"true\");\n reactionSpan.textContent = \" ⋅ \";\n\n const reactionASource = document.createElement(\"a\");\n reactionASource.setAttribute(\"class\", \"webmention-source\");\n reactionASource.setAttribute(\"href\", reaction[\"url\"]);\n reactionASource.textContent = document.querySelector(\".reactions\").dataset.source;\n\n reactionDivMeta.appendChild(reactionTime);\n reactionDivMeta.appendChild(reactionSpan);\n reactionDivMeta.appendChild(reactionASource);\n }\n\n reactionLi.appendChild(reactionA);\n if (reactionType === \"replies\" || reactionType === \"mentions\") {\n reactionLi.appendChild(reactionDivContent);\n reactionLi.appendChild(reactionDivMeta);\n }\n webmentionReactionsList.appendChild(reactionLi);\n });\n document.querySelector(`#${reactionType}-panel`).appendChild(webmentionReactionsList);\n}", "function buyIceCream ()\n{\n // An action has a type property \n return (\n {\n type: Buy_IceCream,\n info:'secondReduxAction'\n \n })\n}", "static get actions () {\n return ['Buzz', 'ToggleRaise', 'SetColor', Rotate]\n }", "async function createChan()\n{\n\tlet choice = [\n\t\t{\n\t\t\tname: \"vocal\",\n\t\t\tvalue: \"vocal\"\n\t\t},\n\t\t{\n\t\t\tname: \"text\",\n\t\t\tvalue: \"text\"\n\t\t},\n\t\t{\n\t\t\tname: \"Retourner au menu précédent !\",\n\t\t\tvalue: -1\n\t\t},\n\t\treturnObjectLeave()\n\t]\n\tlet response = await ask(\n\t{\n\t\ttype: \"list\",\n\t\tmessage: \"Quelle type de channel voulez vous créer ?\",\n\t\tname: \"chanType\",\n\t\tchoices: choice\n\t})\n\tif (response.chanType == -1)\n\t{\n\t\taskWhatToDoChan()\n\t}\n\telse if (response.chanType == -2)\n\t{\n\t\tendProcess()\n\t}\n\telse\n\t{\n\t\tlet responseName = await ask(\n\t\t{\n\t\t\ttype: \"input\",\n\t\t\tmessage: \"Quelle nom souhaitez vous donner a ce chan ?\",\n\t\t\tname: \"chanName\"\n\t\t})\n\t\tdoCreateChan(responseName.chanName, response.chanType)\n\t\taskWhatToDoChan()\n\n\t}\n\n}", "function reActorReducer(state = [], action){\n\n\n switch(action.type){\n\n default: \n return state\n }\n\n\n}", "function newTransverseWaveGame() {\n var viewFactory = new InteractiveTransverseWaveViewFactory();\n var playDelay = 1000;\n var playerOptions = getCommonPlayerOptions(viewFactory, playDelay, 1, 5);\n var width = parseInt($('boardWidth').value);\n var height = parseInt($('boardHeight').value);\n var controlForm = $('gameOptions');\n var leftPlayer = parseInt(getSelectedRadioValue(controlForm.elements['leftPlayer']));\n var rightPlayer = parseInt(getSelectedRadioValue(controlForm.elements['rightPlayer']));\n var game = new TransverseWave(height, width);\n var players = [playerOptions[leftPlayer], playerOptions[rightPlayer]];\n var ref = new Referee(game, players, viewFactory, \"MainGameBoard\", $('messageBox'), controlForm);\n}", "async function onReactionChange(message, emoji, userID, add) {\n if (emoji.id) {\n emoji = `${emoji.name}:${emoji.id}`;\n\n if (!message.author) message = await client.bot.getMessage(message.channel.id, message.id);\n message.author.bot = client.bot.users.get(userID).bot;\n messageCreateMethods.scoreEmojis(message, emoji, add);\n } else {\n emoji = emoji.name;\n }\n\n let guildID = client.bot.channelGuildMap[message.channel.id];\n if (!guildID) return;\n\n if (!message.member || !message.content) {\n try {\n message = await client.bot.getMessage(message.channel.id, message.id);\n } catch (error) {\n return;\n }\n }\n\n let guild = await client.getGuild(guildID);\n\n if (!guild.starboard || guild.starboard === 0) return;\n if (emoji !== guild.emoji) return;\n if (message.author.id == userID) return;\n\n if (message.channel.id === guild.starboard) {\n if (add === false) return;\n if (!client.bot.guilds.get(guildID).members.get(client.bot.user.id).permission.has(\"manageMessages\")) return;\n\n let res = await client.pg.query({\n text: \"SELECT * FROM starboard WHERE post = $1;\",\n values: [message.id]\n });\n\n let status = res.rows[0];\n\n await client.bot.removeMessageReaction(message.channel.id, message.id, emoji, userID);\n let msg = await client.bot.getMessage(status.channel, status.message);\n return onReactionChange(msg, { name: emoji }, userID, true);\n }\n\n let status = await client.pg.query({\n text: \"SELECT * FROM starboard WHERE message = $1;\",\n values: [message.id]\n });\n\n let row = false;\n if (add === true) {\n try {\n await client.pg.query({\n text: \"INSERT INTO who (message, member) VALUES ($1, $2);\",\n values: [message.id, userID]\n });\n } catch (error) {\n if (error.code !== \"23505\") throw error;\n }\n\n let res = await client.pg.query({\n text: [\n \"INSERT INTO starboard (date, guild, member, channel, message, stars)\",\n \"VALUES ($1, $2, $3, $4, $5, 1)\",\n \"ON CONFLICT (message) DO\",\n \"UPDATE SET stars = (SELECT count(*) FROM who WHERE message = $5) WHERE starboard.message = $5\",\n \"RETURNING *;\"\n ].join(\" \"),\n values: [message.timestamp, message.channel.guild.id, message.author.id, message.channel.id, message.id]\n });\n\n row = res.rows[0];\n } else if (add === false) {\n await client.pg.query({\n text: \"DELETE FROM who WHERE message = $1 AND member = $2;\",\n values: [message.id, userID]\n });\n\n let res = await client.pg.query({\n text: \"UPDATE starboard SET stars = (SELECT count(*) FROM who WHERE message = $1) WHERE message = $1 RETURNING *;\",\n values: [message.id]\n });\n\n row = res.rows[0];\n\n if (res.rows[0].stars === 0) {\n await client.pg.query({\n text: \"DELETE FROM starboard WHERE message = $1;\",\n values: [message.id]\n });\n }\n }\n\n if (!client.bot.channelGuildMap[guild.starboard]) {\n await client.pg.query({\n text: \"UPDATE guilds SET starboard = null WHERE id = $1;\",\n values: [guild.id]\n });\n\n delete client.guildCache[guild.id];\n\n return;\n }\n\n let embed = await client.commands.star.subcommands.show.embed(null, { message });\n let msg = {\n content: `⭐ **${row.stars}** ${message.channel.mention}`,\n embed\n };\n\n try {\n if (row.stars < (guild.starmin ? Number(guild.starmin) : 1)) {\n if (row.post) {\n await client.bot.deleteMessage(guild.starboard, row.post);\n await client.pg.query({\n text: \"UPDATE starboard SET post = null WHERE message = $1;\",\n values: [message.id]\n });\n }\n } else if (row.post) {\n await client.bot.editMessage(guild.starboard, row.post, msg);\n } else {\n let post = await client.bot.createMessage(guild.starboard, msg);\n await client.pg.query({\n text: \"UPDATE starboard SET post = $1 WHERE message = $2;\",\n values: [post.id, message.id]\n });\n }\n } catch (error) {\n console.error(error);\n }\n}", "async createReaction({params, body}, res){\n try{\n const results = await Thought.findByIdAndUpdate(\n { _id: params.thoughtId },\n { $push: {reactions: body } },\n {new: true}\n );\n\n if (!results) {\n res.status(404).json({ message: 'No thought found with that id' });\n return;\n }\n res.json(results);\n }\n catch(err)\n {\n console.log(err);\n res.status(500).json(err);\n }\n }", "function fl_outToBible_btn ()\n\t\t{\n\t\t\t if(freez == \"false\"){\n\t\t\tconsole.log(\"hit\")\n\t\t\tthis.rimon.alpha=1\n\t\t\tthis.sufgania.alpha=1\n\t\t\tthis.selek.alpha=1\n\t\t\tthis.karpas.alpha=1\n\t\t\tthis.levivot.alpha=1\n\t\t\tthis.haroset.alpha=1\n\t\t\tthis.hasa.alpha=1\n\t\t\tthis.beiza.alpha=1\n\t\t\tthis.hazeret.alpha=1\n\t\t\tthis.mamtak.alpha=1\n\t\t\tthis.oznei_aman.alpha=1\n\t\t\tthis.dag.alpha=1\n\t\t\tthis.sumsum.alpha=1\n\t\t\tthis.perot.alpha=1\n\t\t this.chanuka_btn.alpha=1\n\t\t this.tu_btn.alpha=1\n\t\t this.modern_btn.alpha=1\n\t\t\t\t this.arrow_btn.alpha=0\n\t\tthis.arrowAside_mc.alpha=0\n\t\tthis.gvina_explain.alpha=0\n\t\tthis.mishloah_explain.alpha=0\n\t\tthis.sufgania_explain.alpha=0\n\t\t\n\t\tthis.perot_explain.alpha=0\n\t\t\n\t\tthis.tapuah_explain.alpha=0\n\t\t\n\t\tthis.maza_explain.alpha=0\n\t\t\n\t\t\t }\n\t\t\n\t\t}", "evolve() {\n if (this.link) {\n this.memory.body = [\n WORK, WORK, WORK, WORK, WORK, WORK, WORK,\n CARRY, CARRY, CARRY, CARRY, CARRY,\n MOVE, MOVE, MOVE, MOVE, MOVE, MOVE, MOVE, MOVE, MOVE, MOVE, MOVE, MOVE\n ]\n }\n }", "replay(){\n\n }", "*pressButtonR() {\n yield this.sendEvent({ type: 0x01, code: 0x137, value: 1 });\n }", "function RElement() { }", "function RElement() { }", "Reverse() {\n\n }" ]
[ "0.6685052", "0.5935338", "0.567256", "0.5375779", "0.5348552", "0.5331727", "0.53048503", "0.5301419", "0.5293033", "0.5282614", "0.5271819", "0.5253171", "0.52515167", "0.51860505", "0.5145787", "0.513109", "0.51273644", "0.5119652", "0.5095795", "0.5095581", "0.50791943", "0.5055904", "0.50478816", "0.5040724", "0.5010844", "0.4997006", "0.4966429", "0.49612457", "0.4935231", "0.49263996", "0.49241355", "0.48891047", "0.48771554", "0.48743406", "0.4865925", "0.48560822", "0.48532164", "0.4847332", "0.48419797", "0.48392415", "0.48349288", "0.48199186", "0.4818543", "0.48093084", "0.4796464", "0.47895244", "0.47895244", "0.47893405", "0.47884473", "0.47874293", "0.47834176", "0.47770604", "0.47759956", "0.47505233", "0.47474244", "0.4746207", "0.4746207", "0.4746207", "0.47328803", "0.47263134", "0.47183695", "0.47162762", "0.47089705", "0.47060308", "0.4701898", "0.47010827", "0.4682", "0.4682", "0.46793205", "0.46777162", "0.46750942", "0.4668751", "0.46667552", "0.46638414", "0.46560243", "0.46517396", "0.4648671", "0.46459398", "0.4642987", "0.46419087", "0.46277702", "0.4624456", "0.46229637", "0.4621302", "0.46120626", "0.4611163", "0.46090922", "0.45938167", "0.4590223", "0.4589593", "0.45822698", "0.45808688", "0.45703012", "0.456868", "0.45664573", "0.45664254", "0.45633087", "0.45576808", "0.45562154", "0.45562154", "0.45489746" ]
0.0
-1
Calculates the xvalue of a point on a circle (of radius 50) given the y value
function calculateX(y, centerX, centerY) { var x; x = centerX + Math.sqrt(-1 * Math.pow((y - centerY), 2) + 2500); if (Number.isNaN(x)) { return centerX; } else { return x; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCircleXFromY(y, circCenterX, circCenterY, radius){\n return Math.round(Math.sqrt(Math.pow(radius, 2) - Math.pow(y - circCenterY, 2))) + circCenterX;\n}", "function getPointG (center, radius) {\n var x = center[0];\n var y = center[1];\n \n \n y += Math.round(2 * radius * .8660)\n\n console.log([x, y]);\n}", "function getCircleYFromX(y, circCenterX, circCenterY, radius){\n return Math.round(Math.sqrt(Math.pow(radius, 2) - Math.pow(x - circCenterX, 2))) + circCenterY;\n}", "getExactPoint(x, y) {\n for (let i = 0; i < this.circleArray.length; i++) {\n if (x > this.circleArray[i].x - 30 && x < this.circleArray[i].x + 30 && y > this.circleArray[i].y - 30 && y < this.circleArray[i].y + 30) {\n return {\n x: this.circleArray[i].x,\n y: this.circleArray[i].y\n }\n\n }\n }\n }", "function circle_center(px, py, qx, qy, rx, ry) {\n let v1 = sq(rx)+sq(ry)-sq(px)-sq(py);\n let v2 = sq(qx)+sq(qy)-sq(px)-sq(py);\n let y = (v1*(qx-px)-v2*(rx-px)) / (2*((rx-px)*(py-qy)-(py-ry)*(qx-px)));\n let x = (sq(qx)-sq(px)+sq(qy-y)-sq(py-y))/(2*(qx-px));\n let r = Math.sqrt(sq(px-x)+sq(py-y));\n //console.log([x, y, r]);\n return [x, y, r];\n}", "function computeCircle(x, centerX, y, centerY){\n return Math.round(Math.sqrt(Math.pow(x - centerX, 2) + Math.pow(y - centerY, 2)));\n}", "function radialCoord(x, y)\n {\n return Math.sqrt(x*x + y*y);\n }", "function checkCirclePos(some_circle){\n // store current mouse (x,y)\n mousePosX = mouseX();\n mousePosY = mouseY();\n\n // calculate coordinates of the circumference of the circle.\n\n // First, get (x,y) coordinates of current circle\n var curr_circle_mid_x = some_circle.getXCoord();\n var curr_circle_mid_y = some_circle.getYCoord();\n\n // use getDiameter and split in half\n var radius = some_circle.getDiameter()/2;\n\n // make sure this all is giving out data...\n console.log(curr_circle_mid_x + \",\" + curr_circle_mid_y);\n console.log(radius);\n}", "function getCircleX(radians, radius) {\n return Math.cos((radians * Math.PI) / 180) * radius;\n}", "function circle(x) {\n return \"Area of Circle = \" + x * x * 3.14;\n}", "function draw_start_point(x, y) {\n\tsvg.append('circle')\n\t\t.attr('cx', x)\n\t\t.attr('cy', y)\n\t\t.attr('r', 3)\n\t\t.attr('stroke', 'black')\n\t\t.attr('fill', 'black')\n\t\t.attr('id', 'p'+x+'black'+y);\n}", "function placeCircle(xVal, yVal) {\n $('.follow-circle').css({\n left: xVal,\n top: yVal\n });\n }", "function circleFormulaX(angle, height, width, radius) {\n return ((radius * Math.cos(angle)) + (width / 2));\n}", "function adjustedX() {\n return parseFloat(currentCircle.attr(\"cx\")) - parseFloat(currentCircle.attr(\"cx-backup\"));\n}", "function getEllipsePoint( xr, yr, angle ) {\n const rAngle = degreesToRadians( angle ),\n x = multiply( xr, Math.sin( rAngle ) ),\n y = multiply( yr, Math.cos( rAngle ) );\n\n return {\n x: Math.round( x ),\n y: Math.round( y )\n };\n}", "function get_point_x(step) {\n\treturn 73 + step * 50;\n}", "function getYCoordinateCircle(x, curY, cX, cY, r) {\n var expr;\n if (r * r < (x - cX) * (x - cX)) expr = 0;\n else expr = Math.sqrt(r * r - (x - cX) * (x - cX));\n if (curY > cY) {\n return cY + expr;\n }\n else {\n return cY - expr;\n }\n}", "function drawCircle(radius, x, y) { svg.append(\"circle\").attr(\"fill\", \"red\").attr(\"r\", radius).attr(\"cx\", x).attr(\"cy\", y); }", "function pointOnCircle(posX, posY, radius, angle) {\n const x = posX + radius * p5.cos(angle)\n const y = posY + radius * p5.sin(angle)\n return p5.createVector(x, y)\n}", "function getXCoordinates(xDay) {\n let startingDistanceX = 50;\n xDay = x + (xDay * (y / data.length));\n return xDay + startingDistanceX;\n }", "function circleY(x, r, a, sign) {\n\t return sign * Math.sqrt(Math.pow(r, 2) - Math.pow(x - a, 2));\n\t}", "function polar_x(radius, angle) {return(radius * Math.cos(Math.PI/180*angle + Math.PI/180*270));}", "function convertToPoint(val, factor) {\n return {\n x: btx - radius * factor * Math.cos(convertToRadians(val)),\n y: bty - radius * factor * Math.sin(convertToRadians(val))\n };\n }", "function find_xy_point(cx, cy, radius, deg) {\n var x = cx + radius * Math.cos(Snap.rad(deg))\n var y = cy + radius * Math.sin(Snap.rad(deg))\n return [x, y];\n}", "function pointInCircle(x, y) {\n return Math.sqrt(x * x + y * y) < 1;\n}", "function draw_circle_point(ctx, oldcenterX, oldCenterY, oldRadius, centerX, centerY, radius, vertice) \n{\n\td = (5 - radius * 4)/4;\n\tx = 0;\n\ty = radius;\n\n\tdo {\n\t\tdraw_pixel_selection(ctx,centerX + x, centerY + y, oldcenterX, oldCenterY, oldRadius, vertice);\n\t\tdraw_pixel_selection(ctx,centerX + x, centerY - y, oldcenterX, oldCenterY, oldRadius, vertice);\n\t\tdraw_pixel_selection(ctx,centerX - x, centerY + y, oldcenterX, oldCenterY, oldRadius, vertice);\n\t\tdraw_pixel_selection(ctx,centerX - x, centerY - y, oldcenterX, oldCenterY, oldRadius, vertice);\n\t\tdraw_pixel_selection(ctx,centerX + y, centerY + x, oldcenterX, oldCenterY, oldRadius, vertice);\n\t\tdraw_pixel_selection(ctx,centerX + y, centerY - x, oldcenterX, oldCenterY, oldRadius, vertice);\n\t\tdraw_pixel_selection(ctx,centerX - y, centerY + x, oldcenterX, oldCenterY, oldRadius, vertice);\n\t\tdraw_pixel_selection(ctx,centerX - y, centerY - x, oldcenterX, oldCenterY, oldRadius, vertice);\n\t\tif (d < 0) {\n\t\t\td += 2 * x + 1;\n\t\t} else {\n\t\t\td += 2 * (x - y) + 1;\n\t\t\ty--;\n\t\t}\n\t\tx = x + 1;\n\t} while (x <= y);\n}", "function calculateAngleX(angle, y){\n\t\tx = Math.tan(angle*y);\n\t\treturn x;\n\t}", "function getX(shape) {\n if (shape.hasAttribute(\"x\")) {\n return parseFloat(shape.getAttribute(\"x\"))\n } else {\n return parseFloat(shape.getAttribute(\"cx\"))\n } \n}", "function findTrueXCoord(x){\n var xCoord = firstDotXPos + (x * xDistBetweenDots);\n return xCoord;\n}", "function draw_point(x, y, color) {\n\tsvg.append('circle')\n\t\t.attr('cx', x)\n\t\t.attr('cy', y)\n\t\t.attr('r', 3)\n\t\t.attr('stroke', color)\n\t\t.attr('fill', color);\n}", "function getPointOnCircle(center, radius, angle, offset) {\n return {\n x: (center.h - radius) + ( radius - (Math.cos(angle) * radius * offset) ),\n y: (center.k - radius) + ( radius - (Math.sin(angle) * radius * offset) )\n }\n }", "getCenterX() {\n return this.x;\n }", "getCenterX() {\n return this.x;\n }", "getCenterX() {\n return this.x;\n }", "function draw_circle(color, y, x) {\n\t\t\tvar radius = (parameters.size[1] >= parameters.size[0]) ? Math.floor(target.height / parameters.size[1]) / 3 \n\t\t\t: Math.floor(target.width / parameters.size[0]) / 3; \n\t\t\tcontext.beginPath();\n\t\t\tcontext.arc(y, x, radius,\n\t\t\t\t0 * Math.PI, 2 * Math.PI);\n\t\t\t\tcontext.fillStyle = color;\n\t\t\t\tcontext.fill();\n\t\t\t\tcontext.strokeStyle = \"black\";\n\t\t\t\tcontext.stroke();\n\t\t\t}", "getCenterX() {\n return this.x + this.width/2\n }", "get radiusX() {\r\n return this.i.po;\r\n }", "function getXPixel(val) {\n return ((can.width() - xPadding) / data.values.length) * val + (xPadding * 1.5);\n }", "function y(x) {\n return (Math.sin(x / 2) + Math.cos(x / 4)) * 5;\n}", "cx(x) {\n let box = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.bbox();\n\n if (x == null) {\n return box.cx;\n }\n\n return this.attr('x', this.attr('x') + x - box.cx);\n }", "function circlePoint(x, y, r, type, force, exceptions) {\n elipsePoint(x, y, r, r, type, force, exceptions);\n }", "function getCirclePoint( r, angle ) {\n const rAngle = degreesToRadians( angle ),\n x = multiply( r, Math.sin( rAngle ) ),\n y = multiply( r, Math.cos( rAngle ) );\n\n return {\n x: Math.round( x ),\n y: Math.round( y )\n };\n}", "function calculateCircleAround(r) {\n return 2 * Math.PI * r;\n}", "translateEllipse(valueX, valueY){\n this.xPos += valueX;\n this.yPos -= valueY;\n }", "function drawCircle( x, y ) {\n ctx.beginPath();\n ctx.arc(x, y, radius, 0, Math.PI * 2);\n ctx.fillStyle = color;\n ctx.fill();\n}", "function calculateCircleValues(radius){\n var pi = Math.pi();\n\n var diameter = 2 * radius;\n var circumference = 2 * pi * radius \n var area = pi * (radius ** 2);\n console.log (\" The circle's diameter is: \" + diameter + \". The circle's circumference is \" + circumference + \". The circle's area is \" + area + \".\"); \n}", "function getCenterCoordinates() {\n return {\n x: getXAverage(),\n y: getYAverage()\n }\n }", "function circleParameter(r){\n//calc area = 2 * PI * r\n var circumference= 2 * Math.PI * r;\n//return the value\n return circumference;\n }", "function xLng(x) {\n return (x - 0.5) * 360;\n}", "function xLng(x) {\n return (x - 0.5) * 360;\n}", "function xLng(x) {\n return (x - 0.5) * 360;\n}", "function xLng(x) {\n return (x - 0.5) * 360;\n}", "function xLng(x) {\n return (x - 0.5) * 360;\n}", "function xLng(x) {\n return (x - 0.5) * 360;\n}", "function xLng(x) {\n return (x - 0.5) * 360;\n}", "function xLng(x) {\n return (x - 0.5) * 360;\n}", "function xLng(x) {\n return (x - 0.5) * 360;\n}", "function position(dot) {\n dot .attr(\"cx\", function(d) { \n // console.log(\"cx is \" + xScale(x(d)) );\n // return xScale(x(d)); \n return xScale(d.engineers_num);\n } )\n .attr(\"cy\", function(d) { return yScale(d.employees_num) })\n .attr(\"r\", 10\n // function(d) {\n // console.log( radiusScale(radius(d)) );\n // return radiusScale(radius(d)); \n // }\n );\n }", "static _calcPointOnArc(radius, angle) {\n var x = Math.cos(angle) * radius;\n var y = Math.sin(angle) * radius;\n return { x: x, y: y };\n }", "function getXPixel(val) {\n return ((canvas2.width - xPadding) / config.values.length) * val + (xPadding * 1.5);\n }", "function get_point_y(c) {\n\treturn 94 + c * 75;\n}", "function getPos_x(){\n return x;\n}", "function circleRadius(cosRadius,point){point=cartesian(point),point[0]-=cosRadius;cartesianNormalizeInPlace(point);var radius=acos(-point[1]);return((-point[2]<0?-radius:radius)+tau-epsilon)%tau}", "function valPoint(x1,y1,x2,y2, val)\n{\n//calculate line (1) a and b\nvar a = (y2-y1)/(x2-x1);\nvar b = y1 - a*x1;\nvar y = a*val + b;\n\nif ((y>=0)&&(y<=1))\n\treturn new Point(val, y);\nelse\n\treturn null;\n}", "function getCenterPoint() {\n var p = root.createSVGPoint();\n // center of 1024, 768\n p.x = 512;\n p.y = 384;\n return p;\n}", "function circleOrigin()\n{\n return { x: d3.select(this).attr(\"cx\"),\n y: d3.select(this).attr(\"cy\") };\n}", "function x(d) { return d.xVal; }", "setupCoordinates(){\n // Start the circle off screen to the bottom left.\n // We divide the size by two because we're drawing from the center.\n this.xPos = -circleSize / 2;\n this.yPos = height + circleSize / 2;\n }", "function getXPixel(val, data) {\n return ((graph.width() - xPadding) / data.values.length) * val + (xPadding * 1.5);\n}", "center(x, y) {\n return this.cx(x).cy(y);\n }", "function drawCircle( x, y ) {\n ctx2.beginPath();\n ctx2.arc(x, y, radius, 0, Math.PI * 2);\n ctx2.fillStyle = color;\n ctx2.fill();\n }", "function getPosX(t) {//由弧度得到 X 坐标 \n\t return prefix_x+radius * (16 * Math.pow(Math.sin(t), 3)); \n\t\t }", "function Circle(xCenter, yCenter, xOther, yOther){\r\n\tthis.radius = Math.sqrt(Math.pow((xCenter - xOther), 2) + Math.pow((yCenter - yOther),2));\r\n\tthis.xCenter = xCenter;\r\n\tthis.yCenter = yCenter\r\n}", "function circle(x,y,radius) { \n ctx.beginPath();\n ctx.arc(x, y, radius,0, 2*Math.PI);\n ctx.fill();\n ctx.stroke();\n}", "function drawPoint(ctx, centreCoord) {\n ctx.beginPath();\n let radius = 2;\n ctx.arc(centreCoord.x, centreCoord.y, radius, 0, 2 * Math.PI);\n ctx.fillStyle = 'red';\n ctx.lineWidth = 1;\n ctx.strokeStyle = 'red';\n ctx.fill();\n ctx.stroke();\n}", "function getXonCircumference(a, r, t){\n return a + r * Math.cos(t)\n}", "function xLng(x) {\n\t return (x - 0.5) * 360;\n\t}", "function xLng(x) {\n\t return (x - 0.5) * 360;\n\t}", "function Circle(x, _y) {\n this.x = x;\n this._y = _y;\n }", "get centerX() {\n return this.x;\n }", "function drawPoint(svg, x, y, attributes) {\n var radius = get(attributes, 'pointRadius', style('pointRadius'));\n var innerRadius = get(attributes, 'innerPointRadius', style('innerPointRadius'));\n var color = get(attributes, 'pointColor', style('pointColor'));\n var tooltipContents = get(attributes, 'tooltipContents', null);\n\n // draw the main point\n var point = svg.append('circle')\n .attr('cx', x)\n .attr('cy', y)\n .attr('r', radius)\n .attr('fill', color);\n \n // if we need a hollow center, draw that\n if (style('pointsHollowCenter')) {\n var innerPoint = svg.append('circle')\n .attr('cx', x)\n .attr('cy', y)\n .attr('r', innerRadius)\n .attr('fill', style('white'))\n .style('pointer-events', 'none');\n }\n\n // take care of tooltip\n if (tooltipContents != null)\n addTooltipToPoint(svg, point, tooltipContents, attributes);\n return point;\n}", "function draw_circle(x, y, radius, color){\r\n //color = ('0' + (x / cnvs.width) * 0xff).toString(16).substr(-2).repeat(3);\r\n ctx.beginPath();\r\n ctx.arc(x, y, radius, 0, Math.PI * 2);\r\n ctx.fillStyle = color;\r\n ctx.fill();\r\n}", "function getXPixel(val) {\n\t\tvar minDateTmp = getTimestamp(curveTmp.data[0].x);\n\t\tvar maxDateTmp = getTimestamp(curveTmp.data[val].x);\n\t\tvar secsTmp = (maxDateTmp.getTime() - minDateTmp.getTime()) / 1000;\n\t\treturn (getGraphWidth() / secsSize * secsTmp) + ((width - xOffset) / secsSize) / 2 + xOffset;\n\t}", "function circleArea(r){\n //calc area Pi * r * r\n var area = Math.PI * r * r;\n //Return the value\n return area;\n\n }", "function circleArea(r){\n //calc area PI * r*r\n var area = Math.PI *r * r;\n //Return the value\n return area;\n\n}", "function getArcX( degrees, radius, originx ) {\n\tvar a = degreesToRadians( degrees );\n\tvar x = originx + radius * Math.cos(a);\n\treturn x;\n}", "function xCoord() {\r\n var min = Math.ceil(120);\r\n var max = Math.floor(cWidth - 120);\r\n return Math.floor(Math.random() * (max - min) + min);\r\n }", "function point(x, y){\n\tthis.x = x;\n\tthis.y = y;\n\tthis.draw = function(){\n\t\tctx.beginPath();\n\t\tctx.arc(x, y, 5, 0, 2*Math.PI);\n\t\tctx.fillStyle = \"yellow\";\n\t\tctx.fill();\n\t\tctx.stroke();\n\t}\n}", "function pointOnCircle (radius, angleDegrees) { // Helper function to create a point on the perimeter of a circle.\n var angleRadians = (angleDegrees * Math.PI) / 180;\n return {\n x: radius * Math.cos(angleRadians),\n y: radius * Math.sin(angleRadians)\n };\n}", "circumcenter(ax, ay, bx, by, cx, cy) \n {\n bx -= ax;\n by -= ay;\n cx -= ax;\n cy -= ay;\n\n var bl = bx * bx + by * by;\n var cl = cx * cx + cy * cy;\n\n var d = bx * cy - by * cx;\n\n var x = (cy * bl - by * cl) * 0.5 / d;\n var y = (bx * cl - cx * bl) * 0.5 / d;\n\n return {\n x: ax + x,\n y: ay + y\n };\n }", "function XY(x,y)\r\n{\r\n \tvar pnt = domSVG.createSVGPoint();\r\n\tpnt.x = x\r\n\tpnt.y = y\r\n\tvar sCTM = domSVG.getScreenCTM();\r\n\tvar PNT = pnt.matrixTransform(sCTM.inverse());\r\n \treturn {x:PNT.x,y:PNT.y}\r\n}", "cx(x) {\n return x == null ? this.x() + this.width() / 2 : this.x(x - this.width() / 2);\n }", "function computeX (x) {\n const mag = me.magnification / 100\n return decimalRound((x - (me.element.el.offsetLeft) - (me.width / 2)) / mag, 2)\n }", "function isWithinCircle() {\n\n var x = document.getElementById('inputBoxX').value;\n var y = document.getElementById('inputBoxY').value;\n var distance = Math.sqrt(x * x + y * y);\n result = \"The point with coordinates X: \" + x + \" and Y: \" + y + \" is in the Circle (0,5) => \";\n\n result += distance <= 5;\n document.getElementById('result').innerHTML = result;\n}", "function newton(x, path) {\n //pick a starting point\n //try halfway between x value and total length\n //since length(x) >= x\n var scale = $(path).parent('svg').width()/path.getBBox().width;\n x /= scale;\n var start = x,\n end = path.getTotalLength(),\n testlength,\n testpoint;\n\n //algorithm part\n //edge cases: at end of path, at start of path\n while(true) {\n //try middle of current bounding region\n testlength = Math.floor((start + end) / 2);\n testpoint = path.getPointAtLength(testlength);\n if (testlength === end || testlength === start) {\n break;\n } else if (testpoint.x > x) {\n //guess was too high\n end = testlength;\n\n } else if (testpoint.x < x) {\n //guess was too low\n start = testlength;\n } else {\n //guess is correct\n break;\n }\n }\n return testpoint.y*scale;\n}", "function randomPointOnCircle(meanAngle) {\n}", "function oneToX(number, x, y) {\n\treturn Math.round((number * x) / y);\n}", "get x() {\n\t\t\treturn this._x / this.scale;\n\t\t}", "get centerX() {\n\t\t\treturn this.x;\n\t\t}", "function getEllipsePoints( xr, yr ) {\n const points = [];\n for ( let startPoint = 0; startPoint <= 360; startPoint++ ) {\n const nextPoints = getEllipsePoint( xr, yr, startPoint );\n points.push( nextPoints );\n }\n return points;\n}" ]
[ "0.7047785", "0.6958386", "0.6789834", "0.6564481", "0.6501087", "0.6461052", "0.6357566", "0.63481045", "0.63356435", "0.6303281", "0.6290927", "0.6277553", "0.618971", "0.618327", "0.6173892", "0.61531365", "0.61375463", "0.609539", "0.60839355", "0.60332036", "0.60160303", "0.5998077", "0.592347", "0.5896858", "0.58924556", "0.5889279", "0.5867511", "0.5862326", "0.5861673", "0.5854801", "0.5812482", "0.5812099", "0.5812099", "0.5812099", "0.5798509", "0.57900107", "0.5788185", "0.5771746", "0.57638305", "0.5759355", "0.5759276", "0.57422286", "0.5733791", "0.5718722", "0.57186055", "0.5716322", "0.5708084", "0.5698836", "0.5670457", "0.5670457", "0.5670457", "0.5670457", "0.5670457", "0.5670457", "0.5670457", "0.5670457", "0.5670457", "0.56625265", "0.56623405", "0.56577826", "0.5656096", "0.56560683", "0.5654384", "0.5653774", "0.56472623", "0.5629689", "0.5620459", "0.56089807", "0.560884", "0.5607347", "0.56067497", "0.56040615", "0.5602729", "0.5602729", "0.55948776", "0.558891", "0.5588254", "0.5588254", "0.55874264", "0.5584915", "0.55825794", "0.55805624", "0.55775464", "0.55774313", "0.55762583", "0.55651355", "0.5561173", "0.5558505", "0.5551797", "0.5551093", "0.5534031", "0.5531566", "0.5527305", "0.5527172", "0.55187786", "0.5510758", "0.5509474", "0.55051076", "0.5504578", "0.5502372" ]
0.6621343
3
Calculate the x value of the molecule in the reaction. The height changes by a consistent value each time but the horizontal position can change if it is following a nonreversible reaction
function getDotPos(moduleNumber) { //find whether module is reversible //find module start and end positions //if irreversible: //semicircular path //else: //if startX == endX: //vertical path //else: //if startY == endY: //horizontal path //else: //weird path var startX = xCoords[moduleNumber]; var startY = yCoords[moduleNumber]; var endX; var endY; var x; var y; if (moduleNumber === xCoords.length - 1) { endX = xCoords[moduleNumber]; endY = yCoords[moduleNumber] + 1; } else { endX = xCoords[moduleNumber + 1]; endY = yCoords[moduleNumber + 1]; } var revMod = revList[moduleNumber]; if (revMod.toLowerCase() === "irreversible") { var currSlider = document.getElementById(enzymeList[moduleNumber]); var irrPositionChange = positionChange * (parseInt(currSlider.value) / 50) * (Math.PI / 2); checkRatio(moduleNumber); if (rxnDir[moduleNumber] === 1) { directions[moduleNumber] = 1; } if (dotPositions[moduleNumber][0] <= (startX * 75 + canvas.clientWidth / 2 + 50)) { if (dotPositions[moduleNumber][1] === startY * 100) { dotPositions[moduleNumber][0] += directions[moduleNumber] * irrPositionChange; } else { dotPositions[moduleNumber][0] -= directions[moduleNumber] * irrPositionChange; } } else { dotPositions[moduleNumber][1] += directions[moduleNumber] * irrPositionChange; dotPositions[moduleNumber][0] = calculateX(dotPositions[moduleNumber][1], (startX * 75 + canvas.clientWidth / 2 + 50), startY * 100 + 50); } if (dotPositions[moduleNumber][1] >= endY * 100 && dotPositions[moduleNumber][0] < (endX * 75) + canvas.clientWidth / 2) { //if reaches end of reaction prodSubValues[moduleNumber][0] += 1; prodSubValues[moduleNumber][1] -= 1; if (moduleNumber != prodSubValues.length - 1) { prodSubValues[moduleNumber + 1][1] += 1; } if (moduleNumber != 0) { prodSubValues[moduleNumber - 1][0] -= 1; } dotPositions[moduleNumber] = [startX*75+canvas.clientWidth/2, startY*100]; checkRatio(moduleNumber); if (rxnDir[moduleNumber] != 1) { directions[moduleNumber] = 0; } } } else { if (startX === endX) { //vertical dotPositions[moduleNumber][1] += directions[moduleNumber] * positionChange; if (dotPositions[moduleNumber][1] >= endY * 100) { prodSubValues[moduleNumber][0] += 1; prodSubValues[moduleNumber][1] -= 1; if (moduleNumber != prodSubValues.length - 1) { prodSubValues[moduleNumber + 1][1] += 1; } if (moduleNumber != 0) { prodSubValues[moduleNumber - 1][0] -= 1; } checkRatio(moduleNumber); if (rxnDir[moduleNumber] === 0 || rxnDir[moduleNumber] === -1) { directions[moduleNumber] = -1; } else { dotPositions[moduleNumber][0] = startX * 75 + canvas.clientWidth / 2; dotPositions[moduleNumber][1] = startY * 100; directions[moduleNumber] = 1; } } else if (dotPositions[moduleNumber][1] <= startY * 100) { prodSubValues[moduleNumber][0] -= 1; prodSubValues[moduleNumber][1] += 1; if (moduleNumber != prodSubValues.length - 1) { prodSubValues[moduleNumber + 1][1] -= 1; } if (moduleNumber != 0) { prodSubValues[moduleNumber - 1][0] += 1; } checkRatio(moduleNumber); if (rxnDir[moduleNumber] === 0 || rxnDir[moduleNumber] === 1) { directions[moduleNumber] = 1; } else { dotPositions[moduleNumber][0] = endX * 75 + canvas.clientWidth / 2; dotPositions[moduleNumber][1] = endY * 100; directions[moduleNumber] = -1; } } } else { if (startY === endY) { //horizontal var currPosChange = (3/2) * positionChange dotPositions[moduleNumber][0] += directions[moduleNumber] * currPosChange; if (dotPositions[moduleNumber][0] >= (endX * 75) + canvas.clientWidth / 2) { prodSubValues[moduleNumber][0] += 1; prodSubValues[moduleNumber][1] -= 1; if (moduleNumber != prodSubValues.length - 1) { prodSubValues[moduleNumber + 1][1] += 1; } if (moduleNumber != 0) { prodSubValues[moduleNumber - 1][0] -= 1; }checkRatio(moduleNumber); if (rxnDir[moduleNumber] === 0 || rxnDir[moduleNumber] === -1) { directions[moduleNumber] = -1; } else { dotPositions[moduleNumber][0] = startX * 75 + canvas.clientWidth / 2; dotPositions[moduleNumber][1] = startY * 100; directions[moduleNumber] = 1; } } else if (dotPositions[moduleNumber][0] <= (startX * 75) + canvas.clientWidth / 2) { prodSubValues[moduleNumber][0] -= 1; prodSubValues[moduleNumber][1] += 1; if (moduleNumber != prodSubValues.length - 1) { prodSubValues[moduleNumber + 1][1] -= 1; } if (moduleNumber != 0) { prodSubValues[moduleNumber - 1][0] += 1; } checkRatio(moduleNumber); if (rxnDir[moduleNumber] === 0 || rxnDir[moduleNumber] === 1) { directions[moduleNumber] = 1; } else { dotPositions[moduleNumber][0] = endX * 75 + canvas.clientWidth / 2; dotPositions[moduleNumber][1] = endY * 100; directions[moduleNumber] = -1; } } } else { //weird var midPoint = (yCoords[moduleNumber] * 100) + 50; var botMidPoint = midPoint + 25; if (dotPositions[moduleNumber][2] === 'undefined') { //If the reaction has not reached the midpoint before dotPositions[moduleNumber].append(0); dotPositions[moduleNumber].append(0); } if (dotPositions[moduleNumber][1] >= midPoint) { dotPositions[moduleNumber][1] += directions[moduleNumber] * positionChange; if (dotPositions[moduleNumber][1] < botMidPoint) { dotPositions[moduleNumber][0] = (startX*75+canvas.clientWidth/2) + directions[moduleNumber] * 3 * (dotPositions[moduleNumber][1] - midPoint); } dotPositions[moduleNumber][3] = dotPositions[moduleNumber][1]; if (dotPositions[moduleNumber][3] < botMidPoint) { dotPositions[moduleNumber][2] = (startX*75+canvas.clientWidth/2) - directions[moduleNumber] * 3 * (dotPositions[moduleNumber][1] - midPoint); } } else { dotPositions[moduleNumber][0] = startX*75+canvas.clientWidth/2; dotPositions[moduleNumber][1] += directions[moduleNumber] * positionChange; dotPositions[moduleNumber][2] = startX*75+canvas.clientWidth/2; dotPositions[moduleNumber][3] = dotPositions[moduleNumber][1]; } if (dotPositions[moduleNumber][1] >= endY * 100 && dotPositions[moduleNumber][0] >= (endX * 75) + canvas.clientWidth / 2) { prodSubValues[moduleNumber][0] += 1; prodSubValues[moduleNumber][1] -= 1; if (moduleNumber != prodSubValues.length - 1) { prodSubValues[moduleNumber + 1][1] += 1; } if (moduleNumber != 0) { prodSubValues[moduleNumber - 1][0] -= 1; } checkRatio(moduleNumber); if (rxnDir[moduleNumber] === 0 || rxnDir[moduleNumber] === -1) { directions[moduleNumber] = -1; } else { dotPositions[moduleNumber][0] = startX * 75 + canvas.clientWidth / 2; dotPositions[moduleNumber][1] = startY * 100; dotPositions[moduleNumber][2] = startX * 75 + canvas.clientWidth / 2; dotPositions[moduleNumber][3] = startY * 100; directions[moduleNumber] = 1; } } else if (dotPositions[moduleNumber][1] <= startY * 100 && dotPositions[moduleNumber][0] <= (startX * 75) + canvas.clientWidth / 2) { prodSubValues[moduleNumber][0] -= 1; prodSubValues[moduleNumber][1] += 1; if (moduleNumber != prodSubValues.length - 1) { prodSubValues[moduleNumber + 1][1] -= 1; } if (moduleNumber != 0) { prodSubValues[moduleNumber - 1][0] += 1; } checkRatio(moduleNumber); if (rxnDir[moduleNumber] === 0 || rxnDir[moduleNumber] === 1) { directions[moduleNumber] = 1; } else { dotPositions[moduleNumber][0] = endX * 75 + canvas.clientWidth / 2; dotPositions[moduleNumber][1] = endY * 100; dotPositions[moduleNumber][2] = startX * 75 + canvas.clientWidth / 2; dotPositions[moduleNumber][3] = startY * 100; directions[moduleNumber] = -1; } } } } } if (moduleNumber === 0) { prodSubValues[moduleNumber][1] += 1; if (prodSubValues[moduleNumber][1] >= 5) { prodSubValues[moduleNumber][1] = 5; } } if (moduleNumber === prodSubValues.length - 1) { prodSubValues[moduleNumber][0] -= 1; if (prodSubValues[moduleNumber][0] <= 1) { prodSubValues[moduleNumber][0] = 1; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function computeX (x) {\n const mag = me.magnification / 100\n return decimalRound((x - (me.element.el.offsetLeft) - (me.width / 2)) / mag, 2)\n }", "__calculateX(position) {\n\t\treturn (gap + (tileSize + gap) * (position % dimensions));\n\t}", "get x()\n\t{\n\t\tif (this._x != null)\n\t\t\treturn this._x;\n\n\t\t/*\n\t\tif (this.isInput)\n\t\t\treturn this.node.posSmooth.x;\n\n\t\treturn this.node.posSmooth.x + this.node.width;\n\t\t*/\n\n\t\treturn this.node.input.plugPositions()[this.isInput ? 'inputs'\n\t\t\t: 'outputs'].filter(o => o.plug === this)[0].x;\n\t}", "get x() {\n\t\t\treturn this._x / this.scale;\n\t\t}", "__calculateX(position) {\n\t\treturn (gap + (tileSize + gap) * (position % this.cols));\n\t}", "getAbsoluteX() {\n // If the note has not been preformatted, then get the static x value\n // Otherwise, it's been formatted and we should use it's x value relative\n // to its tick context\n const x = !this.preFormatted ? this.x : super.getAbsoluteX();\n\n // For a more natural displaced notehead, we adjust the displacement amount\n // by half the stem width in order to maintain a slight overlap with the stem\n const displacementStemAdjustment = (Stem.WIDTH / 2);\n\n return x + (this.displaced\n ? (this.width - displacementStemAdjustment) * this.stem_direction\n : 0\n );\n }", "get x() {\n return this._x / this.scale;\n }", "get xPosition() { return this._xPosition; }", "RealX() {\r\n return this.x * tileSize * -1;\r\n }", "get adjustedX() { return this.x - this.originX }", "x() {\n\t\t\treturn this.data.x;\n\t\t}", "function getX() {\n\n\t\treturn this.x;\n\n\t}", "get centerX() {\n\t\t\treturn this.x;\n\t\t}", "function updateAxeX(value) {\n return (value - scales.mins[guiAxes.X]) * p.getBubbleWidth() / (scales.maxs[guiAxes.X] - scales.mins[guiAxes.X]);\n}", "x(x) {\n\t\treturn this.scaleX * (x - this.offsetX) + nodeSize;\n\t}", "getCenterX() {\n return this.x;\n }", "getCenterX() {\n return this.x;\n }", "getCenterX() {\n return this.x;\n }", "get centerX() {\n return this.x;\n }", "getCenterX() {\n return this.x + this.width/2\n }", "function getPos_x(){\n return x;\n}", "get mid_x() { //center of x position\n return this.x + this.w / 2;\n }", "get midX() {\n return this.x + this.ancho * 0.5\n }", "getPowerTruckX(){\n if(this.powerTrucks.length > 0)\n {\n return this.powerTrucks[0].getPositionX();\n }\n }", "getX() {\r\n return this.x;\r\n }", "cx(x) {\n return x == null ? this.x() + this.width() / 2 : this.x(x - this.width() / 2);\n }", "_xPx( xLogical ) {\n var val = this.transform.x+xLogical*this.scale.x;\n return !isFinite(val) ? 0+this.transform.x : val;\n }", "get left() {\n // origin is at top left so just return x\n return this.x\n }", "function adjustedX() {\n return parseFloat(currentCircle.attr(\"cx\")) - parseFloat(currentCircle.attr(\"cx-backup\"));\n}", "function xCoord() {\r\n var min = Math.ceil(120);\r\n var max = Math.floor(cWidth - 120);\r\n return Math.floor(Math.random() * (max - min) + min);\r\n }", "get gx() {\n if (this.parent) {\n \n //The sprite's global x position is a combination of\n //its local x value and its parent's global x value\n return this.x + this.parent.gx\n } else {\n return this.x\n }\n }", "function getX(rawX) {\n return (rawX + maxWidth) % maxWidth\n}", "function getXPixel(val) {\n return ((can.width() - xPadding) / data.values.length) * val + (xPadding * 1.5);\n }", "getx()\n\t{\n\t\treturn this.x;\n\t}", "function getFinalX() {\n\t\treturn Math.abs(this.finalX - this.originX);\n\t}", "function getCenterX()/*:Number*/ {\n return this.getLeftX() + this.getMyWidth() / 2;\n }", "function getNodeXCoordinate(x) {\n return Math.max(0, Math.min(0.9 * width - NODE_RADIUS, x))\n }", "convertX(x)\n\t{\n\t\treturn Dimensioning.cmToPixel(x - Dimensioning.pixelToCm(this.originX));\n//\t\treturn (x - (this.originX * this.cmPerPixel)) * this.pixelsPerCm;\n\t}", "get x() {\n return this.r * toFloat;\n }", "function getX (hex, layout, hexWidth, hexRadius) {\n\t\tvar x = 0,\n\t\t\txOffset = 0;\n\n\t\tswitch (layout) {\n\t\t\tcase \"odd-r\":\n\t\t\t\txOffset = (hex.rc % 2 === 1) ? hexWidth : (hexWidth / 2);\n\t\t\t\tx = (hex.qc * hexWidth) + xOffset;\n\t\t\t\tbreak;\n\n\t\t\tcase \"even-r\":\n\t\t\t\txOffset = (hex.rc % 2 === 0) ? hexWidth : (hexWidth / 2);\n\t\t\t\tx = (hex.qc * hexWidth) + xOffset;\n\t\t\t\tbreak;\n\n\t\t\tcase \"odd-q\":\n\t\t\tcase \"even-q\":\n\t\t\t\tx = (hex.qc * hexRadius * 1.5) + hexRadius;\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn x;\n\t}", "get left () { return this.x - this.size / 2 }", "getX() {\n return this.getLocation().x;\n }", "calculateX(index) {\n\n while (index >= ROW_SIZE) { // row size is 10 \n \n index -= ROW_SIZE;\n\n }\n return (index * BOX_WIDTH)\n }", "function x(tile) {\n return tile.position.x\n}", "CalculatePosition(e) {\n\t\tlet sliderOffsetWidth = this.node.offsetWidth\n\t\tlet sliderOffsetLeft = this.node.offsetLeft + this.node.offsetParent.offsetLeft\n\n\t\tlet x = Math.max(Math.min(e.x-sliderOffsetLeft, sliderOffsetWidth), 0)\n\t\treturn (x / sliderOffsetWidth) * 100\n\t}", "x(x) {\n let box = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.bbox();\n\n if (x == null) {\n return box.x;\n }\n\n return this.attr('x', this.attr('x') + x - box.x);\n }", "function getOriginX() {\n\t\treturn Math.min(this.originX, this.finalX);\n\t}", "function GetNodeX() {\r\n\r\n\t\tvar CrossX = ((-1) * (kHatSrcY));\r\n\t\tvar NodeX = (CrossX / (Math.sin(BigTheta)));\r\n\t\t\r\n\t\treturn NodeX;\r\n\t}", "function cx_sx(cx){\n\t\tvar v = getView('cx_sx');\n\t\treturn ((cx-v.dx)/(v.dz));\n\t}", "getSliderCentreX() {\n return this.sliderBoundingRect.current.getBoundingClientRect().left + (this.sliderBoundingRect.current.getBoundingClientRect().width / 2);\n }", "getX() {\n return this._bgX\n }", "setX(x) {\n this.setXY(toInt(x), this.position[1]);\n }", "get getHeadX(){\n\t\treturn this.head.x = Math.round(document.querySelector('#snake_head').offsetLeft);\n\t}", "function labelX() {\n const l = d3.select(this.parentNode).select('line');\n // grabbing the values of the x1, x2, and y1 attributes\n const labelX1 = parseInt(l.attr('x1'));\n const labelX2 = parseInt(l.attr('x2'));\n // calculating and returing the x value for the message's label\n return (labelX1 + labelX2) / 2.0;\n}", "function getX(horizontalSlot) {\n if (horizontalSlot < 6) {\n return Math.round(20 + (horizontalSlot * 60));\n } else if (horizontalSlot == 6) {\n return Math.round(435);\n } else {\n return Math.round(550 + ((horizontalSlot - 7) * 60));\n }\n }", "set x(value) {\n var _a, _b;\n // value = Math.round(value);\n this._x = value;\n this.position.x = value;\n (_b = (_a = this.entity) === null || _a === void 0 ? void 0 : _a.gameObject) === null || _b === void 0 ? void 0 : _b.setPosition(value, this.y);\n }", "function getPosX(t) {//由弧度得到 X 坐标 \n\t return prefix_x+radius * (16 * Math.pow(Math.sin(t), 3)); \n\t\t }", "cx(x) {\n let box = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.bbox();\n\n if (x == null) {\n return box.cx;\n }\n\n return this.attr('x', this.attr('x') + x - box.cx);\n }", "_setX (x) {\n this._xPosition = x;\n this._dotElement.style.left = `${x}px`;\n\n // X position relative to center to simplify calculations\n let halfSliderWidth = this._sliderElement.offsetWidth / 2;\n let relativeX = x - halfSliderWidth;\n\n // Update style\n this._fillElement.style.width = `${Math.abs(relativeX)}px`;\n if (relativeX < 0) {\n this._fillElement.style.left = halfSliderWidth - Math.abs(relativeX) + \"px\";\n } else {\n this._fillElement.style.left = halfSliderWidth + \"px\";\n }\n }", "xImage() {\n return this.cos() * this.length;\n }", "function getX(hex, layout, hexWidth, hexRadius) {\n\t\tvar x = 0,\n\t\t xOffset = 0;\n\n\t\tswitch (layout) {\n\t\t\tcase \"odd-r\":\n\t\t\t\txOffset = hex.rc % 2 === 1 ? hexWidth : hexWidth / 2;\n\t\t\t\tx = hex.qc * hexWidth + xOffset;\n\t\t\t\tbreak;\n\n\t\t\tcase \"even-r\":\n\t\t\t\txOffset = hex.rc % 2 === 0 ? hexWidth : hexWidth / 2;\n\t\t\t\tx = hex.qc * hexWidth + xOffset;\n\t\t\t\tbreak;\n\n\t\t\tcase \"odd-q\":\n\t\t\tcase \"even-q\":\n\t\t\t\tx = hex.qc * hexRadius * 1.5 + hexRadius;\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn x;\n\t}", "stringX() {return this.x - 0.5*this.r/2;}", "function getXPixel(val) {\n return ((canvas2.width - xPadding) / config.values.length) * val + (xPadding * 1.5);\n }", "function punto_x(){\n var x;\n x = width/2.3;\n return(x);\n}", "gridX(){\n\t\tif(this.path !== null && this.path[this.pathIter] !== undefined){\n\t\t\treturn (this.path[this.pathIter].x - this.mapContainer.x) / \n\t\t\t\t\tthis.room.tileSize\n\t\t}\n\t\treturn this.inRoomX\n\t}", "function get_point_x(step) {\n\treturn 73 + step * 50;\n}", "function getHipBaseX() {\n var theta = body.torso.GetAngle();\n var x = body.torso.GetPosition().x;\n return x - 35*Math.sin(theta);\n}", "x(worldX) {\n\t\treturn worldX - this.viewRectX0;\n\t}", "get getX() {\n return this.cooX;\n }", "set x(nx){\n\t\tthis.position.nx = nx;\n\t}", "function getXPixel(val, data) {\n return ((graph.width() - xPadding) / data.values.length) * val + (xPadding * 1.5);\n}", "x(x) {\n return x == null ? this.bbox().x : this.move(x, this.bbox().y);\n }", "function getXPixelAxis(val) {\n\t\treturn (getGraphWidth() / size * val) + ((width - xOffset) / size) / 2 + xOffset;\n\t}", "get left () {\n return this.pos.x - this.size.x / 2;\n }", "get xRange() {\n return this.getXRange();\n }", "get Width() { return this.x2 - this.x1; }", "get Width() { return this.x2 - this.x1; }", "xFromScreenBasis(x) {\n return x / this.params.sx * this.smallestScreenEdge() - this.canvas.centre[0]\n }", "_getScaleX() {\n\t\t\t\treturn this.scale;\n\t\t\t}", "get radiusX() {\r\n return this.i.po;\r\n }", "alignKnobSliderX() {\n const sliderCentreX = this.getSliderCentreX();\n return sliderCentreX - this.sliderBoundingRect.current.getBoundingClientRect().height * Constants.KNOB_TO_SLIDER_RATIO / 2;\n }", "function nodePosX(d) {\n return nodeCenters[d.group].x;\n }", "function xvals() {\r\n for (i = 0; i < steps; i++) { document.getElementById('xv' + i).innerHTML = (board.select('x_{' + i + '}').X()).toFixed(14); }\r\n}", "get dragX() {\n return Utils.RTD(this.rotation.x);\n }", "function getLeftX()/*:Number*/ {\n return com.coremedia.cms.studio.imageeditor.util.ImageEditorUtil.getX(this.getPercentageRectangle(), this.getAdjustedImageBounds());\n }", "get blendValueX() {\n return this._blendValueX;\n }", "function getButtonX()\n{\n let buttonsAlreadyThere = Object.keys(buttons).length\n let xFactor = 0.25\n let x = width * (xFactor + xFactor * buttonsAlreadyThere)\n return x\n}", "function xValue(d) { return d.x; } // accessors", "gemXCoordinate() {\n // 5 possible columns for ge with index 0,1,2,3,4\n let reandomGemCol = Math.floor(Math.random()*5);\n switch(reandomGemCol) {\n case 1:\n // in col 1 x is between 0 and 110 -> avg = 0+110/2 = 55\n this.x = 55 - 30;\n break;\n case 2:\n // in col 2 x is between 110 and 220 -> avg = 110+220/2 = 165\n this.x = 165 - 40;\n break;\n case 3:\n // in row 3 x is between 220 and 330 -> avg = 220+330/2 = 275\n this.x = 275 - 50;\n break;\n case 4:\n // in row 4 x is between 330 and 440 -> avg = 330+440/2 = 385\n this.x = 385 - 60;\n break;\n case 5:\n // in row 5 x is between 440 and 550 -> avg = 440+550/2 = 495\n this.x = 495 - 70;\n break;\n }\n return this.x;\n }", "get x() {\n\t\t\t\treturn x;\n\t\t\t}", "assign_x_position(start_x, root_node) {\n // calculate x component of vector from root_node to abs_y at length start_x\n // have min movement horizontally\n let height = Math.abs(this.abs_y - root_node.abs_y)\n this.abs_x = Math.sqrt(Math.max(0, start_x ** 2 - height ** 2))\n if (!this.is_root()) {\n this.abs_x = Math.max(this.abs_x, this.parent.abs_x + CATEGORY_H_SPACING)\n }\n if (this.is_leaf()) {\n return this.abs_x + this.width\n }\n let max_x = 0\n for (child of this.children) {\n max_x = Math.max(max_x, child.assign_x_position(start_x + this.width + ITEM_H_SPACING, root_node))\n }\n return max_x\n }", "setPosX(x) {\n this.x = x;\n this.DOM.el.style.left = `${this.x}px`;\n }", "rectX(i) {\n return this.aX(i) - this.getShift;\n }", "get left() {\n\t\treturn this.pos.x - this.size.x / 2;\n\t}", "get x() {\n return this._x;\n }", "get X() {\n return this._X;\n }", "function getX(calculationModes) {\n if (calculationModes){\n\n var newCalculationModes = {};\n for (var calcMode in calculationModes){\n if (calculationModes[calcMode]){\n newCalculationModes[calcMode] = calculationModes[calcMode];\n }\n }\n if (newCalculationModes[\"borderXType\"]){\n newCalculationModes[\"borderXType\"] = 0;\n }\n }\n return (originLocator ? originLocator.getX(newCalculationModes) : 0) + x;\n }", "get xMin() {\n return this.xRange.min;\n }", "get x1() {\n return this.points[0].x;\n }", "function sx_cx(sx){\n\t\tvar v = getView('sx_cx');\n\t\tvar canvasx = v.dx;\n\t\tcanvasx += (sx*v.dz);\n\t\treturn canvasx || v.dx;\n\t}", "get ratioXY() {\n\t\t\treturn this.width / this.height;\n\t\t}" ]
[ "0.6942843", "0.6788376", "0.6713449", "0.6618212", "0.65846956", "0.6520419", "0.6485787", "0.6457284", "0.6424767", "0.6369828", "0.63597876", "0.63123393", "0.630894", "0.625941", "0.6236537", "0.6217541", "0.6217541", "0.6217541", "0.62071896", "0.6202116", "0.6194544", "0.61610085", "0.6134866", "0.61257446", "0.6121115", "0.60843396", "0.6080259", "0.6046052", "0.60408425", "0.60400003", "0.60275096", "0.60102034", "0.60044944", "0.5957514", "0.5956291", "0.5917346", "0.58850825", "0.5876664", "0.5874857", "0.5849537", "0.5841601", "0.5823913", "0.57987505", "0.57977295", "0.57910377", "0.57635784", "0.5761736", "0.57596505", "0.5756552", "0.57433754", "0.5734901", "0.5725361", "0.5713557", "0.5711018", "0.57013464", "0.56961745", "0.5689363", "0.5688533", "0.56816435", "0.5666857", "0.5662036", "0.5659016", "0.56573445", "0.56564355", "0.5638477", "0.56349295", "0.56132346", "0.5606988", "0.5606616", "0.558752", "0.55866027", "0.5582461", "0.5580666", "0.55665207", "0.55651087", "0.55639505", "0.55639505", "0.5551306", "0.5548335", "0.5541763", "0.55410445", "0.5539155", "0.55361646", "0.55317104", "0.5530838", "0.5529174", "0.55285275", "0.5520179", "0.55173904", "0.5515907", "0.55076855", "0.55070126", "0.55057615", "0.54923564", "0.5488614", "0.54842335", "0.548403", "0.54804075", "0.5475212", "0.54687095", "0.5463168" ]
0.0
-1
specifies which steps of the pathway to draw and draws them
function render() { var ctx = canvas.getContext("2d"); ctx.clearRect(0, 0, canvas.clientWidth, canvas.clientHeight); var varList = document.getElementsByClassName("inner-flex-horiz"); //Draw each step of the pathway, including reversible and non-reversible steps for (var i = 0; i < enzymeList.length; i++) { getDotPos(i); //set speed if (i === 0) { firstRectMidX = xCoords[i] * 75 + (canvas.clientWidth / 2 + 50); firstRectMidY = yCoords[i] * 100; } if (revList[i].toLowerCase() === "reversible") { var nextX; var nextY; if (i != enzymeList.length) { nextX = xCoords[i+1] * 75 + (canvas.clientWidth / 2 + 50); nextY = yCoords[i+1] * 100; } else { nextX = xCoords[i] * 75 + (canvas.clientWidth / 2 + 50); nextY = yCoords[i] * 100; } revStep(substrateList[i][0], productList[i][0], enzymeList[i], xCoords[i] * 75 + (canvas.clientWidth / 2 + 50), yCoords[i] * 100, nextX, nextY, ctx, i); } else { notRevStep(substrateList[i][0], productList[i][0], enzymeList[i], xCoords[i] * 75 + (canvas.clientWidth / 2 + 50), yCoords[i] * 100, ctx, i); } if (varList[i].getAttribute("drawRect") === "true") { ctx.beginPath(); ctx.rect(highlightRects[i][0], highlightRects[i][1], highlightRects[i][2], highlightRects[i][3]); ctx.stroke(); } } ctx.stroke(); ctx.closePath(); ctx.beginPath(); ctx.fillStyle = "blue"; for (var i = 0; i < dotPositions.length; i++) { ctx.moveTo(dotPositions[i][0] + 5, dotPositions[i][1]); ctx.arc(dotPositions[i][0], dotPositions[i][1], 5, 0, 2 * Math.PI); if (dotPositions[i].length === 4) { ctx.moveTo(dotPositions[i][2] + 5, dotPositions[i][3]); ctx.arc(dotPositions[i][2], dotPositions[i][3], 5, 0, 2 * Math.PI); } } ctx.fill(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "debug( draw, steps=10, inc_dxdy=false, inc_dxdy2=false ){\r\n let prev = new Vec3();\r\n let pos = new Vec3();\r\n let dev = new Vec3();\r\n let t;\r\n\r\n // Draw First Point\r\n this.at( 0, prev );\r\n draw.pnt( prev, \"yellow\", 0.05, 1 );\r\n\r\n for( let i=1; i <= steps; i++ ){\r\n t = i / steps;\r\n\r\n //------------------------------------\r\n // Draw Step\r\n this.at( t, pos );\r\n draw\r\n .ln( prev, pos, \"yellow\" )\r\n .pnt( pos, \"yellow\", 0.05, 1 );\r\n\r\n //------------------------------------\r\n // Draw Forward Direction\r\n if( inc_dxdy ){\r\n this.at( t, null, dev );\r\n draw.ln( pos, dev.norm().scale( 0.4 ).add( pos ), \"white\" );\r\n }\r\n\r\n //------------------------------------\r\n // Draw Forward Direction\r\n if( inc_dxdy2 ){\r\n this.at( t, null, null, dev );\r\n draw.ln( pos, dev.norm().scale( 0.4 ).add( pos ), \"cyan\" );\r\n }\r\n\r\n //------------------------------------\r\n prev.copy( pos );\r\n }\r\n }", "function draw() {\n if (controllers.free_flow_flag) {\n draw_step();\n }\n\n}", "function draw() {\n const pathColor = (getComputedStyle(document.documentElement).getPropertyValue('--path') || '#ffffff').trim();\n\n const ctx = canvas.getContext(\"2d\");\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n\n const pathTransform = new DOMMatrix().scale(scaleFactor).multiply(transformFromMeter).multiplySelf(accountForFlip);\n let first = true;\n ctx.beginPath();\n ctx.lineWidth = 1;\n ctx.strokeStyle = pathColor;\n for (const coord of path) {\n const [xMeter, yMeter] = coord;\n const { x, y } = new DOMPoint(xMeter, yMeter).matrixTransform(pathTransform);\n if (first) {\n ctx.moveTo(x, y);\n first = false;\n }\n else {\n ctx.lineTo(x, y);\n }\n }\n ctx.stroke();\n }", "function go_step_pressed(){\n draw_step();\n}", "function animate(){\n\tdone = false;\n if(t<points.length-1 && visible){ \n\t\trequestAnimationFrame(animate); \n\t} else {\n\t\tif (!visible) {\n\t\t\treturn;\n\t\t}\n\t\t//continues to next lines if avaliable\n\t\tif (index < paths.length) {\n\t\t\tpoints = paths[index];\n\t\t\tindex++;\n\t\t\tt = 1;\n\t\t\tanimate();\n\t\t} else {\n\t\t\tdone = true;\n\t\t}\n\t}\n ctx.beginPath();\n\tctx.strokeStyle = \"white\";\n\t//draws path from prev way point to current\n ctx.moveTo(points[t-1].x,points[t-1].y);\n ctx.lineTo(points[t].x,points[t].y);\n ctx.stroke();\n\tctx.closePath();\n\t//increments paths\n t++;\n}", "drawPath() {\n this.ctx.stroke();\n this.begin();\n }", "addStep(closePoint, farPoint, edgePoint) {\n this.closePoints.push(closePoint);\n this.farPoints.push(farPoint);\n // this.edgePoints.push(edgePoint);\n \n let lastIndex = this.getCount() - 2;\n let currentIndex = this.getCount() - 1;\n if(lastIndex < 0) {lastIndex = 0;}\n \n let polygonDrawable = (new PolygonDrawable([this.farPoints[lastIndex], this.farPoints[currentIndex], this.closePoints[currentIndex], this.closePoints[lastIndex]])).setStyle(this.trailStyle.copy().setStep(this.trailStyle.getStep())).setLifespan(this.trailStyle.duration).setCamera(this.camera);\n \n // polygonDrawable.translate(Vector.subtraction(farPoint, closePoint).normalize(16));\n \n this.polygonDrawables.push(polygonDrawable);\n // this.edgePolygons.push((new PolygonDrawable([this.farPoints[lastIndex], this.farPoints[currentIndex], this.edgePoints[currentIndex], this.edgePoints[lastIndex]])).setStyle(ColorTransition.from(this.edgeStyle)).setLifespan(this.edgeStyle.duration).setCamera(this.camera));\n \n this.lifespan = Math.max(this.lifespan, this.trailStyle.duration, this.edgeStyle.duration);\n \n for(let i = 0; i < this.otherTrails.length; ++i) {\n let otherTrail = this.otherTrails[i];\n \n if(otherTrail.edgeWidth) {\n let vector = Vector.subtraction(farPoint, closePoint).normalize(otherTrail.edgeWidth);\n \n closePoint = farPoint;\n farPoint = vector.add(farPoint);\n \n if(otherTrail.edgeWidth < 0) {\n let x = closePoint;\n closePoint = farPoint;\n farPoint = x;\n }\n }\n \n otherTrail.addStep(closePoint, farPoint);\n }\n \n return this;\n }", "function keyDownHandler(e) {\n if (e.keyCode === 39) {\n if (stepCount + 1 < steps.length) {\n stepCount++;\n for (i = 0; i < steps[stepCount][1].length; i++) {\n ctx.beginPath();\n ctx.moveTo(nodes[edges[steps[stepCount][1][i][0]][1]].xCord, nodes[edges[steps[stepCount][1][i][0]][1]].yCord);\n ctx.lineTo(nodes[edges[steps[stepCount][1][i][0]][2]].xCord, nodes[edges[steps[stepCount][1][i][0]][2]].yCord);\n ctx.strokeStyle = steps[stepCount][1][i][1];\n ctx.stroke();\n //three times to make up for bug in canvas that leaves some pixilation \n ctx.stroke();\n ctx.stroke();\n ctx.stroke();\n ctx.closePath();\n }\n\n for (i = 0; i < steps[stepCount][0].length; i++) {\n nodes[steps[stepCount][0][i][0]].colour = steps[stepCount][0][i][1];\n nodes[steps[stepCount][0][i][0]].value = steps[stepCount][0][i][2];\n }\n drawNodes();\n\n\n\n }\n } else if (e.keyCode === 37) {\n if (stepCount - 1 >= 0) {\n stepCount--;\n\n for (i = 0; i < steps[stepCount][1].length; i++) {\n ctx.beginPath();\n ctx.moveTo(nodes[edges[steps[stepCount][1][i][0]][1]].xCord, nodes[edges[steps[stepCount][1][i][0]][1]].yCord);\n ctx.lineTo(nodes[edges[steps[stepCount][1][i][0]][2]].xCord, nodes[edges[steps[stepCount][1][i][0]][2]].yCord);\n ctx.strokeStyle = steps[stepCount][1][i][1];\n ctx.stroke();\n //three times to make up for bug in canvas that leaves some pixilation \n ctx.stroke();\n ctx.stroke();\n ctx.stroke();\n ctx.closePath();\n }\n for (i = 0; i < steps[stepCount][0].length; i++) {\n nodes[steps[stepCount][0][i][0]].colour = steps[stepCount][0][i][1];\n nodes[steps[stepCount][0][i][0]].value = steps[stepCount][0][i][2];\n }\n drawNodes();\n\n\n\n }\n }\n //after every step change get the corresponding explination and display it to screen\n document.getElementById(\"descriptions\").innerHTML = stepsExplinations[stepCount];\n}", "function drawPaths( obj, moveTO, midPoint, lineTO, isDashed, strokeColor, lineWidth, arrowDir, middleArrowHeadReq) {\n\t\tvar headlen = 10;\t// length of head in pixels\n\t\tobj.paint= function(_director, time) {\t\n\t\t\tvar dx = lineTO.x - moveTO.x;\n\t\t\tvar dy = lineTO.y - moveTO.y;\n\t\t\tif(dx == 0 && dy == 0) return;\n\t\t\tvar angle = Math.atan2(dy,dx);\n\t\t\tvar canvas = _director.ctx;\n\t\t\tcanvas.strokeStyle = strokeColor;\n\t\t\tcanvas.fillStyle = strokeColor;\n\t\t\tcanvas.lineWidth = lineWidth;\n\t\t\tcanvas.beginPath();\n\t\t\tif(arrowDir == 'leftArrowHead') {\n\t\t\t\tcanvas.moveTo( moveTO.x, moveTO.y);\t\t\t\n\t\t\t\tcanvas.lineTo( moveTO.x + headlen * Math.cos(angle-Math.PI/8), moveTO.y + headlen*Math.sin(angle-Math.PI/8));\n\t\t\t\tcanvas.lineTo( moveTO.x + headlen * Math.cos(angle+Math.PI/8), moveTO.y + headlen*Math.sin(angle+Math.PI/8));\n\t\t\t\tcanvas.fill();\n\t\t\t} else if(arrowDir == 'rightArrowHead'){\n\t\t\t\tcanvas.moveTo( lineTO.x, lineTO.y);\n\t\t\t\tcanvas.lineTo( lineTO.x - headlen * Math.cos(angle-Math.PI/8), lineTO.y - headlen*Math.sin(angle-Math.PI/8));\n\t\t\t\tcanvas.lineTo( lineTO.x - headlen * Math.cos(angle+Math.PI/8), lineTO.y - headlen*Math.sin(angle+Math.PI/8));\n\t\t\t\tcanvas.fill();\n\t\t\t}\t\t\n\t\t\tif(middleArrowHeadReq) {\n\t\t\t\tvar dx = midPoint.x - moveTO.x;\n\t\t\t\tvar dy = midPoint.y - moveTO.y;\n\t\t\t\tvar angle = Math.atan2(dy,dx);\n\t\t\t\tcanvas.fillStyle = strokeColor;\n\t\t\t\tcanvas.moveTo( (midPoint.x - 5), midPoint.y);\n\t\t\t\tcanvas.lineTo( (midPoint.x - 5) - headlen * Math.cos(angle-Math.PI/10), midPoint.y - headlen*Math.sin(angle-Math.PI/10));\n\t\t\t\tcanvas.lineTo( (midPoint.x - 5) - headlen * Math.cos(angle+Math.PI/10), midPoint.y - headlen*Math.sin(angle+Math.PI/10));\n\t\t\t\tcanvas.fill();\n\t\t\t}\n\t\t\t\n\t\t\tcanvas.moveTo(moveTO.x, moveTO.y);\n\t\t\tcanvas.lineTo(lineTO.x, lineTO.y);\n\t\t\n\t\t\t//canvas.lineJoin = 'round';\n\t\t\t//canvas.lineCap = 'round';\n\t\t\t//canvas.closePath();\t\n\t\t\tcanvas.stroke();\t\n\t\t};\t\n\t}", "function draw_step(){\n // perform these many iterations\n for (let i = 0; i < controllers.iterations; i++) {\n // set the styling of points\n strokeWeight(controllers.pointStroke);\n // stroke(\"#EC7272\");\n stroke(255);\n // pick next points\n let next = random(points);\n // skip to match condition\n if (controllers.notPrevious && next === previous) continue;\n if (controllers.noAdjacent) {\n var indexOfPrev = points.indexOf(previous)\n if (abs(points.indexOf(next) - indexOfPrev) == 2) continue;\n }\n if (controllers.no2PreviousSame && earlier === previous){\n var indexOfPrev = points.indexOf(previous);\n var indexOfNext = points.indexOf(next);\n if (indexOfNext === mod_index(indexOfPrev-1)) continue;\n if (indexOfNext === mod_index(indexOfPrev+1)) continue;\n }\n // universal step, update current and plot it\n current.x = lerp(current.x, next.x, controllers.compressionRatio);\n current.y = lerp(current.y, next.y, controllers.compressionRatio);\n // if (points.indexOf(next)==0)\n // {\n // // current = rotation_x.mult(current.x).add(rotation_y.mult(current.y));\n // current = createVector(\n // p5.Vector.dot(createVector(0, 1), current),\n // p5.Vector.dot(createVector(-1, 0), current)\n // )\n // }\n point(current.x, current.y);\n // current is nesxt\n earlier = previous;\n previous = next;\n }\n}", "function drawPath(path, ctx) {\n var turnTable = Object.freeze({\n LEFTUP: \"LEFTUP\", RIGHTUP: \"RIGHTUP\",\n LEFTDOWN: \"LEFTDOWN\", RIGHTDOWN: \"RIGHTDOWN\",\n HORIZ: \"HORIZ\", VERT: \"VERT\"\n });\n\n function determineTurn(before, current, after) {\n // b - c - a\n if (before.position.x + 1 == current.position.x &&\n before.position.y == current.position.y &&\n current.position.x + 1 == after.position.x &&\n current.position.y == after.position.y)\n {\n return turnTable.HORIZ;\n }\n // b\n // |\n // c\n // |\n // a\n if (before.position.x == current.position.x &&\n before.position.y + 1 == current.position.y &&\n current.position.x == after.position.x &&\n current.position.y + 1 == after.position.y)\n {\n return turnTable.VERT;\n }\n // a\n // |\n // b - c\n if (before.position.x + 1 == current.position.x &&\n before.position.y == current.position.y &&\n current.position.x == after.position.x &&\n current.position.y - 1 == after.position.y)\n {\n return turnTable.LEFTUP;\n }\n // b\n // |\n // c - a\n if (before.position.x == current.position.x &&\n before.position.y + 1 == current.position.y &&\n current.position.x + 1 == after.position.x &&\n current.position.y == after.position.y)\n {\n return turnTable.RIGHTUP;\n }\n // b - c\n // |\n // a\n if (before.position.x + 1 == current.position.x &&\n before.position.y == current.position.y &&\n current.position.x == after.position.x &&\n current.position.y + 1 == after.position.y)\n {\n return turnTable.LEFTDOWN;\n }\n // c - a\n // |\n // b\n if (before.position.x == current.position.x &&\n before.position.y - 1 == current.position.y &&\n current.position.x + 1 == after.position.x &&\n current.position.y == after.position.y)\n {\n return turnTable.RIGHTDOWN;\n }\n }\n\n for (var i = 0; i < path.length; i++) {\n if (i === 0) {\n // start path sprite\n ctx.fillStyle = \"#FF0000\";\n } else if (i == path.length - 1) {\n // end path sprite\n ctx.fillStyle = \"#00FF00\";\n } else {\n var turn1 = determineTurn(path[i - 1], path[i], path[i + 1]);\n var turn2 = determineTurn(path[i + 1], path[i], path[i - 1]);\n var turn = turn1 || turn2;\n switch(turn) {\n case turnTable.HORIZ:\n ctx.fillStyle = \"#F0F000\";\n break;\n case turnTable.VERT:\n ctx.fillStyle = \"#FFFFFF\";\n break;\n case turnTable.LEFTUP:\n ctx.fillStyle = \"#0F0F00\";\n break;\n case turnTable.RIGHTUP:\n ctx.fillStyle = \"#0F00F0\";\n break;\n case turnTable.LEFTDOWN:\n ctx.fillStyle = \"#0F000F\";\n break;\n case turnTable.RIGHTDOWN:\n ctx.fillStyle = \"#0F0FF0\";\n break;\n }\n }\n var pos = camera.transformToCameraSpace(path[i].position.x, path[i].position.y);\n ctx.fillRect(pos.cam_x + 25, pos.cam_y + 25, 50, 50);\n }\n}", "function draw() {\n\n// Establishing the colors\n background( 'grey' );\n stroke('pink');\n\n//Creating the for loop to create my abstract grid design. Going from top to bottom.\nfor(var x= 0; x<800; x+= 40){\nline(x, 0, x - slant, height);\n\n}\n\n// Creating the for loop going from bottom to top.\nfor(var x= 0; x<800; x+= 40){\n line(x, 0, x + slant, height);\n}\n\n}", "function DrawPathBus() {\n\n g_context.strokeStyle = \"rgb(23, 145, 167)\";\n g_context.moveTo(g_tablePathBus1[0]-g_posxPlan, g_tablePathBus1[1]+g_posyPlan); // 1er point\n g_context.beginPath();\n g_context.lineWidth = \"5\";\n\n for (var i=2;i<g_tablePathBus1.length;i+=2)\n {\n // console.log(g_tablePathBus[i]+','+g_tablePathBus[i+1]);\n // console.log('bus='+i+','+cursorX+','+cursorY);\n g_context.lineTo(g_tablePathBus1[i]-g_posxPlan*g_scalePlan, g_tablePathBus1[i+1]-g_posyPlan*g_scalePlan); // 2e point\n }\n g_context.lineTo(parseInt(cursorX),parseInt(cursorY)); // 2e point\n g_context.stroke();\n}", "draw() {\n\n // Read in selected value(s)\n\n var curve_type = document.querySelector('#pattern-controls > div:nth-child(1) > select').value;\n this.curve = this[curve_type];\n\n this.config.iterations.value = document.querySelector('#pattern-controls > div:nth-child(2) > input').value;\n this.curve.iterations = this.config.iterations.value;\n this.config.length.value = document.querySelector('#pattern-controls > div:nth-child(3) > input').value;\n this.config.rotate.value = document.querySelector('#pattern-controls > div:nth-child(4) > input').value;\n\n // Display selected value(s)\n document.querySelector('#pattern-controls > div.pattern-control:nth-child(2) > span').innerHTML = this.config.iterations.value;\n document.querySelector('#pattern-controls > div.pattern-control:nth-child(3) > span').innerHTML = this.config.length.value + \" \" + units;\n document.querySelector('#pattern-controls > div.pattern-control:nth-child(4) > span').innerHTML = this.config.rotate.value + \"°\";\n\n let lindenmayer_string = this.curve.l_system.axiom;\n for (let i = 0; i < this.curve.iterations; i++) {\n lindenmayer_string = this.compose_lindenmayer_string(lindenmayer_string);\n }\n\n // Log Lindemayer System string\n // console.log(lindenmayer_string);\n\n // Calculate path\n let path = this.calc(lindenmayer_string, this.config.length.value);\n\n // Log Path coordinates\n // console.log(path);\n\n // Update object\n this.path = path;\n\n return path;\n }", "draw() {\n\n this.drawInteractionArea();\n\n //somewhat depreciated - we only really draw the curve interaction but this isnt hurting anyone\n if(lineInteraction)\n this.drawLine();\n else\n this.drawCurve();\n\n this.drawWatch(); \n\n }", "function step1(ctx) {\n // ground\n ctx.beginPath();\n ctx.moveTo(360, 380);\n ctx.quadraticCurveTo(200, 270, 40, 360);\n ctx.quadraticCurveTo(35, 363, 40, 366);\n ctx.quadraticCurveTo(180, 290, 360, 386);\n ctx.quadraticCurveTo(365, 383, 360, 380);\n ctx.fill();\n // grass\n ctx.beginPath();\n ctx.lineWidth = 1;\n ctx.moveTo(116, 330);\n ctx.quadraticCurveTo(110, 323, 100, 325);\n ctx.closePath();\n ctx.stroke();\n ctx.moveTo(116, 330);\n ctx.quadraticCurveTo(110, 317, 100, 320);\n ctx.quadraticCurveTo(114, 310, 115, 328);\n ctx.fill();\n ctx.moveTo(116, 330);\n ctx.quadraticCurveTo(110, 300, 105, 314);\n ctx.quadraticCurveTo(111, 290, 118, 330);\n ctx.fill();\n ctx.moveTo(122, 330);\n ctx.quadraticCurveTo(138, 312, 138, 310);\n ctx.quadraticCurveTo(130, 305, 120, 330);\n ctx.fill();\n ctx.moveTo(120, 330);\n ctx.quadraticCurveTo(130, 300, 133, 305);\n ctx.quadraticCurveTo(127, 290, 120, 330);\n ctx.fill();\n}", "function draw() {\r\n\tbackground(53, 74, 35);\r\n\tfor (let i = 0; i < maze_grid.length; i++) {\r\n\t\tmaze_grid[i].displayGrid();\r\n\t}\r\n\r\n\tlet following_unit = current_unit.findAdjcent();\r\n\r\n\tcurrent_unit.visited = true;\r\n\t// console.log(current_unit);\r\n\r\n\tif (complete == false) {\r\n\t\tcurrent_unit.mark();\r\n\t\tif (following_unit) {\r\n\t\t\t// pushes current Unit to the stack for backtracking\r\n\t\t\tmaze_stack.push(current_unit);\r\n\t\t\tclearSide(current_unit, following_unit);\r\n\r\n\t\t\t// sets the current Unit to the following Unit in iteration\r\n\t\t\tfollowing_unit.visited = true;\r\n\t\t\tcurrent_unit = following_unit;\r\n\t\t// if no adjcent cells available then will pop \"backtrack\" until one becomes avaiable\r\n\t\t} else if (maze_stack.length > 0) {\r\n\t\t\tcurrent_unit = maze_stack.pop();\r\n\t\t}\r\n\t}\r\n\r\n\tdetermineComplete(maze_stack);\r\n\r\n\t// displays final path\r\n\tif (complete_path == true) {\r\n\t\tdisplayPath(path_stack)\r\n\t}\r\n\r\n\t// starts path finding process\r\n\tif (complete == true) {\r\n\t\tpath_iteration.pathvisit = true;\r\n\t\tpath_iteration.marksolve();\r\n\r\n\t\tvar following_path = path_iteration.findAdjcentPath();\r\n\t\tif(following_path) {\r\n\t\t\t// pushes current path to the stack for backtracking\r\n\t\t \tpath_stack.push(path_iteration);\r\n\r\n\t\t \t// sets the current path to the following path in iteration\r\n\t\t \tfollowing_path.pathvisit = true;\r\n\t\t \tpath_iteration = following_path;\r\n\t\t } else if(path_stack.length > 0 ) {\r\n\t\t \tpath_iteration = path_stack.pop();\r\n\t\t \tpath_iteration.markbacktrack();\r\n\t\t }\r\n\t}\r\n}", "_drawWalkableArea() {\n if (this.scene && this.scene.walkable) {\n this.graphics.beginFill(0xFF3300, 0.0);\n this.graphics.lineStyle(1, 0xFF3300, 1.0);\n this.graphics.drawPolygon(this.scene.walkable);\n this.graphics.endFill();\n }\n }", "function drawStep(x,y,symbol){\n\n // Give new values\n width(5)\n\n // For random player\n if (symbol == \"r\" || symbol == \"R\") {\n rcheck = Math.random()\n if (rcheck>=0.5){\n symbol=\"X\"\n }\n else{\n symbol=\"O\"\n }\n }\n\n // Does this if needs to draw X\n if (symbol==\"X\" || symbol==\"x\") {\n x_coordinates.push([x,y])\n myX = -cs/2+x*(squareSize)-(squareSize)+(squareSize/5)\n myY = cs/2-(y*squareSize)+(squareSize/5)\n goto(myX,myY)\n color(\"blue\")\n right(45)\n forward((4.24*squareSize)/5)\n goto(myX+(squareSize*3/5),myY)\n left(90)\n forward((4.24*squareSize)/5)\n right(45)\n\n\n let arrToCheck = [x,y]\n for (let i = 0; i < free_coordinates.length; i++) {\n if (arraysEqual(free_coordinates[i],arrToCheck)) {\n free_coordinates.splice(i,1)\n break\n }\n }\n }\n\n // Does this if needs to draw O\n if(symbol==\"O\" || symbol==\"o\" || symbol==\"0\"){\n o_coordinates.push([x,y])\n myX = -cs/2+x*(squareSize)-(squareSize)+(squareSize/2)\n myY = cs/2-(y*squareSize)+(squareSize/2)\n radius = squareSize*3/10\n goto(myX,myY+radius)\n right(90)\n color(\"red\")\n for (let r = 0; r < 100; r++) {\n forward(squareSize/55.5)\n right(360/100)\n }\n left(90)\n\n let arrToCheck = [x,y]\n for (let i = 0; i < free_coordinates.length; i++) {\n if (arraysEqual(free_coordinates[i],arrToCheck)) {\n free_coordinates.splice(i,1)\n break\n }\n }\n }\n\n // Back default options\n goto(1000,1000)\n color(\"black\")\n width(2)\n}", "function draw(x, y, length, direction) {\n var move;\n var headlen = 5;\n var angle;\n var fromx = x;\n var fromy = y;\n var tox, toy;\n var dx, dy;\n\n if (direction == \"forward\") {\n move = y - length;\n }\n if (direction == \"backward\") {\n move = y + length;\n }\n\n if (direction == \"right\") {\n move = x + length;\n }\n if (direction == \"left\") {\n move = x - length;\n }\n ctx.beginPath();\n ctx.moveTo(x, y);\n if (direction == \"forward\" || direction == \"backward\") {\n tox = x;\n toy = move;\n\n dx = tox - fromx;\n dy = toy - fromy;\n angle = Math.atan2(dy, dx);\n\n ctx.lineTo(tox, toy);\n ctx.lineTo(\n tox - headlen * Math.cos(angle - Math.PI / 6),\n toy - headlen * Math.sin(angle - Math.PI / 6)\n );\n ctx.moveTo(tox, toy);\n ctx.lineTo(\n tox - headlen * Math.cos(angle + Math.PI / 6),\n toy - headlen * Math.sin(angle + Math.PI / 6)\n );\n\n ctx.stroke();\n //update endpoint\n this.endpoint_x = x;\n this.endpoint_y = move;\n }\n if (direction == \"right\" || direction == \"left\") {\n tox = move;\n toy = y;\n\n dx = tox - fromx;\n dy = toy - fromy;\n angle = Math.atan2(dy, dx);\n\n ctx.lineTo(tox, toy);\n ctx.lineTo(\n tox - headlen * Math.cos(angle - Math.PI / 6),\n toy - headlen * Math.sin(angle - Math.PI / 6)\n );\n ctx.moveTo(tox, toy);\n ctx.lineTo(\n tox - headlen * Math.cos(angle + Math.PI / 6),\n toy - headlen * Math.sin(angle + Math.PI / 6)\n );\n\n ctx.stroke();\n //update endpoint\n this.endpoint_x = move;\n this.endpoint_y = y;\n }\n}", "function drawPath( svg, X, Y, i, j, form, path, sX, sY ){\n\t\t//take care of the pattern part\n\t\tvar command1 = '';\n\t\tvar points1 = path.array();\n\t\tfor( var k in points1.value ){\n\t\t\tif( points1.value[k][0] == \"M\" ){\n\t\t\t\tvar text = 'M '+( ( ( points1.value[k][1] )+( sX*1 ) )+( X*i ) )+' '+( ( ( points1.value[k][2] )+( sY*1 ) )+( Y*j ) );\n\t\t\t\tvar command1 = command1.concat( text );\n\n\t\t\t}else if( points1.value[k][0] == \"C\" ){\n\t\t\t\tvar text = ' C '+( ( ( points1.value[k][1] )+( sX*1 ) )+( X*i ) )+' '+( ( ( points1.value[k][2] )+( sY*1 ) )+( Y*j ) )+' '+\n\t\t\t\t\t\t\t\t\t\t\t\t ( ( ( points1.value[k][3] )+( sX*1 ) )+( X*i ) )+' '+( ( ( points1.value[k][4] )+( sY*1 ) )+( Y*j ) )+' '+\n\t\t\t\t\t\t\t\t\t\t\t\t ( ( ( points1.value[k][5] )+( sX*1 ) )+( X*i ) )+' '+( ( ( points1.value[k][6] )+( sY*1 ) )+( Y*j ) );\n\t\t\t\tvar command1 = command1.concat( text );\n\n\t\t\t}else if( points1.value[k][0] == \"L\" ){\n\t\t\t\tvar text = ' L '+( ( ( points1.value[k][1] )+( sX*1 ) )+( X*i ) )+' '+( ( ( points1.value[k][2] )+( sY*1 ) )+( Y*j ) );\n\t\t\t\tvar command1 = command1.concat( text );\n\n\t\t\t}else if( points1.value[k][0] == \"Z\" ){\n\t\t\t\tvar element1 = svgOut.path( command1 ).stroke( { width : 0 } ).fill( \"none\" );\n\t\t\t\t//take care of the shape part that can be an ellipse form\n\t\t\t\tif( form.type == \"path\" ){\n\t\t\t\t\tvar command2 = '';\n\t\t\t\t\tvar points2 = form.array();\n\t\t\t\t\tfor( var k in points2.value ){\n\t\t\t\t\t\tif( points2.value[k][0] == \"M\" ){\n\t\t\t\t\t\t\tvar text = 'M '+( points2.value[k][1] )+' '+( points2.value[k][2] );\n\t\t\t\t\t\t\tvar command2 = command2.concat( text );\n\n\t\t\t\t\t\t}else if( points2.value[k][0] == \"C\" ){\n\t\t\t\t\t\t\tvar text = ' C '+( points2.value[k][1] )+' '+( points2.value[k][2] )+' '+\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ( points2.value[k][3] )+' '+( points2.value[k][4] )+' '+\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ( points2.value[k][5] )+' '+( points2.value[k][6] );\n\t\t\t\t\t\t\tvar command2 = command2.concat( text );\n\n\t\t\t\t\t\t}else if( points2.value[k][0] == \"L\" ){\n\t\t\t\t\t\t\tvar text = ' L '+( points2.value[k][1] )+' '+( points2.value[k][2] );\n\t\t\t\t\t\t\tvar command2 = command2.concat( text );\n\n\t\t\t\t\t\t}else if( points2.value[k][0] == \"Z\" ){\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tvar element2 = svgOut.path( command2 ).stroke( { width : 0 } ).fill( \"none\" );\n\t\t\t\t} else{\n\t\t\t\t\tvar element2 = form;\n\t\t\t\t}\n\t\t\t drawSplittedData( element1, element2 );\n\t\t\t command1='';\n\t\t\t}\n\t\t\t//if the pattern element is not closed then run the script one more time\n\t\t\tif( points1.value[points1.value.length-1][0] != \"Z\" ){\n\t\t\t\tvar element1 = svgOut.path( command1 ).stroke( { width : 0 } ).fill( \"none\" );\n\t\t\t\t//take care of the shape part that can be an ellipse form\n\t\t\t\tif( form.type == \"path\" ){\n\t\t\t\t\tvar command2 = '';\n\t\t\t\t\tvar points2 = form.array();\n\t\t\t\t\tfor( var k in points2.value ){\n\t\t\t\t\t\tif( points2.value[k][0] == \"M\" ){\n\t\t\t\t\t\t\tvar text = 'M '+( points2.value[k][1] )+' '+( points2.value[k][2] );\n\t\t\t\t\t\t\tvar command2 = command2.concat( text );\n\n\t\t\t\t\t\t}else if( points2.value[k][0] == \"C\" ){\n\t\t\t\t\t\t\tvar text = ' C '+( points2.value[k][1] )+' '+( points2.value[k][2] )+' '+\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ( points2.value[k][3] )+' '+( points2.value[k][4] )+' '+\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ( points2.value[k][5] )+' '+( points2.value[k][6] );\n\t\t\t\t\t\t\tvar command2 = command2.concat( text );\n\n\t\t\t\t\t\t}else if( points2.value[k][0] == \"L\" ){\n\t\t\t\t\t\t\tvar text = ' L '+( points2.value[k][1] )+' '+( points2.value[k][2] );\n\t\t\t\t\t\t\tvar command2 = command2.concat( text );\n\n\t\t\t\t\t\t}else if( points2.value[k][0] == \"Z\" ){\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tvar element2 = svgOut.path( command2 ).stroke( { width : 0 } ).fill( \"none\" );\n\t\t\t\t} else {\n\t\t\t\t\tvar element2 = form;\n\t\t\t\t}\n\t\t\t drawSplittedData( element1, element2 );\n\t\t\t}\n\t\t}\n\t\t\n\t}", "draw() {\n // drawing curbs first\n const shades = ['#9ca297', '#b1bab0'];\n for (let i = 0; i < 2; i++) {\n ctx.fillStyle = shades[i];\n // curbs just big rects mildly translated so some shading\n if (i) {\n ctx.translate(0, 3.3);\n }\n ctx.fillRect(0, this.y - (this.linH / 3) * 1.5, init.w, inProptn(1, 7) + (this.linH / 3) * (3 - i * 1.5));\n }\n ctx.translate(0, -3.3);\n\n // road itself\n ctx.fillStyle = 'black';\n ctx.fillRect(0, this.y, init.w, inProptn(1, 7));\n\n this.markings();\n }", "draw(){\n this.ctx.strokeStyle = this.getStrokeColor();\n this.ctx.lineWidth = 2;\n this.ctx.beginPath()\n this.ctx.moveTo(this.prevx, this.prevy);\n this.ctx.lineTo(this.x, this.y)\n this.ctx.stroke()\n this.ctx.fill();\n }", "drawCurrentState(){\n reset();\n drawPolygonLines(this.hull, \"red\"); \n drawLine(this.currentVertex, this.nextVertex, \"green\");\n drawLine(this.currentVertex,this.points[this.index]);\n for(let i=0;i<this.points.length;i++){\n this.points[i].draw();\n }\n\n for(let i=0;i<this.hull.length;i++){\n this.hull[i].draw(5,\"red\");\n }\n }", "function drawStep(currStep) {\n var x = document.getElementById(\"canvas\");\n var draw = x.getContext(\"2d\");\n draw.beginPath();\n draw.font = \"20px Georgia\";\n draw.fillStyle = 'black';\n draw.fillText(\"Step: \" + currStep, 600, 80);\n draw.closePath();\n}", "function Navigate() {\n source_vector_draw_rdc.clear();\n source_vector_draw_etage.clear();\n drawPinStart();\n\n var porte_start = porteStartLocalisation;\n var porte_end = document.getElementById(\"endNavigation\").value;\n\n var collection_route = Route(porte_start, porte_end);\n collection_route.forEach(triple => { //start, end, layer\n Drawline(triple[0], triple[1], triple[2]);\n });\n}", "draw(){\n var canvas = document.getElementById(\"2d-plane\");\n var context = canvas.getContext(\"2d\");\n context.beginPath();\n context.strokeStyle=\"white\";\n context.rect(this.boundary.x-this.boundary.w,this.boundary.y-this.boundary.h,this.boundary.w*2,this.boundary.h*2); \n context.stroke();\n //Draw recursive the children\n if(this.isDivided){\n this.northeast.draw();\n this.northwest.draw();\n this.southeast.draw();\n this.southwest.draw();\n }\n //Draw Points in Boarder\n for(let i=0;i<this.points.length;i++){\n context.beginPath();\n context.fillStyle=\"red\";\n context.arc(this.points[i].x, this.points[i].y, 2, 0, 2*Math.PI);\n context.fill();\n }\n}", "function drawPath() {\n\tif(path.length===0) { return; }\n\tif(Quality>=2 && !isColorblind()) {\n\t\tconst rad = pathW * .6;\n\t\t\n\t\tconst rOpt = ['9','A','A','B','C'];\n\t\tconst gOpt = ['9','8','7'];\n\t\tconst bOpt = ['4','5'];\n\t\t\n\t\tconst first = (totalPaths%2)+1;\n\t\tfor(let i=first;i<path.length;i+=2) {\n\t\t\tconst j = i+totalPaths;\n\t\t\tconst r = rOpt[j%rOpt.length];\n\t\t\tconst g = gOpt[j%gOpt.length];\n\t\t\tconst b = bOpt[j%bOpt.length];\n\t\t\t\n\t\t\tmctx.fillStyle=`#${r}${g}${b}7`;\n\t\t\tmctx.beginPath();\n\t\t\tmctx.ellipse(path[i].x, path[i].y, pathW, rad, 0, 0, Math.PI*2)\n\t\t\tmctx.fill();\n\t\t}\n\t}\n\t\n\tmctx.lineWidth = pathW;\n\tmctx.strokeStyle =\"#B85\";\n\n\t// if(isColorblind()) {\n\t\t// mctx.strokeStyle = GetColorblindColor();\n\t// }\n\t\n\tconst pCount = 4;\n\tfor(let i=0;i<pCount;i++){\n\t\tmctx.beginPath();\n\t\tmctx.moveTo(path[0].x, path[0].y);\n\t\tfor(let j=i;j<path.length;j+=pCount){\n\t\t\tmctx.lineTo(path[j].x, path[j].y);\n\t\t}\n\t\tmctx.stroke();\n\t}\n}", "function draw()\n{\n\tcontext.moveTo(x,y);\n\tif(direction == 0)\n\t{\n\t\ty = y - speed;\n\t}\n\telse if(direction == 1)\n\t{\n\t\tx = x + speed;\n\t}\n\telse if(direction == 2)\n\t{\n\t\ty = y + speed;\n\t}\n\telse //direction == 3\n\t{\n\t\tx = x - speed;\n\t}\n\tcontext.lineTo(x, y);\n\tcontext.stroke();\n}", "function drawCurve(fn, steps) {\n noFill();\n stroke(0, 150);\n beginShape();\n for(var i = 0; i <= steps; i++) {\n // normalize i to the range (0, 1)\n var t = norm(i, 0, steps);\n // compute function\n var pt = fn(t);\n vertex(pt.x, pt.y);\n }\n endShape();\n}", "function drawPath() {\n canvasContext.setLineDash([5, 3])\n canvasContext.lineWidth = 2;\n canvasContext.strokeStyle = 'orange';\n canvasContext.beginPath();\n canvasContext.moveTo(\n bowLocation[0] + imgBow.width / 2,\n bowLocation[1] + imgBow.height / 2);\n canvasContext.lineTo(\n targetLocation[0] + imgTarget.width / 2,\n targetLocation[1] + imgTarget.height / 2);\n canvasContext.stroke();\n}", "canvasDraw() {\n let prev = this.p0;\n for (const point of this.points) {\n Point.drawLine(prev, point, false, this.isSelected, this.color);\n prev = point;\n }\n Point.drawLine(prev, this.p3);\n Point.drawLine(this.p0, this.p1, true);\n Point.drawLine(this.p2, this.p3, true);\n this.p0.draw();\n this.p1.draw();\n this.p2.draw();\n this.p3.draw();\n }", "function drawGoal (){\n goal.draw()\n\n if (goal.dir === 1 && goal.x > W - goal.w) {\n goal.dir = -1;\n }\n if (goal.dir === -1 && goal.x < 0) {\n goal.dir = 1;\n }\n\n goal.x += goal.dir;\n \n\n }", "draw(){\n var canvas = document.getElementById(\"myCanvas\");\n var ctx = canvas.getContext(\"2d\");\n\n\n var cur = this.lines[0];\n var next = this.lines[1];\n var wire = this.find_second_wire_connect(cur, next);\n\n ctx.beginPath();\n ctx.moveTo(wire.startx, wire.starty);\n ctx.lineTo(wire.endx, wire.endy);\n ctx.stroke();\n\n for(var i = 1; i < this.lines.length-1; i++){\n // ctx.beginPath();\n // ctx.rect(this.lines[i].posx*cell_size[0], this.lines[i].posy*cell_size[1], cell_size[0], cell_size[1]);\n // ctx.stroke();\n\n var prev = this.lines[i-1];\n var cur = this.lines[i];\n var next = this.lines[i+1];\n var wire = this.find_first_wire_connect(prev, cur);\n\n ctx.beginPath();\n ctx.moveTo(wire.startx, wire.starty);\n ctx.lineTo(wire.endx, wire.endy);\n ctx.stroke();\n\n wire = this.find_second_wire_connect(cur, next);\n\n ctx.beginPath();\n ctx.moveTo(wire.startx, wire.starty);\n ctx.lineTo(wire.endx, wire.endy);\n ctx.stroke();\n\n if(cur.elem == \"vertical_resistor\"){\n\n var startx = cur.posx*cell_size[0]+cell_size[0]/4;\n var starty = cur.posy*cell_size[1]+cell_size[1]/8;\n var sizex = cell_size[0]*2/4;\n var sizey = cell_size[1]*6/8;\n\n ctx.strokeStyle = \"#000000\";\n ctx.fillStyle = \"#FFFFFF\";\n ctx.fillRect(startx, starty, sizex, sizey);\n ctx.strokeRect(startx, starty, sizex, sizey);\n // ctx.stroke();\n }\n if(cur.elem == \"horizonzal_resistor\"){\n\n var startx = cur.posx*cell_size[0]+cell_size[0]/8;\n var starty = cur.posy*cell_size[1]+cell_size[1]/4;\n var sizex = cell_size[0]*6/8;\n var sizey = cell_size[1]*2/4;\n\n ctx.strokeStyle = \"#000000\";\n ctx.fillStyle = \"#FFFFFF\";\n ctx.fillRect(startx, starty, sizex, sizey);\n ctx.strokeRect(startx, starty, sizex, sizey);\n // ctx.stroke();\n }\n if(cur.elem == \"vertical_capacitor\"){\n\n var startx = cur.posx*cell_size[0]+cell_size[0]/8;\n var starty = cur.posy*cell_size[1]+cell_size[1]/4;\n var sizex = cell_size[0]*6/8;\n var sizey = cell_size[1]*2/4;\n\n ctx.strokeStyle = \"#000000\";\n ctx.fillStyle = \"#FFFFFF\";\n ctx.strokeRect(startx, starty, sizex, sizey);\n ctx.fillRect(startx-1, starty, sizex+2, sizey);\n // ctx.stroke();\n }\n if(cur.elem == \"horizontal_capacitor\"){\n\n var startx = cur.posx*cell_size[0]+cell_size[0]/4;\n var starty = cur.posy*cell_size[1]+cell_size[1]/8;\n var sizex = cell_size[0]*2/4;\n var sizey = cell_size[1]*6/8;\n\n ctx.strokeStyle = \"#000000\";\n ctx.fillStyle = \"#FFFFFF\";\n ctx.strokeRect(startx, starty, sizex, sizey);\n ctx.fillRect(startx, starty-1, sizex, sizey+2);\n // ctx.stroke();\n }\n if(cur.elem == \"right_diode\"){\n\n var startx = cur.posx*cell_size[0]+cell_size[0]*1/8;\n var starty = cur.posy*cell_size[1]+cell_size[1]*1/8;\n var sizex = cell_size[0]*5/8;\n var sizey = cell_size[1]*5/8;\n\n ctx.strokeStyle = \"#000000\";\n ctx.fillStyle = \"#FFFFFF\";\n ctx.fillRect(startx, starty, sizex, sizey);\n\n ctx.beginPath();\n ctx.moveTo(cur.posx*cell_size[0]+cell_size[0]/8, cur.posy*cell_size[1]+cell_size[1]/8);\n ctx.lineTo(cur.posx*cell_size[0]+cell_size[0]/8, cur.posy*cell_size[1]+cell_size[1]*7/8);\n ctx.lineTo(cur.posx*cell_size[0]+cell_size[0]*6/8, cur.posy*cell_size[1]+cell_size[1]*4/8);\n ctx.lineTo(cur.posx*cell_size[0]+cell_size[0]/8, cur.posy*cell_size[1]+cell_size[1]/8);\n ctx.moveTo(cur.posx*cell_size[0]+cell_size[0]*6/8, cur.posy*cell_size[1]+cell_size[1]*1/8);\n ctx.lineTo(cur.posx*cell_size[0]+cell_size[0]*6/8, cur.posy*cell_size[1]+cell_size[1]*7/8);\n ctx.stroke();\n }\n if(cur.elem == \"left_diode\"){\n var startx = cur.posx*cell_size[0]+cell_size[0]*2/8;\n var starty = cur.posy*cell_size[1]+cell_size[1]*2/8;\n var sizex = cell_size[0]*5/8;\n var sizey = cell_size[1]*5/8;\n\n ctx.strokeStyle = \"#000000\";\n ctx.fillStyle = \"#FFFFFF\";\n ctx.fillRect(startx, starty, sizex, sizey);\n\n ctx.beginPath();\n ctx.moveTo(cur.posx*cell_size[0]+cell_size[0]*7/8, cur.posy*cell_size[1]+cell_size[1]/8);\n ctx.lineTo(cur.posx*cell_size[0]+cell_size[0]*7/8, cur.posy*cell_size[1]+cell_size[1]*7/8);\n ctx.lineTo(cur.posx*cell_size[0]+cell_size[0]*2/8, cur.posy*cell_size[1]+cell_size[1]*4/8);\n ctx.lineTo(cur.posx*cell_size[0]+cell_size[0]*7/8, cur.posy*cell_size[1]+cell_size[1]/8);\n ctx.moveTo(cur.posx*cell_size[0]+cell_size[0]*2/8, cur.posy*cell_size[1]+cell_size[1]*1/8);\n ctx.lineTo(cur.posx*cell_size[0]+cell_size[0]*2/8, cur.posy*cell_size[1]+cell_size[1]*7/8);\n ctx.stroke();\n }\n if(cur.elem == \"down_diode\" ){\n var startx = cur.posx*cell_size[0]+cell_size[0]/8;\n var starty = cur.posy*cell_size[1]+cell_size[1]/8;\n var sizex = cell_size[0]*5/8;\n var sizey = cell_size[1]*5/8;\n\n ctx.strokeStyle = \"#000000\";\n ctx.fillStyle = \"#FFFFFF\";\n ctx.fillRect(startx, starty, sizex, sizey);\n\n ctx.beginPath();\n ctx.moveTo(cur.posx*cell_size[0]+cell_size[0]/8, cur.posy*cell_size[1]+cell_size[1]/8);\n ctx.lineTo(cur.posx*cell_size[0]+cell_size[0]*7/8, cur.posy*cell_size[1]+cell_size[1]/8);\n ctx.lineTo(cur.posx*cell_size[0]+cell_size[0]*4/8, cur.posy*cell_size[1]+cell_size[1]*6/8);\n ctx.lineTo(cur.posx*cell_size[0]+cell_size[0]/8, cur.posy*cell_size[1]+cell_size[1]/8);\n ctx.moveTo(cur.posx*cell_size[0]+cell_size[0]*1/8, cur.posy*cell_size[1]+cell_size[1]*6/8);\n ctx.lineTo(cur.posx*cell_size[0]+cell_size[0]*7/8, cur.posy*cell_size[1]+cell_size[1]*6/8);\n ctx.stroke();\n }\n if(cur.elem == \"up_diode\"){\n var startx = cur.posx*cell_size[0]+cell_size[0]*2/8;\n var starty = cur.posy*cell_size[1]+cell_size[1]*2/8;\n var sizex = cell_size[0]*5/8;\n var sizey = cell_size[1]*5/8;\n\n ctx.strokeStyle = \"#000000\";\n ctx.fillStyle = \"#FFFFFF\";\n ctx.fillRect(startx, starty, sizex, sizey);\n\n ctx.beginPath();\n ctx.moveTo(cur.posx*cell_size[0]+cell_size[0]/8, cur.posy*cell_size[1]+cell_size[1]*7/8);\n ctx.lineTo(cur.posx*cell_size[0]+cell_size[0]*7/8, cur.posy*cell_size[1]+cell_size[1]*7/8);\n ctx.lineTo(cur.posx*cell_size[0]+cell_size[0]*4/8, cur.posy*cell_size[1]+cell_size[1]*2/8);\n ctx.lineTo(cur.posx*cell_size[0]+cell_size[0]/8, cur.posy*cell_size[1]+cell_size[1]*7/8);\n ctx.moveTo(cur.posx*cell_size[0]+cell_size[0]*1/8, cur.posy*cell_size[1]+cell_size[1]*2/8);\n ctx.lineTo(cur.posx*cell_size[0]+cell_size[0]*7/8, cur.posy*cell_size[1]+cell_size[1]*2/8);\n ctx.stroke();\n }\n\n }\n\n var prev = this.lines[this.lines.length-2];\n var cur = this.lines[this.lines.length-1];\n var wire = this.find_first_wire_connect(prev, cur);\n\n ctx.beginPath();\n ctx.moveTo(wire.startx, wire.starty);\n ctx.lineTo(wire.endx, wire.endy);\n ctx.stroke();\n }", "function drawPath() {\n //path 1\n ctx.beginPath();\n ctx.rect(0, 80, 650, 50);\n ctx.fillStyle = \"gray\";\n ctx.fill();\n ctx.closePath();\n\n ctx.beginPath();\n ctx.rect(0, 77, 700, 3);\n ctx.fillStyle = \"black\";\n ctx.fill();\n ctx.closePath();\n\n ctx.beginPath();\n ctx.rect(0, 130, 650, 3);\n ctx.fillStyle = \"black\";\n ctx.fill();\n ctx.closePath();\n\n //path 2\n ctx.beginPath();\n ctx.rect(650, 80, 50, 120);\n ctx.fillStyle = \"gray\";\n ctx.fill();\n ctx.closePath();\n\n ctx.beginPath();\n ctx.rect(647, 130, 3, 70);\n ctx.fillStyle = \"black\";\n ctx.fill();\n ctx.closePath();\n\n ctx.beginPath();\n ctx.rect(700, 77, 3, 174);\n ctx.fillStyle = \"black\";\n ctx.fill();\n ctx.closePath();\n //path 3\n ctx.beginPath();\n ctx.rect(100, 200, 600, 50);\n ctx.fillStyle = \"gray\";\n ctx.fill();\n ctx.closePath();\n\n ctx.beginPath();\n ctx.rect(100, 197, 550, 3);\n ctx.fillStyle = \"black\";\n ctx.fill();\n ctx.closePath();\n\n ctx.beginPath();\n ctx.rect(150, 250, 553, 3);\n ctx.fillStyle = \"black\";\n ctx.fill();\n ctx.closePath();\n\n //path 4\n ctx.beginPath();\n ctx.rect(100, 200, 50, 200);\n ctx.fillStyle = \"gray\";\n ctx.fill();\n ctx.closePath();\n\n ctx.beginPath();\n ctx.rect(97, 197, 3, 255);\n ctx.fillStyle = \"black\";\n ctx.fill();\n ctx.closePath();\n\n ctx.beginPath();\n ctx.rect(150, 250, 3, 150);\n ctx.fillStyle = \"black\";\n ctx.fill();\n ctx.closePath();\n\n //path 5\n ctx.beginPath();\n ctx.rect(100, 400, 600, 50);\n ctx.fillStyle = \"gray\";\n ctx.fill();\n ctx.closePath();\n\n ctx.beginPath();\n ctx.rect(97, 450, 553, 3);\n ctx.fillStyle = \"black\";\n ctx.fill();\n ctx.closePath();\n\n ctx.beginPath();\n ctx.rect(150, 398, 550, 3);\n ctx.fillStyle = \"black\";\n ctx.fill();\n ctx.closePath();\n\n //path 6\n ctx.beginPath();\n ctx.rect(650, 450, 50, 160);\n ctx.fillStyle = \"gray\";\n ctx.fill();\n ctx.closePath();\n\n ctx.beginPath();\n ctx.rect(647, 450, 3, 160);\n ctx.fillStyle = \"black\";\n ctx.fill();\n ctx.closePath();\n\n ctx.beginPath();\n ctx.rect(700, 398, 3, 220);\n ctx.fillStyle = \"black\";\n ctx.fill();\n ctx.closePath();\n\n}", "function paint_graph(arr) {\r\n ctx.lineWidth = 1;\r\n\r\n if (markarea == true) {\r\n markDraw();\r\n } else if (moveit == true) {\r\n moveDraw();\r\n } else if (reshape == true) {\r\n boundariesDraw();\r\n } else if (doreshape == true) {\r\n reshapeDraw();\r\n }\r\n\r\n graphDraw();\r\n}", "drawShape(graphics) {\n let xOld = 0\n let yOld = 0\n let start = true\n for (let i = 0; i < this.nLines; i++) {\n const nPoint = this.nLine[i]\n // Check for start of a new line segment\n if (nPoint === -1)\n start = true\n else {\n // Draw a line to the next point\n const xNew = this.xPoints[nPoint]\n const yNew = this.yPoints[nPoint]\n if (start === false)\n graphics.drawLine(xOld, yOld, xNew, yNew)\n // good for debugging\n // graphics.drawString(\"L\" + i, xOld, yOld)\n xOld = xNew\n yOld = yNew\n start = false\n }\n }\n }", "function drawFractal(event){\r\n var primtive = inputPrimitive.value,\r\n i = iterations.value,\r\n r = ratio.value;\r\n\r\n c.strokeStyle = strokeStyleSelect.value;\r\n c.lineWidth = Math.ceil(Math.random()*4);\r\n c.lineWidth = document.getElementById(\"fill\").elements.item(1).value;\r\n\r\n if(primtive == \"line\"){\r\n clear();\r\n if(r == 1)\r\n {\r\n lineFractal(c, 0, 200, 300, 400, r);\r\n }else{\r\n lineFractal(c, i, 200, 300, 400, r);\r\n }\r\n }\r\n if(primtive == \"polyline\"){\r\n clear();\r\n var x_p = 280, y_p = 150, len_edg = 200,\r\n xd = yd = Math.pow((200*200 - 100*100),0.5);\r\n c.save();\r\n if(r == 1)\r\n {\r\n polylineFractal(c,0,x_p, y_p, len_edg, r, 120);\r\n polylineFractal(c,0,x_p-100, y_p+yd, len_edg, r, 30);\r\n polylineFractal(c,0,x_p-100+xd, y_p+yd+100, len_edg, r, -60);\r\n polylineFractal(c,0,x_p-100+xd+100, y_p+yd+100-yd, len_edg, r, 0);\r\n polylineFractal(c,0,x_p-100+xd+100+200, y_p+yd+100-yd, len_edg, r, 150); \r\n }else{\r\n polylineFractal(c,i,x_p, y_p, len_edg, r, 120);\r\n polylineFractal(c,i,x_p-100, y_p+yd, len_edg, r, 30);\r\n polylineFractal(c,i,x_p-100+xd, y_p+yd+100, len_edg, r, -60);\r\n polylineFractal(c,i,x_p-100+xd+100, y_p+yd+100-yd, len_edg, r, 0);\r\n polylineFractal(c,i,x_p-100+xd+100+200, y_p+yd+100-yd, len_edg, r, 150);\r\n }\r\n c.restore(); \r\n }\r\n if(primtive == \"polygon\"){\r\n clear();\r\n var x_p = 280, y_p = 150, len_edg = 200,\r\n xd = yd = Math.pow((200*200 - 100*100),0.5);\r\n c.save();\r\n if(r == 1)\r\n {\r\n polylineFractal(c,0,x_p, y_p, len_edg, r, 120);\r\n polylineFractal(c,0,x_p-100, y_p+yd, len_edg, r, 30);\r\n polylineFractal(c,0,x_p-100+xd, y_p+yd+100, len_edg, r, -60);\r\n polylineFractal(c,0,x_p-100+xd+100, y_p+yd+100-yd, len_edg, r, 0);\r\n polylineFractal(c,0,x_p-100+xd+100+200, y_p+yd+100-yd, len_edg, r, 150);\r\n len_edg = Math.pow((2*(200*200)),0.5);\r\n polylineFractal(c,0,x_p,y_p,len_edg,r, 45); \r\n }else{\r\n polylineFractal(c,i,x_p, y_p, len_edg, r, 120);\r\n polylineFractal(c,i,x_p-100, y_p+yd, len_edg, r, 30);\r\n polylineFractal(c,i,x_p-100+xd, y_p+yd+100, len_edg, r, -60);\r\n polylineFractal(c,i,x_p-100+xd+100, y_p+yd+100-yd, len_edg, r, 0);\r\n polylineFractal(c,i,x_p-100+xd+100+200, y_p+yd+100-yd, len_edg, r, 150);\r\n len_edg = Math.pow((2*(200*200)),0.5);\r\n polylineFractal(c,i,x_p,y_p,len_edg,r, 45);\r\n }\r\n c.restore(); \r\n }\r\n if(primtive == \"circle\"){\r\n clear();\r\n if(i == 2 && r == 2)\r\n {\r\n r = 4;\r\n i = 1;\r\n }\r\n circleFractal(c, i, 400, 300, 200, r); \r\n }\r\n if(primtive == \"ellipse\"){\r\n clear();\r\n ellipseFractal(c, 0, 400, 300, 250, 175, 1);\r\n }\r\n if(primtive == \"rectangle\"){\r\n clear();\r\n var x_p = 200, y_p = 200, width = 350, height = 200;\r\n c.save();\r\n if(r == 1)\r\n {\r\n polylineFractal(c,0,x_p, y_p, height, r, 90);\r\n polylineFractal(c,0,x_p, y_p+height, width, r, 0);\r\n polylineFractal(c,0,x_p+width, y_p+height, height, r, -90);\r\n polylineFractal(c,0,x_p+width, y_p, width, r, -180);\r\n }else{\r\n polylineFractal(c,i,x_p, y_p, height, r, 90);\r\n polylineFractal(c,i,x_p, y_p+height, width, r, 0);\r\n polylineFractal(c,i,x_p+width, y_p+height, height, r, -90);\r\n polylineFractal(c,i,x_p+width, y_p, width, r, -180);\r\n }\r\n c.restore(); \r\n }\r\n c.stroke();\r\n}", "render() {\n stroke(this.layerColor)\n noFill()\n strokeWeight(this.weight)\n\n push()\n translate(width / 2, height / 2)\n for (let i = 1; i < this.numSteps + 1; i++) {\n ellipse(0, 0, this.centerOffset + (i * this.singleStep), this.centerOffset + (i * this.singleStep))\n }\n\n pop()\n }", "function draw() {\n let w = width / 3;\n let h = height / 3;\n\n // Toutes les prochains traits auront une épaisseur de 4\n strokeWeight(4);\n line(w, 0, w, height);\n line(w * 2, 0, w * 2, height);\n line(0, h, width, h);\n line(0, h * 2, width, h * 2);\n\n}", "function startDrawingPath() {\n length = 0;\n orig.style.stroke = \"#ffffff\";\n timer = setInterval(increaseLength, 1000 / drawFPS);\n}", "function drawDemo(t,duration) {\n push();\n translate(3*width/4,height/2);\n strokeWeight(1);\n let p = t/(duration);\n let g = (1-p)*100;\n stroke(40);\n // the first point of generation n and n-1\n let v1 = points3[0].copy();\n circle(v1.x,cy(v1.y),2)\n let v2 = points4[0].copy();\n circle(v2.x,cy(v2.y),2)\n line(v1.x,cy(v1.y),v2.x,cy(v2.y)); // line gen n to gen n-1 for the first point\n drawarrow(v1,v2);\n // the first point of the moving line\n v1.mult(p).add(v2.mult(1-p));\n stroke(255);\n circle(v1.x,cy(v1.y),2) // first point of the moving line\n for (let i=1;i<points3.length;i++) {\n // the 2 generations\n stroke(40)\n let v11 = points3[i-1]; \n let v12 = points3[i];\n line(v11.x,cy(v11.y),v12.x,cy(v12.y)) // line generation n-1\n circle(v12.x,cy(v12.y),2)\n let v21 = points4[i-1]\n let v22 = points4[i]\n line(v21.x,cy(v21.y),v22.x,cy(v22.y)) // line generation n\n circle(v22.x,cy(v22.y),2)\n line(v12.x,cy(v12.y),v22.x,cy(v22.y)); // line gen n to gen n-1\n drawarrow(v12,v22);\n // the line in between\n v1 = p5.Vector.add(v11.copy().mult(p),v21.copy().mult(1-p));\n v2 = p5.Vector.add(v12.copy().mult(p),v22.copy().mult(1-p));\n stroke(255);\n line(v1.x,cy(v1.y),v2.x,cy(v2.y)); // the moving line\n circle(v2.x,cy(v2.y),2)\n }\n pop();\n}", "function drawRoute() {\n\t\t$.each(routes, function(i,route) {\n\t\t\tvar p = svg.selectAll(\"path.route\")\n\t\t .data(routes[route.tag][\"path\"])\n\t\t .enter()\n\t\t .append(\"path\")\n\t\t .attr(\"d\", function(m) { return lines(m.point); })\n\t\t .attr(\"class\", \"path_\" + route.tag)\n\t\t .attr(\"stroke\", \"#\" + routes[route.tag][\"color\"])\n\t\t .attr(\"stroke-width\", 1.5)\n\t\t .attr(\"fill\", \"none\")\n\t\t .attr(\"visibility\", \"hidden\");\n\t\t});\n\t}", "paint() {\r\n graphics.fillStyle = \"#ff1a1a\";\r\n graphics.beginPath();\r\n graphics.moveTo(this.x, this.y + this.h / 2);\r\n graphics.lineTo(this.x + this.w / 2, this.y - this.h / 2);\r\n graphics.lineTo(this.x - this.w / 2, this.y - this.h / 2);\r\n graphics.closePath();\r\n graphics.fill();\r\n }", "function draw(e) {\n if (!isDrawing) return;\n ctx.beginPath(); //start line path\n ctx.moveTo(X, Y);\n ctx.lineTo(e.offsetX, e.offsetY);\n ctx.stroke();\n [X, Y] = [e.offsetX, e.offsetY]; //define coords\n }", "function OnSceneGUI() {\n var waypoints = path.editor_waypoints.Where(function(obj) obj != null).ToArray();\n\n if(waypoints.length > 0) {\n drawDisc(waypoints[:1], Color(0, 1, 0, 0.3));\n }\n\n if(waypoints.length > 1) {\n drawDisc(waypoints[-1:], Color(1, 0, 0, 0.3));\n }\n\n if(waypoints.length > 2) {\n drawDisc(waypoints[1:-1], Color(0, 0, 1, 0.3));\n }\n\n for(var w in waypoints) {\n if(path.editor_showHandles) {\n w.transform.position = Handles.PositionHandle(w.transform.position, Quaternion.identity);\n } else {\n w.transform.position = Handles.FreeMoveHandle(\n w.transform.position,\n Quaternion.identity,\n 1.5,\n Vector3(0,0,0),\n Handles.DrawRectangle\n );\n }\n\n if(GUI.changed) {\n EditorUtility.SetDirty(w);\n Repaint();\n OnInspectorGUI();\n }\n }\n\n Handles.color = Color(1,0,1,1);\n Handles.DrawPolyLine(waypoints.Select(function(w) w.transform.position).ToArray());\n\n }", "function drawPath(path){\n\t\t//If we already \n\t\tif(path){\n\t\t\tfor(var p = 0; p < path.length; p++){\n\t\t\t\t//console.log(board.tiles[path[p].x][path[p].y].element.classList);\n\t\t\t\tGAME.board.tiles[path[p].x][path[p].y].element.classList.add('path');\n\t\t\t\tcurrentPath.push(GAME.board.tiles[path[p].x][path[p].y].element);\n\t\t\t}\n\t\t}\n\t}", "function pathGatherer(){\n var indicator = Grid[EndPoint[0]][EndPoint[1]].VisitedAt\n var currentPoint = [EndPoint[0],EndPoint[1]]\n var path = []\n\n while( indicator != 0){\n console.log(indicator)\n console.log(\"Current: \" + currentPoint[0] + \"-\" + currentPoint[1])\n if(currentPoint[0]!=EndPoint[0] | currentPoint[1]!=EndPoint[1]){\n console.log(currentPoint,\"not equal to\",EndPoint)\n document.getElementById(Grid[currentPoint[0]][currentPoint[1]].id).innerHTML=\"<div id='path\"+currentPoint[0]+\"x\"+currentPoint[1]+\"' class='path'></div>\";\n document.getElementById(\"path\"+currentPoint[0]+\"x\"+currentPoint[1]).style.animationDelay=indicator/15+\"s\"\n }\n \n Grid[currentPoint[0]][currentPoint[1]].State = \"Path\"\n //update, find the \n indicator -= 1\n //-x NORTH\n if(currentPoint[0] > 0){\n if(Grid[currentPoint[0]-1][currentPoint[1]].VisitedAt == indicator){\n path.push([currentPoint[0],currentPoint[1],\"NORTH\"])\n currentPoint[0] -= 1\n continue\n }\n \n }\n //+x SOUTH\n if(currentPoint[0] < GRID_ROW_SIZE-1){\n if(Grid[currentPoint[0]+1][currentPoint[1]].VisitedAt == indicator){\n path.push([currentPoint[0],currentPoint[1],\"SOUTH\"])\n currentPoint[0] += 1\n continue\n }\n \n }\n //-y WEST\n if(currentPoint[1] > 0){\n if(Grid[currentPoint[0]][currentPoint[1]-1].VisitedAt == indicator){\n path.push([currentPoint[0],currentPoint[1],\"WEST\"])\n currentPoint[1] -= 1\n continue\n }\n \n }\n //+y EAST\n if(currentPoint[1] < GRID_COL_SIZE-1){\n if(Grid[currentPoint[0]][currentPoint[1]+1].VisitedAt == indicator){\n path.push([currentPoint[0],currentPoint[1],\"EAST\"])\n currentPoint[1] += 1\n continue\n }\n \n }\n\n }\n //!! the path is the REVERSE PATH from the END to the START \n Grid[EndPoint[0]][EndPoint[1]].State = \"End\"\n console.log(path)\n consoleGridPrinter()\n}", "function drawForward(drawingState, params) {\n \n // destructure of x y\n let {x, y} = drawingState.state.position;\n // \n // geometry\n let d = drawingState.state.direction;\n let newX = x + params.length * p5.cos(d);\n let newY = y + params.length * p5.sin(d);\n //\n p5.push();\n p5.strokeWeight(drawingState.state.strokeWeight || 1);\n p5.line(x, y, newX, newY);\n p5.pop();\n // update\n drawingState.state.position.x = newX;\n drawingState.state.position.y = newY;\n }", "display(){\n noStroke();\n fill(this.color);\n this.shape(this.x, this.y, this.size, this.size);\n for(var i=0; i<this.history.length; i++){\n var pos = this.history[i];\n this.shape(pos.x, pos.y, 8, 8);\n }\n }", "drawLine(){\n for (var index in this.draw){\n this.draw[index] = this.fracToPixel(this.draw[index])\n }\n canvas.beginPath();\n canvas.moveTo(this.draw[\"rightX\"],this.draw[\"rightY\"]);\n canvas.lineTo(this.draw[\"leftX\"],this.draw[\"leftY\"]);\n canvas.stroke();\n }", "function reDraw() {\n svg.selectAll('.land')\n .attr('d',path)\n svg.selectAll('.flow')\n .attr('d',path) \n svg.selectAll('.points')\n .attr('transform', function(d) {return 'translate(' + projection(d.coordinates) + ')';})\n svg.selectAll('.graticule')\n .attr('d',path)\n}", "function draw(){\n\t\t// Needed to comply with Tool Delegate design pattern\n\t}", "function newPath (w) {\n ctx.beginPath(); // Neuer Pfad\n ctx.strokeStyle = \"#000000\"; // Linienfarbe schwarz\n ctx.lineWidth = (w ? w : 1); // Liniendicke\n }", "function StartDrawingPath(sendr) {\n try {\n if (sendr.id.toLowerCase().indexOf(\"waterway\") > -1) StartDrawingPathWaterway(sendr);\n } catch (e) { HiUser(e, \"Start Drawing Path\"); }\n}", "function newPath () {\r\n ctx.beginPath(); // Neuer Grafikpfad\r\n ctx.strokeStyle = \"#000000\"; // Linienfarbe schwarz\r\n ctx.lineWidth = 1; // Liniendicke 1\r\n }", "function newPath () {\r\n ctx.beginPath(); // Neuer Grafikpfad\r\n ctx.strokeStyle = \"#000000\"; // Linienfarbe schwarz\r\n ctx.lineWidth = 1; // Liniendicke 1\r\n }", "step(){\n \n if(this.path.length === 0){\n this.updatePath();\n }\n \n this.move();\n \n }", "calc(lindenmayer_string, segment_length) {\n\n // Initialize shape path array\n // This stores the x,y coordinates for each step\n var path = new Array();\n\n var pos = 0;\n\n let x = 0;\n let y = 0;\n\n var current_angle = 0;\n\n while (pos < lindenmayer_string.length-1) {\n\n if (lindenmayer_string[pos] == 'F') {\n\n // Draw forward\n\n // polar to cartesian based on step and current_angle:\n let x1 = x + segment_length * cos(radians(current_angle));\n let y1 = y + segment_length * sin(radians(current_angle));\n\n path.push([x1, y1]);\n\n // update the turtle's position:\n x = x1;\n y = y1;\n\n } else if (lindenmayer_string[pos] == '+') {\n\n // Turn left\n current_angle += this.curve.draw.angle;\n\n } else if (lindenmayer_string[pos] == '-') {\n\n // Turn right\n current_angle -= this.curve.draw.angle;\n }\n\n pos++;\n }\n\n // Translate path to center of drawing area\n path = this.translate_to_center(path);\n\n // Rotate path around the center of drawing area\n if (this.config.rotate.value > 0) {\n path = this.rotate_around_center(path);\n path = this.translate_to_center(path);\n }\n\n return path;\n }", "function drawMethod() {\n startupView = 1;\n \n // gl draw parameters\n var count;\n var primitiveType;\n var offset = 0;\n\n // Clear out the position arrays that will be changed by generate functions\n bezierPos = [];\n bezierPos2 = [];\n bezier3dPos = [];\n bezier3dPos2 = [];\n ans = [];\n ans2 = [];\n \n // Clear out the viewport with solid black color\n gl.viewport(0, 0, gl.viewportWidth, gl.viewportHeight);\n gl.clear( gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n\n //draws the dotted horizontal axis lines\n var primitiveType = gl.LINES;\n var count = axisRotation.length/2;\n gl.lineWidth(2);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(axisRotation), gl.STATIC_DRAW);\n gl.uniform4f(colorLocation, 0, 0, 0, 1);\n gl.drawArrays(primitiveType, offset, count);\n\n //If a point is being moved then draw the current highlighted point\n if(moveMode == 1)\n {\n count = 1;\n primitiveType = gl.POINTS;\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(highlightPoint), gl.STATIC_DRAW);\n gl.uniform4f(colorLocation, 1, 0, 1, 1);\n gl.drawArrays(primitiveType, offset, count);\n }\n\n //draws the control points\n primitiveType = gl.POINTS;\n count = positions.length/2;\n gl.uniform4f(colorLocation, 0.47, 0.47, 0.47, 1);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(positions), gl.STATIC_DRAW);\n gl.drawArrays(primitiveType, offset, count);\n\n //draws the dotted lines\n generateDottedLine();\n gl.lineWidth(1);\n primitiveType = gl.LINES;\n count = dottedLinePoints.length/2;\n gl.uniform4f(colorLocation, 0, 0, 0, 1);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(dottedLinePoints), gl.STATIC_DRAW);\n gl.drawArrays(primitiveType, offset, count);\n\n //generate and draw the bezier curve everytime the control points are moved\n generateBezierCurve();\n gl.lineWidth(3);\n gl.uniform4f(colorLocation, 1, 0, 0, 1);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(bezierPos), gl.STATIC_DRAW);\n count = subdivisions+1;\n primitiveType = gl.LINE_STRIP;\n gl.drawArrays(primitiveType, offset, count);\n\n //draw the 2nd bezier curve that we just generated\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(bezierPos2), gl.STATIC_DRAW);\n count = subdivisions+1;\n primitiveType = gl.LINE_STRIP;\n gl.drawArrays(primitiveType, offset, count);\n} // End of drawMethod()", "function draw() {\n\tstrokeWeight(5);\n\tstroke(0);\n\tline(0,0,cw,0);\n\tline(cw,0,cw,ch);\n\tline(0,ch,cw,ch);\n\tline(0,ch,0,0);\n\tif(mouseIsPressed){\n\t\tif(mouseButton == LEFT){\n\t\tlastX = mouseX;\n\t\tlastY = mouseY;\n\t\tdrawLine(startX,startY,lastX,lastY, clr, drawThickness);\n\t\tstartX = mouseX;\n\t\tstartY = mouseY;\n\t\t}else if(mouseButton == RIGHT){\n\t\t\tlastX = mouseX;\n\t\t\tlastY = mouseY;\n\t\t\tdrawLine(startX,startY,lastX,lastY, bgcolour, rubThickness);\n\t\t\tstartX = mouseX;\n\t\t\tstartY = mouseY;\t\n\t\t}\n\t}else{\n\t\tstartX = mouseX;\n\t\tstartY = mouseY;\n\t}\n}", "_drawTrajectories() {\n this._clearTrajectories();\n this._drawTrajectory(this.trajectories[0],\n '#8dd4e0', '#5aa1ad', '#daffff', '#276e7a');\n this._drawTrajectory(this.trajectories[1],\n '#f8c633', '#c59200', '#ffec59', '#926000');\n }", "function newPath(w) {\n ctx.beginPath(); // Neuer Pfad\n ctx.strokeStyle = \"#000000\"; // Linienfarbe schwarz\n ctx.lineWidth = 1; // Liniendicke\n }", "drawConnections({ x, y, value, ctx }) {\n // if gate that is feeding into this one\n // is 1 (true), color it red\n if (value) {\n ctx.strokeStyle = \"red\";\n } else {\n ctx.strokeStyle = \"#000\";\n }\n let halfway = (this.inputLocation.x + x) / 2;\n ctx.beginPath();\n ctx.moveTo(this.inputLocation.x, this.inputLocation.y);\n ctx.lineTo(halfway, this.inputLocation.y);\n ctx.lineTo(halfway, y);\n ctx.lineTo(x, y);\n ctx.stroke();\n }", "function routeHandoffPath(ev1, ev2, x1, x2, y1, y2) {\n //OLD CURVE CODE\n /*var dx = x1 - x2,\n dy = y1 - y2,\n dr = Math.sqrt(dx * dx + dy * dy);\n //For ref: http://stackoverflow.com/questions/13455510/curved-line-on-d3-force-directed-tree\n return \"M \" + x1 + \",\" + y1 + \"\\n A \" + dr + \", \" + dr \n + \" 0 0,0 \" + x2 + \",\" + (y2+15);*/\n\n //Line out from first event to gutter\n var pathStr = \"M \" + (x1) + \",\" + y1 + \"\\n\"; // + \"L \" + x2 + \", \" + y2\n pathStr += \"L \" + (x1+4) + \", \" + y1 + \"\\n\";3\n //Route path either to the horizontal gutter above or below\n //Then route to second event horizontally\n if (y1 <= y2) { //Event 1 is higher\n pathStr += \"L \" + (x1+4) + \", \" + (y1+25) + \"\\n\";\n pathStr += \"L \" + (x2+1) + \", \" + (y1+25) + \"\\n\"; \n } else { //Event 2 is higher\n pathStr += \"L \" + (x1+4) + \", \" + (y1-55) + \"\\n\";\n pathStr += \"L \" + (x2+1) + \", \" + (y1-55) + \"\\n\";\n }\n //Route to second event vertically\n pathStr += \"L \" + (x2+1) + \", \" + y2 + \"\\n\";\n //Line from gutter to second event\n pathStr += \"L \" + (x2+5) + \", \" + y2 + \"\\n\";\n\n //Arrowhead\n pathStr += \"L\" + (x2+6) + \", \" + (y2+2) + \"\\n\";\n pathStr += \"L\" + (x2+8) + \", \" + (y2) + \"\\n\";\n pathStr += \"L\" + (x2+6) + \", \" + (y2-2) + \"\\n\";\n \n return pathStr;\n}", "drawTurtle() {\n //CURRENT PATHS\n this.path.moveTo(this.CP.x, this.CP.y);\n this.points = this.path.getPoints();\n this.geometry = this.geometry.setFromPoints(this.points);\n // this.material = new THREE.LineBasicMaterial({ color: 0xffffff });\n this.line = new THREE.Line(this.geometry, this.material);\n // return this.line;\n return this.line;\n }", "function draw(w,h)\r\n{\r\n\t// Dessin du fond\r\n\t of.Background(0,0,0);\r\n\tof.EnableAlphaBlending();\r\n\t// Dessin des particules en parcourant la liste this.particules\r\n\tof.SetColor(255,255,255,100);\r\n\tfor (var i=0; i<this.particules.length; i++)\r\n\t{\r\n\t\t//this.particules[i].draw();\r\n\t}\r\n\r\n\tvar pi,pj;\r\n\tof.SetLineWidth(3);\r\n\tfor (var i=0; i<this.particules.length; i++)\r\n\t{\r\n\t\tpi = this.particules[i];\r\n\t\tfor (var j=i+1; j<this.particules.length; j++)\r\n\t\t{\r\n\t\t\tpj = this.particules[j];\r\n\t\t\tif ( of.Dist(pi.x,pi.y, pj.x,pj.y) <= this.distance )\r\n\t\t\t{\r\n\t\t\t\tof.Line( pi.x,pi.y, pj.x,pj.y );\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}\r\n}", "function drawline(){\nlx=0;\n\nfor (let j=0;j<40;j++){\nfor (let i=0; i<4; i++){\nctx.beginPath();\nctx.strokeStyle= paint[i];\nctx.moveTo(lx, ly);\nlx+=10;\nctx.lineTo(lx, ly);\nctx.lineWidth = 5;\nctx.stroke();\n//ctx.arc(a, b, obrad, quarter*i + change, quarter*(i+1) + change, false);\n//ctx.fill();\n}\n}}", "function addOnePer(){\n ctx.beginPath();\n single();\n ctx.lineTo(width, height-(step*rows));\n ctx.stroke();\n }", "function findWay(source){\n\n \n \n var id_room = $('#room').val().split(\" \").join(\"\").toLowerCase();\n id_room = zimmerNameId[id_room];\n \n graph = new Graph(map);\n var shortWay = [];\n shortWay = graph.findShortestPath(zonesNameId[source],id_room);\n console.log(\"the short way to the destination : \\n\"+shortWay);\n var len = shortWay.length;\n // the points of each noud which will be drawed\n var points =[];\n\n for(i=0;i<len;i++){\n var key = shortWay[i];\n if(mapCoordnidates[key]){\n object = {\"x\":mapCoordnidates[key].x, \"y\":mapCoordnidates[key].y};\n points.push(object);\n }\n }\n /*for(i=0;i<points.length;i++){\n\n console.log(\"points of the line : \\n\"+points[i].x+' '+points[i].y);\n }*/\n\n // draw the line of the points until the destination\n d3.select(\"#theWay\").attr(\"visibility\",\"hidden\");\n\n // hide the distination to draw it again\n // d3.select(\"#destination\").attr(\"visibility\",\"hidden\");\n\n var lineFunction = d3.svg.line()\n .x(function(d) { return d.x; })\n .y(function(d) { return d.y; })\n .interpolate(\"linear\");\n // the arrow of the end\n var defs = d3.select(\"#svg8\").append(\"svg:defs\");\n\n /* here to generate the marker shape and assign it the \"arrow\" id */\n defs.append(\"svg:marker\")\n .attr(\"id\", \"arrow\")\n .attr(\"viewBox\", \"0 0 10 10\")\n .attr(\"refX\", 1)\n .attr(\"refY\", 5)\n .attr(\"markerWidth\", 6)\n .attr(\"markerHeight\", 6)\n .attr(\"orient\", \"auto\")\n .attr('fill','#3498db')\n .append('svg:path')\n .attr('d', \"M 0 0 L 10 5 L 0 10 z\");\n\n d3.select(\"#theWay\").attr(\"d\", lineFunction(points))\n .attr(\"id\",\"theWay\")\n .attr(\"stroke\", \"#3498db\")\n .attr(\"stroke-width\", 2)\n .attr(\"fill\", \"none\")\n .attr(\"visibility\",\"visible\")\n .attr('marker-end', 'url(#arrow)');\n // draw the destination\n // d3.select(\"#\"+id_room)\n // .style(\"fill\",\"#d35400\")\n // .attr(\"r\",3)\n // .attr('id','destination')\n // .attr(\"visibility\",\"visible\");\n }// end finWay", "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 start_drawing() {\n $('#normal_ear').lazylinepainter( \n {\n \"svgData\": pathObj,\n \"strokeWidth\": 2,\n \"strokeColor\": \"#7f857f\"\n }).lazylinepainter('paint'); \n }", "function drawPath(nodesInShortestPath) {\n for (let i = 0; i <= nodesInShortestPath.length; i++) {\n if (i === nodesInShortestPath.length) {\n send('RESET');\n return;\n }\n const node = nodesInShortestPath[i];\n setTimeout(() => {\n node.finderNode.fill = PATH_COLOR;\n }, 35 * i);\n }\n }", "function Graficador(eti1,eti2,step1,step2,canv){\r\n canv.width = 500;\r\n canv.height = 500;\r\n var ctx = canv.getContext('2d');\r\n ctx.moveTo(5,5);\r\n ctx.lineTo(5,300);\r\n ctx.strokeStyle = 'rgba(0,0,0,1)';\r\n ctx.stroke();\r\n}", "function d_draw () {//draw a wall in canvas.\n /* drawing lines */\n context.beginPath();\n context.moveTo(this.startx, this.starty);\n context.lineTo(this.endx, this.endy);\n context.strokeStyle = \"white\";\n context.stroke();\n \n \n// context.lineTo(400, 300);\n// context.strokeStyle = \"red\";\n// context.stroke();\n}", "function Path(props) {\n var currentStepName = props.currentStepName,\n onClick = props.onClick,\n children = props.children,\n id = props.id,\n className = props.className,\n style = props.style;\n\n var _useState = (0, _react.useState)(null),\n _useState2 = (0, _slicedToArray2[\"default\"])(_useState, 2),\n hoveredStepName = _useState2[0],\n setHoveredStepName = _useState2[1];\n\n var _useState3 = (0, _react.useState)(0),\n _useState4 = (0, _slicedToArray2[\"default\"])(_useState3, 2),\n stepsCount = _useState4[0],\n setStepsCount = _useState4[1];\n\n var registeredSteps = (0, _react.useRef)([]);\n var containerRef = (0, _react.useRef)();\n var privateRegisterStep = (0, _react.useCallback)(function (stepRef, stepProps) {\n if ((0, _isChildRegistered[\"default\"])(stepProps.name, registeredSteps.current)) return;\n\n var _getChildStepsNodes = (0, _helpers.getChildStepsNodes)(containerRef.current),\n _getChildStepsNodes2 = (0, _toArray2[\"default\"])(_getChildStepsNodes),\n nodes = _getChildStepsNodes2.slice(0);\n\n var newStepsList = (0, _insertChildOrderly[\"default\"])(registeredSteps.current, _objectSpread({\n ref: stepRef\n }, stepProps), nodes);\n registeredSteps.current = newStepsList;\n setStepsCount(registeredSteps.current.length);\n }, []);\n var privateUnregisterStep = (0, _react.useCallback)(function (stepRef, stepName) {\n if (!(0, _isChildRegistered[\"default\"])(stepName, registeredSteps.current)) return;\n registeredSteps.current = registeredSteps.current.filter(function (step) {\n return step.name !== stepName;\n });\n setStepsCount(registeredSteps.current.length);\n }, []);\n var getStepIndex = (0, _react.useCallback)(function (name) {\n return registeredSteps.current.findIndex(function (step) {\n return step.name === name;\n });\n }, []);\n var privateGetStepZIndex = (0, _react.useCallback)(function (name) {\n return stepsCount - getStepIndex(name);\n }, [getStepIndex, stepsCount]);\n var privateUpdateStepProps = (0, _react.useCallback)(function (stepProps) {\n if (!(0, _isChildRegistered[\"default\"])(stepProps.name, registeredSteps.current)) return;\n var index = registeredSteps.current.findIndex(function (registeredStep) {\n return registeredStep.name === stepProps.name;\n });\n var updatedStep = registeredSteps.current[index];\n registeredSteps.current[index] = _objectSpread(_objectSpread({}, updatedStep), stepProps);\n }, []);\n var context = (0, _react.useMemo)(function () {\n var selectedIndex = registeredSteps.current.findIndex(function (step) {\n return step.name === currentStepName;\n });\n var hoveredIndex = registeredSteps.current.findIndex(function (step) {\n return step.name === hoveredStepName;\n });\n return {\n selectedIndex: selectedIndex,\n hoveredIndex: hoveredIndex,\n privateGetStepIndex: getStepIndex,\n privateGetStepZIndex: privateGetStepZIndex,\n privateRegisterStep: privateRegisterStep,\n privateUnregisterStep: privateUnregisterStep,\n privateUpdateStepProps: privateUpdateStepProps,\n privateOnClick: onClick,\n privateUpdateHoveredStep: setHoveredStepName\n };\n }, [currentStepName, getStepIndex, hoveredStepName, onClick, privateGetStepZIndex, privateRegisterStep, privateUnregisterStep, privateUpdateStepProps]);\n return /*#__PURE__*/_react[\"default\"].createElement(_styled.StyledContainer, {\n id: id,\n className: className,\n style: style,\n ref: containerRef\n }, /*#__PURE__*/_react[\"default\"].createElement(_styled.StyledStepsList, null, /*#__PURE__*/_react[\"default\"].createElement(_context.Provider, {\n value: context\n }, children)));\n}", "draw() {\n this.state.ctx.beginPath();\n this.state.ctx.moveTo(this.state.prevX, this.state.prevY);\n this.state.ctx.lineTo(this.state.currX, this.state.currY);\n this.state.ctx.strokeStyle = this.state.x;\n this.state.ctx.lineWidth = this.state.y;\n this.state.ctx.stroke();\n this.setState({ctx: this.state.ctx});\n }", "draw () {\n this.dotCircle.remove()\n this.dotCircle = this.getDotCircle(this.point, this.thickness, this.color)\n\n this.dotToLine.removeSegments()\n this.dotToLine.add(this.point, this.iPoint)\n\n this.fillingDotToLine.removeSegments()\n this.fillingDotToLine.add(this.point)\n\n const point = this.dotToLine.getLocationAt(this.dotToLine.length * this.fillingProgress)\n this.fillingDotToLine.add(point)\n }", "function drawHandoff(handoffData) {\n var task1Id = handoffData[\"event1\"];\n var task2Id = handoffData[\"event2\"];\n var handoffId = handoffData[\"id\"];\n\n //Find end of task 1\n var ev1 = flashTeamsJSON[\"events\"][getEventJSONIndex(task1Id)];\n var x1 = handoffStart(ev1);\n var y1 = ev1.y + 50;\n \n //Find beginning of task 2\n var ev2 = flashTeamsJSON[\"events\"][getEventJSONIndex(task2Id)];\n var x2 = ev2.x + 3;\n var y2 = ev2.y + 50;\n\n var handoffLayerSvg = window._foundry.timeline.handoffLayer;\n var path = handoffLayerSvg.selectAll(\"path.handoffLine\")\n .data(flashTeamsJSON[\"interactions\"]);\n\n path.enter().insert(\"svg:path\")\n .attr(\"class\", \"link\")\n .style(\"stroke\", \"#ccc\");\n\n path = handoffLayerSvg.append(\"path\")\n .attr(\"class\", \"handoffLine\")\n .attr(\"id\", function () {\n return \"interaction_\" + handoffId;\n })\n .attr(\"x1\", x1)\n .attr(\"y1\", y1)\n .attr(\"x2\", x2)\n .attr(\"y2\", y2)\n .attr(\"d\", function(d) {\n return routeHandoffPath(ev1, ev2, x1, x2, y1, y2);\n\n })\n .attr(\"stroke\", function() {\n if (isWorkerInteraction(handoffId)) return WORKER_TASK_NOT_START_COLOR; //highlight for workers\n else return \"gray\";\n })\n .attr(\"stroke-width\", 3)\n .attr(\"stroke-opacity\", \".45\")\n .attr(\"fill\", \"none\")\n .attr(\"marker-end\", \"url(#arrowhead)\")\n .on(\"mouseover\", function() { \n d3.select(this).style(\"stroke-opacity\", .95);\n d3.select(this).style(\"stroke\", TASK_START_BORDER_COLOR);\n })\n .on(\"mouseout\", function() { \n d3.select(this).style(\"stroke-opacity\", .45);\n if (isWorkerInteraction(handoffId)) d3.select(this).style(\"stroke\", WORKER_TASK_NOT_START_COLOR);\n else d3.select(this).style(\"stroke\", \"gray\");\n });\n\n $(\"#interaction_\" + handoffId).popover({\n class: \"handoffPopover\", \n id: '\"handoffPopover_' + handoffId + '\"',\n html: \"true\",\n trigger: \"click\",\n title: \"Handoff\",\n content: 'Description of Handoff Materials: '\n + getHandoffInfo(handoffId),\n container: $(\"#timeline-container\")\n });\n}", "function visualizePaths(){\n\tlet Visual = require('visual');\n\tlet colors = [];\n\tlet COLOR_BLACK = colors.push('#000000') - 1;\n\tlet COLOR_PATH = colors.push('rgba(255,255,255,0.5)') - 1;\n\t_.each(Game.rooms,(room,name)=>{\n\t\tlet visual = new Visual(name);\n\t\tvisual.defineColors(colors);\n\t\tvisual.setLineWidth = 0.5;\n\t\t_.each(Game.creeps,creep=>{\n\t\t\tif(creep.room != room) return;\n\t\t\tlet mem = creep.memory;\n\t\t\tif(mem._move){\n\t\t\t\tlet path = Room.deserializePath(mem._move.path);\n\t\t\t\tif(path.length){\n\t\t\t\t\tvisual.drawLine(path.map(p=>([p.x,p.y])),COLOR_PATH,{ lineWidth: 0.1 });\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tvisual.commit();\n\t});\n}", "function drawPathWithArrows(ctx, path) {\n var i, cmd, x1, y1, x2, y2;\n var arrows = [];\n ctx.beginPath();\n for (i = 0; i < path.commands.length; i += 1) {\n cmd = path.commands[i];\n if (cmd.type === 'M') {\n if(x1 !== undefined) {\n arrows.push([ctx, x1, y1, x2, y2]);\n }\n ctx.moveTo(cmd.x, cmd.y);\n } else if (cmd.type === 'L') {\n ctx.lineTo(cmd.x, cmd.y);\n x1 = x2;\n y1 = y2;\n } else if (cmd.type === 'C') {\n ctx.bezierCurveTo(cmd.x1, cmd.y1, cmd.x2, cmd.y2, cmd.x, cmd.y);\n x1 = cmd.x2;\n y1 = cmd.y2;\n } else if (cmd.type === 'Q') {\n ctx.quadraticCurveTo(cmd.x1, cmd.y1, cmd.x, cmd.y);\n x1 = cmd.x1;\n y1 = cmd.y1;\n } else if (cmd.type === 'Z') {\n arrows.push([ctx, x1, y1, x2, y2]);\n ctx.closePath();\n }\n x2 = cmd.x;\n y2 = cmd.y;\n }\n if (path.fill) {\n ctx.fillStyle = path.fill;\n ctx.fill();\n }\n if (path.stroke) {\n ctx.strokeStyle = path.stroke;\n ctx.lineWidth = path.strokeWidth;\n ctx.stroke();\n }\n ctx.fillStyle = '#000000';\n arrows.forEach(function(arrow) {\n drawArrow.apply(null, arrow);\n });\n }", "function newPath () {\n ctx.beginPath(); // Neuer Pfad\n ctx.strokeStyle = \"#000000\"; // Linienfarbe schwarz\n ctx.lineWidth = 1; // Liniendicke 1\n }", "function newPath () {\n ctx.beginPath(); // Neuer Pfad\n ctx.strokeStyle = \"#000000\"; // Linienfarbe schwarz\n ctx.lineWidth = 1; // Liniendicke 1\n }", "function drawPath() {\n // draw the path\n for (var j = 0; j < AllPoints.length; j++) {\n var pathString = \"M\";\n for (var i = 0; i < AllPoints[j].length; i++) {\n var x =\n allCordsMap[\n \"h\" + AllPoints[j][i][0] + \"-v\" + AllPoints[j][i][1]\n ][AllPoints[j][i][2]];\n var y =\n allCordsMap[\n \"h\" + AllPoints[j][i][0] + \"-v\" + AllPoints[j][i][1]\n ][AllPoints[j][i][2]];\n pathString = pathString + x + \",\" + y;\n if (i !== AllPoints[j].length - 1) {\n pathString += \"L\";\n } else {\n Snap.select(LIGHT_PATHS[j])\n .path(pathString)\n .attr(\"stroke\", LIGHT_COLOR)\n .attr(\"stroke-width\", 1)\n .attr(\"fill\", \"none\");\n Snap.select(DARK_PATHS[j])\n .path(pathString)\n .attr(\"stroke\", DARKER_COLOR)\n .attr(\"stroke-width\", 1)\n .attr(\"fill\", \"none\");\n console.log(\"draw path\");\n }\n }\n }\n}", "function drawBfsStage(id, q, len, radius){\n console.log(\"started draw stage\\n\");\n for(var i = 0; i < q.length; i++){\n var path = q[i];\n console.log(\"path to draw: \" + path);\n if(path.length > len){\n break;\n }\n var p = path[path.length - 1];\n if(p[0] != end_point[0] || p[1] != end_point[1]){\n var centerX = (p[0]) + (grid / 2);\n var centerY = (p[1]) + (grid / 2);\n\n ctx.beginPath();\n ctx.arc(centerX, centerY, radius, 0, 2 * Math.PI, false);\n ctx.fillStyle = blue;\n ctx.fill();\n //ctx.lineWidth = 5;\n ctx.strokeStyle = '#003300';\n //ctx.stroke();\n //drawRectangle(id, p[0], p[1], _len, _len, 'blue');\n } \n }\n}", "function drawPath(percent) {\n\t\t// determines how much of the path is shown\n\t\tpercentLength = pathLength * percent;\n\n\t\t// modify offset to show percentage of path completed\n\t\tpath.style.strokeDashoffset = pathLength - percentLength;\n\t}", "function drawLines() {\n}", "function drawLines() {\n}", "function endingPoint() {\n painting = false;\n ctx.beginPath();\n }", "function draw() {\n\tctx.clearRect(0, 0, W, H);\n\n\tif (modeGOT) {\n\t\tdrawPath(\"black\", 0, H * 0.1, W, H * 0.3); // GROUND up\n\t\tdrawPath(\"rgb(255,255,255)\", 0, H * 0.5, W, H * 0.6); // ROUTE\n\t\tctx.font = \"70px Lalezar\";\n\t\tctx.textAlign = \"center\";\n\t\tctx.fillStyle = \"lightgray\";\n\t\tctx.fillText(\"You\", W / 2, H * 0.6 - 10);\n\t\tctx.fillText(\"know\", W / 2, H * 0.7 - 10);\n\t\tctx.fillText(\"nothing\", W / 2, H * 0.8 - 10);\n\t\tctx.fillText(\"Jon Snow\", W / 2, H * 0.9 - 10);\n\t} else {\n\t\tsideroad.draw();\n\t\tdrawPath(\"rgb(110,110,110)\", 0, H * 0.5, W, H * 0.4); // ROUTE\n\t\tdrawLine(\"white\", 10, 0, H * 0.6, W, H * 0.6, [35, 50]); // LIGNE DE ROUTE 1\n\t\tdrawLine(\"sandybrown\", 10, 0, H * 0.7, W, H * 0.7, []); // LIGNE DE ROUTE 2\n\t\tdrawLine(\"white\", 10, 0, H * 0.8, W, H * 0.8, [35, 50]); // LIGNE DE ROUTE 3\n\t}\n\tfluid.draw(); // FLUIDE\n\tdownSide.draw(); // RIVE BAS\n\ttopSide.draw(); // RIVE HAUT\n\n\tfor (let i = 0; i < nbLives; i++) {\n\t\tlife.x = i * 70;\n\t\tlife.draw();\n\t}\n\n\t// SUPPORTS\n\t// Ressources graphiques\n\tif (modeGOT) {\n\t\tgroundImgURL = \"img/got/rock.png\";\n\t\tgroundImgURL2 = \"img/got/rock2.png\";\n\t\tgroundImgURL4 = \"img/got/rock4.png\";\n\t} else {\n\t\tgroundImgURL = \"img/lilypad.png\";\n\t\tgroundImgURL2 = \"img/lilypad2.png\";\n\t\tgroundImgURL4 = \"img/lilypad4.png\";\n\t}\n\n\t// Affichage\n\tif (frames % 200 === 0) {\n\t\tground1 = new Ground1(groundImgURL);\n\t\tgrounds1.push(ground1);\n\t}\n\n\tif (frames % 150 === 0) {\n\t\tground2 = new Ground2(groundImgURL2);\n\t\tgrounds2.push(ground2);\n\t}\n\n\tif (frames % 100 === 0) {\n\t\tground4 = new Ground4(groundImgURL4);\n\t\tgrounds4.push(ground4);\n\t}\n\n\tupdateLeftObjects(grounds1, W, 2);\n\tupdateRightObjects(grounds2, -63 * 2, -3);\n\tupdateLeftObjects(grounds4, W, 4);\n\n\tcheckLostIfDrown(frogger, 0.1 * H, grounds1);\n\tcheckLostIfDrown(frogger, 0.2 * H, grounds2);\n\tcheckLostIfDrown(frogger, 0.3 * H, grounds4);\n\n\t// FROGGER\n\tfrogger.draw();\n\n\t// OBSTACLES\n\t// Ressources graphiques\n\t// Affichage\n\tif (frames % 150 === 0) {\n\t\tif (modeGOT) {\n\t\t\trightObstacleImgURL = \"img/got/dragon_right.png\";\n\t\t\tleftObstacleImgURL = \"img/got/dragon_left.png\";\n\t\t} else {\n\t\t\trightObstacleImgURL = \"img/truck_from_right.png\";\n\t\t\tleftObstacleImgURL = \"img/truck_from_left.png\";\n\t\t}\n\n\t\trightObstacle = new RightObstacle(0.5 * H, rightObstacleImgURL);\n\t\tleftObstacle = new LeftObstacle(0.8 * H, leftObstacleImgURL);\n\n\t\trightObstacles.push(rightObstacle);\n\t\tleftObstacles.push(leftObstacle);\n\t}\n\n\tif (frames % 70 === 0) {\n\t\tif (modeGOT) {\n\t\t\trightObstacleImgURL = \"img/got/dragon_right.png\";\n\t\t\tleftObstacleImgURL = \"img/got/dragon_left.png\";\n\t\t} else {\n\t\t\trightObstacleImgURL = \"img/car_from_right.png\";\n\t\t\tleftObstacleImgURL = \"img/car_from_left.png\";\n\t\t}\n\n\t\trightObstacle = new RightObstacle(0.6 * H, rightObstacleImgURL);\n\t\tleftObstacle = new LeftObstacle(0.7 * H, leftObstacleImgURL);\n\n\t\trightObstacles.push(rightObstacle);\n\t\tleftObstacles.push(leftObstacle);\n\t}\n\n\tupdateLeftObjects(leftObstacles, W, 5);\n\tupdateRightObjects(rightObstacles, -141, -7);\n\n\tcheckLostOnHit(leftObstacles, frogger);\n\tcheckLostOnHit(rightObstacles, frogger);\n\n\t// RESULTAT\n\tif (frogger.y === 0 && !gameover) {\n\t\twin = true;\n\t\tdisplayWin();\n\t}\n\n\tif (lost) {\n\t\tdisplayLost();\n\t\tnbLives = Math.max(0, nbLives - 1);\n\t}\n\n\tif (nbLives === 0) {\n\t\tgameover = true;\n\t}\n\n\tif (gameover) {\n\t\tdisplayGameover();\n\t}\n\n\t// SCORE\n\tdisplayScore();\n}", "function guideLine(){\n ctx.beginPath();\n ctx.moveTo(300, 300);\n ctx.lineTo(0, 300);\n ctx.lineTo(200, 200);\n ctx.closePath();\n ctx.fillStyle = \"gold\";\n ctx.fill();\n}", "function drawLine(waypoints, t, callback) {\r\n if (t < waypoints.length - 1) {\r\n raf = window.requestAnimationFrame(() => {\r\n drawLine(waypoints, t+1, callback)\r\n });\r\n } else {\r\n raf = window.requestAnimationFrame(() => {\r\n callback();\r\n });\r\n }\r\n const x1 = waypoints[t-1].x;\r\n const y1 = waypoints[t-1].y;\r\n const x2 = waypoints[t].x;\r\n const y2 = waypoints[t].y;\r\n renderLine(x1,y1,x2,y2);\r\n}", "function draw(i, o) {\n with(context) {\n x = i % grid * size, y = ~~(i / grid) * size, c = size / 2, d = size / 3, e = d * 2, lineWidth = 4;\n bn(); // beginPath\n o ? a(x + c, y + c, d / 2, 0, Math.PI * 2, !1) // draw o\n :\n (mT(x + d, y + d), lT(x + e, y + e), mT(x + d, y + e), lT(x + e, y + d)); // draw x\n stroke();\n board[i] = o || 1;\n }\n }", "function step() {\n redraw.stepAnimation();\n }", "function step() {\n redraw.stepAnimation();\n }", "render() {\n noFill()\n stroke(this.layerColor)\n strokeWeight(this.randomWeight)\n push()\n translate(width / 2, height / 2)\n\n for (let i = 0; i < this.linesNumShapes; i++) {\n line(this.start * this.step, 0, (this.stop + 1) * this.step, 0)\n rotate(this.linesAngle)\n }\n\n pop()\n }", "drawGraph(){\n let shapes = this.vertices.iterator();\n\n while(!shapes.isEmpty()){\n shapes.currItem().drawEdges();\n shapes.next();\n }\n\n shapes = this.vertices.iterator();\n\n \n while(!shapes.isEmpty()){\n shapes.currItem().draw(this.currentStage);\n shapes.next();\n }\n }", "draw(ctx) {\n // ctx.strokeStyle = COLORS.BORDER;\n // ctx.lineWidth = 2;\n // for(let i=0;i<this.paths.length;i++) {\n // const path = this.paths[i];\n // ctx.fillStyle = COLORS.BLUEPRINT;\n //\n // ctx.beginPath();\n // for(let j=0;j<path.length;j++) {\n // ctx.lineTo(path[j].X, path[j].Y);\n // }\n // ctx.closePath();\n // ctx.fill();\n // ctx.stroke();\n // }\n }", "computeDrawPathBuffers() {\n const buffer = this._pathBuffer;\n let preview,current,next;\n const cList = $objs.cases_s;\n for (let i=0, l=buffer.length; i<l; i++) {\n const preview = buffer[i-1];\n const current = buffer[i ];\n const next = buffer[i+1];\n const preview_id = preview && cList.indexOf(preview);\n const current_id = current && cList.indexOf(current);\n const next_id = next && cList.indexOf(next);\n //TODO: FIXME: compute distance via global position for Math.hypot\n if(preview){\n current.pathConnexion[String(preview_id)] = Math.hypot(preview.x-current.x, preview.y-current.y);\n };\n if(next){\n current.pathConnexion[String(next_id)] = Math.hypot(next.x-current.x, next.y-current.y);\n };\n };\n console.log0('PathsBuffers: ', buffer);\n this._pathBuffer = [];\n this.refreshPath();\n }", "function drawRoute2() {\n ctx.save();\n drawTableauRoute2();\n scrolleRoute2();\n ctx.restore();\n ctx1.fillText(\"Classement\", 32, 20);\n classementTab = [0, 0, 0];\n ctx1.fillText(\"1er : \" + classementTab[0] ,10,50);\n ctx1.fillText(\"2ème : \" + classementTab[1],10,80);\n ctx1.fillText(\"3ème : \" + classementTab[2],10,110);\n \n classement();\n \n}" ]
[ "0.70697945", "0.67920697", "0.67242545", "0.67022383", "0.6664862", "0.66017634", "0.6601743", "0.65780336", "0.65537614", "0.6550907", "0.6531512", "0.6468508", "0.6457658", "0.6450764", "0.6445439", "0.6426784", "0.64162934", "0.64034486", "0.6393927", "0.6391958", "0.6381909", "0.63512856", "0.6338825", "0.63387114", "0.63109344", "0.62698567", "0.6224805", "0.62224686", "0.6212322", "0.6208642", "0.61983114", "0.61964846", "0.61845785", "0.6167897", "0.61648095", "0.61595374", "0.6148782", "0.6148312", "0.6142233", "0.6141856", "0.6141826", "0.61378825", "0.6136699", "0.6132739", "0.61067915", "0.6102373", "0.6088523", "0.6077742", "0.60629076", "0.6057152", "0.6053838", "0.6053659", "0.6036609", "0.60182947", "0.60098416", "0.6008974", "0.6008974", "0.600785", "0.6000303", "0.59946454", "0.59933025", "0.5992051", "0.5991203", "0.5985907", "0.59799474", "0.5979925", "0.5974445", "0.59707713", "0.59389335", "0.59387183", "0.59378046", "0.59368384", "0.59365547", "0.5930885", "0.5930387", "0.59274435", "0.59269804", "0.592541", "0.5921572", "0.59171915", "0.59108365", "0.5908009", "0.5908009", "0.59006584", "0.5895918", "0.58953124", "0.5890932", "0.5890932", "0.5888468", "0.5887255", "0.5885614", "0.58846265", "0.58825034", "0.5881381", "0.5881381", "0.5881111", "0.5874236", "0.5871638", "0.5870327", "0.58703107" ]
0.6842936
1
resets values of sliders on page (re)load
function reset() { var varList = document.getElementsByClassName("inner-flex-horiz"); document.getElementById("clearModelButton").addEventListener("submit", function() {window.reload(true)}); for (var i=0; i<db_modules.length; i++) { if (db_modules[i].modelID_id === modelNum) { if (db_modules[i].reversible.toLowerCase() === 'irreversible') { var enSlider = document.getElementById(db_modules[i].enzymeAbbr); enSlider.value = "50"; var numId = db_modules[i].enzymeAbbr + "Value"; enSlider.oninput = function() { var sliderId = convertTextToId(this.id) + "Value"; document.getElementById(sliderId).innerHTML = this.value; } } var currModuleIndex = enzymeList.indexOf(db_modules[i].enzymeAbbr) highlightRects.push([db_modules[i].xCoor*75+canvas.clientWidth/2-130, db_modules[i].yCoor*100-30, 260, 160, false]); var indexAttrib = document.createAttribute("drawRect"); indexAttrib.value = "false"; varList[currModuleIndex].setAttributeNode(indexAttrib); varList[currModuleIndex].addEventListener("mouseenter", function(event) { this.setAttribute("drawRect", "true"); }, false); varList[currModuleIndex].addEventListener("mouseenter", function(event) { this.setAttribute("drawRect", "false"); }, false) dotPositions.push([db_modules[i].xCoor * 75 + (canvas.clientWidth / 2), db_modules[i].yCoor * 100]) directions.push(1); rxnDir.push(1); if (enzymeList.indexOf(db_modules.enzymeAbbr) == 0) { prodSubValues.push([10.0, 13.0]); } else { prodSubValues.push([10.0, 10.0]); } kValues.push(calculateK(i)); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetSlider() {\r\n slider.value = 0;\r\n}", "function resetSlider(bins){\n document.getElementById(\"theSlider\").value = bins;\n }", "function resetValues(){\r\n document.getElementById(\"localOnly\").checked = DEFAULT_VALUES.local_only;\r\n document.getElementById(\"spf_slider\").value = DEFAULT_VALUES.spf_value;\r\n document.getElementById(\"tz_slider\").value = DEFAULT_VALUES.tz_value;\r\n document.getElementById(\"bl_slider\").value = DEFAULT_VALUES.bl_value;\r\n document.getElementById(\"origin_slider\").value = DEFAULT_VALUES.origin_value;\r\n document.getElementById(\"api_slider\").value = DEFAULT_VALUES.api_value;\r\n document.getElementById(\"needed_score_slider\").value = DEFAULT_VALUES.needed_score;\r\n}", "function reset(l, c, m) {\n document.getElementById(\"lineSlider\").value = l;\n setL(l);\n document.getElementById(\"collumnSlider\").value = c;\n setC(c);\n document.getElementById(\"mineSlider\").value = m;\n setM(m);\n \n}", "function initSliders() {\r\n\t$(\".slider\").slider({ value: 50 });\r\n\t$(\".slider\").slider('disable');\r\n}", "function resetSlider(){\n $('.slide').removeClass('current-slide');\n currentSlide = $('#slide1');\n currentSlide.addClass('current-slide');\n num = 1;\n }", "function updateSliders() {\n select('#length').html(lengthSlider.value());\n select('#temperature').html(tempSlider.value());\n}", "function updateSliders() {\n select('#length').html(lengthSlider.value())\n select('#temperature').html(tempSlider.value())\n }", "function updateSliders() {\n select('#length').html(lengthSlider.value());\n select('#temperature').html(tempSlider.value());\n}", "function Reset(){\n let slideAmount = document.getElementById(\"slide\").value;\n updateSlider(slideAmount);\n opacityTaggle(\"false\");\n randnomColorCalcVar = false;\n}", "_updateEls() {\n let numSliders = this.o.numSliders;\n\n // add SVG elements representing sliders to match current number of sliders\n for (let i = this.state.sliderVals.length; i < numSliders; ++i) {\n this.state.sliderVals.push(this.o.minVal);\n this._addSvgSlider();\n }\n\n // remove SVG elements representing sliders to match current number of sliders\n for (let i = this.state.sliderVals.length; i > numSliders; --i) {\n this.state.sliderVals.pop();\n this._removeSvgSlider();\n }\n }", "function refreshSlider () {\n $(\".sliders\").slider('value', 50);\n $(\".sliders\").val(50);\n $(\".slidervals\").val(50);\n $(\".ui-slider-handle\").text(\"\");\n $(\".sliders\").css({\"background\":\"\"});\n $(\".sliders\" + \" .ui-slider-handle\").css({\n \"background\":\"#FAFAFA\",\n \"border-color\": \"#CCCCCC\" });\n}", "function initializeSliders(slrRedBody,slrGreenBody,slrBlueBody,slrRedHeader,slrGreenHeader,slrBlueHeader) {\n slrRedBody.value = sliderRedBody;\n slrGreenBody.value = sliderGreenBody;\n slrBlueBody.value = sliderBlueBody;\n slrRedHeader.value = sliderRedHeader;\n slrGreenHeader.value = sliderGreenHeader;\n slrBlueHeader.value = sliderBlueHeader;\n}", "function reloadSlider(slider){\n slider.reloadSlider();\n}", "function resetInputs() {\n const sliders = document.querySelectorAll(\".sliders input\");\n\n sliders.forEach((slider) => {\n if (slider.name === \"hue\") {\n const hueColor = initialColors[slider.getAttribute(\"data-hue\")];\n const hueValue = chroma(hueColor).hsl()[0];\n slider.value = Math.floor(hueValue);\n } else if (slider.name === \"brightness\") {\n const brightnessColor =\n initialColors[slider.getAttribute(\"data-brightness\")];\n const brightnessValue = chroma(brightnessColor).hsl()[2];\n slider.value = Math.floor(brightnessValue * 100) / 100;\n } else if (slider.name === \"saturation\") {\n const saturationColor =\n initialColors[slider.getAttribute(\"data-saturation\")];\n const saturationValue = chroma(saturationColor).hsl()[1];\n slider.value = Math.floor(saturationValue * 100) / 100;\n }\n });\n}", "restart()\n\t{\n\t\tthis.world.make_empty();\n\t\tthis.time = 0;\n\t\t\n\t\t// -- Initialize values here.\n\t\t\n\t\t// Parameters that control the animation.\n\t\tthis.value;\n\t\t\n\t\t\n\t\t// -- Slider 1 : \n\t\tvar slider_h = 20;\n\t\tvar slider;\n\t\tslider = new gui_Slider(room_w/24, room_h/4 + room_h/8, slider_h, room_h/8, slider_h);\n\t\tslider.setPer(1, 0);\n\t\tslider.world = this;\n\t\tslider.action = function(x, y)\n\t\t{\n\t\t\tvar min = 0;\n\t\t\tvar max = 1;\n\t\t\tthis.value = min + (max - min)*x;\n\t\t}\n\t\tthis.world.push(slider);\n\t\t\n\t\t\t\t\n\t}", "function reset(){\n for(let i = 0; i < sliderImages.length; i++){\n sliderImages[i].style.display = 'none';\n }\n }", "function reset() {\n for (let i = 0; i < sliderImages.length; i++) {\n sliderImages[i].style.display = \"none\";\n }\n}", "function resetValues() {\r\n curr_time.textContent = \"00:00\";\r\n total_duration.textContent = \"00:00\";\r\n seek_slider.value = 0;\r\n\r\n}", "function initialValues() {\n document.querySelector(\"#rangeRed\").value = 0;\n document.querySelector(\"#rangeGreen\").value = 0;\n document.querySelector(\"#rangeBlue\").value = 0;\n document.querySelector(\"#rangeHue\").value = 0;\n document.querySelector(\"#rangeSaturation\").value = 0;\n document.querySelector(\"#rangeLightness\").value = 0;\n}", "function updateSliders() {\n lengthLabel.html(\"Length: \" + lengthSlider.value());\n tempLabel.html(\"Temperature: \" + tempSlider.value());\n}", "function reset() {\r\n // Clear all images\r\n for (let i = 0; i < sliderImages.length; i++) {\r\n sliderImages[i].style.display = \"none\"; // taking display and setting to none\r\n }\r\n}", "function resetValues() {\n curr_time.textContent = \"00:00\";\n tot_duration.textContent = \"00:00\";\n seek_slider.value = 0;\n}", "function reset() {\n for (let i = 0; i < sliderImages.length; i++) {\n sliderImages[i].style.display = 'none';\n }\n}", "function resetClicked(){\n filters.rating = undefined\n filters.genres = undefined\n filters.language = undefined\n filters.runtime = undefined\n filters.year = undefined\n\n // reset the sliders and option boxes\n const runtimeRange = getRuntimeRange()\n const yearRange = getYearRange()\n\n // move the slider back to start\n runtimeSliderPointer.set([runtimeRange.low, runtimeRange.high])\n ratingSliderPointer.set([0, 10])\n yearSliderPointer.set([yearRange.low, yearRange.high])\n\n // re-call the create functions, which will delete the old one and replace it as a new selector\n createGenreSelector()\n createLanguageSelector()\n\n applyFilters()\n\n}", "function reset() {\n for (var i = 0; i < sliderImages.length; i++) {\n sliderImages[i].style.display = \"none\";\n }\n}", "function resetValue() {\n var remainder = $scrollPane.width() - $scrollContent.width();\n var leftVal = $scrollContent.css(\"margin-left\") === \"auto\" ? 0 : parseInt($scrollContent.css(\"margin-left\"));\n var percentage = Math.round(leftVal / remainder * 100);\n $scrollbar.slider(\"value\", percentage);\n }", "function setSliderValues(){\n warpValue.innerHTML = \"Warp Speed:\" + warpSlider.value;\n warpSlider.oninput = function() {\n warpValue.innerHTML = \"Warp Speed:\" + this.value;\n }\n\n stretchValue.innerHTML = \"Warp Stretch Length:\" + stretchSlider.value;\n stretchSlider.oninput = function() {\n stretchValue.innerHTML = \"Warp Stretch Length:\" + this.value;\n }\n\n sizeValue.innerHTML = \"Base Size:\" + sizeSlider.value;\n sizeSlider.oninput = function() {\n sizeValue.innerHTML = \"Base Size:\" + this.value;\n }\n \n baseSpeedValue.innerHTML = \"Base Speed:\" + baseSpeedSlider.value;\n baseSpeedSlider.oninput = function() {\n baseSpeedValue.innerHTML = \"Base Speed:\" + this.value;\n }\n\n amountValue.innerHTML = \"Amount:\" + amountSlider.value*100;\n amountSlider.oninput = function() {\n amountValue.innerHTML = \"Amount:\" + this.value*100;\n loadImages();\n }\n}", "function initialize() {\n setText(initialSliderValue);\n setImage(initialSliderValue);\n computeHolderMargin(initialSliderValue);\n scaleOrHideLabel(initialSliderValue);\n}", "function reloadSlider() {\n process.nextTick(() => {\n slider.resize();\n setTotalDots(slider.details().size);\n });\n }", "_resetOptions() {\n\t\tfor ( let slider of this.controlOptions.control.sliders ) {\n\t\t\tlet options = this.getSliderConfig( slider );\n\t\t\tthis.sliders[slider.name].$slider.slider( 'option', options );\n\t\t}\n\t}", "function init() {\n setMortalitySlider()\n setIncidentsSlider()\n setDeathPercentageSlider()\n setYearSlider()\n}", "function updateSliders() {\n\n\n $('.rgb-label').trigger('colorpickersliders.updateColor', pb.template().keyDoc.labelColor);\n $('.rgb-value').trigger('colorpickersliders.updateColor', pb.template().keyDoc.foregroundColor);\n $('.rgb-background').trigger('colorpickersliders.updateColor', pb.template().keyDoc.backgroundColor);\n\n }", "function reset(){\n for(let i = 0 ; i<sliderImages.length ; i++){\n sliderImages[i].style.display = \"none\"\n }\n}", "function reset() {\n for (var i = 0; i < sliderImages.length; i++) {\n sliderImages[i].style.display = 'none'; // Clear all images.\n dots[i].classList.remove(\"active\"); // Clear class active (CSS)\n } \n}", "function updateAll(){refreshSliderDimensions();ngModelRender();}", "function updateValues() {\n alignmentSliderVal = document.getElementById(\"alignment-slider\").value;\n cohesionSliderVal = document.getElementById(\"cohesion-slider\").value;\n separationSliderVal = document.getElementById(\"separation-slider\").value;\n changeAudioSpeed();\n}", "function resetValue(){\n\tvar remainder = scrollPane.width() - scrollContent.width();\n\tvar leftVal = scrollContent.css('margin-left') == 'auto' ? 0 : parseInt(scrollContent.css('margin-left'));\n\tvar percentage = Math.round(leftVal / remainder * 100);\n\tscrollbar.slider(\"value\", percentage);\n}", "function resetValue() {\r\n\t\t var remainder = scrollPane.width() - scrollContentWidth;\r\n\t\t var leftVal = scrollContent.css('left') == 'auto' ? 0 : parseInt(scrollContent.css('left'));\r\n\t\t var percentage = Math.round(leftVal / remainder * 100);\r\n\t\t scrollbar.slider(\"value\", percentage);\r\n\t\t}", "function setSliderValue(newValue) {\n curSlider.val(newValue).slider(\"refresh\");\n }", "function resetValue() {\nvar remainder = scrollPane.width() - scrollContent.width();\nvar leftVal = scrollContent.css( \"margin-left\" ) === \"auto\" ? 0 :\nparseInt( scrollContent.css( \"margin-left\" ) );\nvar percentage = Math.round( leftVal / remainder * 100 );\nscrollbar.slider( \"value\", percentage );\n}", "updateSlider_() {\n if (!this.sliderInput_) {\n return;\n }\n this.sliderInput_.setAttribute('value', this.getValue());\n }", "function resetGraph(){\n d3.select(\"#handle-one\").style(\"left\",\"0%\");\n d3.select(\"#handle-two\").style(\"left\",\"100%\");\n d3.select(\".d3-slider-range\").style(\"left\",\"0%\").style(\"right\",\"0%\");\n}", "function destroyDetailSliders()\n\t{\n\t\t$detailTopSlider.slick('unslick');\n\t\t$detailBottomSlider.slick('unslick');\n\t\tdetailSlidersInitialized = !detailSlidersInitialized;\n\t}", "function resetValue() {\r\n\t\t\tvar remainder = scrollPane.width() - scrollContent.width();\r\n\t\t\tvar leftVal = scrollContent.css( \"margin-left\" ) === \"auto\" ? 0 :\r\n\t\t\t\tparseInt( scrollContent.css( \"margin-left\" ) );\r\n\t\t\tvar percentage = Math.round( leftVal / remainder * 100 );\r\n\t\t\tscrollbar.slider( \"value\", percentage );\r\n\t\t}", "function update_slider() {\n\t$(\"#visitsGraph_slider\").slider(\"values\", 0, 0);\n\t$(\"#visitsGraph_slider\").slider(\"option\", \"max\", clicksGraph_cols.length - 1);\n\t$(\"#visitsGraph_slider\").slider(\"values\", 1, clicksGraph_cols.length - 1);\n\t$(\"#visitsGraph_slider_text\").text(\"Graph range: \" + clicksGraph_cols[$(\"#visitsGraph_slider\").slider(\"values\", 0)].label + \" - \" + clicksGraph_cols[$(\"#visitsGraph_slider\").slider(\"values\", 1)].label);\n}", "function resetValue() {\n\tvar remainder = scrollPane.width() - scrollContent.width();\n\tvar leftVal = scrollContent.css( \"margin-left\" ) === \"auto\" ? 0 :\n\t\tparseInt( scrollContent.css( \"margin-left\" ) );\n\tvar percentage = Math.round( leftVal / remainder * 100 );\n\tscrollbar.slider( \"value\", percentage );\n}", "function reverse_resetSlider(){\n currentSlide = $('#slide'+slideCount);\n currentSlide.addClass('current-slide');\n\n $('#slide1').removeClass('current-slide');\n num = slideCount;\n }", "function restoreDefaults(){\r\n\tvar amountString = \"\";\r\n\tvar sliderString = \"\";\r\n\tfor (var i=0;i<inputs.length;i++){\r\n\t\tamountString = \"#amount\"+i;\r\n\t\tsliderString = \"#slider\"+i;\r\n\t\t$(amountString).val(getInputDefault(i));\r\n\t\t$(sliderString).slider('value',getInputDefault(i));\r\n\t}\r\n}", "function sliders() {\n\tif ($('.js-slider-list').length) {\n\t\tvar slideShowCfg = {\n\t\t\tdots: false,\n\t\t\tinfinite: true,\n\t\t\tspeed: 1300,\n\t\t\tappendArrows: $('.js-slider-arrows'),\n\t\t\tslidesToShow: 1,\n\t\t\tprevArrow: '<span class=\"sl_arw slick-arrow__prev\"><i class=\"fa fa-angle-left\" aria-hidden=\"true\"></i></span>',\n\t\t\tnextArrow: '<span class=\"sl_arw slick-arrow__next\"><i class=\"fa fa-angle-right\" aria-hidden=\"true\"></i></span>'\n\t\t}\n\t\t$('.js-slider-list').on('init reInit afterChange', function (event, slick, currentSlide, nextSlide) {\n\t\t\t//currentSlide is undefined on init -- set it to 0 in this case (currentSlide is 0 based)\n\t\t\tvar i = (currentSlide ? currentSlide : 0) + 1;\n\t\t\t$('.js-slider-info .slider__counter-all').text(slick.slideCount);\n\t\t\t$('.js-slider-info .slider__counter-current').text(i);\n\t\t});\n\t\t$('.js-slider-list').slick(slideShowCfg);\n\t}\n}", "function initSliders() {\n\t\tvar $sliderList = $(sliderSelector);\n\t\tvar i = $sliderList.length;\n\t\tvar $slider;\n\t\tvar carousel;\n\n\t\twhile (i--) {\n\t\t\t$slider = $($sliderList[i]);\n\n\t\t\tif ($slider.data('loaded') !== 'true') {\n\t\t\t\tcarousel = new Carousel($slider);\n\t\t\t\tcarousel.init();\n\t\t\t}\n\t\t}\n\t}", "function setUpSliders(){\n prevYear.addEventListener(\"click\",function() {\n yearHolder.textContent--; \n eraseForYears(); \n }, false);\n nextYear.addEventListener(\"click\",function() {\n yearHolder.textContent++;\n eraseForYears();\n }, false);\n prevMonth.addEventListener(\"click\",function () {\n if (currentDate.getMonth()!==0) {\n monthHolder.textContent = monthNames[currentDate.getMonth()-1]; \n currentDate.setMonth(currentDate.getMonth()-1);\n }else{\n monthHolder.textContent = monthNames[11];\n currentDate.setMonth(11);\n yearHolder.textContent--;\n currentDate.setFullYear(yearHolder.textContent);\n }\n eraseForMonths(); \n },false); \n\n nextMonth.addEventListener(\"click\",function () {\n if (currentDate.getMonth()!==11) {\n monthHolder.textContent = monthNames[currentDate.getMonth()+1]; \n currentDate.setMonth(currentDate.getMonth()+1);\n }else{\n monthHolder.textContent = monthNames[0];\n currentDate.setMonth(0);\n yearHolder.textContent++;\n currentDate.setFullYear(yearHolder.textContent);\n }\n eraseForMonths();\n },false); \n\n}", "function matchFormToModel() {\n maxspdslider[0].value = tsdParams.maxspdslider;\n\t scaleslider[0].value = tsdParams.scaleslider;\n }", "function resetGraphValuesBeforeRendering (){\n listOfAllGraphElements = [];\n remainingGraphsForAdding = [];\n clearInterval(graphsRenderedInterval);\n graphsRenderedInterval = null;\n }", "function resetDefaults() {\n controls.timeSlider.value = 500;\n app.setTimeScale(controls.timeSlider.value / 1000);\n if (!controls.threePlanetCheckbox.checked) {\n controls.planet1.x.value = EARTH.x;\n controls.planet1.y.value = EARTH.y;\n controls.planet1.z.value = EARTH.z;\n controls.planet1.vx.value = EARTH.vx;\n controls.planet1.vy.value = EARTH.vy;\n controls.planet1.vz.value = EARTH.vz;\n controls.planet1.mass.value = EARTH.mass;\n\n controls.planet2.x.value = MOON.x;\n controls.planet2.y.value = MOON.y;\n controls.planet2.z.value = MOON.z;\n controls.planet2.vx.value = MOON.vx;\n controls.planet2.vy.value = MOON.vy;\n controls.planet2.vz.value = MOON.vz;\n controls.planet2.mass.value = MOON.mass;\n } else {\n controls.planet1.x.value = THREE_BODY_345[0].x;\n controls.planet1.y.value = THREE_BODY_345[0].y;\n controls.planet1.z.value = THREE_BODY_345[0].z;\n controls.planet1.vx.value = THREE_BODY_345[0].vx;\n controls.planet1.vy.value = THREE_BODY_345[0].vy;\n controls.planet1.vz.value = THREE_BODY_345[0].vz;\n controls.planet1.mass.value = THREE_BODY_345[0].mass;\n\n controls.planet2.x.value = THREE_BODY_345[1].x;\n controls.planet2.y.value = THREE_BODY_345[1].y;\n controls.planet2.z.value = THREE_BODY_345[1].z;\n controls.planet2.vx.value = THREE_BODY_345[1].vx;\n controls.planet2.vy.value = THREE_BODY_345[1].vy;\n controls.planet2.vz.value = THREE_BODY_345[1].vz;\n controls.planet2.mass.value = THREE_BODY_345[1].mass;\n\n controls.planet3.x.value = THREE_BODY_345[2].x;\n controls.planet3.y.value = THREE_BODY_345[2].y;\n controls.planet3.z.value = THREE_BODY_345[2].z;\n controls.planet3.vx.value = THREE_BODY_345[2].vx;\n controls.planet3.vy.value = THREE_BODY_345[2].vy;\n controls.planet3.vz.value = THREE_BODY_345[2].vz;\n controls.planet3.mass.value = THREE_BODY_345[2].mass;\n }\n}", "function refreshSettings() {\n _valueUpperMultiplier = _valueMultiplier * _valueRange;\n _displayUpperMultiplier = _displayMultiplier * _displayRange;\n }", "function ResetAverageNightlyRateSlider(min,max,posMin,posMax,minRange,maxRange){\n $('#slider_minPrice').html('min: <span class=\"bold\">'+minPrice+'</span>');\n $('#slider_maxPrice').html('max: <span class=\"bold\">'+maxPrice+'</span>');\n $(\"#average_nigthlyRate\").val(minRange + ' - ' + maxRange);\n $(\"#info_average_nigthlyRate\").html(minRange + ' - ' + maxRange);\n\n $(\"#slider_average_nigthlyRate\").slider( \"destroy\" );\n $(\"#slider_average_nigthlyRate\").slider({\n range: true,\n min: min,\n max: max,\n values: [minRange, maxRange],\n slide: function(event, ui) {\n $(\"#average_nigthlyRate\").val(ui.values[0] + ' - ' + ui.values[1]);\n $(\"#info_average_nigthlyRate\").html(ui.values[0] + ' - ' + ui.values[1]);\n }\n });\n\n $( \"#slider_average_nigthlyRate\").slider({\n stop: function(event, ui) {\n $('#average_nightly_rate').next('a.remove-small').show();\n sendFilterRequest($(this));\n }\n });\n\n /*\n\n $(\"#slider_average_nigthlyRate\").slider2( \"destroy\" );\n $(\"#slider_average_nigthlyRate\").slider2({\n range: true,\n min: min,\n max: max,\n posMin: posMin,\n posMax: posMax,\n values: [minRange, maxRange],\n slide: function(event, ui) {\n $(\"#average_nigthlyRate\").val(ui.values[0] + ' - ' + ui.values[1]);\n $(\"#info_average_nigthlyRate\").html(ui.values[0] + ' - ' + ui.values[1]);\n }\n });\n\n $( \"#slider_average_nigthlyRate\").slider2({\n stop: function(event, ui) {\n $('#average_nightly_rate').next('a.remove-small').show();\n sendFilterRequest($(this));\n }\n });\n\n */\n}", "function updateSlider() {\n\n // Empty input field\n if (volumeNumber.value === \"\") {\n volumeSlider.value = 0;\n volumeImage.src = \"./assets/media/icons/volume-level-0.svg\";\n\n // Input Field Range 1 to 100\n } else {\n if (volumeNumber.value == 0) {\n volumeImage.src = \"./assets/media/icons/volume-level-0.svg\";\n } else if (1 <= volumeNumber.value && volumeNumber.value <= 33) {\n volumeImage.src = \"./assets/media/icons/volume-level-1.svg\";\n } else if (34 <= volumeNumber.value && volumeNumber.value <= 66) {\n volumeImage.src = \"./assets/media/icons/volume-level-2.svg\";\n } else if (67 <= volumeNumber.value && volumeNumber.value <= 100) {\n volumeImage.src = \"./assets/media/icons/volume-level-3.svg\";\n } else {\n volumeNumber.value = 100;\n }\n volumeSlider.value = volumeNumber.value;\n }\n}", "function reset() {\n for(let i = 0; i < slides.length; i++) {\n slides[i].style.display = 'none';\n }\n }", "function loadSmallSlider() {\n\tpmmViewer.firstSlider.stopAuto();\n\tpmmViewer.firstSlider.reloadSlider({\n\t \tautoControls: false, \n auto: false, \n slideWidth: 0, \n minSlides: 1, \n maxSlides: 1, \n moveSlides: 0, \n slideMargin: 0 \n\t});\n}", "function setSliders() {\n let colorToChange =\n document.querySelector(\"#colorToChange\").style.backgroundColor;\n // console.log(246, colorToChange, typeof colorToChange);\n colorToChange = colorToChange\n .substring(4, colorToChange.length - 1)\n .split(\", \");\n // console.log(250, colorToChange);\n colorToChange = colorToChange.map((elem) => (elem = parseInt(elem)));\n console.log(252, colorToChange);\n const rangeRed = document.querySelector(\"#rangeRed\");\n const rangeGreen = document.querySelector(\"#rangeGreen\");\n const rangeBlue = document.querySelector(\"#rangeBlue\");\n rangeRed.value = colorToChange[0];\n rangeGreen.value = colorToChange[1];\n rangeBlue.value = colorToChange[2];\n console.log(\n 260,\n \"Sliders were set to:\",\n rangeRed.value,\n rangeGreen.value,\n rangeBlue.value\n );\n}", "function onChange()\n\t{\n\t\t// decide if we need sliders based on new content size. default is they are hidden\n\t\t// we update both h and v sliders even when only content.width is changed as it's possible that both sliders\n\t\t// will hide/show based on the change in content.width alone\n\t\thslider.hide = true; \n\t\tvslider.hide = true; \n\t\tif (content.width > display.width) hslider.hide = false; \n\t\tif (content.height > display.height) vslider.hide = false; \n\t\tif ((content.width > display.width - t) && (content.height > display.height)){ hslider.hide = false; } \n\t\tif ((content.height > display.height - t) && (content.width > display.width)){ vslider.hide = false; } \n\n\t\t// now that we know which slider(v/s) is enabled, update their sizes\n\t\t// we set a rule that sliders will try to fill container.size. e.g. if vslider is hidden, hslider.height = container.height\n\t\t// both h and s sliders to be updated as it's possible that both slides will hide/show based on change in content.width alone\n\t\t//if (!hslider.hide){ hslider.width = w - (vslider.hide? 0 : t); }\n\t\t//if (!vslider.hide){ vslider.height = h - (hslider.hide? 0 : t); }\n\t\thslider.width = hslider.hide? 0: (w - (vslider.hide? 0 : t)); \n\t\tvslider.height = vslider.hide? 0 : (h - (hslider.hide? 0 : t)); \n\n\t\t// set slider's min/max. max value is calculated as the value difference between content size and display size.\n\t\t// the excess size of content will be the scroll size of slider. if content size < display size, max < 0 but slider class will \n\t\t// handle this properly and fix the thumbsize and its position to ensure no undesired behavior occurs\n\t\t// since both h and s sliders might have hide/show from this change, update max for both sliders\n\t\tvslider.min = 0; // min = 0, default.\n\t\thslider.min = 0; // min = 0, default.\n\t\tvslider.max = content.height - display.height + (hslider.hide? 0 : t);\n\t\thslider.max = content.width - display.width + (vslider.hide? 0 : t);\n\n\t\t// we want thumbsize to be based on ratio between content.size and frame.size. slider size is expected to fill frame size\n\t\t// but if both sliders (h and v), slider.size = frame.size - slider.t \n\t\t// since both v and h sliders might have changed their sizes, we update both thumbsize\n\t\tvslider.thumbsize = display.height / content.height * (vslider.height - (hslider.hide? 0 : t));\n\t\thslider.thumbsize = display.width / content.width * (hslider.width - (vslider.hide? 0 : t));\n\n\t\t// let's set min value for thumbsize, 32, because if content.size is too big, thumbsize will be too small to click.\n\t\tif (vslider.thumbsize < 32) vslider.thumbsize = 32;\n\t\tif (hslider.thumbsize < 32) hslider.thumbsize = 32;\n\t}", "function resetValues () {\n Preferences.set('visualCascade', false);\n Preferences.set('browsers', Preferences.defaults.browsers);\n\n init();\n }", "function refreshGui() {\n gui.__controllers.forEach(controller => controller.setValue(controller.initialValue));\n }", "function reset() {\r\n for (let i = 0; i < slides.length; i++) {\r\n slides[i].style.display = \"none\";\r\n }\r\n}", "render_() {\n super.render_();\n this.updateSlider_();\n }", "function reset() {\n window.clearInterval(interval)\n interval = window.setInterval(() => {\n nextSlide(1);\n }, 5000);\n}", "restart_values() {\n this.initialize_values();\n this.model.restart();\n this.view.restart();\n this.client.restart();\n this.deselectCurrentPiece();\n this.view.marker.indicatorFlag = true;\n this.scene.reset = false;\n }", "function onSliderChange() {\n sw = slider.value;\n}", "function reset() {\n\n // Match the slider to the material selected.\n if (MATERIALS[controls.material.value] !== controls.k.value) {\n if (controls.material.value === OTHER_MATERIAL) {\n for (material in MATERIALS) {\n if (MATERIALS[material] === controls.k.value) {\n controls.material.select(material);\n break;\n }\n }\n } else {\n controls.material.select(OTHER_MATERIAL)\n }\n }\n \n // Calculate the transfer of heat between both objects.\n heatTransfer = ((controls.k.value * controls.barArea.value) * (controls.t1.value - controls.t2.value)) / controls.barLength.value;\n labels.heatTransfer.set(heatTransfer);\n\n // Calculate the block's colors.\n if (controls.t1.value === controls.t2.value) {\n t1Color = [0,0,0];\n t2Color = [0,0,0];\n } else {\n t1Color = controls.t1.value > controls.t2.value ? [255,0,0] : [0,0,255];\n t2Color = controls.t1.value < controls.t2.value ? [255,0,0] : [0,0,255];\n }\n\n // Set the sliders' color.\n controls.t1.setColor(shadeColor(t1Color, 40));\n controls.t2.setColor(shadeColor(t2Color, 40));\n\n // Bar dimensions.\n barLength = controls.barLength.value;\n barWidth = Math.sqrt(controls.barArea.value);\n\n // Dimensions of the arrow.\n arrowBodyW = heatTransfer / 100;\n\n}", "function refreshData(){\n sliderData.danceability = sliderDance.value / 100;\n sliderData.energy = sliderEnergy.value / 100;\n sliderData.valence = sliderValence.value / 100;\n sliderData.tempo = ((sliderTempo.value / 100) * 155 + 55); // max = 205, min = 57\n sliderData.loudness = ((sliderLoudness.value / 100) * 21 - 21); // max = 0, min = 23.6\n sliderData.instrumentalness = sliderInstrumentalness.value / 100;\n sliderData.speechiness = (sliderSpeechiness.value / 100) * .6;\n console.log(sliderData);\n showTracks();\n }", "function actionSliders(arr) {\n \"use strict\";\n\n //planet distance\n arr[0].noUiSlider.on('slide', function( values, handle) {\n var newvalue = values[handle];\n document.getElementById('orbdis').value = newvalue;\n });\n //planets size\n arr[1].noUiSlider.on('slide', function( values, handle) {\n var newvalue = values[handle];\n newvalue /= 5;\n newvalue = newvalue.toFixed(2);\n document.getElementById('plansize').value = newvalue;\n });\n //planet speed\n arr[2].noUiSlider.on('slide', function( values, handle) {\n var newvalue = values[handle];\n newvalue /= 20;\n newvalue = newvalue.toFixed(1);\n document.getElementById('spchange').value = newvalue;\n });\n\n}", "resetSettings() {\n document.getElementById('marot-scoring-unit').value = 'segments';\n this.mqmWeights = JSON.parse(JSON.stringify(mqmDefaultWeights));\n this.mqmSlices = JSON.parse(JSON.stringify(mqmDefaultSlices));\n this.setUpScoreSettings();\n this.updateSettings();\n }", "function setPriceValues() {\r\n\t\tlet priceStartValue;\r\n\t\tlet priceEndValue;\r\n\t\tif (priceStart.value != '') {\r\n\t\t\tpriceStartValue = priceStart.value;\r\n\t\t}\r\n\t\tif (priceEnd.value != '') {\r\n\t\t\tpriceEndValue = priceEnd.value;\r\n\t\t}\r\n\t\tpriceSlider.noUiSlider.set([priceStartValue, priceEndValue]);\r\n\t}", "function setPriceValues() {\n\t\tlet priceStartValue;\n\t\tlet priceEndValue;\n\t\tif (priceStart.value != '') {\n\t\t\tpriceStartValue = priceStart.value;\n\t\t}\n\t\tif (priceEnd.value != '') {\n\t\t\tpriceEndValue = priceEnd.value;\n\t\t}\n\t\tpriceSlider.noUiSlider.set([priceStartValue, priceEndValue]);\n\t}", "function updateAll() {\n refreshSliderDimensions();\n ngModelRender();\n }", "function updateAll() {\n refreshSliderDimensions();\n ngModelRender();\n }", "function updateAll() {\n refreshSliderDimensions();\n ngModelRender();\n }", "Init() {\n\t\tthis.leftTrack = this.node.querySelectorAll('.spectrum-Slider-track')[0]\n\t\tthis.rightTrack= this.node.querySelectorAll('.spectrum-Slider-track')[1]\n\t\tthis.handle = this.node.querySelector('.spectrum-Slider-handle')\n\t\tthis.valueOut = this.node.querySelector('.spectrum-Slider-value')\n\t\tthis.loaderNode = this.node.querySelector('.component-loader')\n\t\t\n\t\t\n\t\tlet position = this.ValueToPosition(this.settings.current)\n\t\tthis.valueOut.innerText = this.settings.current.toFixed(this.settings.floatPrecision)\n\t\tthis.MoveSlider(position)\n\t}", "function ResetVars() {\r\n mouseDisabled.fill(false);\r\n //\r\n oriPath.map(function (element) {\r\n element.Path.segments = [];\r\n element.PairInvolved = [];\r\n return element\r\n })\r\n modPath.map(function (element) {\r\n element.Path.segments = [];\r\n element.Path.visible = false;\r\n element.PairInvolved = [];\r\n return element\r\n })\r\n syncPoint.position = hidden;\r\n entryMarker.map(function (element) {\r\n element.position = hidden;\r\n return element\r\n })\r\n cpaLine.map(function (element) {\r\n element.firstSegment.point = hidden;\r\n element.lastSegment.point = hidden;\r\n return element\r\n })\r\n cpaCircle.map(function (element) {\r\n element.position = hidden;\r\n return element\r\n })\r\n aircraft.map(function (element) {\r\n element.position = hidden;\r\n return element\r\n })\r\n cpaLineExtension.segments = [hidden, hidden];\r\n if (resolutionGuideCircle != null) {\r\n resolutionGuideCircle.remove(); \r\n }\r\n \r\n\r\n arrow.map(function(element) { if (element) { element.remove(); } return element });\r\n $('#speed-changer').val(1);\r\n $('#speed-ratio').html($('#speed-changer').val());\r\n $('#speed-changer').prop('disabled', false);\r\n\r\n \r\n // Reset num of pair and array of cpa line indeces\r\n numOfPair = 0;\r\n for (var i = 0; i < n - 1; i++) {\r\n liveCpaIdx[i] = []; \r\n for (var j = i + 1; j < n; j++) {\r\n liveCpaIdx[i][j] = numOfPair;\r\n numOfPair++;\r\n }\r\n }\r\n scenResolution = [];\r\n currentScore = 0;\r\n\r\n // $('#play-conflict-btn').prop('disabled', true);\r\n // $('#play-resolution-btn').prop('disabled', true);\r\n $('#current-score').html('...');\r\n $('#is-conflict').prop('checked', false);\r\n $('#no-conflict').prop('checked', false);\r\n $('#is-conflict').prop('disabled', false);\r\n $('#no-conflict').prop('disabled', false);\r\n}", "function adjustSliderValue(){\n if(scroll_value[0]>scroll_value[1]){\n scroll_value[1]=[scroll_value[0], scroll_value[0]=scroll_value[1]][0];\n index==0?index=1:index=0;\n }\n refreshUI(true);\n}", "function updateMortalitySlider(valA, valB){\n $('.mortality-slider').slider(\"values\", 0, valA)\n $(\".mortality-rate-slider.lower-handle\").text(valA)\n $('.mortality-slider').slider(\"values\", 1, valB)\n $(\".mortality-rate-slider.upper-handle\").text(valB)\n}", "function slidersValue() {\n document.querySelector(\"#redValue\").innerHTML =\n document.querySelector(\"#rangeRed\").value;\n document.querySelector(\"#greenValue\").innerHTML =\n document.querySelector(\"#rangeGreen\").value;\n document.querySelector(\"#blueValue\").innerHTML =\n document.querySelector(\"#rangeBlue\").value;\n}", "function init_sliders(){\n // START MAIN SLIDER\n slidr_level_1 = slidr.create('slidr-level-1', {\n after: function(e) { console.log('in: ' + e.in.slidr); },\n before: function(e) { console.log('out: ' + e.out.slidr); },\n breadcrumbs: false,\n controls: 'none',\n direction: 'horizontal',\n fade: false,\n keyboard: true,\n overflow: true,\n pause: false,\n theme: '#222',\n timing: { 'cube': '0.5s ease-in' },\n touch: true,\n transition: 'linear'\n }).start();\n\n // START HOME CAROUSEL SLIDER\n slidr_carousel = slidr.create('slidr-carousel', {\n after: function(e) { console.log('in: ' + e.in.slidr); },\n before: function(e) { console.log('out: ' + e.out.slidr); },\n breadcrumbs: false,\n controls: 'none',\n direction: 'horizontal',\n fade: false,\n keyboard: true,\n overflow: true,\n pause: false,\n theme: '#222',\n timing: { 'cube': '1s ease-in' },\n touch: true,\n transition: 'fade',\n }).start(); \n\n slidr_carousel.auto(10000); \n slidr_carousel.add('h', looping_slides_count);\n // carousel_slide_count[i - 1] = (i.toString());\n\n // carousel_slide_count.push('1');\n}", "function updateAll() {\n refreshSliderDimensions();\n ngModelRender();\n redrawTicks();\n }", "function setSlider(curscale) {\n if (myslider) {\n var sliderPos = getSliderPosition(curscale);\n myslider.setPosition(sliderPos);\n if (_$('refsliderbox')) hideObj(_$('refsliderbox'));\n }\n return false;\n}", "function updateDeathPrecentSlider(valA, valB){\n $('.deathPercentage-slider').slider(\"values\", 0, valA)\n $(\".deathPercentage-rate-slider.lower-handle\").text(valA)\n $('.deathPercentage-slider').slider(\"values\", 1, valB)\n $(\".deathPercentage-rate-slider.upper-handle\").text(valB)\n}", "function drawSliders() {\n\n noUiSlider.create(nodeSlider, {\n start: [ 8 ],\n connect: 'lower',\n tooltips: [ true ],\n range: {\n 'min': [ 0 ],\n 'max': [ 16 ]\n }\n });\n\n noUiSlider.create(edgeSlider, {\n start: [ 1 ],\n connect: 'lower',\n tooltips: [ true ],\n range: {\n 'min': [ 0 ],\n 'max': [ 4 ]\n }\n });\n\n noUiSlider.create(tensionSlider, {\n start: [ 0.7 ],\n connect: 'lower',\n tooltips: [ true ],\n range: {\n 'min': [ 0 ],\n 'max': [ 1 ]\n }\n });\n\n noUiSlider.create(weightSlider, { \n start: [ 0, MAXWEIGHT ],\n connect: true,\n tooltips: [ true, true ],\n range: {\n 'min': [ 0 ],\n '20%': [ MAXWEIGHT*0.0016 ],\n '40%': [ MAXWEIGHT*0.008 ],\n '60%': [ MAXWEIGHT*0.04 ],\n '80%': [ MAXWEIGHT*0.2 ],\n 'max': [ MAXWEIGHT ]\n }\n });\n\n noUiSlider.create(inSlider, {\n start: [ MAXIN ],\n connect: 'lower',\n tooltips: [ toInt ],\n step: 1,\n range: {\n 'min': [ 0 ],\n '20%': [ MAXIN*0.0016 ],\n '40%': [ MAXIN*0.008 ],\n '60%': [ MAXIN*0.04 ],\n '80%': [ MAXIN*0.2 ],\n 'max': [ MAXIN ]\n }\n });\n\n noUiSlider.create(outSlider, {\n start: [ MAXOUT ],\n connect: 'lower',\n tooltips: [ toInt ],\n step: 1,\n range: {\n 'min': [ 0 ],\n '20%': [ MAXOUT*0.0016 ],\n '40%': [ MAXOUT*0.008 ],\n '60%': [ MAXOUT*0.04 ],\n '80%': [ MAXOUT*0.2 ],\n 'max': [ MAXOUT ]\n }\n });\n\n isDrawn = true;\n updateSliders();\n}", "function setUpPyramidSlider() {\r\n // Setter\r\n\r\n $(\"#pyramid-slider\").slider(\"option\", \"value\", Number(aleph.years[0]));\r\n $(\"#pyramid-slider\").slider(\"option\", \"min\", Number(aleph.years[0]));\r\n $(\"#pyramid-slider\").slider(\r\n \"option\",\r\n \"max\",\r\n Number(aleph.years[aleph.years.length - 1])\r\n );\r\n\r\n return;\r\n} // end function setUpPyramidSlider", "function updateSlider() {\n $(sliderID).val(animationIndex);\n $(sliderID + \"Display\").text(animationIndex);\n return 0;\n}", "_reset() {\n // Don't do anything if there are no slides (first run)\n if (typeof this.$slides == 'undefined') {\n return;\n }\n\n if (this.$slides.length > 1) {\n // Remove old events\n this.$element.off('.zf.orbit').find('*').off('.zf.orbit')\n\n // Restart timer if autoPlay is enabled\n if (this.options.autoPlay) {\n this.timer.restart();\n }\n\n // Reset all sliddes\n this.$slides.each(function(el) {\n $(el).removeClass('is-active is-active is-in')\n .removeAttr('aria-live')\n .hide();\n });\n\n // Show the first slide\n this.$slides.first().addClass('is-active').show();\n\n // Triggers when the slide has finished animating\n this.$element.trigger('slidechange.zf.orbit', [this.$slides.first()]);\n\n // Select first bullet if bullets are present\n if (this.options.bullets) {\n this._updateBullets(0);\n }\n }\n }", "function updateNum_Slider() {\n outStyle(false);\n let aE = document.activeElement;\n if (aE.hasAttribute(\"mirr\")) {\n let aMirrorE = document.getElementById(aE.getAttribute(\"mirr\"));\n if (!aE.value) {\n aE.value = 0;\n }\n aMirrorE.value = aE.value;\n\n if (aE.id.substr(0, 1) === \"T\") {\n let switchE = aE;\n aE = aMirrorE;\n aMirrorE = switchE;\n }\n if (aE.value === \"0\") {\n aMirrorE.value = \"\"\n }\n colorCode(aE);\n\n let iElements = document.getElementById(\"outer\").querySelectorAll(\"input\");\n for (let i = 0; i < iElements.length; i++) {\n iElements[i].value = iElements[i].value;// Needed for refreshing style after undetected (webkit\\autofill ?) changes\n }\n }\n}", "function resetSlide() {\n gsap.to(\".reset\", { duration: 1, x: \"100%\" });\n}", "updateSlider() {\n this.drawImages(this.imagesCollection);\n }", "function set_sliders(subject)\n{\n $(\".angst-nslider\").slider(\n {\n\t range: \"min\",\n\t min: 0,\n\t max: 100,\n\t value: 60,\n\t slide: function(event, ui)\n\t {\n\t var id = this.id.split(\"-\")[1];\n $(\"#angst-\" + id + \"-text\").val(ui.value/10);\n update_result(subject);\n }\n });\n \n // Set the starting value for the text inputs\n $(\".angst-ntext\").val(6.0);\n \n // Sync the text inputs with the sliders\n $(\".angst-ntext\").keyup(\n function (event)\n {\n var slider_id = this.id.split(\"-\")[1];\n var value = $(\"#angst-\" + slider_id + \"-text\").val();\n $(\"#angst-\" + slider_id + \"-slider\").slider(\"value\", value * 10);\n update_result(subject);\n });\n}", "function updateSliders() {\n\n fillToggle.addEventListener('change', function(){\n\n fillnode = (fillnode === \"transparent\") ? \"#bbb\" : \"transparent\";\n d3.selectAll(\"#node-text\").style(\"fill\", fillnode);\n console.log(fillnode);\n });\n\n edgeToggle.addEventListener('change', function(){\n\n hoverlink = !hoverlink;\n });\n\n nodeSlider.noUiSlider.on('update', updateNode);\n\n nodeIn.addEventListener('change', function(){\n nodeSlider.noUiSlider.set(this.value);\n });\n\n edgeSlider.noUiSlider.on('update', updateEdge);\n\n edgeIn.addEventListener('change', function(){\n edgeSlider.noUiSlider.set(this.value);\n });\n\n tensionSlider.noUiSlider.on('update', updateTension);\n\n tensionIn.addEventListener('change', function(){\n tensionSlider.noUiSlider.set(this.value);\n });\n\n weightSlider.noUiSlider.on('update', updateWeight);\n\n weightMinInput.addEventListener('change', function(){\n weightSlider.noUiSlider.set([this.value, weightMax]);\n });\n\n weightMaxInput.addEventListener('change', function(){\n weightSlider.noUiSlider.set([weightMin, this.value]);\n });\n\n inSlider.noUiSlider.on('update', updateIn);\n\n inIn.addEventListener('change', function(){\n inSlider.noUiSlider.set(this.value);\n });\n\n outSlider.noUiSlider.on('update', updateOut);\n\n outIn.addEventListener('change', function(){\n outSlider.noUiSlider.set(this.value);\n });\n}", "function setSliderHandle(i, value, parent, varArgs, resetEnd, type, varVals=null, varLims=null) {\n\t//resetEnd : 0=don't reset; 1=reset if value > max; 2=reset always\n //console.log(i, value, parent, varArgs, resetEnd, type)\n\n\t//reset the slider limits\n\tvar min = parent.noUiSlider.options.range.min[0];\n\tvar max = parent.noUiSlider.options.range.max[0];\n\tif (typeof parseFloat(min) === \"number\" && typeof parseFloat(max) === \"number\" && !isNaN(min) && !isNaN(max)){\n\t\tvar minReset = min;\n\t\tvar maxReset = max;\n\t\tif ((i == 0 && type == \"double\") && resetEnd[0] == 2 || (resetEnd[0] == 1 && value < min)) minReset = parseFloat(value);\n\t\tif ((i == 1 || type == \"single\") && resetEnd[1] == 2 || (resetEnd[1] == 1 && value > max)) maxReset = parseFloat(value);\n\n\t\tmaxReset = Math.max(minReset + 0.0001*Math.abs(minReset), maxReset); //in case user makes a mistake\n\t\tparent.noUiSlider.updateOptions({\n\t\t\trange: {\n\t\t\t\t'min': [minReset],\n\t\t\t\t'max': [maxReset]\n\t\t\t}\n\t\t});\n\n\t\tif (varVals) varVals[i] = parseFloat(value);\t\n\t\tif (varLims) varLims[i] = parseFloat(value);\n\n\t\t//reset the slider value\n\t\tvar r = parent.noUiSlider.get()\n\t\tif (Array.isArray(r)) r[i] = value; else r = value; //this could also be type 'double' vs. 'single'\n\t\tparent.noUiSlider.set(r);\n\n\n\t\t//update the attached variables (already taken care of when we change the slider value)\n\t\tupdateUIValues(parseFloat(value), varArgs, i, type);\n\t}\n\n}", "function initSliderPositions() {\n // console.log('Init Slider Pos runs');\n sliders.forEach(slider => {\n if (slider.name === 'hue') {\n // Get the correct color from the array based on the data atttribute of the current slider\n // which will have the correct number for the index based on which group the slider is in\n const color = colorsArr[slider.getAttribute('data-hue')];\n // Extract the hue from that color and save it\n const hueValue = Math.floor(chroma(color).hsl()[0]);\n // console.log(hueValue);\n // set the current slider's value to the hue\n slider.value = hueValue;\n } else if (slider.name === 'saturation') {\n const color = colorsArr[slider.getAttribute('data-sat')];\n const saturationValue = Math.floor(chroma(color).hsl()[1] * 100) / 100;\n slider.value = saturationValue;\n } else {\n const color = colorsArr[slider.getAttribute('data-bright')];\n const brightnessValue = Math.floor(chroma(color).hsl()[2] * 100) / 100;\n slider.value = brightnessValue;\n }\n });\n}", "function setRangeRings() {\n SiteCirclesCount = Number(localStorage['SiteCirclesCount']) || DefaultSiteCirclesCount;\n SiteCirclesBaseDistance = Number(localStorage['SiteCirclesBaseDistance']) || DefaultSiteCirclesBaseDistance;\n SiteCirclesInterval = Number(localStorage['SiteCirclesInterval']) || DefaultSiteCirclesInterval;\n\n // Populate text fields with current values\n $('#range_ring_count').val(SiteCirclesCount);\n $('#range_ring_base').val(SiteCirclesBaseDistance);\n $('#range_ring_interval').val(SiteCirclesInterval);\n}", "_update() {\n const _this = this;\n\n _this._updateEls();\n \n for (let i = 0; i < this.o.numSliders; ++i) {\n let sliderPos = _this._calcSliderPos(i);\n\n this.svgEls.sliders[i].setAttribute(\"x\", sliderPos.x);\n this.svgEls.sliders[i].setAttribute(\"y\", sliderPos.y);\n this.svgEls.sliders[i].setAttribute(\"width\", _this._calcSliderWidth());\n this.svgEls.sliders[i].setAttribute(\"height\", _this._calcSliderHeight(i));\n this.svgEls.sliders[i].setAttribute(\"fill\", this.o.sliderColors[i % this.o.sliderColors.length]);\n\n this.svgEls.sliderPanels[i].setAttribute(\"x\", sliderPos.x);\n this.svgEls.sliderPanels[i].setAttribute(\"y\", 0);\n this.svgEls.sliderPanels[i].setAttribute(\"width\", _this._calcSliderWidth());\n this.svgEls.sliderPanels[i].setAttribute(\"height\", _this._getHeight());\n this.svgEls.sliderPanels[i].setAttribute(\"fill\", \"transparent\");\n }\n\n // set background panel color\n this.svgEls.panel.setAttribute(\"x\", 0);\n this.svgEls.panel.setAttribute(\"y\", 0);\n this.svgEls.panel.setAttribute(\"width\", _this._getWidth());\n this.svgEls.panel.setAttribute(\"height\", _this._getHeight());\n this.svgEls.panel.setAttribute(\"fill\", this.o.backgroundColor);\n }", "function update_shown_Values(){\r\n document.getElementById(\"spfVal\").innerHTML = document.getElementById(\"spf_slider\").value;\r\n document.getElementById(\"tzVal\").innerHTML = document.getElementById(\"tz_slider\").value;\r\n document.getElementById(\"blVal\").innerHTML = document.getElementById(\"bl_slider\").value;\r\n document.getElementById(\"oriVal\").innerHTML = document.getElementById(\"origin_slider\").value;\r\n document.getElementById(\"apiVal\").innerHTML = document.getElementById(\"api_slider\").value;\r\n document.getElementById(\"neededScore\").innerHTML = document.getElementById(\"needed_score_slider\").value;\r\n}" ]
[ "0.7628209", "0.7251419", "0.72083306", "0.71073145", "0.70902073", "0.6980939", "0.69463676", "0.6939594", "0.6917399", "0.69089", "0.6896507", "0.6841375", "0.6782023", "0.67698926", "0.67694366", "0.6759647", "0.67298335", "0.6695782", "0.6692537", "0.66919786", "0.6686274", "0.6681139", "0.66797286", "0.66667235", "0.6629153", "0.6626418", "0.6620609", "0.65843767", "0.65628034", "0.6549158", "0.6546288", "0.6541321", "0.65376323", "0.6521214", "0.65097725", "0.64931923", "0.6490928", "0.648119", "0.6478706", "0.6459822", "0.64219296", "0.641944", "0.63983124", "0.6389862", "0.6379783", "0.63321173", "0.63239014", "0.6319167", "0.6273403", "0.6212127", "0.6183105", "0.6165715", "0.61647666", "0.61622083", "0.6160849", "0.6154982", "0.6147685", "0.6137729", "0.6133719", "0.61175275", "0.60989547", "0.6076494", "0.6073815", "0.60719466", "0.6071536", "0.6059641", "0.6050783", "0.6040195", "0.60342014", "0.6031454", "0.6031224", "0.6027391", "0.60222936", "0.60096353", "0.6007888", "0.6005899", "0.6005899", "0.6005899", "0.60000914", "0.59976894", "0.59939504", "0.59909433", "0.59846836", "0.59729195", "0.59711087", "0.5969469", "0.5967717", "0.596556", "0.5964053", "0.59629375", "0.5960218", "0.5954403", "0.59495735", "0.59485435", "0.5935809", "0.59350824", "0.5920583", "0.59193456", "0.5917933", "0.590991", "0.5909891" ]
0.0
-1
Assumes that there are at least one substrate, at least one product, exactly one enzyme, and exactly one boolean for reversible/irreversible
function parseThrough(stringToParse) { //on chrome the wrong information is being stored as an enzyme try { var tmpArr = stringToParse.split(">"); } catch (e) { return null } var newArr = tmpArr[1].split("<"); var evenNewer = newArr[1].split(";"); // fullArr now contains // [0]: substrates (inputs) // [1]: enzyme // [2]: products (outputs) // [3]: reversible? (boolean) fullArr = [tmpArr[0], newArr[0], evenNewer[0], evenNewer[1]]; subsArr = fullArr[0].split("+"); prodArr = fullArr[2].split("+"); return [subsArr, fullArr[1], prodArr, fullArr[3]] }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isValidReaction(substrates, enzyme, products, reactionNumber) {\n //check for repeated enzymes\n for(var i = 0; i < reactionNumber; i++) {\n //compare the name of the current enzyme to that of every enzyme in the pathway already\n if(enzyme[0] == addedReactions[i]['enzyme'][0]) {\n alert('Cannot repeat enzyme: ' + enzyme[0] + \".\");\n return false;\n }\n }\n //check to see if reaction has a product and a substrate\n if(substrates.length < 1 || products.length < 1) {\n alert('Reactions must have at least one substrate and product.')\n return false;\n }\n //check to ensure no duplicate substrates\n for(var i = 0; i < substrates.length; i++) {\n for(var j = i+1; j < substrates.length; j++) {\n if(substrates[i][0] == substrates[j][0]) {\n alert('No duplicate substrates for same reaction!');\n return false;\n }\n }\n }\n //check to ensure no duplicate products\n for(var i = 0; i < products.length; i++) {\n for(var j = i+1; j < products.length; j++) {\n if(products[i][0] == products[j][0]) {\n alert('No duplicate products for same reaction!');\n return false;\n }\n }\n }\n //check to make sure every reaction besides the 1st has at least one sub\n //from previous reaction's product(s)\n if(reactionNumber >= 1) {\n previousProducts = addedReactions[reactionNumber-1][\"products\"];\n for (var i = 0; i < previousProducts.length; i++) {\n for (var j = 0; j < substrates.length; j++) {\n if (previousProducts[i][0] == substrates[j][0]) {\n return true;\n }\n }\n }\n alert(\"None of the products for reaction \" + (reactionNumber) + \" are substrates in the next reaction.\");\n return false;\n }\n //Passed error checks with flying colors :D\n return true;\n}", "existAnyArguments() {\n const {supportingSituation, supportingActionGoal, notSupportingSituation, notSupportingActionGoal} = this.state;\n return (\n (supportingSituation !== undefined && supportingSituation.length > 0) ||\n (supportingActionGoal !== undefined && supportingActionGoal.length > 0) ||\n (notSupportingSituation !== undefined && notSupportingSituation.length > 0) ||\n (notSupportingActionGoal !== undefined && notSupportingActionGoal.length > 0)\n )\n }", "_isReassignmentNeeded (productDraft, skuToProductMap) {\n const productSet = new Set()\n const productDraftSkus = this.productService.getProductDraftSkus(productDraft)\n productDraftSkus.forEach((sku) => {\n const product = skuToProductMap.get(sku)\n if (product)\n productSet.add(product)\n })\n if (productSet.size === 0) {\n // check for product matches by slug\n const products = Array.from(skuToProductMap.values())\n this._selectMatchingProductsBySlug(products, productDraft)\n .forEach(p => productSet.add(p))\n }\n if (productSet.size === 0)\n // new product from the product draft\n return false\n else if (productSet.size === 1) {\n // check if CTP product have exact SKU match with product draft\n const product = productSet.values().next().value\n const draftSkus = this.productService.getProductDraftSkus(productDraft)\n const productSkus = this.productService.getProductSkus(product)\n if (_.isEqual(draftSkus.sort(), productSkus.sort())) {\n // variants are assigned correctly, maybe we need to change product type\n const productTypeId = product.productType.id\n const productDraftTypeId = productDraft.productType.id\n if (productTypeId === productDraftTypeId)\n // product type are correct, check if product slugs are unique\n return !_.isEqual(product.masterData.staged.slug, productDraft.slug)\n }\n }\n return true\n }", "function findProduct() {\n var tally = value(typeBtns) + value(problemBtns);\n compare(tally);\n checkPorosity();\n}", "updatePurhaseState (ingredients) {\n return Object.values(ingredients).some(val => val > 0);\n }", "either(program, state) {\n const array = program.arguments[0].elements;\n return _.some(array, (sub) => {\n return isFinal(sub, state);\n });\n }", "function SellingFlagsContainer({\n inventory, inOtherCarts, shipType, freeShip,\n}) {\n let digital = false;\n if (shipType === 'digital') {\n digital = true;\n }\n return (\n <div className=\"det-selling-flags-container\">\n\n {!!digital\n && (\n <div className=\"det-featue-image\">\n <img src=\"http://localhost:3002/download.png\" alt=\"digital download\" className=\"det-selling-flag\" />\n <div className=\"det-digital-download\">digital download</div>\n </div>\n )}\n {!!freeShip\n && (\n <div className=\"det-featue-image\">\n <img src=\"http://localhost:3002/truck.png\" alt=\"delivery truck\" className=\"det-selling-flag\" />\n <div className=\"det-free-shipping\">\n <strong>Hooray!</strong>\n &nbsp;This item ships free to the US.\n </div>\n </div>\n )}\n {!!inventory\n && (\n <div className=\"det-featue-image\">\n <img src=\"http://localhost:3002/hourglass.png\" alt=\"hourglass\" className=\"det-selling-flag\" />\n <div className=\"det-low-stock\">\n <strong>Last Chance:</strong>\n &nbsp;\n {inventory}\n &nbsp;left in stock\n </div>\n </div>\n )}\n {!!inOtherCarts\n && (\n <div className=\"det-featue-image\">\n <img src=\"http://localhost:3002/cart.png\" alt=\"shopping cart\" className=\"det-selling-flag\" />\n <div className=\"det-other-carts\">\n <strong>Hot item:</strong>\n &nbsp;\n {inOtherCarts}\n &nbsp;people have this in their carts right now.\n </div>\n </div>\n )}\n </div>\n );\n}", "checkUserInput() {\r\n const {\r\n drugId1, drugId2, sample, dataset,\r\n } = this.state;\r\n return drugId1 !== 'Any' || sample !== 'Any' || dataset !== 'Any' || drugId2 !== 'Any';\r\n }", "verProductos() {\n if (productosArray.length < 1) return false;\n return productosArray;\n }", "function notRevStep(substrate, product, enzyme,\n firstRectMidX, firstRectMidY, ctx, moduleNumber) {\n\t//create starting protein\n ctx.closePath();\n ctx.beginPath();\n ctx.rect(firstRectMidX - 100, firstRectMidY - 25, 100, 50);\n ctx.fillStyle = calculateColor(moduleNumber, 1);\n ctx.fill();\n ctx.closePath();\n ctx.beginPath();\n\n\t//create arrow to second protein\n ctx.moveTo(firstRectMidX, firstRectMidY);\n ctx.arcTo(firstRectMidX + 50, firstRectMidY,\n firstRectMidX + 50, firstRectMidY + 50, 50);\n ctx.arcTo(firstRectMidX + 50, firstRectMidY + 100,\n firstRectMidX, firstRectMidY + 100, 50);\n ctx.lineTo(firstRectMidX + 10, firstRectMidY + 90);\n ctx.moveTo(firstRectMidX + 10, firstRectMidY + 110);\n ctx.lineTo(firstRectMidX, firstRectMidY + 100);\n ctx.stroke();\n\n //create second protein\n ctx.closePath();\n ctx.beginPath();\n ctx.rect(firstRectMidX - 100, firstRectMidY + 75, 100, 50);\n ctx.fillStyle = calculateColor(moduleNumber, 0);\n ctx.fill();\n ctx.closePath();\n ctx.beginPath();\n\n\t//create arrow for other substrates (inputs) into the reaction (such as ATP)\n ctx.moveTo(firstRectMidX + 100, firstRectMidY);\n ctx.arcTo(firstRectMidX + 50, firstRectMidY,\n firstRectMidX + 50, firstRectMidY + 50, 50);\n ctx.arcTo(firstRectMidX + 50, firstRectMidY + 100,\n firstRectMidX + 100, firstRectMidY + 100, 50);\n ctx.lineTo(firstRectMidX + 90, firstRectMidY + 90);\n ctx.moveTo(firstRectMidX + 90, firstRectMidY + 110);\n ctx.lineTo(firstRectMidX + 100, firstRectMidY + 100);\n ctx.fillStyle = \"black\";\n ctx.stroke();\n\n //create enzyme at center of reaction\n ctx.beginPath();\n ctx.font = \"12px Arial\";\n var fontMeasures = ctx.measureText(enzyme);\n var xCoord = firstRectMidX + 45 - (fontMeasures.width / 2);\n ctx.moveTo(xCoord, firstRectMidY + 50);\n ctx.bezierCurveTo(\n xCoord, firstRectMidY + 30,\n xCoord + fontMeasures.width + 10, firstRectMidY + 30,\n xCoord + fontMeasures.width + 10, firstRectMidY + 50);\n ctx.bezierCurveTo(\n xCoord + fontMeasures.width + 10, firstRectMidY + 70,\n xCoord, firstRectMidY + 70,\n xCoord, firstRectMidY + 50);\n ctx.fillStyle = \"white\";\n\tctx.fill();\n\n //Label the proteins(rectangles) and enzyme(oval)\n ctx.font = \"20px Arial\";\n ctx.fillStyle = \"white\";\n ctx.fillText(substrate, firstRectMidX - 90, firstRectMidY + 5);\n ctx.fillText(product, firstRectMidX - 90, firstRectMidY + 105);\n ctx.stroke();\n ctx.closePath();\n ctx.beginPath();\n ctx.fillStyle = \"black\";\n ctx.font = \"12px Arial\";\n ctx.fillText(enzyme, firstRectMidX + 50 - fontMeasures.width / 2,\n firstRectMidY + 54);\n ctx.fillText(\"ATP\", firstRectMidX + 110, firstRectMidY + 5);\n ctx.fillText(\"ADP\", firstRectMidX + 110, firstRectMidY + 105);\n ctx.stroke();\n}", "function restrictListProducts(prods, restriction) {\r\n\tlet product_names = [];\r\n var restrictions = restriction.split(',');\r\n// console.log(restrictions);\r\n\tfor (let i=0; i<prods.length; i+=1) {\r\n var productVegetarian = prods[i].vegetarian;\r\n var productGlutenFree = prods[i].glutenFree;\r\n var productOrganic = prods[i].organic;\r\n var restrictVeg = false;\r\n var restrictGlu = false;\r\n var restrictOrg = false;\r\n var None = false;\r\n// console.log(restrictions.length);\r\n \r\n if(restrictions.length >= 2){\r\n for(let j = 0; j < restrictions.length; j++){\r\n if(restrictions[j] == \"Vegetarian\") restrictVeg = true;\r\n if(restrictions[j] == \"GlutenFree\") restrictGlu = true;\r\n if(restrictions[j] == \"Organic\") restrictOrg = true;\r\n }\r\n if ((restrictVeg && restrictOrg && restrictGlu) && (productVegetarian && productOrganic && productGlutenFree)){\r\n\t\t\t product_names.push(prods[i].name + \":\" + prods[i].price);\r\n }else if ((restrictGlu && restrictVeg && !restrictOrg) && (productVegetarian && productGlutenFree)){\r\n\t\t\t product_names.push(prods[i].name + \":\" + prods[i].price);\r\n\t\t }else if ((restrictGlu && restrictOrg && !restrictVeg) && (productGlutenFree&& productOrganic)){\r\n\t\t\t product_names.push(prods[i].name + \":\" + prods[i].price);\r\n }else if ((restrictVeg && restrictOrg && !restrictGlu) && (productVegetarian && productOrganic)){\r\n\t\t\t product_names.push(prods[i].name + \":\" + prods[i].price);\r\n }\r\n }else{\r\n if ((restrictions[0] == \"Vegetarian\") && (productVegetarian)){\r\n product_names.push(prods[i].name + \":\" + prods[i].price);\r\n }else if ((restrictions[0] == \"GlutenFree\") && (productGlutenFree)){\r\n product_names.push(prods[i].name + \":\" + prods[i].price);\r\n }else if ((restrictions[0] == \"Organic\") && (productOrganic)){\r\n product_names.push(prods[i].name + \":\" + prods[i].price);\r\n }else if (restrictions[0] == \"None\"){\r\n product_names.push(prods[i].name + \":\" + prods[i].price);\r\n }\r\n }\r\n \r\n\r\n\t}\r\n\treturn product_names;\r\n}", "updatePurchaseState(updatedIngredients) {\n\n const sum = Object.values(updatedIngredients)\n .reduce((sum, el) => {\n return sum + el;\n }, 0)\n this.setState({ purchaseable: sum > 0 })\n }", "function meetsDietaryRequirements(mi) {\n gluteninput = document.getElementById(\"glutencheckbox\");\n vegetarianinput = document.getElementById(\"vegetariancheckbox\");\n veganinput = document.getElementById(\"vegancheckbox\");\n\n if (!gluteninput.checked || (gluteninput.checked === true\n & mi.dataset.glutenfree === \"true\")) {\n if (!vegetarianinput.checked || (vegetarianinput.checked === true\n & mi.dataset.vegetarian === \"true\")) {\n if (!veganinput.checked || (veganinput.checked === true & mi.dataset.vegan\n === \"true\")) {\n return true;\n }\n }\n }\n return false;\n\n}", "function truePossibilities(input) {\n return input.some(row => row.some(element => element));\n // you could consider renaming element to isTrue, so that the reader\n // won't scratch his head and think about why you're just returning the element\n // return input.some(row => row.some(isTrue => isTrue));\n}", "function restrictListProducts(prods, restrictions) {\n\tvar lactoseFree = false;\n\tvar nutFree = false;\n\tvar organic = false;\n\tif (restrictions.length > 0){\n\t\tfor (i = 0; i < restrictions.length; i++) { \n\t\t\tif (restrictions[i] == \"organic\"){\n\t\t\t\torganic = true;\n\t\t\t}\n\t\t\telse if (restrictions[i] == \"nutFree\"){\n\t\t\t\tnutFree = true;\n\t\t\t}\n\t\t\telse if (restrictions[i] == \"lactoseFree\"){\n\t\t\t\tlactoseFree = true;\n\t\t\t}\n\t\t}\n\t}\n\t\n\tlet product_names = [];\n\t\n\tfor (let i=0; i<prods.length; i+=1) {\n\t\tif ((lactoseFree == true) && (nutFree == true)&& (organic == true) && (prods[i].lactoseFree == true) && (prods[i].organic == true) && (prods[i].nutFree == true)){\n\t\t\tproduct_names.push(prods[i]);\n\t\t}\n\t\telse if ((lactoseFree == true) && (nutFree == true) && (organic == false) && (prods[i].lactoseFree == true) && (prods[i].nutFree == true)){\n\t\t\tproduct_names.push(prods[i]);\n\t\t}\n\t\telse if ((lactoseFree == true) && (organic == true) && (nutFree == false) && (prods[i].lactoseFree == true) && (prods[i].organic == true)){\n\t\t\tproduct_names.push(prods[i]);\n\t\t}\n\t\telse if ((nutFree == true) && (organic == true) && (lactoseFree == false) && (prods[i].organic == true) && (prods[i].nutFree == true)){\n\t\t\tproduct_names.push(prods[i]);\n\t\t}\n\t\telse if ((lactoseFree == false) && (nutFree == true)&& (organic == false) && (prods[i].nutFree == true)){\n\t\t\tproduct_names.push(prods[i]);\n\t\t}\n\t\telse if ((lactoseFree == true) && (nutFree == false)&& (organic == false) && (prods[i].lactoseFree == true)){\n\t\t\tproduct_names.push(prods[i]);\n\t\t}\n\t\telse if ((lactoseFree == false) && (nutFree == false)&& (organic == false)){\n\t\t\tproduct_names.push(prods[i]);\n\t\t}\n\t\telse if ((lactoseFree == false) && (nutFree == false)&& (organic == true) && (prods[i].organic == true)){\n\t\t\tproduct_names.push(prods[i]);\n\t\t}\n\t}\n\treturn product_names;\n}", "updatePurchaseState(ingredients) {\n // const ingredients = {\n // ...this.state.ingredients\n // };\n const sum = Object.keys(ingredients)\n .map(igkey => {\n return ingredients[igkey];\n })\n .reduce((sum, el) => {\n return sum + el;\n }, 0);\n\n this.setState({purchasable: sum > 0})\n }", "function truePossibilities (input) {\n return input.some(function (boo) {\n return boo.some(function (boo2) {\n return (boo2 === true);\n });\n });\n}", "conc(program, state) {\n const array = program.arguments[0].elements;\n return _.every(array, (sub) => {\n return isFinal(sub, state);\n });\n }", "not(not , dependentVal){\n if(dependentVal !== not.Argument ){\n return true;\n }else{\n return false;\n }\n}", "function getResult(list, counter) {\n\tlet pro = list.slice(11);\n\tlet symp = list.slice(0, 5);\n\n\t//symptomes positive\n\n\tlet fievre = list[0] === 'oui';\n\tlet toux = list[2] === 'oui';\n\tlet malGorge = list[4] === 'oui';\n\tlet courbatures = list[3] === 'oui';\n\tlet diarrhee = list[5] === 'oui';\n\n\t//symptomes négatives\n\n\tlet noFievre = list[0] === 'non';\n\tlet noToux = list[2] === 'non';\n\tlet noMalGorge = list[4] === 'non';\n\tlet noCourbatures = list[3] === 'non';\n\tlet noDiarrhee = list[5] === 'non';\n\n\t//pas de symptomes\n\n\tlet noSypms = !symp.includes('oui');\n\n\t//facteurs pronostiques\n\n\tlet facteurPro = pro.includes('oui');\n\tlet nofacteurPro = !pro.includes('oui');\n\n\t//gravité mineures positives\n\n\tlet highTemp = list[1] > 39;\n\tlet exhausted = list[7] === 'oui';\n\tlet sickness = list[10] === 'fatigué' || list[10] === 'trop-fatigué';\n\n\t//gravité mineures négatives\n\n\tlet nohighTemp = list[1] < 39;\n\tlet noexhausted = list[7] === 'non';\n\tlet nosickness = list[10] === 'bien' || list[10] === 'moyen';\n\n\t// gravité majeures positives\n\n\tlet lowTemp = list[1] < 35.4;\n\tlet geneResp = list[9] === 'oui';\n\tlet foodDiff = list[8] === 'oui';\n\n\t// gravité majeures négatives\n\n\tlet nolowTemp = list[1] > 35.4;\n\tlet nogeneResp = list[9] === 'non';\n\tlet nofoodDiff = list[8] === 'non';\n\n\t// paramétres\n\n\tlet age = list[11];\n\n\tif (counter === 13 && age < 15) {\n\t\tcircles[1].style.display = 'none';\n\t\tcircles[2].style.display = 'block';\n\t\tquestions.classList.remove('visible');\n\t\tprogress.classList.remove('flex');\n\t\tresultat.style.display = 'block';\n\n\t\tresultat.children[1].lastElementChild.textContent =\n\t\t\t'Prenez contact avec votre médecin généraliste au moindre doute. Cette application n’est pour l’instant pas adaptée aux personnes de moins de 15 ans. En cas d’urgence, appeler le 15';\n\t}\n\n\tif (counter === 24) {\n\t\tcircles[1].style.display = 'none';\n\t\tcircles[2].style.display = 'block';\n\t\tquestions.classList.remove('visible');\n\t\tprogress.classList.remove('flex');\n\t\tresultat.style.display = 'block';\n\n\t\tif (fievre || (toux && malGorge) || (toux && courbatures)) {\n\t\t\tif (lowTemp || geneResp || foodDiff) {\n\t\t\t\tresultat.children[1].lastElementChild.textContent = 'veuillez appeler le numéro 141';\n\t\t\t} else if (\n\t\t\t\t(facteurPro &&\n\t\t\t\t\tnogeneResp &&\n\t\t\t\t\tnofoodDiff &&\n\t\t\t\t\tnolowTemp &&\n\t\t\t\t\t((highTemp && exhausted && sickness) ||\n\t\t\t\t\t\t(highTemp && exhausted) ||\n\t\t\t\t\t\t(exhausted && sickness) ||\n\t\t\t\t\t\t(highTemp && sickness))) ||\n\t\t\t\t(facteurPro && nogeneResp && nofoodDiff && nolowTemp && highTemp && noexhausted && nosickness) ||\n\t\t\t\t(facteurPro && nogeneResp && nofoodDiff && nolowTemp && exhausted && nohighTemp && nosickness) ||\n\t\t\t\t(facteurPro && nogeneResp && nofoodDiff && nolowTemp && sickness && nohighTemp && noexhausted)\n\t\t\t) {\n\t\t\t\tresultat.children[1].lastElementChild.textContent = 'veuillez appeler le numéro 141';\n\t\t\t} else if (facteurPro && nohighTemp && noexhausted && nosickness && nogeneResp && nofoodDiff && nolowTemp) {\n\t\t\t\tresultat.children[1].firstElementChild.textContent =\n\t\t\t\t\t'téléconsultation ou médecin généraliste ou visite à domicile ';\n\t\t\t\tresultat.children[1].lastElementChild.textContent =\n\t\t\t\t\t'appelez le 141 si une gêne respiratoire ou des difficultés importantes pour s’alimenter ou boire pendant plus de 24h apparaissent';\n\t\t\t} else if (\n\t\t\t\t(age > 50 &&\n\t\t\t\t\tage <= 69 &&\n\t\t\t\t\t(nofacteurPro && nohighTemp && noexhausted && nosickness && nogeneResp && nofoodDiff && nolowTemp)) ||\n\t\t\t\t(nofacteurPro && nolowTemp && nogeneResp && nofoodDiff && (highTemp || exhausted || sickness))\n\t\t\t) {\n\t\t\t\tresultat.children[1].firstElementChild.textContent =\n\t\t\t\t\t'téléconsultation ou médecin généraliste ou visite à domicile ';\n\t\t\t\tresultat.children[1].lastElementChild.textContent =\n\t\t\t\t\t'appelez le 141 si une gêne respiratoire ou des difficultés importantes pour s’alimenter ou boire pendant plus de 24h apparaissent';\n\t\t\t} else if (\n\t\t\t\tage < 50 &&\n\t\t\t\tnofacteurPro &&\n\t\t\t\tnohighTemp &&\n\t\t\t\tnoexhausted &&\n\t\t\t\tnosickness &&\n\t\t\t\tnogeneResp &&\n\t\t\t\tnofoodDiff &&\n\t\t\t\tnolowTemp\n\t\t\t) {\n\t\t\t\tresultat.children[1].lastElementChild.textContent =\n\t\t\t\t\t'nous vous conseillons de rester à votre domicile et de contacter votre médecin en cas d’apparition de nouveaux symptômes. Vous pourrez aussi utiliser à nouveau l’application pour réévaluer vos symptômes';\n\t\t\t} else {\n\t\t\t\tresultat.children[1].lastElementChild.textContent =\n\t\t\t\t\t'Votre situation ne relève probablement pas du Covid-19. N’hésitez pas à contacter votre médecin en cas de doute. Vous pouvez refaire le test en cas de nouveau symptôme pour réévaluer la situation. Pour toute information concernant le Covid-19 allez vers la page d’accueil.';\n\t\t\t}\n\t\t} else if (\n\t\t\t(fievre && noToux && noDiarrhee) ||\n\t\t\t(noFievre && toux && noMalGorge && noCourbatures) ||\n\t\t\t(noFievre && noToux && malGorge) ||\n\t\t\t(noToux && courbatures) ||\n\t\t\t(noFievre && diarrhee)\n\t\t) {\n\t\t\tif (nohighTemp && noexhausted && nosickness && nogeneResp && nofoodDiff && nolowTemp) {\n\t\t\t\tresultat.children[1].lastElementChild.textContent =\n\t\t\t\t\t'Votre situation ne relève probablement pas du Covid-19. Consultez votre médecin au moindre doute.';\n\t\t\t} else if (\n\t\t\t\t(nofacteurPro && nogeneResp && nofoodDiff && nolowTemp && highTemp && noexhausted && nosickness) ||\n\t\t\t\t(nofacteurPro && nogeneResp && nofoodDiff && nolowTemp && exhausted && nohighTemp && nosickness) ||\n\t\t\t\t(nofacteurPro && nogeneResp && nofoodDiff && nolowTemp && sickness && nohighTemp && noexhausted) ||\n\t\t\t\t(facteurPro && nogeneResp && nofoodDiff && nolowTemp && nosickness && nohighTemp && noexhausted)\n\t\t\t) {\n\t\t\t\tresultat.children[1].lastElementChild.textContent =\n\t\t\t\t\t'Votre situation ne relève probablement pas du Covid-19. Un avis médical est recommandé. Au moindre doute, appelez le 141. ';\n\t\t\t} else {\n\t\t\t\tresultat.children[1].lastElementChild.textContent =\n\t\t\t\t\t'Votre situation ne relève probablement pas du Covid-19. N’hésitez pas à contacter votre médecin en cas de doute. Vous pouvez refaire le test en cas de nouveau symptôme pour réévaluer la situation. Pour toute information concernant le Covid-19 allez vers la page d’accueil.';\n\t\t\t}\n\t\t} else {\n\t\t\tresultat.children[1].lastElementChild.textContent =\n\t\t\t\t'Votre situation ne relève probablement pas du Covid-19. N’hésitez pas à contacter votre médecin en cas de doute. Vous pouvez refaire le test en cas de nouveau symptôme pour réévaluer la situation. Pour toute information concernant le Covid-19 allez vers la page d’accueil.';\n\t\t}\n\t}\n}", "function invalidInputs(product_id, rating, recommend, photos, characteristics) {\n const conditionsThatShouldBeTruthy = [\n parseInt(product_id),\n parseInt(rating),\n typeof recommend === \"boolean\",\n Array.isArray(photos) || photos === undefined,\n typeof characteristics === \"object\" || characteristics === undefined\n ];\n for (let i = 0; i < conditionsThatShouldBeTruthy.length; i++) {\n if (!conditionsThatShouldBeTruthy[i]) {\n return true;\n }\n }\n return false;\n}", "updatePurcharsState (ingredients) {\n\n const sum = Object.keys(ingredients)\n .map(ingKey =>{\n return ingredients[ingKey];\n })\n let sumed = sum.reduce((sum, el)=>{\n return sum + el\n },0)\n\n this.setState({purcharsable: sumed > 0})\n}", "function reversibleOnly() {\n var reversible_only = 2; //multiply add_ons 2X\n if($('#reversible_only').val() == \"yes\") {\n $('#reversible_only_note').hide();\n $('#reversible_only_cost').show();\n return reversible_only;\n }\n else {\n $('#reversible_only_cost').hide();\n $('#reversible_only_note').show();\n return 0;\n };\n}", "updatePurchaseState (ingredients) {\n //get ingredients from argument, which will be passed in as updated ingredients from addIngredientHandler and removeIngredientHandler\n //turn into array to sum\n const sum = Object.keys(ingredients)\n .map(igKey => {\n return ingredients[igKey];\n })\n .reduce((sum, el) => {\n return sum + el;\n }, 0);\n //set state to true or false\n this.setState({purchasable: sum > 0});\n }", "function isOtherThanBRA(state) {\r\n let isBra = state.case.charges.map(charge =>\r\n charge.isBRAFelony ? true : false\r\n );\r\n let braArr = [];\r\n state.case.charges.forEach(charge => {\r\n if (charge.isBRAFelony) {\r\n braArr.push(charge);\r\n }\r\n });\r\n if (!braArr[0]) {\r\n isAConviction(state);\r\n } else {\r\n let conArr = braArr.map(charge => (charge.isConvicted ? true : false));\r\n\r\n conArr.includes(true)\r\n ? printResult(\r\n \"eligible\",\r\n \"the 16- 803 analysis for eligible misdemeanors\"\r\n )\r\n : printResult(\r\n \"NOT ELIGIBLE\",\r\n \"use the 16-803 analysis for ineligible misdemeanors\"\r\n );\r\n }\r\n}", "function isAllValidationsOk() {\n\n if (jQuery.isEmptyObject(dataOrder.order.products)) {\n showNotification('info', 'Aviso', 'No puede cerrar ventas vacías.');\n return false;\n }\n\n if (isCreditClient && $('#input-pi-tag').val().trim() === '') {\n showNotification('info', 'Aviso', 'El campo TAG es obligatorio para los clientes a crédito.');\n return false;\n }\n\n if ($('#switch-pi-prod').prop('checked') || $('#switch-pi-late-prod').prop('checked')) {\n if ($('#pi-fecha').val() === '') {\n showNotification('info', 'Aviso', 'Debe especificar una fecha de entrega.');\n return false;\n }\n\n if ($('#pi-hora').val() === '0') {\n showNotification('info', 'Aviso', 'Debe especificar una hora de entrega.');\n return false;\n }\n\n if ($('#pi-sucursal-prod').val() === '0') {\n showNotification('info', 'Aviso', 'Debe especificar la sucursal de producción.');\n return false;\n }\n\n if ($('#pi-sucursal-deliv').val() === '0') {\n showNotification('info', 'Aviso', 'Debe especificar la sucursal de entrega.');\n return false;\n }\n }\n\n if (Math.abs($('#pi-input-transfer').val()) > 0 && $('#pi-pt-comprobante').val() === '') {\n showNotification('info', 'Aviso', 'Debe proporcionar el comprobante para el pago por transferencia.');\n return false;\n }\n\n if (dataOrder.order.clientId === ID_NACIONAL && $('#pi-input-soli-nacional').val().trim() === '') {\n showNotification('info', 'Aviso', 'Debe especificar el nombre de la persona que solicita el trabajo para NACIONAL.');\n $('#div-soli-nacional').show();\n return false;\n }\n\n if (isCreditClient && tipo_venta !== 'CRÉDITO' && asked_for_credit === false) {\n Swal.fire({\n title: 'Sugerencia',\n text: 'El tipo de venta sugerido para este cliente es CRÉDITO, ¿desea procesarlo como tal?',\n type: 'question',\n showCancelButton: true,\n confirmButtonText: 'Procesar como CRÉDITO',\n cancelButtonText: 'No, gracias',\n allowOutsideClick: false\n }).then((result) => {\n if (result.value) {\n setTipoPago('credito');\n } else {\n asked_for_credit = true;\n cerrarVenta();\n }\n });\n return false;\n }\n\n if ($('#switch-pi-prod').prop('checked') || $('#switch-pi-late-prod').prop('checked')) {\n if (entregaAntesDeHoy()) {\n showNotification('info', 'Aviso', 'No puede agendar ordenes de trabajos para días pasados.');\n return false;\n }\n\n let produce_otra_sucursal = parseInt($('#pi-sucursal-prod').val()) !== Poster.settings.spotId;\n\n if (getHoraActual() >= 12 && produce_otra_sucursal && entregaEsHoy()) {\n showNotification('info', 'Aviso', 'A partir del medio día, las ordenes de trabajo producidas en otra sucursal no pueden ser agendadas para el día de hoy.');\n return false;\n }\n\n if (entregaEsHoy() && produce_otra_sucursal && parseInt($('#pi-hora').val()) < 18) { // 18 hrs = 6 pm\n showNotification('info', 'Aviso', 'No puede agendar para antes de las 6 p.m. una orden que será procesada en otra sucursal.');\n return false;\n }\n }\n\n return true;\n}", "updatePurchaseState(ingredients){\n\n const sum = Object.keys(ingredients).map(ingKey =>{return ingredients[ingKey]}).reduce((sum, ele) => {return sum+ele}, 0);\n\n this.setState({\n purchasable : sum > 0 //set to true if sum greater than 0\n })\n }", "function areReactionsValid() {\n for(var i = 0; i < currentReactionNumber; i++) {\n currentSubs = addedReactions[i][\"substrates\"];\n currentEnz = addedReactions[i][\"enzyme\"];\n currentProds = addedReactions[i][\"products\"];\n\n if(!isValidReaction(currentSubs, currentEnz, currentProds, i)) {\n return false;\n }\n }\n return true;\n}", "function checkIfAffordable(card) {\n\n if (card.type === 'expedition') {\n\n // Set up variables\n missingItems = 0;\n let hasAllItems = false;\n let requirements = countOccurrences(card.requirements);\n\n // See if player has enough of each item needed\n for (let property in requirements) {\n\n if (requirements[property] > players[actingPlayer].getCards(property)) {\n hasAllItems = false;\n missingItems += requirements[property] - players[actingPlayer].getCards(property);\n // console.log(`hasAllItems:>> ${hasAllItems} missingItems:>> ${missingItems}`);\n } else {\n hasAllItems = true;\n }\n }\n\n // See if player has enough Jack of all Trades to make up the difference\n if (missingItems <= players[actingPlayer].getCards('Jack of all Trades')) {\n hasAllItems = true;\n }\n\n return (hasAllItems && (missingItems <= players[actingPlayer].getCards('Jack of all Trades')));\n\n }\n\n if (playerMoves == 0) {\n return;\n }\n\n // Taxes cannot be bought\n if (card.type === 'tax') {\n return false;\n }\n\n // Ships are always 'purchaseable'\n if (card.type === 'ship') {\n if (actingPlayer !== turnOf || !isDeckDisabled) {\n return true;\n }\n\n // For all 'person' cards, calculate affordability (incl discounts)\n } else {\n if (card.coins - madamoiselleDiscount(card) + turnFee() <= players[actingPlayer].coins.length) {\n return true;\n }\n return false;\n }\n}", "isActionAvailable(actionObject){\n\n let manaCost = (actionObject.props.mana_points_cost !== undefined) ? actionObject.props.mana_points_cost : 0;\n let staminaCost = (actionObject.props.stamina_points_cost !== undefined) ? actionObject.props.stamina_points_cost : 0;\n let vigorCost = (actionObject.props.vigor_points_cost !== undefined) ? actionObject.props.vigor_points_cost : 0;\n let requirements = (actionObject.props.requirements !== undefined) ? actionObject.props.requirements : [];\n\n let actionCheck = {\n availability: true,\n reason: ''\n };\n\n if (!this.checkMana(manaCost)){\n actionCheck = {\n availability: false,\n reason: 'Insufficient Mana'\n }\n }\n\n if (!this.checkStamina(staminaCost)){\n actionCheck = {\n availability: false,\n reason: 'Insufficient Stamina'\n }\n }\n\n if (!this.checkVigor(vigorCost)){\n actionCheck = {\n availability: false,\n reason: 'Insufficient Vigor'\n }\n }\n\n if (requirements){\n requirements.forEach(eachRequirement=>{\n if(this.props.stats_current[eachRequirement.key] !== eachRequirement.value){\n actionCheck.availability = false;\n actionCheck.reason = eachRequirement.failure_message\n }\n })\n }\n\n return actionCheck;\n\n /*\n if(requirements){\n let requirementKeys = Object.keys(requirements);\n\n requirementKeys.forEach(eachRequirementKey=>{\n if(_.get(this.props, eachRequirementKey) === requirements[eachRequirementKey]){\n actionCheck = {\n availability: false\n }\n }\n });\n\n requirements.forEach(eachRequirement=>{\n _.get(this.props, eachRequirement)\n })\n }*/\n\n //What if there are other properties, stats needed to determine if an action is available?\n\n //For example, backstab is only available if the character is hidden\n\n //For each action, look at the \"requirements\" property to see what is required:\n\n /*Backstab:\n\n .requirements_to_display: {\n\n }\n .requirements_to_use: {\n is_hidden: 1\n }\n .requirements_to_use: [\n {\n key: 'is_hidden'\n value: 1\n error: 'You must be hidden to use this skill'\n }\n ]\n .cost: {\n mana: 0\n stamina: 0\n spirit: 0\n }\n\n\n */\n }", "function calculateResult() {\n let result = possibilities.filter(function (element) {\n if (\n //if all 3 inputs match\n element.combo.grape === userInput.grape && element.combo.temperature === userInput.temperature && element.combo.soil === userInput.soil ||\n\n //if grape and temperature match\n element.combo.grape === userInput.grape && element.combo.temperature === userInput.temperature ||\n\n //if temperature and soil match\n element.combo.temperature === userInput.temperature && element.combo.soil === userInput.soil ||\n\n //if grape and soil match\n element.combo.grape === userInput.grape && element.combo.soil === userInput.soil) {\n\n //return result\n return element;\n }\n });\n\n let display = document.querySelector(\".result\");\n let answer = document.querySelector(\"p\");\n\n //if user input doesn't match any wine type\n if (result.length === 0){\n answer.textContent = \"Your choices do not produce a valid wine type\";\n }\n //display wine type\n else{\n answer.textContent = \"Your wine type is ...\" + result[0].type;\n }\n\n display.appendChild(answer);\n display.style.visibility = \"visible\";\n\n //remove the selected class after displaying result\n const allButtons = document.querySelectorAll(\"button\");\n allButtons.forEach(function(button){\n \tbutton.classList.remove(\"selected\");\n });\n}", "function Or(factA, factB){\n return {type:\"composite\",verify:game=>factA.verify(game)||factB.verify(game)}\n}", "reason() {\n // Reason each one\n replacement = subrequirements.map(sub => sub.reason())\n // Keep the satisfied ones\n .filter(sub => sub.satisfied)\n // Merge\n .reduce((acc, sub) => acc.merge(sub));\n return replacement;\n }", "function funcDetectProduct(str) {\n let a=detect(str,CT.knowledgeBaseFull);\n if(a.moreThanTwo){return \"more than two\"} \n if (!a.detected){return \"not found\"} \n return (!isNaN(parseInt(str)) && str.length===8) ? a.founded[\"Descriptive Code\"] : a.founded[\"Item Number\"]\n }", "computeJunctionEnvelopeFeasibility () {\n for (let i = 0; i < this.n - 1; i ++) {\n let u1 = this.sculpture.units.children[i];\n let u2 = this.sculpture.units.children[i+1];\n if (u1.isEmpty || u2.isEmpty) {\n continue;\n }\n this.collideJunctions(u1.rod.envelope,u2.fork.envelope);\n }\n }", "function isCompound(unitList) {\n if (unitList.length === 0) {\n return false;\n }\n return unitList.length > 1 || Math.abs(unitList[0].power - 1.0) > 1e-15;\n}", "validCombination(combo) {\n let non_meta = 0;\n for (const key of combo) {\n if (INVALID_STANDALONE_KEYS.indexOf(key) < 0) {\n non_meta++;\n }\n }\n return non_meta > 0;\n }", "stealLying(card) {\n let firstCard = this.cards[0];\n let secondCard = this.cards[1];\n\n if (card === \"ambassador\") {\n if (firstCard === \"ambassador\" || secondCard === \"ambassador\") {\n return false;\n } else {\n return true;\n }\n } else if (card === \"captain\") {\n if (firstCard === \"captain\" || secondCard === \"captain\") {\n return false;\n } else {\n return true;\n }\n }\n }", "function TrueSpecification() {}", "function shortProduct(cat, arr) {\n if(cat ===\"all\") {\n return arr;\n } \n return arr.filter(item => {\n if(checkGate(item.categories, cat)) {\n return item;\n }\n })\n}", "function getCurrentReactionInfo() {\n //{'enzyme': 'hexokonaszea', 'products': ['a', 'b'], 'substrates': ['c', 'd'], 'reversible': reversible}\n var enzyme;\n substrates = [];\n products = [];\n var reversible = document.getElementById('reversible_checkbox').checked;\n \n //The database stores the string \"(ir)reversible\"... not a boolean \n var reversibleString;\n if(reversible)\n reversibleString = \"Reversible\"\n else\n reversibleString = \"Irreversible\"\n\n //get substrates\n for(var i=0; i < subSelects.length; i++)\n {\n subname = subSelects[i].value;\n var subabbr;\n for(var j = 0; j < allSubsNoDuplicates.length; j++) {\n if(allSubsNoDuplicates[j][0] == subname) {\n subabbr = allSubsNoDuplicates[j][1];\n }\n }\n substrates.push([subname, subabbr]);\n }\n\n //get enzyme\n var enzabbr;\n for(var j = 0; j < allEnzysNoDuplicates.length; j++) {\n if(allEnzysNoDuplicates[j][0] == enzSelect.value) {\n enzabbr = allEnzysNoDuplicates[j][1];\n }\n }\n enzyme = [enzSelect.value, enzabbr];\n \n //get products\n for(var i = 0; i < prodSelects.length; i++) {\n prodname = prodSelects[i].value\n var prodabbr;\n for(var j = 0; j < allProdsNoDuplicates.length; j++) {\n if(allProdsNoDuplicates[j][0] == prodname) {\n prodabbr = allProdsNoDuplicates[j][1];\n }\n }\n products.push([prodname, prodabbr]);\n }\n\n if(isValidReaction(substrates, enzyme, products, currentReactionNumber)) {\n //add it to the list and increment index\n addedReactions.push({'substrates': substrates, 'enzyme': enzyme, 'products': products, 'reversible': reversibleString});\n displayCurrentReactionInfo(currentReactionNumber);\n\n currentReactionNumber++;\n clearReactionFields();\n }\n}", "function getThreeProducts() {\n const doNotUse = [leftProduct, centerProduct, rightProduct];\n while (doNotUse.includes(leftProduct)) {\n let leftIndex = Math.floor(Math.random() * Product.allProducts.length);\n leftProduct = Product.allProducts[leftIndex];\n }\n doNotUse.push(leftProduct)\n\n while (doNotUse.includes(centerProduct)) {\n let centerIndex = Math.floor(Math.random() * Product.allProducts.length);\n centerProduct = Product.allProducts[centerIndex];\n }\n doNotUse.push(centerProduct)\n\n while (doNotUse.includes(rightProduct)) {\n let rightIndex = Math.floor(Math.random() * Product.allProducts.length);\n rightProduct = Product.allProducts[rightIndex];\n }\n doNotUse.push(rightProduct)\n console.log(doNotUse)\n}", "magicDeck() {\n return this.drawPile.concat(this.discardPile).length === 0;\n }", "isValid () {\n return this.validHasGamblingDebt() &&\n this.validGamblingDebt()\n }", "lying(action) {\n let firstCard = this.cards[0];\n let secondCard = this.cards[1];\n if (\n action === \"Tax\" ||\n action === \"block-Foreign Aid\" ||\n action === \"block-Tax\"\n ) {\n if (firstCard === \"duke\" || secondCard === \"duke\") {\n return false;\n } else {\n return true;\n }\n } else if (action === \"Assassinate\") {\n if (firstCard === \"assassin\" || secondCard === \"assassin\") {\n return false;\n } else {\n return true;\n }\n } else if (action === \"Exchange\") {\n if (firstCard === \"ambassador\" || secondCard === \"ambassador\") {\n return false;\n } else {\n return true;\n }\n } else if (action === \"Steal\") {\n if (firstCard === \"captain\" || secondCard === \"captain\") {\n return false;\n } else {\n return true;\n }\n } else if (action === \"block-Assassination\") {\n if (firstCard === \"contessa\" || secondCard === \"contessa\") {\n return false;\n } else {\n return true;\n }\n } else if (action === \"block-Stealing\") {\n if (\n firstCard === \"captain\" ||\n firstCard === \"ambassador\" ||\n secondCard === \"captain\" ||\n secondCard === \"ambassador\"\n ) {\n return false;\n } else {\n return true;\n }\n }\n }", "function twoNotTrue(thing1,thing2){\n if(thing1 && thing2){return}\n else if(thing1 || thing2){return}\n else{return \"both are not true\"}\n}", "function areAnyTrue(arg1, arg2) { //create the function with 2 arguments\n if (arg1 || arg2) { //set condition that one of the arguments needs to be true\n return \"One is true\" //only return if one of them are true\n }\n}", "function adjPresAffPlainCheckError() {\n let optionsGroup = document.getElementById(\"adjective-type-group\");\n let errorElement = optionsGroup.getElementsByClassName(\"must-choose-one-text\")[0];\n\n let selected = checkInputsForError(inputsToSelectAdjPresAffPlain, true);\n let unselected = checkInputsForError(inputsToDeselectAdjPresAffPlain, false);\n\n let iAdjInput = document.querySelectorAll('input[name=\"adjectivei\"]')[0];\n let irrAdjInput = document.querySelectorAll('input[name=\"adjectiveirregular\"]')[0];\n let naAdjInput = document.querySelectorAll('input[name=\"adjectivena\"]')[0];\n if (selected && unselected && !naAdjInput.checked && (iAdjInput.checked || irrAdjInput.checked)) {\n toggleError(errorElement, \"*Invalid combination: い/irregular, present, affirmative, plain\", true);\n // element could be hidden because verb is unchecked, so check to enable back button\n checkToEnableBackButton();\n } else if (document.querySelectorAll('input[name=\"adjective\"]')[0].checked){\n optionsGroupCheckError(optionsGroup);\n }\n}", "function checkIfComplete(productName, productDescription, productPrice) {\r\n if(productName === \"\" || productDescription === \"\" || productPrice === \"\") {\r\n alert(\"WAAAAAI BOULE\");\r\n return false;\r\n }\r\n}", "function checkBasicInputs() {\n if (!productName || !productBarcode) {\n const snackBar = {\n data: 'Veuillez remplir tous les champs requis.',\n position: WSnackBar.position.BOTTOM,\n duration: WSnackBar.duration.SHORT,\n textColor: 'white',\n backgroundColor: 'red',\n }\n WSnackBar.show(snackBar)\n return false\n }\n if (productBarcode.length != 13) {\n const snackBar = {\n data: 'Code barre invalide',\n position: WSnackBar.position.BOTTOM,\n duration: WSnackBar.duration.SHORT,\n textColor: 'white',\n backgroundColor: 'red',\n }\n WSnackBar.show(snackBar)\n return false\n }\n return true\n }", "reactionDefenseGuaranteed(player, requiredReaction, quantity) {\n const isElena = playerHasSkill(player, Skills.elena);\n\n if ((RequiredReactions.miss === requiredReaction) && (player.hand.length >= quantity) && isElena) return true;\n\n const isJanet = playerHasSkill(player, Skills.janet);\n\n if ((player.hand.length >= quantity) && isElena && isJanet) return true;\n\n const isSid = playerHasSkill(player, Skills.sid);\n\n if ((player.health === 1) && (player.hand.length >= 2) && isSid) return true;\n\n if (RequiredReactions.bang === requiredReaction) return false;\n\n const cannotUseEquipment = (this.turnPlayer.name !== player.name) && playerHasSkill(this.turnPlayer, Skills.belle);\n const availableQueueables = cannotUseEquipment ? [] : (this.turnPlayer.name === player.name) ? this.turn.availableQueueables : queueableMisses;\n const queuedMisses = player.equipment.reduce((count, { name }) => count + availableQueueables.includes(name), 0);\n\n return queuedMisses >= quantity;\n }", "function well(x){\n var goodsN = x.filter(function(e) { if(e === \"good\") { return true;} return false; }).length\n\n if(goodsN === 1 || goodsN === 2) { return \"Publish!\"}\n if(goodsN >= 3) { return \"I smell a series!\"}\n return \"Fail!\";\n \n}", "function getsDiscount() {\n if ((productsBought > 2) || (membership = premium)); }", "function needsConcatination(power, data) {\n switch (power) {\n case 3:\n return data.get(3) && data.get(2)\n case 2:\n return data.get(1) && (data.get(3) || data.get(2))\n case 1:\n return data.get(0) && (data.get(3) || data.get(2) || data.get(1))\n case 0:\n return false\n default:\n return false\n }\n}", "function allPremium(shoppingCart) {\n const premiumProducts = filterPremiumProducts(shoppingCart);\n if (premiumProducts.length == shoppingCart.length) {\n console.log(\"Pedidos sin gastos de envio\")\n }\n}", "function restrictList(product, restriction, is_organic, type){\n let temp;\n for (let i = 0; i < product.length; i++) {\n for (let j = 0; j < product.length; j++) {\n if (product[i].price < product[j].price) {\n temp = product[i]\n product[i] = product[j]\n product[j] = temp\n }\n }\n }\n let product_names = [];\n if (type==\"all\") {\n if (is_organic == true) {\n for (let i = 0; i < product.length; i += 1) {\n if ((restriction == \"Vegetarian\") && (product[i].vegetarian == true) && (product[i].organic == true)) {\n product_names.push(product[i].name + \" $\" + product[i].price);\n } else if ((restriction == \"GlutenFree\") && (product[i].glutenFree == true) && (product[i].organic == true)) {\n product_names.push(product[i].name + \" $\" + product[i].price);\n } else if ((restriction == \"VegAGlu\") && (product[i].glutenFree == true) && (product[i].vegetarian == true) && (product[i].organic == true)) {\n product_names.push(product[i].name + \" $\" + product[i].price);\n } else if ((restriction == \"None\") && (product[i].organic == true)) {\n product_names.push(product[i].name + \" $\" + product[i].price);\n }\n }\n } else {\n for (let i = 0; i < product.length; i += 1) {\n if ((restriction == \"Vegetarian\") && (product[i].vegetarian == true)) {\n product_names.push(product[i].name + \" $\" + product[i].price);\n } else if ((restriction == \"GlutenFree\") && (product[i].glutenFree == true)) {\n product_names.push(product[i].name + \" $\" + product[i].price);\n } else if ((restriction == \"VegAGlu\") && (product[i].glutenFree == true) && (product[i].vegetarian == true)) {\n product_names.push(product[i].name + \" $\" + product[i].price);\n } else if (restriction == \"None\") {\n product_names.push(product[i].name + \" $\" + product[i].price);\n }\n }\n }\n }\n else{\n if (is_organic == true) {\n for (let i = 0; i < product.length; i += 1) {\n if ((restriction == \"Vegetarian\") && (product[i].vegetarian == true) && (product[i].organic == true) &&(product[i].type==type)) {\n product_names.push(product[i].name + \" $\" + product[i].price);\n } else if ((restriction == \"GlutenFree\") && (product[i].glutenFree == true) && (product[i].organic == true) &&(product[i].type==type)) {\n product_names.push(product[i].name + \" $\" + product[i].price);\n } else if ((restriction == \"VegAGlu\") && (product[i].glutenFree == true) && (product[i].vegetarian == true) && (product[i].organic == true) &&(product[i].type==type)) {\n product_names.push(product[i].name + \" $\" + product[i].price);\n } else if ((restriction == \"None\") && (product[i].organic == true) &&(product[i].type==type)) {\n product_names.push(product[i].name + \" $\" + product[i].price);\n }\n }\n } else {\n for (let i = 0; i < product.length; i += 1) {\n if ((restriction == \"Vegetarian\") && (product[i].vegetarian == true) &&(product[i].type==type)) {\n product_names.push(product[i].name + \" $\" + product[i].price);\n } else if ((restriction == \"GlutenFree\") && (product[i].glutenFree == true) &&(product[i].type==type)) {\n product_names.push(product[i].name + \" $\" + product[i].price);\n } else if ((restriction == \"VegAGlu\") && (product[i].glutenFree == true) && (product[i].vegetarian == true) &&(product[i].type==type)) {\n product_names.push(product[i].name + \" $\" + product[i].price);\n } else if (restriction == \"None\" &&(product[i].type==type)) {\n product_names.push(product[i].name + \" $\" + product[i].price);\n }\n }\n }\n }\n return product_names;\n}", "function test_existancePassation_marches_moe (item,suppression)\n { \n if (suppression!=1)\n {\n var pass = vm.allpassation_marches_moe.filter(function(obj)\n {\n return obj.id == currentItemPassation_marches_moe.id;\n });\n if(pass[0])\n {\n if((pass[0].observation != currentItemPassation_marches_moe.observation )\n || (pass[0].date_os != currentItemPassation_marches_moe.date_os )\n || (pass[0].date_remise != currentItemPassation_marches_moe.date_remise )\n || (pass[0].date_ano_dpfi != currentItemPassation_marches_moe.date_ano_dpfi )\n || (pass[0].nbr_offre_recu != currentItemPassation_marches_moe.nbr_offre_recu)\n || (pass[0].date_lancement_dp != currentItemPassation_marches_moe.date_lancement_dp )\n || (pass[0].id_bureau_etude != currentItemPassation_marches_moe.id_bureau_etude ) \n || (pass[0].date_signature_contrat != currentItemPassation_marches_moe.date_signature_contrat )\n || (pass[0].date_demande_ano_dpfi != currentItemPassation_marches_moe.date_demande_ano_dpfi )\n || (pass[0].date_rapport_evaluation != currentItemPassation_marches_moe.date_rapport_evaluation )\n || (pass[0].notification_intention != currentItemPassation_marches_moe.notification_intention)\n || (pass[0].date_notification_attribution != currentItemPassation_marches_moe.date_notification_attribution )\n || (pass[0].date_shortlist != currentItemPassation_marches_moe.date_shortlist )\n || (pass[0].date_manifestation != currentItemPassation_marches_moe.date_manifestation)\n || (pass[0].statut != currentItemPassation_marches_moe.statut ) ) \n { \n insert_in_basePassation_marches_moe(item,suppression);\n }\n else\n { \n item.$selected = true;\n item.$edit = false;\n }\n }\n } else\n insert_in_basePassation_marches_moe(item,suppression);\n }", "function test_existancePassation_marches_moe (item,suppression)\n { \n if (suppression!=1)\n {\n var pass = vm.allpassation_marches_moe.filter(function(obj)\n {\n return obj.id == currentItemPassation_marches_moe.id;\n });\n if(pass[0])\n {\n if((pass[0].observation != currentItemPassation_marches_moe.observation )\n || (pass[0].date_os != currentItemPassation_marches_moe.date_os )\n || (pass[0].date_remise != currentItemPassation_marches_moe.date_remise )\n || (pass[0].date_ano_dpfi != currentItemPassation_marches_moe.date_ano_dpfi )\n || (pass[0].nbr_offre_recu != currentItemPassation_marches_moe.nbr_offre_recu)\n || (pass[0].date_lancement_dp != currentItemPassation_marches_moe.date_lancement_dp )\n || (pass[0].id_bureau_etude != currentItemPassation_marches_moe.id_bureau_etude ) \n || (pass[0].date_signature_contrat != currentItemPassation_marches_moe.date_signature_contrat )\n || (pass[0].date_demande_ano_dpfi != currentItemPassation_marches_moe.date_demande_ano_dpfi )\n || (pass[0].date_rapport_evaluation != currentItemPassation_marches_moe.date_rapport_evaluation )\n || (pass[0].notification_intention != currentItemPassation_marches_moe.notification_intention)\n || (pass[0].date_notification_attribution != currentItemPassation_marches_moe.date_notification_attribution )\n || (pass[0].date_shortlist != currentItemPassation_marches_moe.date_shortlist )\n || (pass[0].date_manifestation != currentItemPassation_marches_moe.date_manifestation)\n || (pass[0].statut != currentItemPassation_marches_moe.statut ) ) \n { \n insert_in_basePassation_marches_moe(item,suppression);\n }\n else\n { \n item.$selected = true;\n item.$edit = false;\n }\n }\n } else\n insert_in_basePassation_marches_moe(item,suppression);\n }", "renderSpecialProducts() {\n const {\n foodMenu,\n languageCode\n } = this.props;\n\n if (!foodMenu || !foodMenu.length) {\n return (\n <div\n className=\"Skeleton-Wrapper\"\n >\n <Skeleton />\n <Skeleton />\n </div>\n );\n }\n\n return foodMenu.map((product) => {\n const {\n _id = '',\n category: {\n title\n } = {},\n language = ''\n } = product;\n\n if (title !== SPECIAL || languageCode !== language) {\n return null;\n }\n\n return <Product key={ _id } product={ product } />;\n });\n }", "function prerequisitiesValidator (Prerequisities, Enrollment){\n // arg Prerequisities should be in this format:\n // Prerequisities = {\"code\":{\"1\": [\"COMP9021\", \"COMP9024\"],\"2\": [\"COMP9020\", \"COMP9024\"]},\"UOC\": 0}\n let canBeEnrolled = false;\n //console.log(Prerequisities.code, Enrollment);\n if (Prerequisities.code[1].length === 0 && Prerequisities.code[2].length === 0){\n //console.log('1');\n canBeEnrolled = true;\n }else if(Prerequisities.code[1].length >= 1 && Prerequisities.code[2].length === 0){\n //console.log('2');\n for(let course of Prerequisities.code[1]){\n if(Enrollment.includes(course)){\n canBeEnrolled = true;\n break;\n }\n }\n }else if(Prerequisities.code[1].length === 0 && Prerequisities.code[2] >= 1){\n //console.log('3');\n for(let course of Prerequisities.code[2]){\n if(Enrollment.includes(course)){\n canBeEnrolled = true;\n break;\n }\n }\n }else if(Prerequisities.code[1].length >= 1 && Prerequisities.code[2].length >=1 ){\n //console.log('4');\n let validatorCodeList1 = false;\n let validatorCodeList2 = false;\n for(let course of Prerequisities.code[1]){\n if(Enrollment.includes(course)){\n canBeEnrolled = true;\n break;\n }\n }\n for(let course of Prerequisities.code[2]){\n if(Enrollment.includes(course)){\n canBeEnrolled = true;\n break;\n }\n }\n if(validatorCodeList1 === true && validatorCodeList2 === true){\n canBeEnrolled = true;\n }\n }\n return canBeEnrolled;\n}", "function outOfStock(products, modalProducts){\r\n for (let product of products){\r\n const remaining = product.children[2].children[0].children[0];\r\n if (remaining.innerHTML === \"0\"){\r\n const heading = product.children[0].children[0];\r\n const button = product.children[2].children[1];\r\n // amend styling\r\n heading.style.color = \"lightgrey\";\r\n remaining.style.color = \"lightgrey\";\r\n button.style.backgroundColor = \"lightgrey\";\r\n button.disabled = \"true\";\r\n button.innerHTML = \"Out of Stock\";\r\n } \r\n }\r\n \r\n for (let mProduct of modalProducts){\r\n const mRemainder = mProduct.children[2].children[0];\r\n if (mRemainder.innerHTML === \"0\"){\r\n const radioBtn = mProduct.children[0].children[0];\r\n mProduct.style.opacity = \"0.4\";\r\n radioBtn.disabled = \"true\";\r\n }\r\n }\r\n}", "function reglaRebajaPrecios(){\n if(producto.super_avance.sellIn = 0)\n {\n precio_SuperAvance - 2;\n\n if(producto.fc_superduper.sellIn = 0){\n precio_FullSuperDuper - 2;\n\n if(producto.f_cobertura.sellIn = 0){\n precio_FullCobertura - 2;\n }\n }\n }else{\n }\n}", "validateDot1qForm() {\n let flag = 0;\n if (\n (this.state.type === \"Select\" &&\n this.state.pcp === \"\" &&\n this.state.vid === \"\") ||\n (this.state.type === \"Others\" &&\n this.state.otherType === \"\" &&\n this.state.pcp === \"\" &&\n this.state.vid === \"\")\n ) {\n this.setState(\n {\n emptyError: true,\n },\n () => {\n return false;\n }\n );\n } else {\n }\n\n if (this.state.pcp !== \"\") {\n flag = 1;\n if (!this.validatePcp()) return false;\n }\n if (this.state.vid !== \"\") {\n flag = 1;\n if (!this.validateVid()) return false;\n }\n if (\n this.state.type !== \"Select\" &&\n !(this.state.type === \"Others\" && this.state.otherType === \"\")\n ) {\n flag = 1;\n }\n if (flag === 1) return true;\n }", "updatePurchaseState(updatedIngredient) {\n const ingredients = {\n ...updatedIngredient,\n };\n\n const sum = Object.keys(ingredients)\n .map((igKey) => {\n return ingredients[igKey]; //its return the value(cnt) salad :1 then it return 1 in place of salad\n })\n .reduce((sum, el) => {\n return sum + el;\n }, 0); //reduce method sums all got values(igKey) and gives direct sum\n\n return sum > 0;\n }", "checkSelected(keys){\n const selected = this.props.selected;\n const correct = this.props.correct;\n if(selected != null) {\n \n if(selected.indexOf(keys) >= 0 && correct.indexOf(keys) >= 0) {\n return \"key chosen\";\n } else if (selected.indexOf(keys) >= 0 && correct.indexOf(keys) <= 0) {\n return \"key wrong\";\n } else {\n return \"key\";\n }\n }\n }", "isFood() {\n return arraysEqual(this.props.food, [this.props.X, this.props.Y]);\n }", "function calculDeductible () {\n for (var i = 0; i < deliveries.length; i++) {\n if (deliveries[i].options.deductibleReduction == true) {\n deliveries[i].price += deliveries[i].volume\n deliveries[i].commission.convargo += deliveries[i].volume\n }\n }\n}", "function saveReaction(){ \n var enzyme;\n substrates = [];\n products = [];\n var reversible = document.getElementById('reversible_checkbox').checked;\n \n //The database stores the string \"(ir)reversible\"... not a boolean \n var reversibleString;\n if(reversible)\n reversibleString = \"Reversible\"\n else\n reversibleString = \"Irreversible\"\n\n //get substrates. gets name from the select (its been populated) by\n // editReaction. Then gets the correct abbreviation. Pushes to array\n // Similar method for getting products and enzyme.\n for(var i=0; i < subSelects.length; i++)\n {\n subname = subSelects[i].value;\n var subabbr;\n for(var j = 0; j < allSubsNoDuplicates.length; j++) {\n if(allSubsNoDuplicates[j][0] == subname) {\n subabbr = allSubsNoDuplicates[j][1];\n }\n }\n substrates.push([subname, subabbr]);\n }\n\n //get enzyme\n var enzabbr;\n for(var j = 0; j < allEnzysNoDuplicates.length; j++) {\n if(allEnzysNoDuplicates[j][0] == enzSelect.value) {\n enzabbr = allEnzysNoDuplicates[j][1];\n }\n }\n enzyme = [enzSelect.value, enzabbr];\n \n //get products\n for(var i = 0; i < prodSelects.length; i++) {\n prodname = prodSelects[i].value\n var prodabbr;\n for(var j = 0; j < allProdsNoDuplicates.length; j++) {\n if(allProdsNoDuplicates[j][0] == prodname) {\n prodabbr = allProdsNoDuplicates[j][1];\n }\n }\n products.push([prodname, prodabbr]);\n }\n\n //Check to make sure the reaction is valid (no repeated enzyme, no two same products or subs...)\n if(isValidReaction(substrates, enzyme, products, editReactionNumber)) {\n //replace values at the editReactionNumber with what the user wants now\n addedReactions[editReactionNumber] = {'substrates': substrates, 'enzyme': enzyme, 'products': products, 'reversible': reversibleString};\n //clear fields\n clearReactionFields();\n \n //children is a list of divs displaying previous reactions + all following divs\n var children = reactionTable.childNodes;\n\n //the table element has children 1 being the table header and 2 as the first row\n //so we loop through and delete the first row for each reaction added\n //i don't really know what children[0] is :) maybe the table itself?\n firstRowOffset = 2;\n while(children[firstRowOffset]) {\n reactionTable.removeChild(children[firstRowOffset]);\n \n }\n \n //redraw the rows we are keeping. Deletes the entire table \n //and then builds it back up\n for(var i = 0; i < currentReactionNumber; i++){\n displayCurrentReactionInfo(i);\n }\n\n //make button for saving reaction invisible, make the add reaction button visible\n addReactionButton.style = 'display:block';\n saveReactionButton.style = 'display:none';\n\n //Do not display a header\n reactionHeader.innerHTML = \"\";\n }\n}", "function solution(){\n var args = Array.prototype.slice.call(arguments);\n\n var out = args.filter(function(v,i){\n return args.indexOf(v) === i;\n });\n\n return args.length !== out.length;\n\n}", "isAcceptingOperand() {return this.operandCount < 2 }", "validateOrder(_givenOrder, _preparedOrder) {\n _preparedOrder = _preparedOrder.sort((n1, n2) => n1 - n2); // Sorts both orders\n _givenOrder.ingredients = _givenOrder.ingredients.sort((n1, n2) => n1 - n2);\n KebapHouse.soldOrders++;\n for (let i = 0; i < _givenOrder.ingredients.length; i++) { // Checks if ingredients match\n if (_givenOrder.ingredients[i] != _preparedOrder[i]) {\n return false;\n }\n }\n return true;\n }", "function question4 () {\n // Answer:\n for (let product=0; product<data.length; product++) {\n if (data[product].materials); {\n for (let material=0; data[product].materials[material]; material++) {\n if (data[product].materials[material]===\"wood\") {\n console.log(data[product].title + \" is made of wood.\");\n }\n }\n }\n }\n}", "function branchingProcess() {\n var implicantsPowerSet = powerSet(remainingImplicants);\n validSolutions = filterPowerSet(implicantsPowerSet); //array contains valid cominations\n var currentValidSolutions = validSolutions.slice();\n minimalSolutions = filterPossibleSolutions(currentValidSolutions); //array contains valid combainations with least cost\n}", "function mainBoolOut(A, DC) {\n\n // Initialize\n initializeBool(A, DC);\n\n // Use copy of C to preserve original list\n let Acopy = [...C];\n\n // Converts every array element from decimal to class element\n Acopy.forEach(function (value, index, array) {\n array[index] = new Num(Number(value).toString(2), value, \"\");\n });\n\n // List B groups each binary number by the number of 1s it contains. Add 'n' lists to B, where n is the maximum number of groups possible\n while (B.length < numV + 1) {\n B.push([]);\n notDoneList.push([]);\n }\n\n // Determines the number of 1s in each binary element and places it into its corresponding list in B\n Acopy.forEach(function (value) {\n B[value.count1s].push(value);\n });\n\n // Determines which elements are to continue in the iteration and which are complete. Continued until no more iterations can be performed.\n while (!doneIter) {\n iteration();\n }\n\n // This function cleans up the final list by removing duplicates\n remExtra();\n\n // Determines boolean expression for each element in doneList \n calcLogic();\n\n // Organizes data into a table\n let elemArr = graph(DC);\n\n // Finds the potential for each row in the table : the potential is determined by a prioritization algorithm - priority is given to rows with essential prime implicants and then those with the maximum number of 'x's the row can cancel\n let pntl = potentialFcn(elemArr);\n\n // Iteration loop that finds optimal boolean expression.\n while (!check) {\n boolExpr += doneList[pntl[0][2]].logic + \" + \"; // Update boolean expression\n elemArr = newGraph(elemArr, pntl[0][2]); // Reproduce graph\n pntl = potentialFcn(elemArr); // Reproduce new potential function for the new graph\n checkElem(elemArr); // Checks whether the all 'x's are cancelled.\n }\n\n boolExpr = boolExpr.substring(0, boolExpr.length - 3); // Remove the last three characters, ie. ' + ', to produce final expression\n\n return boolExpr;\n\n}", "function restrictListProducts(prods, restriction) {\n\tlet product_names = [];\n\tvar checkBox1 = document.getElementById(\"lactoseF\");\n\tvar checkBox2 = document.getElementById(\"nutsF\");\n\tvar checkBox3 = document.getElementById(\"organique\");\n\tvar checkBox4 = document.getElementById(\"none\");\n\n\n\n\tfor (let i=0; i<prods.length; i+=1) {\n\t\t/*if ((document.querySelector(\".organiqueCB\").checked)&&(document.querySelector(\".pasDeNoix\").checked) && (document.querySelector(\".lactoseFreeCB\").checked)&& (prods[i].all == true)){\n\t\t\tproduct_names.push(prods[i].name);\n\n\t\t}*/\n\t\tif (checkBox1.checked==true && checkBox2.checked==true && checkBox3.checked==true && prods[i].all==true){\n\t\t\tproduct_names.push(prods[i].name);\n\t\t}\n\t\telse if(checkBox3.checked==true &&checkBox2.checked==true && prods[i].vegAndNut==true){\n\t\t\tproduct_names.push(prods[i].name);\n\t\t}\n\t\telse if (checkBox3.checked==true && checkBox1.checked==true && prods[i].vegAndGlu==true){\n\t\t\tproduct_names.push(prods[i].name);\n\t\t}\n\n\t\telse if (checkBox1.checked==true && checkBox2.checked==true && prods[i].nutAndGlu==true){\n\t\t\tproduct_names.push(prods[i].name);\n\t\t}\n\t\telse if(checkBox1.checked==true && checkBox2.checked==false && checkBox3.checked==false && prods[i].glutenFree==true ){\n\t\t\tproduct_names.push(prods[i].name);\n\t\t}\n\t\telse if(checkBox2.checked==true && checkBox1.checked==false && checkBox3.checked==false && prods[i].no_nuts==true){\n\t\t\tproduct_names.push(prods[i].name);\n\n\t\t}\n\t\telse if (checkBox3.checked==true && checkBox1.checked==false&&checkBox2.checked==false && prods[i].vegetarian==true){\n\t\t\tproduct_names.push(prods[i].name);\n\n\t\t\n\t\t}\n\t\telse if (checkBox4.checked==true){\n\t\t\t\n\t\t\tproduct_names.push(prods[i].name);\n\t\t\t\n\t\t\t\n\t\t}\n\t\t/*if (checkBox1.checked==false && checkBox2.checked==false && checkBox3.checked==false && (prods[i].vegetarian==true || prods[i].glutenFree==true || prods[i].no_nuts==true)){\n\t\t\tproduct_names.push(prods[i].name);\n\t\t}\n\n\t\t/*else if ((document.querySelector(\".organiqueCB\").checked)&& (prods[i].vegetarian == true)){\n\n\t\t\tif ((document.querySelector(\".lactoseFreeCB\").checked) && (prods[i].glutenFree == true)){\n\t\t\t\tproduct_names.push(prods[i].name);\n\t\t\t}\n\t\t\telse if ((restriction == \"pasDeNoix\")&& (prods[i].no_nuts == true)){\n\t\t\t\tproduct_names.push(prods[i].name);\n\t\t\t}else{\n\t\t\tproduct_names.push(prods[i].name);}\n\t\t}\n\t\telse if ((document.querySelector(\".lactoseFreeCB\").checked) && (prods[i].glutenFree == true)){\n\t\t\tif ((restriction == \"pasDeNoix\")&& (prods[i].no_nuts == true)){\n\t\t\t\tproduct_names.push(prods[i].name);\n\t\t\t}else{\n\t\t\t\tproduct_names.push(prods[i].name);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t/*else if ((restriction == \"pasDeNoix\")&& (prods[i].no_nuts == true)){\n\t\t\tproduct_names.push(prods[i].name);\n\t\t}\n\t\t\n\t\telse if ((restriction == \"none\")){\n\t\t\tproduct_names.push(prods[i].name);\n\t\t}*/\n\t\t\n\t}\n\treturn product_names;\n}", "validateDegreeReqs() {\n let program = this.props.program\n let terms = program.terms\n for (let term of terms) {\n let courses = this.props.courses\n for (let course of program[term].courses) {\n if (course == \"MSCI 261\" || courses[course].replaces == \"MSCI 261\") {\n return true\n }\n }\n }\n\n return false\n }", "function test_existanceContrat_moe (item,suppression)\n { \n if (suppression!=1)\n {\n var pass = vm.allcontrat_moe.filter(function(obj)\n {\n return obj.id == currentItemContrat_moe.id;\n });\n if(pass[0])\n {\n if((pass[0].intitule != currentItemContrat_moe.intitule )\n || (pass[0].ref_contrat != currentItemContrat_moe.ref_contrat)\n || (pass[0].montant_contrat != currentItemContrat_moe.montant_contrat ) \n || (pass[0].date_signature != currentItemContrat_moe.date_signature ) \n || (pass[0].id_moe != currentItemContrat_moe.id_moe )) \n { \n insert_in_baseContrat_moe(item,suppression);\n }\n else\n { \n item.$selected = true;\n item.$edit = false;\n }\n }\n } else\n insert_in_baseContrat_moe(item,suppression);\n }", "function test_existanceContrat_moe (item,suppression)\n { \n if (suppression!=1)\n {\n var pass = vm.allcontrat_moe.filter(function(obj)\n {\n return obj.id == currentItemContrat_moe.id;\n });\n if(pass[0])\n {\n if((pass[0].intitule != currentItemContrat_moe.intitule )\n || (pass[0].ref_contrat != currentItemContrat_moe.ref_contrat)\n || (pass[0].montant_contrat != currentItemContrat_moe.montant_contrat ) \n || (pass[0].date_signature != currentItemContrat_moe.date_signature ) \n || (pass[0].id_moe != currentItemContrat_moe.id_moe )) \n { \n insert_in_baseContrat_moe(item,suppression);\n }\n else\n { \n item.$selected = true;\n item.$edit = false;\n }\n }\n } else\n insert_in_baseContrat_moe(item,suppression);\n }", "function baseresidue (query,prims,facts,rules)\r {var answer = baseresone(query,seq(),seq(),nil,prims,seq(),seq(),facts,rules);\n if (answer) {return maksand(answer[0])};\n return false}", "function go() {\n var gas = document.getElementById(\"gas\").checked;\n var electric = document.getElementById(\"electric\").checked;\n var windows = document.getElementById(\"windows\").checked;\n var key = document.getElementById(\"key\").checked;\n if (gas && electric && windows && key) {\n swal(\"Vous avez tout fait\",\n \"Tu peux partir l'esprit tranquille.\",\n \"success\");\n } else if (!gas && electric && windows && key) {\n swal(\"Vous ne pouvez pas partir\",\n \"Le gaz n'est pas fermé !\",\n \"error\");\n } else if (gas && electric && !windows && key) {\n swal(\"Vous ne pouvez pas partir\",\n \"Les fenêtres ne sont pas fermées !\",\n \"error\");\n } else if (gas && !electric && windows && key) {\n swal(\"Vous ne pouvez pas partir\",\n \"L'électricité n'est pas fermée !\",\n \"error\");\n } else if (gas && electric && windows && !key) {\n swal(\"Vous ne pouvez pas partir\",\n \"Vous n'avez pas pris vos clefs !\",\n \"error\");\n } else if (!gas && !electric && windows && key) {\n swal(\"Vous ne pouvez pas partir\",\n \"L'électricité et le gaz ne sont pas coupés !\",\n \"error\");\n } else if (!gas && electric && !windows && key) {\n swal(\"Vous ne pouvez pas partir\",\n \"Le gaz et les fenêtres ne sont pas fermés !\",\n \"error\");\n } else if (!gas && electric && windows && !key) {\n swal(\"Vous ne pouvez pas partir\",\n \"Le gaz n'est pas fermé et vous n'avez pas pris vos clefs !\",\n \"error\");\n } else if (gas && !electric && !windows && key) {\n swal(\"Vous ne pouvez pas partir\",\n \"L'électricité et les fenêtres ne sont pas fermées !\",\n \"error\");\n } else if (gas && !electric && windows && !key) {\n swal(\"Vous ne pouvez pas partir\",\n \"L'électricité n'est pas fermée et vous n'avez pas pris vos clefs !\",\n \"error\");\n } else if (gas && electric && !windows && !key) {\n swal(\"Vous ne pouvez pas partir\",\n \"Les fenêtres ne sont pas fermées et vous n'avez pas pris vos clefs !\",\n \"error\");\n } else if (!gas && !electric && !windows && key) {\n swal(\"Vous ne pouvez pas partir\",\n \"Le gaz, l'électricité et les fenêtres ne sont pas fermés !\",\n \"error\");\n } else if (gas && !electric && !windows && !key) {\n swal(\"Vous ne pouvez pas partir\",\n \"Les fenêtres, l'électricité ne sont pas fermées et vous n'avez pas pris vos clefs !\",\n \"error\");\n } else if (!gas && electric && !windows && !key) {\n swal(\"Vous ne pouvez pas partir\",\n \"Le gaz, les fenêtres ne sont pas fermés et vous n'avez pas pris vos clefs !\",\n \"error\");\n } else if (!gas && !electric && !windows && !key) {\n swal(\"Vous ne pouvez pas partir\",\n \"Vous n'avez rien fait !\",\n \"error\");\n }\n}", "function renderDualType(dualAttacks, dualDefense) {\n resetHtml();\n //document.getElementById(\"effect-break\").innerHTML += \"<br>\";\n \n quadAttack = findEffect(dualAttacks, \"4\");\n supers = findEffect(dualAttacks, \"2\");\n half = findEffect(dualAttacks, \"0.5\");\n \n noEffect = findEffect(dualAttacks, \"0\");\n\n quadWeak = findEffect(dualDefense, \"4\");\n weak = findEffect(dualDefense, \"2\");\n resist = findEffect(dualDefense, \"0.5\");\n quadResist = findEffect(dualDefense, \"0.25\");\n immune = findEffect(dualDefense, \"0\");\n\n\n console.log(supers)\n \n // if(dualAttacks[j] == \"4\") {\n\n if(quadAttack.length > 0) {\n document.getElementById(\"super-content-container\").innerHTML += '<h5 style=\"color: rgb(204, 255, 204);\">Super Effective</h5>';\n for(var i in quadAttack) {\n document.getElementById(\"super-content-container\").innerHTML+=\n '<div id=\"' + quadAttack[i] + '-text\">' + '<font color=\"#ccffcc\">4x </font>' + quadAttack[i] + '</div><br>';\n }\n }\n else if(supers.length <= 0) {\n document.getElementById(\"half-content-container\").style.width = \"100%\";\n document.getElementById(\"super-content-container\").style.width = \"0%\";\n }\n if(supers.length > 0 && quadAttack <= 0) {\n document.getElementById(\"super-content-container\").innerHTML += '<h5 style=\"color: rgb(204, 255, 204);\">Super Effective</h5>';\n for(var i in supers) {\n document.getElementById(\"super-content-container\").innerHTML+=\n '<div id=\"' + supers[i] + '-text\">' + supers[i] + '</div><br>';\n }\n }\n else if(supers.length > 0 && quadAttack.length > 0) {\n for(var i in supers) {\n document.getElementById(\"super-content-container\").innerHTML+=\n '<div id=\"' + supers[i] + '-text\">' + supers[i] + '</div><br>';\n }\n }\n\n if(quadWeak.length > 0) {\n document.getElementById(\"half-content-container\").innerHTML += '<h5 style=\"color: rgb(255, 204, 204);\">Half Effective</h5>';\n for(var i in quadWeak) {\n document.getElementById(\"half-content-container\").innerHTML+=\n '<div id=\"' + quadWeak[i] + '-text\">'+ '<font color=\"#ffcccc\">1/4x </font>' + quadWeak[i] + '</div><br>';\n }\n }\n else if(half.length <= 0) {\n document.getElementById(\"half-content-container\").style.width = \"0%\";\n document.getElementById(\"super-content-container\").style.width = \"100%\";\n } \n if(half.length > 0 && quadWeak.length <= 0) {\n document.getElementById(\"half-content-container\").innerHTML += '<h5 style=\"color: rgb(255, 204, 204);\">Half Effective</h5>';\n for(var i in half) {\n document.getElementById(\"half-content-container\").innerHTML+=\n '<div id=\"' + half[i] + '-text\">' + half[i] + '</div><br>';\n }\n } else if(half.length > 0 && quadWeak.length > 0) {\n for(var i in half) {\n document.getElementById(\"half-content-container\").innerHTML+=\n '<div id=\"' + half[i] + '-text\">' + half[i] + '</div><br>';\n }\n }\n equalHeightsUpperContent();\n \n\n if(quadResist.length > 0) {\n document.getElementById(\"resist-content-container\").innerHTML += '<h5 style=\"color: rgb(204, 255, 204);\">Resists</h5>';\n for(var i in quadResist) {\n document.getElementById(\"resist-content-container\").innerHTML+=\n '<div id=\"' + quadResist[i] + '-text\">' + '<font color=\"#ccffcc\">1/4x </font>' + quadResist[i] + '</div><br>';\n }\n }\n else if(resist.length <= 0){\n document.getElementById(\"resist-content-container\").style.width = \"0%\";\n document.getElementById(\"weak-content-container\").style.width = \"100%\";\n }\n if(resist.length > 0 && quadResist.length <= 0) {\n document.getElementById(\"resist-content-container\").innerHTML += '<h5 style=\"color: rgb(204, 255, 204);\">Resists</h5>';\n for(var i in resist) {\n document.getElementById(\"resist-content-container\").innerHTML+=\n '<div id=\"' + resist[i] + '-text\">' + resist[i] + '</div><br>';\n }\n }\n else if(resist.length > 0 && quadResist.length > 0) {\n for(var i in resist) {\n document.getElementById(\"resist-content-container\").innerHTML+=\n '<div id=\"' + resist[i] + '-text\">' + resist[i] + '</div><br>';\n }\n } \n\n if(quadWeak.length > 0) {\n document.getElementById(\"weak-content-container\").innerHTML += '<h5 style=\"color: rgb(255, 204, 204);\">Weak Against</h5>';\n for(var i in quadWeak) {\n document.getElementById(\"weak-content-container\").innerHTML+=\n '<div id=\"' + quadWeak[i] + '-text\">' + '<font color=\"#ffcccc\">' + '4x ' + '</font>'+ quadWeak[i] + '</div><br>';\n }\n }\n else if (weak <= 0) {\n document.getElementById(\"resist-content-container\").style.width = \"100%\";\n document.getElementById(\"weak-content-container\").style.width = \"0%\";\n }\n if(weak.length > 0 && quadWeak.length <= 0) {\n document.getElementById(\"weak-content-container\").innerHTML += '<h5 style=\"color: rgb(255, 204, 204);\">Weak Against</h5>';\n for(var i in weak) {\n document.getElementById(\"weak-content-container\").innerHTML+=\n '<div id=\"' + weak[i] + '-text\">' + weak[i] + '</div><br>';\n }\n } \n else if(weak.length > 0) {\n for(var i in weak) {\n document.getElementById(\"weak-content-container\").innerHTML+=\n '<div id=\"' + weak[i] + '-text\">' + weak[i] + '</div><br>';\n }\n }\n adjustHeightMidContent();\n\n if(noEffect.length == 0 && immune.length ==0) {\n document.getElementById(\"no-effect-content-container\").style.height = \"0\";\n document.getElementById(\"immune-content-container\").style.height = \"0\";\n document.getElementById(\"no-effect-content-container\").style.width = \"0\";\n document.getElementById(\"immune-content-container\").style.width = \"0\";\n } \n else {\n if(noEffect.length > 0) {\n document.getElementById(\"no-effect-content-container\").innerHTML += '<h5 style=\"color: rgb(255, 204, 204);\">No Effect Against</h5>';\n for(var i in noEffect) {\n document.getElementById(\"no-effect-content-container\").innerHTML+=\n '<div id=\"' + noEffect[i] + '-text\">' + noEffect[i] + '</div><br>';\n }\n } else {\n document.getElementById(\"no-effect-content-container\").style.width = \"0%\";\n document.getElementById(\"immune-content-container\").style.width = \"100%\";\n }\n if(immune.length > 0) {\n document.getElementById(\"immune-content-container\").innerHTML += '<h5 style=\"color: rgb(204, 255, 204);\">Immune To</h5>';\n for(var i in immune) {\n document.getElementById(\"immune-content-container\").innerHTML+=\n '<div id=\"' + immune[i] + '-text\">' + immune[i] + '</div><br>';\n }\n } else {\n document.getElementById(\"no-effect-content-container\").style.width = \"100%\";\n document.getElementById(\"immune-content-container\").style.width = \"0%\";\n }\n }\n adjustHeightBottomContent();\n}", "vendItem(productIndex) {\n //check if valid\n let product = vm.products[productIndex]\n // IF Exists we have some you have enough money\n if (product && product.quantity > 0 && vm.currentTransaction >= product.price) {\n this.processTransaction(product)\n return JSON.parse(JSON.stringify(product))\n }\n return false\n }", "function optionDeductible()\n{\n for(var j=0;j<rentals.length;j++)\n {\n var timeDay= get_date(rentals[j].id);\n var option_deductible=4*timeDay;\n var rentalPriceDeduitOption;\n\n if(rentals[j].options.deductibleReduction==true)\n {\n rentalPriceDeduitOption=rentals[j].price+ option_deductible;\n\n console.log(rentals[j].driver.firstName+ ''+ rentals[j].driver.lastName + '\\n' +'rental price (deduit option) is : ' + rentalPriceDeduitOption+ '.');\n\n rentals[j].price=rentalPriceDeduitOption;\n }\n else\n {\n rentalPriceDeduitOption=rentals[j].price;\n\n console.log(rentals[j].driver.firstName+ ''+ rentals[j].driver.lastName + '\\n' +'rental price (without deduit option) is : ' + rentalPriceDeduitOption+ '.')\n }\n }\n}", "function And(factA, factB){\n return {type:\"composite\",verify:game=>factA.verify(game)&&factB.verify(game)}\n}", "static async _checkProductsAvailInStock(cart) {\n let invalid = '';\n const tempCart = (typeof cart !== 'object' ? cart.toObject() : cart);\n\n await ItemProductController._addProductsForSingleOrder(tempCart);\n _.each(tempCart.items, (item) => {\n // invalid sku\n if (!item.product) {\n invalid = item.sku;\n return false;\n }\n\n // if item is a product\n if (item.product.sku === item.sku) {\n if (item.count > item.product.stock_qty) {\n invalid = item.sku;\n return false;\n }\n\n return;\n }\n\n // if item is a product variation\n _.each(item.product.variations, (variation) => {\n if (variation.sku === item.sku) {\n if (item.count > variation.stock_qty) {\n invalid = item.sku;\n }\n\n return false;\n }\n });\n\n if (invalid !== '') {\n return false;\n }\n });\n\n return invalid;\n }", "compareProductQuantity(product){\n console.log(\"compareProductQuantity: PRODUCT=\",product);\n console.log(\"compareProductQuantity: this.props.cart.cart=\", this.props.cart.cart);\n let result=false;\n this.props.cart.cart.forEach(item=>{\n if (item.product_Id===product.product_Id && \n item.size===product.size && \n item.color===product.color && \n item.quantity===product.quantity) \n result=true;\n })\n return result;\n }", "evaluateAnswer(userAnswer){\n \tconst {value1, value2, value3, proposedAnswer} = this.state;\n \tconst corrAnswer = value1 + value2 + value3;\n \treturn(\n \t\t (corrAnswer === proposedAnswer && userAnswer === 'true') ||\n \t\t (corrAnswer !== proposedAnswer && userAnswer === 'false')\n \t);\n }", "isDeterministicComplete() {\r\n let isDeterministic = this.isDeterministic();\r\n if (!isDeterministic) return false;\r\n\r\n // Each pair (state, symbol) must have an image by transition function\r\n for (let index = 0; index < this.states.length; index++) {\r\n const state = this.states[index];\r\n for (const symbol of this.alphabet) {\r\n if (this.transition(state, symbol) == null)\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n }", "function checkProductControls()\r\n {\r\n if ($claimType == 'Warranty')\r\n {\r\n productControls(false); // disable\r\n }\r\n else if ($claimType == 'Non-Warranty')\r\n {\r\n productControls(false); // disable\r\n }\r\n else if($claimStatus == 'Created')\r\n {\r\n productControls(true); // enable\r\n }\r\n else\r\n {\r\n productControls(false); // disable\r\n }\r\n }", "function GetItemTrueFalseForm2(){\n var val1 = document.getElementById(\"item1check\").checked;\n var val2 = document.getElementById(\"item2check\").checked;\n var val3 = document.getElementById(\"item3check\").checked;\n var val4 = document.getElementById(\"item4check\").checked;\n var val5 = document.getElementById(\"item5check\").checked;\n var val6 = document.getElementById(\"item6check\").checked;\n var val7 = document.getElementById(\"item7check\").checked;\n var val8 = document.getElementById(\"item8check\").checked;\n var val9 = document.getElementById(\"item9check\").checked;\n var val10 = document.getElementById(\"item10check\").checked;\n var val11 = document.getElementById(\"item11check\").checked;\n var val12 = document.getElementById(\"item12check\").checked;\n var val13 = document.getElementById(\"item13check\").checked;\n var val14 = document.getElementById(\"item14check\").checked;\n var val15 = document.getElementById(\"item15check\").checked;\n \n var returnval1;\n var returnval2;\n var returnval3;\n var returnval4;\n var returnval5;\n var returnval6;\n var returnval7;\n var returnval8;\n var returnval9;\n var returnval10;\n var returnval11;\n var returnval12;\n var returnval13;\n var returnval14;\n var returnval15;\n \n if(val1 == false){\n returnval1 = \"False (Correct)\";\n }else{\n returnval1 = \"True (Incorrect)\";\n }\n if(val2 == false){\n returnval2 = \"False (Incorrect)\";\n }else{\n returnval2 = \"True (Correct)\";\n }\n if(val3 == false){\n returnval3 = \"False (Correct)\";\n }else{\n returnval3 = \"True (Incorrect)\";\n }\n if(val4 == false){\n returnval4 = \"False (Incorrect)\";\n }else{\n returnval4 = \"True (Correct)\";\n }\n if(val5 == false){\n returnval5 = \"False (Correct)\";\n }else{\n returnval5 = \"True (Incorrect)\";\n }\n if(val6 == false){\n returnval6 = \"False (Correct)\";\n }else{\n returnval6 = \"True (Incorrect)\";\n }\n if(val7 == false){\n returnval7 = \"False (Correct)\";\n }else{\n returnval7 = \"True (Incorrect)\";\n }\n if(val8 == false){\n returnval8 = \"False (Correct)\";\n }else{\n returnval8 = \"True (Incorrect)\";\n }\n if(val9 == false){\n returnval9 = \"False (Incorrect)\";\n }else{\n returnval9 = \"True (Correct)\";\n }\n if(val10 == false){\n returnval10 = \"False (Incorrect)\";\n }else{\n returnval10 = \"True (Correct)\";\n }\n if(val11 == false){\n returnval11 = \"False (Correct)\";\n }else{\n returnval11 = \"True (Incorrect)\";\n }\n if(val12 == false){\n returnval12 = \"False (Correct)\";\n }else{\n returnval12 = \"True (Incorrect)\";\n }\n if(val13 == false){\n returnval13 = \"False (Correct)\";\n }else{\n returnval13 = \"True (Incorrect)\";\n }\n if(val14 == false){\n returnval14 = \"False (Correct)\";\n }else{\n returnval14 = \"True (Incorrect)\";\n }\n if(val15 == false){\n returnval15 = \"False (Incorrect)\";\n }else{\n returnval15 = \"True (Correct)\";\n }\n \n return [returnval1, returnval2, returnval3, returnval4, returnval5, returnval6, returnval7, returnval8, returnval9, returnval10, returnval11, returnval12, returnval13, returnval14, returnval15];\n}", "function findCombination(firstTime)\n{\n\t//create a temporary 'choice' array containing the choices of the customer\n\tvar choice = new Array();\n\t$('div#attributes select').each(function(){\n\t\tchoice.push($(this).val());\n\t});\n\tvar nbAttributesEquals = 0;\n\t//testing every combination to find the conbination's attributes' case of the user\n\t\n\tfor (combination in combinations)\n\t{\n\t\t//verify if this combinaison is the same that the user's choice\n\t\tnbAttributesEquals = 0;\n\t\tfor (idAttribute in combinations[combination]['idsAttributes'])\n\t\t{\n\t\t\t//ie6 bug fix\n\t\t\tif (idAttribute != 'indexOf'){\n\t\t\t\t//if this attribute has been choose by user\n\t\t\t\tif (in_array(combinations[combination]['idsAttributes'][idAttribute], choice))\n\t\t\t\t{\n\t\t\t\t\t//we are in a good way to find the good combination !\n\t\t\t\t\tnbAttributesEquals++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (nbAttributesEquals == choice.length)\n\t\t{\n\t\t\t//combination of the user has been found in our specifications of combinations (created in back office)\n\t\t\tselectedCombination['unavailable'] = false;\n\t\t\tselectedCombination['reference'] = combinations[combination]['reference'];\n\t\t\t$('#idCombination').val(combinations[combination]['idCombination']);\n\n\t\t\t//get the data of product with these attributes\n\t\t\tquantityAvailable = combinations[combination]['quantity'];\n\t\t\tselectedCombination['price'] = combinations[combination]['price'];\n\t\t\tif (combinations[combination]['ecotax'])\n\t\t\t\tselectedCombination['ecotax'] = combinations[combination]['ecotax'];\n\t\t\telse\n\t\t\t\tselectedCombination['ecotax'] = default_eco_tax;\n\t\t\t\n\t\t\t//show the large image in relation to the selected combination\n\t\t\tif (combinations[combination]['image'] && combinations[combination]['image'] != -1)\n\t\t\t\tdisplayImage( $('#thumb_'+combinations[combination]['image']).parent() );\n\t\t\t\n\t\t\t//update the display\n\t\t\tupdateDisplay();\n\n\t\t\tif(typeof(firstTime) != 'undefined' && firstTime)\n\t\t\t\trefreshProductImages(0);\n\t\t\telse\n\t\t\t\trefreshProductImages(combinations[combination]['idCombination']);\n\t\t\t//leave the function because combination has been found\n\t\t\treturn;\n\t\t}\n\t}\n\t//this combination doesn't exist (not created in back office)\n\tselectedCombination['unavailable'] = true;\n\tupdateDisplay();\n}", "function test_existanceAvenant_moe (item,suppression)\n { \n if (suppression!=1)\n {\n var pass = vm.allavenant_moe.filter(function(obj)\n {\n return obj.id == currentItemAvenant_moe.id;\n });\n if(pass[0])\n {\n if((pass[0].description != currentItemAvenant_moe.description )\n || (pass[0].montant != currentItemAvenant_moe.montant)\n || (pass[0].date_signature != currentItemAvenant_moe.date_signature )) \n { \n insert_in_baseAvenant_moe(item,suppression);\n }\n else\n { \n item.$selected = true;\n item.$edit = false;\n }\n }\n } else\n insert_in_baseAvenant_moe(item,suppression);\n }", "function test_existanceAvenant_moe (item,suppression)\n { \n if (suppression!=1)\n {\n var pass = vm.allavenant_moe.filter(function(obj)\n {\n return obj.id == currentItemAvenant_moe.id;\n });\n if(pass[0])\n {\n if((pass[0].description != currentItemAvenant_moe.description )\n || (pass[0].montant != currentItemAvenant_moe.montant)\n || (pass[0].date_signature != currentItemAvenant_moe.date_signature )) \n { \n insert_in_baseAvenant_moe(item,suppression);\n }\n else\n { \n item.$selected = true;\n item.$edit = false;\n }\n }\n } else\n insert_in_baseAvenant_moe(item,suppression);\n }", "function Not(factA){\n return {type:\"composite\",verify:game=>!factA.verify(game)}\n}", "function identify_cheapest_variant(element, index, array){\n\n\n\n\t\t//Call the identify cheapest retailer function for each retailer in the product retailers array\n\t\telement.product_retailers.forEach(identify_cheapest_retailer.bind(this));\n\n\n\t\tfunction identify_cheapest_retailer(element_inner,index_inner,array){\n\n\n\n\t\t\t//To make sure that the product price is not set to 0\n\t\t\tif(element_inner.product_pricing.special_price > 0){\n\n\t\t\t\tif(setting_flag === false){\n\n\n\t\t\t\t\t//Allocating the index to shortlisted_model_index as \n\t\t\t\t\t//it is the 1st iteration of the loop\n\t\t\t\t\tshortlisted_model_index = index;\n\n\t\t\t\t\t\n\t\t\t\t\t//Allocating the special_price to the shortlisted_model_best_price\n\t\t\t\t\tshortlisted_model_best_price = element_inner.product_pricing.special_price;\t\n\n\t\t\t\t\t//Allocating the index_inner to the shortlisted model retailer index\n\t\t\t\t\tshortlisted_model_shortlisted_retailer_index = index_inner;\n\n\t\t\t\t\t\n\t\t\t\t\t//Changing the setting flag to true as the first iteration is done\n\t\t\t\t\tsetting_flag = true;\n\n\t\t\t\t}\n\n\t\t\t\telse{\n\n\t\t\t\t\t//After the first iteration is done\n\t\t\t\t\t//Now we are checking whether the price of the element is lower than the shortlisted element\n\t\t\t\t\t//If yes, we update the shortlisted element details\n\n\t\t\t\t\t//From this function, we get the shortlisted model index\n\t\t\t\t\t//shortlisted model best price\n\t\t\t\t\t//shortlisted model retailer index\n\t\t\t\t\tif(element_inner.product_pricing.special_price < shortlisted_model_best_price){\n\n\t\t\t\t\t\tshortlisted_model_index = index;\n\t\t\t\t\t\tshortlisted_model_best_price = element_inner.product_pricing.special_price;\n\t\t\t\t\t\tshortlisted_model_shortlisted_retailer_index = index_inner;\n\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\t\t\n\n\t\t}//identify_cheapest_retailer ends\n\n\t}//identify_cheapest_variant ends", "function testJackpot(result) {\n return result.every((a, b, c) => a === c[0]);\n}", "condition(arg) {\n // this.concept.includes(arg.concept)\n if ((0, findModelInstance_1.default)(arg) === \"Order\" && (0, stringsInArray_1.stringsInArray)(arg.concept, this.concept)) {\n // order not used for configuredPromotion\n // Order.populate()\n // TODO: check if includes groups and dishes\n // where to get groups?\n return true;\n }\n if ((0, findModelInstance_1.default)(arg) === \"Dish\" && (0, stringsInArray_1.stringsInArray)(arg.concept, this.concept)) {\n if (this.configDiscount.dishes.includes(arg.id)) {\n return true;\n }\n }\n if ((0, findModelInstance_1.default)(arg) === \"Group\" && (0, stringsInArray_1.stringsInArray)(arg.concept, this.concept)) {\n if (this.configDiscount.groups.includes(arg.id)) {\n return true;\n }\n }\n return false;\n }", "function mul(a, b) {\n\n var flag = arguments.length > 2;\n var res = [];\n for(var i = 0; flag && i < arguments.length; i++) {\n if(i > 1) \n if(arguments[i] !== (a && b)) res.push(arguments[i]);\n }\n console.log(a * b);\n if(flag) console.log(res);\n}", "function isValidForm() {\n if(nameInput.value.length == 0) {\n return false\n }\n \n if(!isUniqueName(nameInput.value, allPaths) && modelToEdit == \"\")\n {\n alert('Pathway name is not unique. Cannot add to the database.')\n return false;\n } \n\n //check to see if the entered name is unique or is the same as it was before editing\n if(!isUniqueName(nameInput.value, allPaths) && modelToEdit != \"\")\n {\n if(nameInput.value != modelToEdit['name']) {\n alert('Pathway name is not unique. Cannot add to the database.')\n return false;\n }\n } \n\n if(!areReactionsValid()){\n return false;\n }\n\n //check to ensure each reaction's products match up \n //with next reaction's substrates. Send out a dialog\n //box to confirm w/user that user knows what to do\n //This is a soft restriction that occurs when a substrate\n //is in the pathway but does not come from a specified reaction\n //in the pathway.\n var flag = false;\n //for each reaction\n for(var i = 1; i < currentReactionNumber; i++){\n previousReaction = addedReactions[i-1];\n currentReaction = addedReactions[i];\n //for each product in the previous reaction\n for(var j = 0; j < previousReaction['products'].length; j++){\n flag = false;\n previousProduct = previousReaction['products'][j];\n //for each substrate in the current reaction\n for(var k = 0; k < currentReaction['substrates'].length; k++){\n currentSubstrate = currentReaction['substrates'][k];\n //if any previous product is equal to the any of the current rxn substrate we goochie man\n if(previousProduct[0] == currentSubstrate[0]){\n flag = true;\n break;\n }\n }\n //if there is a loose product that does not go into the next reaction\n if(!flag){\n errorMessage = \"Reaction number: \" + i + \" has products that are not used in the very next reaction.\"\n if(confirm(errorMessage + '\\n' + \"Do you wish to add this pathway to the database anyway?\")){\n //do nuthing for now?\n }\n else{\n return false;\n }\n break;\n }\n }\n }\n //check to ensure each reaction's substrates match up \n //with previous reaction's products. Send out a dialog\n //box to confirm w/user that user knows what to do\n var flag = false;\n //for each reaction\n for(var i = 1; i < currentReactionNumber; i++){\n \n previousReaction = addedReactions[i-1];\n currentReaction = addedReactions[i];\n //for each product in the previous reaction\n //for each substrate in the current reaction\n for(var k = 0; k < currentReaction['substrates'].length; k++){\n flag = false;\n currentSubstrate = currentReaction['substrates'][k];\n for(var j = 0; j < previousReaction['products'].length; j++){\n previousProduct = previousReaction['products'][j];\n if(previousProduct[0] == currentSubstrate[0]){\n flag = true;\n break;\n }\n }\n \n //if there is a loose substrate that does not go into the next reaction\n if(!flag){\n errorMessage = \"Reaction number: \" + (i+1) + \" has substrates that do not come from the previous reaction.\"\n if(confirm(errorMessage + '\\n' + \"Do you wish to add this pathway to the database anyway?\")){\n //do nuthing for now?\n }\n else{\n return false;\n }\n break;\n }\n }\n }\n\n return true;\n}", "function prepareAscension(ascensionItems, chateauItems) {\n var throwOnFail = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n\n if (ascensionItems) {\n if (ascensionItems.workshed && (0, _kolmafia.getWorkshed)() !== ascensionItems.workshed) {\n if (!worksheds.includes(ascensionItems.workshed) && throwOnFail) throw \"Invalid workshed: \".concat(ascensionItems.workshed, \"!\");else if (!(0, _lib.have)(ascensionItems.workshed) && throwOnFail) throw \"I'm sorry buddy, but you don't seem to own a \".concat(ascensionItems.workshed, \". Which makes it REALLY hard for us to plop one into your workshed.\");else if ((0, _property.get)(\"_workshedItemUsed\") && throwOnFail) throw \"Seems like you've already swapped your workshed, buddy.\";else (0, _kolmafia.use)(ascensionItems.workshed);\n if ((0, _kolmafia.getWorkshed)() !== ascensionItems.workshed && throwOnFail) throw \"We really thought we changed your workshed to a \".concat(ascensionItems.workshed, \", but Mafia is saying otherwise.\");\n }\n\n if (ascensionItems.garden && !Object.getOwnPropertyNames((0, _kolmafia.getCampground)()).includes(ascensionItems.garden.name)) {\n if (!gardens.includes(ascensionItems.garden) && throwOnFail) throw \"Invalid garden: \".concat(ascensionItems.garden, \"!\");else if (!(0, _lib.have)(ascensionItems.garden) && throwOnFail) throw \"I'm sorry buddy, but you don't seem to own a \".concat(ascensionItems.garden, \". Which makes it REALLY hard for us to plant one into your garden.\");else (0, _kolmafia.use)(ascensionItems.garden);\n if (!Object.getOwnPropertyNames((0, _kolmafia.getCampground)()).includes(ascensionItems.garden.name) && throwOnFail) throw \"We really thought we changed your garden to a \".concat(ascensionItems.garden, \", but Mafia is saying otherwise.\");\n }\n\n if (ascensionItems.eudora && (0, _kolmafia.eudoraItem)() !== ascensionItems.eudora) {\n if (!eudorae.includes(ascensionItems.eudora) && throwOnFail) throw \"Invalid eudora: \".concat(ascensionItems.eudora, \"!\");\n var eudoraNumber = 1 + eudorae.indexOf(ascensionItems.eudora);\n if (!(0, _kolmafia.xpath)((0, _kolmafia.visitUrl)(\"account.php?tab=correspondence\"), \"//select[@name=\\\"whichpenpal\\\"]/option/@value\").includes(eudoraNumber.toString()) && throwOnFail) throw \"I'm sorry buddy, but you don't seem to be subscribed to \".concat(ascensionItems.eudora, \". Which makes it REALLY hard to correspond with them.\");else (0, _kolmafia.visitUrl)(\"account.php?actions[]=whichpenpal&whichpenpal=\".concat(eudoraNumber, \"&action=Update\"), true);\n if ((0, _kolmafia.eudoraItem)() !== ascensionItems.eudora && throwOnFail) throw \"We really thought we chaned your eudora to a \".concat(ascensionItems.eudora, \", but Mafia is saying otherwise.\");\n }\n }\n\n if (chateauItems && _resources.ChateauMantegna.have()) {\n if (chateauItems.ceiling && _resources.ChateauMantegna.getCeiling() !== chateauItems.ceiling) {\n if (!ceilings.includes(chateauItems.ceiling) && throwOnFail) throw \"Invalid chateau ceiling: \".concat(chateauItems.ceiling, \"!\");else if (!_resources.ChateauMantegna.changeCeiling(chateauItems.ceiling) && throwOnFail) throw \"We tried, but were unable to change your chateau ceiling to \".concat(chateauItems.ceiling, \". Probably.\");\n }\n\n if (chateauItems.desk && _resources.ChateauMantegna.getDesk() !== chateauItems.desk) {\n if (!desks.includes(chateauItems.desk) && throwOnFail) throw \"Invalid chateau desk: \".concat(chateauItems.desk, \"!\");else if (!_resources.ChateauMantegna.changeDesk(chateauItems.desk) && throwOnFail) throw \"We tried, but were unable to change your chateau desk to \".concat(chateauItems.desk, \". Probably.\");\n }\n\n if (chateauItems.nightstand && _resources.ChateauMantegna.getNightstand() !== chateauItems.nightstand) {\n if (!nightstands.includes(chateauItems.nightstand) && throwOnFail) throw \"Invalid chateau nightstand: \".concat(chateauItems.nightstand, \"!\");else if (!_resources.ChateauMantegna.changeNightstand(chateauItems.nightstand) && throwOnFail) throw \"We tried, but were unable to change your chateau nightstand to \".concat(chateauItems.nightstand, \". Probably.\");\n }\n }\n}", "displayAnswer() {\n let allerginFound;\n do {\n allerginFound = false;\n // easy case\n this.foods.forEach((food) => {\n if (food.ingredients.length == 1 && food.allergins.length == 1) {\n this.recordAllergin(food.ingredients[0], food.allergins[0]);\n allerginFound = true;\n }\n });\n // only choice across two items\n if (allerginFound == false) {\n for (let loop1 = 0; loop1 < this.foods.length; loop1++) {\n let firstFood = this.foods[loop1];\n for (let loop2 = 0; loop2 < firstFood.allergins.length; loop2++) {\n let suspectAllergin = firstFood.allergins[loop2];\n let suspectIngredients = firstFood.ingredients.concat();\n for (let loop3 = loop1 + 1; loop3 < this.foods.length; loop3++) {\n let secondFood = this.foods[loop3];\n if (secondFood.allergins.includes(suspectAllergin)) {\n suspectIngredients = suspectIngredients.filter(value => secondFood.ingredients.includes(value));\n if (suspectIngredients.length == 1) {\n this.recordAllergin(suspectIngredients[0], suspectAllergin);\n allerginFound = true;\n }\n }\n if (allerginFound)\n break;\n }\n if (allerginFound)\n break;\n }\n if (allerginFound)\n break;\n }\n }\n } while (allerginFound == true);\n let allowedIngredients = new Array();\n this.foods.forEach((food) => {\n if (food.allergins.length == 0)\n allowedIngredients = allowedIngredients.concat(food.ingredients);\n });\n this.answerDisplay.innerText = \"Cleared ingredients appear \" + allowedIngredients.length + \" times\";\n this.allerginsDetermined.sort((a, b) => { return a < b ? -1 : 1; });\n this.answerDisplay.innerHTML += \"<br/><br/>Canonical dangerous ingredient list is: \";\n this.allerginsDetermined.forEach(value => this.answerDisplay.innerHTML += this.ingredientsWithAllergins.get(value) + \",\", this);\n this.answerDisplay.innerHTML += \" (don't forget to remove the trailing comma)\";\n }" ]
[ "0.6213341", "0.54942197", "0.5459085", "0.54088247", "0.533806", "0.5333266", "0.5298011", "0.51978403", "0.5173167", "0.5103893", "0.51030356", "0.5089114", "0.508357", "0.5047671", "0.50438696", "0.5035032", "0.5032203", "0.50259626", "0.4997766", "0.49776268", "0.49700266", "0.49662635", "0.49652907", "0.49652585", "0.4958655", "0.49562684", "0.4952835", "0.49411324", "0.49373895", "0.49356276", "0.49279013", "0.49198586", "0.49172345", "0.49164763", "0.48951137", "0.48843315", "0.48717046", "0.48692483", "0.48684686", "0.48648107", "0.48622653", "0.48613873", "0.48555383", "0.4843135", "0.48414522", "0.48302838", "0.4828802", "0.4824618", "0.4820565", "0.48168144", "0.4811548", "0.4810228", "0.48068526", "0.4804066", "0.47944954", "0.47912598", "0.4790345", "0.4790345", "0.47894362", "0.47891158", "0.47622165", "0.47613758", "0.47490504", "0.47423735", "0.47336936", "0.4727289", "0.47268668", "0.47239357", "0.4705028", "0.4703952", "0.47024497", "0.47007668", "0.47005153", "0.46992123", "0.4694904", "0.46928602", "0.46927816", "0.46927816", "0.46881372", "0.4681685", "0.46732405", "0.46731332", "0.46720463", "0.46700653", "0.46696663", "0.46685177", "0.4668085", "0.4662522", "0.4660224", "0.46589434", "0.4658911", "0.4657823", "0.4657823", "0.4654554", "0.46455064", "0.46392685", "0.46391457", "0.46386313", "0.46357504", "0.46286488", "0.46271402" ]
0.0
-1
It's good to catch errors too!
function loading_error(error, filename, lineno) { console.log("Dosyaları yüklerken hata meydana geldi: " + error); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleError(err) {\n\tif (err) throw err;\n}", "onerror() {}", "onerror() {}", "function check(err) {\n\tif (!err) { return }\n\tconsole.log(\"ERROR\", err)\n\tthrow err\n}", "function processErrors(data){\n \n}", "function VeryBadError() {}", "error(error) {}", "onError() {}", "function noOp(err) { if (err) { throw err; } }", "function Catch( onerr, ap ) {\r\n}", "error() {}", "attempt() {}", "error(error) {\n return true;\n }", "handleFailure (error_)\n\t{\n\t\tthrow error_;\n\t}", "function getBlogFailure(error){}", "run() {\n\t\tthrow new Error;\n\t}", "async function fails () {\n throw new Error('Contrived Error');\n }", "function dbErrorHandler(err) {\r\n// 없앰\r\n}", "function error(err) {\n console.warn(`ERROR(${err.code}): ${err.message}`);\n requestPhotos(fallBackLocation)\n \n}", "function simpleTryCatch() {\r\n const fs = require('fs');\r\n try {\r\n console.log(a[2])\r\n } catch (error) {\r\n console.log('error', error)\r\n }\r\n\r\n b = null;\r\n try {\r\n b.do(); \r\n } catch (error) {\r\n console.log('error', error) \r\n // recover\r\n }\r\n}", "__init12() {this.error = null}", "function handleError(err) {\n\t\t\t\t\t\t// Log\n\t\t\t\t\t\tme.log('warn', 'Feedr === fetching [' + feed.url + '] to [' + feed.path + '], failed', err.stack);\n\n\t\t\t\t\t\t// Exit\n\t\t\t\t\t\tif (feed.cache) {\n\t\t\t\t\t\t\tviaCache(next);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tviaRequestComplete(err, opts.data, requestOptions.headers);\n\t\t\t\t\t}", "function _getJsonError() {\r\n home.error = true;\r\n }", "if (this.state.error) {\n return null;\n }", "function finished(err){\n }", "isErr() {\n return false;\n }", "handleCallError(errs, url, method) {\n // TODO: probably we need some logger, now it's just logging to console\n console.log(`Failed calling ${method} for URL:`, url);\n console.log(`Reason:`, errs);\n }", "function processError(){\n\t\tconsole.log('Error connecting to twitter API!');\t\n\t}", "function handleError(err) {\n // Print the error to the console so we can debug it.\n console.log(\"Error: \", err);\n }", "isErr() {\n return true;\n }", "function locationError(err) {\n\tif(err.code == 1) {\n\t\tconsole.log(\"Error: Location request declined.\");\n\t} else if(err.code == 2) {\n\t\tconsole.log(\"Error: Position unavailable.\");\n\t} else if(err.code == 3) {\n\t\tconsole.log(\"Error: Network timed out.\");\n\t} else {\n\t\tconsole.log(\"Unknown error.\");\n\t}\n}", "function handleError(err){\n\tconsole.log(`Request failed: ${err}`);\n}", "function NoGamesError() {}", "function commonErrorHandler (err) {\n console.log(err); \n resetToLibraryIndexPage();\n }", "function errorHandling(err) {\r\n if (err) console.log(err);\r\n else console.log(`Done`)\r\n\r\n}", "_importError() {\r\n console.error('IMPORT ERROR!!');\r\n this._notFound();\r\n }", "method() {\n throw new Error('Not implemented');\n }", "function mistake4() {\n\ttry {\n\t\tData(\"hello\").start(6);//throws chop\n\t} catch (e) { toss(\"data\", {caught:e}); }//catch chop, wrap it in a data exception, and throw that\n}", "function croak(err) {\n throw new Error(`${err} (${line}:${col})`);\n }", "function a120571()\n{\n while(0)\n {\n try\n {\n }\n catch(e)\n {\n continue;\n }\n }\n}", "static get ERROR () { return 0 }", "function findErrHandler(error, result) {\n\tif (error) {\n\t\tlog(\"cannot find data\")\n\t\tthrow error\n\t} else {\n\t\tlog(result) \n\t}\n}", "function handleErr(err) {\n if (err) {\n console.dir(err);\n process.exit(1);\n return;\n }\n}", "function JPSpan_Util_ErrorReader() {}", "error_handler(err) {\n console.log(`Problem encountered. Detail:${err.message}`);\n }", "if(result instanceof Error) {\n console.error(result);\n this.results.push(TestResult.error);\n this.errors++;\n }", "function errors (error)\n{\n switch (error.code)\n {\n \tcase error.PERMISSION_DENIED:\n \t\tconsole.log(\"User denied the request for Geolocation.\");\n \t\tbreak;\n \tcase error.POSITION_UNAVAILABLE:\n \t\tconsole.log(\"Location information is unavailable.\");\n \t\tbreak;\n \tcase error.TIMEOUT:\n \t\tconsole.log(\"The request to get user location timed out.\");\n \t\tbreak;\n \tcase error.UNKNOWN_ERROR:\n \t\tconsole.log(\"An unknown error occurred.\");\n \t\tbreak;\n }\n defaultPosition();\n}", "function catch_error(error) {\n console.error(error);\n switch (error.statusCode) {\n case 400: break;\n case 403: break;\n case 404: break;\n case 429: break;\n case 500: break;\n case 502: break;\n case 503: break;\n default:\n auth.tryRefresh();\n break;\n };\n}", "static get ERROR() { return 3 }", "handleError() {\n this.setState(\n {\n hash: null,\n platform: null,\n fileUrl: null,\n width: null,\n height: null,\n title: null,\n caption: null,\n credit: null\n },\n () => this.props.setMeta(this.state)\n );\n }", "transient private protected internal function m182() {}", "requestContent(){\n throw \"Not implemented\";\n }", "handleErrors(response) { // prepares error message for HTTP request errors\n if (response.ok === true) {\n return response.json();\n } else {\n throw new Error(\"Code \" + response.status + \" Message: \" + response.statusText)\n }\n }", "function updateErrHandler(error, result) {\n\tif (error) {\n\t\tlog(\"cannot update data\")\n\t\tthrow error\n\t} else {\n\t\tlog(\"Update Success\") \n\t}\n}", "function loading_error() {\n console.log(\"ERRRR...OR\");\n}", "validate() {}", "postorder() {\n throw new Error(\"This method hasn't been implemented yet!\");\n }", "function handleError() {\n // TODO handle errors\n // var message = 'Something went wrong...';\n }", "static handleErrors(error) {\n\n if (error.response) {\n const message = error.response.data.message;\n const errorMessage = message ? message : 'something went wrong.'\n console.log(errorMessage);\n } else {\n console.log('something went wrong');\n }\n }", "onerror(err) {\n debug(\"error\", err);\n super.emit(\"error\", err);\n }", "function handleError(err){\n console.log(`Request failed: ${err}`)\n}", "componentDidCatch(error, errorInfo) {\n Raven.captureException(error, { extra: errorInfo });\n }", "get FastButNoExceptions() {}", "function check_and_report() {\n \n }", "function handleErrors(error) {\n console.log('Please try again problem occured!');\n}", "function _publicRecipesFailure(error) {\r\n\t\t\tconsole.log('There was an error retrieving recipes:', error);\r\n\t\t}", "function errorHandler(){\n Logger.log(\"=========================EXAMPLES=========================\")\n Logger.log(\"firebase-engine operations=\\\"clean, restore\\\" path=\\\"./test/utils/vend-park-development.json\\\" services=\\\"firestore, auth\\\" backup=\\\"vend-park-development.backup\\\"\")\n Logger.log(\"firebase-engine o=\\\"b, c\\\" p=\\\"./test/utils/vend-park-development.json\\\"\")\n Logger.log(\"=========================ARGUMENTS========================\")\n Logger.table(arg)\n Logger.log(\"===========================ERROR==========================\")\n}", "function handleError(err) {\n switch (err.errorCode) {\n default:\n console.warn(err);\n }\n}", "componentDidCatch( error, errorInfo){ }", "parseCaptions(result) {\n console.error(\"Error! Abstract function called!\");\n }", "function error(err) {\n\t\t// TODO output error message to HTML\n\t\tconsole.warn(`ERROR(${err.code}): ${err.message}`);\n\t\t// let msg = \"If you don't want us to use your location, you can still make a custom search\";\n\t\t// displayErrorMsg(msg);\n\t}", "function showError( ){\n console.log(\"error in reading the position\");\n}", "validate() { }", "function onError(err){\n if (err) {\n console.log(err, err.stack);\n return true;\n }\n }", "function helpercatch(res) {\n // Handle exception gracefully by reporting to user and presenting\n // command line usage.\n let sections = commandLineUsageSections();\n debug('sections='+JSON.stringify(sections));\n let content = \"problem: \"+ res;\n let newSection = {\n header: 'Important Info',\n content: content\n\t};\n let updatedSections = addSection(sections, newSection);\n debug('updatedSections='+JSON.stringify(updatedSections));\n const usage = commandLineUsage(sections);\n console.log(usage);\n process.exit(1);\n}", "function loaderErrback(error, url) {\n//console.error(\"in loaderErrback\", error);\n\t\t\tLoader._error(\"Error loading url '\"+url+\"'\");\n\t\t\tif (errback) {\n\t\t\t\terrback(error, url);\n\t\t\t\tloadNext();\n\t\t\t} else {\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t}", "function error_getProducts(r) {\n // tratamento por status\n console.error('error_getProducts');\n }", "function handleError(err)\n {\n defer.reject(err);\n }", "function getErrorObj(){\n\t\t try{ throw Error(\"\")}catch(err){ return err }\n\t }", "_recoverySetup() {\n (async () => {\n await this._editorComplex.bodyClient.when_unrecoverableError();\n this._recoverIfPossible();\n })();\n }", "_recoverySetup() {\n (async () => {\n await this._editorComplex.bodyClient.when_unrecoverableError();\n this._recoverIfPossible();\n })();\n }", "logError (err) {\n\n switch (err) {\n\n case 1: //Autodesk.Viewing.ErrorCode.UNKNOWN_FAILURE\n return 'An unknown failure has occurred.'\n\n case 2: //Autodesk.Viewing.ErrorCode.BAD_DATA\n return 'Bad data (corrupted or malformed) was encountered.'\n\n case 3: //Autodesk.Viewing.ErrorCode.NETWORK_FAILURE\n return 'A network failure was encountered.'\n\n case 4: //Autodesk.Viewing.ErrorCode.NETWORK_ACCESS_DENIED\n return 'Access was denied to a network resource (HTTP 403).'\n\n case 5: //Autodesk.Viewing.ErrorCode.NETWORK_FILE_NOT_FOUND\n return 'A network resource could not be found (HTTP 404).'\n\n case 6: //Autodesk.Viewing.ErrorCode.NETWORK_SERVER_ERROR\n return 'A server error was returned when accessing ' +\n 'a network resource (HTTP 5xx).'\n\n case 7: //Autodesk.Viewing.ErrorCode.NETWORK_UNHANDLED_RESPONSE_CODE\n return 'An unhandled response code was returned ' +\n 'when accessing a network resource (HTTP everything else).'\n\n case 8: //Autodesk.Viewing.ErrorCode.BROWSER_WEBGL_NOT_SUPPORTED\n return 'Browser error: WebGL is not ' +\n 'supported by the current browser.'\n\n case 9: //Autodesk.Viewing.ErrorCode.BAD_DATA_NO_VIEWABLE_CONTENT\n return 'There is nothing viewable in the fetched document.'\n\n case 10: //Autodesk.Viewing.ErrorCode.BROWSER_WEBGL_DISABLED\n return 'Browser error: WebGL is supported, but not enabled.'\n\n case 11: //Autodesk.Viewing.ErrorCode.RTC_ERROR\n return 'Collaboration server error'\n }\n }", "function getErrorObject(){\n try { throw Error('') } catch(err) { return err; }\n}", "function wikiError(){\r\n self.errorMessage(\"Error in accessing wikipedia\");\r\n self.apiError(true);\r\n}", "async function catchSQLError(err, client, msg) {\n if (err.code === 'SQLITE_MISUSE') {\n await sendEmbed(msg, messages.error.SQLITE_MISUSE);\n await sql.open('./database.sqlite');\n await generateDatabase(client);\n await insertUserIntoDatabase(msg.author, client, msg);\n }\n}", "postError(err) {\n //TODO:\n console.log(err);\n // throw err;\n }", "onMp4BoxError (err) {\n console.error(err)\n }", "handleRelatedProductsError(error) {}", "function errorHandler(err)\n {\n if(err.code == 1)\n {\n console.log(\"error: access is denied!\");\n }\n else if( err.code == 2) {\n console.log(\"error: position is unavailable!\");\n }\n }", "function geolocError(){\n console.log(\"Error getting user's location :(\");\n}", "function croak(msg) {\n //wow, we report location, it's amazing!\n throw new Error(msg + \" (\" + line + \":\" + col + \")\");\n }", "function handle_error(e){\n\tconsole.log(e);\n\tconsole.log(\"could not use location\");\n}", "function _reportError(err){\n console.log(\"Mysql \"+ err);\n}", "function errorHandler(){\n\tconsole.log (\"Sorry, your data didn't make it. Please try again.\");\n}", "function handleError(err){\n\t //TODO: we need to handle the error correctly here... \n\n\t if (err && err.data) {\n\t //need to set it to .data because this handles the error\n\t //bubbling up from $http and from the taskman event\n\t err = err.data;\n\t }\n\n\t if (err) {\n\t var msg = {\n\t message: err.Message,\n\t exception: err.ExceptionMessage,\n\t type: err.ExceptionType,\n\t stack: err.StackTrace\n\t }\n\t $scope.currentTask.exception = msg;\n\t }\n\t else {\n\t $scope.currentTask.exception = err;\n\t }\n\t }", "async loadOrDie(die) {\n if (this.isLoaded) return\n try {\n this.load()\n } catch (e) {\n die(`Error loading ${this.type} index`, e)\n }\n }", "function handleError(code, message) {\n // Process your code here\n // Genramos un mensaje\n throw new Error(message + \". Code: \" + code);\n}", "function handleGeoError() {\n console.log(\"Can't access geolocation\");\n }", "handleError(error) {\n this.setState({ loading: false });\n // if a known error is returned\n if (propertyExists(error, [\"response\", \"data\"], \"object\")) {\n // deal with all errors\n const errData = error.response.data;\n // if the request is invalid\n if (errData.badRequest) {\n this.setState({\n errorMessage: \"Something was wrong about your request.\",\n initialLoad: false\n });\n }\n // if the user hasn't signed up for this position (wasn't invited)\n else if (errData.notSignedUp) {\n this.setState({\n errorMessage: \"It looks like you aren't signed up for this evaluation.\",\n initialLoad: false\n });\n }\n // any other error\n else {\n this.setErrorState();\n }\n }\n // unknown error\n else {\n this.setErrorState();\n }\n }", "function onError(error) {\n throw error;\n}", "private internal function m248() {}" ]
[ "0.59385294", "0.581563", "0.581563", "0.5746083", "0.573184", "0.56300646", "0.5618805", "0.5577255", "0.5524662", "0.5503805", "0.5482381", "0.5459402", "0.5452459", "0.54508334", "0.5431298", "0.54085106", "0.5382868", "0.53779244", "0.53649485", "0.5357745", "0.53238857", "0.5322915", "0.5315713", "0.53139406", "0.53097415", "0.5298852", "0.52846086", "0.52834827", "0.5276888", "0.52670527", "0.52626795", "0.5257558", "0.52543396", "0.52453816", "0.5238552", "0.5236641", "0.52279323", "0.52268034", "0.5213022", "0.5183548", "0.5181803", "0.51629466", "0.51558703", "0.5153909", "0.5149775", "0.51328665", "0.512529", "0.51202077", "0.5116626", "0.5115384", "0.5112341", "0.5111542", "0.5110939", "0.5106474", "0.50863105", "0.50782347", "0.5070882", "0.5068983", "0.50682783", "0.5062018", "0.5060524", "0.50569004", "0.5048819", "0.50487953", "0.504809", "0.504588", "0.5042389", "0.50303364", "0.5029385", "0.5019043", "0.50101763", "0.50062525", "0.50060487", "0.49989137", "0.49987286", "0.49978456", "0.49964812", "0.4995387", "0.49943542", "0.49934766", "0.49934766", "0.49897563", "0.49897444", "0.4985435", "0.49776158", "0.49769163", "0.49768195", "0.49744397", "0.49733934", "0.4972482", "0.49694628", "0.4969317", "0.49676564", "0.4964863", "0.49645904", "0.49622163", "0.49581814", "0.49550694", "0.49532512", "0.4950585", "0.49493712" ]
0.0
-1
jquery ajax call to read user details by Id to populate in edit user page
function getUser(userId) { hideErrorPanel(); if (userId === 0) return; $.ajax({ type: "POST", url: "ManageUserApi.aspx/GetUserById", data: '{userId: "' + userId + '" }', contentType: "application/json; charset=utf-8", dataType: "json", success: OnSuccess, failure: function (response) { alert(response.d); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function editUser(id) {\n $('#user_id').val(id);\n $.ajax({\n headers: {\n 'X-CSRF-TOKEN': $('meta[name=\"csrf-token\"]').attr('content')\n },\n url: '/user/edit/' + id,\n type: 'get',\n success: function (data) {\n console.log(data[0]['role_id']);\n $('#user_name').val(data[0]['name']);\n $('#user_email').val(data[0]['email']);\n $('#edit_user_role').val(data[0]['role_id']).trigger('change');\n if (data[0]['is_active'] == 1) {\n $('.edit_checkbox').attr('checked', true);\n } else {\n $('.edit_checkbox').attr('checked', false);\n }\n $('#editUser').modal('show');\n }\n });\n}", "function editUser() {\n let user_id = $(this).data().userid;\n\n $.ajax({\n url: \"/edit/user/\" + user_id,\n type: 'GET'\n }).done(function (resp) {\n createEditUserDialog(resp);\n }).fail(function (response) {\n addStatusMessage(response.responseText, false);\n\n $(\"html, body\").animate({scrollTop: 0}, \"slow\");\n $('#' + modal_id).modal(\"hide\");\n });\n}", "function editProfile() {\n // instantiate new edit profile view\n var editProf = new EditProfileView();\n\n // Get the user id with localstorage\n var apikey = localStorage.getItem('apiKey');\n // parse it for use\n var parsed = JSON.parse(apikey);\n // reference the id\n var id = parsed['uid'];\n\n //call same ajax function as above\n //*** you really need to refactor and automate all these ajax calls! ***\n $.ajax({\n // pass the id\n url: './getuser/' + id,\n type: 'GET',\n dataType: 'json',\n success: function(data) {\n console.log('Success! : ' + data);\n\n var dataSent = {\n userName: data.username,\n eMail: data.email,\n userID: data.id,\n aboutMe: data.aboutme\n };\n\n makeView.viewConstruct(editProf, dataSent);\n },\n error: function(data) {\n console.log('Error! : ' + data)\n }\n });\n }", "function getUser(id) {\n $.ajax({\n url: ip_server +\n \"/logged/getUser\",\n type: \"POST\",\n data:{\n 'bearer' : sessionStorage.token,\n 'idManagerUser' : id,\n },\n dataType: \"json\",\n success: function (response) {\n var dataSet = response.users;\n\n for (const usr of dataSet) {\n $('#mainEmailUpdate').val(usr.mainEmail);\n $('#resetEmailUpdate').val(usr.resetEmail);\n $('#nameUserUpdate').val(usr.nameUser);\n $('#addTypeUsersUpdate option[value=\"'+usr.idTypeUser+'\"]').attr(\"selected\", true);\n }\n },\n error: function (error) {\n if(error.status == '401'){\n sessionStorage.removeItem('token')\n window.location.assign(\"http://\" + window.location.hostname+\"/Smiling-camera/dashboardadmin/index.html\");\n }\n }\n });\n}", "function userProfileModal(userID){\r\n// alert(userID);\r\n $.ajax({\r\n url: site_url+\"hpp/admin/selectHppUserModalById?userID=\"+userID,\r\n method:'POST',\r\n data:{USER_ID:userID},\r\n success:function(res){\r\n $('#userProfileModalBody').html(res);\r\n }\r\n \r\n });\r\n}", "function view_user(id) {\n $.ajax({\n url: 'users/' + id,\n type: 'get',\n success: function (data) {\n if (data) {\n hold_modal('viewUserModal', 'show')\n $.each(data, function (k, v) {\n $('#v_'+k).html(v)\n })\n $('#user_info').html(data.name)\n $('#v_load_add_user_profile').html(`<img src=\"/all/app-assets/images/profile/user-uploads/${data.profile}\"\n style=\"width: 100px; height: 100px; border-radius: 100px\" alt=\"Profile\">`)\n if (data.is_admin == '1') {\n $('#v_role').html('Admin')\n } else if (data.is_admin == '2') {\n $('#v_role').html('User')\n }\n }\n },\n error: function () {\n alert('Failed!')\n }\n })\n}", "function getByUser(id) {\n //clearTextBox();\n $('#NameUser').css('border-color', 'lightgrey');\n $('#Surname').css('border-color', 'lightgrey');\n $('#UserBirthdate').css('border-color', 'lightgrey');\n\n $.ajax({\n url: \"/Home/getbyUser/\" + id,\n typr: \"GET\",\n success: function (result) {\n $('#tbodyUser').html(result);\n $('#UserForTrainig').modal('show');\n $('#btnUpdate').show();\n $('#btnAdd').hide();\n },\n error: function (errormessage) {\n alert(errormessage.responseText);\n }\n });\n return false;\n}", "function editUser(event) {\n $button= $(event.currentTarget);\n $userId=$button.parent().parent().parent().attr(\"id\");\n findUserById($userId).then(renderUser);\n }", "function editUser(event) {\n var editButton = $(event.currentTarget);\n var userId = editButton\n .parent()\n .parent()\n .parent()\n .attr('id');\n userId = parseInt(userId);\n currentUserID = userId;\n userService\n .findUserById(userId)\n .then(renderUser);\n }", "function get_user_details() {\n\t\t$.ajax({\n url: basepath + \"employees/\"+action_id,\n type: \"GET\",\n contentType: 'application/json',\n beforeSend: function(xhr) {\n xhr.setRequestHeader('Token', TOKEN);\n },\n success: function(data) {\n if(data) {\n var id = data.id;\n var first_name = data.first_name;\n var last_name = data.last_name;\n var middle_name = data.middle_name;\n\t\t\t\t\t\tvar age = data.age;\n\t\t\t\t\t\tvar sex = data.sex;\n\t\t\t\t\t\tvar dob = data.date_of_birth;\n var address1 = data.address_one;\n\t\t\t\t\t\tvar address2 = data.address_two;\n\t\t\t\t\t\tvar llg = data.llg;\n\t\t\t\t\t\tvar province = data.province;\n\t\t\t\t\t\tvar village = data.village;\n\t\t\t\t\t\tvar district = data.district;\n\t\t\t\t\t\tvar region = data.region;\n var email = data.email_address;\n var contact_number =data.contact_number;\n\t\t\t\t\t\tvar phone1 = data.alt_contact_number;\n var country = data.country;\n var employee_number = data.employement_number;\n\t\t\t\t\t\tvar retirement_age = data.retirement_age;\n\t\t\t\t\t\tvar salary_step = data.salary_step;\n\t\t\t\t\t\tvar date_of_commencement = data.date_of_commencement;\n\t\t\t\t\t\tvar emp_category = data.employee_category_id;\n\t\t\t\t\t\tvar branch_agency = data.employee_branch;\n\t\t\t\t\t\tvar emp_type = data.employee_type_id;\n\t\t\t\t\t\tvar emp_position = data.employee_position_id;\n var employee_branch_id = data.employee_branch_id;\n var salutation = data.salutation;\n var is_branch = data.is_branch;\n\n\t\t\t\t\t\t$(\"#first-name\").val(first_name);\n\t\t\t\t\t\t$(\"#last-name\").val(last_name);\n $(\"#sex\").selectpicker('val', sex);\n\t\t\t\t\t\t$(\"#middle-name\").val(middle_name);\n\t\t\t\t\t\t$(\"#age\").val(age);\n\t\t\t\t\t\t$(\"#dob\").val(dob);\n\t\t\t\t\t\t$(\"#address1\").val(address1);\n\t\t\t\t\t\t$(\"#village\").val(village);\n\n $(\"#district\").selectpicker('val', district);\n $(\"#region\").selectpicker('val', region);\n $(\"#province\").selectpicker('val', province);\n $(\"#country\").selectpicker('val', country);\n $(\"#llg\").selectpicker('val', llg);\n\n\n\t\t\t\t\t\t$(\"#phone\").val(contact_number);\n\t\t\t\t\t\t$(\"#phone1\").val(phone1);\n\t\t\t\t\t\t$(\"#address2\").val(address2);\n\t\t\t\t\t\t$(\"#email\").val(email);\n\t\t\t\t\t\t$(\"#village\").val(village);\n\t\t\t\t\t\t$(\"#employee-number\").val(employee_number);\n\t\t\t\t\t\t$(\"#retirement-age\").val(retirement_age);\n\n\n $(\"#branch-agency\").selectpicker('val', (is_branch)?'branch':'agency');\n if(is_branch){\n $(\"#branch\").selectpicker('val', employee_branch_id);\n showBranch()\n } else {\n $(\"#agency\").selectpicker('val', employee_branch_id);\n showAgency()\n }\n $(\"#salutation\").selectpicker('val', salutation);\n $(\"#employee-type\").selectpicker('val', emp_type);\n $(\"#employee-category\").selectpicker('val', emp_category);\n $(\"#position-title\").selectpicker('val', emp_position);\n\n\t\t\t\t\t\t$(\"#salary-step\").val(salary_step);\n\t\t\t\t\t\t$(\"#start-date\").val(date_of_commencement);\n\n\t\t\t\t\t\t$(\".page-loader\").hide();\n\t\t\t\t\t\t$(\".card\").fadeIn(\"fast\");\n }\n },\n error: function(error) {\n $(\".loader\").hide();\n $(\"#submit\").show();\n showError(\"Error in Server! Try again!\")\n },\n });// Ajax\n\t}", "function z_usersEdit(id) {\r\n var usrId = id;\r\n var firstName = $(\"#new-u-name\").val();\r\n var lastName = $(\"#new-u-lastname\").val();\r\n var data = {\r\n userId: usrId,\r\n firstName: firstName,\r\n lastName: lastName\r\n };\r\n if ($(\"#editUsernameForm\").valid()) {\r\n $.ajax({\r\n url: \"/api/updateUser\",\r\n type: \"POST\",\r\n data: JSON.stringify(data),\r\n dataType: 'text',\r\n contentType: 'application/json;charset=UTF-8',\r\n success: function (result) {\r\n console.log(result);\r\n $(\"#z-vu-name\").val(firstName);\r\n $(\"#z-vu-lastname\").val(lastName);\r\n if (result.split(\":\")[1] == \"Done\") {\r\n alertPopup('success', \"User Updated Successfully\");\r\n } else {\r\n alertPopup('alert', \"Not found\");\r\n }\r\n $('#z-editUserName-popup').modal(\"hide\");\r\n },\r\n error: function (result) {\r\n console.log(result);\r\n }\r\n });\r\n }\r\n}", "function getUserData(id) {\n $.get(\"/api/users/\" + id, function(data) {\n if (data) {\n // If this post exists, prefill our cms forms with its data\n usernameInput.val(data.username);\n passwordInput.val(data.password);\n // postCategorySelect.val(data.category);\n // If we have a post with this id, set a flag for us to know to update the post\n // when we hit submit\n updating = true;\n }\n });\n }", "function getUserData(id, type) {\n var queryUrl;\n switch (type) {\n case \"user\":\n queryUrl = \"/api/users/\" + id;\n break;\n case \"group\":\n queryUrl = \"/api/groups/\" + id;\n break;\n default:\n return;\n }\n $.get(queryUrl, function(data) {\n if (data) {\n console.log(data.GroupId || data.id);\n // If this user exists, prefill our cms forms with its data\n usernameInput.val(data.username);\n \n groupId = data.GroupId || data.id;\n // If we have a user with this id, set a flag for us to know to update the user\n // when we hit submit\n updating = true;\n }\n });\n }", "function edit_user(eThis) {\n var trIndex=eThis.parents('tr').find('td:eq(0)').text();\n $('body').append(popup);\n $(\".popup\").load(\"form/\"+form[menuId], function(responseTxt, statusTxt, xhr) {\n if (statusTxt == \"success\")\n var tr = eThis.parents('tr');\n indexTr = tr.index();\n $.ajax({\n url: 'action/get_user_currentData.php',\n type: 'POST',\n cache: false,\n data: {id: trIndex},\n dataType: 'json',\n success: function (data) {\n $('#txt-id').val(data.id);\n $('#txt-edit').val(data.id);\n $('#txt-username').val(data.username);\n $('#txt-password').val(data.password);\n $('#txt-role').val(data.roleid);\n $('#txt-status').val(data.status);\n }\n });\n if(statusTxt == \"error\")\n alert(\"Error: \" + xhr.status + \": \" + xhr.statusText);\n });\n }", "function editUser(user) {\n\n $('#userIdEdit').val(user.user_id);\n $('#firstNameEdit').val(user.first_name);\n $('#lastNameEdit').val(user.last_name);\n $('#ageEdit').val(user.age);\n\n $('#editModal').modal('show');\n}", "function EditUserModelOpen(id){\n $.ajax({\n headers: {\n 'X-CSRF-TOKEN': $('meta[name=\"csrf-token\"]').attr('content')\n },\n type: 'post',\n url : 'edit-user',\n data :{id:id},\n dataType: 'json',\n success : function(response){\n document.getElementById('user-id').value=response['id'];\n document.getElementById(\"edit-name\").value =response['name'];\n document.getElementById(\"edit-email\").value =response['email'];\n document.getElementById(\"edit-phone\").value =response['phone'];\n $(\"#EditUserModel\").modal();\n }\n });\n}", "function updateProfileModal() {\n $.ajax({\n url: _BASEURLJSONSERVER + '/' + supervisorList,\n data: {\n \"id\": empid\n },\n success: function(data) {\n fillAndShowUpdateProfileModal(data,'supervisor');\n },\n error: function() {\n alert('unable to get data from server');\n }\n\n });\n }", "function edit_user_table(user_id) {\n\t$('#search_user').toggleClass( \"hidden\" );\n\t$('#edit_user').toggleClass( \"hidden\" );\n\t\n\t$.ajax({\n\t\ttype: \"GET\",\n\t\turl: \"functions.php\",\n\t\tdata: \"edit_user_table=1&user_id=\"+user_id,\n\t\tdataType: \"html\",\n\t\tsuccess: function(html){ \n\t\t\t$('#edit_user_results').html(html);\n\t\t}\n\t}); \n}", "function getbyID(ID) {\n $.ajax({\n url: \"/User/getbyID/\" + ID,\n typr: \"GET\",\n contentType: \"application/json;charset=UTF-8\",\n dataType: \"json\",\n success: function (result) {\n $('#Id').val(result.Id);\n $('#Account').val(result.Account);\n if (result.ActiveStatus)\n {\n $('#ActiveStatus').prop('checked', true);\n }\n else {\n $('#ActiveStatus').prop('checked', false);\n }\n $('#myModal').modal('show');\n $('#btnUpdate').show();\n $('#btnAdd').hide();\n },\n error: function (errormessage) {\n alert(errormessage.responseText);\n }\n });\n return false;\n}", "function EditUser(id) {\n var returnPageType = $('#returnFrom').val();\n $.ajax(\n {\n url: \"/User/EditUser/\",\n method: \"GET\",\n data: { id: id, returnPageType: returnPageType },\n success: function (result) {\n if (forceLogOut(result)) {\n if (parseInt(result) <= 0) {\n if (parseInt(result) < 0) {\n Alert(_msgError, \"Error\");\n return false;\n }\n }\n $(\"#userEditModal\").html(result);\n $(\"#userEditModal\").modal(\"show\");\n var input = document.querySelector(\"#userProfile_Mobile\");\n var instance = window.intlTelInput(input, {\n utilsScript: \"../lib/intlTelInput/js/utils.js\",\n preferredCountries: [''],\n formatOnDisplay: false\n });\n var CountryCode = $('#CountryCode').val().trim().toLowerCase();\n\n\n\n\n if (CountryCode == \"\") {\n instance.setCountry(\"in\");\n\n } else {\n instance.setCountry(CountryCode);\n }\n\n $('.adj-width').find('.nice-select .current').addClass('wraptext');\n $('.adj-width').find('.nice-select2 .current').addClass('wraptext');\n }\n }\n });\n}", "static async editUserForm(userId, req, res, next) {\n\t\tlet user = await userModel.getUser(userId);\n\n\t\tif (user[0]) {\n\t\t\tuser = user[0];\n\t\t\tuser.hasImage = this.hasImage(userId);\n\t\t\tlet data = {\n\t\t\t\ttitle: \"User\",\n\t\t\t\tuser: user,\n\t\t\t\tnav: await navmenuModel.getNavmenu()\n\t\t\t};\n\t\t\tif (cfgControllers.json) {\n\t\t\t\treturn res.json(data);\n\t\t\t} else {\n\t\t\t\treturn res.render(\"user/editprofile\", data);\n\t\t\t}\n\t\t} else {\n\t\t\tnext();\n\t\t}\n\t}", "function loadUserInfo() {\n var usermail = document.getElementById('useremail');\n //get elements detail\n var userData = {\n username: $('input#username').val(),\n userid: $('input#userid').val()\n }\n\n //ajax to get user info\n $.ajax({\n type: 'POST',\n data: userData,\n url: '/users/getUserInfo',\n dataType: 'JSON'\n }).success(function (items) {\n // get info\n usermail.value = items[0].email;\n });\n}", "function get_profile(user_id){\n\n $.ajax({\n url: CI_ROOT + \"private/user/get_profile\",\n type: 'post',\n data: {'user_id': user_id},\n complete: function(r){\n var response_obj = jQuery.parseJSON(r.responseText);\n \n if (response_obj.status == 'SUCCESS')\n {\n populate_form(response_obj.data.user);\n $('#profile_modal').modal('show');\n }\n else\n { \n $('#response_message').html(response_obj.data.message);\n }\n },\n }); \n}", "function onEditUserClick(){\n var url = $('#add-user-form')[0].action;\n $.ajax({\n method : 'GET',\n url : url,\n data : {}\n }).done(function (user) {\n $(\"#first_name\").val(user.first_name);\n $(\"#last_name\").val(user.last_name);\n $(\"#email\").val(user.email);\n $(\"#password\").val(user.pwd_c);\n $('.div-image').show();\n $('#add-user-form .image-holder').html('<input type=\"hidden\" name=\"old_image\" value=\"'+user.image+'\" /> <img src=\"'+user.image+'\">');\n $('#add-edit-user-modal').modal('toggle');\n }).error(function (data) {\n });\n}", "function loadRemoteData(id) {\n $scope.editableForm.$validusername = true;\n // The IAPIUserDetailService returns a promise.\n IAPIUserDetailService.getUserDetails(id)\n .then(\n function( userDetail ) {\n userDetail.id = id;\n applyRemoteData( userDetail );\n }\n )\n ;\n }", "function editUser(userID, userLogin) {\n $.post('@Url.Action(\"MethodName\", \"ControllerName\")', {\n usrID: userID.innerHTML,\n usrLogin: userLogin.innerHTML\n }).done(function (response) {\n console.log(response);\n });\n }", "function edit_user_alter_values(id) {\n\t$(\"#pop_up\").html(\"Updating user. Please wait...\");\n\t$(\"#pop_up\").show();\n\tvar username = $(\"#edit_user_username\").val();\n\tvar pass = $(\"#edit_user_password\").val();\n\tvar activated = $(\"#edit_user_activated\").val();\n\tvar fname = $(\"#edit_user_first_name\").val();\n\tvar lname = $(\"#edit_user_last_name\").val();\n\tvar type = $(\"#edit_user_type\").val();\n\tvar academicid = $(\"#edit_user_academicid\").val();\n\tvar aem = $(\"#edit_user_aem\").val();\n\tvar email = $(\"#edit_user_mail\").val();\n\tvar phone = $(\"#edit_user_telephone\").val();\n\tvar department = $(\"#edit_user_department\").val();\n\n\tvar data_query=\"edit_user_byadmin=1&id=\"+id+\"&user=\"+username+\"&activated=\"+activated+\"&first_name=\"+fname+\"&last_name=\"+lname+\"&telephone=\"+phone+\"&type=\"+type+\"&email=\"+email+\"&aem=\"+aem+\"&academicid=\"+academicid+\"&password=\"+pass+\"&department=\"+department;\n\t\n\t$.ajax({\n\t\ttype: \"GET\",\n\t\turl: \"functions.php\",\n\t\tdata: data_query,\n\t\tdataType: \"html\",\n\t\tsuccess: function(html){ \n\t\t\t$(\"#pop_up\").html(html);\n\t\t\t$(\"#pop_up\").show().delay(5000).fadeOut();\n\t\t}\n\t}); \n}", "function editUser(newRole, id) {\n var xhttp;\n xhttp = new XMLHttpRequest();\n xhttp.onreadystatechange = function() {\n if (this.readyState == 4 && this.status == 200) {\n getUsers();\n }\n };\n \n var obj = { \"role\" : newRole};\n obj = JSON.stringify(obj);\n xhttp.open(\"PUT\", \"http://localhost:8080/api/user/userUpdate/\" + id, true);\n xhttp.setRequestHeader(\"Content-type\", \"application/json\");\n xhttp.send(obj);\n }", "function useredit(e, myid) {\n myid = myid.replace('edit-', '');\n\n formData.append('iduser', myid);\n ajax({\n url: `./usuario/editar/${myid}`,\n method: \"POST\",\n // async: true,\n // responseType: 'json',\n done: editar,\n error: rendererror,\n form: formData,\n });\n\n abrirmodal(modal3, modaledit);\n\n e.preventDefault();\n}", "function editUser(form){\r\n\tvar f = form.length;\r\n\tvar count = 0;\r\n\twhile (f--) {\r\n\t\tif (form[f].type == \"checkbox\" && form[f].checked) {\r\n\t\t\tif(form[f].value!=\"on\")\r\n\t\t\t\tvar id = form[f].value;\r\n\t\t\t\tvar role = $('.role_'+id).text();\r\n\t\t\t\tcount = count + 1;\r\n\t\t}\r\n\t}\r\n\tif(count==0){\r\n\t\talert(\"Please select a row\");\r\n\t\t\r\n\t}else if($(\".userChkBox:checked\").length == 1){\r\n\t\t$('#loadMaskDiv').mask('Loading...');\r\n\t\tvar id = $(\".userChkBox:checked\").val();\r\n\t\t$.get(\"../userManagement/viewEditForm.htm?id=\"+id+\"&role=\"+role,function(response){\r\n\t\t\t$('#editUserDiv').append(response);\r\n\t\t\t$('#editUserModal').modal('show');\r\n\t\t\t$('#loadMaskDiv').unmask();\r\n\t\t\t$('input:checkbox').removeAttr('checked');\r\n\t\t}).fail(function(response){\r\n\t\t\t$('#loadMaskDiv').mask(response.status+\"************\"+response.statusText);\r\n\t\t});\r\n\t}else{\r\n\t\talert(\"You can edit only one user at a time\");\r\n\t}\r\n\treturn false;\r\n}", "function updateUserDetails(e){\n e.preventDefault();\n\n var userFormData = JSON.parse(queryStringToJsonString($(\"#admin-view-user\").serialize()));\n var userObj = {};\n for(var key in userFormData){\n if(key==\"projectName\")\n continue;\n userObj[key] = decodeURIComponent(userFormData[key]);\n }\n\n updateDetails(\"PUT\", baseURL + \"User\", JSON.stringify(userObj), \"Resource\", \"userViewForm\");\n}", "function pullUserData(){\n var xmlHttp = null;\n xmlHttp = new XMLHttpRequest();\n xmlHttp.onreadystatechange = function() {\n if (xmlHttp.responseText && xmlHttp.status == 200 && xmlHttp.readyState == 4) {\n var obj = jQuery.parseJSON( xmlHttp.responseText );\n $.each(obj, function() {\n FirstName[FirstName.length] = this['firstName'];\n LastName[LastName.length] = this['lastName'];\n if(h[this['_id']] != null){\n ID[ID.length] = h[this['_id']];\n }else{\n ID[ID.length] = \"Not Found\";\n }\n \n });\n }\n };\n xmlHttp.open(\"GET\", \"https://mydesigncompany.herokuapp.com/users\", true);\n //xmlHttp.open(\"GET\", \"https://infinite-stream-2919.herokuapp.com/users\", true);\n xmlHttp.send(null);\n }", "function getUserProfile () {\n\t$.ajax({\n\t type: \"GET\",\n\t url: \"rest/rest/userinfo\",\n\t success: function (data) {\n\t \t $(\"#userName\").val(data.uname);\n\t \t $(\"#userFirstName\").val(data.firstname);\n\t \t $(\"#userLastName\").val(data.lastname);\n\t \t $(\"#userEmail\").val(data.email);\n\t \t $(\"#userBalance\").val(data.balance);\n\t \t $(\"#profitLost\").val(data.profit_Lost);\n\t }\n\t});\n}", "function selectUser(event) {\n var editBtn = $(event.target);\n editIndex = editBtn.attr(\"id\").split('-')[1];\n selectedUserId = users[editIndex]._id;\n try {\n userService.findUserById(selectedUserId)\n .then(function (userInfo) {\n console.log(\"userInfo from findUserById\", userInfo);\n $usernameFld.val(userInfo.username);\n $passwordFld.val(userInfo.password);\n $firstNameFld.val(userInfo.firstName);\n $lastNameFld.val(userInfo.lastName);\n $roleFld.val(userInfo.role);\n selectedUser = userInfo;\n });\n }\n catch (err) {\n console.log(err.name + \": \" + err.message);\n }\n }", "function getProfileByUserid(user,callback) {\n $.getJSON( '/users/getProfileByUserid/', {id: user}, function( data ) {\n callback(data);\n });\n}", "function retire_user(id) {\n\tvar fname = $(\"#edit_user_first_name\").val();\n\tvar lname = $(\"#edit_user_last_name\").val();\n\tvar data_query=\"retire_user_byadmin=1&id=\"+id+\"&first_name=\"+fname+\"&last_name=\"+lname;\n\t\n\t$.ajax({\n\t\ttype: \"GET\",\n\t\turl: \"functions.php\",\n\t\tdata: data_query,\n\t\tdataType: \"html\",\n\t\tsuccess: function(html){ \n\t\t\t$(\"#pop_up\").html(html);\n\t\t\t$(\"#pop_up\").show().delay(5000).fadeOut();\n\t\t}\n\t}); \n}", "function openUserModaltoEdit(userId,tenantId) {\r\n\tvar row = $(\"#\"+tenantId + '_' +userId);\r\n\tvar userId = \"userId=\" + userId+'&purpose='+ $(\"#purpose\").val();\t\r\n\tif($(\"#purpose\").val()==\"eduCenterUsers\"){\r\n\t\t$(\"#editUser\").validationEngine({promptPosition : \"centerRight\", scroll: false});\r\n\t}\r\n\tmanageIconIE('icon-star');\r\n\tblockUI();\r\n\t$.ajax({\r\n\t\t\ttype : \"GET\",\r\n\t\t\turl : \"getEditUserData.do\",\r\n\t\t\tdata : userId,\r\n\t\t\tdataType : 'json',\r\n\t\t\tcache:false,\r\n\t\t\tsuccess : function(data) {\r\n\t\t\t\tunblockUI();\r\n\t\t\t\tcreateRoleListOnEdit(data);\r\n\t\t\t\t$(\"input#Id\").val(data[0].userId);\r\n\t\t\t\t$(\"input#userName\").val(data[0].userDisplayName);\r\n\t\t\t\t$(\"input#userId\").val(data[0].userName);\r\n\t\t\t\t$(\"label#userid\").text(data[0].userName);\r\n\t\t\t\t$(\"input#validation-email\").val(data[0].emailId);\r\n\t\t\t\tvar roles = data[0].availableRoleList;\r\n\t\t\t\t\r\n\t\t\t\t$(\"#userRole option\").removeAttr('selected');\r\n\t\t\t\t\r\n\t\t\t\tif(typeof roles != \"undefined\") {\r\n\t\t\t\t\t$.each(roles, function(index, value) {\r\n\t\t\t\t\t\t//alert(roles[index].roleName);\r\n\t\t\t\t\t\t$(\"#userRole option\").each(function() {\r\n\t\t\t\t\t\t\tvar flag = isFoundInList($(this).val(), data[0].masterRoleList)\r\n\t\t\t\t\t\t\t// if($(this).val() == roles[index].roleName) { // TODO : check logic\r\n\t\t\t\t\t\t\tif (flag == true) {\r\n\t\t\t\t\t\t\t\t$(this).attr('selected', 'true');\r\n\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t$(this).change();\r\n\t\t\t\t\t\t\t$(this).trigger('update-select-list');\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t});\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$(\"#userRole option\").change();\r\n\t\t\t\t\t$(\"#userRole option\").trigger('update-select-list');\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$('#userRole').trigger('update-select-list').change();\r\n\t\t\t\t\r\n\t\t\t\t//$(\"input#userStatus\").removeAttr('checked');\r\n\t\t\t\tif(data[0].status == 'AC') {\r\n\t\t\t\t\t$(\"input#userStatus\").attr('checked', true);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$(\"input#userStatus\").removeAttr('checked');\r\n\t\t\t\t}\r\n\t\t\t\t$(\"input#userStatus\").change();\r\n\t\t\t\t//$(\"input#userName\").val(this.userName);\r\n\t\t\t\t$(\"#userModal\").modal({\r\n\t\t\t\t\ttitle: strings['msg.editUser'],\r\n\t\t\t\t\theight: 370,\r\n\t\t\t\t\twidth: 370,\r\n\t\t\t\t\tresizable: false,\r\n\t\t\t\t\tdraggable: false,\r\n\t\t\t\t\tbuttons: {\r\n\t\t\t\t\t\t'Cancel': {\r\n\t\t\t\t\t\t\tclasses: 'glossy mid-margin-left',\r\n\t\t\t\t\t\t\tclick: function(win,e) {\r\n\t\t\t\t\t\t\t\t$('#editUser').validationEngine('hide');\r\n\t\t\t\t\t\t\t\tif($.browser.msie) setTimeout(\"hideMessage()\", 300);\r\n\t\t\t\t\t\t\t\tclickMe(e);\r\n\t\t\t\t\t\t\t\twin.closeModal(); \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},\r\n\t\t\t\t\t\t'Save': {\r\n\t\t\t\t\t\t\tclasses: 'blue-gradient glossy mid-margin-left',\r\n\t\t\t\t\t\t\tclick: function(win,e) {\r\n\t\t\t\t\t\t\t\tclickMe(e);\r\n\t\t\t\t\t\t\t\tif ($(\"#editUser\").validationEngine('validate')) {\r\n\t\t\t\t\t\t\t\t\tif ($(\"input[rel^='editPwd']\").val() == $(\"input[rel^='editConfPwd']\").val()) {\r\n\t\t\t\t\t\t\t\t\t\t$('#editUser').validationEngine('hide');\r\n\t\t\t\t\t\t\t\t\t\tupdateUserDetails($(\".edit-User-form\"), win, row);\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t$.modal.alert(strings['script.user.passwordMismatch']);\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\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\t\t\t\t\r\n\t\t\t},\r\n\t\t\terror : function(data) {\r\n\t\t\t\t$.modal.alert(strings['script.common.error1']);\r\n\t\t\t}\r\n\t\t})\t\r\n\t}", "function edit_admin(){\n var name = document.getElementById(\"name2\").value;\n var email = document.getElementById(\"email2\").value;\n var phone = document.getElementById(\"phone2\").value;\n var role = document.getElementById(\"role_body2\").value;\n var user_id = document.getElementById('detail_id').innerHTML;\n\n _loading(1);\n $.post('/api/v1/edit_admin',{\n 'id_admin': userData['id'],\n 'token': userData['token'],\n 'user_id':user_id,\n 'name': name,\n 'email': email,\n 'phone': phone,\n 'role': role,\n }, function (e) {\n if(e['status'] === '00'){\n console.log(e['messages'])\n notif('success', 'Success!', e['messages']);\n\n }else{\n notif('danger', 'System Error!', e['messages']);\n }\n }).fail(function(){\n notif('danger', 'System Error!', 'Mohon kontak IT Administrator');\n }).done(function(){\n _loading(0);\n _admins_list(_page);\n });\n}", "function ShowDetails(uid) {\n $.ajax({\n type: \"Get\",\n url: \"/ControlPanel/Details\",\n data: { id: uid },\n success: function (response) {\n $(\"#details #Details_Body\").html(response);\n $(\".modal-header\").html(\"User Details\");\n $(\"#details\").modal(\"show\");\n }\n })\n}", "function seeUserInfo(userId){\n var xmlhttp = getXmlHttp();\n xmlhttp.open('POST', '/index/viewUserInfo/', true);\n xmlhttp.onreadystatechange = function () {\n if (xmlhttp.readyState == 4) {\n if (xmlhttp.status == 200) {\n var html = xmlhttp.responseText;\n mainContent.innerHTML = \"\";\n mainContent.innerHTML = html;\n }\n }\n }\n var data = new FormData();\n data.append('userId', userId);\n xmlhttp.send(data);\n }", "function fetchUserByRequestParam() {\n // Get user id whose details is to be fetched\n let id = document.getElementById(\"fetchRequestUserId\").value;\n\n var xhttp = new XMLHttpRequest();\n xhttp.onreadystatechange = function () {\n // Remove currently displayed elements\n let userDiv = document.getElementById(\"userDetails\");\n let child = userDiv.lastElementChild;\n while (child) {\n userDiv.removeChild(child);\n child = userDiv.lastElementChild;\n }\n\n // Check response status and add message accordingle\n if (this.readyState == 4 && this.status == 200) {\n userDiv.innerHTML = this.responseText;\n } else {\n userDiv.innerHTML = `User with id ${id} not found`;\n }\n };\n xhttp.open(\"GET\", \"/user/getById?id=\" + id, true);\n xhttp.setRequestHeader(\"Content-Type\", \"application/json; charset=UTF-8\");\n xhttp.send();\n}", "function UserDetails(id) {\n var get = $.get(\"/User/UserDetails?id=\" + id);\n get.success(function (result) {\n if (forceLogOut(result)) {\n if (parseInt(result) <= 0) {\n if (parseInt(result) < 0) {\n Alert(_msgError, \"Error\");\n return false;\n }\n }\n $(\"#user-info\").html(result);\n }\n })\n}", "function load_update_user_data() {\n $('#email').val(userObj.email);\n $('#name').val(userObj.name);\n}", "function updateUserInfoInEditForm(user) {\n $('#ename').val(user.fullName);\n //$('#eid').val(user.id);\n $('#egender').val(user.gender);\n $('#ebirthyear').val(user.birthYear);\n $('#eemail').val(user.email);\n $('#epassword').val(user.password);\n $('#estreet').val(user.street);\n $('#ecity').val(user.city);\n $('#estate').val(user.state);\n $('#ezip').val(user.zipCode);\n}", "function callToEdit()\n{\n\tvar id = $(this).children('td').children('div.grid-img').attr('editId');\n\t \n\tdocument.location.href = HOST_PATH+\"admin/user/edituser/id/\" + id ;\n\t\n}", "function edit_user(api_url, updated_user_data) {\n $.ajax({\n url: api_url,\n type: \"PUT\",\n data: JSON.stringify(updated_user_data),\n processData:false,\n contentType: PLAINJSON\n }).done(function (data, textStatus, jqXHR){\n if (DEBUG) {\n console.log (\"RECEIVED RESPONSE: data:\",data,\"; textStatus:\",textStatus);\n }\n\n // Inform user that the user has been deleted\n alert_success(\"The user data has been successfully.\");\n\n // Reload the list of users\n getUsers();\n\n }).fail(function (jqXHR, textStatus, errorThrown){\n if (DEBUG) {\n console.log (\"RECEIVED ERROR: textStatus:\",textStatus, \";error:\",errorThrown);\n }\n\n // Inform the user that user has NOT been deleted\n alert_error(\"Error while trying to update the user data.\");\n });\n}", "function editProfile(pid, name, details) { \n var dataObject = { 'name': name, 'details': details };\n $.ajax({\n url: _lcarsAPI + \"profiles/\" + pid,\n type: 'POST',\n contentType: 'application/json',\n data: JSON.stringify(dataObject),\n success: function() { populateProfiles(); populateOrchestration(); }\n });\n}", "function editCustomer(id) {\n $.ajax({\n type: 'GET',\n url: urlToRestApi + \"/\" + id,\n dataType: 'JSON',\n // data: 'action_type=data&id=' + id,\n success: function (data) {\n $('#id').val(data.customer.id);\n $('#Customer_Details').val(data.customer.Customer_Details);\n $('#contact').val(data.customer.contact);\n }\n });\n}", "function updateUser(){\n var userupdate ={\n \"id\":document.getElementById(\"idUpdateUser\").value,\n \"fullname\":document.getElementById(\"user_full_name_modal\").value,\n \"email\":document.getElementById(\"user_email_modal\").value\n }\n\n // $.ajax({\n // url : '/admin/user/update',\n // method : 'POST',\n // dataType : 'json',\n // contentType : 'application/json; charset=utf-8',\n // data : JSON.stringify(userupdate),\n // success: function(res) {\n // if(res.status == 1){\n // sweetalert_success(res.message);\n // }else{\n // sweetalert_err(res.message);\n // }\n // },\n // error: function(request, status, error) {\n // alert(\"Not Call API\");\n // }\n // })\n}", "function updateUser(e){\n var user = updateForm.getValueForm();\n user[\"id\"] = userId;\n var val = updateForm.form.find('#myForm').valid();\n if(val){\n e.preventDefault();\n collectionOfUser.update(\n user,\n function(newUser){\n $('tr[data-id='+userId +']').html('').html(logic.template(templates.tColumOfTable, newUser))\n $('tr[data-id='+userId +']').on('click', select);\n updateForm.hide();\n },\n error\n ); \n }\n }", "function InitUpdateModal(detailUser) {\n $(\"#name\").val(detailUser.name);\n $(\"#phone\").val(detailUser.phone);\n}", "function GetClickedUserToForm(id) {\n $.ajax({\n type: \"POST\",\n contentType: \"application/json; charset=utf-8\",\n url: \"../WebService.asmx/GetUserById\",\n data: \"{Id: \" + JSON.stringify(id) + \"}\",\n dataType: \"json\",\n statusCode: {\n 404: function (data) {\n swal({\n title: \"Oops!\",\n text: \"This user no longer exists...\",\n icon: \"info\",\n timer: 3000\n }).then((value) => {\n location.reload(true);\n });\n },\n 500: function (data) {\n swal({\n title: \"Oops!\",\n text: \"Sorry, we are currently unable to fulfill your request!\",\n icon: \"info\",\n timer: 3000\n }).then((value) => {\n location.reload(true);\n });\n }\n },\n success: function (data) {\n clearForm();\n if (data.d !== null) {\n user_photo.attr('src', '/resources/imgs/users/' + data.d.Picture);\n photo_real_name.val(data.d.Picture);\n feedUneditedUser(data.d);\n input_username.val(data.d.Username);\n input_username.attr('user_id', data.d.Id);\n input_email.val(data.d.Email);\n toggleBothFormToggles(data.d.CurrentUserHistory.AfterState, data.d.Newsletter);\n disableFormTextArea();\n old_description.text(data.d.CurrentUserHistory.Description);\n old_description.each(function () {\n $(this).height(0).height(this.scrollHeight);\n }).find('textarea').change();\n $.session.set(\"UserPassword\", data.d.Password);\n }\n },\n error: function (data, status, error) {\n swal({\n title: \"Error!\",\n text: \" \" + (error.message === undefined ? \"Sorry, we are currently unable to fulfill your request!\" : error.message) + \" \",\n icon: \"warning\",\n timer: 3000\n });\n }\n });\n}", "function adminProfileModal(adminID){\r\n// alert(adminID);\r\n $.ajax({\r\n url: site_url+\"hpp/admin/selectAdminProfileModalById?adminID=\"+adminID,\r\n method:'POST',\r\n data:{ADMIN_ID:adminID},\r\n success:function(res){\r\n $('#adminProfileModalBody').html(res);\r\n }\r\n \r\n });\r\n}", "function editRow() {\n $('#error_edit').html(\"\");\n if (validateEditUser() == true) {\n try {\n var xhr = new XMLHttpRequest();\n xhr.open(\"PUT\", \"http://localhost:8080/Server/UsersController?session=\" + sessionStorage.getItem('session'), true);\n\n var data = JSON.stringify({\n \"username\": $('#edit-username').val(),\n \"password\": $('#edit-password').val(),\n \"email\": $('#edit-email').val(),\n \"grade\": $('#edit-grade').val(),\n \"name\": $('#edit-name').val(),\n \"age\": $('#edit-age').val(),\n \"address\": $('#edit-address').val(),\n \"id\": $('#edit-id').val()\n });\n xhr.onreadystatechange = function () {\n if (xhr.readyState === 4 && xhr.status === 200) {\n var obj = JSON.parse(xhr.responseText);\n if (obj.result == true) {\n var res = JSON.parse(data);\n $('#tbody .targetRow:nth-child(' + tempIndex + ') td:nth-child(1)').html('<span>' + res.username + \"</span>\");\n $('#tbody .targetRow:nth-child(' + tempIndex + ') td:nth-child(2)').html('<span>' + res.password + \"</span>\");\n $('#tbody .targetRow:nth-child(' + tempIndex + ') td:nth-child(3)').html('<span>' + res.email + \"</span>\");\n $('#tbody .targetRow:nth-child(' + tempIndex + ') td:nth-child(4)').html('<span>' + $('#add-grade option:selected').text() + \"</span>\");\n $('#tbody .targetRow:nth-child(' + tempIndex + ') td:nth-child(5)').html('<span>' + res.name + \"</span>\");\n $('#tbody .targetRow:nth-child(' + tempIndex + ') td:nth-child(6)').html('<span>' + res.age + \"</span>\");\n $('#tbody .targetRow:nth-child(' + tempIndex + ') td:nth-child(7)').html('<span>' + res.address + \"</span>\");\n $('#tbody .targetRow:nth-child(' + tempIndex + ') td:nth-child(8)').html('<span>' + res.id + \"</span>\");\n }\n $('#error_edit').html(obj.errorMessage);\n } else if (xhr.status === 401) {\n alert('Unauthorized user!');\n } else if (xhr.status === 0) {\n $('#error_edit').html('Server is offline!');\n }\n }\n xhr.send(data);\n } catch (exception) {\n alert(\"Request failed\");\n }\n }\n}", "function getProfileForm(userid) {\n $.ajax({\n type: \"POST\",\n url: \"Controllers/controller.User.php\",\n data: {locate: \"GetProfileForm\", userid: userid}\n })\n .done(function(msg) {\n $(\"#loginsubscribefroms\").html(msg);\n });\n\n}", "function loadUserData() {\n let url = getContextPath() +'/userInfo'\n $.get({\n url: url\n }).done(function (list) {\n let json = list[1]\n let id = json['id']\n if (id != null) {\n document.getElementById(\"id\").value = id;\n }\n let name = json['name']\n if (name != null) {\n document.getElementById(\"l_name\").value = name;\n document.getElementById(\"name\").value = name;\n }\n let email = json['email']\n if (email != null) {\n document.getElementById(\"l_email\").value = email;\n document.getElementById(\"email\").value = email;\n }\n let phone = json['telephone']\n if (phone != null) {\n document.getElementById(\"l_phone\").value = phone;\n document.getElementById(\"phone\").value = phone;\n }\n let userPic = json['userPic']\n if (userPic != null) {\n $('#userpic').attr('src', userPic);\n }\n let location = json['location']\n if (location != null) {\n document.getElementById(\"l_location\").value = location;\n document.getElementById(\"location\").value = location;\n }\n let adList = list[0];\n let htmlTable = loadAdForMe(adList)\n $('#myAdList').html(htmlTable)\n }).fail(function () {\n console.log('ошибка загрузки данных')\n });\n}", "function getCustomerById(CustId) {\n $.ajax({\n method: \"GET\",\n url: \"/Customer/GetCustomerById/\" + CustId,\n success: function (result) {\n $('#modalAddCustmer').modal('show');\n $('#modalTitle').html('Edit Customer');\n $('#custId').val(result.Id);\n $('#custName').val(result.Name);\n $('#custAge').val(result.Age);\n $('#custAddress').val(result.Address); \n $('#updateBtn').show();\n $('#createBtn').hide();\n },\n error: function (errormessage) {\n alert(errormessage.responseText);\n }\n }); \n}", "function singleEdit() {\n\tvar button = $(this),\n\ttype = button.attr('data-type'),\n\tsiteID = button.attr('data-siteid'),\n\tsiteName = button.attr('data-sitename'),\n\tuserOID = button.attr('data-userid'),\n\tuserName = button.attr('data-username');\n\tif (siteID && userOID) {\n $.ajax({\n url: \"scripts/read.php\",\n type: \"POST\",\n data: {\n data: [{\n id: siteID,\n oid: userOID\n }\n ],\n script: 'userAccess.sql'\n },\n dataType: \"json\",\n success: function (data) {\n openSingleEditDialog(type, siteID, siteName, userOID, userName, data[0]);\n }\n }); \n \n\t}\n}", "function editar(valorId) {\n\n\n var urls = \"https://jsonplaceholder.typicode.com/users/\" + valorId\n\n\n $.ajax({\n type: \"GET\",\n url: urls,\n data: \"\",\n contentType: \"application/Json; charset=utf-8\",\n dataType: 'Json',\n\n\n success: function (r) {\n\n\n // for (i in r) {\n // if (id != valorId) {\n\n // $(\"#cuerpo\").append('<tr><th scope=\"row\">'+r[i].id+'</th><td>'+r[i].name+'</td><td>'+r[i].username+'</td><td>'+r[i].email+'</td><td>'+r[i].phone+'</td><th scope=\"col\" class=\"text-primary\" id=\"\"><a href=\"javascript:pasarVariables('+r[i].id+')\">Editar</a> </th><th scope=\"col\" class=\"text-primary\"><a href=\"javascript:eliminar('+r[i].id+')\">Eliminar</a> </th></tr>')\n // }\n // id+=1;\n\n // }\n\n var idMax = r.id;\n var nombres = r.name;\n var usuarios = r.username;\n var correos = r.email;\n var telefonos = r.phone;\n\n \n $(\"#iDUsuario\").val(idMax);\n $(\"#nombres\").val(nombres);\n $(\"#usernames\").val(usuarios);\n $(\"#correos\").val(correos);\n $(\"#telefonos\").val(telefonos);\n $(\"#iDUsuario\").prop('disable', true);\n $(\"#id02\").css(\"display\", \"inline\");\n\n\n\n\n },\n error: function (r) {\n\n\n },\n failure: function (r) {\n\n }\n });\n}", "function validateUserId(userId)\r\n{\r\n\t var vType = \"GET\";\t\r\n\t var vUrl = $.jStorage.get(\"jsUrl\") + \"enterprise/getRegistration\";\t\r\n\t \r\n\t $.ajax\r\n\t ({\r\n\t\t type:vType,\r\n\t\t contentType: \"application/json\",\r\n\t\t url:vUrl,\r\n\t\t async:false,\r\n\t\t dataType: \"json\",\r\n\t\t success:function(json)\r\n\t\t {\t\t\t\t\r\n\t\t\t\t$.each(json, function(i,n)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(n[\"userId\"] === userId)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tgUserId = 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\t\r\n\t\t },\r\n\t\t error:function(json)\r\n\t\t {\r\n\t\t\t alert(\"Error from validating the user id: \" + json.status + \" \" + json.responseText);\r\n\t\t } \r\n\t });\t\r\n\t\t\t\r\n}", "function fnInfoEdit(){\n var strUserName = $('#strUserName').val();\n var strUserPwd = $('#strPassword').val();\n if(strUserName != '' || strUserName != undefined){\n $.ajax({\n type: 'PUT',\n url: 'http://' + strIpAddress + ':5050/api/fnUpdateUserInfo',\n contentType: 'application/json; charset=utf-8',\n dataType: 'json',\n data: JSON.stringify({\n 'strUserName': strUserName,\n 'strUserPwd':strUserPwd,\n 'strToken':strToken\n }),\n success: function (result) {\n if(result.intResp == '200'){\n alert(result.strMessage);\n $('#mdlPrincipal').modal('toggle');\n $('#aStrName').empty();\n $('#aStrName').append('<a id=\"aStrName\" class=\"navbar-brand sm-0\"><small>'+strUserName+'</small></a>');\n }else{\n alert(result.strMessage);\n $('#mdlPrincipal').modal('toggle');\n }\n },\n error: function (result) {\n alert('had a error');\n }\n });\n }else{\n alert('Name Empty');\n }\n }", "function getbyID(Id) {\n $('#txtNombre').css('border-color', 'lightgrey');\n $('#txtNombreUsuario').css('border-color', 'lightgrey');\n $('#txtEstado').css('border-color', 'lightgrey');\n \n $.ajax({\n url: \"/Home/getbyID/\" + Id,\n type: \"GET\", \n success: function (result) {\n $('#txtUsuarioId').val(result.usuarioId);\n $('#txtNombre').val(result.nombre);\n $('#txtNombreUsuario').val(result.nombreUsuario); \n $('#myModal').modal('show');\n $('#btnUpdate').show();\n $('#btnAdd').hide();\n },\n error: function (errormessage) {\n alert(errormessage.responseText);\n }\n });\n return false;\n}", "editClick() {\n let employee_id = event.target.value;\n console.log('edit emp:', employee_id);\n $.ajax({\n type: 'GET',\n url: 'getEmp/' + employee_id,\n dataType: 'json',\n data: { employee_id: employee_id },\n async: true,\n success: function (result) {\n //populate empForm\n var form = $(\"#empForm\");\n var i;\n for (i in result) {\n form.find('[name=\"' + i + '\"]').val(result[i]);\n }\n\n },\n error: function (jqXHR, textStatus, errorThrown) {\n alert(jqXHR.status + ' ' + jqXHR.responseText);\n }\n });\n }", "function getUserDetails(){\n var userId = document.getElementById(\"userViewSelect\").value;\n\n var method = \"GET\";\n var url = baseURL + \"User/\" + userId;\n var httpRequest = createHttpRequest(method, url);\n\n httpRequest.onreadystatechange = function(){\n if (httpRequest.readyState == 4 && httpRequest.status == 200) {\n var httpResponse = JSON.parse(httpRequest.response);\n var userForm = document.getElementById(\"admin-view-user\");\n\n // Fill User form with data\n for(var key in httpResponse){\n if(key==\"project\"){\n if(httpResponse[key].length > 0){\n userForm.projectName.value = \"\"; // Initialize\n for(var subkey in httpResponse[key]){\n if(subkey==0){\n userForm.projectName.value = httpResponse[key][subkey].projectName;\n } else {\n userForm.projectName.value = userForm.projectName.value + \", \" + httpResponse[key][subkey].projectName;\n }\n }\n } else {\n userForm.projectName.value = \"Free Resource\";\n }\n }\n //Ignore any other invalid key\n if(typeof userForm[key] === 'undefined' || !userForm[key]){\n continue;\n }\n // Assign all other values\n userForm[key].value = httpResponse[key];\n // Special case for Date\n if(key==\"dob\"){\n var dob = new Date(httpResponse[key]);\n userForm[key].value = ((dob.getFullYear())+ \"-\" + (dob.getMonth() + 1) + \"-\" + (dob.getDate()));\n }\n // Special case for Radio buttons\n if((key==\"isAdmin\") || (key==\"isManager\") || (key==\"isEnabled\")){\n if(httpResponse[key] == true){\n userForm[key][0].checked = true;\n } else {\n userForm[key][1].checked = true;\n }\n }\n }\n\n }\n }\n\n httpRequest.onerror = onError;\n sendHttpRequest(httpRequest, method, url, \"application/json\", null);\n}", "function viewUserProfile() {\r\n $.get(server_base_url + \"/FetchUserDetails\", {\r\n userId: getUserSessionElement(\"id\")\r\n }).done(function(data) {\r\n if (data == fail) {\r\n displayLargeErrorMessages(\"userDemogDisplayTable\", failMessage);\r\n } else if (data == unauthorized) {\r\n displayLargeErrorMessages(\"userDemogDisplayTable\", unauthorizedMessage);\r\n } else if (data == invalidSession) {\r\n callSessionTimeout();\r\n } else if (data == statusException) {\r\n displayLargeErrorMessages(\"userDemogDisplayTable\", statusExceptionMessage);\r\n } else {\r\n getViewUserProfileForm();//calling function to create display form\r\n $(\"#u_loginid_v\").text(data.loginid);\r\n $(\"#u_fname_v\").text(data.fname);\r\n $(\"#u_mname_v\").text(data.mname);\r\n $(\"#u_lname_v\").text(data.lname);\r\n $(\"#u_gender_v\").text(data.gender);\r\n $(\"#u_dob_v\").text(data.dob);\r\n $(\"#u_email1_v\").text(data.email1);\r\n $(\"#u_email2_v\").text(data.email2);\r\n $(\"#u_address1_v\").text(data.address1);\r\n $(\"#u_address2_v\").text(data.address2);\r\n $(\"#u_city_v\").text(data.city);\r\n $(\"#u_state_v\").text(data.state);\r\n $(\"#u_country_v\").text(data.country);\r\n $(\"#u_zipcode_v\").text(data.zipcode);\r\n $(\"#u_homephone_v\").text(data.homephone);\r\n $(\"#u_workphone_v\").text(data.workphone);\r\n $(\"#u_mobilephone_v\").text(data.mobilephone);\r\n\r\n\r\n// alert(\"hi\");\r\n// $.each(data, function(index, value) {\r\n// alert(data);\r\n// $.each(value, function(i, v) {\r\n// alert(i + \" \" + v);\r\n// });\r\n// alert(index + \"\\t\" + value);\r\n\r\n\r\n\r\n\r\n// $(\"#u_\" + index + \"_v\").text(\"\").text(value);\r\n// $(\"#u_\" + index + \"_u\").val(\"\").val(value);\r\n// if (data.gender == \"Male\") {\r\n// $('input[name=u_gender_u]').val([data.gender]);\r\n// $(\"#u_gen_f\").removeClass(\"active\");\r\n// $(\"#u_gen_m\").addClass(\"active\");\r\n// } else if (data.gender == \"Female\") {\r\n// $('input[name=u_gender_u]').val([data.gender]);\r\n// $(\"#u_gen_m\").removeClass(\"active\");\r\n// $(\"#u_gen_f\").addClass(\"active\");\r\n// } else {\r\n// $(\"#u_gen_m\").removeClass(\"active\");\r\n// $(\"#u_gen_f\").removeClass(\"active\");\r\n// }//end if\r\n//\r\n// var roleNames = \"\";\r\n// var orgrole = data.orgRole;\r\n// for (var m = 0; m < orgrole.length; m++) {\r\n// var orgnames = orgrole[m];\r\n// $.each(orgnames, function(index, value) {\r\n// if (index == \"role\") {\r\n// var data = value;\r\n// $.each(data, function(index, value) {\r\n// var data = value;\r\n// $.each(data, function(index, value) {\r\n// if (index == \"rolename\") {\r\n// roleNames = roleNames + value + \",\";\r\n// }\r\n// });//for rolenames end\r\n// });\r\n// }//for role end \r\n// });\r\n// }\r\n//// alert(roleNames);\r\n// $(\"#u_role_v\").text(\"\").text(roleNames.substring(0, roleNames.length - 1));\r\n// $(\"#u_role_u\").val(\"\").val(roleNames.substring(0, roleNames.length - 1));\r\n// });\r\n }\r\n });\r\n}", "function Mostrar(id) {\n$(\"#hidden_usuario_id\").val(id);\n$.post(\"../../model/users/unique_info.php\", {\nid: id\n},\nfunction (data, status) {\nvar dato = JSON.parse(data);\n$(\"#nick2\").val(dato.nick);\n$(\"#nombre2\").val(dato.nombre_usuario);\n$(\"#correo2\").val(dato.correo_usuario);\n$(\"#nivel2\").val(dato.nivel);\n}\n);\n$(\"#modaluserupdate\").modal(\"show\");\n}", "function show_users(id){\n jQuery.ajax({\n url:'php/group/getalluser.php',\n type:'post',\n data:{id:id},\n success:function(data){\n $(\"#showgroupuser\").modal('show');\n $(\"#showgroupuser-body\").html(data);\n },\n error:function(){\n alert(\"Network error. Failed to fetch data\");\n }\n });\n }", "function getUser(userId, callback) {\n\t\n// set this to false to prevent weird things from occuring when the user activates edit mode on his profile, and then goes to another user's profile without deactivating their edit mode.\neditModeActive = false;\n\nif(userModalShouldServerSide == true) {\n\nuserModalShouldServerSide = false;\n\n$.get({\nurl:\"components/userModalGet.php\",\ndata:{\"user_id\":userId},\nsuccess:function(data,status){\t\t\t\t\t \n\nconsole.log(data);\n\nvar dataArr = JSON.parse(data);\n\n// gives us an object called \"info\" that is populated with info about this user.\neval(dataArr[0]);\t\n\nif(callback.length > 0) {\n// grab from the dataArr the info variable that contains this user's info.\ncallback(info);\t\n}\n\n\nuserModalShouldServerSide = true;\n}\n});\n\n\n}\n\t\n}", "function edit()\n{\n $(document).on('click', '#edit', function()\n {\n let id = $(this).attr('contacts-id');\n \n $.ajax({\n url:'contacts',\n method:'POST',\n data:{ contactId:id },\n dataType: 'JSON',\n success: function(data)\n {\n $('#up-id').val(data[0]);\n $('#up-name').val(data[1]);\n $('#up-email').val(data[2]);\n $('#up-phone').val(data[3]);\n }\n })\n return false;\n })\n}", "function list_update(){\r\n $('.user_list').on('click','.upd',function(){\r\n $id = $(this).attr('id'); \r\n $.ajax({\r\n url: 'php/consults.php',\r\n type: 'POST',\r\n data: {user_update_dat: $id},\r\n beforeSend:function(){\r\n\r\n },\r\n success:function(html){\r\n $('#myModal2 .contact').html(html);\r\n save_edit_user();\r\n },\r\n error:function(html){\r\n\r\n }\r\n }) \r\n\r\n });\r\n}", "function getUserData(userId){\n\n //Add loader\n $(\"#userDataLoc\").empty();\n $(\"#userDataLoc\").append(`<div class=\"loader loader-big\"></div>`);\n\n //Cek apakah ada user yang dipilih sebelumya\n if(selected!=0){\n //Deselect last selected user\n $(\"#user-\"+selected).removeClass(\"active\");\n }\n\n //Efek aktif pada tombol\n $(\"#user-\"+userId).addClass(\"active\");\n selected = userId;\n\n //Load profile\n\n $.when( getProfileData(userId) ).then(function( profileData, textStatus, jqXHR ) {\n\n currentProfile = profileData;\n\n //Fill data\n dataHTML = `\n <div class=\"img-circle\"></div>\n <div class=\"row\">\n <h3 class=\"col-sm-8\">`+ profileData.name +`</h3>\n <div class=\"col-sm-4\">\n <div class=\"row\">\n <span onclick=\"editProfile();\" class=\"mt-2 mt-sm-0 col-sm-5 btn btn-primary\">Edit</span>`\n if(profileData.is_active==1){\n dataHTML += `<span onclick=\"coretModal();\" class=\"mt-2 mt-sm-0 col-sm-5 offset-sm-2 btn btn-danger\">Coret</span>`\n }else {\n dataHTML += `<span onclick=\"uncoretModal();\" class=\"mt-2 mt-sm-0 col-sm-5 offset-sm-2 btn btn-success\">Uncoret</span>`\n }\n dataHTML += `</div>\n </div>\n </div>\n <hr/>\n <table class=\"table table-borderless\">\n <tbody>\n <tr class=\"d-flex\">\n <td class=\"col-3\">No TEC</td>\n <td class=\"col-9\">: `+ profileData.tec_regno +`</td>\n </tr>\n <tr class=\"d-flex\">\n <td class=\"col-3\">NIM</td>\n <td class=\"col-9\">: `+ profileData.NIM +`</td>\n </tr>\n <tr class=\"d-flex\">\n <td class=\"col-3\">Nama</td>\n <td class=\"col-9\">: `+ profileData.name +`</td>\n </tr>\n <tr class=\"d-flex\">\n <td class=\"col-3\">Panggilan</td>\n <td class=\"col-9\">: `+ profileData.nickname +`</td>\n </tr>\n <tr class=\"d-flex\">\n <td class=\"col-3\">Aktif</td>\n <td class=\"col-9\">: `+ getCheckCross(profileData.is_active) +`</td>\n </tr>\n <tr class=\"d-flex\">\n <td class=\"col-3\">Lunas</td>\n <td class=\"col-9\">: `+ getCheckCross(profileData.lunas) +`</td>\n </tr>\n <tr class=\"pb-3 d-flex\">\n <td class=\"col-3\">Admin</td>\n <td class=\"col-9\">: `+ getCheckCross(profileData.isAdmin) +`</td>\n </tr>\n\n <tr class=\"table-separator d-flex\">\n <td class=\"col-3\">Email</td>\n <td class=\"col-9\">: `+ profileData.email +`</td>\n </tr>\n <tr class=\"d-flex\">\n <td class=\"col-3\">No. Telp</td>\n <td class=\"col-9\">: `+ profileData.mobile +`</td>\n </tr>\n <tr class=\"d-flex\">\n <td class=\"col-3\">ID LINE</td>\n <td class=\"col-9\">: `+ profileData.line_id +`</td>\n </tr>\n <tr class=\"d-flex\">\n <td class=\"col-3\">ID Instagram</td>\n <td class=\"col-9\">: `+ profileData.instagram +`</td>\n </tr>\n <tr class=\"pb-3 d-flex\">\n <td class=\"col-3\">Alamat</td>\n <td class=\"col-9\">: `+ profileData.address +`</td>\n </tr>\n\n <tr class=\"table-separator d-flex\">\n <td class=\"col-3\">Tentang</td>\n <td class=\"col-9\">: `+ profileData.about_me +`</td>\n </tr>\n <tr class=\"d-flex\">\n <td class=\"col-3\">Interest</td>\n <td class=\"col-9\">: `+ getInterestString(profileData.interests) +`</td>\n </tr>\n </tbody>\n\n </table>\n <div class=\"row\">\n <span id=\"quizButton\" onclick=\"getQuizScore('`+ userId+`');\" class=\"col-sm-3 btn btn-primary\">Get Quiz Score</span>\n <span id=\"assignmentButton\" onclick=\"getAssignment('`+ userId+`');\" class=\"col-sm-3 offset-sm-1 mt-2 mt-sm-0 btn btn-primary\">Get Assignment</span>\n <span id=\"resetButton\" onclick=\"changePass('`+userId+`')\" class=\"col-sm-3 offset-sm-1 mt-2 mt-sm-0 btn btn-primary\">Change Password</span>\n </div>\n <div id=\"quizScoreLoc\" class=\"mt-3\">\n\n </div>\n `;\n\n //Tampilkan isi data\n $(\"#userDataLoc\").empty();\n $(\"#userDataLoc\").append(dataHTML);\n if(profileData.profile_picture_url != null) $(\".img-circle\").css(\"background-image\", \"url(\"+profileData.profile_picture_url+\")\");\n\n },function( jqXHR, textStatus, errorThrown){\n alert(\"Failed to get profile : \"+textStatus+\"/\"+jqXHR.statusText);\n });\n\n\n}", "function editAccountInfo() {\n var fName, lName, screenName, email, password;\n\n fName = document.getElementById(\"fName\").value;\n lName = document.getElementById(\"lName\").value;\n screenName = document.getElementById(\"screenName\").value;\n email = document.getElementById(\"email\").value;\n password = document.getElementById(\"password\").value;\n\n var storedParam = localStorage.getItem(\"userId\");\n var webMethod = \"../AccountServices.asmx/EditUser\";\n var parameters = \"{\\\"userId\\\":\\\"\" + encodeURI(storedParam) +\n \"\\\",\\\"firstName\\\":\\\"\" + encodeURI(fName) +\n \"\\\",\\\"lastName\\\":\\\"\" + encodeURI(lName) +\n \"\\\",\\\"screenName\\\":\\\"\" + encodeURI(screenName) +\n \"\\\",\\\"email\\\":\\\"\" + encodeURI(email) +\n \"\\\",\\\"password\\\":\\\"\" + encodeURI(password) + \"\\\"}\";\n\n $.ajax({\n type: \"POST\",\n url: webMethod,\n data: parameters,\n contentType: \"application/json; charset=utf-8\",\n dataType: \"json\",\n success: function (msg) {\n loadAccountInfo();\n }\n });\n}", "function view_details(value_passed){\nvar current_id=document.getElementsByClassName('hidden_value')[value_passed].value;\n$.ajax({\nmethod: \"GET\",\nurl: \"http://localhost:3000/user/\"+current_id,\n \n})\n.done(function( msg ) {\n let innerForm=\n \"<p><input type=\\\"hidden\\\" class=\\\"update_text\\\" id=\\\"id_value\\\"value=\\\"\"+msg.id+\"\\\" /></p>\"+\n \"<p><input type=\\\"text\\\" class=\\\"update_text\\\" id=\\\"firstname\\\" value=\\\"\"+msg.firstname+\"\\\" onkeyup=\\\"search_for_change()\\\"/></p>\"+\n \n \"<p><input type=\\\"text\\\" class=\\\"update_text\\\" id=\\\"lastname\\\" value=\\\"\"+msg.lastname+\"\\\" onkeyup=\\\"search_for_change()\\\"/></p>\"+\n \"<p><input type=\\\"text\\\" class=\\\"update_text\\\" id=\\\"phone\\\" value=\\\"\"+msg.phone+\"\\\" onkeyup=\\\"search_for_change()\\\"/></p>\"+\n \"<p><input type=\\\"email\\\" class=\\\"update_text\\\" id=\\\"email\\\" value=\\\"\"+msg.email+\"\\\" onkeyup=\\\"search_for_change()\\\"/></p>\"+\n \n \"<p><input type=\\\"submit\\\" id=\\\"update_submit\\\" value=\\\"Update\\\" disabled=\\\"disabled\\\"/> \"+\n \"<input type=\\\"button\\\" id=\\\"update_cancel\\\" value=\\\"Cancel\\\" onclick=\\\"hide_pop_up(\\'update_div\\')\\\"/></p>\"\n document.getElementById('update_div').style.display=\"block\";\n document.getElementById('update_form').innerHTML=innerForm;\n\n})\n}", "function updateUser(event) {\n event.preventDefault();\n\n var updateUserElement = $('#updateUser');\n var inputUserNameElement = updateUserElement.find('fieldset input#inputUserName');\n var inputUserEmailElement = updateUserElement.find('fieldset input#inputUserEmail');\n var inputUserFullNameElement = updateUserElement.find('fieldset input#inputUserFullname');\n var inputUserAgeElement = updateUserElement.find('fieldset input#inputUserAge');\n var inputUserLocationElement = updateUserElement.find('fieldset input#inputUserLocation');\n var inputUserGenderElement = updateUserElement.find('fieldset input#inputUserGender');\n\n if (inputUserNameElement.val() !== '') {\n // find user by name (first that matches). Dirty!\n // Get Index of object based on id value\n var arrayPosition = userListData.map(function (arrayItem) {\n return arrayItem.username;\n }).indexOf(inputUserNameElement.val());\n // Get out User Object\n var thisUserObject = userListData[arrayPosition];\n var updateUser = {\n '_id': thisUserObject._id,\n 'username': inputUserNameElement.val(),\n 'email': inputUserEmailElement.val(),\n 'fullname': inputUserFullNameElement.val(),\n 'age': inputUserAgeElement.val(),\n 'location': inputUserLocationElement.val(),\n 'gender': inputUserGenderElement.val()\n };\n\n $.ajax({\n type: 'PUT',\n data : updateUser,\n url : '/users/updateuser/',\n dataType : 'JSON'\n }).done(function (response) {\n\n if (response.msg === '') {\n\n // Clear the form inputs\n updateUserElement.find('fieldset input').val('');\n\n // Update the table\n populateTable();\n\n } else {\n alert('Error: ' + response.msg);\n }\n });\n\n } else {\n alert('Error: Enter User Name to update');\n }\n\n}", "function editASingleUser(userID){\r\n var newUserID = document.getElementById(\"userID\").value;\r\n var userEmail = document.getElementById(\"userEmail\").value;\r\n var userFirstName = document.getElementById(\"userFirstName\").value;\r\n var userLastName = document.getElementById(\"userLastName\").value;\r\n var userAvatar = document.getElementById(\"userAvatarEdit\").value;\r\n\r\n var xhr = new XMLHttpRequest();\r\n xhr.open(\"PUT\",\"api/users/\" + String(userID), true);\r\n xhr.onload = function() {\r\n if (xhr.readyState === 4 && xhr.status >= 200 && xhr.status < 300) {\r\n JSON.parse(xhr.responseText);\r\n }\r\n else {\r\n alert(\"Error \" + xhr.status);\r\n }\r\n };\r\n xhr.setRequestHeader('Content-Type', 'application/json');\r\n try {\r\n xhr.send(JSON.stringify({\"id\": newUserID, \"email\": userEmail, \"first_name\": userFirstName, \"last_name\": userLastName, \"avatar\": userAvatar}));\r\n }\r\n catch (error) {\r\n alert.error(\"Cannot edit user ID\");\r\n }\r\n\r\n\r\n}", "function _edit(id) {\n vm.item.id;\n vm.item.userId = vm.item.id;\n //$window.location.href = \"/profile/\" + vm.item.id + \"/edit\";\n }", "function EditDetail(e){\n \n const rows = e.target.parentElement.parentElement;\n const id = rows.querySelector(\"#id\").innerText;\n //ajax call\n let request = new XMLHttpRequest();\n new BSN.Modal('#modal-user', { backdrop: true }).show();\n request.open(\"GET\",`/update/${id}`,true);\n request.setRequestHeader('X-Requested-With','XMLHttpRequest');\n request.setRequestHeader('Content-type','application/json','charset=UTF-8');\n request.onload = function (){\n let formpage = JSON.parse(this.responseText).html_form;\n modal.innerHTML = formpage; \n let form = modal.querySelector(\"#form\");\n //csrf token from input(can be done with cookies too)\n csrf = document.querySelector(\"input[name=csrfmiddlewaretoken]\").value;\n //when submit button is clicked\n form.addEventListener(\"submit\",(e)=>{\n UserSubmit(e,`/update/${id}/`);\n });\n \n }\n request.send();\n\n}", "function updateUser() {\n\n // Collecting the data.\n var userId = $('#userIdEdit').val();\n var firstName = $('#firstNameEdit').val();\n var lastName = $('#lastNameEdit').val();\n var age = $('#ageEdit').val();\n\n // Request Sending\n $.ajax({\n method: 'POST',\n url: './api/edit_user.php',\n data: {\n userId: userId,\n firstName: firstName,\n lastName: lastName,\n age: age\n },\n success: function(data) {\n\n // Conversion from string to JSON.\n var dataJSON = JSON.parse(data);\n\n // Get the status of the record update.\n var status = dataJSON.status;\n\n // If the record update succeed, do the following actions.\n if (status === 'success') {\n\n // Show success message to the user.\n showSuccess('User has been updated!');\n\n // Hide the modal.\n $('#editModal').modal('hide');\n\n // Do not proceed.\n return;\n }\n\n // Prompt that the operation is unsuccessful.\n showError('Something went wrong. Please try submitting the form again.');\n }\n });\n}", "function getUserInfo(id) {//move to utils\n $.ajax({\n url: \"profilePageServlet\",\n type: 'POST',\n data: {\n request_type: \"getUserInfo\",\n user_id: id\n },\n success: function (userInfo) {\n console.log(\"in getUserInfo: \" + userInfo);\n res = userInfo;\n return res;\n },\n error: function () {\n console.log(\"error in getUserInfo\");\n\n }\n });\n}", "function enableEditingUser(userId){\n $('#'+userId+'-email').removeAttr('disabled');\n $('#'+userId+'-save').removeAttr('disabled');\n $('#'+userId+'-edit').hide();\n $('#'+userId+'-cancel').show();\n}", "getEditInfo(id) {\n\t\treturn db.one(`SELECT * FROM user_information WHERE id=$1`, id)\n\t}", "function editUserInfo(user){\n fetch(`https://students-3d096.firebaseio.com/${user.id}.json`, {\n method:\"PUT\",\n headers: {\n \"Content-type\": \"application/json\"\n }, \n body: JSON.stringify(user)\n })\n .then(res => res.json())\n .then(data => {\n debugger \n users = users.map(user => {\n if(user.id == data.id) user = data;\n return user;\n })\n showUsersInfo(users);\n isAdd = true;\n currentId = null;\n })\n}", "function getProfile() {\n $.ajax({\n url: \"/user/profile?username=\" + getURLParameter('name'),\n type: \"GET\",\n contentType: \"application/json; charset=utf-8\",\n success: function (data, textStatus, jqXHR) {\n profile = data;\n setPlaceId(profile.googleLocationID);\n getAuthUser();\n loadProfileData();\n loadCards();\n populateHeightDropDown();\n setInputDataInFields();\n $('.mdb-select').material_select();\n },\n error: function (data, textStatus, jqXHR) {\n console.log(\"Cannot read username\");\n }\n });\n}", "function processUser(){\n var parameters = location.search.substring(1).split(\"&\");\n var temp = parameters[0].split(\"=\");\n user = unescape(temp[1]);\n username = user;\n document.getElementById(\"curUser\").innerHTML = user;\n\n temp = parameters[1].split(\"=\");\n id = unescape(temp[1]);\n document.getElementById(\"idname\").innerHTML = id;\n if (typeof id !== 'undefined') {\n $.ajax({\n url: '/checkBuyer?id=' + id + '&username=' + user,\n type: 'GET',\n dataType: 'json',\n success: function (response){\n if (response == \"0\") {\n window.location = \"./login.html\";\n }else {\n buildHtml ();\n }\n }\n });\n }\n else {\n window.location = \"./login.html\";\n }\n}", "function ViewUserModelOpen(id){\n $.ajax({\n headers: {\n 'X-CSRF-TOKEN': $('meta[name=\"csrf-token\"]').attr('content')\n },\n type: 'post',\n url : 'view-user',\n data :{id:id},\n dataType: 'json',\n success : function(response){\n document.getElementById(\"view-name\").innerHTML =response['name'];\n document.getElementById(\"view-email\").innerHTML =response['email'];\n document.getElementById(\"view-phone\").innerHTML =response['phone'];\n $(\"#ViewModel\").modal();\n }\n });\n}", "function editEmployee(id) {\n $.ajax({\n url: \"http://localhost:8081/ABCCompany/employee/\" + id,\n type: 'GET',\n jasonp: \"callback\",\n contentType: \"application/json; charset=utf-8\",\n headers: {\n \"Content-Type\": \"application/json; charset=utf-8\",\n \"Accept\": \"application/json\"\n },\n dataType: \"json\",\n success: function (result) {\n getId(result);\n window.location.href = \"http://localhost:8080/pages/editEmployee.jsp\";\n\n },\n error: function (e) {\n alert(\"Error\" + e);\n }\n });\n\n}", "async retriveUserDetails(req, res, next) {\n try {\n let userId = req.params.userId;\n let userDetails = await User.findById(userId)\n .populate('jobs')\n .populate('city')\n if (!userDetails)\n return res.status(404).end();\n\n return res.status(200).json(userDetails);\n } catch (err) {\n next(err)\n }\n }", "function editRestrictedUserProfile(apiurl, template) {\n\t$.ajax({\n\t//TODO 3: Send an AJAX request to modify the restricted profile of a user\n\t\t// Do not implement the handlers yet, just show some DEBUG text in the console.\n\t\t// Check addUser for some hints.\n\t\t// Do not forget to include:\n\t\t// * To modify a User_restricted resource you must use the PUT method.\n\t\t// * The header \"Authorization with value admin\"\n\t\t// * The contentType is CollectionJSON+\";\"+FORUM_USERPROFILE\n\t\t// * You should not processData (processData:false)\n\t\t// * The data you want to send in the entity body is obtained by\n\t\t// appliying the method JSON.stringify() to the given template.\n url: apiurl,\n type: \"PUT\",\n headers: {\"Authorization\":\"admin\"},\n contentType: COLLECTIONJSON+\";\"+FORUM_USER_PROFILE,\n processData:false,\n data:JSON.stringify(template)\n //TODO 4: Implement the handlers successful and failures responses accordding to the function documentation.\n\t}).done(function (data, textStatus, jqXHR){\n\t\tif (DEBUG) {\n\t\t\tconsole.log (\"RECEIVED RESPONSE: data:\",data,\"; textStatus:\",textStatus)\n\t\t}\n var url = apiurl.split(\"/\");\n var userUrl = \"/\";\n for(var i = 1; i < url.length - 2; ++i){\n userUrl = userUrl.concat(url[i]);\n userUrl = userUrl.concat(\"/\");\n }\n getUser(userUrl);\n\t}).fail(function (jqXHR, textStatus, errorThrown){\n\t\tif (DEBUG) {\n\t\t\tconsole.log (\"RECEIVED ERROR: textStatus:\",textStatus, \";error:\",errorThrown)\n\t\t}\n //The behaviour upon failure is not defined. Left with log message\n alert (\"Could not edit user's restricted profile\");\n\t});\n}", "function editUserField(data) {\n var employeeDetails = getStorage();\n employeeDetails.forEach(function (user, index) {\n if (user.employeeId == data) {\n employeeId.value = user.employeeId;\n firstName.value = user.firstName;\n lastName.value = user.lastName;\n address.value = user.address;\n emailId.value = user.emailId;\n updateBtn.style.display = \"block\";\n submitBtn.style.display = \"none\";\n position = index;\n }\n });\n}", "function get_user_data(){\n var txt = '';\n var row_header = '<tr>' +\n '<th class=\"none-borderLeft\">ID</th>' +\n '<th>Username</th>' +\n '<th>Role</th>' +\n '<th>Status</th>' +\n '<th width=\"100\">Action</th>' +\n '</tr>';\n $('#table_data').html((row_header));\n $.ajax({\n url: 'action/get_user.php',\n type: 'POST',\n data: {id:menuId,startNum:numStart,endNum:numEnd},\n cache: false,\n dataType: \"json\",\n success: function (data) {\n if (data.length == 0){\n alert('No Data');\n }else {\n for (i = 0; i<data.length; i++){\n var row_data = '<tr>' +\n '<td>'+data[i].id+'</td>' +\n '<td style=\"text-align: left\">'+data[i].username+'</td>' +\n '<td>'+data[i].name+'</td>' +\n '<td>'+data[i].status+'</td>' +\n '<td>'+button_edit+'</td>' +\n '</tr>';\n txt += row_data;\n }\n }\n $('#table_data').html(row_header+txt);\n }\n });\n }", "function handleEditUser(event){\n //Extract the url of the resource from the form action attribute.\n if (DEBUG) {\n console.log (\"Triggered handleEditUser\");\n }\n var $form = $(this).closest(\"form\");\n var body = serializeFormTemplate($form);\n var user_url = $(this).closest(\"form\").attr(\"action\");\n edit_user(user_url, body);\n return false;\n}", "function getUserById(id) {\n // TODO: get user by id and set $scope.user to the user object. Angular will bind the object to the page \n }", "function editProfile() {\n $.get('php/account/profile.php', function(data) {\n var eprofile = $.parseJSON(data);\n $('#address').attr('value',eprofile.address);\n $('#email').attr('value',eprofile.email);\n $('#zipcode').attr('value',eprofile.zipcode);\n $('#contactno').attr('value',(eprofile.contactno).substr(4));\n $('#skills').val(eprofile.skills);\n /*optional stuff to do after success */\n });\n\n $('form#frmEditProfile').on('submit',function(e){\n e.preventDefault();\n var data = $(this).serialize();\n $.ajax({\n url: 'php/account/editprofile.php?userno=' + userno,\n type: 'POST',\n data: data,\n })\n .done(function(edit) {\n getProfile();\n }); //edit profile ajax\n }); //form frmEditProfile submit\n \n \n } //function editProfile", "function update_UserInformation(id) {\n\n $(\"#editUserForm\").removeClass();\n if(id){\n\n // fetch Data for the hosteler with the current selected id\n $.ajax({\n url:'../../../validation/superAdmin/users/getUser_id.php',\n type : 'post',\n data :{users_id :id},\n dataType : 'json',\n success:function (response) {\n $(\"#u_id\").val(response.user_id);\n $(\"#editUsername\").val(response.username);\n $(\"#editUserMail\").val(response.email);\n $(\"#editFirstName\").val(response.firstName);\n $(\"#editLastName\").val(response.lastName);\n $(\"#editUserType\").val(response.user_type);\n $(\"#editPhoneNumber\").val(response.phone);\n\n\n // Update Data\n $(\"#editUserForm\").unbind('submit').bind('submit',function () {\n var form = $(this);\n\n //validation\n var editUsername = $(\"#editUsername\").val();\n var editUserMail = $(\"#editUserMail\").val();\n var editFirstName = $(\"#editFirstName\").val();\n var editLastName = $(\"#editLastName\").val();\n var editUserType = $(\"#editUserType\").val();\n var editPhoneNumber = $(\"#editPhoneNumber\").val();\n\n\n\n if (editFirstName && editLastName && editUsername && editUserMail && editPhoneNumber && editUserType ) {\n //submit the form to server\n $.ajax({\n url :form.attr('action'),\n type : form.attr('method'),\n data : form.serialize(),\n dataType : 'json',\n success:function (response) {\n // $(\".invalid-feedback\").removeClass('has-error');\n if(response.success === true){\n //close the modal after deleting\n $(\"#exampleModal\").modal('hide');\n\n swal({\n title: \"Success\",\n text: \"Information Update Successfully\",\n icon: \"success\",\n button:true\n });\n\n\n /* reload the database after the submission to\n * update the table\n * this is a built in function of database\n */\n usersTable.ajax.reload(false);\n\n }else{\n swal({\n title: \"warning\",\n text: \"Error! Please try again\",\n icon: \"success\",\n button:true\n });\n\n }//else\n }//success\n });//ajax submit\n }\n return false;\n })\n }// success\n });// fetch selected hosteler's data\n }else{\n alert(\"Error: Please Refresh This Page\");\n }\n}", "function updateUser(){\n\t\tif(validateFormControls(\"edituser\")){\n\t\t\t$.ajax({\n\t\t\t\ttype: 'POST',\n\t\t\t\turl: \"../UserServlet\",\n\t\t\t\tdata: {\n\t\t\t\t\t\taction:'updateUser',\n\t\t\t\t\t\tusername: $('#editusername').val(),\n\t\t\t\t\t\temail: $('#editemail').val(),\n\t\t\t\t\t\tcontactno: $('#editcontactno').val(),\n\t\t\t\t\t\trole: $('#editrole').val(),\n\t\t\t\t\t\tboard:$('#editboard').val(),\n\t\t\t\t\t\tsuspended:$(\"input:radio[name='editsuspended']:checked\").val(),\n\t\t\t\t\t\t},\n\t\t\t\tsuccess: function(response) {\n\t\t\t\t\t\tif(response.status==\"success\"){\n\t\t\t\t\t\t\talert('User successfully updated');\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(response.status==\"failure\") {\n\t\t\t\t\t\t\talert(response.error);\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\tdataType: \"json\"\n\t\t});\n\t\t}\n\t\telse{\n\t\t\talert(\"Errors exist in form\");\n\t\t}\n\n\t}", "async function edit(id){\r\n newForm();\r\n const editdata = await fetch(\"https://611f26499771bf001785c736.mockapi.io/users/\"+ id ,\r\n {\r\n method:\"PUT\"\r\n });\r\n const userdata = await editdata.json();\r\n document.getElementById(\"userName\").value = userdata.name\r\n document.getElementById(\"picture\").value = userdata.avatar\r\n remove(id)\r\n}", "function activeUserAdminById(uID){\r\n $(\"#massage\").html('');\r\n $.ajax({\r\n url: site_url+\"hpp/admin/active_usser_admin_by_id?uID=\"+uID,\r\n// method:'POST',\r\n// data:{ADMIN_ID:uID},\r\n success:function(res){\r\n if(res == 1){\r\n $(\"#massage\").html('<div class=\"alert alert-success\">User Successfully Activated...!</div>');\r\n// $(\"#ManageAdmin\").refresh();\r\n }else if(res == 0){\r\n $(\"#massage\").html('<div class=\"alert alert-warning\">user Dose\\'t Activated..!!</div>');\r\n// $(\"#ManageAdmin\").refresh();\r\n }\r\n }\r\n\r\n });\r\n}", "function renderUser(user){\n\t\t//console.log(\"inside renderUser ..we are getting correct user\");\n\t\t//console.log(user);\n\t\t$('#usernameFld').val(user.username);\n\t\t$('#passwordFld').val(user.password);\n\t\t$('#firstNameFld').val(user.firstName);\n\t\t$('#lastNameFld').val(user.lastName);\n\t\t$('#role').val(user.role);\n\t}", "function btnedit(id) {\n $(\"#pagetype\").attr(\"disabled\", \"disabled\");\n var uri = '';\n if ($('#pagetype').val() == 'customer') {\n var uri = '/master/custlist/' + id;\n } else {\n var uri = '/master/suplist/' + id;\n }\n\n try {\n $.ajax({\n url: uri,\n dataType: \"json\",\n type: \"get\",\n contentType: \"application/json; charset=utf-8\",\n success: function(data) {\n console.log(data)\n $('#hf_id').val(data._id);\n $('#txtname').val(data.name);\n $('#txtmobile').val(data.mobile);\n $('#txtopeningbal').val(data.openingbalance);\n $('#ddlpaymentterms').val(data.paymentterms);\n $('#ddlcustomertype').val(data.customertype);\n $('#txtcompany').val(data.companyname);\n $('#txtemail').val(data.email);\n $('#txtothers').val(data.others);\n $('#txtdescription').val(data.description);\n $('#ddlgsttype').val(data.gsttype);\n $('#txtgstin').val(data.gstin);\n $('#txtpanno').val(data.panno);\n $('#txtbillingaddress').val(data.billingaddress);\n $('#ddlbillingstate').val(data.billingstate);\n $('#txtbillingpincode').val(data.billingpincode);\n $('#txtshippingaddress').val(data.shippingaddress);\n $('#ddshipingstate').val(data.shippingstate);\n $('#txtshippingpincode').val(data.shippingpincode);\n $('.custlist').hide();\n $('.custentry').show();\n $('.btnaddnew').html('Go back')\n },\n error: function(response) {\n var parsed = JSON.parse(response.responseText);\n toastr.error(parsed.Message);\n d.resolve();\n },\n failure: function(response) {\n var parsed = JSON.parse(response.responseText);\n toastr.error(parsed.Message);\n\n d.resolve();\n }\n });\n } catch (e) {\n toastr.error(e.Message);\n }\n}", "function getUserIdListFull(){\r\n\t\t\t\t\r\n\t\t\t\tvar option = '<option value=\"\" disabled selected>Please Select</option>';\r\n\t\t\t\tvar optHtml = '<option value=\"\" disabled selected>Please Select</option>';\r\n\t\t\t\t$.axs(\"../usermanagement/getUserIdListFull.htm\", { \r\n\t \t \t\"companyId\" : \"\"\r\n\t\t\t\t}, function(data) {// console.log(data);\r\n\t\t\t\tfor(var i=0; i<data.length;i++){\r\n\t\t\t\t\tvar update_account_state = data[i].account_state;\r\n\t\t\t\t\tvar update_user_Id=data[i].loginId;\r\n\t\t\t\t\tvar update_id=data[i].id;\r\n\t\t\t\t\toption += \"<option values=\"+data[i].id+\" value=\"+data[i].id+\"-\"+data[i].roletypeid+\"-\"+data[i].companyid+\">\"+data[i].loginId+\"</option>\";\r\n\t\t\t\t\t\r\n\t\t\t\t\toptHtml += \"<option value=\"+data[i].id+\">\"+data[i].account_state+\"</option>\";\r\n\t\t\t\t\t}\r\n\t\t\t\t$('#updateuserid').html(option);\r\n\t\t\t\t//$('#updateaccountstate').html(optHtml);\r\n\t\t\t\t}, \"post\");\r\n\t\t\t}" ]
[ "0.7342261", "0.7317639", "0.7226027", "0.719276", "0.7174116", "0.71403193", "0.7123165", "0.7114405", "0.70381266", "0.70235425", "0.69719696", "0.6926111", "0.6906576", "0.6870825", "0.68420905", "0.67962474", "0.6795686", "0.67580247", "0.67285454", "0.67253226", "0.67163396", "0.6682402", "0.66610706", "0.66401386", "0.6634719", "0.662731", "0.6621392", "0.6597006", "0.6594549", "0.6593622", "0.6560758", "0.65522784", "0.65497434", "0.65497434", "0.65326244", "0.65158063", "0.651479", "0.6506352", "0.64986175", "0.6475114", "0.64557886", "0.64508086", "0.64471185", "0.6440931", "0.6406956", "0.6403217", "0.64021945", "0.640169", "0.6364896", "0.6356262", "0.635588", "0.63539", "0.63431674", "0.63428277", "0.6339852", "0.6330596", "0.63266397", "0.63101494", "0.6302127", "0.63001096", "0.62976974", "0.62974715", "0.62949634", "0.62803096", "0.6272789", "0.62655914", "0.6256033", "0.6247305", "0.6243961", "0.6243791", "0.62372553", "0.62337345", "0.6222893", "0.6219454", "0.62100124", "0.6207264", "0.62045026", "0.61890197", "0.6173147", "0.61679655", "0.61604095", "0.6153045", "0.61494964", "0.6146524", "0.61425817", "0.6139325", "0.6137999", "0.61292636", "0.61282086", "0.6128116", "0.61274135", "0.6125208", "0.6119943", "0.6118528", "0.61138636", "0.61130464", "0.6108688", "0.61019033", "0.60978967", "0.60848695" ]
0.6680759
22
Jquery ajax call to get roles & populate role dropdown
function getRoles(userId) { $("#ddlrole").empty(); $("#ddlrole").append($("<option></option>").val("").html("")); if (roles.length === 0) { $.ajax({ type: "POST", url: "ManageUserApi.aspx/GetRoles", data: "{}", contentType: "application/json; charset=utf-8", dataType: "json", success: function (data) { roles = data.d; $.each(roles, function (key, value) { $("#ddlrole").append($("<option></option>").val(value.RoleId).html(value.Description)); }); getUser(userId); }, failure: function (response) { alert(response.d); } }); } else { $.each(roles, function (key, value) { $("#ddlrole").append($("<option></option>").val(value.RoleId).html(value.Description)); }); getUser(userId); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fillRoles() {\n $(\"select[name='RoleId']\").empty();\n $.ajax({\n url: \"/Employee/Roles/\" + $('select[name=\"DepartmentId\"]').val(),\n dataType: \"Json\",\n type: \"Get\",\n data: {},\n success: function (response) {\n $(\"select[name='RoleId']\").append(`<option value=` + 0 + `>Role</option>`)\n $.each(response, function (key, value) {\n var option = `<option value=` + value.Id + `>` + value.Name + `</option>`\n $(\"select[name='RoleId']\").append(option)\n })\n }\n\n })\n }", "async function ajaxRoles() {\n const result = await $.ajax({\n type: \"POST\",\n url: \"CurrentManagement.aspx/GetRoles\",\n data: \"{}\",\n contentType: \"application/json; charset=utf-8\",\n dataType: \"json\"\n });\n return result;\n }", "function getDataForSelect() {\n $.ajax({\n url: `${G_BASE_URL}/roles`,\n method: `get`,\n success: renderSelectData,\n error: (e) => {\n $('#modal-error').modal('show');\n $('#error').text(e.responseText);\n },\n });\n }", "function LoadRole(element) {\n $.ajax({\n type: \"Get\",\n url: \"/Roles/LoadRole\",\n success: function (data) {\n Roles = data;\n var $option = $(element);\n $option.empty();\n $option.append($('<option/>').val('0').text('Select Role').hide());\n $.each(Roles, function (i, val) {\n $option.append($('<option/>').val(val.id).text(val.name));\n });\n }\n });\n}", "function populate_host_roles(platform_ui, software_ui, region_ui, roles_ui) {\r\n roles_ui.find('option').remove();\r\n roles_ui.append('<option value=\"ALL\">ALL</option>');\r\n $.ajax({\r\n url: \"/api/get_distinct_host_roles/platform/\" + platform_ui.val() +\r\n \"/software_versions/\" + (software_ui.val() == null ? 'ALL' : software_ui.val()) +\r\n \"/region_ids/\" + ((region_ui.val() == null || region_ui.val() == -1) ? 'ALL' : region_ui.val()),\r\n dataType: 'json',\r\n success: function(data) {\r\n $.each(data, function(index, element) {\r\n for (i = 0; i < element.length; i++) {\r\n roles_ui.append('<option value=\"' + element[i].role + '\">' + element[i].role + '</option>');;\r\n }\r\n });\r\n }\r\n });\r\n}", "function _roles_append(data){\n $('#role_body').append(\n '<option value=\"'+ data.id +'\">'+ data.name +'</option>'\n )\n $('#role_body2').append(\n '<option value=\"'+ data.id +'\">'+ data.name + '</option>'\n )\n}", "function _roles_list(){\n _loading(1);\n $.post('/api/v1/ams/role',{\n 'id': userData['id'],\n 'token': userData['token'],\n 'status': 0,\n }, function (e) {\n let i;\n if(e['status'] === '00'){\n if(e.data.length > 0){\n for(i=0; i < e.data.length; i++){\n _roles_append(e.data[i], i);\n console.log(i);\n }\n }\n\n console.log(document.getElementById(\"role_body2\"));\n }else{\n notif('danger', 'System Error!', e.message);\n }\n }).fail(function(){\n notif('danger', 'System Error!', 'Mohon kontak IT Administrator');\n }).done(function(){\n _loading(0);\n });\n}", "function prepAssignments()\n{\n\tvar role_area = document.getElementById(\"assignment-area\");\n\tif (role_area != null) \n\t{\n\t\tvar json_users = {};\n\t\tvar json_roles = {};\n\t\trole_area.innerHTML = \"\";\n\t\tvar httpRequest = new XMLHttpRequest();\n\t\t//var turl = \"http://localhost/final/data.php\";\n\t\thttpRequest.open('POST', turl, true);\n\t\tvar params = \"action=allUsers\";\n\t\thttpRequest.setRequestHeader(\"Content-type\", \"application/x-www-form-urlencoded\");\n\t\thttpRequest.send(params);\t\n\t\thttpRequest.onreadystatechange = function()\n\t\t{\n\t\t\tif(httpRequest.readyState == 4)\n\t\t\t{\n\t\t\t\tif(httpRequest.status == 200)\n\t\t\t\t{\n\t\t\t\t\tjson_users = JSON.parse(httpRequest.responseText);\n\t\t\t\t\tvar elem = document.createElement(\"select\");\n\t\t\t\t\telem.id = \"select-user\";\n\t\t\t\t\tfor(var i = 0; i < json_users.length; i++) \n\t\t\t\t\t{\n\t\t\t\t\t var obj = json_users[i]; \n\t\t\t\t\t var opt = document.createElement(\"option\");\n\t\t\t\t\t opt.value = obj['id'];\n\t\t\t\t\t opt.innerHTML = obj['first_name'] +\" \"+ obj['last_name'];\n\t\t\t\t\t elem.appendChild(opt);\n\t\t\t\t\t role_area.appendChild(elem);\n\n\t\t\t\t\t}\n\n\t\t\t\t\tconsole.log(json_users);\n\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tvar httpRequest2 = new XMLHttpRequest();\n\t\thttpRequest2.open('POST', turl, true);\n\t\tvar params2 = \"action=allRoles\";\n\t\thttpRequest2.setRequestHeader(\"Content-type\", \"application/x-www-form-urlencoded\");\n\t\thttpRequest2.send(params2);\t\n\t\thttpRequest2.onreadystatechange = function()\n\t\t{\n\t\t\tif(httpRequest2.readyState == 4)\n\t\t\t{\n\t\t\t\tif(httpRequest2.status == 200)\n\t\t\t\t{\n\t\t\t\t\tjson_roles = JSON.parse(httpRequest2.responseText);\n\t\t\t\t\tvar elem = document.createElement(\"select\");\n\t\t\t\t\telem.id = \"select-role\";\n\t\t\t\t\tfor(var i = 0; i < json_roles.length; i++) \n\t\t\t\t\t{\n\t\t\t\t\t var obj = json_roles [i]; \n\t\t\t\t\t var opt = document.createElement(\"option\");\n\t\t\t\t\t opt.value = obj['id'];\n\t\t\t\t\t opt.innerHTML = obj['name'];\n\t\t\t\t\t elem.appendChild(opt);\n\t\t\t\t\t role_area.appendChild(elem);\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\t//var btn = \"<button id='assign_btn' onClick=setAssignments()>Assign Role</button>\";\n\t\t//role_area.appendChild(btn);\n\t\tvar btn_div = document.getElementById(\"assignment-btn\");\n\t\tvar btn_elem = document.createElement(\"button\")\n\t\tbtn_elem.id = \"assign_btn\";\n\t\tbtn_elem.setAttribute('onclick','setAssignments()');\n\t\tbtn_elem.innerHTML = \"Asssign Role\";\n\t\tbtn_div.appendChild(btn_elem);\n\t\tvar br = document.createElement(\"br\");\n\t\tbtn_div.appendChild(br);\n\t\t//role_area.appendChild(btn_div);\n\t\t//var btn = \"<button id='assign_btn' onClick=setAssignments()>Assign Role</button>\";\n\n\t\t//console.log(\"a-start\");\n\t\t//console.log(json_roles);\n\t\t//console.log(json_users);\n\t\t//console.log(\"a-end\"\t);\n\t}\n\n}", "function getRoles() {\n\t$.getJSON(\"/rpc/account/GetRoles\").done(function (jsonData) {\n\t\twindow.roles = jsonData;\n\t});\n}", "function getRolesAndThen(func) {\n\t$.ajax({\n // this call is synchronous to ensure that\n // there are participants created for roles\n // before we start loggin in as one\n async: false,\n type: 'GET',\n url: JODA_ENGINE_ADRESS + '/api/identity/roles',\n success: function(data) {\n func(data);\n },\n dataType: \"json\"\n });\n}", "function populate(){\n\t\t\t$.ajax({\n url: '/app/gui/role/list',\n \"headers\": header,\n type: \"GET\",\n crossDomain: true,\n dataType: \"json\",\n success: function(data) {\n var obj=JSON.parse(data.result);\n var roleRecords=obj.roleResources;\n\n for(var i in roleRecords)\n {\n var roleName=roleRecords[i].role; \n if(roleName!='ROLE_ADMIN'){\n \t $('#role-table tbody').append('<tr>'+\n \t\t\t\t\t\t\t'<td id=\"rolename\">'+roleName+'</td>'+\n \t\t\t\t\t\t\t'<td>'+'<button id=\"edit\" class=\"btn btn-primary btn-sm\" onclick=\"editRole(this)\">'+\n \t\t\t\t\t\t\t'<i class=\"fa fa-edit\"></i>'+\n \t\t\t\t\t\t\t'</button> '+\n \t\t\t\t\t\t\t'<button id=\"delete\" class=\"btn btn-danger btn-sm\" onclick=\"deleteRole(this)\">'+\n \t\t\t\t\t\t\t'<i class=\"fa fa-trash\"></i>'+\n \t\t\t\t\t\t\t'</button>'+\n \t\t\t\t\t\t\t'</td>'+\n \t\t\t\t\t\t\t'</tr>'); \n }\n }\n },\n error: function(jqXHR, textStatus, errorThrown) {\n console.log('error while get');\n }\n });\n\t}", "function createRoleListOnEdit(data) {\r\n\t\t\r\n\t $(\"#userRole\").find(\"option\").remove();\r\n\t\tvar availableRole = \"\";\r\n\t\t$.each(data[0].availableRoleList, function(index, value){\r\n\t\t\tif(data[0].availableRoleList[index].roleName != 'ROLE_GRW'){\r\n\t\t\t\tif(data[0].availableRoleList[index].roleDescription != 'Class Admin User'){\r\n\t\t\t\t\tavailableRole += '<option value=\"'+ data[0].availableRoleList[index].roleName +'\" >' +data[0].availableRoleList[index].roleDescription+'</option>';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t$(\"#userRole\").append(availableRole);\t\t\r\n\t\t$(\"#userRole\").change(function(){\r\n\t\t\t$(\"#userRole option[value='ROLE_USER']\").attr('selected', true);\r\n\t\t});\r\n\t\t//alert(masterRole);\r\n\t}", "function fntRolesUsuario(){\n\tif (document.querySelector('#listRolid')) {\n\t\t\n\t\tlet ajaxUrl = base_url+'/Roles/getSelectRoles';\n\t\tlet request = (window.XMLHttpRequest) ? new XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP');\n\t\trequest.open(\"GET\", ajaxUrl, true);\n\t\trequest.send();\n\n\t\trequest.onreadystatechange = function(){\n\t\t\tif (request.readyState == 4 && request.status == 200) {\n\t\t\t\tdocument.querySelector('#listRolid').innerHTML = request.responseText;\n\t\t\t\tdocument.querySelector('#listRolid').value = 1;\n\t\t\t\t$('#listRolid').selectpicker('render');\n\t\t\t\t// $('#listRolid').selectpicker('refresh');\n\n\t\t\t}\n\t\t}\n\t}\n}", "function ListarRol() {\n $.ajax({\n type: \"GET\",\n //dataType: \"JSON\",\n url: \"/Usuario/Listado\",\n dataType: 'json',\n success: function (data) {\n console.log(data);\n $.each(data.listaRol, function (key, rol) {\n $(\"#idRol\").append(`<option data-item=${key} value='${rol.codRol}' >${rol.nomRol}</option`);\n })\n } \n });\n // .then(function (roles) {\n // $.each(roles, function (key, rol) {\n // $(\"#idRol\").append(\"<option value='\" + rol.codRol + \"'>\" + rol.nomRol + \"</option\");\n // })\n //})\n}", "function GetLoggedUserRoleName(userRoleId) {\n ShowLoading();\n var odataSelect = Xrm.Page.context.getClientUrl() + \"/XRMServices/2011/OrganizationData.svc\" + \"/\" + \"RoleSet?$filter=RoleId eq guid'\" + userRoleId + \"'\";\n var roleName = null;\n $.ajax(\n {\n type: \"GET\",\n async: false,\n contentType: \"application/json; charset=utf-8\",\n datatype: \"json\",\n url: odataSelect,\n beforeSend: function (XMLHttpRequest) { XMLHttpRequest.setRequestHeader(\"Accept\", \"application/json\"); },\n success: function (data, textStatus, XmlHttpRequest) {\n roleName = data.d.results[0].Name;\n HideLoading();\n },\n error: function (XmlHttpRequest, textStatus, errorThrown) { alert('OData Select Failed: ' + textStatus + errorThrown + odataSelect); HideLoading(); }\n }\n );\n return roleName;\n}", "function populateRoleDropDown() {\n\t// populate the option lists if they don't exist\n\tlet roleDropdown = document.getElementById('role-dropdown');\t\n\tif(roleDropdown.length == 0) {\n\t\trolesData = pullRoleData();\n\t\t\n\t\tfor (let i=0; i<=rolesData.length-1; i++) {\n\t\t\tlet option = document.createElement(\"option\");\n\t\t\toption.text = rolesData[i].name;\n\t\t\toption.value = rolesData[i].role_id;\n\t\t\troleDropdown.appendChild(option);\n\t\t}\n\t}\n}", "function createRoleListOnAdd(data,orgLevel) {\r\n\t var masterRole = \"\";\r\n\t\t$.each(data, function(index, value){\r\n\t\t\tif(data[index].roleName != 'ROLE_GRW'){\r\n\t\t\t\tif(orgLevel == '4'){\r\n\t\t\t\t\tif(data[index].roleName != 'ROLE_ADMIN'){\r\n\t\t\t\t\t\tmasterRole += '<option value=\"'+ data[index].roleName +'\" '+data[index].defaultSelection+'>' +data[index].roleDescription+'</option>';\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tmasterRole += '<option value=\"'+ data[index].roleName +'\" '+data[index].defaultSelection+'>' +data[index].roleDescription+'</option>';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t//alert(masterRole);\r\n\t\t$(\"#addUserRole\").empty().append(masterRole);\r\n\t\t$(\"#addUserRole\").change(function(){\r\n\t\t\t$(\"#addUserRole option[value='ROLE_USER']\").attr('selected', true);\r\n\t\t});\r\n\t\t$('#addUserRole').trigger('update-select-list');\r\n\t}", "function populateMasterRoles(data) {\n var index = 0;\n\n $(\"#orgRoleList\").empty();\n\n while (index < data.length) {\n // Declare a local Role object\n var role = new Role();\n role.ID = data[index].ID;\n role.Name = data[index].Name;\n role.Description = data[index].Description;\n // Add the current role to the referece role array\n referenceRoles.push(role);\n // Add a list item for the organization.\n // Add a check box for each master role\n $(\"<DIV id='rowContainer\" + data[index].ID + \"'</DIV>\").addClass(\"sectionSpan\").appendTo(\"#orgRoleList\");\n// var node = <label for = 'role\" + data[index].ID + \"'>\" + data[index].Name + \"</label>\";\n $(\"<input type='checkbox' id='role\" + data[index].ID + \"'/>\").val(data[index].ID).css({ 'margin-left': '15px' }).on(\"click\", activateRole).appendTo(\"#rowContainer\" + data[index].ID);\n $(\"<label for='role\" + data[index].ID + \"'>\" + data[index].Name + \" </label>\").addClass(\"sectionLabel\").css({'margin-left':'10px','font-weight':'normal','width':'200px'}).appendTo(\"#rowContainer\" + data[index].ID);\n index++;\n }\n $(\"#masterRoleList\").change(masterRoleSelectHandler);\n }", "function showRoles() {\n\t$.ajax({\n\t\ttype : \"GET\",\n\t\turl : \"roles/goShowRoles\",\n\t\tcache : false,\n\t\tsuccess : function(data) {\n\t\t\t$(\"#showDynamicContent\").html(\"\");\n\t\t\t$(\"#dynamicContent\").html(data);\n\t\t\t$('#roleLists').dataTable({\n\t\t\t\t\"bJQueryUI\" : true,\n\t\t\t\t\"sPaginationType\" : \"full_numbers\",\n\t\t\t\t\"iDisplayLength\" : 25,\n\t\t\t\t\"sScrollY\" : \"390px\",\n\t\t\t\t\"bFilter\" : true,\n\t\t\t\t\"bDestroy\" : true\n\t\t\t});\n\t\t}\n\t});\n\n}", "function getRoles() {\n selectRole();\n return roleArray;\n}", "function loadMasterRoles(callback, errorHandler) {\n // Declare a Deferred construct to return from this method\n var promise;\n // Declare a resonse structure to return from this object\n var response = new Response();\n var targetUrl;\n\n var token = sessionStorage.getItem(tokenKey);\n var headers = {};\n if (token) {\n headers.Authorization = 'Bearer ' + token;\n }\n\n // Empy any current options from the Project Select control\n// emptyProjectList();\n\n // Add a blank option to the combo box\n $('<option></option>').appendTo($('#projectList'));\n\n targetUrl = MasterRoleUrl;\n\n promise = $.ajax({\n url: targetUrl,\n type: 'GET',\n dataType: 'json',\n headers: headers,\n success: function (data, txtStatus, xhr) {\n callback(data);\n },\n error: function (xhr, textStatus, errorThrown) {\n response.status = xhr.status;\n errorHandler(response,503);\n }\n });\n\n return (promise);\n }", "function populateCurrentRoles(data) {\n // Reset the Role list box to delete and current records\n resetRoleListbox()\n\n // Reset the Role array for the current ORg\n currentOrg.Roles.length = 0;\n var dummy2 = \"text\";\n // Loop over the defined dimensions and set them active as apporpriate\n $('#orgRoleList input').each(function (index, value) {\n $(value).prop('checked', false);\n // loop over the values in the current unit dimension array\n var count = 0;\n while (count < data.length) {\n if ($(value).val() == data[count].MasterRoleID) {\n\n $(value).prop('checked', data[count].isActive);\n // Update the overhead value\n $(\"#txtOverhead\" + data[count].MasterRoleID).val(data[count].Overhead);\n // Add the current role to the orgRoles array\n var newRole = new Role();\n newRole.ID = data[count].ID;\n newRole.MasterRoleID = data[count].MasterRoleID;\n newRole.Overhead = data[count].Overhead;\n newRole.OrganizationID = currentOrg.ID;\n newRole.isActive = data[count].isActive;\n currentOrg.Roles.push(newRole);\n break;\n }\n count++;\n }\n });\n var dummy = \"text\";\n }", "function getRoles() {\n\n queries.executeRequest('GET', 'permissions/roles')\n .then(function (result) {\n if (result.success) {\n $scope.roles = result.data;\n }\n });\n }", "function handleGetRolesResponse(response){\n ROLES = response;\n response.forEach((role) => {\n addRoleOptionToRoleSelect(role.roleName);\n addRoleToRolesTable(role);\n });\n\n}", "function rolesToSelect(id) {\r\n roleService.getRoles().then(function(roleRes) {\r\n var selectPermissionElements = selectedPermission = '';\r\n if (id > 0 && id != undefined) {\r\n permissionService.getPermission(id).then(function(permissionRes) {\r\n var rolesArray = [];\r\n if (permissionRes.roles) {\r\n for (var i = 0; i < permissionRes.roles.length; i++) {\r\n rolesArray.push(permissionRes.roles[i].name);\r\n }\r\n }\r\n roleRes.forEach((element, index, array) => {\r\n if (permissionRes.roles) {\r\n\r\n if (jQuery.inArray(element.name, rolesArray) != -1) {\r\n selectedPermission = \"selected\";\r\n } else {\r\n selectedPermission = '';\r\n }\r\n selectPermissionElements += \"<option value='\" + element.role_id + \"' \" + selectedPermission + \">\" + element.name + \"</option>\";\r\n } else {\r\n selectPermissionElements += \"<option value='\" + element.role_id + \"'>\" + element.name + \"</option>\";\r\n }\r\n });\r\n $(\"#permissionRoleSelect\").html(selectPermissionElements);\r\n $('#permissionRoleSelect').select2({\r\n width: \"100%\",\r\n placeholder: \"Select Role\"\r\n });\r\n $(\"input.select2-search__field\").addClass(\"form-control\");\r\n $(\"#loading\").css(\"display\", \"none\");\r\n }, function(error) {\r\n \t$(\"#loading\").css(\"display\", \"none\");\r\n common.infoMessage(error.responseJSON['error-auxiliary-message'], 'error');\r\n });\r\n }\r\n }, function(err) {\r\n common.infoMessage(error.responseJSON['error-auxiliary-message'], 'error');\r\n });\r\n }", "function GetNotesPrivelegeRole(type) {\n ShowLoading();\n var odataSelect = Xrm.Page.context.getClientUrl() + \"/XRMServices/2011/OrganizationData.svc\" + \"/\" + \"permobil_settingsSet?$select=permobil_value&filter=permobil_key eq 'Notes Roles'\";\n var roleName = null;\n $.ajax(\n {\n type: \"GET\",\n async: false,\n contentType: \"application/json; charset=utf-8\",\n datatype: \"json\",\n url: odataSelect,\n beforeSend: function (XMLHttpRequest) { XMLHttpRequest.setRequestHeader(\"Accept\", \"application/json\"); },\n success: function (data, textStatus, XmlHttpRequest) {\n roleName = data.d.results[0].permobil_value;\n HideLoading();\n },\n error: function (XmlHttpRequest, textStatus, errorThrown) { alert('OData Select Failed: ' + textStatus + errorThrown + odataSelect); HideLoading(); }\n }\n );\n return roleName;\n}", "function getRoles() {\n\n DashboardFactory.getRoles().then(\n\n function(response) {\n\n vm.roles = response;\n console.log(response);\n\n // Get all the Users that exist in the origin.API DB\n getUsers();\n\n },\n\n function(error) {\n\n console.log(error);\n \n });\n\n }", "function loadAssignedManager(userId,roleId){\n\tvar data=ajaxCall('GET',contextPath()+\"atr/assignManagerList?userId=\"+userId+\"&roleId=\"+roleId+\"\");\n\tif(data !=undefined){\n\t $(\"#assignedToList option:gt(0)\").remove();\n\t $(\"#editAssignedToList option:gt(0)\").remove();\n\t\tfor (var i = 0; i < data.length; i++) {\n\t\t\tvar opt = \"<option class='text-capitalize' value='\" + data[i].userId + \"'>\"\n\t\t\t\t\t+ data[i].userName + \"</option>\";\n\t\t\t$('#assignedToList').append(opt);\n\t\t\t$('#editAssignedToList').append(opt);\n\t\t\t\n\t\t}\n } \n}", "function loadAllDropDownList() {\n\t\t\n\t\t//call ajax and load data into #ddlAgent\n\t\t$.ajax({\n\t\t\tdataType: \"json\",\n\t\t\ttype: 'GET',\n\t\t\tdata: {},\n\t\t\turl: getAbsolutePath() + \"agent/list\",\n\t\t\tcontentType: \"application/json\",\n\t\t\tsuccess: function(data){\n\t\t\t\t$.each(data.list,function(key,value){\n\t\t\t\t\t$('#ddlAgent').append($('<option>', {\n\t\t\t\t\t\tvalue : value.agentcode,\n\t\t\t\t\t\ttext : value.shortname\n\t\t\t\t\t}));\n\t\t\t\t\t//edit part\n\t\t\t\t\t$(\"#editUserDialog\").find('#ddlAgent').append($('<option>', {\n\t\t\t\t\t\tvalue : value.agentcode,\n\t\t\t\t\t\ttext : value.shortname\n\t\t\t\t\t}));\n\t\t\t\t});\n\t\t\t},\n\t\t\terror: function(){\n\t\t\t\talert('Lỗi load dữ liệu unit (40)!');\n\t\t\t}\n\t\t});\n\t\t\n\t\t//call ajax and load data into #ddlAgent\n\t\t$.ajax({\n\t\t\tdataType: \"json\",\n\t\t\ttype: 'GET',\n\t\t\tdata: {},\n\t\t\turl: getAbsolutePath() + \"role/list\",\n\t\t\tcontentType: \"application/json\",\n\t\t\tsuccess: function(data){\n\t\t\t\t$.each(data.list,function(key,value){\n\t\t\t\t\t$('#ddlRole').append($('<option>', {\n\t\t\t\t\t\tvalue : value.roleid,\n\t\t\t\t\t\ttext : value.rolename\n\t\t\t\t\t}));\n\t\t\t\t\t//edit part\n\t\t\t\t\t$(\"#editUserDialog\").find('#ddlRole').append($('<option>', {\n\t\t\t\t\t\tvalue : value.roleid,\n\t\t\t\t\t\ttext : value.rolename\n\t\t\t\t\t}));\n\t\t\t\t});\n\t\t\t},\n\t\t\terror: function(){\n\t\t\t\talert('Lỗi load dữ liệu unit (40)!');\n\t\t\t}\n\t\t});\n\t\t\n\t}", "getRoles() {\n return this.#fetchAdvanced(this.#getRolesURL()).then((responseJSON) => {\n let roles = Role.fromJSON(responseJSON);\n // console.info(roles);\n return new Promise(function (resolve) {\n resolve(roles);\n })\n })\n }", "loadAddons() {\n\t\t// load muti select dropdowns\n\t\t$(`#${this.formId} #roleIds`).multiSelect({\n\t\t\tselectableHeader: \"All Roles\",\n\t\t\tselectionHeader: \"Selected Roles\",\n\t\t});\n\n\t\tRequest.send(\"/api/roles\", \"GET\")\n\t\t\t.then((response) => {\n\t\t\t\tlet roles = response.data;\n\t\t\t\t// populate muti selects\n\t\t\t\troles.forEach((role) => {\n\t\t\t\t\t$(`#${this.formId} #roleIds`).multiSelect(\"addOption\", {\n\t\t\t\t\t\tvalue: role.id,\n\t\t\t\t\t\ttext: role.name,\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t})\n\t\t\t.catch((e) => {\n\t\t\t\tconsole.log(e);\n\t\t\t});\n\t}", "roleList() {\n return this.http.get(this.url + '/cesco/getRole');\n }", "function setRoles() {\n var roleIDs = \"\";\n \n $('.btn-role.btn-primary').each(function() {\n roleIDs = roleIDs + $(this).val() + \",\";\n });\n \n $('#role_ids').val(roleIDs);\n }", "getRoles() {}", "function getRoleSettings() {\n // get the roles\n $.get('./getRoles', function (result) {\n // create the header\n $(\"#mainContent\").append(\"<h2>Role Selection Settings</h2>\");\n\n // get the length of the object array\n let length = result.length;\n\n // get the role details\n let text = \"<table><tr><th>Version</th>\"\n + \"<th>Role</th><th>Abilities</th></tr>\";\n\n // loop through the array object displaying each role\n for (let count = 0; count < length; count++) {\n // get the role ID\n let id = \"Role_\" + (result[count].role_id > 9 ? result[count].role_id : '0' + result[count].role_id);\n // return a row with the role details to the text variable\n text += \"<tr onclick='toggleSetting(this)' id='\" + id + \"' class='roles \"\n + (localStorage.pandemicRoles.indexOf(id) != -1 ? \"checked\" : \"unchecked\")\n + \" Version_\" + result[count].version_id + \"'><td>\" + result[count].version + \"</td><td>\"\n + result[count].role + \"</td><td>\"\n + result[count].abilities + \"</td></tr>\";\n }\n\n // close the table\n text += \"</table>\";\n\n // set the table as the content of the mainContent div\n $(\"#mainContent\").append(text);\n });\n}", "function getRoles() {\n return $http.get('/api/roles').then(function(data) { return data.data; });\n }", "function onAssignRole() {\n // Get user id of the user who will get assigned to a role\n const userId = document.getElementById(\"role_assign_user_id_text_field\").value;\n\n // Get role id which will be assigned to the user\n const roleId = document.getElementById(\"role_assign_role_id_text_field\").value;\n\n // Use Ajax to create new role assignment in the database\n $.ajax({\n url: \"https://localhost:5001/api/v1/Role/addRoleToAUser\",\n type: \"POST\",\n data: JSON.stringify({\n \"RoleId\": roleId,\n \"UserId\": userId\n }),\n contentType: \"application/json\",\n dataType: \"json\",\n cache: false,\n success: function (responseData) {\n $('.list-of-work-item').append(`\n <div class=\"work-item\" id=\"\">\n <p class=\"title\" id=\"\"></p>\n <p class=\"detail\">User: ${responseData.user.fullName}</p>\n <p class=\"detail\">Role: ${responseData.role.roleName}</p>\n <div class=\"options\">\n <button class=\"button\" id=\"\">Remove</button>\n </div>\n </div>\n `)\n }\n })\n}", "getRoleList() {\n return this.http.get(this.url + '/cesco/getuserRole', this.httpOptions);\n }", "function assignRoleToMemberInDB(){\n let assignedRole = $(\"#roleSelect\").val().trim();\n let servletParameters = {\"member_id\" : $(\"#memberResultId\").val(), \"role_id\" : getRoleId(assignedRole)};\n console.log(servletParameters);\n $.ajax({\n url: 'AssignRole',\n dataType: 'text',\n type: 'POST',\n data: servletParameters,\n success: function( data ){\n let response = JSON.parse(data);\n console.log(response)\n handleAssignRoleToMemberResponse(response);\n },\n error: function( jqXhr, textStatus, errorThrown ){\n console.log( errorThrown );\n }\n });\n}", "function loadUserRolesByCompany(ID, callback, errorHandler) {\n // Declare a Deferred construct to return from this method\n var promise;\n var targetUrl;\n // Declare a resonse structure to return from this object\n var response = new Response();\n\n var token = sessionStorage.getItem(tokenKey);\n var headers = {};\n if (token) {\n headers.Authorization = 'Bearer ' + token;\n }\n\n // Empy any current options from the Project Select control\n// emptyProjectList();\n\n // Add a blank option to the combo box\n// $('<option></option>').appendTo($('#projectList'));\n\n targetUrl = UserUrl + \"/UserRoles\" + \"?CompanyID=\" + ID;\n\n promise = $.ajax({\n url: targetUrl,\n type: 'GET',\n dataType: 'json',\n headers: headers,\n success: function (data, txtStatus, xhr) {\n callback(data);\n },\n error: function (xhr, textStatus, errorThrown) {\n response.status = xhr.status;\n errorHandler(response,903);\n }\n });\n\n return (promise);\n }", "function populateMasterRoles(data) {\n var index = 0;\n\n // empty any current records\n $(\"#orgRoleList\").empty();\n\n while (index < data.length) {\n // Declare a local Role object\n var role = new Role();\n role.ID = data[index].ID;\n role.Name = data[index].Name;\n role.Description = data[index].Description;\n // Add the current role to the referece role array\n referenceRoles.push(role);\n // Add a list item for the organization.\n // Add a check box for each master role\n $(\"<DIV id='rowContainer\" + data[index].ID + \"'</DIV>\").addClass(\"sectionSpan\").css({ 'background-color': 'transparent' }).appendTo(\"#orgRoleList\");\n $(\"<input type='checkbox' id='role\" + data[index].ID + \"'/>\").val(data[index].ID).css({ 'margin-left': '15px' }).prop('disabled', true).on(\"click\", activateRole).appendTo(\"#rowContainer\" + data[index].ID);\n $(\"<label for='role\" + data[index].ID + \"'>\" + data[index].Name + \" </label>\").addClass(\"sectionLabel\").css({'margin-left':'10px','font-weight':'normal','width':'200px'}).appendTo(\"#rowContainer\" + data[index].ID);\n\n // Add teh overhead content\n $(\"<DIV id='overheadContainer\" + data[index].ID + \"'></DIV>\").addClass(\"overheadContainer\").appendTo(\"#rowContainer\" + data[index].ID);\n $(\"<p></p>\").text(\"Overhead:\").css({'float':'left'}).appendTo(\"#overheadContainer\" + data[index].ID);\n $(\"<input type='text' id='txtOverhead\" + data[index].ID + \"'</input>\").addClass(\"overheadTextBox\").appendTo(\"#overheadContainer\" + data[index].ID);\n // apply an input validation event handler on the text box\n $(\"#txtOverhead\" + data[index].ID).focusout({ param1: data[index].ID },validateOverhead);\n index++;\n }\n $(\"#masterRoleList\").change(masterRoleSelectHandler);\n if (editMode == \"new\") {\n updateReady.resolve();\n }\n }", "async function selectRole(id, parentId) {\n isLoading = true;\n setLoadingOverlay();\n\n var role = document.getElementById(\"tooltip-role-sel\").value;\n var user = usersDisplayed[usersDisplayed.findIndex(elem => elem.id == id)];\n\n const response = await fetch('https://www.googleapis.com/admin/directory/v1/groups/' \n + parentId + '/members/' + user.primaryEmail,\n {\n headers: {\n 'authorization': `Bearer ` + token,\n 'Content-Type': 'application/json'\n },\n method: 'PUT',\n body: JSON.stringify({\"email\": user.primaryEmail, \"role\": role.toUpperCase()})\n })\n const json = await response.json();\n console.log(json)\n\n if (response.status == 200) {\n isLoading = false;\n setLoadingOverlay();\n if (window.location.href.split(\"pages/\")[1].split(\".html\")[0] == \"groups\") {\n onloadGroupsPage();\n } else if (window.location.href.split(\"pages/\")[1].split(\".html\")[0] == \"groupdetails\") {\n onloadGroupDetails();\n }\n }\n}", "function onRoleChange(controller, item_ids, role_ids, method){\n\n $.ajax({\n type: method,\n url: '/refinery/' + controller + '.json',\n data: {\n item_ids : item_ids,\n role_ids : role_ids\n },\n dataType: 'json',\n beforeSend: function(){\n $('#loading').show();\n },\n complete: function(msg) {\n $('#loading').hide();\n },\n error: function(msg) {\n alert(\"Well that didn't work!\\n\" + msg);\n }\n });\n\n }", "getRoles() {\n\t return request.get({ uri: process.env.AUTHZ_API_URL + '/roles', json: true, headers: { 'Authorization': 'Bearer ' + this.accessToken } })\n\t .then(res => {\n\t log(chalk.green.bold('Roles:'), `Loaded ${res.roles.length} roles.`);\n\t return res.roles;\n\t });\n\t}", "getUserRoles() {}", "function requestAccountRole(hostname, accountID, userID) {\n var accountRole = \"\";\n $.ajax({\n type: \"get\",\n url: 'https://' + hostname + '/services/v5/account_summaries?fields=id,permissions,owner_id,admin_ids,is_enterprise_guest',\n success: function(result) {\n result.forEach(function(item, index) {\n if (item.id === accountID) {\n if (item.owner_id == userID) {\n accountRole = \"Owner\"\n } else if ($.inArray(userID, item.admin_ids) !== -1) {\n accountRole = \"Admin\"\n } else if (item.is_enterprise_guest === true) {\n accountRole = \"Enterprise Guest\"\n } else {\n accountRole = \"Member\"\n }\n if (item.permissions.includes(\"project_creation\")) {\n accountRole += \" & Project Creator\";\n }\n }\n });\n $(\".metrics\").append('<tr><th>Account Role</th><th>' + accountRole + '</th></tr>')\n }\n });\n}", "function getUsers() {\n var xhttp;\n var userArray;\n xhttp = new XMLHttpRequest();\n xhttp.onreadystatechange = function() {\n \n if (this.readyState == 4 && this.status == 200) {\n userArray = JSON.parse(this.responseText);\n \n var select = document.getElementById(\"currentUsersList\");\n removeAllChildNodes(select);\n \n //alex attempt\n var select2 = document.getElementById(\"currentUsersList2\");\n removeAllChildNodes(select2);\n //end\n \n var select3 = document.getElementById(\"currentUsersList3\");\n removeAllChildNodes(select3);\n \n for( var i=0; i< userArray.length; i++) {\n var option = document.createElement(\"option\");\n option.value = userArray[i].id;\n option.innerHTML = userArray[i].role;\n select.appendChild(option);\n }\n \n //alex attempt\n for( var i=0; i< userArray.length; i++) {\n var option = document.createElement(\"option\");\n option.value = userArray[i].id;\n option.innerHTML = userArray[i].role;\n select2.appendChild(option);\n }//end\n \n for( var i=0; i< userArray.length; i++) {\n var option = document.createElement(\"option\");\n option.value = userArray[i].id;\n option.innerHTML = userArray[i].role;\n select3.appendChild(option);\n }\n \n var item = document.getElementById(\"availableUsers\");\n \n removeAllChildNodes(item);\n item.appendChild(select);\n \n //alex attempt start\n var item2 = document.getElementById(\"availableUsers2\");\n removeAllChildNodes(item2);\n item2.appendChild(select2);\n //attempt end\n \n var item3 = document.getElementById(\"availableUsers3\");\n removeAllChildNodes(item3);\n item3.appendChild(select3);\n }\n };\n \n xhttp.open(\"GET\", \"http://localhost:8080/api/user/allUserRetrieval\", true);\n xhttp.send();\n }", "function roles() {\n connection.query(\"SELECT * from roles;\", function (err, results){\n if (err) throw err;\n console.table(results)\n runSearch();\n });\n }", "function role() {\r\n var x = document.createElement('div');\r\n var node = document.createElement(\"LI\");\r\n node.setAttribute('class', 'base');\r\n\r\n var dsElem = document.createElement('INPUT');\r\n dsElem.setAttribute('type', 'textarea');\r\n dsElem.setAttribute('class', 'tiedElem');\r\n var dsID = \"dsTied_\" + String(getRole());\r\n dsElem.setAttribute('id', dsID);\r\n\r\n var dsLabel = document.createElement('label');\r\n dsLabel.htmlFor = dsID;\r\n dsLabel.innerHTML = 'DataSource: ';\r\n\r\n node.appendChild(dsLabel);\r\n node.appendChild(dsElem);\r\n\r\n var roleName = \"role_\" + String(getRole());\r\n x.setAttribute(\"id\", roleName);\r\n x.setAttribute('class', 'roles');\r\n\r\n var label = document.createElement('label');\r\n label.htmlFor = roleName;\r\n label.innerHTML = \"Type: \";\r\n\r\n x.innerHTML = \"<select name='' style='margin-right: 5px; display: none' class='roles' id='\" + String(roleName) + \"'>\"\r\n + '<option>A</option>'\r\n +'<option>N</option>'\r\n +'<option>C</option>'\r\n +'</select>';\r\n\r\n while(x.firstChild) {\r\n node.appendChild(x.firstChild);\r\n }\r\n\r\n var min = document.createElement(\"INPUT\");\r\n min.setAttribute('type', 'number');\r\n\r\n var minID = 'minRole_' + getRole();\r\n min.setAttribute('id', minID);\r\n min.setAttribute('min', '0');\r\n min.setAttribute('max', '10');\r\n min.setAttribute('style', 'margin-right: 5px; display: none');\r\n min.setAttribute('label', 'Min:');\r\n min.setAttribute('class', 'minMax');\r\n\r\n var label_1 = document.createElement('label');\r\n label_1.htmlFor = minID;\r\n label_1.innerHTML = \"Min: \";\r\n\r\n var max = document.createElement(\"INPUT\");\r\n max.setAttribute('type', 'number');\r\n var maxID = 'maxRole_' + getRole();\r\n max.setAttribute('id', maxID);\r\n max.setAttribute('class', 'minMax');\r\n\r\n max.setAttribute('min', '0');\r\n max.setAttribute('max', '10');\r\n max.setAttribute('style', 'margin-right: 5px; display: none');\r\n max.setAttribute('label', 'Max:');\r\n\r\n var label_2 = document.createElement('label');\r\n label_2.htmlFor = maxID;\r\n label_2.innerHTML = \"Max: \";\r\n\r\n addRole();\r\n\r\n var y = document.createElement('button');\r\n y.setAttribute('content', 'test content');\r\n y.setAttribute('class', 'properties');\r\n y.innerHTML = 'Edit';\r\n\r\n var z = document.createElement('button');\r\n z.setAttribute('content', 'test content');\r\n z.setAttribute('class', 'delete');\r\n z.innerHTML = 'x';\r\n\r\n node.appendChild(min);\r\n\r\n node.appendChild(max);\r\n\r\n node.appendChild(y);\r\n node.appendChild(z);\r\n\r\n var tabID = String(getSelectedTabId());\r\n\r\n var tabContID = document.getElementById(tabID).children[0].id;\r\n\r\n document.getElementById(tabContID).appendChild(node);\r\n\r\n var active = $(\"#tabs .ui-tabs-panel:visible\").attr(\"id\");\r\n\r\n var test = document.getElementById(active).getElementsByClassName(\"fieldClass\");\r\n\r\n if(test.length > 0) {\r\n remake();\r\n }\r\n}", "function requestProjectRole(hostname){\n $.ajax({\n type: \"get\",\n url: 'https://' + hostname + '/services/v5/projects/' + window.location.pathname.split('/').pop() + '?fields=capabilities,account_id,id,memberships(role,person)',\n success: function(result) {\n result.memberships.forEach(function(item, index) {\n if (item.person.id == userId) {\n projectRole = item.role;\n }\n });\n $(\".metrics\").append('<tr><th>Project Role</th><th>' + projectRole + '</th></tr>');\n }\n });\n}", "getUserRoleList() {\r\n this.sql_getUserRoleList = `SELECT id, role FROM user_role_tb ORDER BY id ASC`;\r\n return this.apdao.all(this.sql_getUserRoleList);\r\n }", "function updateRolesToPermission($event) {\r\n $event.preventDefault();\r\n\r\n var selectedRoles = [];\r\n selectedRole = $('select#permissionRoleSelect').val();\r\n selectedRole.forEach(function(element, index) {\r\n selectedRoles[index] = {\r\n 'role_id': element\r\n };\r\n });\r\n\r\n \r\n var permissionData = {\r\n 'roles': selectedRoles\r\n };\r\n\r\n if (permission_id) {\r\n \t $(\"#loading\").css(\"display\", \"block\");\r\n $.ajax({\r\n url: './role/permission/' + permission_id,\r\n contentType: 'application/json',\r\n dataType: \"json\",\r\n type: 'PUT',\r\n data: JSON.stringify(permissionData)\r\n }).then(function(response) {\r\n $(\"#permission-details\").html('');\r\n permissionService.getPermissions().then(function(allPermissions) {\r\n if (allPermissions && allPermissions.length) { \r\n permissionService.showAllPermissions(allPermissions);\r\n }\r\n });\r\n common.infoMessage('Role assigned successfully.', 'success');\r\n }, function(error) {\r\n \t$(\"#loading\").css(\"display\", \"none\");\r\n common.infoMessage(error.responseJSON['error-auxiliary-message'], 'error');\r\n });\r\n }\r\n }", "async function viewRoles () {\n \n try {\n const roles = await connection.getAllRoles();\n console.table(roles);\n } catch(err) {\n console.log(err); \n }\n \n \n employeeChoices();\n \n }", "function setAssignments()\n{\t\n\tvar uid = document.getElementById(\"select-user\").value;\n\tvar role_id = document.getElementById(\"select-role\").value;\n\tvar httpRequest = new XMLHttpRequest();\n\tconsole.log(uid);\n\tconsole.log(role_id);\n\n\t//var turl = \"http://localhost/final/data.php\";\n\thttpRequest.open('POST', turl, true);\n\tvar params = \"action=setAssignment&uid=\"+uid+\"&role_id=\"+role_id;\n\thttpRequest.setRequestHeader(\"Content-type\", \"application/x-www-form-urlencoded\");\n\thttpRequest.send(params);\t\n\thttpRequest.onreadystatechange = function()\n\t{\n\t\tif(httpRequest.readyState == 4)\n\t\t{\n\t\t\tif(httpRequest.status == 200)\n\t\t\t{\n\t\t\t\t//listAssignments();\n\t\t\t\tconsole.log(httpRequest.responseText);\n\t\t\t\t//console.log(\"Roles set!\");\n\t\t\t\tlistAssignments();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tconsole.log(\"Sets failed!\");\n\t\t\t}\n\n\t\t}\n\t};\n\n}", "function changeAuthorizationLevelBasedOnUserId(optionSelected, userId) {\n if (optionSelected != 3) {\n $.ajax({\n type : \"GET\",\n url : \"changeUserRole\",\n dataType : \"html\",\n data : {\n \"userId\" : userId,\n \"authLevel\" : optionSelected\n },\n success : function(response) {\n $('#role' + userId).text($('#select' + userId + ' option:selected').text().toUpperCase());\n },\n error : function(data) {\n $(\"#messages\").html(\"Error changing the user role, please try again later.\");\n }\n });\n }\n}", "function GetAllRoles() {\n userService.getAllRoles().success(function (data) {\n $scope.roleList = data;\n }).error(function (error) {\n $scope.HideCancelModal = true;\n $('#PopUpModal').modal('toggle');\n $scope.ALERTCONTENT = {\n Title: Constants.PopupTitleError,\n MethodCase: \"NULL\",\n Type: \"error\"\n }\n $scope.MESSAGE = Constants.ErrorRoleData;\n });\n }", "function populate_roles_fields () {\n // Populate the fields from the roles table\n for (var i in roles) {\n var current_role = new Array();\n $('.roles-row').each(function(index) {\n user = $(this).attr('user_id');\n if ($('#checkbox-'+roles[i]+'-'+user).is(':checked')) {\n current_role.push(user);\n };\n });\n $('#'+roles[i]).val(current_role.join(','));\n $('#list-'+roles[i]+' span').html(current_role.join(', '));\n }\n}", "function populate_roles_fields () {\n // Populate the fields from the roles table\n for (var i in roles) {\n var current_role = new Array();\n $('.roles-row').each(function(index) {\n user = $(this).attr('user_id');\n if ($('#checkbox-'+roles[i]+'-'+user).is(':checked')) {\n current_role.push(user);\n };\n });\n $('#'+roles[i]).val(current_role.join(','));\n $('#list-'+roles[i]+' span').html(current_role.join(', '));\n }\n}", "function showRoleSelectDiv(roleid) {\n\tdocument.getElementById('status').style.display='inline';\n\tjQuery.ajax({\n\t\tmethod: 'POST',\n\t\turl: 'index.php?action=PickListAjax&module=PickList&file=ShowRoleSelect&roleid='+roleid\n\t}).done(function (response) {\n\t\tif (response) {\n\t\t\tdocument.getElementById('status').style.display='none';\n\t\t\tvar node = document.getElementById('assignPicklistTable');\n\t\t\tvar tr = document.createElement('tr');\n\t\t\tvar td = document.createElement('td');\n\t\t\ttd.innerHTML = response;\n\t\t\ttr.appendChild(td);\n\t\t\tdocument.getElementById('addRolesLink').style.display = 'none';\n\t\t\tvar tbody = getChildByTagName(node, 'tbody');\n\t\t\tvar sibling = getChildByTagName(tbody, 'tr');\n\t\t\tsibling = getSiblingByTagName(sibling, 'tr');\n\t\t\ttbody.insertBefore(tr, sibling);\n\t\t\tplaceAtCenter(document.getElementById('actiondiv'));\n\t\t}\n\t});\n}", "function Get_DraftSORApproverList(DBName,DraftSORDocEntry) {\n $(\"[id$=ddlCACM] option\").remove();\n try {\n $.ajax({\n url: \"SalesOrderOTP.aspx/Get_DraftSORApproverList\",\n data: \"{'DBName':'\" + DBName + \"','DraftSORDocEntry':'\" +DraftSORDocEntry +\"'} \",\n dataType: \"json\",\n type: \"POST\",\n contentType: \"application/json; charset=utf-8\",\n success: function (value) {\n debugger;\n var jData = eval('(' + value.d + ')');\n debugger;\n\n for (var i = 0; i < jData.table.rows.length; i++) {\n $(\"[id$=ddlCACM]\").append($(\"<option></option>\").val(jData.table.rows[i].email).html(jData.table.rows[i].approver));\n }\n },\n error: function (response) {\n alert(response.responseText);\n },\n failure: function (response) {\n alert(response.responseText);\n }\n });\n\n }\n catch (Error) {\n alert(Error);\n }\n }", "getRoles()\n {\n return this.loading\n .then((db) => db('role')\n .select()\n .map((role) =>\n {\n // We store the permissions as a JSON string, because that's way easier than doing crazy joins.\n // And this doesn't add much overhead at all.\n role.permissions = JSON.parse(role.permissions);\n return role;\n }));\n }", "function allRoles()\n{\n\tvar role_area = document.getElementById(\"roles\");\n\tif (role_area != null) \n\t{\t\n\t\trole_area.innerHTML = \"\";\n\t\tvar httpRequest = new XMLHttpRequest();\n\t\t//var turl = \"http://localhost/final/data.php\";\n\t\thttpRequest.open('POST', turl, true);\n\t\tvar params = \"action=allRoles\";\n\t\thttpRequest.setRequestHeader(\"Content-type\", \"application/x-www-form-urlencoded\");\n\t\thttpRequest.send(params);\t\n\t\thttpRequest.onreadystatechange = function()\n\t\t{\n\t\t\tif(httpRequest.readyState == 4)\n\t\t\t{\n\t\t\t\tif(httpRequest.status == 200)\n\t\t\t\t{\n\t\t\t\t\tconsole.log(\"all roles good!\");\n\t\t\t\t\tvar json = JSON.parse(httpRequest.responseText);\n\t\t\t\t\t//console.log(httpRequest.responseText);\n\t\t\t\t\tfor(var i = 0; i < json.length; i++) \n\t\t\t\t\t{\n\t\t\t\t\t var obj = json[i]; \n\t\t\t\t\t\tvar elem = document.createElement(\"div\");\n\t\t\t\t\t\tvar loc_name = \"<textarea id='name-\"+obj['id'] +\"'>\"+obj['name']+\"</textarea>\";\n\t\t\t\t\t\tvar\tdel_btn = \"<button onClick=deleteRole(\"+obj['id']+\")>Delete</button>\";\n\t\t\t\t\t\tvar content_html = \"<div class='error'>\"+ loc_name + del_btn +\"</div>\";\t\n\t\t\t\t\t\telem.id = \"errors\";\n\t\t\t\t\t\telem.innerHTML = content_html;\n\t\t\t\t\t\trole_area.appendChild(elem);\n\t\t\t\t\t //console.log(obj);\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tconsole.log(\"All bad!\");\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n}", "setAuthManagementRoleList() {\n axios.get('/home/admin/auth/role/list').then(res => {\n if (res.data.success) {\n this.response.authManagement.role.list = res.data.data\n } else {\n Swal.fire('', res.data.message, 'error')\n }\n }).catch(err => {\n Swal.fire('', err.toString(), 'error')\n })\n }", "function getUserRoles() {\n APIUtils.getAccountServiceRoles()\n .then((roles) => {\n $scope.userRoles = roles;\n })\n .catch((error) => {\n console.log(JSON.stringify(error));\n $scope.userRoles = null;\n })\n }", "function getStudents() {\r\n\t\t var levelid=$( \"#qps-level option:selected\").val();\r\n\t\t var roleid=\"3\"; //student role\r\n\t\t var _csrf = $(\"input[name='_csrf']\").val();\r\n\t\t \r\n\t\t var params={\"ownerid\":userId,\"roleid\":roleid,\"levelid\":levelid,\"_csrf\":_csrf};\r\n\t\t \r\n\t\t\t$.post('resteasy/qb/questionpaper/getUsersByLevelRoleOwner',params)\r\n\t\t\t .done(function(students){\r\n showStudents(students);\r\n\t\t\t })\r\n\t\t\t .fail(function(){\r\n\t\t var msg='<p>There was some problem getting student list. Please retry after some time.</p>';\r\n\t\t $('#examErrorMessage > p').remove();\r\n\t\t $(msg).appendTo('#examErrorMessage');\t \t \t \r\n\t\t \t document.getElementById('error').style.display='block';\t\t\t\t\r\n\t\t\t});\t\t \r\n\t }", "function getReviewer() {\n $.ajax({\n url: $('input[name=base_url]').val() + '/reviewer/' + $('select[name=group_id]').val(),\n type: 'get',\n cache: false,\n dataType: 'json',\n success: function(data) {\n \n },\n complete: function (jqXHR, textStatus){\n var obj = jQuery.parseJSON(jqXHR.responseText);\n \n $('select[name=reviewer_id]').empty();\n\t\t\t$('select[name=reviewer_id]').append('<option value=\"0\" selected disabled>Reviewer</option>');\n\t\t\t\n\t\t\t// iterate reviewer\n\t\t\t$.each (obj, function (key, val) {\n\t\t\t\tif ($('input[name=text_reviewer_id]').val() == val['id']) {\n\t\t\t\t\t$('select[name=reviewer_id]').append('<option value=\"' + val['id'] + '\" selected>' + val['reviewer_name'] + '</option>');\n\t\t\t\t} else {\n\t\t\t\t\t$('select[name=reviewer_id]').append('<option value=\"' + val['id'] + '\">' + val['reviewer_name'] + '</option>');\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\t$('.js-loading-bar').modal('hide');\n\t\t\t$('.progress-bar').removeClass('animate');\n },\n error: function(xhr, textStatus, thrownError) {\n console.log('Something went to wrong.Please Try again later...' + thrownError);\n }\n });\n \n}", "function askForRole() {\n var gameID = getGameID();\n console.log(\"asking server for role with game ID: \", gameID);\n var getURL = globalURL + \"addPlayer/\" + gameID + \"/\" + getParticipantID();\n $.ajax({\n\ttype: 'GET',\n\turl: getURL,\n\tsuccess: function(data) {\n\t console.log(\"Received role:\", data);\n\t participantRole = data;\n\t}, \n\terror: function(error) {\n\t console.log(\"Defaulting to villager\");\n\t participantRole = \"Villager\";\n\t}});\n}", "adminRole(ctx, payload) {\n return new Promise((resolve, reject) => {\n axios\n .get(\"admin/roles\", { params: payload })\n .then(response => {\n resolve(response);\n })\n .catch(error => {\n reject(error);\n });\n });\n }", "function renderMenu(){\n $.get(\"/api/masterPlants/\", function(mData){\n for (var i=0; i<mData.length; i++){\n var newOption = $(\"<option>\").text(mData[i].common_name).addClass(\"drop-down\");\n newOption.attr({\"value\":mData[i].id});\n $(\"#drop-down\").append(newOption);\n } \n })\n }", "function addRoleHandler() {\n var newRole;\n\n newRole = new Role();\n // add the currently selected Role to the org role collection\n newRole.ID = $(\"#masterRoleList\").find('option:selected').val();\n newRole.Name = $(\"#masterRoleList\").find('option:selected').text();\n newRole.Description = \"\";\n // Check to make sure the selected role is not already active for the current organization\n if ($.inArray(newRole.Name, roleNameCollection) == -1) {\n roleIDCollection.push(newRole.ID);\n roleNameCollection.push(newRole.Name);\n roleCollection.push(newRole);\n // Add the current role to the new roles collection. This will be used to save changes\n newRoles.push(newRole);\n $(\"<option value='\" + newRole.ID + \"'></option>\").text(newRole.Name).appendTo($('#orgRoleList'));\n }\n else {\n alert(\"The current selected role has already been added and cannot be added again\");\n }\n }", "function addRoleHandler() {\n var newRole;\n\n newRole = new Role();\n // add the currently selected Role to the org role collection\n newRole.ID = $(\"#masterRoleList\").find('option:selected').val();\n newRole.Name = $(\"#masterRoleList\").find('option:selected').text();\n newRole.Description = \"\";\n // Check to make sure the selected role is not already active for the current organization\n if ($.inArray(newRole.Name, roleNameCollection) == -1) {\n roleIDCollection.push(newRole.ID);\n roleNameCollection.push(newRole.Name);\n roleCollection.push(newRole);\n // Add the current role to the new roles collection. This will be used to save changes\n newRoles.push(newRole);\n $(\"<option value='\" + newRole.ID + \"'></option>\").text(newRole.Name).appendTo($('#orgRoleList'));\n }\n else {\n alert(\"The current selected role has already been added and cannot be added again\");\n }\n }", "showUsersList() {\n const users = this.props.usersList;\n const selectRoles = ROLES;\n return (\n <tbody> {\n users.map((user) => {\n const isCurrentUser = this.checkIfCurrentUser(user._id, this.props.userId),\n userRole = Roles.getRolesForUser(user._id);\n return (\n <tr key={user._id}>\n <td>{user.emails[0].address}</td>\n <td><select className=\"form-control\" value={userRole[0]} onChange={(event) => {\n this.handleRoleChange({_id: user._id, role: event.target.value});\n }}>\n {selectRoles.map((role) => (<option key={role} value={role}>{role}</option>))}</select>\n </td>\n </tr>\n )\n })\n } </tbody>\n )\n }", "function roleProps(myValue) {\r\n\r\n document.getElementById(\"list_3\").innerHTML = \"\";\r\n\r\n var node = document.createElement(\"LI\");\r\n var x = document.createTextNode(\"Role\");\r\n var el_span = document.createElement('span');\r\n el_span.setAttribute('class', 'propLabel');\r\n\r\n el_span.appendChild(x);\r\n node.appendChild(el_span);\r\n document.getElementById(\"list_3\").appendChild(node);\r\n\r\n var active = $(\"#tabs .ui-tabs-panel:visible\").attr(\"id\");\r\n\r\n var temp = document.getElementById(active).getElementsByTagName(\"li\");\r\n var elems = new Array();\r\n\r\n var finalEntries = new Array();\r\n\r\n for(j = 0; j < temp.length; j++) {\r\n elems[j] = temp[j].cloneNode(true);\r\n }\r\n\r\n for(var i = 0; i < elems.length; i++) {\r\n var temp = elems[i].firstChild;\r\n\r\n if(temp.className == \"DS\") {\r\n finalEntries.push(elems[i]);\r\n }\r\n }\r\n\r\n var node4 = document.createElement(\"LI\");\r\n var menu = document.createElement('div');\r\n menu.innerHTML = \"<select id='dsOptions' size='6'>\"\r\n + \"</select>\";\r\n\r\n while(menu.firstChild) {\r\n node4.appendChild(menu.firstChild);\r\n }\r\n\r\n var submit = document.createElement('INPUT');\r\n submit.setAttribute('type', 'button');\r\n submit.value = \"Connect To\";\r\n\r\n submit.addEventListener('click', function() {\r\n var e = document.getElementById(\"dsOptions\");\r\n var str = e.options[e.selectedIndex].text;\r\n\r\n document.getElementById(myValue).parentNode.children[1].value = str;\r\n });\r\n\r\n node4.appendChild(submit);\r\n\r\n document.getElementById(\"list_3\").appendChild(node4);\r\n\r\n for(i = 0; i < finalEntries.length; i++) {\r\n var enter = document.createElement(\"option\");\r\n enter.text = String(finalEntries[i].firstChild.id);\r\n document.getElementById('dsOptions').add(enter);\r\n }\r\n}", "function loadRolesByOrganization(OrgID, callback,errorHandler) {\n var promise;\n // declare a local variable to store the constructed URL\n var targetUrl;\n // Declare a resonse structure to return from this object\n var response = new Response();\n\n var token = sessionStorage.getItem(tokenKey);\n var headers = {};\n if (token) {\n headers.Authorization = 'Bearer ' + token;\n }\n\n // Hard code this to the UnitDimension service for now\n targetUrl = RoleUrl + \"/AllRoles/?Id=\" + OrgID;\n // Make the asynchronous AJAX call to get the data\n promise = $.ajax({\n url: targetUrl,\n type: 'GET',\n dataType: 'json',\n headers: headers,\n }).done(function (data, txtStatus, jqXHR) {\n // alert(\"Insert Success\");\n callback(data);\n }).fail(function (xhr, textStatus, errorThrown) {\n response.status = xhr.status;\n errorHandler(response,1203);\n });\n\n return(promise);\n }", "async getRoles () {\n return [\n {\n id: 'viewer',\n name: 'Viewer',\n permissions: [\n 'view',\n ],\n },\n {\n id: 'operator',\n name: 'Operator',\n permissions: [\n 'view',\n 'operate',\n ],\n },\n {\n id: 'admin',\n name: 'Admin',\n permissions: [\n 'view',\n 'operate',\n 'administrate',\n ],\n },\n ]\n }", "function getCustomerData(pRoleId) {\n $.ajax({\n url: `${G_BASE_URL}/customers/roles/${pRoleId}`,\n method: 'GET',\n dataType: 'json',\n success: renderCustomerTable,\n error: (e) => {\n $('#modal-error').modal('show');\n $('#error').text(e.responseText);\n },\n });\n }", "function makeRole() {\n\tlet role = document.createElement(\"p\");\n\tlet roleText = document.createTextNode(\"Role: \");\n\tlet roleSelect = document.createElement(\"select\");\n\troleSelect.setAttribute(\"name\", \"members_role[]\");\n\tlet committeeOption = document.createElement(\"option\");\n\tcommitteeOption.text = \"Committee\";\n\tcommitteeOption.setAttribute(\"value\", \"committee\");\n\troleSelect.appendChild(committeeOption);\n\tlet majorAdvisorOption = document.createElement(\"option\");\n\tmajorAdvisorOption.text = \"Major Advisor\";\n\tmajorAdvisorOption.setAttribute(\"value\", \"major_advisor\");\n\troleSelect.appendChild(majorAdvisorOption);\n\tlet coAdvisorOption = document.createElement(\"option\");\n\tcoAdvisorOption.text = \"Co-Major Advisor\";\n\tcoAdvisorOption.setAttribute(\"value\", \"co_advisor\");\n\troleSelect.appendChild(coAdvisorOption);\n\tlet gcrOption = document.createElement(\"option\");\n\tgcrOption.text = \"GCR\";\n\tgcrOption.setAttribute(\"value\", \"gcr\");\n\troleSelect.appendChild(gcrOption);\n\trole.appendChild(roleText);\n\trole.appendChild(roleSelect);\n\t\n\treturn role;\n}", "function memberNameListChange(selectId, typeOfRoleName){\n\t\tvar postdata = \"tag=cccllevel&clubid=\"+$(\"#\"+selectId).val()+\"&typeofrole=\"+typeOfRoleName;\n\n\t\t$.ajax({\n\t\t\ttype: \"POST\",\n\t\t\turl: \"retrievesimpleassistdata.php\",\n\t\t\tdata: postdata,\n\t\t\tasync: true,\n\t\t\tstatusCode: {\n\t\t\t\t404: function() {\n\t\t\t\t alert('It seems something wrong happens in server side, please contact [email protected] to fix it!!');\n\t\t\t\t}\n\t\t\t},\n\t\t\tsuccess: function(data, textStatus){\n\t\t\t\thandleClubMemberNameChangeAfterReceive(data);\n\t\t\t}\n\t\t});\n\t}", "function getRoles(authToken, callback) {\n const options = {\n url: config.rolesService.url + \"/roles\",\n method: 'GET',\n headers: {\n 'AuthToken': authToken\n }\n }\n request.get(options, function(err, response, body) {\n if (err) {\n console.log(`${getTimeString()}::getRoles | Error: ${err} | Response: ${response && response.statusCode} | Body ${body} | AuthToken: ${authToken}`)\n callback(err, null)\n } else {\n console.log(`${getTimeString()}::getRoles | InProgress: Unpacking response | Response: ${response && response.statusCode} | Body ${body}`)\n let userInfo = JSON.parse(body)\n console.log(`${getTimeString()}::getRoles | Success | UserInfo: ${userInfo}`)\n let roles = userInfo.roles\n let username = userInfo.user.username\n let name = userInfo.user.name\n callback(null, username, name, roles)\n }\n })\n}", "function addPrivileges(roleId) {\n //fetching role id\n var superadmin\n if ($('.superAdmin' + roleId).prop('checked') == true) {\n superadmin = '1';\n } else {\n superadmin = '0';\n }\n //fetching role add permission \n var add = new Array();\n $(\"input[name ='add[]']:checked\").each(function () {\n add.push($(this).val());\n });\n\n //fetching role edit permission\n var edit = new Array();\n $(\"input[name ='edit[]']:checked\").each(function () {\n edit.push($(this).val());\n });\n\n //fetching role delete permission\n var del = new Array();\n $(\"input[name ='delete[]']:checked\").each(function () {\n del.push($(this).val());\n });\n\n $.ajax({\n url: baseurl + \"resturant/staffrole/add\",\n type: \"post\",\n data: {roleId: roleId, add: add, edit: edit, del: del, superadmin: superadmin},\n success: function (result) {\n //alert(result);\n var data = $.parseJSON(result);\n if (data.error == true) {\n $('.massage_box' + roleId).html('<div class=\"alert alert-danger alert-dismissable\"><button aria-hidden=\"true\" data-dismiss=\"alert\" class=\"close\" type=\"button\"> × </button>' + data.success_message + '</div>');\n setTimeout(function () {\n $('.massage_box' + roleId).fadeOut();\n window.location.reload();\n }, 4000);\n } else if (data.error == 'permission') {\n $('.massage_box' + roleId).html('<div class=\"alert alert-danger alert-dismissable\"><button aria-hidden=\"true\" data-dismiss=\"alert\" class=\"close\" type=\"button\"> × </button>' + data.success_message + '</div>');\n } else {\n $('.massage_box' + roleId).html('<div class=\"alert alert-success alert-dismissable\"><button aria-hidden=\"true\" data-dismiss=\"alert\" class=\"close\" type=\"button\"> × </button>' + data.success_message + '</div>');\n setTimeout(function () {\n $('.massage_box' + roleId).fadeOut();\n window.location.reload();\n }, 4000);\n }\n }\n });\n}", "function _getAllRoles(callback)\n{\n\n Role.getAllRoles(function (data2)\n {\n callback(data2)\n })\n\n}", "function roleClick(el) {\n //console.log(el.val());\n updateUserRole(el);\n}", "function populate_roles_checkboxes() {\n // Populate all the roles checkboxes from the hidden fields.\n for (var i in roles) {\n var users = $('#'+roles[i]).val().split(',');\n for (var j in users) {\n $('#checkbox-'+roles[i]+'-'+users[j]).attr('checked', 'checked');\n }\n }\n}", "function populate_roles_checkboxes() {\n // Populate all the roles checkboxes from the hidden fields.\n for (var i in roles) {\n var users = $('#'+roles[i]).val().split(',');\n for (var j in users) {\n $('#checkbox-'+roles[i]+'-'+users[j]).attr('checked', 'checked');\n }\n }\n}", "function getOrganizationList() {\n $.get('/d4dMasters/readmasterjsonnew/1', function(data) {\n var str = ' <option value=\"\">Select Organization</option>',\n len = data.length;\n for (var i = 0; i < data.length; i++) {\n str = str + '<option value=\"' + data[i].rowid + '\">' + data[i].orgname + '</option>';\n }\n $('#orgName').html(str);\n })\n}", "function getRoles() {\n const query = \"SELECT * FROM role\";\n return queryDB(query);\n}", "function loadMasterRolesByCompany(CompanyID, callback, errorHandler) {\n // Declare a Deferred construct to return from this method\n var promise;\n var targetUrl;\n // Declare a resonse structure to return from this object\n var response = new Response();\n\n var token = sessionStorage.getItem(tokenKey);\n var headers = {};\n if (token) {\n headers.Authorization = 'Bearer ' + token;\n }\n\n // Empy any current options from the Project Select control\n// emptyProjectList();\n\n // Add a blank option to the combo box\n $('<option></option>').appendTo($('#projectList'));\n\n targetUrl = MasterRoleUrl + \"?CompanyID=\" + CompanyID;\n\n promise = $.ajax({\n url: targetUrl,\n type: 'GET',\n dataType: 'json',\n headers: headers,\n success: function (data, txtStatus, xhr) {\n callback(data);\n },\n error: function (xhr, textStatus, errorThrown) {\n response.status = xhr.status;\n errorHandler(response,503);\n }\n });\n\n return (promise);\n }", "function roleList() {\n return connection.query(\"SELECT id, title FROM roles\");\n}", "function showMasterRoleForm(su_mode, callback) {\n // Declare a local variable to store the query Url\n var targetUrl;\n isSuperUser = su_mode;\n\n updateMasterForm = callback;\n\n // Initialize the orgID value\n orgID = $(\"#orgList\").find('option:selected').val();\n\n\n $(\"<DIV id='form' ></DIV>\").addClass(\"popupForm\").css({ 'width': '650px', 'height': '425px', 'top': '75px', 'left': '100px' }).appendTo('body');\n $(\"<DIV id='header' ></DIV>\").addClass(\"headerCol\").appendTo('#form');\n $(\"<p></p>\").addClass(\"pageHeader\").text('Master Roles').appendTo('#header');\n\n // check for SuperUser Mode\n if (su_mode) {\n // Add the first row containing the Company label and the company combo box box\n $(\"<DIV id='CompanyRowContainer' ></DIV>\").addClass(\"formRow\").css({ 'margin-top': '40px' }).appendTo('#form');\n // Add the name lable and input text box\n $(\"<DIV id='CompanyLabelContainer' ></DIV>\").addClass(\"labelColumn\").appendTo('#CompanyRowContainer');\n $(\"<P>Company</p>\").appendTo('#CompanyLabelContainer');\n $(\"<DIV id='companyInput' ></DIV>\").addClass(\"inputColumn\").css({ 'left': '125px' }).appendTo('#CompanyRowContainer');\n $(\"<SELECT id='formCompanyList' ></SELECT>\").addClass(\"basicComboBox\").appendTo(\"#companyInput\");\n\n $(\"<DIV id='separatorRow' ></DIV>\").addClass(\"formSeparator\").appendTo('#form');\n }\n\n\n\n // Add the first row containing the name input box a\n $(\"<DIV id='FirstRowContainer' ></DIV>\").addClass(\"formRow\").appendTo('#form');\n // Add the name lable and input text box\n $(\"<DIV id='NameLabelContainer' ></DIV>\").addClass(\"labelColumn\").appendTo('#FirstRowContainer');\n $(\"<P>Role</p>\").appendTo('#NameLabelContainer');\n $(\"<DIV id='NameInputContainer' ></DIV>\").addClass(\"inputColumn\").css({'width':'250px'}).appendTo('#FirstRowContainer');\n $(\"<INPUT type='text' id='txtName' ></INPUT>\").addClass(\"basicTextBox\").css({ 'width': '250px' }).on('keyup',roleNameHandler).appendTo(\"#NameInputContainer\");\n $(\"<DIV id='buttonContainer' ></DIV>\").addClass(\"inputColumn\").css({'left':'400px', 'width': '75px' }).appendTo('#FirstRowContainer');\n $(\"<BUTTON id='btnAdd'>Add</BUTTON>\").addClass(\"cellButton\").on('click', saveNewRoleHandler).appendTo(\"#buttonContainer\");\n\n\n // Add the Role list box collection container\n $(\"<DIV id='roleRow' ></DIV>\").addClass(\"formRow\").css({ 'background-color': 'transparent', 'height': '175px', }).appendTo('#form');\n // Add the label\n $(\"<DIV id='roleLabelContainer' ></DIV>\").addClass(\"labelColumn\").appendTo('#roleRow');\n $(\"<P>Master Roles:</p>\").appendTo('#roleLabelContainer');\n $(\"<DIV id='roleInput' ></DIV>\").addClass(\"inputColumn\").css({ 'border': '1px solid', 'height': '175px', 'overflow': 'auto' }).appendTo('#roleRow');\n // Add the dimension list box\n $(\"<div id='orgRoleList' ></div>\").css({ 'width': '400px', 'height': '250px', 'background-color': 'transparent' }).appendTo(\"#roleInput\");\n $(\"<BUTTON id='btnRemove'>Remove</BUTTON>\").addClass(\"cellButton\").css({ 'margin-left': '550px', 'width': '70px' }).on('click', removeRoleHandler).appendTo(\"#roleRow\");\n\n\n\n // Add the navigation bar to the bottom\n $(\"<DIV id='navBar' ></DIV>\").addClass(\"formRow\").css({'height':'25px'}).appendTo('#form');\n $(\"<p id='navParagraph'></p>\").css({ 'text-align': 'center' }).appendTo('#navBar');\n $(\"<button></button>\").addClass(\"cellButton\").text(\"Close\").on(\"click\", closeMasterRoleForm).appendTo(\"#navParagraph\");\n\n // Add a timer bar to track update status\n $(\"<DIV id='timerBarRow' ></DIV>\").addClass(\"formRow\").css({ 'margin-top': '0px'}).appendTo('#form');\n $(\"<DIV id='statusLabelContainer' ></DIV>\").addClass(\"labelColumn\").css({'font-weight':'normal','margin-left':'150px'}).appendTo('#timerBarRow');\n $(\"<DIV>Status</DIV>\").appendTo(\"#statusLabelContainer\");\n $(\"<DIV id='statusDisplayInput' ></DIV>\").addClass(\"inputColumn\").css({'left':'205px','margin-top':'5px'}).appendTo('#timerBarRow');\n $(\"<DIV id='timerBar' ></DIV>\").addClass(\"timerBar\").appendTo(\"#statusDisplayInput\");\n\n\n // Hide the timerBr until the update/save is applied\n $(\"#timerBarRow\").hide();\n // Disabel teh remove button and the add button until they have input\n $(\"#btnRemove\").prop('disabled', true);\n $(\"#btnRemove\").addClass(\"disabledCellButton2\");\n $(\"#btnAdd\").prop('disabled', true);\n $(\"#btnAdd\").addClass(\"disabledCellButton2\");\n\n\n //Check to see if the form is in SuperUSer Mode\n if (isSuperUser) {\n var response = new Response();\n response = loadCompanyData(refreshCompanyComboData, \"\");\n\n }\n else {\n // Load the master roles \n loadMasterRoles(populateMasterRoles, errorHandler);\n\n }\n\n }", "function update_armors() {\n let race_id = $('#race_select').val()\n let class_id = $('#class_select').val()\n let strength = $('#str').val()\n let url = \"/ajax/v1/select_armors/?race_id=\"\n + race_id +\"&class_id=\" + class_id + \"&str=\" + strength;\n $.ajax({\n method: \"GET\",\n url: url,\n dataType: \"json\",\n success: (resp) => {\n $('#armor_select').empty()\n let armor_list = resp.data;\n $.each(armor_list, function (index, armor) {\n $('#armor_select').append($('<option/>', {\n value: armor.id,\n text: armor.name\n }));\n });\n },\n error: (resp) => {\n console.log(resp)\n }\n });\n}", "async function selectRole() {\n let roles = await db.chooseRole();\n for (var i = 0; i < roles.length; i++) {\n roleArray.push(roles[i].title);\n }\n}", "getRoles() {\n var _this43 = this;\n\n return _asyncToGenerator(function* () {\n var data = yield _this43.getData(\"/roles\");\n if (data.statusCode < 400) {\n return data.response;\n } else {\n alert(data.statusCode.concat(' - ').concat(data.statusText));\n }\n })();\n }", "function submittedByAndSmartFormsDropdowns()\n{\n\tvar memberId = document.getElementById(\"member_name\").value;\n\tvar requestType = document.getElementById(\"SmartFormProjectType\").value;\n\t\n\t$.ajax({\n\t\turl: 'list_admin_and_forms',\n\t\ttype: 'GET',\n\t\tdata: {\n\t\t\tmember_id : memberId,\n\t\t\trequest_type : requestType\n\t\t},\n\t\terror: function(){\n\t\t\talert('Did not work');\n\t\t},\n\t\tsuccess: function(data){\n\t\t\t$(\"#ajax-dropdown-container\").html(data);\n\t\t}\n\t});\n}", "function getMenuYear() {\n $.ajax({\n type: \"GET\",\n url: $('#site-url').val() + \"/MDACeilingServlet\",\n data: {option: $('#reset-menu').val()},\n dataType: \"json\",\n cache: false,\n async: false,\n success: menuYearReturnValues,\n error: function () {\n toastr[\"error\"](\"No record selected!\", \"Menu Year Selection Failed!!!\");\n }\n });\n}", "function getSubcontractors() {\n\t$.ajax({\n\t\ttype: 'POST',\n\t\turl: 'Project',\n\t\tdata: {\n\t\t\t'domain': 'project',\n\t\t\t'action': 'getSubcontractors',\n\t\t}, complete: function (data) {\n\t\t\tconsole.log(\"RESPONSE JSON FOR getSubcontractors() = \",data.responseJSON);\n\t\t\tif (data.responseJSON) {\n\t\t\t\tsubcontractors = data.responseJSON;\n\t\t\t\tfillSubcontractorDropdown();\n\t\t\t\tconsole.log(\"SUBCONTRACTOR NAMES = \", subcontractors);\n\t\t\t}\n\t\t}\n\t\t\n\t});\t\n}", "function LoadAllSystemUsersForDropDown()\n{\n \n $.ajax({\n url: '/SystemUserDirectory/GetAllUsers',\n type: 'post',\n contentType: 'application/json',\n async: false,\n success: function (inputParam) {\n\n\n BindUsersForDropDown(inputParam);\n\n }\n\n });\n\n}", "function adminViewUserList(url){\n var method = \"GET\";\n var httpRequest = createHttpRequest(method, url);\n\n httpRequest.onreadystatechange = function(){\n if (httpRequest.readyState == 4 && httpRequest.status == 200) {\n var httpResponse = JSON.parse(httpRequest.response);\n var userViewSelect = document.getElementById(\"userViewSelect\");\n\n // Remove old entries, if any\n var length = userViewSelect.options.length;\n for (i = 0; i < length; i++) {\n userViewSelect.options[0] = null;\n }\n // Create default entry\n var defaultOption = document.createElement('option');\n defaultOption.text = \"Select the Resource\";\n defaultOption.disabled = true;\n defaultOption.selected = true;\n userViewSelect.appendChild(defaultOption);\n\n // Create other entries based on data\n outerloop:\n for (var key in httpResponse) {\n innerloop:\n for (var subkey in httpResponse[key]) {\n var options = document.createElement('option');\n if (subkey == \"firstName\") {\n options.value = httpResponse[key]['id'];\n options.innerHTML = httpResponse[key][subkey];\n userViewSelect.appendChild(options);\n break innerloop;\n }\n }\n }\n\n }\n }\n httpRequest.onerror = onError;\n sendHttpRequest(httpRequest, method, url, \"application/json\", null);\n}", "function loadActiveRolesByProject(OrgID, callback,errorHandler) {\n var promise;\n // declare a local variable to store the constructed URL\n var targetUrl;\n // Declare a resonse structure to return from this object\n var response = new Response();\n\n var token = sessionStorage.getItem(tokenKey);\n var headers = {};\n if (token) {\n headers.Authorization = 'Bearer ' + token;\n }\n\n // Hard code this to the UnitDimension service for now\n // TBD - This is hardcoded to user ID 1 until USer ID is removed from this signature since it is not needed\n targetUrl = RoleUrl + \"/ActiveRoles/?OrganizationID=\" +OrgID;\n // Make the asynchronous AJAX call to get the data\n promise = $.ajax({\n url: targetUrl,\n type: 'GET',\n dataType: 'json',\n headers: headers,\n }).done(function (data, txtStatus, jqXHR) {\n // alert(\"Insert Success\");\n callback(data);\n }).fail(function (xhr, textStatus, errorThrown) {\n response.status = xhr.sttus;\n errorHandler(response,1202);\n });\n\n return (promise);\n }", "function get_customer_list(user_id) {\n //login user id\n var url = base_url + 'customers';\n $.ajax({\n url: url,\n type: 'post',\n dataType: 'json',\n data: {\n user_id: user_id\n },\n success: function (response) {\n console.log(response);\n if (response.status == 'success') {\n var customer_list = '<option value=\"\">--select--</option>';\n if (response.data.length > 0) {\n $.each(response.data, function (key, value) {\n customer_list += '<option value=\"' + value.id + '\">' + value.display_name + '</option>';\n });\n $(\"#customer-list\").html(customer_list);\n }\n else {\n $(\"#customer-list\").html(customer_list);\n }\n\n\n }\n\n }\n });\n} //end function customer list", "function getUserIdListFull(){\r\n\t\t\t\t\r\n\t\t\t\tvar option = '<option value=\"\" disabled selected>Please Select</option>';\r\n\t\t\t\tvar optHtml = '<option value=\"\" disabled selected>Please Select</option>';\r\n\t\t\t\t$.axs(\"../usermanagement/getUserIdListFull.htm\", { \r\n\t \t \t\"companyId\" : \"\"\r\n\t\t\t\t}, function(data) {// console.log(data);\r\n\t\t\t\tfor(var i=0; i<data.length;i++){\r\n\t\t\t\t\tvar update_account_state = data[i].account_state;\r\n\t\t\t\t\tvar update_user_Id=data[i].loginId;\r\n\t\t\t\t\tvar update_id=data[i].id;\r\n\t\t\t\t\toption += \"<option values=\"+data[i].id+\" value=\"+data[i].id+\"-\"+data[i].roletypeid+\"-\"+data[i].companyid+\">\"+data[i].loginId+\"</option>\";\r\n\t\t\t\t\t\r\n\t\t\t\t\toptHtml += \"<option value=\"+data[i].id+\">\"+data[i].account_state+\"</option>\";\r\n\t\t\t\t\t}\r\n\t\t\t\t$('#updateuserid').html(option);\r\n\t\t\t\t//$('#updateaccountstate').html(optHtml);\r\n\t\t\t\t}, \"post\");\r\n\t\t\t}" ]
[ "0.7696604", "0.76254886", "0.7573151", "0.7380626", "0.73712444", "0.7306547", "0.7224069", "0.7114847", "0.7094175", "0.7090697", "0.7025095", "0.69665056", "0.6868839", "0.68439126", "0.6810113", "0.68028665", "0.68014115", "0.6794497", "0.6732222", "0.6713366", "0.67092055", "0.65814584", "0.65692973", "0.64990455", "0.64894", "0.6442418", "0.6421987", "0.6420024", "0.6419405", "0.6403046", "0.64015806", "0.6400011", "0.63873005", "0.63344353", "0.63149", "0.6303702", "0.62948906", "0.6285411", "0.62648964", "0.6260071", "0.624593", "0.624215", "0.6209152", "0.6159555", "0.6145279", "0.61445814", "0.61218727", "0.61172765", "0.6115181", "0.61089987", "0.6097617", "0.6093744", "0.6089756", "0.6078529", "0.6068866", "0.6051721", "0.60301745", "0.60301745", "0.6017488", "0.6011751", "0.6007406", "0.5997352", "0.5997022", "0.5996677", "0.59906554", "0.5978617", "0.5965309", "0.5958624", "0.59482825", "0.59478194", "0.59478194", "0.5927852", "0.5923712", "0.59209204", "0.5911525", "0.5897496", "0.58877814", "0.58843255", "0.58792347", "0.58748496", "0.58690745", "0.5864725", "0.5853851", "0.5853851", "0.5848636", "0.58458376", "0.5844525", "0.58440787", "0.58381516", "0.5835434", "0.582579", "0.58143055", "0.5811515", "0.58048743", "0.58043694", "0.5788441", "0.5779494", "0.5779143", "0.57711077", "0.5763892" ]
0.779096
0
When the user clicks on the button, toggle between hiding and showing the dropdown content
function myFunction() { document.getElementById("myDropdown").classList.toggle("show"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dropDownShowClick(){\n document.getElementById(\"forDropDown\").style.display=\"block\";\n document.getElementById(\"dropDownShowBtn\").style.display=\"none\";\n document.getElementById(\"dropDownHideBtn\").style.display=\"block\";\n}", "function btn_show() {\n document.getElementById(\"dropdown-content\").classList.toggle(\"show\");\n}", "function mybutton() {\n document.getElementById(\"myDropdown\").classList.toggle(\"show\");\n }", "function showDropdown(btn) {\n var str = '',\n id = '';\n // $common.hideFbPageList();\n $('.dropdown, .select-list').hide();\n $('.dropdown')\n .parents('li:not(' + btn + ')').removeClass('on')\n .children('.on:not(' + btn + ')').removeClass('on');\n $(btn).toggleClass('on');\n str = $(btn).attr('id');\n if (str.search('btn') === 0) {\n // slice(4) for btn-xxx\n str = $(btn).attr('id').slice(4);\n }\n id = '#' + str + '-dropdown';\n if ($(btn).hasClass('on')) {\n $(id).show();\n } else {\n $(id).hide();\n }\n}", "function dropdown() {\n document.getElementById(\"all-versions\").classList.toggle(\"show\");\n}", "function dropdownFunc() {\n document.getElementById(\"infoDrop\").classList.toggle(\"show\");\n }", "function dropupToggle() {\n\tdocument.getElementById(\"myDropup\").classList.toggle(\"show\");\n\tdocument.getElementById(\"myDropupOS\").style.display = \"block\";\n}", "function toggleSizeDropdown(){\n let sizeDropdown = document.getElementById(\"sizeDropdown\");\n let colorDropdown = document.getElementById(\"colorDropdown\");\n if(sizeDropdown.style.visibility == \"visible\"){\n sizeDropdown.style.visibility = \"hidden\";\n }\n else{\n colorDropdown.style.visibility = \"hidden\";\n sizeDropdown.style.visibility = \"visible\";\n }\n}", "function myButton() {\r\n document.getElementById(\"mydropdown\").classList.toggle(\"show\");\r\n}", "function toggleOptions() {\n if(options.style.display === \"none\") {\n options.style.display = \"block\";\n toggle.innerHTML = \"Hide Options\";\n } else {\n options.style.display = \"none\";\n toggle.innerHTML = \"Show Options\";\n }\n}", "function desplegable() {\n document.getElementById(\"myDropdown\").classList.toggle(\"show\");\n}", "function dropdownFunction() {\n $(\"#myDropdown\").toggleClass(\"hidden flexbox\");\n $(\".men-icon\").toggleClass(\"no-display\");\n}", "toggle() {\n this.setState({\n dropdownOpen: !this.state.dropdownOpen\n });\n }", "function dropdownToggle() {\n document.getElementById(\"ProjectDropdown\").classList.toggle(\"show\");\n}", "function drop() {\n document.getElementById(\"myDropdown\").classList.toggle(\"show\");\n }", "onToggleDropdown() {\n\t\tif(this.containerDropdownElement.className.indexOf(\"show\") == -1) {\n\t\t\tthis.containerDropdownElement.className += \" show\";\n\t\t} else {\n\t\t\tthis.containerDropdownElement.className = this.containerDropdownElement.className.replace(\" show\", \"\");\n\t\t}\n\t}", "function toggleDropdown() {\n if (document.querySelector(\".dropdown\") !== null) {\n let aDropdownButtonElements =\n document.querySelectorAll(\".dropdown__button\");\n /* let aDropdownListElements = document.querySelectorAll(\n \".dropdown-list-container\"\n ); */\n aDropdownButtonElements.forEach((eButton) => {\n eButton.addEventListener(\"click\", () => {\n //Reset all dialog boxes\n\n // aDropdownListElements.forEach((eList) => {\n // if (eButton.dataset.buttonid === eList.dataset.listid) {\n // eList.classList.toggle(\"dropdown-list-container--hidden\");\n // }\n // });\n\n //----------- REFACTORED VERSION ------------//\n document\n .querySelector(`[data-listid='${eButton.dataset.buttonid}']`)\n .classList.toggle(\"dropdown-list-container--hidden\");\n });\n });\n }\n}", "function toggleQuestionDropdown() {\n // if the dropdown is disabled and the user presses on the dropdown\n if(partyIsOpen == false) {\n\n // show the dropdown and sets partyIsOpen to true\n questionPartyDropdown.style.display = \"block\";\n partyIsOpen = true;\n } else {\n\n // if the dropdown is enabled and the user presses on the dropdown, disable the dropdown and sets partyIsOpen back to false\n questionPartyDropdown.style.display = \"none\";\n partyIsOpen = false;\n }\n}", "function dropDown() {\n\tdocument.getElementById( \"dropdown\" ).classList.toggle( \"show\" );\n}", "function showDropdown() {\n document.getElementById(\"myDrop\").classList.toggle(\"show\");\n}", "function dropdown_menu_clicked() {\n if(document.getElementById('menu_dropdown_content').classList.contains('show'))\n \tdocument.getElementById('menu_dropdown_content').classList.remove('show');\n else\n \tdocument.getElementById('menu_dropdown_content').classList.add('show');\n}", "function showMenu() {\n $('.dropbtn').click(function () {\n console.log('clicked');\n $('#myDropdown').toggle();\n })\n}", "function dropdown() {\r\n document.getElementById(\"myDropdown\").classList.toggle(\"show\");\r\n}", "function dropdown() {\n document.getElementById(\"myDropdown\").classList.toggle(\"show\");\n}", "function dropdownToggle() {\n document.getElementById(\"myDropdown\").classList.toggle(\"show\");\n}", "function showDropdown() {\n\t$('.dropdown-toggle').click(function(){\n\t\tvar dropdown = $(this).parent().find('.m-dropdown-menu');\n\t\tif( dropdown.css('display') == 'none' )\n\t\t\tdropdown.show();\n\t\telse\n\t\t\tdropdown.hide();\n\n\t\t// clicks out the dropdown\n\t $('body').click(function(event){\n\t \tif(!$(event.target).is('.m-dropdown-menu a')) {\n\t \t\t$(this).find('.m-dropdown-menu').hide();\n\t \t}\n\t });\n\t\tevent.stopPropagation();\n\t});\n}", "function toggleDropdown() {\n document.getElementById(\"myDropdown\").classList.toggle(\"show\");\n}", "function toggleDropdown(element) {\t\n\t\tif (hasClass(element,\"hidden\")) {\n\t\t\tshowOneDropdown(element);\n\t\t} else {\n\t\t\taddClass(element,\"hidden\");\n\t\t}\n\t}", "function openViewDropdown() {\n document.getElementById(\"viewDropdown\").classList.toggle(\"show\");\n}", "function dropDown() {\n document.getElementById(\"myDropdown\").classList.toggle(\"show\");\n}", "function dropFunction() {\n document.getElementById(\"myDropdown\").classList.toggle(\"show\");\n}", "function dropdownMenu() {\n\tdocument.getElementById(\"dropDownMenu\").classList.toggle(\"show\");\n}", "function myFunction() {\n \t\tdocument.getElementById(\"myDropdown\").classList.toggle(\"show\");\n\t\t}", "function myFunction() {\n\t\t\t\tdocument.getElementById(\"myDropdown\").classList.toggle(\"show\");\n\t\t\t\t}", "function dropdown(){\n document.getElementById(\"myDropdown\").classList.toggle(\"show\");\n}", "function dropdownFunction() {\n document.getElementById(\"myDropdown\").classList.toggle(\"show\");\n}", "function dropdownTeam() {\n document.getElementById('myDropdown-team').classList.toggle('show');\n}", "function dropdown() {\n glumacNameContainer.classList.toggle(\"show\");\n\n if (arrow.classList.contains('fa-arrow-down')) {\n arrow.classList.remove('fa-arrow-down');\n arrow.classList.add('fa-arrow-up');\n } else {\n arrow.classList.add('fa-arrow-down');\n }\n}", "function dropdown_menu() {\n let x = document.getElementById(\"mobile_id\");\n if (x.style.display === \"block\") {\n x.style.display = \"none\";\n } else {\n x.style.display = \"block\";\n }\n}", "function dropFunction() {\n document.getElementById(\"myDropdown\").classList.toggle(\"show\");\n}", "function DropDown() {\n document.getElementById(\"dropdowmenu\").classList.toggle(\"show\");\n}", "function drop_toggle() {\n\tdocument.getElementById(\"peekaboo_nav_list\").classList.toggle(\"show\");\n}", "function dropit(){\n document.getElementById(\"dropOptions\").classList.toggle(\"show\");\n}", "function navButton() {\n document.getElementById(\"myDropdown\").classList.toggle(\"show\");\n}", "onToggleDropdown() {\n if (this.containerDropdownElement.className.indexOf('show') === -1) {\n this.containerDropdownElement.className += ' show';\n } else {\n const className = this.containerDropdownElement.className.replace(' show', '');\n\n this.containerDropdownElement.className = className;\n }\n }", "toggle(event) {\n this.setState({\n dropdownOpen: !this.state.dropdownOpen\n });\n }", "function toggle() {\n console.log(\"toggle\");\n document.getElementById(\"myDropdown\").classList.toggle(\"show\");\n}", "function myDropdown(){\n document.getElementById(\"myDropdown\").classList.toggle(\"show\");\n}", "function dropBox() {\n\tconst drop_btn = document.querySelector(\".drop-btn\");\n\tconst menu_wrapper = document.querySelector(\".combo-box\");\n\tconst icon = document.querySelector(\"#settings-icon\");\n\n\tdrop_btn.onclick = () => {\n\t\tmenu_wrapper.classList.toggle(\"show\");\n\t\ticon.classList.toggle(\"show\");\n\t};\n}", "showDropdown(){\n this.setState({isDropdownVisible:true});\n }", "function toggleOption(){\n\tif(optionsContainer.visible){\n\t\toptionsContainer.visible = false;\n\t}else{\n\t\toptionsContainer.visible = true;\n\t}\n}", "myFunction() {\n const dropdown = document.querySelector(\"#myDropdown\");\n dropdown.classList.toggle(\"show\");\n }", "function dropDown() {\n\t\t$navButton = $('.navbar-toggler');\n\t\t$navButton.on('click', () => {\n\t\t\t$('#navbarTogglerDemo03').toggle('collapse');\n\t\t});\n\t}", "function desplegar() {\n document.getElementById(\"dropdown\").style.display = \"block\";\n}", "function toggleDropdown(dropdown) {\n document.getElementById(dropdown).classList.toggle(\"show\");\n}", "function dropDown() {\n document.getElementById(\"playerDropdown\").classList.toggle(\"show\");\n}", "function myFunction() {\n document.getElementById(\"myDropdown\").classList.toggle(\"show\");\n }", "function userDropdown() {\n document.getElementById(\"user_dropdown\").classList.toggle(\"show\");\n}", "function homeDropdown() {\n\t\tdocument.getElementById(\"myDropdown\").classList.toggle(\"show\");\n\t}", "function myFunction() {\n\tdocument.getElementById(\"myDropdown\").classList.toggle(\"show\");\n }", "function myFunction() {\n \tdocument.getElementById(\"myDropdown\").classList.toggle(\"show\");\n\t}", "function dropmenu() {\n document.getElementById(\"myDropdown\").classList.toggle(\"show\");\n}", "function ddButton() {\n $('#fuel').click(function(e) {\n e.preventDefault();\n if ($('#dropdownContent').hasClass(\"show\")) {\n $('#dropdownContent').removeClass('show');\n $('#dropdownContent').addClass('calc-dropdown-content');\n } else {\n $('#dropdownContent').addClass('show');\n $('#dropdownContent').removeClass('calc-dropdown-content');\n }\n })\n $('.calc-dropdown').mouseleave(function() {\n $('#dropdownContent').removeClass('show');\n $('#dropdownContent').addClass('calc-dropdown-content');\n })\n}", "function toggleDropdown(){\n\n dropdownItems.classList.toggle('dropdownShow');\n dropdownPijltje.classList.toggle('draaiPijl')\n}", "function myFunction() {\n document.getElementById(\"myDropdown\").classList.toggle(\"show\");\n }", "function myFunction() {\n document.getElementById(\"myDropdown\").classList.toggle(\"show\");\n }", "function myFunction() {\n document.getElementById(\"myDropdown\").classList.toggle(\"show\");\n }", "function myFunction() {\n document.getElementById(\"myDropdown\").classList.toggle(\"show\");\n }", "function myFunction() {\n document.getElementById(\"myDropdown\").classList.toggle(\"show\");\n }", "function myFunction() {\n document.getElementById(\"myDropdown\").classList.toggle(\"show\");\n }", "function myFunction() {\n document.getElementById(\"myDropdown\").classList.toggle(\"show\");\n }", "function dropDown(){\n var _dropDown = $('.drop-down');\n if ( _dropDown.hasClass('hide') ) {\n _dropDown.removeClass('hide').addClass('show');\n } else {\n _dropDown.removeClass('show').addClass('hide');\n }\n}", "function myFunction() {\n var change = document.getElementById(\"toggle\");\n if (change.innerHTML == \"Filter ON\"){ \n change.innerHTML = \"Filter OFF\";\n unfilter()\n }\n else{ \n document.getElementById(\"myDropdown\").classList.toggle(\"show\");\n }\n }", "function Info_Function() {\n\t\tdocument.getElementById(\"Info_myDropdown\").classList.toggle(\"show\");\n\t}", "function menuOptions() {\r\n document.getElementById(\"myDropdown\").classList.toggle(\"show\");\r\n}", "function setToggle(dropBool) {\n if(dropBool == \"true\") {\n\tdocument.getElementById(\"advSearch\").className=\"collapse in\";\n }\n dropIconToggle();\n}", "function toggleDropdown() { \n document.querySelector(\"#my-dropdown\").classList.add(\"show\"); \n}", "function showMenu() {\n document.getElementById(\"myDropdown\").classList.toggle(\"show\");\n}", "onToggleLanguagesDropdown() {\n $('#select-languages').on('click', function () {\n $(this).siblings('#dropdown-languages').toggleClass('show')\n });\n }", "function toggleEditingMenu(state) {\n\t\tif (state) {\n\t\t\telements.controls.dropdown.show();\n\t\t\telements.controls.add.hide();\n\t\t\telements.controls.remove.hide();\t\n\t\t\telements.controls.reset.hide();\n\t\t} else {\n\t\t\telements.controls.dropdown.hide();\n\t\t\telements.controls.add.show();\n\t\t\telements.controls.remove.show();\n\t\t\telements.controls.reset.show();\n\t\t}\n\t}", "function myFunction() {\n document.getElementById(\"myDropdown\").classList.toggle(\"show\");\n \n}", "function menuDrop() {\n document.getElementById(\"myDropdown\").classList.toggle(\"show\");\n}", "function toggleDropdownButton() {\n if ($(this).is('.active')) {\n $(this).removeClass('active');\n } else {\n $(this).addClass('active');\n }\n}", "function dropIconToggle() {\n if(dropBool) {\n\tdropBool = false;\n\tdocument.getElementById(\"dropDiv\").innerHTML=\n\t 'Advanced Search <i class=\"icon-chevron-down\" data-toggle=\"collapse\"'\n\t\t+ ' data-target=\"#advSearch\"></i>';\n } else {\n\tdropBool = true;\n\tdocument.getElementById(\"dropDiv\").innerHTML=\n\t 'Advanced Search <i class=\"icon-chevron-up\" data-toggle=\"collapse\"'\n\t\t+ ' data-target=\"#advSearch\"></i>';\n }\n}", "function myFunction() {\n    document.getElementById(\"myDropdown\").classList.toggle(\"show\");\n}", "function dropDownParticipant() {\n document.getElementById(\"participantDropdown\").classList.toggle(\"show\");\n}", "function myFunction() {\n\tdocument.getElementById(\"myDropdown\").classList.toggle(\"show\");\n}", "function toggleDropdownMenu() {\n if (dropdownToggleState == false) {\n\n dropdownMenu.style.display = 'block';\n dropdownMenu.style.opacity = '1';\n\n userIcon.classList.toggle('active');\n\n dropdownToggleState = true;\n\n }\n else {\n\n dropdownMenu.style.opacity = '0';\n dropdownMenu.style.display = 'none';\n\n userIcon.classList.toggle('active');\n \n dropdownToggleState = false;\n\n }\n}", "function myFunction() {\n document.getElementById(\"myDropdown\").classList.toggle(\"show\");\n}", "function myFunction() {\n document.getElementById(\"myDropdown\").classList.toggle(\"show\");\n}", "function myFunction() {\n document.getElementById(\"myDropdown\").classList.toggle(\"show\");\n}", "function myFunction() {\n document.getElementById(\"myDropdown\").classList.toggle(\"show\");\n}", "function myFunction() {\n document.getElementById(\"myDropdown\").classList.toggle(\"show\");\n}", "function myFunction() {\n document.getElementById(\"myDropdown\").classList.toggle(\"show\");\n}", "function myFunction() {\n document.getElementById(\"myDropdown\").classList.toggle(\"show\");\n}", "function myFunction() {\n document.getElementById(\"myDropdown\").classList.toggle(\"show\");\n}", "function myFunction() {\n document.getElementById(\"myDropdown\").classList.toggle(\"show\");\n}", "function myFunction() {\n document.getElementById('myDropdown').classList.toggle('show');\n}" ]
[ "0.78093", "0.76717645", "0.74911606", "0.73892653", "0.7350426", "0.7345268", "0.73321265", "0.72640365", "0.7261712", "0.72435963", "0.72117734", "0.721041", "0.7174757", "0.71715814", "0.71538645", "0.71487767", "0.7144623", "0.71222985", "0.7102956", "0.70976174", "0.70932704", "0.709162", "0.70854384", "0.7079199", "0.7070173", "0.70621645", "0.7052442", "0.704781", "0.7024054", "0.70104814", "0.7008902", "0.7007775", "0.7003074", "0.700193", "0.69942296", "0.699351", "0.69911724", "0.6986799", "0.6984613", "0.6977359", "0.6967926", "0.696437", "0.6957743", "0.6957047", "0.6940835", "0.69303745", "0.69237226", "0.69086367", "0.69021887", "0.68894106", "0.6876794", "0.6868041", "0.68622", "0.68556404", "0.6845837", "0.6845509", "0.6837945", "0.6836889", "0.68293476", "0.68146104", "0.68117344", "0.68091184", "0.6805779", "0.6804693", "0.68021554", "0.68021554", "0.68021554", "0.68021554", "0.68021554", "0.68021554", "0.68021554", "0.67851526", "0.6775667", "0.6771464", "0.6767519", "0.67662126", "0.6759118", "0.67520505", "0.6748308", "0.67460746", "0.67421204", "0.67286307", "0.67204523", "0.6709493", "0.67076176", "0.6702234", "0.6698252", "0.66801673", "0.66790456", "0.66790456", "0.66790456", "0.66790456", "0.66790456", "0.66790456", "0.66790456", "0.66790456", "0.66790456", "0.6671355" ]
0.66838235
88
makes a function to compare the object values from the specified compare operation callback
function makeCompare (fn) { return function (value, key) { return hasOwn(this, key) && fn(value, this[key]) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeCompare(callback) {\n\t return function(value, key) {\n\t return hasOwn(this, key) && callback(value, this[key]);\n\t };\n\t }", "compare(obj1, obj2) {}", "function compareFunc(a, b) {\n return a - b;\n }", "function createComparisonFunction(propertyName) {\nreturn function(object1, object2){\n var value1 = object1[propertyName];\n var value2 = object2[propertyName];\n\n if (value1 < value2){\n return -1;\n } else if (value1 > value2){\n return 1;\n } else {\n return 0;\n }\n };\n}", "function createComparisonFunction(propertyName){\n\n return function(obj1, obj2){\n var value1 = obj1[propertyName]; //activation object\n var value2 = obj2[propertyName];\n\n if(value1 < value2){\n return -1;\n }else if(value1 > value2){\n return 1;\n }else{\n return 0;\n }\n }\n}", "function wrapCompare(cmp) {\n function wrapped(pair, value) {\n return cmp(pair.first, value);\n }\n return wrapped;\n }", "function getCompare(_, ctx) {\n var k = 'c:' + _.$compare + '_' + _.$order,\n c = array(_.$compare).map(function(_) {\n return (_ && _.$tupleid) ? tupleid : _;\n });\n return ctx.fn[k] || (ctx.fn[k] = compare(c, _.$order));\n }", "function getCompare(_, ctx) {\n var k = 'c:' + _.$compare + '_' + _.$order,\n c = (0,vega_util__WEBPACK_IMPORTED_MODULE_3__.array)(_.$compare).map(function(_) {\n return (_ && _.$tupleid) ? vega_dataflow__WEBPACK_IMPORTED_MODULE_2__.tupleid : _;\n });\n return ctx.fn[k] || (ctx.fn[k] = (0,vega_util__WEBPACK_IMPORTED_MODULE_3__.compare)(c, _.$order));\n}", "function getCompare(_, ctx) {\n var k = 'c:' + _.$compare + '_' + _.$order,\n c = vegaUtil.array(_.$compare).map(function(_) {\n return (_ && _.$tupleid) ? vegaDataflow.tupleid : _;\n });\n return ctx.fn[k] || (ctx.fn[k] = vegaUtil.compare(c, _.$order));\n }", "function getCompare(_, ctx) {\n var k = 'c:' + _.$compare + '_' + _.$order,\n c = Object(__WEBPACK_IMPORTED_MODULE_3_vega_util__[\"g\" /* array */])(_.$compare).map(function(_) {\n return (_ && _.$tupleid) ? __WEBPACK_IMPORTED_MODULE_2_vega_dataflow__[\"n\" /* tupleid */] : _;\n });\n return ctx.fn[k] || (ctx.fn[k] = Object(__WEBPACK_IMPORTED_MODULE_3_vega_util__[\"h\" /* compare */])(c, _.$order));\n}", "function compare(property){\n return function(a,b){\n var value1 = a[property];\n var value2 = b[property];\n return value1 - value2;\n }\n}", "function callbackfn1(val, idx, obj) {\n return val > 10;\n}", "function callbackfn1(val, idx, obj) {\n return val > 10;\n}", "constructor(compare : Function) {\n\t\tthis.compare = compare;\n\t\tthis.list = [];\n\t}", "function compare (expected, actual) {\n return () => {\n deepEqual(expected, actual)\n }\n}", "function callbackfn(val, idx, obj) {\n return val > 10;\n}", "function isObjValsEqual(val0, val1, comparator) {\n if (val0 === val1 || comparator === true) {\n return true;\n }\n if (comparator) {\n return comparator(val0, val1);\n }\n return false;\n }", "function initCompare(compareFunc) {\n if (compareFunc) {\n cmp.isLess = function(a, b) {\n return compareFunc(a, b) < 0;\n }\n cmp.isLessOrEqual = function(a, b) {\n return compareFunc(a, b) <= 0;\n }\n cmp.isGreater = function(a, b) {\n return compareFunc(a, b) > 0;\n }\n cmp.isGreaterOrEqual = function(a, b) {\n return compareFunc(a, b) >= 0;\n }\n cmp.areEqual = function(a, b) {\n return compareFunc(a, b) === 0;\n }\n }\n}", "function objOfMatches(array1, array2, callback) {\n\n}", "function objOfMatches(array1, array2, callback) {\n\n}", "function Compare(object1, object2) {\n\n// test to see if this print statement will actually work, it doesn't seem to\n// console.log(\"Our objects are:\", this);\n\n// define these objects as globalish variables\n \tthis.object1 = object1;\n \tthis.object2 = object2;\n\n// add print statement to verify that these objects were passed in \n \tconsole.log(object1);\n\tconsole.log(object2);\n\n\t// for practice, this is a test just comparing the entire objects\n\tif (object1 === object2); {\n\t\tconsole.log(\"These objects are the same.\");\n\t\t// return true; // => this true statement is not working\n\t}\n\t// else { \n\t// \tconsole.log(\"These objects are not the same.\");\n\t// // \treturn false; // => this false statement is not working \n\t// // maybe look at defining it an adavance like using Compare: true\n\t// }\n\n// iterate through objects keys and values\n// create an if / else statement that compares the two object's keys / value pairs\n\tfor (index = 0; index < object1.length; index++) { \n\t\tconsole.log(object1[index]);\n\n// return true if keys and values match, however, i don't really understand how to do this. :(\n// bring this to office hours, some ideas below\n\t// var keyName = object1[index]\n\t// object1.keys === object2.keys\n\t// compare.hasOwnProperty(key)\n\n// return false if keys and values don't match\n\t}\n}", "function calcMetaDataField_compare(data,params,field)\n{\n var returnVal;\n var target = field.target[0]; // these are always arrays coming in\n var target2 = field.target[1];\n var ltVal = \"Less Than\"; // These are the default values for when no value is entered\n var gtVal = \"Greater Than\";\n var eqVal = \"Equal\";\n\n // go ahead and reassign the targets\n target = normalizeDataItem(data,target)[0];\n target2 = normalizeDataItem(data,target2)[0];\n\n if(field.hasOwnProperty('ltVal')){\n\tltVal = field.ltVal;\n }\n \n if(field.hasOwnProperty('gtVal')){\n\tgtVal = field.gtVal;\n }\n \n if(field.hasOwnProperty('eqVal')){\n\teqVal = field.eqVal;\n }\n \n if(target<target2){\n\treturnVal = ltVal;\n } else if(target>target2){\n\treturnVal = gtVal;\n } else if(target==target2){\n\treturnVal = eqVal;\n } else{\n\treturnVal = null;\n }\n\n return (returnVal);\n}", "function _exec_comparison(ast,context,debug) {\n debug = true;\n var result;\n var args = new Array();\n if(ast.type == \"COMPARISON\"){\n for(i=0;i<ast.sons.length;i++) {\n if(ast.sons[i].type == \"EXPR\")\n args.push(_exec_expr(ast.sons[i], context));\n else if(ast.sons[i].type == \"COMP_OP\")\n args.push(_exec_comp_op(ast.sons[i],context));\n }\n result = ResFuncSet.RES_comparison(args);\n return result;\n }\n }", "function composeComparators(comparatorArray) {\n return function (a, b) {\n for (var i = 0; i < comparatorArray.length; ++i) {\n var compare = comparatorArray[i](a, b);\n\n if (compare !== 0) {\n return compare;\n }\n }\n\n return 0;\n };\n }", "function testCallBackFunction(a,b,callback){\n if(a<10|b<10){\n callback(\"numbres must be greater then 10\");\n return;\n }\n var result=a*b;\n callback(null,result);\n }", "function objFilter(obj, callback) {\n\n}", "function compare(prop, a, b) {\n if (typeof prop === 'function') {\n // expose `compare` to custom function\n return prop(a, b, compare.bind(null, null));\n }\n // compare object values\n if (prop && typeof a === 'object' && typeof b === 'object') {\n return compare(null, get(a, prop), get(b, prop));\n }\n return defaultCompare(a, b);\n}", "function compare(prop, a, b) {\n if (typeof prop === 'function') {\n // expose `compare` to custom function\n return prop(a, b, compare.bind(null, null));\n }\n // compare object values\n if (prop && typeof a === 'object' && typeof b === 'object') {\n return compare(null, get(a, prop), get(b, prop));\n }\n return defaultCompare(a, b);\n}", "function compare (a, b){\n return a > b;\n}", "function compareFunc(a, b) {\n // GameUI.CustomUIConfig().sort_teams_compare_func;\n if (a.round_score < b.round_score) {\n return 1; // [ B, A ]\n } else if (a.round_score > b.round_score) {\n return -1; // [ A, B ]\n } else {\n return 0;\n }\n}", "function compare(val1,val2){\n\treturn val1 - val2;\n}", "walk_values() {\n if (arguments.length < 2) return false;\n if (!this.is_object(arguments[0])) return arguments[0];\n var obj = arguments[0];\n var filter = null;\n var callfunc = null;\n if (arguments.length == 2) \n callfunc = arguments[1];\n if (arguments.length == 3) {\n filter = arguments[1];\n callfunc = arguments[2];\n }\n if ((filter != null) && (!this.is_array(filter))) \n throw 'Invalid filter supplied to utils.walk_values()';\n if (!this.is_function(callfunc)) \n throw 'Invalid callback function supplied to utils.walk_values()';\n for (var key in obj) {\n if (!obj.hasOwnProperty(key))\n continue;\n var val = obj[key];\n if (this.is_object(val) && !this.is_empty(val) && !this.encryption.is_encrypted(val))\n obj[key] = this.walk_values(val, filter, callfunc);\n else \n if ((filter == null) || (filter.includes(key))) \n obj[key] = callfunc(val); \n }\n return obj;\n }", "async walk_values_async() {\n if (arguments.length < 2) return false;\n if (!this.is_object(arguments[0])) return arguments[0];\n var obj = arguments[0];\n var filter = null;\n var callfunc = null;\n if (arguments.length == 2) \n callfunc = arguments[1];\n if (arguments.length == 3) {\n filter = arguments[1];\n callfunc = arguments[2];\n }\n if ((filter != null) && (!this.is_array(filter))) \n throw 'Invalid filter supplied to utils.walk_values()';\n if (!this.is_function(callfunc)) \n throw 'Invalid callback function supplied to utils.walk_values()';\n for (var key in obj) {\n if (!obj.hasOwnProperty(key))\n continue;\n var val = obj[key];\n if (this.is_object(val) && !this.is_empty(val) && !this.encryption.is_encrypted(val))\n obj[key] = await this.walk_values_async(val, filter, callfunc);\n else \n if ((filter == null) || (filter.includes(key))) \n obj[key] = await callfunc(val); \n }\n return obj; \n }", "function compareIt(index) {\n return function(a, b) {\n\n //Gets cellvalue of a and b parameters\n var valA = getCellValue(a, index);\n var valB = getCellValue(b, index);\n\n //Returns conditional operator. Condition + question mark + expression to be executed if condition is true + colon + expression to be executed if condition is false\n //If true return valA minus ValB\n //If false return valA as string compared to ValB\n //Locale is the current usersettings\n return $.isNumeric(valA) && $.isNumeric(valB) ? valA - valB : valA.toString().localeCompare(valB);\n }\n }", "compareBy(key) {\n return function (a, b) {\n if (a[key] < b[key]) return -1;\n if (a[key] > b[key]) return 1;\n return 0;\n };\n }", "compareColValObjs(colObjA, colObjB, sortPayload){\n var returnVal = 0;\n\n //if(this.debug) console.log(colObjA.val + \" : \" + colObjB.val);\n\n // check for null, nulls at end\n if(colObjA.val === null && colObjB.val === null){\n returnVal = 0;\n }\n else if(colObjA.valType != 'boolean' && colObjA.val === null){\n returnVal = -1;\n }\n else if(colObjB.valType != 'boolean' && colObjB.val === null){\n returnVal = 1;\n }\n else if(colObjA.valType == 'moment' && colObjB.valType == 'moment'){\n moDiff = colObjA.val.diff(colObjB.val);\n if(moDiff == 0){\n returnVal = 0;\n }\n else if(moDiff < 0){\n returnVal = -1;\n }\n else if(moDiff > 0){\n returnVal = 1;\n }\n }\n else if (colObjA.valType == 'select' && colObjB.valType == 'select'){\n if(colObjA.valObj && colObjB.valObj){\n this.compareVSOptions(colObjA.valObj, colObjB.valObj, sortPayload);\n }\n else{\n if(colObjA.val == colObjB.val){\n returnVal = 0;\n }\n else if(colObjA.val < colObjB.val){\n returnVal = -1;\n }\n else if(colObjA.val > colObjB.val){\n returnVal = 1;\n }\n }\n }\n /*else if ( (colObjA.valType == 'select2' && colObjB.valType == 'select2') || colObjA.valType == 'autocomplete' && colObjB.valType == 'autocomplete' ){\n if(colObjA.valObj && colObjB.valObj){\n this.compareVSOptions(colObjA.valObj, colObjB.valObj, sortPayload);\n }\n else{\n if(colObjA.val == colObjB.val){\n returnVal = 0;\n }\n else if(colObjA.val < colObjB.val){\n returnVal = -1;\n }\n else if(colObjA.val > colObjB.val){\n returnVal = 1;\n }\n }\n }*/\n else if (colObjA.valType == 'boolean' && colObjB.valType == 'boolean'){\n if(colObjA.val == colObjB.val){\n returnVal = 0;\n }\n else if(colObjA.val && !(colObjB.val)){\n returnVal = 1;\n }\n else if(!(colObjA.val) && colObjB.val){\n returnVal = -1;\n }\n }\n else if (colObjA.valType == colObjB.valType){\n if(colObjA.val == colObjB.val){\n returnVal = 0;\n }\n else if(colObjA.val < colObjB.val){\n returnVal = -1;\n }\n else if(colObjA.val > colObjB.val){\n returnVal = 1;\n }\n }\n // prop types don't match\n else{\n if (this.debug) console.log(\"COMPARING TWO DIFFERENT TYPES - \" + colObjA.valType + ' ? ' + colObjB.valType);\n if(colObjA.valType == 'boolean' && colObjB.valType != 'boolean'){\n returnVal = 1;\n }\n else if(colObjA.valType != 'boolean' && colObjB.valType == 'boolean'){\n returnVal = -1;\n }\n else{\n if(colObjA.val == colObjB.val){\n returnVal = 0;\n }\n else if(colObjA.val < colObjB.val){\n returnVal = -1;\n }\n else if(colObjA.val > colObjB.val){\n returnVal = 1;\n }\n }\n }\n\n return returnVal;\n }", "function comparer(comparerFunction, a, b) {\n\t\treturn comparerFunction(a, b);\n\t}", "function compare_pair(object1,object2)\r\n {\r\n if(object1['age']==object2['age']){\r\n console.log(true);\r\n } \r\n else {\r\n console.log(false);\r\n } \r\n }", "enterComparison(ctx) {\n\t}", "function compare(a,b) {\n return a - b;\n}", "function compare(a,b) {\n return a - b;\n}", "function objOfMatches(array1, array2, callback) {\n const matches = {};\n for (let i = 0; i < array1.length; i++) {\n const key = array1[i];\n const value = array2[i];\n if (value === callback(key)) {\n matches[key] = value;\n }\n }\n return matches;\n}", "function createLessThanFilter(base) {\n // YOUR CODE BELOW HERE //\n return function(value){\n if(base > value){\n return true;\n } else {\n return false;\n }\n };\n \n \n \n // YOUR CODE ABOVE HERE //\n}", "function compare(object_1, object_2) {\n // if the first value of the first object is equal to the first value of the second object or if the second value of the first object is equal to the second value of the second object, then return true \n if (Object.values(object_1)[0] == Object.values(object_2)[0] || Object.values(object_1)[1] == Object.values(object_2)[1]) {\n return true;\n // else return false \n } else {\n return false;\n }\n}", "function compare(a, b) {\n if (a.compare < b.compare) {\n return -1;\n }\n if (a.compare > b.compare) {\n return 1;\n }\n return 0;\n }", "compare() {\n this.props.compare(this.state.compareList)\n }", "function compare(a, b) {\n return a - b;\n }", "function compareToEquals(compareFunction) {\n return function (a, b) {\n return compareFunction(a, b) === 0;\n };\n}", "function compareToEquals(compareFunction) {\n return function (a, b) {\n return compareFunction(a, b) === 0;\n };\n}", "function makeFuncTester(arrOfTests) {\n return function(cb){\n let result = true\n arrOfTests.forEach(arr => result = result && (arr[1] === cb(arr[0])))\n return result\n }\n}", "function compareToEquals(compareFunction) {\n return function (a, b) {\n return compareFunction(a, b) === 0;\n };\n }", "function compareValues(key, order='asc') {\n return function(a, b) {\n if(!a.hasOwnProperty(key) || !b.hasOwnProperty(key)) {\n // property doesn't exist on either object\n return 0;\n }\n \n const varA = (typeof a[key] === 'string') ?\n a[key].toUpperCase() : a[key];\n const varB = (typeof b[key] === 'string') ?\n b[key].toUpperCase() : b[key];\n \n let comparison = 0;\n if (varA < varB) {\n comparison = 1;\n } else if (varA > varB) {\n comparison = -1;\n }\n return (\n (order === 'desc') ? (comparison * -1) : comparison\n );\n };\n }", "function arrayEqualsHandler(callback) {\n\t return function handleArray(val1, val2) {\n\t var left = arrayWrap(val1), right = arrayWrap(val2);\n\t if (left.length !== right.length) return false;\n\t for (var i = 0; i < left.length; i++) {\n\t if (!callback(left[i], right[i])) return false;\n\t }\n\t return true;\n\t };\n\t }", "function arrayEqualsHandler(callback) {\n\t return function handleArray(val1, val2) {\n\t var left = arrayWrap(val1), right = arrayWrap(val2);\n\t if (left.length !== right.length) return false;\n\t for (var i = 0; i < left.length; i++) {\n\t if (!callback(left[i], right[i])) return false;\n\t }\n\t return true;\n\t };\n\t }", "function createFilterComparator(op, rval) {\n\t return op === 'eq' || op === 'ne' ? new FilterEqualityComparator(op === 'eq', rval) : hasOwn(ORDER_COMPARISON_OP_MAP, op) ? new FilterOrderComparator(op, rval) : null;\n\t }", "function gen_op_vfp_cmped()\n{\n gen_opc_ptr.push({func:op_vfp_cmped});\n}", "function gen_op_vfp_cmps()\n{\n gen_opc_ptr.push({func:op_vfp_cmps});\n}", "function arrayEqualsHandler(callback) {\n return function handleArray(val1, val2) {\n var left = arrayWrap(val1), right = arrayWrap(val2);\n if (left.length !== right.length) return false;\n for (var i = 0; i < left.length; i++) {\n if (!callback(left[i], right[i])) return false;\n }\n return true;\n };\n }", "get compareWith() { return this._compareWith; }", "get compareWith() { return this._compareWith; }", "get compareWith() { return this._compareWith; }", "function arrayEqualsHandler(callback) {\n\t\t\t\treturn function handleArray(val1, val2) {\n\t\t\t\t\tvar left = arrayWrap(val1), right = arrayWrap(val2);\n\t\t\t\t\tif (left.length !== right.length) return false;\n\t\t\t\t\tfor (var i = 0; i < left.length; i++) {\n\t\t\t\t\t\tif (!callback(left[i], right[i])) return false;\n\t\t\t\t\t}\n\t\t\t\t\treturn true;\n\t\t\t\t};\n\t\t\t}", "equalHandler() {\n\n if(this.state.numbers[0] === \"\" || this.state.numbers[1] === \"\") {\n return ;\n }\n\n this.props.calculatorApi.calculate(\n this.state.numbers[0],\n this.state.numbers[1],\n this.state.operation,\n (result)=>{\n this.setResult(result) ;\n })\n\n }", "function objOfMatches(array1, array2, callback) {\n let res = {};\n\n for (let i = 0; i < array1.length; i++) {\n if (callback(array1[i]) === array2[i]) {\n res[array1[i]] = array2[i];\n }\n }\n return res;\n}", "function createFilterComparator(op, rval) {\n return op === 'eq' || op === 'ne' ? new FilterEqualityComparator(op === 'eq', rval) : Object(zrender_lib_core_util__WEBPACK_IMPORTED_MODULE_1__[/* hasOwn */ \"q\"])(ORDER_COMPARISON_OP_MAP, op) ? new FilterOrderComparator(op, rval) : null;\n}", "function objOfMatches(array1, array2, callback) {\n return array1.reduce((acc, ele, index) => {\n if (callback(ele) == array2[index]) {\n acc[ele] = array2[index]\n }\n return acc;\n }, {})\n}", "function createGreaterThanFilter(base) {\n // YOUR CODE BELOW HERE //\n // test whether the value is greater than the base\n // return a function\n return function(val){\n if(val > base){\n return true;\n } else{\n return false;\n }\n }\n \n \n // YOUR CODE ABOVE HERE //\n}", "function compare(a, b) {\n return b - a;\n}", "function equals(a, b, callback) {\n\t callback = callback || is;\n\n\t if (!isObject(a) || !isObject(b)) {\n\t return callback(a, b);\n\t }\n\n\t return (every(a, makeCompare(callback), b) &&\n\t every(b, checkProperties, a));\n\t }", "function callbackfn(prevVal, curVal, idx, obj) {\n return (obj.length === 2);\n}", "function compareValues(key, order='asc') {\n return function(a, b) {\n if(!a.hasOwnProperty(key) || !b.hasOwnProperty(key)) {\n // property doesn't exist on either object\n return 0;\n }\n\n const varA = (typeof a[key] === 'string') ?\n a[key].toUpperCase() : a[key];\n const varB = (typeof b[key] === 'string') ?\n b[key].toUpperCase() : b[key];\n\n let comparison = 0;\n if (varA > varB) {\n comparison = 1;\n } else if (varA < varB) {\n comparison = -1;\n }\n return (\n (order === 'desc') ? (comparison * -1) : comparison\n );\n };\n}", "function arrayEqualsHandler(callback) {\n return function handleArray(val1, val2) {\n var left = arrayWrap(val1), right = arrayWrap(val2);\n if (left.length !== right.length) return false;\n for (var i = 0; i < left.length; i++) {\n if (!callback(left[i], right[i])) return false;\n }\n return true;\n };\n }", "function arrayEqualsHandler(callback) {\n return function handleArray(val1, val2) {\n var left = arrayWrap(val1), right = arrayWrap(val2);\n if (left.length !== right.length) return false;\n for (var i = 0; i < left.length; i++) {\n if (!callback(left[i], right[i])) return false;\n }\n return true;\n };\n }", "function arrayEqualsHandler(callback) {\n return function handleArray(val1, val2) {\n var left = arrayWrap(val1), right = arrayWrap(val2);\n if (left.length !== right.length) return false;\n for (var i = 0; i < left.length; i++) {\n if (!callback(left[i], right[i])) return false;\n }\n return true;\n };\n }", "function arrayEqualsHandler(callback) {\n return function handleArray(val1, val2) {\n var left = arrayWrap(val1), right = arrayWrap(val2);\n if (left.length !== right.length) return false;\n for (var i = 0; i < left.length; i++) {\n if (!callback(left[i], right[i])) return false;\n }\n return true;\n };\n }", "function arrayEqualsHandler(callback) {\n return function handleArray(val1, val2) {\n var left = arrayWrap(val1), right = arrayWrap(val2);\n if (left.length !== right.length) return false;\n for (var i = 0; i < left.length; i++) {\n if (!callback(left[i], right[i])) return false;\n }\n return true;\n };\n }", "function arrayEqualsHandler(callback) {\n return function handleArray(val1, val2) {\n var left = arrayWrap(val1), right = arrayWrap(val2);\n if (left.length !== right.length) return false;\n for (var i = 0; i < left.length; i++) {\n if (!callback(left[i], right[i])) return false;\n }\n return true;\n };\n }", "function arrayEqualsHandler(callback) {\n return function handleArray(val1, val2) {\n var left = arrayWrap(val1), right = arrayWrap(val2);\n if (left.length !== right.length) return false;\n for (var i = 0; i < left.length; i++) {\n if (!callback(left[i], right[i])) return false;\n }\n return true;\n };\n }", "function arrayEqualsHandler(callback) {\n return function handleArray(val1, val2) {\n var left = arrayWrap(val1), right = arrayWrap(val2);\n if (left.length !== right.length) return false;\n for (var i = 0; i < left.length; i++) {\n if (!callback(left[i], right[i])) return false;\n }\n return true;\n };\n }", "function arrayEqualsHandler(callback) {\n return function handleArray(val1, val2) {\n var left = arrayWrap(val1), right = arrayWrap(val2);\n if (left.length !== right.length) return false;\n for (var i = 0; i < left.length; i++) {\n if (!callback(left[i], right[i])) return false;\n }\n return true;\n };\n }", "function arrayEqualsHandler(callback) {\n return function handleArray(val1, val2) {\n var left = arrayWrap(val1), right = arrayWrap(val2);\n if (left.length !== right.length) return false;\n for (var i = 0; i < left.length; i++) {\n if (!callback(left[i], right[i])) return false;\n }\n return true;\n };\n }", "function arrayEqualsHandler(callback) {\n return function handleArray(val1, val2) {\n var left = arrayWrap(val1), right = arrayWrap(val2);\n if (left.length !== right.length) return false;\n for (var i = 0; i < left.length; i++) {\n if (!callback(left[i], right[i])) return false;\n }\n return true;\n };\n }", "function arrayEqualsHandler(callback) {\n return function handleArray(val1, val2) {\n var left = arrayWrap(val1), right = arrayWrap(val2);\n if (left.length !== right.length) return false;\n for (var i = 0; i < left.length; i++) {\n if (!callback(left[i], right[i])) return false;\n }\n return true;\n };\n }", "function arrayEqualsHandler(callback) {\n return function handleArray(val1, val2) {\n var left = arrayWrap(val1), right = arrayWrap(val2);\n if (left.length !== right.length) return false;\n for (var i = 0; i < left.length; i++) {\n if (!callback(left[i], right[i])) return false;\n }\n return true;\n };\n }", "function arrayEqualsHandler(callback) {\n return function handleArray(val1, val2) {\n var left = arrayWrap(val1), right = arrayWrap(val2);\n if (left.length !== right.length) return false;\n for (var i = 0; i < left.length; i++) {\n if (!callback(left[i], right[i])) return false;\n }\n return true;\n };\n }", "function arrayEqualsHandler(callback) {\n return function handleArray(val1, val2) {\n var left = arrayWrap(val1), right = arrayWrap(val2);\n if (left.length !== right.length) return false;\n for (var i = 0; i < left.length; i++) {\n if (!callback(left[i], right[i])) return false;\n }\n return true;\n };\n }", "function arrayEqualsHandler(callback) {\n return function handleArray(val1, val2) {\n var left = arrayWrap(val1), right = arrayWrap(val2);\n if (left.length !== right.length) return false;\n for (var i = 0; i < left.length; i++) {\n if (!callback(left[i], right[i])) return false;\n }\n return true;\n };\n }", "function arrayEqualsHandler(callback) {\n return function handleArray(val1, val2) {\n var left = arrayWrap(val1), right = arrayWrap(val2);\n if (left.length !== right.length) return false;\n for (var i = 0; i < left.length; i++) {\n if (!callback(left[i], right[i])) return false;\n }\n return true;\n };\n }", "function arrayEqualsHandler(callback) {\n return function handleArray(val1, val2) {\n var left = arrayWrap(val1), right = arrayWrap(val2);\n if (left.length !== right.length) return false;\n for (var i = 0; i < left.length; i++) {\n if (!callback(left[i], right[i])) return false;\n }\n return true;\n };\n }", "function compareFnAscend(a, b) {\n return a - b;\n }", "function caml_compare (a, b) { return caml_compare_val (a, b, true); }", "function comparer(otherArray) {\n return function (current) {\n return otherArray.filter(function (other) {\n return other.value == current.value && other.display == current.display;\n }).length == 0;\n };\n }", "function compare(x, y) {\n return x - y;\n}", "function arrayEqualsHandler(callback) {\n return function handleArray(val1, val2) {\n var left = arrayWrap(val1), right = arrayWrap(val2);\n if (left.length !== right.length) return false;\n for (var i = 0; i < left.length; i++) {\n if (!callback(left[i], right[i])) return false;\n }\n return true;\n };\n }", "function arrayOpCompare(array1, array2, compare_func, operation_func) {\n\tfor( var i=0 ; i<array1.length ; ++i ) \t{\n\t\tlet found_in_array2 = false;\n\n\t\tfor( var j=0 ; j<array2.length ; ++j ) {\n\t\t\tif( compare_func(array1[i], array2[j]) ) {\n\t\t\t\tfound_in_array2 = true;\n\t\t\t}\n\t\t}\n\n\t\tif( !found_in_array2 ) {\n\t\t\toperation_func(i, array1[i]);\n\t\t}\n\t}\n}", "compareValues(key, order='asc') {\n return function(a, b) {\n if(!a.hasOwnProperty(key) || !b.hasOwnProperty(key)) return 0;\n let comparison = a[key].localeCompare(b[key], undefined, {'numeric': true});\n\n return (\n (order == 'desc') ? (comparison * -1) : comparison\n );\n };\n }", "function compareKeyValuePair(object1, object2){\r\n for (objectKey in object1){\r\n if (typeof object1[objectKey] !== 'function'){\r\n if (typeof object2[objectKey] != 'undefined'){\r\n if (object1[objectKey] == object2[objectKey]){\r\n return true;\r\n }\r\n }\r\n }\r\n }\r\n return false; \r\n}", "function createLessThanFilter(base) {\n // YOUR CODE BELOW HERE //\n return function (givenValue){\n return givenValue < base\n }\n \n \n \n // YOUR CODE ABOVE HERE //\n}", "function arrayEqualsHandler(callback) {\n\t return function handleArray(val1, val2) {\n\t var left = arrayWrap(val1), right = arrayWrap(val2);\n\t if (left.length !== right.length)\n\t return false;\n\t for (var i = 0; i < left.length; i++) {\n\t if (!callback(left[i], right[i]))\n\t return false;\n\t }\n\t return true;\n\t };\n\t }", "function arrayEqualsHandler(callback) {\n\t return function handleArray(val1, val2) {\n\t var left = arrayWrap(val1), right = arrayWrap(val2);\n\t if (left.length !== right.length)\n\t return false;\n\t for (var i = 0; i < left.length; i++) {\n\t if (!callback(left[i], right[i]))\n\t return false;\n\t }\n\t return true;\n\t };\n\t }" ]
[ "0.7037844", "0.65462464", "0.62693125", "0.61836326", "0.61425954", "0.61234903", "0.604885", "0.59872276", "0.5949225", "0.5945417", "0.5897636", "0.58276486", "0.58276486", "0.573866", "0.5713657", "0.5699451", "0.55556554", "0.55544084", "0.55366373", "0.55366373", "0.55106974", "0.54906815", "0.54309994", "0.5417629", "0.54052377", "0.5375372", "0.53721726", "0.53721726", "0.53561044", "0.5350604", "0.5334281", "0.53294706", "0.532914", "0.53104776", "0.53025764", "0.5298557", "0.5281285", "0.52766144", "0.5262873", "0.52290773", "0.52290773", "0.52106196", "0.5190259", "0.5184671", "0.51808566", "0.51807594", "0.5179884", "0.5153947", "0.5153947", "0.514882", "0.5116258", "0.51130056", "0.5103656", "0.5103656", "0.5098255", "0.509617", "0.5080383", "0.5064581", "0.5060109", "0.5060109", "0.5060109", "0.5058875", "0.5057229", "0.5054276", "0.50521064", "0.50480664", "0.5044246", "0.5040512", "0.5039387", "0.5038242", "0.5034923", "0.50347465", "0.50347465", "0.50347465", "0.50347465", "0.50347465", "0.50347465", "0.50347465", "0.50347465", "0.50347465", "0.50347465", "0.50347465", "0.50347465", "0.50347465", "0.50347465", "0.50347465", "0.50347465", "0.50347465", "0.50347465", "0.50344515", "0.5029425", "0.5027011", "0.5024289", "0.5023246", "0.50153893", "0.5013223", "0.50093794", "0.5005968", "0.50047785", "0.50047785" ]
0.5828478
11
checks if two objects have the same keys and values
function equals (a, b, fn) { fn = fn || is if (!isObject(a) || !isObject(b)) return fn(a, b) return (every(a, makeCompare(fn), b) && every(b, checkProperties, a)) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sameProps(objA, objB) {\n var keysA = Object.keys(objA)\n var keysB = Object.keys(objB)\n\n if (keysA.length !== keysB.length)\n return false\n\n for (var i = 0; i < keysA.length; i++) {\n if (keysA[i] !== keysB[i])\n return false\n }\n\n return true\n}", "function objectsEqual(a, b) {\n if (a === b) {\n return true;\n }\n\n return (keysMatch(a, b) && valuesMatch(a, b));\n}", "function objectsEqual(obj1, obj2) {\n let obj1Keys = Object.keys(obj1);\n let obj1Values = Object.values(obj1);\n let obj2Keys = Object.keys(obj2);\n let obj2Values = Object.values(obj2);\n\n if (obj1Keys.length !== obj2Keys.length || obj1Values.length !== obj2Values.length) {\n return false;\n }\n\n for (let i = 0; i < obj1Keys.length; i += 1) {\n if (obj1Keys[i] !== obj2Keys[i]) {\n return false;\n }\n }\n\n for (let i = 0; i < obj1Values.length; i += 1) {\n if (obj1Values[i] !== obj2Values[i]) {\n return false;\n }\n }\n\n return true;\n}", "function sameProperties(objA, objB) {\n var keysA = Object.keys(objA).sort()\n var keysB = Object.keys(objB).sort()\n\n if (keysA.length !== keysB.length)\n return false\n\n for (var i = 0; i < keysA.length; i++)\n if (keysA[i] !== keysB[i] || objA[keysA[i]] !== objB[keysB[i]])\n return false\n\n return true\n}", "function same(o1, o2) {\n var rv = {};\n // collect all keys of `o1` and `o2` both:\n for (var k in o1) {\n rv[k] = true;\n }\n for (var k in o2) {\n rv[k] = true;\n }\n // now check if all keys exist in both objects and have the same value.\n // (Due to the nature of the AMsymbols[] table, we only need to\n // check the top level of both objects, as any complex substructures\n // in any of these will be *references* to the same base item, hence\n // we can get away with comparing substructures using the simple `===`\n // operator:\n for (var k in rv) {\n //var chk = ((k in o1) && (k in o2) && (o1[k] === o2[k]));\n // ==> simplified version:\n var chk = o1[k] === o2[k];\n if (!chk) {\n return false;\n }\n }\n return true;\n }", "function areObjectsEqual(obj1, obj2) {\n if (Object.keys(obj1).length !== Object.keys(obj2).length) {\n return false;\n }\n let objectLength = Object.keys(obj1).length;\n let i = 1;\n for (let key in obj1) {\n if (!obj2[key] || obj1[key] !== obj2[key]) {\n return false;\n } else if (objectLength === i) {\n return true;\n }\n i++;\n }\n}", "function keyValueChecker (object1, object2) {\r\n\tfor (var property1 in object1) {\r\n\t\tfor (var property2 in object2) {\r\n\t\t\tif (property1 == property2 && object1[property1] == object2[property2]) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn false;\r\n}", "function objects_hold_same_values(o1, o2)\n{\n\tif (typeof(o1) != typeof(o2))\n\t\treturn false;\n\t\t\n\tswitch (typeof(o1))\n\t{\n\t\tcase \"number\":\n\t\t\tif (isNaN(o1) && isNaN(o2))\n\t\t\t\treturn true;\n\t\t\treturn o1 == o2;\n\t\tbreak;\n\t\tcase \"boolean\":\n\t\t\treturn o1 == o2;\n\t\tbreak;\n\t\tcase \"string\": \n\t\t\tif (o1 != null && o2 != null && o1.length != o2.length)\n\t\t\t\treturn false;\n\t\t\treturn o1 == o2;\n\t\tbreak;\n\t\tcase \"object\": /* also, arrays */\n\t\t\tif (o1 != null && o2 != null && o1.length != o2.length)\n\t\t\t\treturn false;\n\t\t\tvar i;\n\t\t\tfor (i in o1)\n\t\t\t{\n\t\t\t\tif(!objects_hold_same_values(o1[i], o2[i]))\n\t\t\t\treturn false;\n\t\t\t}\n\t\tbreak;\n\t\tdefault:\n\t\t\treturn o1 == o2;\n\t\tbreak;\n\t}\n\n\treturn true;\n}", "function setsEqual(a, b) {\n var ka = Object.keys(a).sort();\n var kb = Object.keys(b).sort();\n if (ka.length != kb.length) {\n return false;\n }\n for (var i in ka) {\n if (kb[i] != ka[i]) {\n return false;\n }\n }\n return true;\n}", "function isEqual(a, b) {\n let aKeys = Object.keys(a);\n let bKeys = Object.keys(b);\n\n if (aKeys.length !== bKeys.length) {\n return false;\n }\n\n for (let i = 0; i < aKeys.length; i++) {\n var currentKey = aKeys[i];\n\n if (a[currentKey] !== b[currentKey]) {\n return false;\n } \n }\n\n return true;\n}", "function objectProperties(a, b) {\n\tvar key;\n\tfor (key in b) {\n\t\tif (a[key] !== b[key]) return false;\n\t}\n\treturn true;\n}", "function dictsAreEquivalent(a, b) {\n // Create arrays of property names\n var aProps = Object.getOwnPropertyNames(a);\n var bProps = Object.getOwnPropertyNames(b);\n\n // If number of properties is different,\n // objects are not equivalent\n if (aProps.length != bProps.length) {\n return false;\n }\n\n for (var i = 0; i < aProps.length; i++) {\n var propName = aProps[i];\n\n // If values of same property are not equal,\n // objects are not equivalent\n if (a[propName] !== b[propName]) {\n return false;\n }\n }\n\n // If we made it this far, objects\n // are considered equivalent\n return true;\n}", "static isEquivalent(a, b) \n {\n // Create arrays of property names\n var aProps = Object.getOwnPropertyNames(a);\n var bProps = Object.getOwnPropertyNames(b);\n \n // If number of properties is different,\n // objects are not equivalent\n if (aProps.length != bProps.length) {\n return false;\n }\n \n for (var i = 0; i < aProps.length; i++) {\n var propName = aProps[i];\n \n // If values of same property are not equal,\n // objects are not equivalent\n if (a[propName] !== b[propName]) {\n return false;\n }\n }\n \n // If we made it this far, objects\n // are considered equivalent\n return true;\n }", "function shallowEqual(objA,objB){if(is(objA,objB)){return true;}if(typeof objA!=='object'||objA===null||typeof objB!=='object'||objB===null){return false;}var keysA=Object.keys(objA);var keysB=Object.keys(objB);if(keysA.length!==keysB.length){return false;}// Test for A's keys different from B.\nfor(var i=0;i<keysA.length;i++){if(!hasOwnProperty.call(objB,keysA[i])||!is(objA[keysA[i]],objB[keysA[i]])){return false;}}return true;}", "sameJSONStructure(o1, o2) {\n var equal = true;\n for (var i in o1) {\n if (!o2.hasOwnProperty(i)) {\n equal = false;\n }\n }\n\n return equal;\n }", "function sameKeys(objA, objB, ignoreOrder) {\n var keysA = Object.keys(objA)\n var keysB = Object.keys(objB)\n\n if (keysA.length !== keysB.length)\n return false\n\n if (ignoreOrder) keysA.sort(), keysB.sort()\n\n for (var i = 0; i < keysA.length; i++)\n if (keysA[i] !== keysB[i])\n return false\n\n return true\n}", "function shallowEqual(objA,objB){if(is(objA,objB)){return true;}if((typeof objA==='undefined'?'undefined':_typeof(objA))!=='object'||objA===null||(typeof objB==='undefined'?'undefined':_typeof(objB))!=='object'||objB===null){return false;}var keysA=Object.keys(objA);var keysB=Object.keys(objB);if(keysA.length!==keysB.length){return false;}// Test for A's keys different from B.\nfor(var i=0;i<keysA.length;i++){if(!hasOwnProperty.call(objB,keysA[i])||!is(objA[keysA[i]],objB[keysA[i]])){return false;}}return true;}", "function objectsEqual(obj1,obj2) {\n if (obj1 === obj2) {\n return true;\n }\n let keys = Object.getOwnPropertyNames(obj1);\n return keys.every(key => {\n return obj2.hasOwnProperty(key) && obj1[key] === obj2[key];\n });\n}", "function shallowEqual(objA,objB){if(is(objA,objB)){return true;}if(_typeof(objA)!=='object'||objA===null||_typeof(objB)!=='object'||objB===null){return false;}var keysA=Object.keys(objA);var keysB=Object.keys(objB);if(keysA.length!==keysB.length){return false;}// Test for A's keys different from B.\nfor(var i=0;i<keysA.length;i++){if(!hasOwnProperty$1.call(objB,keysA[i])||!is(objA[keysA[i]],objB[keysA[i]])){return false;}}return true;}", "function isKeyMatch(object1, object2) {\n var object1Keys = Object.keys(object1);\n var object2Keys = Object.keys(object2);\n\n for (var i = 0; i < object1Keys.length; i++) {\n if (object1Keys[i] !== object2Keys[i]) {\n return false; // not the same key here\n }\n return true; //if made it here, all keys match\n }\n }", "function shallowEqual(objA,objB){if(objectIs(objA,objB)){return true;}if(typeof objA!=='object'||objA===null||typeof objB!=='object'||objB===null){return false;}var keysA=Object.keys(objA);var keysB=Object.keys(objB);if(keysA.length!==keysB.length){return false;}// Test for A's keys different from B.\nfor(var i=0;i<keysA.length;i++){if(!hasOwnProperty$2.call(objB,keysA[i])||!objectIs(objA[keysA[i]],objB[keysA[i]])){return false;}}return true;}", "function shallowEqual(objA,objB){if(objectIs(objA,objB)){return true;}if(typeof objA!=='object'||objA===null||typeof objB!=='object'||objB===null){return false;}var keysA=Object.keys(objA);var keysB=Object.keys(objB);if(keysA.length!==keysB.length){return false;}// Test for A's keys different from B.\nfor(var i=0;i<keysA.length;i++){if(!hasOwnProperty$2.call(objB,keysA[i])||!objectIs(objA[keysA[i]],objB[keysA[i]])){return false;}}return true;}", "function shallowEqual(objA,objB){if(objectIs(objA,objB)){return true;}if(typeof objA!=='object'||objA===null||typeof objB!=='object'||objB===null){return false;}var keysA=Object.keys(objA);var keysB=Object.keys(objB);if(keysA.length!==keysB.length){return false;}// Test for A's keys different from B.\nfor(var i=0;i<keysA.length;i++){if(!hasOwnProperty$2.call(objB,keysA[i])||!objectIs(objA[keysA[i]],objB[keysA[i]])){return false;}}return true;}", "function shallowEqual(objA,objB){if(is(objA,objB)){return true;}if((typeof objA==='undefined'?'undefined':_typeof(objA))!=='object'||objA===null||(typeof objB==='undefined'?'undefined':_typeof(objB))!=='object'||objB===null){return false;}var keysA=Object.keys(objA);var keysB=Object.keys(objB);if(keysA.length!==keysB.length){return false;}// Test for A's keys different from B.\nfor(var i=0;i<keysA.length;i++){if(!hasOwnProperty$1.call(objB,keysA[i])||!is(objA[keysA[i]],objB[keysA[i]])){return false;}}return true;}", "function shallowEqual(objA,objB){if(objectIs(objA,objB)){return true;}if(_typeof(objA)!=='object'||objA===null||_typeof(objB)!=='object'||objB===null){return false;}var keysA=Object.keys(objA);var keysB=Object.keys(objB);if(keysA.length!==keysB.length){return false;}// Test for A's keys different from B.\nfor(var i=0;i<keysA.length;i++){if(!hasOwnProperty$2.call(objB,keysA[i])||!objectIs(objA[keysA[i]],objB[keysA[i]])){return false;}}return true;}", "function shallowEqual(objA,objB){if(objectIs(objA,objB)){return true;}if(_typeof(objA)!=='object'||objA===null||_typeof(objB)!=='object'||objB===null){return false;}var keysA=Object.keys(objA);var keysB=Object.keys(objB);if(keysA.length!==keysB.length){return false;}// Test for A's keys different from B.\nfor(var i=0;i<keysA.length;i++){if(!hasOwnProperty$2.call(objB,keysA[i])||!objectIs(objA[keysA[i]],objB[keysA[i]])){return false;}}return true;}", "function equalForKeys(a, b, keys) {\n if (!angular.isArray(keys) && angular.isObject(keys)) {\n keys = protoKeys(keys, [\"$$keys\", \"$$values\", \"$$equals\", \"$$validates\", \"$$new\", \"$$parent\"]);\n }\n if (!keys) {\n keys = [];\n for (var n in a) keys.push(n); // Used instead of Object.keys() for IE8 compatibility\n }\n\n for (var i = 0; i < keys.length; i++) {\n var k = keys[i];\n if (a[k] != b[k]) return false; // Not '===', values aren't necessarily normalized\n }\n return true;\n }", "function equalForKeys(a, b, keys) {\n if (!angular.isArray(keys) && angular.isObject(keys)) {\n keys = protoKeys(keys, [\"$$keys\", \"$$values\", \"$$equals\", \"$$validates\", \"$$new\", \"$$parent\"]);\n }\n if (!keys) {\n keys = [];\n for (var n in a) keys.push(n); // Used instead of Object.keys() for IE8 compatibility\n }\n\n for (var i = 0; i < keys.length; i++) {\n var k = keys[i];\n if (a[k] != b[k]) return false; // Not '===', values aren't necessarily normalized\n }\n return true;\n }", "function shallowEqual(objA,objB){if(is(objA,objB)){return true;}if((typeof objA==='undefined'?'undefined':_typeof4(objA))!=='object'||objA===null||(typeof objB==='undefined'?'undefined':_typeof4(objB))!=='object'||objB===null){return false;}var keysA=Object.keys(objA);var keysB=Object.keys(objB);if(keysA.length!==keysB.length){return false;}// Test for A's keys different from B.\r\n\tfor(var i=0;i<keysA.length;i++){if(!hasOwnProperty.call(objB,keysA[i])||!is(objA[keysA[i]],objB[keysA[i]])){return false;}}return true;}", "function deepEqual(firstObject, secondObject) {\n const firstKeys = Object.keys(firstObject);\n const secondKeys = Object.keys(secondObject);\n\n if (firstKeys.length !== secondKeys.length) {\n return false;\n }\n\n for (const key of firstKeys) {\n const val1 = firstObject[key];\n const val2 = secondObject[key];\n const areObjects = val1 != null && typeof val1 === 'object' && val2 != null && typeof val2 === 'object';\n if (\n areObjects && !deepEqual(val1, val2) ||\n !areObjects && val1 !== val2\n ) {\n return false;\n }\n }\n\n return true;\n}", "function shallowEqualObjects(a, b) {\r\n if (a && !b || b && !a) {\r\n return false;\r\n }\r\n\r\n for (var key in a) {\r\n if (a[key] !== b[key]) {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n} // Copied from: https://github.com/jonschlinkert/is-plain-object", "function shallowEqual(objA,objB){if(is(objA,objB)){return true;}if((typeof objA===\"undefined\"?\"undefined\":_typeof3(objA))!=='object'||objA===null||(typeof objB===\"undefined\"?\"undefined\":_typeof3(objB))!=='object'||objB===null){return false;}var keysA=Object.keys(objA);var keysB=Object.keys(objB);if(keysA.length!==keysB.length){return false;} // Test for A's keys different from B.\n\tfor(var i=0;i<keysA.length;i++){if(!hasOwnProperty.call(objB,keysA[i])||!is(objA[keysA[i]],objB[keysA[i]])){return false;}}return true;}", "function equalObjects(a, b) {\n if ((typeof a === 'undefined' ? 'undefined' : _typeof(a)) !== (typeof b === 'undefined' ? 'undefined' : _typeof(b))) {\n return false;\n }\n if ((typeof a === 'undefined' ? 'undefined' : _typeof(a)) !== 'object') {\n return a === b;\n }\n if (a === b) {\n return true;\n }\n if (toString.call(a) === '[object Date]') {\n if (toString.call(b) === '[object Date]') {\n return +a === +b;\n }\n return false;\n }\n if (Array.isArray(a)) {\n if (Array.isArray(b)) {\n if (a.length !== b.length) {\n return false;\n }\n for (var i = 0; i < a.length; i++) {\n if (!equalObjects(a[i], b[i])) {\n return false;\n }\n }\n return true;\n }\n return false;\n }\n if (Object.keys(a).length !== Object.keys(b).length) {\n return false;\n }\n for (var key in a) {\n if (!equalObjects(a[key], b[key])) {\n return false;\n }\n }\n return true;\n}", "function shallowEqual(objA,objB){if(is(objA,objB)){return true;}if((typeof objA===\"undefined\"?\"undefined\":_typeof2(objA))!=='object'||objA===null||(typeof objB===\"undefined\"?\"undefined\":_typeof2(objB))!=='object'||objB===null){return false;}var keysA=Object.keys(objA);var keysB=Object.keys(objB);if(keysA.length!==keysB.length){return false;} // Test for A's keys different from B.\n\tfor(var i=0;i<keysA.length;i++){if(!hasOwnProperty.call(objB,keysA[i])||!is(objA[keysA[i]],objB[keysA[i]])){return false;}}return true;}", "function deepEqual(object1, object2) {\n const keys1 = Object.keys(object1);\n const keys2 = Object.keys(object2);\n \n if (keys1.length !== keys2.length) {\n return false;\n }\n \n for (const key of keys1) {\n const val1 = object1[key];\n const val2 = object2[key];\n const areObjects = isObject(val1) && isObject(val2);\n if (\n areObjects && !deepEqual(val1, val2) ||\n !areObjects && val1 !== val2\n ) {\n return false;\n }\n }\n \n return true;\n}", "function comparePairs(obj1, obj2){\n\tvar keys1 = Object.keys(obj1);\n\tvar keys2 = Object.keys(obj2);\n\tfor(var i = 0; i < keys1.length; i ++){\n\t\tif (keys1[i] === keys2[i] || obj1[keys1[i]] === obj2[keys2[i]]){\n\t\t\treturn true\n\t\t}\n\t\treturn false\n\t}\n}", "function has_match(first_object, second_object) {\n\tfor (key in first_object) {\n\t\tif (first_object.key === second_object.key) {\n\t\t\treturn true; break;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}\n}", "function hasSameProperties(a, b) {\n var aProps = Object.getOwnPropertyNames(a);\n var bProps = Object.getOwnPropertyNames(b);\n if (aProps.length !== bProps.length) {\n return false;\n }\n for (var i = 0; i < aProps.length; i++) {\n var propName = aProps[i];\n if (a[propName] !== b[propName]) {\n return false;\n }\n }\n return true;\n}", "function hasSameProperties(a, b) {\n var aProps = Object.getOwnPropertyNames(a);\n var bProps = Object.getOwnPropertyNames(b);\n if (aProps.length !== bProps.length) {\n return false;\n }\n for (var i = 0; i < aProps.length; i++) {\n var propName = aProps[i];\n if (a[propName] !== b[propName]) {\n return false;\n }\n }\n return true;\n}", "function equalProp(obj1,obj2) {\n if (Object.keys(obj1).length === Object.keys(obj2).length) {\n for (let prop in obj1) {\n if (!obj2.hasOwnProperty(prop) || !areEqual(obj1[prop],obj2[prop])) return false;\n }\n return true;\n } else {\n return false;\n }\n}", "function deepEqual(a,b) \n{\n//two inputs ob ojects\n\tif (a === b) return true; //this is true when these share same value prop.\n\tif (a == null || typeof a !=\"object\" || b == null || typeof b !=\"object\" ) //Null =/ null\n\t\treturn false; //this checks if they dont equal\n\n\tvar a_count = 0, b_count = 0; //counters for loop iteration\n\tfor(var properties in a)\n\t\ta_count++;\n\tfor( var properties in b) \n\t{\n\t\tb_count++;\n\t\n\tif(!(properties in a) || !deepEqual(a[properties], b[properties]))\n\t\treturn false;\n\t}\nreturn a_count === b_count;\n}", "function isEquivalent(a, b) {\n // Create arrays of property names\n let aProps = Object.getOwnPropertyNames(a);\n let bProps = Object.getOwnPropertyNames(b);\n\n // If number of properties is different,\n // objects are not equivalent\n if (aProps.length != bProps.length) {\n return false;\n }\n\n for (let i = 0; i < aProps.length; i++) {\n var propName = aProps[i];\n\n // If values of same property are not equal,\n // objects are not equivalent\n if (a[propName] !== b[propName]) {\n return false;\n }\n }\n\n // If we made it this far, objects\n // are considered equivalent\n return true;\n}", "function sameKeys(objA, objB, protoCheck, deepCheck) {\n var keysA = Object.getNestedKeys(objA, protoCheck, !deepCheck)\n var keysB = Object.getNestedKeys(objB, protoCheck, !deepCheck)\n\n if (keysA.length !== keysB.length)\n return false\n\n for (var i = 0; i < keysA.length; i++)\n if (keysA[i] !== keysB[i])\n return false\n\n return true\n}", "function valueConflict (obj1, obj2, key) {\n return (key in obj1) && (key in obj2) && (obj1[key] !== obj2[key]);\n}", "function sameObject(a, b) {\n return a === b\n}", "function areEquals(a, b) {\n\n\tlet aProps = Object.getOwnPropertyNames(a);\n let bProps = Object.getOwnPropertyNames(b);\n\n if (bProps.length !== aProps.length)\n \treturn false;\n\n for (let key of aProps) {\n \tif (!bProps.includes(key) || b[key] !== a[key])\n \t\treturn false;\n }\n\n for (let key of bProps) {\n \tif (!aProps.includes(key) || b[key] !== a[key])\n \t\treturn false;\n }\n\n return true;\n}", "function shallowEqual(objA, objB) {\n if (is(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty$1.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n }", "function shallowEqual(objA, objB) {\n if (is(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty$1.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n }", "function shallowEqual(objA, objB) {\n if (is(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty$1.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n }", "function Object$prototype$equals(other) {\n var self = this;\n var keys = Object.keys(this).sort();\n return equals(keys, Object.keys(other).sort()) &&\n keys.every(function(k) { return equals(self[k], other[k]); });\n }", "function compareObjects(o1, o2) {\n return Object.keys(o1).every(key => o1[key] === o2[key]);\n}", "function isEquivalent(a, b) {\n // Create arrays of property names\n var aProps = Object.getOwnPropertyNames(a);\n var bProps = Object.getOwnPropertyNames(b);\n\n // If number of properties is different,\n // objects are not equivalent\n if (aProps.length != bProps.length) {\n return false;\n }\n\n for (var i = 0; i < aProps.length; i++) {\n var propName = aProps[i];\n\n // If values of same property are not equal,\n // objects are not equivalent\n if (a[propName] !== b[propName]) {\n return false;\n }\n }\n // If we made it this far, objects\n // are considered equivalent\n return true;\n}", "function shallowEqual(objA, objB) {\n if (is$1(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty$2.call(objB, keysA[i]) || !is$1(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n }", "function compareObjs(obj1, obj2) {\n var sameValInObj = false\n for(var key in obj1) {\n for(var secondKey in obj2) {\n if (obj1[key] === obj2[secondKey]) {\n sameValInObj = true\n }\n }\n }\n return sameValInObj;\n\n}", "function shallowEqual(objA, objB) {\n if (is(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n}", "function shallowEqual(objA, objB) {\n if (objectIs(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty.call(objB, keysA[i]) || !objectIs(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n }", "function deepEqual(value1, value2) {\n if (value1 === value2) {\n return true;\n }\n if (value1 == null || typeof value1 != \"object\" ||\n value2 == null || typeof value2 != \"object\") {\n return false;\n }\n // The Object.keys() method returns an array of a given object's own property names, in the same order as we get with a normal loop. Example below:\n // const object1 = {\n // a: 'somestring',\n // b: 42,\n // c: false\n // };\n\n // console.log(Object.keys(object1));\n // expected output: Array [\"a\", \"b\", \"c\"]\n // basically runs a for loop thru each object and creates an array of those values\n let keysA = Object.keys(value1);\n let keysB = Object.keys(value2);\n\n if (keysA.length != keysB.length) {\n return false;\n }\n\n for (let key of keysA) {\n if (!keysB.includes(key) || !deepEqual(value1[key], value2[key])) {\n return false;\n }\n }\n \n return true;\n}", "function objectsAreIdentical( objs ){\n\t\n\tvar identical = true; \n\tvar length0 = getObjectLength( objs[0] );\n\tvar length1 = getObjectLength( objs[1] );\n\tvar isObj0, isObj1;\n\t\n\tif ( length0 !== length1 ){\n\t\tidentical = false;\n\t}\n\t\n\telse if ( objs[0].isColor && objs[1].isColor ){\n\t\tif ( !objs[0].equals( objs[1] ) ) { identical = false; }\n\t}\n\t\n\telse if ( !objs[0].isColor && !objs[1].isColor ){\n\t\tfor ( var k in objs[0] ){\n\t\t\tif ( !objs[1].hasOwnProperty( k ) ){\n\t\t\t\tidentical = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor ( var k in objs[1] ){\n\t\t\tif ( !objs[0].hasOwnProperty( k ) ){\n\t\t\t\tidentical = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor ( var k in objs[0] ){\n\t\t\tif ( objs[0][k] !== objs[1][k] ){\n\t\t\t\tidentical = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\t\n\tdebug.master && debug.generalUtils && console.log( 'objectsAreIdentical(): ', identical );\n\treturn identical;\n}", "function shallowEqual(objA, objB) {\n\t\t if (is(objA, objB)) {\n\t\t return true;\n\t\t }\n\t\t\n\t\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t\t return false;\n\t\t }\n\t\t\n\t\t var keysA = Object.keys(objA);\n\t\t var keysB = Object.keys(objB);\n\t\t\n\t\t if (keysA.length !== keysB.length) {\n\t\t return false;\n\t\t }\n\t\t\n\t\t // Test for A's keys different from B.\n\t\t for (var i = 0; i < keysA.length; i++) {\n\t\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t\t return false;\n\t\t }\n\t\t }\n\t\t\n\t\t return true;\n\t\t}", "function shallowEqual(objA, objB) {\n\t\t if (is(objA, objB)) {\n\t\t return true;\n\t\t }\n\t\t\n\t\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t\t return false;\n\t\t }\n\t\t\n\t\t var keysA = Object.keys(objA);\n\t\t var keysB = Object.keys(objB);\n\t\t\n\t\t if (keysA.length !== keysB.length) {\n\t\t return false;\n\t\t }\n\t\t\n\t\t // Test for A's keys different from B.\n\t\t for (var i = 0; i < keysA.length; i++) {\n\t\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t\t return false;\n\t\t }\n\t\t }\n\t\t\n\t\t return true;\n\t\t}", "function objEquals(a, b)\r\n{\r\n for(x in b)\r\n if(typeof(a[x]) == \"undefined\")\r\n return false;\r\n\r\n for(x in a)\r\n {\r\n if(typeof(b[x]) == \"undefined\")\r\n return false;\r\n\r\n if(a[x])\r\n {\r\n if(typeof(a[x]) == \"object\")\r\n {\r\n if(typeof(b[x]) != \"object\" || !objEquals(a[x], b[x]))\r\n return false;\r\n }\r\n else if(a[x] !== b[x])\r\n return false;\r\n }\r\n else if(b[x])\r\n return false;\r\n }\r\n\r\n return true;\r\n}", "function shallowEqual(object1, object2) {\n if(\n (object1['searchTerm'] !== object2['searchTerm']) ||\n (object1['richtext'] !== object2['richtext']) ||\n (object1['buttonsCount'] !== object2['buttonsCount']) ||\n (object1['imagesCount'] !== object2['imagesCount']) ||\n (object1['links'] !== object2['links']) ||\n (object1['listing'] !== object2['listing']) ||\n (object1['typeName'] !== object2['typeName'])\n ) {\n return false\n } else {\n return true\n }\n }", "function deepEqual(value1 = null, value2 = null) {\n if (value1 === value2) return true;\n if (value1 !== null && value2 !== null && typeof value1 === \"object\" && typeof value2 === \"object\") {\n let keysV1 = Object.keys(value1);\n let keysV2 = Object.keys(value2);\n if ( keysV1.length !== keysV2.length) return false;\n for ( let i = 0; i < keysV1.length; i++){\n if(!keysV2.includes(keysV1[i]) || !deepEqual(value1[keysV1[i]], value2[keysV1[i]])) {\n return false;\n }\n }\n return true;\n } else return false;\n}", "function shallowEqual(objA, objB) {\n if (objectIs(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty$2.call(objB, keysA[i]) || !objectIs(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n }", "function shallowEqual(objA, objB) {\n if (objectIs(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty$2.call(objB, keysA[i]) || !objectIs(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n }", "function shallowEqual(objA, objB) {\n if (objectIs(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty$2.call(objB, keysA[i]) || !objectIs(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n }", "function shallowEqual(objA, objB) {\n if (objectIs(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty$2.call(objB, keysA[i]) || !objectIs(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n }", "function shallowEqual(objA, objB) {\n if (objectIs(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty$2.call(objB, keysA[i]) || !objectIs(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n }", "function shallowEqual(objA, objB) {\n if (objectIs(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty$2.call(objB, keysA[i]) || !objectIs(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n }", "function shallowEqual(objA, objB) {\n if (objectIs(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty$2.call(objB, keysA[i]) || !objectIs(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n }", "function shallowEqual(objA, objB) {\n if (objectIs(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty$2.call(objB, keysA[i]) || !objectIs(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n }", "function shallowEqual(objA, objB) {\n if (objectIs(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty$2.call(objB, keysA[i]) || !objectIs(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n }", "function keyValMatch(obj1, obj2){\n\tfor(key in obj1){\n\t\tfor(otherKey in obj2){\n\t\t\tif(key == otherKey && obj1[key] == obj2[otherKey]){\n\t\t\t\t\n\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t}\n\treturn false;\n}", "isObjectEqual(a, b) {\n return a && b && a.foo === b.foo;\n }", "static isEquivalent (objA, objB) {\n\t\tconst objAProperties = Object.getOwnPropertyNames(objA);\n\t\tconst objBProperties = Object.getOwnPropertyNames(objB);\n\n\t\tif (objAProperties.length !== objBProperties.length) return false;\n\n\t\treturn objAProperties.every( property => objA[property] === objB[property]);\n\t}", "function equal(a, b) {\n\n if (Object.is(a, b))\n return true;\n\n\t// Dates must have equal time values\n\tif (isDate(a) && isDate(b))\n\t\treturn a.getTime() === b.getTime();\n\n\t// Non-objects must be strictly equal (types must be equal)\n\tif (!isObject(a) || !isObject(b))\n\t\treturn a === b;\n\n\t// Prototypes must be identical. getPrototypeOf may throw on\n\t// ES3 engines that don't provide access to the prototype.\n\ttry {\n\n\t if (Object.getPrototypeOf(a) !== Object.getPrototypeOf(b))\n\t\t return false;\n\n\t} catch (err) {}\n\n\tvar aKeys = Object.keys(a),\n\t\tbKeys = Object.keys(b);\n\n\t// Number of own properties must be identical\n\tif (aKeys.length !== bKeys.length)\n\t\treturn false;\n\n\tfor (var i$0 = 0; i$0 < aKeys.length; ++i$0) {\n\n\t\t// Names of own properties must be identical\n\t\tif (!OP_hasOwnProperty.call(b, aKeys[i$0]))\n\t\t\treturn false;\n\n\t\t// Values of own properties must be equal\n\t\tif (!equal(a[aKeys[i$0]], b[aKeys[i$0]]))\n\t\t\treturn false;\n\t}\n\n\treturn true;\n}", "function shallowEqual(objA, objB) {\n if (is(objA, objB)) {\n return true;\n }\n\n if ((typeof objA === \"undefined\" ? \"undefined\" : _typeof(objA)) !== \"object\" || objA === null || (typeof objB === \"undefined\" ? \"undefined\" : _typeof(objB)) !== \"object\" || objB === null) {\n // console.log('shallowEqual: not object??');\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n // console.log('!shallowEqual: different keys length');\n return false;\n }\n\n // Test for A's keys different from B.\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n // console.log(`!shallowEqual: different ${keysA[i]} - ${objA[keysA[i]]} vs. ${objB[keysA[i]]}`);\n return false;\n }\n }\n\n return true;\n}", "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\t\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\t\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\t\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\t\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}", "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\t\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\t\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\t\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\t\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}", "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\t\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\t\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\t\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\t\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}", "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\t\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\t\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\t\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\t\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}", "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\t\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\t\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\t\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\t\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}", "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\t\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\t\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\t\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\t\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}", "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\t\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\t\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\t\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\t\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}", "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\t\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\t\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\t\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\t\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}", "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\t\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\t\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\t\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\t\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}", "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\t\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\t\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\t\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\t\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}", "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\t\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\t\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\t\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\t\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}", "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\t\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\t\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\t\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\t\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}", "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\t\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\t\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\t\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\t\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}", "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\t\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\t\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\t\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\t\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}", "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\t\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\t\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\t\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\t\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}", "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\t\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\t\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\t\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\t\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}", "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\t\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\t\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\t\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\t\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}", "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\t\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\t\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\t\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\t\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}", "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\t\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\t\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\t\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\t\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}", "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\t\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\t\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\t\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\t\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}", "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\t\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\t\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\t\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\t\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}", "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\t\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\t\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\t\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\t\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}", "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\t\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\t\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\t\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\t\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}", "function shallowEqual(objA, objB) {\n\t\t if (is(objA, objB)) {\n\t\t return true;\n\t\t }\n\n\t\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t\t return false;\n\t\t }\n\n\t\t var keysA = Object.keys(objA);\n\t\t var keysB = Object.keys(objB);\n\n\t\t if (keysA.length !== keysB.length) {\n\t\t return false;\n\t\t }\n\n\t\t // Test for A's keys different from B.\n\t\t for (var i = 0; i < keysA.length; i++) {\n\t\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t\t return false;\n\t\t }\n\t\t }\n\n\t\t return true;\n\t\t}" ]
[ "0.8013424", "0.7922329", "0.78702384", "0.7755975", "0.7740629", "0.7725208", "0.77179056", "0.76664144", "0.7625233", "0.76183486", "0.76128155", "0.7566404", "0.7561876", "0.74780506", "0.7444955", "0.74410534", "0.7413393", "0.74128354", "0.7396042", "0.73921454", "0.7367803", "0.7367803", "0.7367803", "0.73643947", "0.7330151", "0.7330151", "0.7327968", "0.7327968", "0.72990495", "0.72930074", "0.7284729", "0.72806466", "0.7269741", "0.72649586", "0.7258919", "0.72555584", "0.7221962", "0.7210405", "0.7210405", "0.7203265", "0.7201519", "0.71959037", "0.719511", "0.71809167", "0.7180521", "0.7163202", "0.7161209", "0.7161209", "0.7161209", "0.71602786", "0.71574813", "0.7147308", "0.7139925", "0.71269876", "0.71232235", "0.71174186", "0.71118975", "0.71114707", "0.71080774", "0.71080774", "0.71057916", "0.71043146", "0.7088403", "0.708775", "0.708775", "0.708775", "0.708775", "0.708775", "0.708775", "0.708775", "0.708775", "0.708775", "0.7087734", "0.7083091", "0.70827484", "0.7082683", "0.7081241", "0.707589", "0.707589", "0.707589", "0.707589", "0.707589", "0.707589", "0.707589", "0.707589", "0.707589", "0.707589", "0.707589", "0.707589", "0.707589", "0.707589", "0.707589", "0.707589", "0.707589", "0.707589", "0.707589", "0.707589", "0.707589", "0.707589", "0.70670503", "0.706331" ]
0.0
-1
This background script watch changes in the active tab, or extension options, and update the extension icon to show if it is enabled on the current page
async function init() { let options = await loadOptions(); // Watch navigation, to enable/disable content script depending on URL changes. // NOTE: This is the only reliable method that I could find, which works for SPA as well. // For example, content scripts cannot monkey patch history.pushState because of XRay vision, which prohibits the use of modules like `url-listener` browser.webNavigation.onHistoryStateUpdated.addListener(async () => { const activeTabs = await browser.tabs.query({ currentWindow: true, active: true }); activeTabs.forEach(tab => { browser.tabs.sendMessage(tab.id, 'hyper-gwent/history-changed'); }); }); updateBrowserActionIcon(options); browser.tabs.onActivated.addListener(() => { updateBrowserActionIcon(options); }); browser.tabs.onUpdated.addListener(() => { updateBrowserActionIcon(options); }); browser.storage.onChanged.addListener(async () => { options = await loadOptions(); updateBrowserActionIcon(options); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateState () {\n if (!chrome.tabs) return;\n\n let iconState = 'active';\n\n if (!isExtensionEnabled) {\n iconState = 'disabled';\n } else if (httpNowhereOn) {\n iconState = 'blocking';\n }\n\n chrome.browserAction.setTitle({\n title: 'HTTPS Everywhere' + ((iconState === 'active') ? '' : ' (' + iconState + ')')\n });\n\n chrome.tabs.query({ active: true, currentWindow: true }, function(tabs) {\n if (!tabs || tabs.length === 0) {\n return;\n }\n const tabUrl = new URL(tabs[0].url);\n\n if (disabledList.has(tabUrl.host) || iconState == \"disabled\") {\n if ('setIcon' in chrome.browserAction) {\n chrome.browserAction.setIcon({\n path: {\n 38: 'images/icons/icon-disabled-38.png'\n }\n });\n }\n } else {\n\n if ('setIcon' in chrome.browserAction) {\n chrome.browserAction.setIcon({\n path: {\n 38: 'images/icons/icon-' + iconState + '-38.png'\n }\n });\n }\n }\n });\n}", "function enablePageIcon(tab) {\n chrome.pageAction.setIcon({\n tabId: tab.id,\n path: \"images/icons/sunjer_active.png\"\n });\n chrome.pageAction.setTitle({\n tabId: tab.id,\n title: \"Click to stop editing using sunjer\"\n });\n}", "function handleActivated(activeInfo) {\r\n chrome.tabs.query({ active: true, currentWindow: true}, function(tabs) {\r\n setIcon(tabs[0].url);\r\n //https://stackoverflow.com/questions/6451693/chrome-extension-how-to-get-current-webpage-url-from-background-html\r\n \r\n});\r\n}", "function valleyGirlIfy(){\n\tvalleyGirlIfied = true;\n\tchrome.browserAction.setIcon({path:\"activelogo.png\"});\n\tchrome.tabs.executeScript(null, {file: \"async.js\"}, function() {\n\t\tchrome.tabs.executeScript(null, {file: \"content.js\"});\n\t});\n\tchrome.tabs.query({active:true, windowType:\"normal\", currentWindow: true}, function(t){\n\t\tcurTabID = t[0].id;\n\t\tVGedTabs[curTabID] = true;\n\t\tchrome.runtime.onConnect.addListener(function(port){\n\t\t\tport.postMessage({vgTabId: curTabID});\n\t\t});\n\t});\n}", "function refreshIconAndContextMenu(tab)\n{\n // The tab could have been closed by the time this function is called\n if(!tab)\n return;\n\n var excluded = isWhitelisted(tab.url);\n var iconFilename = excluded ? \"icons/abp-19-whitelisted.png\" : \"icons/abp-19.png\";\n\n if (activeNotification)\n startIconAnimation(tab, iconFilename);\n else\n chrome.pageAction.setIcon({tabId: tab.id, path: iconFilename});\n\n // Only show icon for pages we can influence (http: and https:)\n if(/^https?:/.test(tab.url))\n {\n chrome.pageAction.setTitle({tabId: tab.id, title: \"Adblock Plus\"});\n if (\"shouldShowIcon\" in localStorage && localStorage[\"shouldShowIcon\"] == \"false\")\n chrome.pageAction.hide(tab.id);\n else\n chrome.pageAction.show(tab.id);\n\n // Set context menu status according to whether current tab has whitelisted domain\n if (excluded)\n chrome.contextMenus.removeAll();\n else\n showContextMenu();\n }\n}", "function monitorCurrentPage() {\n $('#monitor_page').addClass('inprogress');\n chrome.tabs.getSelected(null, function(tab) {\n initializePageModePickerPopup(tab);\n _gaq.push(['_trackEvent', tab.url, 'add']);\n\n chrome.tabs.getAllInWindow(null, function(tabs){\n var found = false;\n for (var i = 0; i < tabs.length; i++) {\n if(tabs[i].url == chrome.extension.getURL(\"options.htm\")) \n {\n found = true;\n break;\n }\n }\n \n if (found == false)\n {\n chrome.tabs.create({url: \"options.htm\", active: false});\n }\n addPage({url: tab.url, name: tab.title}, function() {\n BG.takeSnapshot(tab.url);\n });\n});\n \n });\n}", "function updateIcon() {\n chrome.browserAction.setIcon({path:\"green.png\"});\n chrome.tabs.executeScript(null,{file:'content.js'});\n alert('called');\n}", "function cb_tabOnUpdated(id, info, tab) {\n\n //Checks if loading is complete\n if (tab.status !== \"complete\"){\n console.log(\"Not loaded\");\n return;\n }\n else\n {\n console.log(\"Loaded\");\n }\n \n if (tab.url.toLowerCase().indexOf(\"facebook.com\") === -1){\n console.log(\"Not Facebook\");\n return;\n }\n\n if(!tempBool){ \n chrome.pageAction.setIcon({tabId: tab.id, path: 'images/icongrey.png'});\n }\n\n if(tempBool){ \n chrome.pageAction.setIcon({tabId: tab.id, path: 'images/icon.png'});\n }\n\n if (tab.url.toLowerCase().indexOf(\"facebook.com/buzzfeed\") !== -1){\n chrome.tabs.update(tab.id, {url: \"http://www.facebook.com/\"});\n }\n\n //Show PageAction\n chrome.pageAction.show(tab.id);\n\n if(tempBool){ \n chrome.pageAction.setIcon({tabId: tab.id, path: 'images/icon.png'});\n chrome.storage.sync.get(\"urlList\", function(data){\n urlList = data.urlList;\n if (typeof urlList === 'undefined') {\n urlList = default_urlList;\n }\n });\n chrome.tabs.executeScript(tab.id, {\"file\": \"js/buzzoff.js\"}, function() {\n chrome.tabs.sendMessage(tab.id, JSON.stringify(urlList));\n });\n }\n}", "function enable()\n {\n browser.bookmarks.onRemoved.addListener(update_in_active_tabs);\n browser.tabs.onActivated.addListener(on_tab_activated);\n browser.tabs.onUpdated.addListener(on_tab_updated);\n browser.tabs.onRemoved.addListener(on_tab_removed);\n\n update_in_active_tabs();\n }", "async function update_in_active_tabs()\n {\n (await browser.tabs.query({ active: true })).forEach(update_in_tab);\n }", "function setup_extensionIcon() {\n // Rules for page-matching; tells Chrome when to enable extension icon\n let rule1 = {\n conditions: [\n // TODO: Make conditions more accurate, like the contextPatterns below\n new chrome.declarativeContent.PageStateMatcher({\n pageUrl: {hostSuffix: 'steampowered.com'}\n }),\n new chrome.declarativeContent.PageStateMatcher({\n pageUrl: {hostSuffix: 'steamcommunity.com'}\n })\n ],\n actions: [\n new chrome.declarativeContent.ShowPageAction() // Un-grayscale the logo\n ]\n };\n\n // onInstalled is called when the extension is installed or updated\n chrome.runtime.onInstalled.addListener(function () {\n chrome.declarativeContent.onPageChanged.removeRules(undefined, function () { // Remove old rules...\n chrome.declarativeContent.onPageChanged.addRules([rule1]); // ...before adding new ones.\n });\n });\n}", "function updateActiveTab () {\n function isSupportedProtocol (urlString) {\n const supportedProtocols = ['https:', 'http:', 'ftp:', 'file:']\n const url = document.createElement('a')\n\n url.href = urlString\n\n return supportedProtocols.indexOf(url.protocol) !== -1\n }\n\n function updateTab (tabs) {\n if (tabs[0]) {\n currentTab = tabs[0]\n if (isSupportedProtocol(currentTab.url)) {\n const searching = browser.bookmarks.search({url: currentTab.url})\n\n searching.then((bookmarks) => {\n currentBookmark = bookmarks[0]\n updateIcon()\n })\n } else {\n console.log(`Bookmark it! does not support the '${currentTab.url}' URL.`)\n }\n }\n }\n\n const gettingActiveTab = browser.tabs\n .query({active: true, currentWindow: true})\n\n gettingActiveTab.then(updateTab)\n}", "function updateButtonsState() {\n // Enable/Disable the Monitor This Page button.\n chrome.tabs.getSelected(null, function(tab) {\n isPageMonitored(tab.url, function(monitored) {\n if (monitored || !tab.url.match(/^https?:/)) {\n $('#monitor_page').unbind('click').addClass('inactive');\n $('#monitor_page img').attr('src', 'img/monitor_inactive.png');\n var message = monitored ? 'page_monitored' : 'monitor';\n $('#monitor_page span').text(chrome.i18n.getMessage(message));\n } else {\n // $('#monitor_page').click(monitorCurrentPage).removeClass('inactive');\n $('#monitor_page img').attr('src', 'img/monitor.png');\n $('#monitor_page span').text(chrome.i18n.getMessage('monitor'));\n }\n });\n });\n\n // Enable/Disable the View All button.\n if ($('#notifications .notification').length) {\n $('#view_all').removeClass('inactive');\n $('#view_all img').attr('src', 'img/view_all.png');\n \n } else {\n $('#view_all').addClass('inactive');\n $('#view_all img').attr('src', 'img/view_all_inactive.png');\n }\n \n\n // Enable/disable the Check All Now button.\n getAllPageURLs(function(urls) {\n getAllUpdatedPages(function(updated_urls) {\n if (urls.length == 0) {\n $('#check_now').addClass('inactive');\n $('#check_now img').attr('src', 'img/refresh_inactive.png');\n } else {\n $('#check_now').removeClass('inactive');\n $('#check_now img').attr('src', 'img/refresh.png');\n }\n });\n });\n initializePageCheck();\n}", "function tabUpdated(id, info, tab) {\n if (tab.url.toLowerCase().indexOf(\"youtube.com\") > -1) { // Any page with youtube.com at the start is valid for the extention\n chrome.pageAction.show(tab.id);\n }\n }", "function updateIcon (iconEnabled, color = 'red') {\n if (iconEnabled === true) {\n browser.pageAction.setIcon({\n path: currentBookmark ? {\n 32: `icons/star/star-${color}-32.png`,\n 64: `icons/star/star-${color}-64.png`,\n 128: `icons/star/star-${color}-128.png`,\n 256: `icons/star/star-${color}-256.png`,\n 512: `icons/star/star-${color}-512.png`\n } : {\n 32: 'icons/empty/empty-32.png',\n 64: 'icons/empty/empty-64.png',\n 128: 'icons/empty/empty-128.png',\n 256: 'icons/empty/empty-256.png',\n 512: 'icons/empty/empty-512.png'\n },\n tabId: currentTab.id\n })\n browser.pageAction.setTitle({\n title: currentBookmark ? 'Remove this bookmark' : 'Quick bookmark this page',\n tabId: currentTab.id\n })\n } else {\n browser.pageAction.setIcon({\n path: {\n 32: 'icons/cross/cross-32.png',\n 64: 'icons/cross/cross-64.png',\n 128: 'icons/cross/cross-128.png',\n 256: 'icons/cross/cross-256.png',\n 512: 'icons/cross/cross-512.png'\n },\n tabId: currentTab.id\n })\n browser.pageAction.setTitle({\n title: 'The quick bookmark icon is disabled',\n tabId: currentTab.id\n })\n }\n}", "function notifyOfChanges(tabs) {\n // Iterate through all the given tabs\n for (let tab of tabs) {\n // Send a message to the tabs to indicate the content scripts the status of the extension\n if (typeof browser !== 'undefined' && (typeof browser.runtime !== 'undefined' && browser.runtime != null)) {\n browser.tabs.sendMessage(\n tab.id,\n { \"operation\": \"yorStatusChanged\", \"currentStatus\": currentStatus }\n );\n } else if (typeof chrome !== 'undefined' && (typeof chrome.runtime !== 'undefined' && chrome.runtime != null)) {\n chrome.tabs.sendMessage(\n tab.id,\n { \"operation\": \"yorStatusChanged\", \"currentStatus\": currentStatus }\n );\n }\n \n }\n}", "function enableExtension(tab, tabId) {\n //if live event enable dazn chat toggle\n if (!isLiveEventPage(tab.url)) {\n console.log(`not a live event.\n popup => watch.html`);\n return chrome.browserAction.setPopup({ popup: \"popup/wrongPage.html\", tabId });\n }\n console.log(`tab ${tabId} - is Live event`);\n chrome.browserAction.setPopup({ popup: \"popup/index.html\", tabId });\n console.log(`popup => popup.html`);\n toggleChat(tabId);\n // chrome.storage.sync.set({ chatEnabled: true }, () => console.log(\"icon enabled\"));\n globalThis.popupEnabled = true;\n}", "async function update_in_active_tabs()\n {\n (await browser.tabs.query({ active: true })).forEach(tab =>\n {\n update_in_tab(tab);\n });\n }", "function init() {\n\n // Poll open tabs and set a timer such that, if after half a second we find any tabs that need reloading,\n // we display the options page which will suggest a tab reload\n pollTabVersions();\n setTimeout(function() {\n if (tabVersions.current.length != tabVersions.counted) {\n chrome.tabs.create({'url': 'options.html'});\n }\n }, 500);\n\n // Listen for mark, jump, and last messages from content scripts\n chrome.extension.onMessage.addListener(\n function(request, sender, sendResponse) {\n if (request.action == \"mark\") {\n chrome.tabs.query({active: true, currentWindow: true}, function(tab) {\n keymap[request.key] = tab[0].id;\n msg('Tab Monkey', 'Marking this tab as #' + String.fromCharCode(request.key));\n });\n }\n else if (request.action == \"jump\") {\n if (request.key in keymap) {\n chrome.tabs.update(keymap[request.key], {active: true});\n }\n }\n else if (request.action == \"last\") {\n if (prevTab) {\n chrome.tabs.update(prevTab, {active: true});\n }\n }\n });\n\n // Listen for tab changes and record for future switches\n chrome.tabs.onSelectionChanged.addListener(function(newTab) {\n if (prevTab == null) {\n prevTab = newTab;\n }\n\n if (currentTab == null) {\n currentTab = newTab;\n } else {\n prevTab = currentTab;\n currentTab = newTab;\n }\n });\n\n}", "function update() {\n isEventbriteEventPage(function(e) {\n // Set the popup depending on whether this is an Eventbrite event page.\n setPopup(e);\n\n if (e) {\n // Set the icon to inform the user the plugin may be used.\n setIcon(\"icon\");\n\n // Check if the runner is already active\n chrome.storage.sync.get(null, function(response) {\n if (response.run) {\n // Set the icon\n setIcon(\"icon_active\");\n\n // Try to secure the ticket\n chrome.tabs.executeScript(null, {\n file: 'secureTicket.js'\n }, function() {\n if (chrome.runtime.lastError) {\n // An error has occurred.\n console.warn(\"Error encountered:\");\n console.warn(chrome.runtime.lastError);\n }\n });\n }\n })\n } else {\n setIcon(\"icon_bw\");\n }\n });\n}", "function updatePage() {\n chrome.storage.local.get('enabled', function (data) {\n console.log('content.get', data);\n toggleState(data.enabled);\n });\n}", "function checkTab() {\n\tchrome.tabs.query({active: true, currentWindow: true}, function(arrayOfTabs) {\n\tvar url = arrayOfTabs[0].url;\n\n\t\tif (url.indexOf(\"netflix.com\") > -1) {\n\t\t\n\t\t\t//show the button if netflix is the current tab\n\t\t\tvar id = arrayOfTabs[0].id;\n\t\t\tchrome.pageAction.show(id);\n\t\t\tif (timerOn == false) {\n\n\t\t\t\t//check if the day has changed\n\t\t\t\tvar d = new Date();\n\t\t\t\tvar n = parseInt(d.getDate());\n\t\t\t\tif (n != current) {\n\t\t\t\t\tchrome.storage.local.set({'remaining': reset, 'current': n}, function(something) {});\n\t\t\t\t}\t\t\t\n\t\t\t\t\n\t\t\t\t//start the timer\n\n\t\t\t\tstart(id);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//if the current tab is not netflix but the timer is on, turn it off\n\t\tif (url.indexOf(\"netflix.com\") == -1 && timerOn == true) {\n\t\t\tvar id = arrayOfTabs[0].id;\n\t\t\tchrome.pageAction.hide(id);\n\t\t\tstop(id);\n\t\t}\n\t});\n}", "function updateTabs() {\n getCurrentWindowTabs().then((tabs) => {\n tabCountInWindowTitle(tabs);\n for (let tab of tabs) {\n var tabIdtoString = tab.id.toString();\n\n if (tab.favIconUrl !=undefined){\n var favIconUrltoString = tab.favIconUrl.toString(); \n //console.log(favIconUrltoString + \" favIconUrltoString\") \n }else{\n var favIconUrltoString = \"logos/clearfavicon.png\";\n //console.log(favIconUrltoString + \" favIconUrltoString\") \n }\n tab.title = \"&\" + tab.title;\n if(tab.active){tab.title =tab.title + \" ~#~\"; console.log(\"tab active \" + tab.id);}\n\n browser.menus.update(tabIdtoString,{\n \"icons\": {\n \"16\": favIconUrltoString\n },\n title: tab.title\n });\n }\n });\n}", "function updateTabIcon(tab, options) {\n let icon;\n let badge;\n let badgeColor = '#555';\n\n try {\n if (options) {\n icon = options.icon;\n badge = options.badge;\n } else {\n var blocked;\n var disabled;\n\n var tabInfo = adguard.frames.getFrameInfo(tab);\n if (tabInfo.adguardDetected) {\n disabled = tabInfo.documentWhiteListed;\n blocked = '';\n } else {\n disabled = tabInfo.applicationFilteringDisabled;\n disabled = disabled || tabInfo.urlFilteringDisabled;\n disabled = disabled || tabInfo.documentWhiteListed;\n\n if (!disabled && adguard.settings.showPageStatistic()) {\n blocked = tabInfo.totalBlockedTab.toString();\n } else {\n blocked = '0';\n }\n }\n\n if (disabled) {\n icon = adguard.prefs.ICONS.ICON_GRAY;\n } else if (tabInfo.adguardDetected) {\n icon = adguard.prefs.ICONS.ICON_BLUE;\n } else {\n icon = adguard.prefs.ICONS.ICON_GREEN;\n }\n\n badge = adguard.utils.workaround.getBlockedCountText(blocked);\n\n // If there's an active notification, indicate it on the badge\n var notification = adguard.notifications.getCurrentNotification();\n if (notification && !tabInfo.adguardDetected) {\n badge = notification.badgeText;\n badgeColor = notification.badgeBgColor;\n }\n }\n\n adguard.browserAction.setBrowserAction(tab, icon, badge, badgeColor, browserActionTitle);\n } catch (ex) {\n adguard.console.error('Error while updating icon for tab {0}: {1}', tab.tabId, new Error(ex));\n }\n }", "function update() {\r\n var XSS_blocker = chrome.extension.getBackgroundPage().XSS_blocker;\r\n document.getElementById('XSS_toggle').value = XSS_blocker ? 'Disable' : 'Enable';\r\n var Ad_blocker = chrome.extension.getBackgroundPage().Ad_blocker;\r\n document.getElementById('Ad_toggle').value = Ad_blocker ? 'Disable' : 'Enable';\r\n }", "function edit_econtent() {\r\n var checkbox_econtentzone = document.querySelector('input[id=\"onoffswitch_2\"]'); //get the check box, the specific id \r\n checkbox_econtentzone.addEventListener('change', function() { //listen checkbox change event\r\n if (checkbox_econtentzone.checked == true) { //is checked\r\n const contentzone_btnEnable = true; // declare the btn is true is mean enable\r\n chrome.storage.local.set({ contentzone_btnEnable }); // set to the storage\r\n chrome.tabs.query({ currentWindow: true, active: true }, tabs => { // get all the active tabs and send a msg to activetabs \r\n tabs.forEach(tab =>\r\n chrome.tabs.sendMessage(tab.id, { contentzone_btnEnable }) // send to background page\r\n );\r\n });\r\n } else {\r\n const contentzone_btnEnable = false; // declare the btn is true is mean disable\r\n chrome.storage.local.set({ contentzone_btnEnable }); // set to the storage\r\n chrome.tabs.query({ currentWindow: true, active: true }, tabs => { // get all the active tabs and send a msg to activetabs \r\n tabs.forEach(tab =>\r\n chrome.tabs.sendMessage(tab.id, { contentzone_btnEnable }) // send to background page\r\n );\r\n });\r\n }\r\n });\r\n}", "async function on_tab_activated(info)\n {\n update_in_tab(await browser.tabs.get(info.tabId));\n }", "function onTabUpdate() {\n chrome.tabs.query({active: true}, function(tab) {\n chrome.tabs.executeScript(null, {\n file: \"findScript.js\"\n }, function() {\n if (chrome.runtime.lastError)\n updateBadge(\"#FF0\");\n });\n });\n}", "function onPageIconClick(tab) {\n chrome.tabs.sendRequest(tab.id, {\n name: \"toggle\"\n }, function(response) {\n if(response.status)\n enablePageIcon(tab);\n else\n disablePageIcon(tab);\n });\n}", "function checkCurrentTab() {\n\tchrome.tabs.query({\"active\": true, \"currentWindow\": true, \"windowType\": \"normal\"}, tabs => {\n\t\tvar tab = tabs[0];\n\n\t\t// popup/devTools windows ran result in null tab variable\n\t\tif (!tab) { return; }\n\n\t\t// get current URL\n\t\tvar currentURL = tab.url; \n\t\tconsole.log('Updating state from URL: ' + currentURL);\n\t\tchrome.storage.local.set({'url': currentURL});\n\n\t\t// check if URL matches a refugee need\n\t\tvar match = isMatch(currentURL);\n\t\t// update chrome.storage.local.isMatch\n\t\tchrome.storage.local.set({'isMatch': match});\n\t\t// update notification badge\n\t\tchrome.browserAction.setBadgeText({ text: match ? '1' : ''});\n\t});\n}", "function updateIcon() {\n if (current == \"cutebaycat-icon.png\") {\n current = \"cutebaycat-icon2.png\";\n chrome.browserAction.setIcon({path:current});\n chrome.browserAction.setTitle({text:\"Bid first. Bid last!\"});\n } else if (current == \"cutebaycat-icon2.png\") {\n current = \"cutebaycat-icon3.png\";\n chrome.browserAction.setIcon({path:current});\n chrome.browserAction.setTitle({text:\"Bid last. No bid!\"});\n } else {\n current = \"cutebaycat-icon.png\";\n chrome.browserAction.setIcon({path:current});\n chrome.browserAction.setTitle({text:\"No bid! Bid first!\"});\n }\n/* chrome.tabs.getSelected(null, function(tab) {\n chrome.tabs.sendMessage(tab.id, {greeting: current}, function(response) {\n console.log(response.farewell);\n });\n });*/\n}", "function updateActiveTab() {\n console.log(\"updateActiveTab ---------------\")\n /* \n function isSupportedProtocol(urlString) {\n var supportedProtocols = [\"https:\", \"http:\", \"ftp:\", \"file:\"];\n var url = document.createElement('a');\n url.href = urlString;\n return supportedProtocols.indexOf(url.protocol) != -1;\n }\n */\n function updateTab(tabs) {\n console.log(\"updateTabs\", tabs)\n if (tabs[0]) {\n currentTab = tabs[0];\n \n browser.bookmarks.getTree().then(bookmarkItems => {\n let bookmarks = [] \n const filter = (node) => { \n if(node.url){ \n helper.isSameBookmarkUrl(currentTab.url, node.url) && bookmarks.push(node)\n } else {\n node.children.forEach(x => filter(x) )\n }\n }\n bookmarkItems.forEach( x=> filter(x) )\n updateBadge(currentTab, bookmarks);\n })\n }\n }\n \n var gettingActiveTab = browser.tabs.query({active: true, currentWindow: true});\n gettingActiveTab.then(updateTab);\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 }", "function edit_product() { //listen to the pop up\r\n var checkbox = document.querySelector('input[id=\"onoffswitch_1\"]'); //get the check box\r\n checkbox.addEventListener('change', function() { //listen checkbox change event, either check or uncheck\r\n if (checkbox.checked == true) { //is checked\r\n const btnEnable = true; // declare the btn is true is mean enable\r\n chrome.storage.local.set({ btnEnable }); // set to the storage\r\n chrome.tabs.query({ currentWindow: true, active: true }, tabs => { // get all the active tabs and send a msg to activetabs \r\n tabs.forEach(tab =>\r\n chrome.tabs.sendMessage(tab.id, { btnEnable }) // send to background page\r\n );\r\n });\r\n } else {\r\n const btnEnable = false; // declare the btn is true is mean disable\r\n chrome.storage.local.set({ btnEnable }); // set to the storage\r\n chrome.tabs.query({ currentWindow: true, active: true }, tabs => { // get all the active tabs and send a msg to activetabs \r\n tabs.forEach(tab =>\r\n chrome.tabs.sendMessage(tab.id, { btnEnable }) // send to background page\r\n );\r\n });\r\n }\r\n });\r\n}", "function updateIcon(status) {\n let iconPath = \"app/images/icons/healthy_19.png\";\n switch (status) {\n case 'CHECKING':\n iconPath = \"app/images/icons/checking_19.png\";\n break;\n case 'OK':\n iconPath = \"app/images/icons/healthy_19.png\";\n break;\n case 'MAJOR_INCIDENT_CORE':\n iconPath = \"app/images/icons/disruption_19.png\";\n break;\n case 'MINOR_INCIDENT_CORE':\n iconPath = \"app/images/icons/degradation_19.png\";\n break;\n case 'MAINTENANCE_CORE':\n iconPath = \"app/images/icons/maintenance_19.png\";\n break;\n case 'INFORMATIONAL_CORE':\n iconPath = \"app/images/icons/information_19.png\";\n break;\n case 'MAJOR_INCIDENT_NONCORE':\n iconPath = \"app/images/icons/healthy_disruption_19.png\";\n break;\n case 'MINOR_INCIDENT_NONCORE':\n iconPath = \"app/images/icons/healthy_degradation_19.png\";\n break;\n case 'MAINTENANCE_NONCORE':\n iconPath = \"app/images/icons/healthy_maintenance_19.png\";\n break;\n case 'INFORMATIONAL_NONCORE':\n iconPath = \"app/images/icons/healthy_19.png\";\n break;\n }\n\n chrome.browserAction.setIcon({\n path: iconPath\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 edit_marketing_campaigns() {\r\n var checkbox_marketing_campaigns = document.querySelector('input[id=\"onoffswitch_3\"]'); //get the check box, the specific id \r\n checkbox_marketing_campaigns.addEventListener('change', function() { //listen checkbox change event\r\n if (checkbox_marketing_campaigns.checked == true) { //is checked\r\n const marketing_campaigns_btnEnable = true; // declare the btn is true is mean enable\r\n chrome.storage.local.set({ marketing_campaigns_btnEnable }); // set to the storage\r\n chrome.tabs.query({ currentWindow: true, active: true }, tabs => { // get all the active tabs and send a msg to activetabs \r\n tabs.forEach(tab =>\r\n chrome.tabs.sendMessage(tab.id, { marketing_campaigns_btnEnable }) // send to background page\r\n );\r\n });\r\n } else {\r\n const marketing_campaigns_btnEnable = false; // declare the btn is true is mean disable\r\n chrome.storage.local.set({ marketing_campaigns_btnEnable }); // set to the storage\r\n chrome.tabs.query({ currentWindow: true, active: true }, tabs => { // get all the active tabs and send a msg to activetabs \r\n tabs.forEach(tab =>\r\n chrome.tabs.sendMessage(tab.id, { marketing_campaigns_btnEnable }) // send to background page\r\n );\r\n });\r\n }\r\n });\r\n}", "function updateTab (tabs) {\n if (tabs[0]) {\n currentTab = tabs[0]\n let currentURL = currentTab.url\n if (!isValidURL(currentURL)) {\n hideIcon()\n } else {\n getOptions()\n .then(updateStatus)\n .then(updateUI)\n }\n }\n}", "function updateBrowserActionStatus(tab) {\n if (new URL(tab.url).hostname !== 'www.facebook.com' || !tab.active) {\n browser.browserAction.disable(tab.id)\n return\n }\n\n browser.browserAction.enable(tab.id)\n}", "function listenStartup() {\n\tchrome.runtime.onStartup.addListener(function () {\n\t\tupdateBadge();\n\t});\n}", "function updateActiveTab () {\n let gettingActiveTab = browser.tabs.query({active: true, currentWindow: true})\n gettingActiveTab.then(updateTab, onError)\n}", "function checkTaskbarIconActive() {\n taskbarIcons = document.querySelectorAll(\".taskbar-icon\");\n taskbarIcons.forEach((icon) => {\n icon.addEventListener(\"click\", () => {\n maximize_icon(icon.classList[0]);\n bringPanelToFront(icon);\n });\n });\n}", "function showIcon (color = 'red') {\n browser.pageAction.show(currentTab.id)\n updateIcon(true, color)\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 ============================= //", "function disablePageIcon(tab) {\n // if a style is applied to the current page\n //\n if (doesStyleExist(tab.url)) {\n chrome.pageAction.setIcon({\n tabId: tab.id,\n path: \"images/icons/sunjer_active.png\"\n });\n }\n\t\n else {\n chrome.pageAction.setIcon({\n tabId: tab.id,\n path: \"images/icons/sunjer.png\"\n });\n }\n\t\n chrome.pageAction.setTitle({\n tabId: tab.id,\n title: \"Click to start editing using sunjer\"\n });\n}", "function updateContextMenus() {\n chrome.tabs.query({ lastFocusedWindow: true, active: true },\n function(tabs) {\n var pagetype;\n var contexts = new Array();\n\n if (chrome.runtime.lastError == null && typeof tabs[0] != \"undefined\" && tabs[0].url != \"about:blank\") /* tab not closed or about:blank */ {\n pagetype = (typeof tabPageTypes[tabs[0].id] == \"undefined\") ? 0 : tabPageTypes[tabs[0].id];\n\n contexts = showSubmenu ? [\"all\"] : [\"browser_action\"];\n\n if (!specialPage(tabs[0].url) && tabs[0].status == \"complete\") {\n chrome.contextMenus.update(\"basicitems\", { contexts: contexts, enabled: (pagetype <= 1) });\n chrome.contextMenus.update(\"standarditems\", { contexts: contexts, enabled: (pagetype <= 1) });\n chrome.contextMenus.update(\"customitems\", { contexts: contexts, enabled: (pagetype <= 1) });\n chrome.contextMenus.update(\"viewpageinfo\", { contexts: contexts, enabled: (pagetype >= 1) });\n\n if (pagetype == 2) chrome.contextMenus.update(\"removeresourceloader\", { contexts: contexts, enabled: true });\n else chrome.contextMenus.update(\"removeresourceloader\", { contexts: [\"page_action\"], enabled: false });\n\n if (pagetype >= 1) chrome.contextMenus.update(\"extractmedia\", { contexts: [\"image\", \"audio\", \"video\"], enabled: true });\n else chrome.contextMenus.update(\"extractmedia\", { contexts: [\"page_action\"], enabled: false });\n } else {\n chrome.contextMenus.update(\"basicitems\", { contexts: contexts, enabled: false });\n chrome.contextMenus.update(\"standarditems\", { contexts: contexts, enabled: false });\n chrome.contextMenus.update(\"customitems\", { contexts: contexts, enabled: false });\n chrome.contextMenus.update(\"viewpageinfo\", { contexts: contexts, enabled: false });\n chrome.contextMenus.update(\"removeresourceloader\", { contexts: [\"page_action\"], enabled: false });\n chrome.contextMenus.update(\"extractmedia\", { contexts: [\"page_action\"], enabled: false });\n }\n }\n });\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 on_tab_updated(id, change_info, tab)\n {\n if (tab.active && change_info.url) { update_in_tab(tab); }\n }", "function attachListeners() {\n chrome.pageAction.onClicked.addListener(onPageIconClick);\n \n chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) {\t\t\n if (tab.url.match(\"^http\") == \"http\" && tab.url.indexOf(\"https://chrome.google.com/extensions\") == -1) {\n chrome.pageAction.show(tabId);\n disablePageIcon(tab);\n }\n });\n\n chrome.tabs.onSelectionChanged.addListener(function(tabId, selectInfo) {\n chrome.tabs.get(tabId, function(tab) {\n refreshPageIcon(tab);\n });\n });\n \n chrome.extension.onRequest.addListener( function(request, sender, sendResponse) {\n switch (request.name) {\n case \"getMenuData\" \t:\n getMenuData(request.query,sendResponse);\n// sendResponse();\n break;\n\n case \"enablePageIcon\" \t:\n enablePageIcon(sender.tab);\n sendResponse({});\n break;\n \n case \"disablePageIcon\" \t \t:\n disablePageIcon(sender.tab);\n sendResponse({});\n break;\n \n case \"copyToClipboard\" \t:\n copyToClipboard(request.text);\n sendResponse({});\n break;\n \n case \"save\" \t:\n save(request.url, request.rules, request.data);\n sendResponse({});\n break;\n\n case \"doesStyleExist\" \t:\n sendResponse(doesStyleExist(request.url));\n break;\n\n case \"transfer\" \t:\n transfer(request.source, request.destination);\n sendResponse({});\n break;\n \n case \"getRulesForPage\" \t:\n sendResponse(getRulesForPage(request.url));\n break;\n \n case \"fetchOptions\" \t:\n sendResponse({\n options: elements.options,\n enabledAccordions: elements.enabledAccordions\n });\n break;\n\n case \"saveAccordionState\"\t:\n saveAccordionState(request.enabledAccordions);\n sendResponse({});\n break;\n\t\t\t\n case \"savePreference\"\t\t:\n savePreference(request.preference);\n sendResponse({});\n break;\n\t\t\t\n case \"getPreference\"\t\t:\n sendResponse(getPreference(request.preferenceName));\n break;\n\n case \"pushStyles\"\t\t\t:\n pushStyles();\n sendResponse({});\n break;\n }\n });\n}", "function _iconIsPaused() {\n clearTimeout( _iconIsRecording );\n chrome.browserAction.setIcon( { path: 'assets/img/icons/rec/6.png', tabId: currentTabId } );\n }", "function refreshActiveTabs (BN, is_deleted) {\r\n browser.tabs.query({active: true})\r\n .then(\r\n\tfunction (a_tabs) {\r\n\t let len = a_tabs.length;\r\n\t let tab, tabUrl, tabFaviconUrl, is_refreshFav, is_nofavicon, foundBN;\r\n\t for (let i=0 ; i<len ; i++) {\r\n\t\ttab = a_tabs[i];\r\n\t\ttabUrl = tab.url;\r\n\t\tif ((tabUrl != undefined)\r\n\t\t\t&& (!tabUrl.startsWith(\"view-source:\"))\r\n\t\t ) {\r\n\t\t // Handle specific wyciwyg:// case\r\n\t\t if (tabUrl.startsWith(\"wyciwyg://\")) { // Cached URL wyciwyg://x/.... Cf. https://en.wikipedia.org/wiki/WYCIWYG\r\n\t\t\t// Find start of real URL, which is after the first \"/\" after \"wyciwyg://x\"\r\n\t\t\tlet pos = tabUrl.indexOf(\"/\", 10) + 1;\r\n\t\t\ttabUrl = tabUrl.substring(pos);\r\n\t\t }\r\n\t\t tabFaviconUrl = tab.favIconUrl;\r\n\t\t is_refreshFav = !options.disableFavicons\t\t // Ignore if options.disableFavicons is set\r\n/*\t\t\t\t\t\t && !options.pauseFavicons\t // Ignore if options.pauseFavicons is set */\r\n\t\t\t\t\t\t && (!is_deleted || options.trashEnabled) // Ignore if really deleting bookmarks\r\n\t\t\t\t\t\t && (tabFaviconUrl != undefined) // Need a favicon URI\r\n\t\t\t\t\t\t ;\r\n\t\t is_nofavicon = is_notCollectableFaviconFromTab(tabFaviconUrl, tabUrl);\r\n\t\t foundBN = refreshBTNTreeFavicon(BN, tabFaviconUrl, tabUrl, is_refreshFav, is_nofavicon);\r\n\t\t if (foundBN != undefined) {\r\n\t\t\tif (!is_deleted) {\r\n\t\t\t baFoundBN_id[tab.windowId] = foundBN.id;\r\n\t\t\t browser.browserAction.setIcon(\r\n\t\t\t\t{path: \"icons/star2bkmked.png\",\r\n\t\t\t\t tabId: tab.id\r\n\t\t\t\t}\r\n\t\t\t );\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t baFoundBN_id[tab.windowId] = undefined;\r\n\t\t\t browser.browserAction.setIcon(\r\n\t\t\t\t{tabId: tab.id\r\n\t\t\t\t}\r\n\t\t\t );\r\n\t\t\t}\r\n\t\t } // Else do not touch BSP2 icon for that tab\r\n\t\t}\r\n\t }\r\n\t}\r\n );\r\n}", "function updatePageFromCurrentDomain() {\n console.log('loadCurrentDomainSettings');\n chrome.tabs.query({ //This method output active URL \n 'active': true,\n 'currentWindow': true\n }, function (tabs) {\n var tab = tabs[0];\n var domain = domainFromURL(tab.url);\n updatePageWithDomain(domain);\n });\n}", "function onTabUpdated() {\n info(\"event: Chrome says that tab was updated\");\n\n // Restrict to non-single-post Google+ pages\n if (!isEnabledOnThisPage())\n return;\n\n // If list mode, make sure the correct last opened entry is unfolded, now\n // that we know that window.location.href is correct\n if (displayMode == 'list')\n unfoldLastOpenInListMode();\n\n // If switching between Streams to Games, we need to inject the content pane buttons.\n // At this time, one of the content panes will be hidden -- we need to pick out the correct\n // subtree\n var $contentPaneDiv = $(_ID_CONTENT_PANE + ' > :not([style*=\"none\"])');\n updateContentPaneButtons($contentPaneDiv);\n}", "function refreshAppAndExtensionMenus() {\r\n\tif (!refreshingAppAndExtensionMenus) {\r\n\t\trefreshingAppAndExtensionMenus = true;\r\n\t\tvar appHtml = '';\r\n\t\t$('menu[apps]').html('<menuName>Apps</menuName>').append('<items class=\"displayNone\"><group active></group><group inactive></group>' +\r\n\t\t\t\t'<item style=\"background-image:url(/img/icon-webstore.png)\"><a getMoreApps href=\"https://chrome.google.com/webstore/\">Get more apps</a></item></items>');\r\n\t\t$('menu[extensions]').html('<menuName>Extensions</menuName>').append('<items class=\"displayNone\"><group active></group><group inactive></group>' +\r\n\t\t\t'<item style=\"background-image:url(/img/icon-webstore.png)\"><a getMoreExtensions href=\"https://chrome.google.com/webstore/category/extensions\">Get more extensions</a></item>' +\r\n\t\t\t(\r\n\t\t\t\tlocalStorage.option_extensionsMenu_showExtensionsLink == 1 ?\r\n\t\t\t\t\t'<hr /><item style=\"background-image:url(chrome://favicon/chrome://plugins)\"><a href=\"chrome://extensions\">Open the extensions page</a></item></items>'\r\n\t\t\t\t\t: ''\r\n\t\t\t)\r\n\t\t);\r\n\t\trepositionMenus();\r\n\t\tchrome.management.getAll(function(extensions){\r\n\t\t\tvar sortedExtensions = [];\r\n\t\t\tvar e = '';\r\n\t\t\tfor (var ex in extensions) {\r\n\t\t\t\te = extensions[ex];\r\n\t\t\t\tsortedExtensions[e.name+' 0'+e.id] = e;\r\n\t\t\t}\r\n\t\t\tvar names = sortKeys(sortedExtensions).sort(sortKeysAlphabetically);\r\n\t\t\tfor (var n in names) {\r\n\t\t\t\te = sortedExtensions[names[n]];\r\n\t\t\t\tvar smallestIconSize = 0;\r\n\t\t\t\tvar iconUrl = '';\r\n\t\t\t\tfor (var i in e.icons) {\r\n\t\t\t\t\tif (e.icons[i].size < smallestIconSize || !smallestIconSize) {\r\n\t\t\t\t\t\tsmallestIconSize = e.icons[i].size;\r\n\t\t\t\t\t\ticonUrl = e.icons[i].url;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (!iconUrl.length) {\r\n\t\t\t\t\ticonUrl = 'chrome://favicon/chrome://extensions';\r\n\t\t\t\t}\r\n\t\t\t\tvar s = 'menu['+(e.isApp ? 'apps' : 'extensions')+'] items group['+(e.enabled ? 'active' : 'inactive')+']';\r\n\t\t\t\tvar homepageIcon = '';\r\n\t\t\t\tif (e.homepageUrl && e.homepageUrl.length) {\r\n\t\t\t\t\tvar storeDetail = 'https://chrome.google.com/webstore/detail/';\r\n\t\t\t\t\thomepageIcon = 'chrome://favicon/' + (e.homepageUrl.substr(0,storeDetail.length) == storeDetail ? 'https://chrome.google.com/webstore' : e.homepageUrl);\r\n\t\t\t\t}\r\n\t\t\t\t$(s).append(\r\n\t\t\t\t\t'<item style=\"background-image:url('+iconUrl+(e.enabled ? '' : '?grayscale=true')+')\">' +\r\n\t\t\t\t\t\t'<items>' +\r\n\t\t\t\t\t\t\t(e.appLaunchUrl && e.appLaunchUrl.length ? '<item><a href=\"'+e.appLaunchUrl+'\">Launch app</a></item><hr/>' : '') +\r\n\t\t\t\t\t\t\t(e.homepageUrl && e.homepageUrl.length ? '<item><a href=\"'+e.homepageUrl+'\">Visit website</a></item><hr />' : '') +\r\n\t\t\t\t\t\t\t(e.optionsUrl && e.optionsUrl.length && e.enabled ? '<item style=\"background-image:url(/img/wrench.png)\"><a href=\"'+e.optionsUrl+'\">Options</a></item>' : '') +\r\n\t\t\t\t\t\t\t(e.enabled ? '<item><a disable extensionId=\"'+e.id+'\">Disable</a></item>' : '<item><a enable extensionId=\"'+e.id+'\">Enable</a></item>') +\r\n\t\t\t\t\t\t\t'<item><a uninstall extensionId=\"'+e.id+'\">Uninstall</a></item><hr />' +\r\n\t\t\t\t\t\t\t'<item faded><a>Version '+e.version+'</a></item>' +\r\n\t\t\t\t\t\t'</items>' +\r\n\t\t\t\t\t\t'<a extensionName '+(e.appLaunchUrl && e.enabled ? 'href=\"'+e.appLaunchUrl+'\"' : '')+'><arrow>&#x25BC;</arrow>'+e.name+'</a>' +\r\n\t\t\t\t\t'</item>'\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t\t$('menu[apps] group[active] item').length && $('menu[apps] group[active]').after('<hr/>');\r\n\t\t\t$('menu[apps] group[inactive] item').length && $('menu[apps] group[inactive]').after('<hr/>');\r\n\t\t\tif (!$('menu[apps] group[active] item').length && !$('menu[apps] group[inactive] item').length) {\r\n\t\t\t\t$('a[getMoreApps]').html('Get apps from the Chrome Web Store');\r\n\t\t\t}\r\n\r\n\t\t\t$('menu[extensions] group[active] item').length && $('menu[extensions] group[active]').after('<hr/>');\r\n\t\t\t$('menu[extensions] group[inactive] item').length && $('menu[extensions] group[inactive]').after('<hr/>');\r\n\t\t\tif (!$('menu[extensions] group[active] item').length && !$('menu[extensions] group[inactive] item').length) {\r\n\t\t\t\t$('a[getMoreExtensions]').html('Get extensions from the Chrome Web Store');\r\n\t\t\t}\r\n\r\n\t\t\t$('menu[apps] > items group, menu[extensions] > items group').each(function(){\r\n\t\t\t\tif (!$(this).children().length) {\r\n\t\t\t\t\t$(this).next('hr').remove();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\trepositionMenus();\r\n\t\t\trefreshingAppAndExtensionMenus = false;\r\n\t\t\t$('menu items.displayNone').removeClass('displayNone');\r\n\t\t});\r\n\t}\r\n}", "function openUpdateLink(){\n extension.tabs.create({\n \"url\": \"https://addons.mozilla.org/en-US/firefox/addon/stack-counter/?src=search\"\n });\n}", "function initializePageAction(tab) {\n if (protocolIsApplicable(tab.url) && hostIsApplicable(tab.url)) {\n browser.pageAction.setIcon({tabId: tab.id, path: \"icons/off.svg\"});\n browser.pageAction.setTitle({tabId: tab.id, title: TITLE_ENABLE});\n browser.pageAction.show(tab.id);\n }\n}", "function setIcon(myURL){\r\n\t//--------UPDATE THE URL THE JAVASCRIPT IS LOOKING FOR so that it only work for your client ID--------//\r\n\t//var urlCheck = new RegExp(\"^https:\\/\\/berea.askadmissions.net\\/admin\\/\");\r\n\t//--------Once updated, remove or comment our the line below.--------//\r\n\tvar urlCheck = new RegExp(\"^https:\\/\\/.+.askadmissions.net\\/admin\\/\");\r\n var askadmissions = urlCheck.test(myURL);\r\n \t\r\n\tif( askadmissions === true){\r\n\t\tchrome.browserAction.setIcon({path: \"icons/icon_48.png\"});\r\n\t\tchrome.browserAction.setPopup({popup: \"\"});\r\n\t\taskadmissionsPage = true;\r\n\t}else{\r\n\t\tchrome.browserAction.setIcon({path: \"icons/icon_48(gray).png\"});\r\n\t\taskadmissionsPage = false;\r\n\t\tchrome.browserAction.setPopup({popup: \"/fail.html\"});\r\n\t}\r\n}", "function iconEnabled(foundMatch) {\n\tif (foundMatch) {\n\t\tchrome.browserAction.setTitle({title: \"Template Match\"});\n\t\tchrome.browserAction.enable(tabId);\n\t}\n\telse {\n\t\tchrome.browserAction.setTitle({title: \"No Match\"});\n\t\tchrome.browserAction.disable(tabId);\n\t}\n}", "function onTick () {\n Object.keys(tabStore).forEach(id => {\n id = parseInt(id, 10); // feels like good old rhino\n let tab = tabStore[id];\n tab.current++;\n if (tab.current >= tab.time) {\n tab.current = 0;\n chrome.tabs.get(id, realTab => {\n if (realTab) {\n tab.reloaded++;\n chrome.tabs.reload(id, { bypassCache: NOCACHE }, () => {\n updateBadge(id); // this will be wiped out at reload end, heck\n });\n } else {\n deregister(id);\n }\n });\n }\n });\n}", "function toggleActiveStatus() {\r\n chrome.storage.sync.get(\"status\", function(update) {\r\n if (update.status === true) {\r\n console.log(update.status);\r\n toggleButton[0].classList.add(\"active\");\r\n } else {\r\n toggleButton[0].classList.remove(\"active\");\r\n }\r\n });\r\n}", "function duringBreakExtension() {\n //Show time on icon badge \n chrome.browserAction.setBadgeBackgroundColor({\n color: \"red\"\n });\n chrome.browserAction.setBadgeText({\n text: Vars.Timer\n });\n}", "function UpdatePageAction(tab) {\n if (!tab.ws.length) {\n window.browser.pageAction.hide(tab.id)\n window.browser.pageAction.setTitle({\n tabId: tab.id,\n title: 'WebSocket not detected',\n })\n window.browser.pageAction.setIcon({\n tabId: tab.id,\n path: {\n '19': './assets/icons/ws-16_logo_inact.png',\n '38': './assets/icons/ws-32_logo_inact.png',\n },\n })\n window.browser.pageAction.setPopup({\n tabId: tab.id,\n popup: '',\n })\n } else {\n window.browser.pageAction.show(tab.id)\n window.browser.pageAction.setTitle({\n tabId: tab.id,\n title: 'WebSocket detected',\n })\n window.browser.pageAction.setIcon({\n tabId: tab.id,\n path: {\n '19': './assets/icons/ws-16_logo.png',\n '38': './assets/icons/ws-32_logo.png',\n },\n })\n window.browser.pageAction.setPopup({\n tabId: tab.id,\n popup: './assets/ws-list.html',\n })\n }\n}", "function iconClickSettingsChanged() {\n resetIconClickActionAndPopup();\n chromeBrowserAction.onClicked.removeListener(executeIconClickConnectAction);\n\n function setIconClickConnectAction() {\n resetBrowserActionPopup();\n chromeBrowserAction.onClicked.addListener(executeIconClickConnectAction);\n }\n\n if (viewUpdateNotifier) {\n chromeBrowserAction.setPopup({ popup: \"updateNotifier.html#\" + viewUpdateNotifier });\n } else if (!player.connected) {\n //set popup if we are currently connecting\n if (!connecting && getAvailableIconClickConnectAction()) setIconClickConnectAction();\n else setBrowserActionPopup();\n } else setIconClickActionOrPopup();\n }", "function enablePageAction(tab) {\n browser.pageAction.show(tab.id);\n browser.pageAction.onClicked.addListener(() =>\n browser.runtime.openOptionsPage(),\n );\n }", "function _iconIsRecording() {\n if ( currentConfig.isRecording !== undefined ) {\n if ( currentConfig.isRecording === true ) {\n chrome.browserAction.setIcon( { path: 'assets/img/icons/rec/' + current + '.png', tabId: currentTabId } );\n if ( current++ > max ) {\n current = min;\n }\n window.setTimeout( _iconIsRecording, 150 );\n }\n }\n else {\n clearTimeout( _iconIsRecording );\n }\n }", "function sendStatus(){\n chrome.runtime.sendMessage({'message': 'update', 'running': isRunning});\n}", "function idle(id){\n synth.cancel();\n state = \"idle\";\n chrome.browserAction.setIcon(\n {\n path: \"logo-32.png\",\n tabId: id\n },\n function(){\n console.log(\"Icon changed to Green\");\n }\n );\n}", "function updatedListener(tabId, changeInfo, tab) {\n thePageClock.filteredUpdate();\n}", "function update_icon()\n {\n const icon = bookmarks.is_unlocked() ? \"unlocked-bookmarks.svg\" :\n \"locked-bookmarks.svg\";\n const path = `/icons/main/${icon}`;\n browser.browserAction.setIcon({\n path:\n {\n \"16\": path,\n \"32\": path,\n \"48\": path,\n \"64\": path,\n \"96\": path,\n \"128\": path,\n \"256\": path\n }\n });\n }", "function reselectPrice() {\n \n var url = getNotificationUrl(this);\n chrome.tabs.getSelected(null, function(selectedTab) {\n chrome.tabs.getAllInWindow(null, function(localTabs) {\n \n var foundUrl = false;\n for (var i = 0; i < localTabs.length; i++) {\n \n if(localTabs[i].url == url) \n {\n foundUrl = true;\n chrome.tabs.update(localTabs[i].id, {selected: true});\n break;\n }\n }\n if (foundUrl == false)\n {\n chrome.tabs.create({url: url, active: true});\n }\n\n chrome.tabs.getSelected(null, function(tab) {\n initializePageModePickerPopup(tab);\n chrome.tabs.getAllInWindow(null, function(tabs){\n var found = false;\n for (var i = 0; i < tabs.length; i++) {\n if(tabs[i].url == chrome.extension.getURL(\"options.htm\")) \n found = true;\n }\n if (found == false)\n {\n chrome.tabs.create({url: \"options.htm\", active: false});\n }\n addPage({url: tab.url, name: tab.title}, function() {\n BG.takeSnapshot(tab.url);\n });\n });\n });\n });\n });\n}", "function tabModified (tabId, changeInfo, tabInfo) {\r\n let winId = tabInfo.windowId;\r\n/*\r\n trace('-------------------------------------');\r\n trace(\"A tab was updated.\\r\\n\"\r\n\t +\"tabId: \"+tabId+\"\\r\\n\"\r\n\t +\"changeInfo.favIconUrl: \"+changeInfo.favIconUrl+\"\\r\\n\"\r\n\t +\"changeInfo.status: \"+changeInfo.status+\"\\r\\n\"\r\n\t +\"changeInfo.title: \"+changeInfo.title+\"\\r\\n\"\r\n\t +\"changeInfo.url: \"+changeInfo.url+\"\\r\\n\"\r\n\t +\"tabInfo.favIconUrl: \"+tabInfo.favIconUrl+\"\\r\\n\"\r\n\t +\"tabInfo.index: \"+tabInfo.index+\"\\r\\n\"\r\n\t +\"tabInfo.status: \"+tabInfo.status+\"\\r\\n\"\r\n\t +\"tabInfo.title: \"+tabInfo.title+\"\\r\\n\"\r\n\t +\"tabInfo.url: \"+tabInfo.url+\"\\r\\n\"\r\n\t +\"winId: \"+winId+\"\\r\\n\"\r\n\t );\r\n*/\r\n// if (tabInfo.status == \"complete\") {\r\n if ((tabInfo.status == \"complete\") && (changeInfo.status == \"complete\")) {\r\n\tlet tabUrl = tabInfo.url;\r\n//console.log(\"A tab was updated 1 - tabUrl: \"+tabUrl);\r\n\t// Verify this is a searchable url - If not, we get exception:\r\n\t// Type error for parameter query (Value must either: be a string value, or .url must match the format \"url\")\r\n\tif ((tabUrl != undefined)\r\n\t\t&& (!tabUrl.startsWith(\"view-source:\"))\r\n\t ) {\r\n\t try {\r\n\t\t// Handle specific wyciwyg:// case\r\n\t\tif (tabUrl.startsWith(\"wyciwyg://\")) { // Cached URL wyciwyg://x/.... Cf. https://en.wikipedia.org/wiki/WYCIWYG\r\n\t\t // Find start of real URL, which is after the first \"/\" after \"wyciwyg://x\"\r\n\t\t let pos = tabUrl.indexOf(\"/\", 10) + 1;\r\n\t\t tabUrl = tabUrl.substring(pos);\r\n\t\t}\r\n\t\t// Look for a bookmark matching the url\r\n\t\t// It seems that parameters can make the search API fail and return 0 results sometimes, so strip them out,\r\n\t\t// we will really compare on returned results.\r\n\t\tlet simpleUrl;\r\n\t\tlet paramsPos = tabUrl.indexOf(\"?\");\r\n\t\tif (paramsPos >= 0) {\r\n\t\t simpleUrl = tabUrl.slice(0, paramsPos);\r\n\t\t}\r\n\t\telse {\r\n\t\t simpleUrl = tabUrl;\r\n\t\t}\r\n//\t\tbrowser.bookmarks.search({url: tabUrl})\r\n\t\tbrowser.bookmarks.search(decodeURI(simpleUrl)) // Search workaround to avoid exceptions on about:, file: ... URLs, cf. https://bugzilla.mozilla.org/show_bug.cgi?id=1352835\r\n\t\t.then(\r\n\t\t function (a_BTN) { // An array of BookmarkTreeNode\r\n\t\t\tlet len = a_BTN.length;\r\n/*\r\nconsole.log('-------------------------------------');\r\nconsole.log(\"A tab was updated 2 - tabUrl: \"+tabUrl);\r\nconsole.log(\"Results: \"+len);\r\nconsole.log(\"A tab was updated.\\r\\n\"\r\n\t\t\t+\"tabId: \"+tabId+\"\\r\\n\"\r\n\t\t\t+\"changeInfo.favIconUrl: \"+changeInfo.favIconUrl+\"\\r\\n\"\r\n\t\t\t+\"changeInfo.status: \"+changeInfo.status+\"\\r\\n\"\r\n\t\t\t+\"changeInfo.title: \"+changeInfo.title+\"\\r\\n\"\r\n\t\t\t+\"changeInfo.url: \"+changeInfo.url+\"\\r\\n\"\r\n\t\t\t+\"tabInfo.favIconUrl: \"+tabInfo.favIconUrl+\"\\r\\n\"\r\n\t\t\t+\"tabInfo.index: \"+tabInfo.index+\"\\r\\n\"\r\n\t\t\t+\"tabInfo.status: \"+tabInfo.status+\"\\r\\n\"\r\n\t\t\t+\"tabInfo.title: \"+tabInfo.title+\"\\r\\n\"\r\n\t\t\t+\"tabInfo.url: \"+tabInfo.url+\"\\r\\n\"\r\n\t\t\t+\"winId: \"+winId+\"\\r\\n\"\r\n\t\t );\r\n*/\r\n\t\t\tif (len > 0) { // This could be a bookmarked tab\r\n\t\t\t // If there is a favicon and we are collecting them, refresh all coorresponding BookmarkNodes with it\r\n\t\t\t let tabFaviconUrl = tabInfo.favIconUrl;\r\n\t\t\t let chgFaviconUrl = changeInfo.favIconUrl;\r\n//\t\t\t let chgStatus = changeInfo.status;\r\n\t\t\t let is_refreshFav = !options.disableFavicons\t\t // Ignore if options.disableFavicons is set\r\n/*\t\t\t\t\t\t\t\t && !options.pauseFavicons\t\t // Ignore if options.pauseFavicons is set */\r\n\t\t\t\t\t\t\t\t && (tabFaviconUrl != undefined) // Need a favicon URI\r\n\t\t\t\t\t\t\t\t && (tabUrl != \"about:blank\") // For something else than about:blank, which appears intermitently when reloading a tab\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t // There was no favicon change, just a tab switch OR this is a tab reload with a new URL / favicon\r\n//\t\t\t\t\t\t\t\t && (((chgFaviconUrl == undefined) && ((chgStatus == undefined) || (chgStatus == \"complete\")) && (changeInfo.title == undefined) && (changeInfo.url == undefined))\r\n//\t\t\t\t\t\t\t\t\t || (chgFaviconUrl == tabFaviconUrl) \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 let foundBN_id = refreshBTNArrayFavicon(a_BTN, len, tabFaviconUrl, tabUrl, is_refreshFav);\r\n \t\t\t baFoundBN_id[winId] = foundBN_id; // Forget about previous found one\r\n\t\t\t // Show a bookmarked BSP2 star for this tab, if we found a corresponding bookmark not in BSP2 trash\r\n\t\t\t if (foundBN_id != undefined) {\r\n\t\t\t\tbrowser.browserAction.setIcon(\r\n\t\t\t\t {path: \"icons/star2bkmked.png\",\r\n\t\t\t\t tabId: tabId\r\n\t\t\t\t }\r\n\t\t\t\t);\r\n\t\t\t }\r\n\t\t\t else { // Reset to unbookmarked BSP2 icon\r\n\t\t\t\tbrowser.browserAction.setIcon(\r\n\t\t\t\t {tabId: tabId\r\n\t\t\t\t }\r\n\t\t\t\t);\r\n\t\t\t }\r\n\t\t\t}\r\n\t\t\telse { // Reset to unbookmarked BSP2 icon\r\n\t\t\t baFoundBN_id[winId] = undefined;\r\n\t\t\t browser.browserAction.setIcon(\r\n\t\t\t\t{tabId: tabId\r\n\t\t\t\t}\r\n\t\t\t );\r\n\t\t\t}\r\n\t\t }\r\n\t\t);\r\n\t } catch (err) {\r\n\t\t// Reset to unbookmarked BSP2 icon\r\n\t\tbaFoundBN_id[winId] = undefined;\r\n\t\tbrowser.browserAction.setIcon(\r\n\t\t {tabId: tabId\r\n\t\t }\r\n\t\t);\r\n\r\n\t\tlet msg = \"Error in searching url \"+tabUrl+\" on tabModified : \"+err;\r\n\t\tconsole.log(msg);\r\n\t\tif (err != undefined) {\r\n\t\t let fn = err.fileName;\r\n\t\t if (fn == undefined) fn = err.filename; // Not constant :-( Some errors have filename, and others have fileName \r\n\t\t console.log(\"fileName: \"+fn);\r\n\t\t console.log(\"lineNumber: \"+err.lineNumber);\r\n\t\t}\r\n\t }\r\n\t}\r\n\telse { // Reset to unbookmarked BSP2 icon\r\n\t baFoundBN_id[winId] = undefined;\r\n\t browser.browserAction.setIcon(\r\n\t\t{tabId: tabId\r\n\t\t}\r\n\t );\r\n\t}\r\n }\r\n}", "toggle(){\n if(zoteroRoam.interface.icon.getAttribute('status') == \"off\"){\n zoteroRoam.extension.load();\n } else {\n zoteroRoam.extension.unload();\n }\n }", "function updateView() {\n var isTokenOk = loader.TokenNotNull();\n\n if (isTokenOk) {\n chrome.browserAction.setIcon({ 'path' : '../images/icon-16.gif'});\n\n //loader.Load(false);\n }\n else {\n chrome.browserAction.setIcon({ 'path' : '../images/icon-16gray.gif'});\n //chrome.browserAction.setPopup({popup : \"\"});\n //loader.Clear();\n }\n}", "async function update_in_tab(tab)\n {\n if (bookmarks.is_locked() ||\n (do_limit_to_private_context && !tab.incognito) ||\n tab.url.startsWith(\"about:\") ||\n (await bookmarks.contains_url(tab.url)))\n {\n browser.pageAction.hide(tab.id);\n delete host_tab_ids[tab.id];\n }\n else\n {\n browser.pageAction.show(tab.id);\n host_tab_ids[tab.id] = true;\n }\n }", "function checkReadyness() {\n var ready_status = chrome.extension.getBackgroundPage().CurrentTabReadiness();\n if (ready_status == \"unknown\") {\n document.getElementById(\"not_ready_alert\").innerHTML =\n \"Please reload the page.\";\n ready = false;\n setTimeout(\"checkReadyness()\", 100);\n } else if (ready_status == \"ready\") {\n ready = true;\n document.getElementById(\"snip_button\").className = \"action\";\n document.getElementById(\"snip_text\").innerHTML = \"Click to Snip!\";\n document.getElementById(\"not_ready_alert\").style.display = \"none\";\n } else { // loading\n document.getElementById(\"not_ready_alert\").innerHTML =\n \"Waiting for page to complete loading...\";\n ready = false;\n setTimeout(\"checkReadyness()\", 100);\n }\n}", "function updateBrowseAction(status) {\n if (status == null) status = undefined;\n var icon = ICON_ENABLED;\n \n if (status == undefined || Object.entries(status).length == 0) {\n\ticon=ICON_DISABLED;\n\tbrowser.browserAction.setPopup( {tabId: currentTab.id, popup: \"\" });\n\t\n } else {\n\tbrowser.browserAction.setPopup( {tabId: currentTab.id, popup: POPUP_URL });\n }\n \n //browser.browserAction.setIcon({\n // path: icon,\n // tabId: currentTab.id\n //});\n \n /*browser.browserAction.setTitle({\n title: 'Unbookmark it!',\n tabId: currentTab.id\n })*/;\n}", "function handleUpdated(tabId, changeInfo, tabInfo) {\n //Request Running rules details from background script\n browser.runtime.sendMessage({event: \"Running-rules\"});\n}", "function updateIcon () {\n browser.browserAction.setIcon({\n path: currentBookmark\n ? {\n 19: '../public/star-filled-19.png',\n 38: '../public/star-filled-38.png'\n }\n : {\n 19: '../public/star-empty-19.png',\n 38: '../public/star-empty-38.png'\n },\n tabId: currentTab.id\n })\n browser.browserAction.setTitle({\n // Screen readers can see the title\n title: currentBookmark ? 'Unbookmark it!' : 'Bookmark it!',\n tabId: currentTab.id\n })\n}", "_settings_changed() {\n \tif (!this.settings_already_changed) {\n \t\tMain.notify(\"Please restart BaBar extension to apply changes.\");\n \t\tthis.settings_already_changed = true;\n \t}\n }", "function _processEnabled() {\n\t\t// update context menu text\n\t\tvar label = JSON.parse(localStorage.enabled) ? 'Disable' : 'Enable';\n\t\t_updateBadgeText();\n\t\tchrome.contextMenus.update('ENABLE_MENU', {title: label}, function() {\n\t\t\tif (chrome.runtime.lastError) {\n\t\t\t\tconsole.log(chrome.runtime.lastError.message);\n\t\t\t}\n\t\t});\n\t}", "function handleUpdated(tabId, changeInfo, tabInfo) {\r\n if (changeInfo.url) {\r\n \tsetIcon(changeInfo.url)\r\n }\r\n}", "function updateBrowserIcon() {\n if (browserIconCtx) chromeBrowserAction.setIcon({ imageData: { \"38\": browserIconCtx.getImageData(0, 0, 38, 38) } });\n }", "function displayIcon()\n\t{\n\t\tif( lastUrl != document.location.href )\n\t\t\tchrome.extension.sendMessage(\"displayIcon\");\n\n\t\tlastUrl = document.location.href;\n\n\t\tsetTimeout( displayIcon, 1000 );\n\t}", "function show_work_panel(){\n chrome.tabs.query({'active': true}, function (tabs) {\n var page_url = tabs[0].url;\n var exist_url = $('#work_panel').data('exist-url');\n var user_token = localStorage['user_token'];\n\n $('#add_link, #keep_link, #unkeep_link').hide();\n $.ajax({\n url: exist_url,\n type: 'GET',\n dataType: 'json',\n data: {user_token: user_token, url: page_url},\n success: function(resp){\n if(resp.status != null && resp.status.code == 200){\n if(resp.link.state == 0) return $('#keep_link').show(); \n if(resp.link.state == 5) return $('#unkeep_link').show(); \n }\n $('#add_link').show();\n },\n error: function(xhr, status, err){\n $('#add_link').show(); \n }\n });\n $('#work_panel').fadeIn(300);\n });\n }", "onTabChange(evt) {\n const win = evt.target.ownerGlobal;\n const currentURI = win.gBrowser.currentURI;\n // Don't show the page action if page is not http or https\n if (currentURI.scheme !== \"http\" && currentURI.scheme !== \"https\") {\n this.hidePageAction(win.document);\n return;\n }\n\n const currentWin = Services.wm.getMostRecentWindow(\"navigator:browser\");\n\n // If user changes tabs but stays within current window we want to update\n // the status of the pageAction, then reshow it if the new page has had any\n // resources blocked.\n if (win === currentWin) {\n this.hidePageAction(win.document);\n // depending on the treatment branch, we want the count of timeSaved\n // (\"fast\") or blockedResources (\"private\")\n const counter = this.treatment === \"private\" ?\n this.state.blockedResources.get(win.gBrowser.selectedBrowser) :\n this.state.timeSaved.get(win.gBrowser.selectedBrowser);\n if (counter) {\n this.showPageAction(win.document, counter);\n this.setPageActionCounter(win.document, counter);\n }\n }\n }", "function registerBackgroundTabDetection() {\n if (types.WINDOW && types.WINDOW.document) {\n types.WINDOW.document.addEventListener('visibilitychange', () => {\n const activeTransaction = utils.getActiveTransaction() ;\n if (types.WINDOW.document.hidden && activeTransaction) {\n const statusType = 'cancelled';\n\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n utils$1.logger.log(\n `[Tracing] Transaction: ${statusType} -> since tab moved to the background, op: ${activeTransaction.op}`,\n );\n // We should not set status if it is already set, this prevent important statuses like\n // error or data loss from being overwritten on transaction.\n if (!activeTransaction.status) {\n activeTransaction.setStatus(statusType);\n }\n activeTransaction.setTag('visibilitychange', 'document.hidden');\n activeTransaction.finish();\n }\n });\n } else {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n utils$1.logger.warn('[Tracing] Could not set up background tab detection due to lack of global document');\n }\n}", "function update_favicon(color_code, special_char){\n console.log(favicon_link_element);\n favicon_link_elements = document.querySelectorAll('head link[rel~=\"icon\"');\n console.log(favicon_link_elements);\n if(!favicon_link_element) {\n create_link_element();\n }\n \n // TODO: fix this part later (isolate the localStorage)\n //delete localStorage[color_code];\n var new_favicon = null;\n \n \n if(new_favicon) {\n replace_favicon(new_favicon, special_char); ////TODO: FIX THIS ONE\n }\n else{\n console.log('[content] sending message from content to background');\n chrome.runtime.sendMessage({\n color : color_code,\n from : 'content',\n subject : 'HighlightTab',\n curr_url: tab_url\n },\n function(new_favicon_url) {\n // REPLACE favicon\n replace_favicon(new_favicon_url, color_code, special_char);\n \n // STORE favicon FOR LATER USAGE\n //localStorage[color_code] = new_favicon_url;\n console.log('favicon replaced and saved')\n });\n } // END IF-ELSE\n} // END FUNCTION", "updateActiveAddons() {\n logger.debug(\"Updating add-on states\");\n for (let [, addon] of this.addonDB) {\n let newActive = (addon.visible && !addon.disabled && !addon.pendingUninstall);\n if (newActive != addon.active) {\n addon.active = newActive;\n this.saveChanges();\n }\n }\n\n Services.prefs.setBoolPref(PREF_PENDING_OPERATIONS, false);\n }", "function renderStatus(url, tabs) {\n var host = url.match(/^(.*?:\\/{2,3})?(.+?)(\\/|$)/)[2];\n var result = $.grep(supported_sites, function (elem) {\n return elem.url === host;\n });\n\n if (result.length == 0) {\n $(\"#siteStatus\")\n .text(\"Current site not supported\")\n .addClass(\"notSupported\");\n } else if (result.length == 1) {\n var siteObj = result[0]; // Get specific siteObject from supported_sites\n switch (siteObj.name) {\n case \"Office Ally\":\n case \"Office Ally Demo\":\n case \"United Health Care Dev\":\n case \"United Health Care\":\n enableForm();\n showOAOptions(tabs[0].id);\n $(\"#siteStatus\")\n .text(siteObj.name + \" is supported!\")\n .addClass(\"supported\");\n $(\"#fillForm\").on(\"click\", function () {\n fillFormHandler(siteObj, tabs[0].id);\n });\n // Submit form after hitting enter\n $(\"#datesForm\").keydown(function (event) {\n if (event.which == 13) {\n event.preventDefault();\n fillFormHandler(siteObj, tabs[0].id);\n }\n });\n $(\"#undoForm\")\n .prop(\"disabled\", false)\n .on(\"click\", function () {\n chrome.tabs.sendMessage(\n tabs[0].id,\n {\n message: \"undoForm\",\n siteObj: JSON.stringify(siteObj),\n },\n function (response) {\n ResponseHandler(response);\n }\n );\n });\n\n chrome.tabs.sendMessage(\n tabs[0].id,\n { message: \"getDiagnoses\", siteName: siteObj.name },\n function (diagObj) {\n if (diagObj) {\n if (diagObj.length > 4) {\n $(\"#statusBarMsg\")\n .text(\n \"More than 4 diagnoses detected. Column 24.E will not be filled due to site limitations.\"\n )\n .addClass(\"warning\");\n return;\n }\n $(\"#statusBarMsg\")\n .text(\n diagObj.length +\n \" diagnosis code(s) detected, Enter CPT Codes.\"\n )\n .addClass(\"supported\");\n } else {\n $(\"#statusBarMsg\").text(\n \"No diagnosis detected in section 21. You will enter diagnosis pointers manually for each row.\"\n );\n }\n }\n );\n break;\n default:\n $(\"#siteStatus\")\n .text(siteObj.name + \" is not yet supported\")\n .addClass(\"notSupported\");\n break;\n }\n }\n}", "function setBadge(options){\n chrome.browserAction.setIcon({tabId : options.tabId , path : options.iconsPaths} , function(){\n if (chrome.runtime.lastError) {\n return;\n }\n chrome.browserAction.setBadgeText({text : options.text , tabId : options.tabId});\n chrome.browserAction.setBadgeBackgroundColor({color : options.color});\n });\n\n}", "function updateTabURLs() {\n chrome.tabs.query({active: false}, tabs => { // Don't save the tab that the user is currently on, which is this extension's tab.\n tabs.forEach(tab => {\n tabURLs.push(tab.url);\n });\n\n mainTextarea.value = tabURLs.join(\"\\n\");\n });\n}", "function activateExtension() {\n Privly.options.setInjectionEnabled(true);\n updateActivateStatus(true);\n}", "function checkForSupportedURL(tabID, changeInfo, tab) {\n\n\tif ((typeof tab.url === 'string') && (tab.url.indexOf('https://www.twitch.tv') === 0)) {\n\n\t\tchrome.pageAction.show(tabID);\n\t}\n}", "filteredUpdate(forced=false) {\n chrome.tabs.query({'active': true}, (tabs) => {\n var self = this;\n var filteredUrls = [];\n var semaphore = tabs.length;\n\n // Create an event--The Chrome API doesn't seem to handle the\n // combination of callbacks and promises very well.\n var promise = new Event('PageClock.promise');\n const promiseHandler = (e) => {\n // This is actually executed AFTER the event is dispatched\n // (below)\n self.update(filteredUrls, forced=forced);\n document.removeEventListener('PageClock.promise',\n promiseHandler);\n }\n\n document.addEventListener('PageClock.promise', promiseHandler);\n for (let i = 0; i < tabs.length; i++) {\n chrome.windows.get(tabs[i].windowId, undefined, (window) => {\n // The tab goes into the filteredUrls array iff the\n // window is focused OR the tab is playing audio\n if (tabs[i].audible || window.focused) {\n filteredUrls.push(tabs[i].url);\n }\n\n semaphore -= 1; // Signal that we've finished.\n if (!semaphore) {\n document.dispatchEvent(promise);\n }\n });\n }\n });\n }", "function checkActivity() {\n\t//console.log(\"checkActivity initialized\");\n\t// Check for changing tab\n\tchrome.tabs.onActivated.addListener(\n\tfunction(tabs) {\n\t\tcurTabId = tabs.tabId;\n\t\tconsole.log(\"Tab changed - \" + tabs.tabId);\n\t\tupdateInfo();\n\t\t\n\t});\n\t\n\t// Check for tabs updating\n\tchrome.tabs.onUpdated.addListener(\n\tfunction(tabId, changeInfo, tab) {\n\t\tif (tabId == curTabId) {\n\t\t\tconsole.log(\"Tabs updated - \" + tabId);\n\t\t\tupdateInfo();\n\t\t}\n\t});\n\t\n\t// Query info for tabs.query\n\tvar queryInfo = {\n\t\tactive: true,\n\t\tcurrentWindow: true\n\t};\n\t\n\t// check for window focus changing (different window or closing)\n\tchrome.windows.onFocusChanged.addListener(\n\tfunction(windowId) {\n console.log(\"Detected window focus changed\");\n chrome.tabs.query(queryInfo,\n function(tabs) {\n\t\tconsole.log(\"Window or Tab changed\");\n\t\t// Make sure tabs is defined\n\t\tif (typeof tabs[0] != 'undefined') {\n\t\t\tvar tab = tabs[0]; // only one active tab at a time\n\t\t\tcurTabId = tab.id;\n\t\t\tupdateInfo();\n\t\t}\n\t });\n\t});\t\n}", "function checkIfDynatrace() {\n function callback(tabs) {\n //Get the URL from the main window\n let url = tabs[0].url; \n \n //Use Regex to see if you're on a SaaS tenant or a Managed environment\n saasCheck = new RegExp('(\\/\\/[a-z]{3}[1234567890]{5}\\.)').exec(url);\n managedCheck = new RegExp('(\\/e\\/[^\\/]*)').exec(url);\n\n //If you're on a SaaS tenant, set the \"deploy\" to SaaS and extract the values from storage\n if(saasCheck != null) {\n function url_domain(data) {\n var a = document.createElement('a');\n a.href = data;\n return a.hostname;\n }\n \n let saasRegex = new RegExp('([a-z]{3}[1234567890]{5}\\.)(.*)').exec(url_domain(url));\n \n saasHost = saasRegex[2];\n\n deploy = \"saas\";\n setTextBoxDefaults(deploy);\n }\n //If you're on a Managed environment, set the \"deploy\" to Managed and extract the values from storage\n else if(managedCheck != null) {\n deploy = \"managed\";\n setTextBoxDefaults(deploy);\n }\n //otherwise, display a message asking the user to please visit a Dynatrace environment\n else {\n document.getElementById(\"content\").style.display = \"none\";\n document.getElementById(\"no_content\").style.display = \"block\";\n }\n }\n\n //Query the local storage to start the functionality\n chrome.tabs.query(query, callback);\n}", "function onUpdatedListener(tabId, changeInfo, tab) {\n tabs[tab.id] = tab.incognito;\n}", "function registerBackgroundTabDetection() {\n\t if (WINDOW && WINDOW.document) {\n\t WINDOW.document.addEventListener('visibilitychange', () => {\n\t const activeTransaction = getActiveTransaction() ;\n\t if (WINDOW.document.hidden && activeTransaction) {\n\t const statusType = 'cancelled';\n\n\t (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n\t logger.log(\n\t `[Tracing] Transaction: ${statusType} -> since tab moved to the background, op: ${activeTransaction.op}`,\n\t );\n\t // We should not set status if it is already set, this prevent important statuses like\n\t // error or data loss from being overwritten on transaction.\n\t if (!activeTransaction.status) {\n\t activeTransaction.setStatus(statusType);\n\t }\n\t activeTransaction.setTag('visibilitychange', 'document.hidden');\n\t activeTransaction.finish();\n\t }\n\t });\n\t } else {\n\t (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n\t logger.warn('[Tracing] Could not set up background tab detection due to lack of global document');\n\t }\n\t}", "function UpdateCurrentUrl(activeInfo) {\n chrome.tabs.get(activeInfo.tabId, function(tab){\n if (chrome.runtime.lastError) {\n setTimeout(function(){UpdateCurrentUrl(activeInfo) }, 500); // arbitrary delay\n return;\n }\n Utils.currentUrl = tab.url;\n });\n}" ]
[ "0.70542467", "0.67835164", "0.66792893", "0.66670823", "0.65563774", "0.6525256", "0.65088236", "0.6497703", "0.6475679", "0.6462442", "0.64540935", "0.6454076", "0.6453169", "0.6416888", "0.6347589", "0.6312389", "0.6304168", "0.6301714", "0.62764335", "0.62544423", "0.6250115", "0.6209642", "0.6186587", "0.6176597", "0.6174063", "0.61418325", "0.61256963", "0.61075604", "0.6095796", "0.60895056", "0.6089124", "0.6077594", "0.6046845", "0.59855247", "0.5970202", "0.59449005", "0.5934796", "0.59250313", "0.5899188", "0.5893205", "0.58915174", "0.5877378", "0.58156514", "0.581395", "0.5790063", "0.57761633", "0.5757373", "0.5757373", "0.57548946", "0.5752476", "0.575126", "0.5733358", "0.5730006", "0.57218456", "0.5704167", "0.5685191", "0.5677415", "0.5661027", "0.5651014", "0.56463146", "0.5632956", "0.562126", "0.56173325", "0.5595223", "0.55919707", "0.5587567", "0.5584832", "0.55809236", "0.5576837", "0.5576438", "0.5569306", "0.55685836", "0.5563197", "0.55601454", "0.55596596", "0.5552806", "0.55471534", "0.55458146", "0.5544892", "0.55431664", "0.55430233", "0.554051", "0.5535874", "0.5527036", "0.5526105", "0.55155635", "0.551485", "0.55097604", "0.55079466", "0.5502632", "0.5494536", "0.549452", "0.5491037", "0.5480706", "0.5477575", "0.54756886", "0.5475504", "0.54754925", "0.54699546", "0.54683024" ]
0.5791304
44
pulls out the individual items url and passes it to the stage2
async function urlCall(url){ await fetch(url) .then(res => res.json()) .then(res => { let arrMain = res.results let k=0; arrName = arrMain.map(i => { return( <div key={k = k+1} className="wholeResults"> {stage2(i.url)} </div> ) }); }) .catch(err => {return( <div> <p>{`An Ancient Red Dragon aproaches: ${err}`}</p> </div> )}) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function populateURLS() {\n urls.push('https://s3.amazonaws.com/limbforge/' + this.specs.design + \"/Ebe_forearm_\" + this.specs.hand + \"/forearm_\" + this.specs.hand + \"_C4-\" + this.specs.c4 + \"_L1-\" + this.specs.l1+ '.stl');\n // add on terminal device adaptor\n if (this.specs.design == \"EbeArm\"){\n urls.push('https://s3.amazonaws.com/limbforgestls/EbeArm/EbeArm_wrist_unit+v1.stl');\n }\n }", "updateItemUrl_() {\n let currentUrl = this.location.path();\n\n let pathParts = currentUrl.split('/');\n // We're expecting something like: ['', 'admin', 'blockable', '']\n // But we're not sure whether there will be a fourth element\n if (pathParts.length < 4) {\n pathParts.push(this.id || '');\n } else {\n pathParts[3] = this.id || '';\n }\n let newUrl = pathParts.join('/');\n this.location.path(newUrl);\n }", "prepare (rep, next) {\n rep.entity.items.forEach((item) => {\n const embed = rep.embed('item', `./${item.id}`, item)\n if (item.googlePlusId) {\n embed.link(\n 'home',\n `http://plus.google.com/${item.googlePlusId}`\n )\n embed.ignore('googlePlusId')\n }\n })\n rep.ignore('items')\n // dont forget to call next!\n next()\n }", "function getItemLink(action, ID, items) {\n\tfor(let i = 0; i < items.length; i++) {\n\t\tif(items[i].id == ID) {\n\t\t\tfor(let link of items[i].link) {\n\t\t\t\tif(link.action == action) return link.url;\n\t\t\t}\n\t\t}\n\t}\n}", "function item(name, description, url, href) {\n\t this.name = name;\n\t this.description = description;\n\t this.url = url;\n\t this.href = href;\n\t}", "processItems() {}", "function addIDandSelfLink(req, item){\n item.id = item[Datastore.KEY].id;\n item.self = \"https://\" + req.get(\"host\") + req.route.path + \"/\"+ item.id;\n return item;\n}", "function addIDandSelfLink(req, item){\n item.id = item[Datastore.KEY].id;\n item.self = \"https://\" + req.get(\"host\") + \"/ships/\" + item.id;\n return item;\n}", "function loadDetails(item) {\n console.log(item);\n showLoadingMessage ();\n let url = item.detailsUrl;\n return fetch(url).then(function (response) {\n return response.json();\n }).then(function (details) { //details is the parameter that would be the return value of the previous function\n // Now we add the details to the item\n hideLoadingMessage();\n item.imageUrl = details.sprites.front_default; //sprites is the key of the object with the imgs\n item.height = details.height;\n item.image = details.sprites.other.dream_world.front_default;\n item.types = []; \n \n details.types.forEach(function(pokemon){\n item.types.push(pokemon.type.name)\n })\n }).catch(function (e) {\n hideLoadingMessage();\n console.error(e);\n });\n }", "generateUrl() {\n this.$store.dispatch('getFullContents', this.item);\n }", "function loadDetails(item) {\n\t\t\tlet url = item.detailsUrl;\n\t\t\treturn fetch(url)\n\t\t\t\t.then(function (response) {\n\t\t\t\treturn response.json();\n\t\t\t\t})\n\t\t\t\t\t.then(function (details) {\n// Now we add the details to the item\n\t\t\titem.name = details.name;\n\t\t\titem.imageUrl = details.sprites.front_default;\n\t\t\titem.imageUrlB =details.sprites.back_default;\n\t\t\titem.height = details.height;\n\t\t\titem.weight = details.weight;\n\t\t\titem.types = details.types;\n\t\t\t})\n\t\t\t.catch(function (e) {\n\t\t\tconsole.error(e);\n\t\t\t});\n\t\t}", "function loadDetails(item) {\n let url = item.detailsUrl;\n return fetch(url).then(function (response){\n return response.json();\n }).then(function (details){\n item.imageUrlFront = details.sprites.other.dream_world.front_default;\n item.height = details.height;\n item.weight = details.weight;\n item.types = [];\n details.types.forEach(function(itemType) {\n item.types.push(itemType.type.name);\n });\n item.abilities = [];\n details.abilities.forEach(function(itemAbilities) {\n item.abilities.push(itemAbilities.ability.name);\n });\n \n }).catch(function(e){\n console.error(e);\n });\n}", "function _selectResult(item) {\n\n \n\n itemUrl = item.data(\"url\");\n\n \n\n window.location = itemUrl;\n\n \n\n }", "function loadDetails(item) {\n var url = item.detailsUrl;\n return fetch(url).then(function (response) {\n return response.json();\n }).then(function (details) {\n // Now we add the details to the item\n item.imageUrl = details.sprites.front_default;\n item.height = details.height;\n item.types = Object.keys(details.types);\n }).catch(function (e) {\n console.error(e);\n });\n }", "function get_data_for_items( items ) {\n\n\t/* Action */\n\n\tjQuery(document).trigger('get_data_for_items');\n\n\t/* Work */\n\n\t// Loop through each item\n\t$.each(items, function ( i, item ) {\n\n\n\t\t/* Debug */\n\n\t\tif( true === Buleys.debug ) {\n\t\t\tconsole.log(\"getting data for item\", item);\n\t\t}\n\n\t\t/* Work */\n\n\t\t// Calls get_item() using the item.link\n\t\tget_item(item.link);\n\n\t} );\n\n}", "function loadDetails(item) {\n let url = item.detailsURL;\n return fetch(url).then(function (response) {\n return response.json();\n }).then(function (details){\n // Now we add the details to the Item\n item.imageURLFront = details.sprites.front_default;\n item.imageURLBack = details.sprites.back_default;\n item.height = details.height;\n item.weight = details.weight;\n // item.types = details.type;\n // item.abilities = details.abilities;\n }).catch(function (e) {\n console.error(e); // eslint-disable-line no-console\n });\n }", "getItems() {\n this.axios.get(this.sourceUrl).then((response) => {\n\n // Load HTML\n if (response.status === 200) {\n const html = response.data,\n $ = this.cheerio.load(html);\n let items = [];\n let counter = 0;\n\n // Search HTML and collect values\n $('.headlines_content ul').first().find('li').each((i, element) => {\n\n // Create item object\n items[i] = {\n id: '',\n title: $(element).children('a').text().trim(),\n url: $(element).children('a').attr('href').trim(),\n date: '',\n author: '',\n image: {\n url: '',\n alt: ''\n },\n content: ''\n }\n\n // Get single item content\n this.getItemContent(items[i].url).then((response) => {\n items[i].id = Date.now();\n items[i].date = response.date;\n items[i].image = {\n url: response.image.url,\n alt: response.image.alt\n };\n items[i].content = response.content;\n\n // Increment counter\n counter++;\n console.log(this.chalk.yellow(`Scraping item ${counter}`));\n\n // Save to JSON file when counter is equal to items array\n if (counter == items.length) {\n console.log('\\n');\n // Save items to JSON file\n this.saveJson(items);\n }\n\n });\n\n });\n\n }\n\n }, (error) => this.errorHandler(error));\n }", "function getShops(item){\n\t\t\n\t}", "itemClicked(e, item) {\n e.preventDefault()\n e.stopPropagation()\n\n // If the Quick Add button was clicked\n if (e.target.type === 'button') {\n this.addToCartClicked(e, item)\n\n return\n }\n\n this.props.actions.product.setProduct(item)\n\n // TODO: Leave this in as log if debug mode\n console.log('opening product page for item:')\n console.log(item)\n window.location.hash = '#/product/' + item['product_id'] + '/' + item['name'] // TODO: Use mappings! And use websafe/SEO URL (currently unavailable)\n\n /*let stepId = 'options'\n let stepDescriptor = this.stepper.getStepById(stepId) || null\n\n if (stepDescriptor !== null) {\n let data = item\n\n let isEnded = false\n // Execute the step handler\n this.stepper.load(stepDescriptor, data, isEnded, this.setStep.bind(this, stepId))\n this.stepper.addItem(item.id, 1, item)\n }*/\n }", "function CommitListItem({ item }) {\n const { name, url } = item;\n return (\n <Link href={url} target=\"_blank\">\n <ListItem>\n {name}\n </ListItem>\n </Link>\n );\n}", "async processItem ({item, h}) {\n if (item.type != 'page') return\n const data = fs.readFileSync(h.pathItemSrc(item), 'utf8')\n if (data) item.data = data \n }", "function loadDetails(item) {\n let url = item.detailsUrl;\n return fetch(url).then(function (response) {\n return response.json();\n }).then(function (details) {\n item.id =details.id;\n item.imageUrl = details.sprites.front_default;\n item.height = details.height;\n item.weight = details.weight;\n item.types = details.types;\n }).catch(function (e) {\n console.error(e);\n });\n }", "function loadDetailsFunctionality(item) {\n let url = item.detailsUrl;\n return fetch(url)\n .then(function (response) {\n return response.json();\n })\n .then(function (details) {\n // Now we add the details to the item\n item.imageUrl = details.sprites.front_default;\n item.height = details.height;\n item.types = details.types;\n })\n .catch(function (e) {\n console.error(e);\n });\n}", "function loadDetails(item) {\n let url = item.detailsUrl;\n return fetch(url).then(function(response) {\n return response.json();\n }).then(function(details) {\n //add details to the item\n item.imageUrl = details.sprites.front_default;\n item.height = details.height;\n item.weight = details.weight;\n }).catch(function(e) {\n /* eslint-disable no-console */\n console.error(e);\n /* eslint-enable no-console */\n });\n }", "function populateData(url){\nfetch(url).then(response => response.json()).then(data => {\n const top10MostLikedVideos = data.result;\n\n // 0 corresponds to the first item in the list of videos\n const firstVideo = top10MostLikedVideos[0];\n\n console.log(firstVideo); // look at the details for the first video in the developer tools\n\n top10MostLikedVideos.map(function(video, idx) {\n populateListItem(video, idx);\n });\n})\n}", "function constructItemUrl(encodedItemName, currency) {\r\n const baseUrl = \"https://steamcommunity.com/market/priceoverview/\";\r\n const currencyParam = \"?currency=\";\r\n const currentyValue = currency;\r\n const appIDParam = \"&appid=730\";\r\n const itemNameParam = \"&market_hash_name=\";\r\n const itemNameValue = encodedItemName;\r\n\r\n return baseUrl + currencyParam + currentyValue + appIDParam + itemNameParam + itemNameValue;\r\n}", "function loadDetails(item) {\n var url = item.detailsUrl;\n return $.ajax(url, {\n dataType: 'json',\n })\n .then(function (responseJSON) {\n // Now we add the details to the item\n item.imageUrl = responseJSON.sprites.front_default;\n item.height = responseJSON.height;\n // loop through types\n item.types = '';\n responseJSON.types.forEach(function (result) {\n item.types += result.type.name + ' ';\n });\n })\n .catch(function (e) {\n console.error(e);\n });\n }", "function getItemImage() {\r\n var item_image = '';\r\n item_image = img_data[1].getElementsByTagName('img')[0].getAttribute('src');\r\n return encodeURIComponent(\"http://\" + window.location.hostname + \"/\" + item_image);\r\n }", "function PopulateCardURLs() {\n\n for (var i = 0; i < cardList.length; i++) {\n var cardPath = mainPath + cardList[i].childNodes[0].getAttribute('href');\n var cardPlusProxyPath = proxyurl + cardPath;\n cardURLS[i] = cardPlusProxyPath;\n }\n\n GetCardHTMLS();\n}", "get url() {\n return internalSlots.get(this).url.href;\n }", "onItemClick() {\n this.navigateTo(this.item.path);\n }", "getProductLink(productId){\n const link = this.links.find(link => link.id == 'productDetail');\n return link.url + `?id=${productId}`;\n }", "function addToList(info, tab) {\n var url;\n var type;\n if(info.menuItemId == con1) // image\n {\n url = info.srcUrl;\n listPush(url);\n }\n}", "function processImages(index, troveItem) {\n\tvar imgUrl = troveItem.identifier[0].value;\n\tif (imgUrl.indexOf(urlPatterns[0]) >= 0) { // flickr\n\n\t\taddFlickrItem(imgUrl, troveItem, loadedImages);\n\t\t//console.log(\"added: \" + imgUrl);\n\n\t} else if (imgUrl.indexOf(urlPatterns[1]) >= 0) { // nla.gov\n\n\t\tloadedImages.push({\n\t\t\turl: imgUrl + \"/representativeImage?wid=900\", // change ?wid=900 to scale the image\n\t\t\tobj: troveItem\n\t\t});\n\t\t//console.log(\"added: \" + imgUrl);\n\n\t} else if (imgUrl.indexOf(urlPatterns[2]) >= 0) { //artsearch\n\n\t\tloadedImages.push({\n\t\t\turl: \"http://artsearch.nga.gov.au/IMAGES/LRG/\" + getQueryVariable(\"IRN\", imgUrl) + \".jpg\",\n\t\t\tobj: troveItem\n\t\t});\n\t\t//console.log(\"added: \" + imgUrl);\n\n\t} else if (imgUrl.indexOf(urlPatterns[3]) >= 0) { //recordsearch\n\n\t\tloadedImages.push({\n\t\t\turl: \"http://recordsearch.naa.gov.au/NAAMedia/ShowImage.asp?T=P&S=1&B=\" + getQueryVariable(\"Number\", imgUrl),\n\t\t\tobj: troveItem\n\t\t});\n\t\t//console.log(\"added: \" + imgUrl);\n\n\t} else if (imgUrl.indexOf(urlPatterns[4]) >= 0) { //slsa \n\t\t\n\t\tloadedImages.push({\n\t\t\turl: imgUrl.slice(0, imgUrl.length - 3) + \"jpg\",\n\t\t\tobj: troveItem\n\t\t});\n\t\t//console.log(\"added: \" + imgUrl);\n\t\t\n\t} else { // Could not reliably load image for item\n\t\t//console.log(\"Not available: \" + imgUrl);\n\t}\n}", "function getUrl(listName) {\n return \"/_api/Web/Lists/GetByTitle('\" + listName + \"')/Items\";\n}", "function getItems() {\n $(\"a.all-items\").on(\"click\", function(e) {\n e.preventDefault()\n $('#items-container').html('')\n\n $.getJSON(this.href, function(itemsData) {\n renderItems(itemsData)\n })\n })\n}", "function populateItems(listName) {\n let body = JSON.stringify({ listName: state.listName })\n //makeHTTPRequest('POST', '/items', body, cb)\n fetch('/items', {\n body: body,\n method: 'POST'\n })\n .then(response => response.text())\n .then(cb)\n}", "function getItems() {\n fetch('https://localhost:44317/reviewrating') // fetches the default URI\n .then(response => response.json()) // Will revieve a response from the default response.json.\n .then(data => _displayItems(data)) // will call the display items function.\n .catch(error => console.error('Unable to get items.', error)); // will catch an error and print the appropriate error message in console.\n}", "function action() {\n var $ = cheerio.load(item.techops.getHTML(item));\n var links = $('a');\n var foundERR;\n if (links != undefined) {\n links = links.filter((i, link) => {\n if ($(link).attr('href') !== undefined) {\n return !$(link).attr('href').includes('https://byui.instructure.com');\n } else {\n course.message('Link without href attribute found');\n return false;\n }\n });\n links.each(function (i, link) {\n link = $(link).attr('href').toLowerCase();\n foundERR = externalResources.find(externalResource => externalResource.test(link));\n if (foundERR != undefined) {\n course.log('ERR Identified', {\n 'name': foundERR.toString().replace(/\\//g, ''),\n 'url': link,\n 'item': item.techops.getTitle(item),\n 'type': item.techops.type\n });\n }\n });\n }\n callback(null, course, item);\n }", "request() {\n // We should have prop URL, or have a connection as prop.\n fetch(this.props.url + this.state.itemObj.ItemID).then((response) => {\n let resultObj = response.json();\n //TODO: once we fetch the item info, set missing field (atm it is desc)\n });\n }", "function scrapeMain(url){\n return new Promise((resolve, reject)=>{\n let shirtsUrl= scrapeIt(url, {\n shirts: {\n listItem: \".products li\",\n data:{\n url:{\n selector: \"a\",\n attr: \"href\",\n },\n },\n }\n });\n resolve(shirtsUrl);//store product urls...\n reject(new Error('Failed to scrape product page'));\n });\n}", "copyItemFromAList(url,text){\n let item = this.copyAList()\n this.setItemList(item, text,url)\n return item\n}", "function launchInitialOpenItems() {\n if(ioitemUrl) {\n Launch(ioitemUrl, 'Initial_Open_Items', 800, 500);\n } else {\n alert(_('Initial open item link not available, please try again later'));\n }\n}", "function item_page (set_or_item, db){\n if (document.querySelector(`.${set_or_item}_div`)){\n document.querySelectorAll(`.${set_or_item}_div`).forEach(div =>{\n div.onclick = () =>{\n for (j=0; j<db.length; j++){\n if(db[j]['pk'].toString() === div.id){\n item_name = db[j]['fields'][`${set_or_item}_name`];\n item_id = db[j]['pk'];\n item_type = set_or_item;\n }\n }\n window.location.replace(\"http://127.0.0.1:8000/\" + item_name + \"/\" + item_type + \"/\" + item_id);\n }\n });\n }\n }", "function take_item() {\r\n\r\n\t\titem_ladle \t\t= new proto_item(0, \"Ladle\", \"This is a very dull wooden ladle its mostly for soup and acid, but mostly soup.\");\r\n\t\titem_silver_key = new proto_item(1, \"Silver Key\", \"This is a key, and it happens to be silver, who would have thought.\");\r\n\t\titem_lockbox \t= new proto_item(2, \"Lockbox\", \"This is a box shaped container, it is also locked. You need a key to open it.\");\r\n\t\titem_keycard \t= new proto_item(3, \"Keycard\", \"This is a card that can open doors, much like a real key, but however it is in the shape of a card.\");\r\n\r\n\r\n\t\tswitch (currentlocation) {\r\n\t\t\tcase 0: \r\n\t\t\t\t\tinventoryArray[0] = item_ladle\r\n\t\t\t\t\tupdatetext (\"Your inventory now contains the Ladle.\")\r\n\t\t\t\t\t\r\n\t\t\t\t\tbreak;\r\n\t\t\tcase 9:\r\n\t\t\t\t\tinventoryArray[3] = item_card\r\n\t\t\t\t\tupdatetext (\"Your inventory now contains the card.\")\r\n\t\t\t\t\t\r\n\t\t\t\t\tbreak;\r\n\t\t\tcase 8:\r\n\t\t\t\t\tinventoryArray[2] = item_lockbox\r\n\t\t\t\t\tupdatetext (\"Your inventory now contains the lockbox.\")\r\n\t\t\t\t\t\r\n\t\t\t\t\tbreak;\r\n\t\t\tcase 7:\r\n\t\t\t\t\tinventoryArray[1] = item_silver_key\r\n\t\t\t\t\tupdatetext (\"Your inventory now contains the Silver Key.\")\r\n\t\t\t\t\t\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}", "function fetchItemsAction () {\n fetchTodoItems().then((response) => {\n return response.json()\n }).then((serverItemModel) => {\n if (serverItemModel.data) {\n viewState.items.length = 0\n serverItemModel.data.forEach((item) => {\n viewState.items.push(\n serverItemModelToClientItemModel(item)\n )\n })\n fillItems()\n }\n })\n}", "function loadDetails(item) {\n var url = item.detailsUrl;\n showLoadingMessage('Loading Pokemon details, please wait...');\n return fetch(url)\n .then(function(response) {\n hideLoadingMessage();\n return response.json();\n })\n .then(function(details) {\n // now add details to the list__item\n item.imageUrl = details.sprites.front_default;\n item.height = details.height;\n item.weight = details.weight;\n item.types = Object.keys(details.types);\n })\n .catch(function(e) {\n /* eslint-disable no-console */\n console.error(e);\n /* eslint-enable no-console */\n });\n }", "function autograb() { // autograbs item (if the item is listed)\r\n\tif (item.snapshotLength > 0) {\r\n\t\titem = item.snapshotItem(0);\r\n\t\tselectedlink = item.previousSibling.previousSibling;\r\n\t\twindow.location = selectedlink;\r\n\t}\r\n}", "function getResourceUrl() { return \"http://\"+location.href.split(\"//\")[1].split(\"/\").splice(0,3).join(\"/\")+'.json?api_key='+MoviePilot.apikey;}", "_onItemSelect(item) {\n // handle action to render the new page!\n\n Actions.editdetails({text: item});\n }", "async function getDataFromItem(page, itemUrl) {\n let item = {}\n await page.goto(itemUrl)\n const html = await page.content()\n const $ = cheerio.load(html)\n \n await page.waitForSelector('.caption')\n item['name'] = $('.caption > h4:nth-of-type(2)').text()\n\n await page.waitForSelector('.description')\n item['description'] = $('.description').text()\n\n await page.waitForSelector('.img-responsive')\n item['image_URL'] = 'https://webscraper.io' + $('.img-responsive').attr('src')\n\n await page.waitForSelector('.ratings')\n item['rating'] = parseInt($('.ratings > p > span').length)\n item['reviews'] = parseInt($('.ratings > p').text().trim().split(' ')[0])\n item['HDD'] = await getHDDListings(page)\n\n return item\n}", "function getItems() {\n\t\tvar newItems = get('get-items.php?startDate='+$scope.startDate+';duration='+$scope.duration);\n\t\tconsole.log(newItems);\n\t}", "function loadItems() {\n $itemList.empty();\n\n SDK.Items.getItems((err, items) => {\n if (err) throw err;\n\n\n items.forEach((item) => {\n\n //Sort items to a specific type\n if (item.itemType === type) {\n\n\n const itemHtml = `\n <div class=\"col-lg-4 item-container\">\n <div class=\"panel panel-default\">\n <div class=\"panel-heading\">\n <h3 class=\"panel-title\">${item.itemName}</h3>\n </div>\n <div class=\"panel-body\">\n <div class=\"col-lg-8\">\n <dl>\n <dt>Description</dt>\n <dd>${item.itemDescription}</dd>\n </dl>\n </div>\n </div>\n <div class=\"panel-footer\">\n <div class=\"row\">\n <div class=\"col-lg-4 price-label\">\n <p>Kr. <span class=\"price-amount\">${item.itemPrice}</span></p>\n </div>\n <div class=\"col-lg-8 text-right\">\n <button class=\"btn btn-success purchase-button\" data-item-id=\"${item.itemId}\">Add to basket</button>\n </div>\n </div>\n </div>\n </div>\n </div>\n \n `;\n\n $itemList.append(itemHtml);\n\n }\n });\n //Function to add items to basket\n $(\".purchase-button\").click(function () {\n const itemId = $(this).data(\"item-id\");\n const item = items.find((item) => item.itemId === itemId);\n SDK.Items.addToBasket(item);\n $(\"#purchase-modal\").modal(\"toggle\");\n });\n\n\n });\n }", "createShortenedListURL(params) {\n return ApiService.post('/link', { url: params.url });\n }", "function makingItem(dataFromDb, path){\n for(let i=0; i<dataFromDb.length; i++ ){\n const item = {};\n item.href = path + '/' + dataFromDb[i].id;\n item.data = [];\n item.links = [];\n insertingDataToCollection(dataFromDb, item, i);\n checkingResource(item, path);\n cj.collection.items.push(item);\n }\n}", "function productURL(msg, response)\n {\n for (i=0; i<mockData.length; i++)\n {\n if (mockData[i].product_id == msg.productId)\n {\n response(null, {result: mockData[i].product_url});\n }\n }\n response(null, {result: ''});\n }", "isSelectedItemOnList(){\n cy.get('@selectedItemLink')\n .then(selectedItem => {\n cy.get(closetItemsListPage.items.container)\n .eq(0)\n .find(closetItemsListPage.items.link)\n .should('have.attr', 'href', selectedItem);\n });\n }", "function loadAllJenkinsUrlForEditing(){\n\n savedJenkinsUrlListModel.clear();\n var db = getDatabase();\n var rs = \"\";\n\n db.transaction(function(tx) {\n rs = tx.executeSql('select id, jenkins_name, jenkins_url from jenkins_data');\n }\n );\n\n for(var i =0;i < rs.rows.length;i++) {\n savedJenkinsUrlListModel.append({\"jenkins_url_id\" : rs.rows.item(i).id, \"display_name\" : rs.rows.item(i).jenkins_name, \"url\" : rs.rows.item(i).jenkins_url } );\n //console.log(\"Added name: \"+rs.rows.item(i).jenkins_name +\" URL: \"+rs.rows.item(i).jenkins_url);\n }\n\n }", "workitemWithId (baseUrl,username,spacename,id){\n browser.get(baseUrl + username + \"/\" + spacename +\"/plan/detail/\" +id);\n }", "loadImages(): void {\n let self = this;\n let items = this.getState().items;\n for (let i = 0; i < items.length; i++) {\n let item: ItemType = items[i];\n // Copy item config\n let config: ImageViewerConfigType = {...item.viewerConfig};\n if (_.isEmpty(config)) {\n config = makeImageViewerConfig();\n }\n let url = item.url;\n let image = new Image();\n image.crossOrigin = 'Anonymous';\n self.images.push(image);\n image.onload = function() {\n config.imageHeight = this.height;\n config.imageWidth = this.width;\n self.store.dispatch({type: types.LOAD_ITEM, index: item.index,\n config: config});\n };\n image.onerror = function() {\n alert(sprintf('Image %s was not found.', url));\n };\n image.src = url;\n }\n }", "function updateImages(itemId){ //dynamically update image drop down with images from directory\n $.get({\n url: `/images/${itemId}`, //this route will return information about the items\n })\n .then(function(results){ //the results includes all item details\n $(results).each(function(){\n //update the selection box with the name of the item and its value as the item id\n $('#primaryImageSelections').append(\n `<option value=${this}>${this}</option>`\n )\n });\n $('select').material_select();\n displayImages(itemId); //this will add the image below the dropdown to ensure correct choice\n });\n}", "link () {\n\t this._attachments = this._sbolDocument.lookupURIs(this._attachments);\n\t this._wasGeneratedBys = this._sbolDocument.lookupURIs(this._wasGeneratedBys);\n\t}", "function ItemDetail({ match }) {\r\n \r\n useEffect(() => {\r\n fetchItem()\r\n console.log(match)\r\n }, [])\r\n\r\n //colocar a imagem como default vazio pois tem arquivos na api que nao possuem imagens, dai nao estoura erro\r\n const [item, setItem] = useState({\r\n images: {}\r\n })\r\n\r\n //essa url que eu to usando deveria ser uma url para mostrar os detalhes do item clicado la no shop.\r\n // eu posso pegar o id atraves do match e passar ele na url\r\n //exemplo const fetchItem = await fetch('https://fortnite-api.com/v1/map${match.params.id}')\r\n\r\n const fetchItem = async () => {\r\n const fetchItem = await fetch(`https://fortnite-api.com/v1/playlists/${match.params.id}`)\r\n const item = await fetchItem.json()\r\n setItem(item.data)\r\n }\r\n\r\n const styleDetail = {\r\n background: 'black',\r\n color: 'white'\r\n }\r\n \r\n return (\r\n <div style={styleDetail}> \r\n <h1>{item.name}</h1>\r\n <h1>{item.subName}</h1>\r\n <img src={item.images.missionIcon} />\r\n </div>\r\n );\r\n}", "fetchItems(){\n\t\tfetch(Constants.restApiPath+'items')\n\t\t.then(function(res){\n\t\t\tif(res.ok){\n\t\t\t\tres.json().then(function(res){\n\t\t\t\t\tdispatcher.dispatch({\n\t\t\t\t\t\ttype: \t\"FETCH_ITEMS_FROM_API\",\n\t\t\t\t\t\tres,\n\t\t\t\t\t});\n\t\t\t\t})\n\t\t\t}\n\t\t\telse{\n\t\t\t\tconsole.log(Strings.error.restApi);\n\t\t\t\tconsole.log(res);\n\t\t\t}\n\t\t});\n\t}", "boardItemViewUrl (baseUrl,username,spacename){\n browser.get(baseUrl + username + \"/\" + spacename +\"/plan/board\");\n }", "openAppUrl(url) {\n // check url, get item id\n let info = new URL(url, true);\n info.id = info.query.id;\n\n // tmall: first check tmall client, then check taobao client\n if (info.host == \"detail.tmall.com\") {\n // check tmall client\n let appURL = \"tmall://page.tm/itemDetail?itemId=\" + info.id;\n Linking.canOpenURL(appURL).then(supported => {\n if (supported) {\n Linking.openURL(appURL);\n } else {\n // check taobao client\n appURL = \"taobao://item.taobao.com/item.htm?id=\" + info.id;\n Linking.canOpenURL(appURL).then(supported => {\n if (supported)\n Linking.openURL(appURL);\n else\n Linking.openURL(url);\n }).catch(error => { Linking.openURL(url) });\n }\n }).catch(error => { Linking.openURL(url) });\n }\n // taobao\n else if (info.host == \"item.taobao.com\") {\n let appURL = \"taobao://item.taobao.com/item.htm?id=\" + info.id;\n Linking.canOpenURL(appURL).then(supported => {\n if (supported)\n Linking.openURL(appURL);\n else\n Linking.openURL(url);\n }).catch(error => { Linking.openURL(url) });\n }\n // jingdong\n else if (info.host == \"item.jd.com\") {\n let jdInfo = url.match(/\\/[0-9]{1,}\\.html/);\n if (jdInfo && jdInfo[0]) {\n jdInfo = jdInfo[0].match(/\\d+/);\n\n let appURL = 'openapp.jdmobile://virtual?params={\"category\":\"jump\",\"des\":\"productDetail\",\"skuId\":\"' + jdInfo[0] + '\",\"sourceType\":\"homefloor\",\"sourceValue\":\"4384\", \"landPageId\":\"jshop.cx.mobile\"}';\n Linking.canOpenURL(appURL).then(supported => {\n if (supported)\n Linking.openURL(appURL);\n else\n Linking.openURL(url);\n }).catch(error => { Linking.openURL(url) });\n }\n } else {\n Linking.openURL(url);\n }\n return;\n //this.openApp(\"com.taobao.taobao\", \"com.taobao.tao.detail.activity.DetailActivity\", url);\n //Linking.openURL(\"tmall://page.tm/itemDetail?itemId=18212959600\");\n //Linking.openURL('openapp.jdmobile://virtual?params={\"category\":\"jump\",\"des\":\"productDetail\",\"skuId\":\"3129320\",\"sourceType\":\"homefloor\",\"sourceValue\":\"4384\", \"landPageId\":\"jshop.cx.mobile\"}');\n //Linking.openURL(\"taobao://item.taobao.com/item.htm?id=18212959600\");\n }", "function o(o){return {origin:\"portal-item\",url:U(o.itemUrl),portal:o.portal||w.getDefault(),portalItem:o,readResourcePaths:[]}}", "function o(o){return {origin:\"portal-item\",url:U(o.itemUrl),portal:o.portal||w.getDefault(),portalItem:o,readResourcePaths:[]}}", "async function addSelfLink(req, item){\n console.log(\"INSIDE SELF LINK\");\n item.self = \"https://\" + req.get(\"host\") + req.route.path + \"/\" + item.id;\n\n //Is it a ship w/cargo, or cargo with a carrier?\n // So we can populate selflinks dynamically for them\n var relationshipType = (item[Datastore.KEY].kind == 'Ship') ? 'cargo': 'ships';\n if(relationshipType == 'cargo'){ //If we have a ship w/ cargo\n let cargoSz = item.cargo.length;\n for(var i = 0; i < cargoSz; i++){ //Iterate over cargo and add self links\n item.cargo[i].self = \"https://\" + req.get(\"host\") + \"/\" + relationshipType + \"/\" + item.cargo[i].id;\n }\n //return item;\n } else if (relationshipType == 'ships') { //If we have cargo\n if(typeof(item.carrier) == 'object'){ //If cargo has carrier\n await get_ship(item.carrier.id).then((ship)=>{ //Dynamically assign carrier name/self\n item.carrier.name = ship.name;\n item.carrier.self = \"https://\" + req.get(\"host\") + \"/\" + relationshipType + \"/\" + item.carrier.id;\n console.log(\"RETURNING ITEM\");\n console.log(item);\n return item;\n });\n }\n }\n}", "function RENDER_items(items) {\n\n }", "thumbUrl() {\n return this.item.thumb_path;\n }", "async function fetchPreviewItemsInfo() {\n const newPreviewItems = [];\n for (const item of value.items) {\n if (item._type === 'captionedImage') {\n const { alt, url } = await client.fetch(/* groq */ `*[_id == \"${item.image._ref}\"][0]{\n \"alt\": image.alt,\n \"url\": image.asset->url\n }`);\n newPreviewItems.push({\n caption: item.caption,\n alt: `📸 ${alt}`,\n url,\n });\n } else if (item._type === 'captionedVideo') {\n const { alt, url } = await client.fetch(/* groq */ `*[_id == \"${item.video._ref}\"][0]{\n \"alt\": video.alt,\n \"url\": video.poster.asset->url\n }`);\n newPreviewItems.push({\n caption: item.caption,\n alt: `🎥 ${alt}`,\n url,\n });\n }\n }\n\n setPreviewItems(newPreviewItems);\n }", "get links () {\n return this.items.filter(v => v.tag === 'a').map(v => {\n let { href } = new URL(v.attributes.href, this.base);\n return href;\n });\n }", "function scrapeItem(provider, itemId) {\n\t// Disable interface elements.\n\tenableInterface(false);\n\t\n\t// Fetch given item.\n\titemId = itemId.trim();\n\tprogress(1, 1, \"Fetching \" + provider.name + \" product \" + itemId + \"...\");\n\tprovider.fetch(itemId, function(info) {fetchCallback(provider, info);});\n}", "function show_items_of(e) {\n // $(\".nav-item\").removeClass(\"_active\");\n if($(e).hasClass(\"_active\")){\n $(e).removeClass(\"_active\");\n }else{\n $(e).addClass(\"_active\"); \n }\n var tags=\"\";\n $(\"._active\").each(function() {\n tags += $(this).find(\".nav-link\").html().split(\" &nbsp;\")[0];\n tags +=\",\";\n });\n // console.log(tags.slice(0, -1))\n $(\".tag_item_count\").html(\"\");\n $.get(\"/search/catalogue/attribute?attribute-name=(tags)&attribute-value=((\" + tags.slice(0, -1) + \"))\", function(data) {\n // console.log(data)\n data = JSON.parse(data)\n\n if($(\".__active\").attr('id')=='list_view'){\n var html_to_add = \"\";\n var item_details_card_html = \"\"\n $(\"#retrieved_item_count\").html(\"&nbsp;| &nbsp;Items retrieved : <span style='color:red'>\"+data.length+\"</span>\");\n for (var i = data.length - 1; i >= 0; i--) {\n html_to_add += get_item_card_html(data[i],i)\n }\n $(\"#searched_items\").html(html_to_add)\n $(\"#item_details_card\").html(item_details_card_html)\n }else{\n // console.log('map2')\n $(\"#retrieved_item_count\").html(\"&nbsp;| &nbsp;Items retrieved : <span style='color:red'>\"+data.length+\"</span>\");\n plot_points_on_map(data);\n }\n });\n }", "function getItemLink() {\r\n return encodeURIComponent(window.location.href);\r\n }", "function getItemLink() {\r\n return encodeURIComponent(window.location.href);\r\n }", "function getItemLink() {\r\n return encodeURIComponent(window.location.href);\r\n }", "function getItemLink() {\r\n return encodeURIComponent(window.location.href);\r\n }", "function addItem() {\n const urlBox = document.getElementById('inputBox');\n const iconBox = document.getElementById('selectBox');\n const urlVal = urlBox.value;\n const iconVal = iconBox.value;\n postLink(urlVal, iconVal);\n removeIcons();\n resetModalContent();\n}", "function loadProducts(){\n addItem(\"Canister Filter\",\"../img/canister.jpg\",\"This is used to filter the water\",5000,\"This is used to filter the water keeps ammonia out of the water\")\n addItem(\"Air pump\",\"../img/airpump.jpg\",\"This is a pump that pumps air into the aquarium\",200,\"This is a pump that pumps air into the aquarium to keep the fish safe.\")\n addItem(\"Heater\",\"../img/heater.jpg\",\"This heats up the water for the fish\",1000,\"This heats up the water so that the fish have a nice time\")\n addItem(\"Temperature\",\"../img/tempreture.jfif\",\"This measures the temperature of your water\",'50',\"This measures the temperature of your waterMakes sure fish is in the optimal water temperature\")\n addItem(\"Light\",\"../img/light.jfif\",\"This is an aquarium light\",2000,\"This is an aquarium light this helps your plants to grow and keep your tank healthy.\" )\n}", "function checkGallica(record, item) {\n\n\n\t\tvar url = record.getFieldSubfields(\"856\");\n\n\t\tif (url && url.length > 0 && url[0].u) {\n\t\t\titem.url = url[0].u;\n\n\t\t}\n\n\t}", "function action() {\n\n var references = [{\n reg: /!\\[CDATA[\\s\\S]*\\]\\]/gi,\n type: 'Javascript'\n }, {\n reg: /(brightspace)(?!\\.com)/gi,\n type: 'Brightspace References'\n }, {\n reg: /brainhoney/ig,\n type: 'Brainhoney References'\n }, {\n reg: /adobe\\s*connect/ig,\n type: 'Adobe Connect References'\n }, {\n reg: /((google\\s*)?hangouts?(\\s*on\\s*air)?)|(HOA)/ig,\n type: 'Hangouts on Air References'\n }, {\n reg: /<a[^>]*href=(\"|')[^\"']*\\.swf(\"|')\\s*>/ig,\n type: '.swf Files'\n }, {\n reg: /<style>/g,\n type: 'Inline Styling'\n }, {\n reg: /box\\.(com)|(net)/g,\n type: 'Box Website'\n }];\n\n /* Check each regex to see if the item contents has any matches */\n references.forEach(ref => {\n /* Get all the matches */\n var matches = item.techops.getHTML(item).match(ref.reg);\n /* See if it contains any of what we're looking for... */\n if (matches != null) {\n matches.forEach(match => {\n item.techops.log(`${item.techops.type} - Contains ${ref.type}`, {\n 'Title': item.techops.getTitle(item),\n 'ID': item.techops.getID(item),\n 'Match': match\n });\n });\n }\n });\n\n callback(null, course, item);\n }", "function itemSaved(result, targetUrl, params) {\n if (result && result.ok) {\n console.log(\"Saved item.\");\n //clearItemForm();\n //loadItems();\n } else {\n console.log(\"Received error: \" + result.error);\n showError(result.error);\n }\n}", "function useItem(){\n\t\n}", "function getLink(gameName, type, callback){\n var finalData = '';\n var preview;\n var testUrl;\n var search;\n // search = users game name iputted in discord chat\n //console.log(type);\n if (type === 'track' || type === 'playlist'){\n search = gameName + ' soundtrack';\n }\n else if (type === 'artist' || type === 'album') {\n search = gameName;\n }\n else if (search === undefined){\n callback(null, null);\n }\n //console.log(search);\n //spotify api requires spaces be replaced with %20 or +\n var i = 0,strLength = search.length;\n \n for(i; i < strLength; i++) {\n \n search = search.replace(\" \", \"+\");\n \n }\n\n //api url + search + apikey to get results\n //console.log('22 : ' + search);\n var url = 'https://api.spotify.com/v1/search?q='+ search + '&type='+type+'&client_id='+apiKey;\n //console.log(url);\n \n //use http.get to call url and get response\n https.get(url, function(response) {\n\n //while http is responding with \"data\" event get stream and add to finaldata\n response.on(\"data\", function (data) {\n finalData += data;\n });\n \n // when the end event is sent parse recieved data and get first\n // result from the parsed json and assign to items variable\n response.on(\"end\", function() {\n var temp = JSON.parse(finalData);\n //console.log(temp);\n var items;\n if (type === 'playlist'){\n items = temp.playlists.items[0].external_urls.spotify;\n }\n if (type === 'track'){\n items = temp.tracks.items[0].external_urls.spotify;\n preview = temp.tracks.items[0].preview_url;\n //console.log(temp.tracks.items[0]);\n }\n if (type === 'album'){\n items = temp.albums.items[0].external_urls.spotify;\n }\n if (type === 'artist'){\n items = temp.artists.items[0].external_urls.spotify;\n }\n //console.log(items);\n testUrl = items;\n callback(testUrl, preview);\n });\n\n});\n\n}", "async __downloadItems(event) {\n\n\t \thijackEvent(event);\n\n\t \ttry {\n\n\t await this.__showSpinner('Preparing downloads.');\n\n\t const {items} = event.detail;\n\n\t \tconst urls = items.map(({original, _tempUrl}) => \n\t \t\t\t\t\t\t\t \t original ? original : _tempUrl);\n\n\t \t// Will NOT download multiple files in Chrome when dev tools is open!!\n\t\t\t\tconst {default: multiDownload} = await import(\n\t\t\t\t\t/* webpackChunkName: 'multi-download' */ \n\t\t\t\t\t'multi-download'\n\t\t\t\t);\n\n\t // Show the spinner for at least 1sec, \n\t // but longer if downloading several files.\n\t await Promise.all([multiDownload(urls), wait(1000)]);\n\t }\n\t catch (error) {\n\t console.error(error);\n\t await warn('An error occured while trying to download your files.');\n\t }\n\t finally {\n\t this.__hideSpinner();\n\t }\t \n\t }", "link() {\n this._locations = this._sbolDocument.lookupURIs(this._locations);\n this._component = this._sbolDocument.lookupURI(this._component);\n }", "async function loadJSON(){\n try {\n let url = document.location.pathname.replace('index','items').replace('html','json')\n if(document.location.href.startsWith('file')){\n console.log('what');\n url = \"file://\"+url\n }\n \n itemsPortfolio = filterByQueryCategory(globalItems)\n console.log(itemsPortfolio);\n itemsPortfolio = filterByQuery(itemsPortfolio);\n currentPage = 0\n let itemsPaginated = paginatorItem(itemsPortfolio);\n buildItems(itemsPaginated)\n } catch (error) {\n console.error('errrr ',JSON.stringify(error), error.message)\n }\n}", "function insertingLinksToCollection (item, linked) {\n let linksNumbering=0;\n for( let i=0; i<linked.length; i++ ) {\n item.links[linksNumbering++] = {\n 'rel': linked[i][0],\n 'href': linked[i][1],\n 'prompt': linked[i][0]\n }\n }\n }", "function getPokemonList(url) {\n fetch(url)\n .then(res => res.json())\n .then(pokemon => {\n const resultArray = pokemon.results;\n nextURL = pokemon.next;\n prevURL = pokemon.previous;\n \n //For loop was inpsired by Justin Kim's tutorial on youtube, which explains to use a for loop instead of a for of loop in order to retrieve the index of the looped item.\n for (let i = 0; resultArray.length; i++) {\n const pokemonItem = pokemonList[i];\n const pokemonInfoData = resultArray[i];\n const nameDisplay = pokemonInfoData.name;\n const idDisplay = pokemonInfoData.url;\n const urlArray = idDisplay.split('/');\n const id = urlArray[urlArray.length - 2];\n pokemonItem.textContent = id + '. ' + nameDisplay;\n }\n});\n}", "function createLookupItems(items) {\n\n var TMPL_UL = '<ul class=\"ds-nav-lu-results-ul\">';\n\n var TMPL_BACK_ITEM = '<li class=\"ds-nav-lu-results-li\">&nbsp;<strong class=\"ds-nav-lu-results-li-item\"><a href=\"#\" class=\"ds-nav-lu-results-li-item-back\"> <i class=\"fa fa-level-up\"></i> </a></strong></li>';\n\n var TMPL_ITEM = '<li class=\"ds-nav-lu-results-li\"> <i class=\"fa fa-folder ds-nav-lu-results-li-item-foldericon\"></i> <a href=\"#\" class=\"ds-nav-lu-results-li-item-name\" data-children=\"{Count}\" data-path=\"{Path}\">{NAME}</a></li>';\n\n var TMPL_NAV = '<strong class=\"ds-nav-lu-results-li-item\"><a href=\"#\" class=\"ds-nav-lu-results-li-item-navigate\"> <i class=\"fa fa-chevron-circle-right\"></i> </a></strong>';\n\n\n var ul = $(TMPL_UL);\n\n //Create the back button\n var li_back = $(TMPL_BACK_ITEM);\n\n //Append it\n $(ul).append(li_back);\n\n for (var i = 0 ; i < items.length; i++) {\n\n var item = items[i];\n\n var _path = item.Path;\n var _name = item.Name;\n var _allowNavigation = item.AllowNavigation;\n\n //Create the list item\n var li_item = $(TMPL_ITEM.replace(\"{Count}\", items.length).replace(\"{Path}\", _path).replace(\"{NAME}\", _name));\n\n if (_allowNavigation == true) {\n //create the navigation\n var li_nav = $(TMPL_NAV);\n\n //append it to the li\n $(li_item).append(li_nav);\n }\n\n //Append the li_item to the ul\n $(ul).append(li_item);\n }\n\n\n return $(ul);\n }", "function fetchItemLists() {\n // Get itemLists from Local Storage and convert it into a JSON\n let itemLists = JSON.parse(localStorage.getItem(\"itemLists\"));\n\n // Output results to UI by grabbing ID\n let itemListsResults = document.getElementById(\"wishListResults\");\n\n // Build output from ID spot\n itemListsResults.innerHTML = \"\";\n\n // Loop through itemLists from local storage and output them in a div\n for (let i = 0; i < itemLists.length; i++) {\n // Now we have the name and url for each itemList in Local Storage\n let name = itemLists[i].name;\n let url = itemLists[i].url;\n\n // Build the output by Appending\n itemListsResults.innerHTML +=\n '<div class=\"card bg-light text-dark card-body\">' +\n \"<h3>\" +\n name +\n ' <a class=\"btn btn-primary\" target=\"_blank\" href=\"' +\n addHTTP(url) +\n '\">Visit</a> ' +\n \" <a onclick=\\\"deleteItemList('\" +\n url +\n '\\')\" class=\"btn btn-danger\" href=\"#\">Delete</a>' +\n \"</h3>\" +\n \"</div>\";\n }\n}", "function GetALLlibraryItems(docid,listName, siteurl,success,failure) {\r\ndebugger;\r\n $.ajax({\r\n url: siteurl + \"/_api/web/lists/getbytitle('\" + listName + \"')/items(\"+docid+\")?$select=SPCompliance,SPLegal,SPBrand,AXPBrand,Created,DocumentDescription,ProjectName,Modified,FromAddress,RplyToAddress,CompleteSubjectLine,Author/Name,EmailMarketing,IsThisAnEmailCommunication,CountryOfOrigin,IntendedAudience,TargetMarket,AudienceSize,ReviewType,EncodedAbsUrl,ID&$expand=Author\",\r\n method: \"GET\",\r\n headers: { \"Accept\": \"application/json; odata=verbose\" },\r\n success: function (data) {\r\n \tsuccess(data.d);\r\n \t//alert(url); \r\n },\r\n error: function (data) {\r\n debugger;\r\n failure(data); \r\n }\r\n });\r\n}", "function gotItems(items, request) {\n\t\tvar i;\n\t\tfor (i = 0; i < items.length; i++) {\n\t\t\tvar item = items[i];\n\t\t\titemsToProcess.push(item);\n\t\t}\n\t}", "function searchResultClick(item) {\n // If item has a link\n if (item.uisref) {\n // If there are state params,\n // use them...\n if (item.stateParams) {\n $state.go(item.state, item.stateParams);\n } else {\n $state.go(item.state);\n }\n }\n }", "function scrapeProductPage(link, type){\n\n // depending on how you got the links, whether they are absolute or\n // relative you may need to make them relative like so:\n // var fullUrl = \"http://www. .com/\" + link;\n\n request(fullUrl, function(err, res, body){ //request the website and use cheerio\n if(!err){\n var $ = cheerio.load(body);\n var item = {}; //the item that will eventually get added to the database\n\n // BE SURE TO USE .trim() ON ALL TEXT! IT GETS RID OF WHITE SPACE\n\n //name\n item.name = //item's name that is found somehow.\n\n //images\n item.images = [];\n //for each image\n item.images.push( /* link to image */);\n\n //description\n item.description = /* product description */\n //normalize description afterward! - this will vary for each website\n\n //sizes\n item.sizes = [];\n /* for each size */\n /* normalize size and then push size */\n item.sizes.push( /* size */ );\n\n //price\n var price = $(/* find containing div of price */).find( /*find containing div of price*/ );\n if ( /* if has two prices (sale and regular) */ ){ //has two prices\n item.price = /* regular price that is normalized to a number */\n }\n else{ //only one price\n item.price = /* regular price that is normalized to a number */\n }\n //colors\n item.colors = [];\n /* for each color */\n item.colors.push( /* color normalized to a degree */ );\n //length\n item.length = /* length found somehow. only dresses and skirts should have length I think */\n\n //url\n item.url = fullUrl; //or url\n\n //brand\n item.brand = // the name of the website eg: KosherCasual\n\n //itemNumber\n\n item.itemNumber = /*product number of the item*/\n\n //type\n item.type = type;\n //approved\n item.approved = true; //set approved to modest sites, false to other sites and then we manually approve it\n\n // console.log(item);\n\n //INSERT INTO DB\n new Clothing(item).save(function(err, clothing, count){\n if (!err){\n console.log('no error!');\n }\n else{\n console.log('error: ', err);\n }\n });\n\n\n }\n else{\n console.log('ERROR in individual link:' + fullUrl);\n }\n });\n}", "function getItemsFromServer(rssURL) {\n\t$.get(ServerAppURL + '?' + ServerEvent + '=' + ServerEventValue + '&rssURL='+rssURL+'&offset='+OFFSET,function(data) {\n\t\t\tvar items = eval(data);\n\t\t\tinitData(items);\n\t\t\tarrangeItemsIntoColumns(ItemsArray, false);\n\t\t},'json');\n}", "function g_link(template, item) {\r\n return \"/\" + template.id + \"/\" + item.id;\r\n}", "function getAllItems() {\n // load query details to json object\n var oWebsite = context.get_web();\n context.load(oWebsite);\n var tasksEntries = [];\n\n context.executeQueryAsync(function () {\n\n var itemsCount = collListItem.get_count();\n for (var i = 0; i < itemsCount; i++) {\n var item = collListItem.itemAt(i);\n var taskEntry = item.get_fieldValues();\n\n taskEntry.SourceURL = context.get_web().get_serverRelativeUrl() + \"/Lists/\" + options.listName + \"/\" + taskEntry.DocumentName;\n tasksEntries.push(helperService.parse(taskEntry, options.fields.mappingFromSP));\n\n }\n\n deferred.resolve(tasksEntries);\n\n\n });\n\n\n\n }", "function processImages(index, troveItem) {\r\n\t\tvar imgUrl = troveItem.identifier[0].value;\r\n\t\tif (imgUrl.indexOf(urlPatterns[0]) >= 0) { // flickr\r\nfound++;\r\n\t\t\t\taddFlickrItem(imgUrl, troveItem);\r\n\r\n\t\t} else if (imgUrl.indexOf(urlPatterns[1]) >= 0) { // nla.gov\r\nfound++;\r\n\t\t\t\tloadedImages.push(\r\n\t\t\t\t\t\timgUrl + \"/representativeImage?wid=900\" // change ?wid=900 to scale the image\r\n\t\t\t\t);\r\n\r\n\t\t} else if (imgUrl.indexOf(urlPatterns[2]) >= 0) { //artsearch\r\nfound++;\r\n\t\t\t\tloadedImages.push(\r\n\t\t\t\t\t\t\"http://artsearch.nga.gov.au/IMAGES/LRG/\" + getQueryVariable(\"IRN\", imgUrl) + \".jpg\"\r\n\t\t\t\t);\r\n\r\n\t\t} else if (imgUrl.indexOf(urlPatterns[3]) >= 0) { //recordsearch\r\nfound++;\r\n\t\t\t\tloadedImages.push(\r\n\t\t\t\t\t\t\"http://recordsearch.naa.gov.au/NAAMedia/ShowImage.asp?T=P&S=1&B=\" + getQueryVariable(\"Number\", imgUrl)\r\n\t\t\t\t);\r\n\r\n\t\t} else if (imgUrl.indexOf(urlPatterns[4]) >= 0) { //slsa\r\n\t\t\t\tfound++;\r\n\t\t\t\tloadedImages.push(\r\n\t\t\t\t\t\timgUrl.slice(0, imgUrl.length - 3) + \"jpg\"\r\n);\r\n\r\n\t\t} else { // Could not reliably load image for item\r\n\t\t\t\t// UNCOMMENT FOR DEBUG:\r\n\t// console.log(\"Not available: \" + imgUrl);\r\n\t\t}\r\n}" ]
[ "0.6131586", "0.61009526", "0.59177846", "0.5895998", "0.5758906", "0.5726094", "0.5720176", "0.5716799", "0.5701246", "0.5695924", "0.5656167", "0.5628179", "0.5604636", "0.5594808", "0.55755186", "0.5560021", "0.55516213", "0.5546018", "0.5545255", "0.55382776", "0.55195844", "0.551518", "0.55107313", "0.5506243", "0.54948944", "0.5461207", "0.5451627", "0.54491526", "0.5432711", "0.542554", "0.54190886", "0.54168135", "0.5368477", "0.53621596", "0.5356383", "0.5351706", "0.53401995", "0.5340105", "0.5338466", "0.5334396", "0.5314835", "0.53126657", "0.5311909", "0.52953", "0.5260678", "0.5258465", "0.5253722", "0.5253031", "0.5249441", "0.52363974", "0.5235856", "0.52288556", "0.5227764", "0.52261364", "0.5219966", "0.5216758", "0.520232", "0.519653", "0.5188408", "0.51843905", "0.5183959", "0.5172335", "0.5163592", "0.51593083", "0.5159172", "0.51581496", "0.5154191", "0.5154191", "0.51481706", "0.51464176", "0.51414925", "0.5136666", "0.51353", "0.5129951", "0.512754", "0.5120591", "0.5120591", "0.5120591", "0.5120591", "0.51196826", "0.51074284", "0.51069427", "0.50973326", "0.50962377", "0.50960064", "0.5090769", "0.5089234", "0.50884604", "0.5082466", "0.50773233", "0.5076046", "0.507153", "0.50693786", "0.506487", "0.50557345", "0.50557196", "0.505203", "0.50487363", "0.50382656", "0.50380397", "0.5037188" ]
0.0
-1
prepares interactions for desktop and tablet
function initDesktop() { ReactDOM.render(<App />, document.getElementById('root')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function desktopSetUp () {\n $('.hiddenMobile').show()\n $('.viewMobile').hide()\n }", "function setDesktop () {\n desktopStartUp()\n $('.desktopVersion').show()\n $('.mobileVersion').hide()\n $('.pasajeros-vuelo-mobile').hide()\n pintarTabla('.plane-seats')\n }", "function deviceControll() {\n if( windowSize( 'width' ) < 768 ) {\n $('body').removeClass('desktop').removeClass('tablet').addClass('mobile');\n }\n else if( windowSize( 'width' ) < 992 ){\n $('body').removeClass('mobile').removeClass('desktop').addClass('tablet');\n }\n else {\n $('body').removeClass('mobile').removeClass('tablet').addClass('desktop');\n }\n }", "function desktopDevice() {\n\tdocument.getElementById(\"template-preview\").classList.add('desktop-device-preview');\n\tdocument.getElementById(\"template-preview\").classList.remove('full-screen-preview');\n\tdocument.getElementById(\"template-preview\").classList.remove('tablet-device-preview');\n\tdocument.getElementById(\"template-preview\").classList.remove('mobile-device-preview');\n}", "function pageSetUp() {\n\n\tif ($.device === \"desktop\"){\n\t\t// is desktop\n\t\t\n\t\t// activate tooltips\n\t\t$(\"[rel=tooltip]\").tooltip();\n\t\n\t\t// activate popovers\n\t\t$(\"[rel=popover]\").popover();\n\t\n\t\t// activate popovers with hover states\n\t\t$(\"[rel=popover-hover]\").popover({\n\t\t\ttrigger : \"hover\"\n\t\t});\n\n\t\t// setup widgets\n\t\tsetup_widgets_desktop();\n\t\n\t\t// activate inline charts\n\t\trunAllCharts();\n\t\n\t\t// run form elements\n\t\trunAllForms();\n\n\t} else {\n\t\t\n\t\t// is mobile\n\t\t\n\t\t// activate popovers\n\t\t$(\"[rel=popover]\").popover();\n\t\n\t\t// activate popovers with hover states\n\t\t$(\"[rel=popover-hover]\").popover({\n\t\t\ttrigger : \"hover\"\n\t\t});\n\t\n\t\t// activate inline charts\n\t\trunAllCharts();\n\t\n\t\t// setup widgets\n\t\tsetup_widgets_mobile();\n\t\n\t\t// run form elements\n\t\trunAllForms();\n\t\t\n\t}\n\n}", "function enableDesktopOrMobileAnswers(){\n if(\"ontouchstart\" in document.documentElement){\n // instructions for mobile/tabvar touchscreen device\n $instructions.html(\"<b><i>Click</i></b> on the team member below that matches the description above...\");\n\n // hide draggable answers for Desktop, show clickable answers for Mobile/Tabvar view\n $answers.addClass( 'hidden' );\n $answersTouchScreen.removeClass( 'hidden' );\n } else {\n // instructions for desktop mouse-pointer device\n $instructions.html(\"<b><i>Drag</i></b> the corresponding team member of the description above onto the blank face...\");\n\n // hide clickable answers for Mobile/Tablet, show draggable answers for Desktop view \n $answersTouchScreen.addClass( 'hidden' );\n $answers.removeClass( 'hidden' );\n }\n }", "function responsiveSetup(){\n\tif( typeof $(\"#mobile-style-detector:visible\") !== \"undefined\" && $(\"#mobile-style-detector:visible\").length >= 1 ){\n\t\t$(\"#product-wrapper\").detach().appendTo(\".work-desk.mobile\");\n\t} else {\n\t\t$(\"#product-wrapper\").detach().appendTo(\".work-desk.web\");\n\t\n\t\tstep = $(\".back-next-butt-wrapper\").data( \"current_step\");\n\t\tswitch(step){\n\t\t\tcase \"select layout\": break;\n\t\t\t\n\t\t\tcase \"layout page\": toggleScrollBar(\".layout-templates:visible\"); break;\n\t\t\tcase \"styles page\": toggleScrollBar(\".graphic-templates:visible\"); break;\n\t\t\t\n\t\t\tcase \"upload photos\": toggleScrollBar(\".layout-templates:visible\"); break;\n\t\t\tcase \"facebook page\": toggleScrollBar(\".layout-templates:visible\"); break;\n\n\t\t\tcase \"edit pictures\": toggleScrollBar(\".upload-page-wrapper:visible\"); break;\n\n\t\t\tcase \"select color insert or save\": toggleScrollBar(\".optional-surface:visible\"); break;\n\n\t\t\tcase \"presave preview\":\n\t\t\t\t\n\t\t\tbreak;\n\n\t\t\tcase \"save product\":\n\t\t\t\t\n\t\t\tbreak;\n\t\t}\n\t}\n}", "function desktopOrMobile() {\n if (screen.width > 1024) {\n createCards();\n } else {\n createMobileCards();\n }\n}", "function enterDesktopJS() {\n window.console && console.log(\"desktop breakpoint active\");\n // Turn off mobile main nav button\n $(\".btn-menu\").off();\n\n // enable main nav menu \n $(\"ul.sf-menu\").superfish();\n\n /* Disable trigger and remove style from submenu */\n if ($(\".sub-navigation-block\").length) {\n var pulli = $('#pull-i');\n menui = $('ul.sub-navigation');\n $(pulli).off();\n if (menui.is(':hidden')) {\n menui.removeAttr('style');\n }\n }\n\n // switch owl slider mobile image to desktop\n $.each($(\"#hero #owl-single-carousel .owl-item img\"), function (e) {\n var desktopImage = $(this).attr(\"data-dt-src\");\n $(this).attr(\"src\", desktopImage);\n });\n }", "function setMobile () {\n $('.desktopVersion').hide()\n $('.mobileVersion').show()\n $('.pasajeros-vuelo-mobile').hide()\n pintarTablaMobile('.mobile-seats-wrp')\n mobileStartUp()\n }", "function mobileSetUp () {\n $('.hiddenMobile').hide()\n $('.viewMobile').show()\n }", "function setup()\n{\n if (window.innerWidth > 1815)\n {\n $(\"#introduction\").html(\"I'm Noah Voogd, a 26 year old creative developer<br>living in Utrecht, the Netherlands.\")\n }\n else\n {\n $(\"#introduction\").html(\"I'm Noah Voogd, a 26 year old creative developer living in Utrecht, the Netherlands.\")\n }\n\n $(\".work-text-container\").each(function()\n {\n $(this).css(\"top\", \"calc(50% -\" + ((window.innerHeight - $(this).height()) / 2) + \")\");\n });\n\n var tabletHeight = $(\".device-container.tablet\").height();\n\n if ($(\".device-container.tablet\").height() / $(\".device-container.tablet\").width() > 1.558)\n {\n tabletHeight = $(\".device-container.tablet\").width() * 1.558;\n }\n\n var tabletArrowTop = $(\".device-container.tablet\").height() - (($(\".device-container.tablet\").height() - tabletHeight) / 2) - (0.08 * tabletHeight);\n $(\".tablet .back-arrow, .tablet .forward-arrow\").css({\n \"margin-top\": tabletArrowTop + \"px\",\n \"height\": 0.05 * tabletHeight,\n \"width\": 0.483 * (0.05 * tabletHeight)\n });\n\n var laptopHeight = $(\".device-container.laptop\").height();\n\n if ($(\".device-container.laptop\").height() / $(\".device-container.laptop\").width() > 0.649)\n {\n laptopHeight = $(\".device-container.laptop\").width() * 0.649;\n }\n\n var laptopArrowTop = $(\".device-container.laptop\").height() - (($(\".device-container.laptop\").height() - laptopHeight) / 2) - (0.205 * laptopHeight);\n $(\".laptop .back-arrow, .laptop .forward-arrow\").css({\n \"margin-top\": laptopArrowTop + \"px\",\n \"height\": 0.052 * laptopHeight,\n \"width\": 0.483 * (0.052 * laptopHeight)\n });\n\n $(\".tablet .back-arrow, .laptop .back-arrow\").css({\n \"margin-left\": \"calc(45% -\" + (0.483 * (0.052 * laptopHeight)) + \"px)\"\n });\n\n $(\".tablet .forward-arrow, .laptop .forward-arrow\").css({\n \"margin-left\": \"calc(55% -\" + (0.483 * (0.052 * laptopHeight)) + \"px)\"\n });\n\n var laptopWidth = $(\".device-container.laptop\").width();\n var laptopHeight = $(\".device-container.laptop\").height();\n\n if (laptopWidth / laptopHeight > 1.539)\n {\n laptopWidth = laptopHeight * 1.539;\n }\n else\n {\n laptopHeight = laptopWidth * 0.649;\n }\n\n $(\".device-container.laptop\").each(function()\n {\n var scrollTrigger = $(this).find('.scroll-trigger');\n var scrollMargin = 0;\n if (!onePageScrollActive)\n {\n scrollMargin = 30;\n }\n\n if (scrollTrigger.length)\n {\n $(scrollTrigger).css(\"margin-top\", (-laptopHeight * 0.0682 + scrollMargin) + \"px\"); \n var leftMarg = ($(\".device-container.laptop\").width() - laptopWidth) / 2;\n $(scrollTrigger).css(\"margin-left\", leftMarg + laptopWidth * 0.107);\n\n $(scrollTrigger).css(\"width\", laptopWidth * 0.786);\n $(scrollTrigger).css(\"height\", laptopHeight * 0.722);\n }\n });\n\n var deviceTopMargin = ($(\".device-container.laptop\").height() - laptopHeight) / 2;\n var laptopFrameTop = laptopHeight * 0.069;\n var laptopFrameBottom = laptopHeight * 0.21;\n var laptopScreenHeight = laptopWidth * 0.47 + deviceTopMargin + laptopFrameTop;\n laptopScrollTop = deviceTopMargin + laptopFrameTop;\n\n $(\".scroll-imgs .slide-img\").css(\"background-position\", \"0% \" + laptopScrollTop + \"px\");\n $(\".scroll-imgs .slide-img\").css({\n \"-webkit-clip-path\": \"polygon(0 \" + laptopScrollTop + \"px, 100% \" + laptopScrollTop + \"px, 100% \" + laptopScreenHeight + \"px, 0 \" + laptopScreenHeight + \"px)\",\n \"clip-path\": \"polygon(0 \" + laptopScrollTop + \"px, 100% \" + laptopScrollTop + \"px, 100% \" + laptopScreenHeight + \"px, 0 \" + laptopScreenHeight + \"px)\"\n });\n\n $(\".scroll-imgs .slide-img\").each(function()\n {\n var ratio = $(this).attr(\"class\").split(' ')[1];\n var imageHeight = laptopWidth * ratio;\n \n var laptopScrollBottom = -((Math.abs(imageHeight - laptopHeight) / 2) - (($(\".device-container.laptop\").height() - imageHeight) / 2)) - laptopFrameBottom;\n $(this).attr(\"scroll-bottom\", laptopScrollBottom);\n });\n}", "function viewToDesktop_Browser() {\n // Remove slick\n $(\"#browserView\").slick(\"unslick\");\n $(\".slide\").removeAttr(\"tabindex\");\n document.isMobile_Browser = false;\n viewDesktop_Browser();\n}", "function isMobile(){\n return ($(window).width() < settings.switchWidth);\n }", "function isMobile(){\n return ($(window).width() < settings.switchWidth);\n }", "function _enterMobile() {\r\n\t\t\thome.viewformat = 'small';\r\n\t\t}", "function setupForDesktopScreen() {\n // Coaster animation\n new SimpleScrollScene({\n onScroll: function(scrollInfo) {\n var windowHeight = scrollInfo.windowHeight;\n var scrollHeight = scrollInfo.scrollHeight;\n var scrollTop = scrollInfo.scrollTop;\n var $section = $('#app-section-3');\n var sectionTop = $section.offset().top;\n var sectionHeight = $section.height();\n\n var ratio = ((scrollTop + windowHeight) - sectionTop) / sectionHeight;\n\n if (ratio >= 0) {\n $('#app-card--coaster').css({\n transform: 'scale(' + ratio + ') rotate(' + (ratio * 360) + 'deg)'\n });\n }\n }\n })\n .addTo(ScrollDispatcher);\n\n // Simple scene that changes the opacity of the obfuscator.\n new SimpleScrollScene({\n onScroll: function(scrollInfo) {\n var windowHeight = scrollInfo.windowHeight;\n var scrollHeight = scrollInfo.scrollHeight;\n var scrollTop = scrollInfo.scrollTop;\n\n var ratioFromBottom = 1 - (scrollTop / (scrollHeight - windowHeight));\n\n $('.app-bg-obfuscator').css({\n opacity: OBFUSCATOR_OPACITY * ratioFromBottom\n });\n }\n })\n .addTo(ScrollDispatcher);\n}", "function adjustForScreenSize() {\n\n // screens that have lower pixel ratios or larger (than iPad's 1024x768) resolutions are probably desktops,\n // so don't go to mobile mode in this case.\n // const probablyDesktop = (window.devicePixelRatio < 1.5 || !window.devicePixelRatio) || window.screen.width > 1024;\n // console.info(\"probablyDesktop:\", probablyDesktop);\n // commented out because small viewports, whether on desktop or mobile devices, work better in mobile mode,\n // and failing to detect correctly risks serving the wrong content on the wrong devices.\n // IOW, leave well enough alone.\n\n if ( bypassedWarning || /*probablyDesktop || */(window.innerWidth >= MIN_ALLOWED_WIDTH && window.innerHeight >= MIN_ALLOWED_HEIGHT) ) {\n\n //if ( MOBILE_ENABLED ) {\n\n //nonMobileElements.forEach( el => el.style.removeProperty( 'display' ) );\n //mobileElements.forEach( el => el.style.display = 'none' );\n document.querySelector( 'body' ).classList.remove( 'small-screen' );\n\n //} else {\n //\n //\tdocument.querySelector( 'body' ).classList.remove( 'small-screen-warning' );\n //\tdocument.querySelector( '#warning' ).innerHTML = '';\n //\tdocument.querySelector( '#app-container' ).classList.remove( \"hidden\" );\n //\n //}\n\n // allow resetting this flag regardless of targeting mobile or desktop\n screenIsSmall = false;\n\n } else {\n\n document.querySelector( 'body' ).classList.add( 'small-screen' );\n\n // only ever set this flag when targeting mobile\n screenIsSmall = true;\n\n }\n\n checkForLandscape();\n\n\t\t// set up appStrings\n appStrings( getLanguagePref(), screenIsSmall );\n\n return screenIsSmall;\n\n }", "function wireUpDesktop() {\n\n\t\t// Wire up key press listeners.\n\t\t// 37 : left arrow - move left.\n\t\t// 39 : right arrow - move right.\n\t\t// 32 : space bar - jumping\n\t\t// 38 : up arrow - jumping\n\t\t// 40 : down arrow - FOR TESTING.\n\t\taddEventListener(\"keydown\", function (e) {\n\n\t\t\te.preventDefault();\n\n\t\t\tvar key = e.keyCode;\n\t\t\tswitch (key) {\n\t\t\t\tcase 37:\n\t\t\t\t\tmoveLeft();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 39:\n\t\t\t\t\tmoveRight();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 32:\n\t\t\t\tcase 38:\n\t\t\t\t\tjump();\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t});\n\t\taddEventListener(\"keyup\", function (e) {\n\n\t\t\te.preventDefault();\n\n\t\t\tvar key = e.keyCode;\n\t\t\tswitch (key) {\n\t\t\t\tcase 37:\n\t\t\t\tcase 39:\n\t\t\t\t\tstop();\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t});\n\n\t\t// Hide the instructions for iPad users.\n\t\t$(\"#buttons\").addClass(\"hidden\");\n\t}", "function isTablet() {\n return fc.globals.windowWidth < 1024;\n}", "isTablet () {\n const dim = Dimensions.get(\"screen\");\n return dim.scale < 2 && this.msp(dim, 1000) || dim.scale >= 2 && this.msp(dim, 1900);\n }", "_onScreenTouch() {\n let state = this.state;\n const time = new Date().getTime();\n const delta = time - state.lastScreenPress;\n\n if ( delta < 300 ) {\n // this.methods.toggleFullscreen();\n }\n\n state.lastScreenPress = time;\n\n this.setState( state );\n }", "checkScreenSize() {\n this.setState({ desktopLayout: window.innerWidth > 800 });\n }", "function isMobile(){\n\t\treturn ($(window).width() < settings.switchWidth);\n\t}", "function runMainProductsTabletSlider() {\n if ($(window).width() >= 768 && $(window).width() < 1152) {\n $(\".mainProducts__list\").slick({\n infinite: false,\n speed: 600,\n arrows:false,\n dots:false,\n swipe:true,\n slidesToShow: 2,\n slidesToScroll: 1,\n });\n $(\".mainProducts__list\").slick('setPosition');\n } else {\n if($(\".cardList-main\").hasClass(\"slick-slider\"))\n $('.cardList-main').slick(\"unslick\");\n }\n }", "function isMobile() { return $(window).width() < 768 }", "function viewMobile_Browser() {\n $(\"#mobileImg\").show();\n $(\"#mobileWelcomeBox\").show();\n $(\"#mobileInstruction\").show();\n $(\"#desktopImg\").hide();\n\n // Add slick to the viewport\n $(\"#browserView\").slick({infinite: false, edgeFriction: 0.15, slide: \".slide\", initialSlide: INITIAL_PANE, touchThreshold: 7});\n}", "_listenForAdaptiveChanges() {\n this._$log.debug(`_listenForAdaptiveChanges( )`);\n\n this.subscribeToAdaptiveChanges((viewPort) => {\n this._$log.debug(`onAdaptiveChange( ${viewPort.viewport} )`);\n this.isSmallDeviceScreen = (viewPort.minWidth <= 480);\n });\n }", "function mediaQuery(){\r\n let screenWidth = $(document).width();\r\n if(screenWidth<=768 ){\r\n $('.resources').hide();\r\n $('.networks').hide();\r\n $('.main-nav').hide();\r\n $('.solutions').show();\r\n $('.solutions-content').hide();\r\n }\r\n else if(screenWidth<1280 && screenWidth>768){\r\n $('.main-nav').show();\r\n $('.solutions').show();\r\n $('.solutions-content').show();\r\n $('.resources').hide();\r\n $('.networks').hide();\r\n }\r\n }", "function displayTour() {\n window.resizeEvt;\n if ($(window).width() > 576) {\n $('#tour').on(\"click\", function () {\n clearTimeout(window.resizeEvt);\n tour.start();\n })\n }\n else {\n $('#tour').on(\"click\", function () {\n clearTimeout(window.resizeEvt);\n tour.cancel()\n window.resizeEvt = setTimeout(function () {\n alert(\"Tour only works for large screens!\");\n }, 250);;\n })\n }\n }", "function viewChange_Browser() {\n var isMobile = ($(window).width() < WIDTH_THRESHOLD);\n if (document.isMobile_Browser && !isMobile) viewToDesktop_Browser();\n else if (!document.isMobile_Browser && isMobile) viewToMobile_Browser();\n}", "function responsiveEvent() {\n // idea for using css state check pulled from a dev website, but i can't locate it at the moment...\n if ($('.media-check-div').css('float') == 'none') {\n // \"responsive view\"\n if (zoomState !== 0) {\n map.setOptions({\n zoomControl: false\n });\n zoomState = 0;\n }\n }\n else {\n if (zoomState !== 1) {\n map.setOptions({\n zoomControl: true\n });\n zoomState = 1;\n }\n }\n\n if ($('.orientation-check-div').css('float') == 'left') {\n // portrait\n $('.main-content-item').removeClass('col-xs-6');\n $('.main-content-item').addClass('col-xs-12');\n }\n else {\n // landscape\n $('.main-content-item').removeClass('col-xs-12');\n $('.main-content-item').addClass('col-xs-6');\n }\n}", "function initDesktop(el){\n \n scanCardsDesktop(el);\n\n window.addEventListener(\n 'scroll', \n detect.debounce(function(){\n scanCardsDesktop(el);\n }, 100)\n );\n\n window.addEventListener(\n 'resize', \n detect.debounce(function(){\n scanCardsDesktop(el);\n }, 100)\n );\n\n}", "function mobileLayout() {\n let w = p.width;\n let h = p.height;\n \n b1 = p.createButton(\"Button 1\", w*0.05, h*0.05, w*0.4375, h*0.125);\n b2 = p.createButton(\"Button 2\", w*0.5125, h*0.05, w*0.4375, h*0.125);\n t1 = p.createToggle(\"Toggle 1\", w*0.05, h*0.2, w*0.4375, h*0.125);\n cf1 = p.createCrossfader(\"Crossfader 1\", w*0.5125, h*0.2, w*0.4375, h*0.125);\n s1 = p.createSlider(\"SliderH\", w*0.05, h*0.35, w*0.9, h*0.125);\n s2 = p.createSliderV(\"SliderV\", w*0.05, h*0.5, w*0.2, h*0.45, -100, 100); // Last two args are min and max\n cb1 = p.createCheckbox(\"Checkbox 1\", w*0.275, h*0.5, w*0.2125, h*0.2125);\n cb2 = p.createCheckbox(\"Checkbox 2\", w*0.275, h*0.7375, w*0.2125, h*0.2125);\n s2d1 = p.createSlider2d(\"Slider2d 1\", w*0.5125, h*0.5, w*0.4375, h*0.45);\n }", "function maximizeMobile() {\n $(window).on(\"breakpoint-updated\", function () {\n if ($('.ls-window-xs').length) {\n maximizeSidebar();\n }\n });\n }", "isSmallDeviceScreen() {\n return this.mdMedia_('max-width: 680px');\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 }", "static responsiveness() {\n if (Game.mql.matches) { // min-width 768px\n Game.width = 720;\n } else {\n Game.width = window.innerWidth - 40;\n }\n // update width\n Game.canvas.width = Game.width;\n //! reset array\n Game.goldSectorsArr = [5];\n }", "function adaptToScreenSize() {\n /* This function is a container for any changes that need to be made to the DOM\n When the DOM is ready or when the window resizes. */\n if (window.innerWidth <= 800) {\n $('.scroll-follow-breakpoint').append($('.more-then-flooring-right'));\n } else if (window.innerWidth > 800) {\n $($build.append($('.more-then-flooring-right')));\n }\n }", "function screen_resize() {\n var h = parseInt(window.innerHeight);\n var w = parseInt(window.innerWidth);\n\n if (w <= 800) {\n showShare();\n } else if (w > 800) {\n showShareDesktop();\n }\n}", "function on_mobile_device() { return $(document).width() <= 760 }", "function checkWebVersion () {\n if ($(window).width() < 768) {\n setMobile()\n }else {\n setDesktop()\n }\n }", "function isSmartphone() {\n\treturn $(window).height() > $(window).width();\n}", "function resetVP() {\n\n var vpw = '640';\n var viewport = document.querySelector(\"meta[name=viewport]\");\n\n windowWidth = window.innerWidth ? window.innerWidth : $(window).width();\n windowHeight = window.innerHeight ? window.innerHeight : $(window).height();\n\n //calcul width and Height for Firefox Android\n screenAvailWidth = screen.availWidth;\n screenAvailHeight = screen.availHeight;\n\n\n if (screen.width > 640 && windowHeight < windowWidth && !$('html').hasClass('firefox')) {\n vpw = '990';\n alert(document.documentElement.clientWidth);\n viewport.setAttribute('content', 'width=' + vpw + ', initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=0');\n } else if (screen.width > 640 && windowHeight > windowWidth && !$('html').hasClass('firefox')) {\n vpw = '640';\n alert(document.documentElement.clientWidth, \"et paf tu passes en 640\");\n viewport.setAttribute('content', 'width=' + vpw + ', initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=0');\n } else if (screen.width > 640 && screenAvailHeight < screenAvailWidth && $('html').hasClass('firefox')) {\n vpw = '990';\n $('head').append(\"<meta name='viewport' content='width=\" + vpw + \"', initial-scale=.5, maximum-scale=.5>\");\n } else if (screen.width > 640 && screenAvailHeight > screenAvailWidth && $('html').hasClass('firefox')) {\n vpw = '640';\n $('head').append(\"<meta name='viewport' content='width=\" + vpw + \"', initial-scale=.5, maximum-scale=.5>\");\n };\n }", "function viewDesktop_Browser() {\n $(\"#mobileImg\").hide();\n $(\"#desktopImg\").show();\n $(\"#mobileWelcomeBox\").hide();\n $(\"#mobileInstruction\").hide();\n}", "function isMobileVP() {\n return verge.viewportW() < 768;\n }", "static updateViewport() {\r\n ViewportService.isDesktop = ViewportService.desktopMatcher.matches;\r\n ViewportService.isMobile = !ViewportService.desktopMatcher.matches;\r\n }", "function windowSetup() {\n // Retrieve the width and height of the window\n width = window.innerWidth;\n height = window.innerHeight;\n\n // Set the width and height if we are on a display with a width > 500px (e.g., a desktop or tablet environment).\n var inputEvent = \"touchstart\";\n if (width >= 500) {\n width = 380;\n height = 430;\n inputEvent = \"mousedown\";\n //inputEvent = \"keydown\"; for using key input rather than mouse\n }\n\n // Create a listener on the input event.\n document.addEventListener(inputEvent, onpress);\n}", "function s(){var a=$(window).width();maxDrawerScreenSize>=a?p():q()}", "checkScreenSize() {\n if (window.innerWidth > 768) {\n this.navClose();\n }\n }", "function checkOnResize(){\r\n if(window.innerWidth > 1100){\r\n if(pJS.particles.nb != 150){\r\n console.log('desktop mode')\r\n pJS.fn.vendors.destroy();\r\n pJS_desktop();\r\n }\r\n }else{\r\n if(pJS.particles.nb == 150){\r\n console.log('mobile mode');\r\n pJS.fn.vendors.destroy();\r\n pJS_mobile();\r\n }\r\n }\r\n}", "function setDeviceSize() {\n screenSizeHeight = screenSizeHeightPX.pinLastValue();\n screenScaleValue = screenScale.pinLastValue();\n}", "isPhone () {\n return !this.isTablet();\n }", "async restoreState() {\n // Restore UI alignment.\n if (this.isBrowserUIEnabled) {\n const leftAlignmentEnabled = Services.prefs.getBoolPref(\n \"devtools.responsive.leftAlignViewport.enabled\",\n false\n );\n\n this.updateUIAlignment(leftAlignmentEnabled);\n }\n\n const deviceState = await asyncStorage.getItem(\n \"devtools.responsive.deviceState\"\n );\n if (deviceState) {\n // Return if there is a device state to restore, this will be done when the\n // device list is loaded after the post-init.\n return;\n }\n\n const height = Services.prefs.getIntPref(\n \"devtools.responsive.viewport.height\",\n 0\n );\n const pixelRatio = Services.prefs.getIntPref(\n \"devtools.responsive.viewport.pixelRatio\",\n 0\n );\n const touchSimulationEnabled = Services.prefs.getBoolPref(\n \"devtools.responsive.touchSimulation.enabled\",\n false\n );\n const userAgent = Services.prefs.getCharPref(\n \"devtools.responsive.userAgent\",\n \"\"\n );\n const width = Services.prefs.getIntPref(\n \"devtools.responsive.viewport.width\",\n 0\n );\n\n let reloadNeeded = false;\n const { type, angle } = this.getInitialViewportOrientation({\n width,\n height,\n });\n\n this.updateViewportSize(width, height);\n await this.updateDPPX(pixelRatio);\n await this.updateScreenOrientation(type, angle);\n\n if (touchSimulationEnabled) {\n reloadNeeded |=\n (await this.updateTouchSimulation(touchSimulationEnabled)) &&\n this.reloadOnChange(\"touchSimulation\");\n }\n if (userAgent) {\n reloadNeeded |=\n (await this.updateUserAgent(userAgent)) &&\n this.reloadOnChange(\"userAgent\");\n }\n if (reloadNeeded) {\n this.getViewportBrowser().reload();\n }\n }", "function viewToDesktop_Master() {\n document.isMobile_Master = false;\n viewDesktop_Master();\n}", "function windowSize() {\n mediaQuery();\n}", "onActiveScreenChanged_() {}", "function defaultView() {\n if (window.innerWidth > 320 && window.innerWidth < 555) {\n createButtons(data, 2);\n displayCards(data, 1, 2);\n } else if (window.innerWidth > 555 && window.innerWidth < 1024) {\n displayCards(data, 1, 4);\n createButtons(data, 4);\n } else if (window.innerWidth > 1024) {\n displayCards(data, 1, 6);\n createButtons(data, 6);\n }\n}", "function onPageLoad() {\n // winResize();\n // winScroll();\n }", "function toggleResponsive() {\r\n\t// initial call\r\n\tif(!$(\"body\").hasClass(\"mobile-xs\") && !$(\"body\").hasClass(\"mobile\") && !$(\"body\").hasClass(\"desktop\")){\r\n\t\tif(window.innerWidth > 991) {\r\n\t\t\t$(\"body\").addClass(\"desktop\");\r\n\t\t} else if (window.innerWidth > 767) {\r\n\t\t\t$(\"body\").addClass(\"mobile\");\r\n\t\t} else {\r\n\t\t\t$(\"body\").addClass(\"mobile-xs\");\r\n\t\t}\r\n\t}\r\n\telse if(window.innerWidth > 991){\r\n\t\tif($(\"body\").hasClass(\"mobile\")){\r\n\t\t\t//size changed from mobile to desktop\r\n\t\t\t$(\"body\").removeClass(\"mobile\").addClass(\"desktop\");\r\n\t\t\tcloseMenu();\r\n\t\t\tif($(\".productfinder .filter\")[0]){\r\n\t\t\t\topenFilterBar();\r\n\t\t\t}\r\n\t\t} \r\n\t} else if(window.innerWidth > 767){\r\n\t\tif($(\"body\").hasClass(\"desktop\")){\r\n\t\t\t//size changed from desktop to mobile\r\n\t\t\t$(\"body\").removeClass(\"desktop\").addClass(\"mobile\");\r\n\t\t\tcloseMenu();\r\n\t\t\tif($(\".productfinder .filter\")[0]){\r\n\t\t\t\tcloseFilterBar();\r\n\t\t\t}\r\n\t\t} else if($(\"body\").hasClass(\"mobile-xs\")){\r\n\t\t\t//size changed from mobile-xs to mobile\r\n\t\t\t$(\"body\").removeClass(\"mobile-xs\").addClass(\"mobile\");\r\n\t\t\tcloseMenu();\r\n\t\t\tif($(\".productfinder .filter\")[0]){\r\n\t\t\t\topenFilterToggles();\r\n\t\t\t\topenFilterBar();\r\n\t\t\t}\r\n\t\t} \r\n\t} else {\t\r\n\t\tif($(\"body\").hasClass(\"mobile\")){\r\n\t\t\t//size changed from mobile to mobile-x\r\n\t\t\t$(\"body\").removeClass(\"mobile\").addClass(\"mobile-xs\");\r\n\t\t\tcloseMenu();\r\n\t\t\tif($(\".productfinder .filter\")[0]){\r\n\t\t\t\tcloseFilterBar();\r\n\t\t\t\tcloseFilterToggles();\r\n\t\t\t}\r\n\t\t}\r\n\t} \r\n}", "function mobileScreen(opt)\n{\n switch(opt)\n {\n case 'welcome':\n skillsWindow('none');\n toWelcome();\n break;\n case 'skills':\n let closeWelc = document.getElementById('welcome-section');\n let closeProj = document.getElementById('projects-section');\n\n closeWelc.style.display = 'none';\n closeProj.style.display = 'none';\n \n skillsWindow('flex');\n \n break;\n case 'projects':\n skillsWindow('none');\n toProjects();\n break;\n }\n\n}", "_update() {\n // Mobile\n if (!Foundation.MediaQuery.atLeast(this.options.hideFor)) {\n this.$element.show();\n this.$targetMenu.hide();\n }\n\n // Desktop\n else {\n this.$element.hide();\n this.$targetMenu.show();\n }\n }", "function checkWindowSize()\n {\n //mobile\n if($(window).width() <= MobileMaximumWidth)\n {\n mobileSize = true;\n tabletSize = false;\n desktopSize = false;\n }\n //tablet\n if($(window).width() <= TabletMaximumWidth && $(window).width() >= MobileMaximumWidth)\n {\n mobileSize = false;\n tabletSize = true;\n desktopSize = false;\n }\n //desktop\n if($(window).width() >= TabletMaximumWidth+1)\n {\n mobileSize = false;\n tabletSize = false;\n desktopSize = true;\n }\n //console.log(mobileSize + \" \" + tabletSize + \" \" + desktopSize );\n }", "function resizeActions() {\n //checking if it needs to get responsive\n responsive(); // rebuild immediately on touch devices\n\n if (isTouchDevice) {\n var activeElement = document.activeElement; //if the keyboard is NOT visible\n\n if (!matches(activeElement, 'textarea') && !matches(activeElement, 'input') && !matches(activeElement, 'select')) {\n var currentHeight = getWindowHeight(); //making sure the change in the viewport size is enough to force a rebuild. (20 % of the window to avoid problems when hidding scroll bars)\n\n if (Math.abs(currentHeight - previousHeight) > 20 * Math.max(previousHeight, currentHeight) / 100) {\n reBuild(true);\n previousHeight = currentHeight;\n }\n }\n } else {\n adjustToNewViewport();\n }\n }", "function resize() {\n var oldValue = isPhone;\n isPhone = !matchMedia('only screen and (min-width: 641px)').matches;\n\n if (oldValue !== isPhone) {\n // Update the min/max position for drag\n window.setTimeout(function () {\n var i = sidePanels.length - 1;\n\n for (; i >= 0; i--) {\n var sb = sidePanels[i];\n sb.snapper.settings({\n maxPosition: sb.el.clientWidth,\n minPosition: -sb.el.clientWidth\n });\n }\n }, 500); // finaly update settings\n\n render();\n }\n }", "function setOperate() {\n setView();\n var agent = navigator.userAgent;\n if (agent.search(/iPhone/) != -1) {\n $(\"body\").addClass(\"iphone\").addClass(\"ios\"); //iPhoneには「body class=\"iphone\"」追加\n window.onorientationchange = setView;\n } else if (agent.search(/iPad/) != -1) {\n $(\"body\").addClass(\"ipad\").addClass(\"ios\"); //iPadには「body class=\"ipad\"」追加\n window.onorientationchange = setView;\n } else if (agent.search(/Android/) != -1) {\n $(\"body\").addClass(\"android\"); //Androidには「body class=\"android\"」追加\n window.onresize = setView;\n } else {\n $(\"body\").addClass(\"other\"); //上記以外には「body class=\"other\"」追加\n window.onorientationchange = setView;\n }\n}", "function stylize() {\n var widthClassDetection = document.getElementsByClassName('device-width');\n if (widthClassDetection!==undefined) {\n var deviceWidth = screen.availWidth;\n for (var i=0;i<widthClassDetection.length;i++) {\n document.getElementsByClassName('device-width')[i].style.width = deviceWidth;\n }\n }\n //height not working...\n var heightClassDetection = document.getElementsByClassName('device-height');\n if (heightClassDetection!==undefined) {\n var deviceHeight = screen.availHeight;\n for (var i=0;i<heightClassDetection.length;i++) {\n document.getElementsByClassName('device-height')[i].style.height = deviceHeight;\n }\n }\n}", "constructor() {\n //Props\n this.updating = false;\n this.state = \"close\";\n this.mobileBreakPoint = 768;\n //Init methods\n this.screenSizeEvent();\n }", "function showTouchscreenContent() {\n\t$(\".show-for-touchscreen\").show();\n}", "function showSaleAdv() {\n let mobileDiv = document.querySelector('#mobile');\n // console.log(mobileDiv)\n let laptopDiv = document.querySelector('#laptop');\n // console.log(laptopDiv)\n let desctopDiv = document.querySelector('#desctop');\n // console.log(desctopDiv)\n if (window.innerWidth >= 1024) {\n laptopDiv.style.display = \"none\";\n mobileDiv.style.display = \"none\";\n desctopDiv.style.display = \"block\";\n desctopDiv.innerHTML = saleDiv;\n } else if (window.innerWidth >= 768 && window.innerWidth <= 1024) {\n desctopDiv.style.display = \"none\";\n mobileDiv.style.display = \"none\";\n laptopDiv.style.display = \"block\";\n laptopDiv.innerHTML = saleDiv;\n } else {\n desctopDiv.style.display = \"none\";\n laptopDiv.style.display = \"none\";\n mobileDiv.style.display = \"block\";\n mobileDiv.innerHTML = saleDiv;\n }\n}", "function updateWindowSize() {\n vh = window.innerHeight;\n vw = window.innerWidth;\n heroBottom = Math.round(vw * .625);\n\n // set breakpoints\n if (vw > 912) {\n mobile = false;\n triggerHook = 0.8;\n } else {\n mobile = true;\n triggerHook = 0.9;\n };\n}", "update () {\n this.listener(\n window.matchMedia(query('laptop')).matches\n )\n }", "function resizeActions(){\n\n //checking if it needs to get responsive\n responsive();\n\n // rebuild immediately on touch devices\n if (isTouchDevice) {\n var activeElement = document.activeElement;\n\n //if the keyboard is NOT visible\n if (!matches(activeElement, 'textarea') && !matches(activeElement, 'input') && !matches(activeElement, 'select')) {\n var currentHeight = getWindowHeight();\n\n //making sure the change in the viewport size is enough to force a rebuild. (20 % of the window to avoid problems when hidding scroll bars)\n if( Math.abs(currentHeight - previousHeight) > (20 * Math.max(previousHeight, currentHeight) / 100) ){\n reBuild(true);\n previousHeight = currentHeight;\n }\n }\n }\n else{\n adjustToNewViewport();\n }\n }", "function resizeActions(){\n\n //checking if it needs to get responsive\n responsive();\n\n // rebuild immediately on touch devices\n if (isTouchDevice) {\n var activeElement = document.activeElement;\n\n //if the keyboard is NOT visible\n if (!matches(activeElement, 'textarea') && !matches(activeElement, 'input') && !matches(activeElement, 'select')) {\n var currentHeight = getWindowHeight();\n\n //making sure the change in the viewport size is enough to force a rebuild. (20 % of the window to avoid problems when hidding scroll bars)\n if( Math.abs(currentHeight - previousHeight) > (20 * Math.max(previousHeight, currentHeight) / 100) ){\n reBuild(true);\n previousHeight = currentHeight;\n }\n }\n }\n else{\n adjustToNewViewport();\n }\n }", "function resizeActions(){\n\n //checking if it needs to get responsive\n responsive();\n\n // rebuild immediately on touch devices\n if (isTouchDevice) {\n var activeElement = document.activeElement;\n\n //if the keyboard is NOT visible\n if (!matches(activeElement, 'textarea') && !matches(activeElement, 'input') && !matches(activeElement, 'select')) {\n var currentHeight = getWindowHeight();\n\n //making sure the change in the viewport size is enough to force a rebuild. (20 % of the window to avoid problems when hidding scroll bars)\n if( Math.abs(currentHeight - previousHeight) > (20 * Math.max(previousHeight, currentHeight) / 100) ){\n reBuild(true);\n previousHeight = currentHeight;\n }\n }\n }\n else{\n adjustToNewViewport();\n }\n }", "function responsive() {\n // Do these on every screen resize\n\n\n // Do these on certain widths\n if ( $(window).width() > 600 ) { // above mobile size\n $('#primary-navigation .menu').removeAttr('style');\n $('#mobile-menu-button').removeClass('has-open');\n } else { // mobile size\n\n }\n }", "function handleResponsive() {\n app.ResponsiveBreakpoints.register_event(\n '0-768',\n 'image-swap-0-768-'+self.initCount ,\n self.setup0_768.bind(self) // using es5-shim.js\n )\n\n app.ResponsiveBreakpoints.register_event(\n '768-+',\n 'image-swap-768up-'+self.initCount ,\n self.setup769up.bind(self) // using es5-shim.js\n )\n }", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n let display = new Display({ diagonal: display_size }, window.screen);\n\n // DO NO CHANGE THESE!\n PPI = display.ppi; // calculates pixels per inch\n PPCM = PPI / 2.54; // calculates pixels per cm\n FINGER_SIZE = int(11 * PPCM);\n FINGER_OFFSET = int(0.8 * PPCM);\n ARM_LENGTH = int(19 * PPCM);\n ARM_HEIGHT = int(11.2 * PPCM);\n\n //ARROW_SIZE = (int)(2.2 * PPCM);\n BASE_WIDTH = int(width / 2 - 2.0 * PPCM);\n BASE_HEIGHT = int(height / 2 - (1.0 - 0.592) * PPCM);\n BT_WIDTH = int(1.333 * PPCM);\n BT_HEIGHT = int(0.737 * PPCM);\n\n // Starts drawing the watch immediately after we go fullscreen (DO NO CHANGE THIS!)\n draw_finger_arm = true;\n attempt_start_time = millis();\n}", "function checkAndSetMobileScreenSize() {\r\n if(window.innerWidth <= 768) {\r\n var viewer = document.getElementById(\"viewer\");\r\n if(window.innerWidth < window.innerHeight) {\r\n // less than full viewport height if portrait mode\r\n viewer.style.height = \"350px\";\r\n } else {\r\n // full viewport height when landscape mode\r\n viewer.style.height = window.innerHeight + \"px\";\r\n }\r\n }\r\n }", "function resizePage() {\n\tvar screenWidth = ui.platformWidth();\n\tvar screenHeight = ui.platformHeight();\n\tif (!isIOS) {\n\t\tscreenHeight -= 70;\n\t}\n\tscreenLeft = screenHeight;\n\n\t$.submitButton.top = screenHeight - 70;\n\t$.submitButton.width = screenWidth - 40;\n\tscreenLeft = $.submitButton.top;\n\n\tif (comments == true) {\t\t\n\t\tif (displayAsButton && commentButton == null) {\n\t\t\tcommentButtonEnabled();\n\t\t\tcommentButton.top = screenLeft - 70;\n\t\t\tscreenLeft = commentButton.top;\n\t\t} else if (displayAsButton && commentButton != null) {\n\t\t\tcommentButton.top = screenLeft - 70;\n\t\t\tcommentButton.width = screenWidth - 40;\n\t\t\tcommentArea.width = screenWidth - 40;\n\t\t\tscreenLeft = commentButton.top;\n\t\t} else if (!displayAsButton && commentBox == null) {\n\t\t\tcommentsEnabled();\n\t\t\tcommentBox.top = screenLeft - 70;\n\t\t\tcommentLab.top = screenLeft - 100;\n\t\t\tscreenLeft = commentLab.top;\n\t\t} else if (!displayAsButton && commentBox != null) {\n\t\t\tcommentBox.top = screenLeft - 70;\n\t\t\tcommentLab.top = screenLeft - 100;\n\t\t\tcommentBox.width = screenWidth - 40;\n\t\t\tcommentArea.width = screenWidth - 40;\n\t\t\tscreenLeft = commentLab.top;\n\t\t}\n\t}\n\n\t$.yesButton.top = screenLeft - 100;\n\t$.yesButton.width = screenWidth / 2 - 30;\n\n\t$.noButton.top = screenLeft - 100;\n\t$.noButton.width = screenWidth / 2 - 30;\n\n\tscreenLeft = $.yesButton.top;\n\n\tif (fullScreen == false) {\n\t\tif (!isIOS) {\n\t\t\t$.currentImage.top = 30;\n\t\t}\n\t\t$.currentImage.image = imagePath;\n\t\t$.currentImage.height = screenLeft - 80;\n\t\t$.currentImage.width = \"auto\";\n\t} else {\n\t\t$.currentImage.height = screenHeight - 40 - topSpace;\n\t\t$.currentImage.width = \"auto\";\n\t\t$.currentImage.top = topSpace + 20;\n\t\t$.currentImage.zIndex = 5;\n\t}\n}", "function normal_view(){\n\tif (window.innerWidth<956){\n\t\t$burger.show();\n\t}else{\n\t\t$list.slideDown();\n\t}\n\t$chat.slideDown();\n\treset();\n}", "function changeToLandscape() {\n document.getElementById(\"overlaytext\").innerHTML = \"Paused<br />Tap to Continue\";\n document.getElementById(\"overlaydiv\").style.display = \"table\";\n document.getElementById(\"gameboarddiv\").style.display = \"inline\";\n setOverlay();\n\n if (window.matchMedia) {\n // PHONE\n if (window.matchMedia('(max-device-width: 767px)').matches) {\n canvas.width = window.innerWidth;\n canvas.height = window.innerHeight - 40;\n }\n // TABLET\n else if (window.matchMedia('(max-device-width: 1024px)').matches) {\n canvas.width = window.innerWidth;\n canvas.height = window.innerHeight - 50;\n }\n }\n}", "function startResize() {\n $(window).bind('resize.tink',function () {\n safeApply(scope,function(){\n breakpoint.refreshValue();\n });\n });\n }", "function calibrateDevice(deviceName) {\n var deviceName = document.querySelector(deviceName)\n\n // When the respective devices have been loaded in the dom, firstly, the scrollbars are hidden and then the zoom factor is decreased from the default of 1 to 0.6 to match the zoom out of the app\n deviceName.addEventListener('dom-ready', () => {\n // This is to hide scrollbars in the devices\n deviceName.insertCSS(`\n ::-webkit-scrollbar {\n display: none;\n }\n `)\n // Make the devices zoom factor 60% of their original to match the zoom out done in main.js to the app window\n deviceName.setZoomFactor(0.6)\n\n // For the back button\n document.getElementById(\"backButton\").addEventListener(\"click\", () => {\n // If can go back, then go back\n if (deviceName.canGoBack) {\n deviceName.goBack()\n } else {\n // For some reason, anything put in here has no effect\n }\n })\n\n // For the forward button\n document.getElementById(\"forwardButton\").addEventListener(\"click\", () => {\n // If can go forward, then go forward\n if (deviceName.canGoForward) {\n deviceName.goForward()\n } else {\n // For some reason, anything put in here has no effect\n }\n })\n\n // To reload the webviews\n document.getElementById(\"reloadButton\").addEventListener(\"click\", () => {\n // Reload\n deviceName.reload()\n })\n\n // For the back button\n document.getElementById(\"homeButton\").addEventListener(\"click\", () => {\n // Go to index.html\n location.href = '../index.html'\n })\n })\n}", "function breakPoint () {\n if (window.innerWidth <= 650) {\n $('.container').html(mobileAnchors());\n } else {\n $('.container').html(desktopAnchors());\n }\n}", "function optimizeForMobile() {\n if (createjs.Touch.isSupported()) {\n createjs.Touch.enable(stage);\n }\n}", "function optimizeForMobile() {\n if (createjs.Touch.isSupported()) {\n createjs.Touch.enable(stage);\n }\n}", "function optimizeForMobile() {\n if (createjs.Touch.isSupported()) {\n createjs.Touch.enable(stage);\n }\n}", "function optimizeForMobile() {\n if (createjs.Touch.isSupported()) {\n createjs.Touch.enable(stage);\n }\n}", "function optimizeForMobile() {\n if (createjs.Touch.isSupported()) {\n createjs.Touch.enable(stage);\n }\n}", "_setBreakpoints() {\n let v = this.layoutBreakpoint > -1 ? this.layoutBreakpoint : 0,\n i = this.iconBreakpoint > -1 ? this.iconBreakpoint : 0,\n sm = i > v ? v : i,\n md = i > v ? i : v,\n lg = Math.max(i, v) + 1,\n xl = Math.max(i, v) + 2;\n window.dispatchEvent(\n new CustomEvent(\"responsive-element\", {\n detail: {\n element: this,\n attribute: \"responsive-size\",\n relativeToParent: true,\n sm: sm,\n md: md,\n lg: lg,\n xl: xl\n }\n })\n );\n }", "getScreenSize(event) {\r\n this.scrWidth = window.innerWidth;\r\n }", "getScreenSize(event) {\r\n this.scrWidth = window.innerWidth;\r\n }", "function mobileKeyboard() {\n if (window.innerWidth < 800) {\n expressionInput.readOnly = 'readOnly';\n graphReadOnly = true;\n }\n}", "function windowResized()\n{\n resizeCanvas(windowWidth, windowHeight);\n let display = new Display({ diagonal: display_size }, window.screen);\n \n // DO NO CHANGE THESE!\n PPI = display.ppi; // calculates pixels per inch\n PPCM = PPI / 2.54; // calculates pixels per cm\n FINGER_SIZE = (int)(11 * PPCM);\n FINGER_OFFSET = (int)(0.8 * PPCM)\n ARM_LENGTH = (int)(19 * PPCM);\n ARM_HEIGHT = (int)(11.2 * PPCM);\n \n ARROW_SIZE = (int)(2.2 * PPCM);\n \n // Starts drawing the watch immediately after we go fullscreen (DO NO CHANGE THIS!)\n draw_finger_arm = true;\n attempt_start_time = millis();\n\n y_corner = height/2 - 0.5*PPCM;\n x_corner = width/2 - 2.0*PPCM;\n\n}", "function updateQuery(e){\r\n\t\tvar device = constDevice,//all, screen, handheld, tv etc.\r\n\t\twidth = window.innerWidth||document.getElementsByTagName('html')[0].offsetWidth,\r\n\t\theight = window.innerHeight||document.getElementsByTagName('html')[0].offsetHeight,\r\n\t\tdeviceWidth = window.screen.width,\r\n\t\tdeviceHeight = window.screen.height,\r\n\t\torientation = (width>height) ? 'landscape' : 'portrait',\r\n\t\taspectRatio = width/height,\r\n\t\tdeviceAspectRatio = deviceWidth/deviceHeight,\r\n\t\tcolor = 8,\r\n\t\tcolorIndex = Math.pow(color,3),\r\n\t\t//monochrome = 0,\r\n\t\tresolution = 96,//dpi\r\n\t\tscan = constScan,//progressive or interlace\r\n\t\tgrid = 0,//0 or 1 only\r\n\t\ti, n, x, query, queryRule, Style = '';\r\n\r\n\t\tnextquery: //goto \r\n\t\tfor (query in MediaQuery) {\r\n\t\t\tqueryRule = query.split(/\\s+and\\s+/i)\r\n\t\t\t\r\n\t\t\t//first rule is device\r\n\t\t\tif (device.indexOf(queryRule[0].toLowerCase())==-1) continue\r\n\t\t\t\r\n\t\t\t//next rules are features\r\n\t\t\ti=1; while (n = queryRule[i++]) {\r\n\t\t\t\tswitch ( n.substr(0,n.search(/:|\\)/)) ) {\r\n\t\t\t\t\t//width, height, device-width, device-height\r\n\t\t\t\t\tcase '(width':\r\n\t\t\t\t\tcase '(height':\r\n\t\t\t\t\tcase '(device-width':\r\n\t\t\t\t\tcase '(device-height': \r\n\t\t\t\t\t\tif (\r\n\t\t\t\t\t\t\tn.substring(n.indexOf(':')+1,n.indexOf('px')) != \r\n\t\t\t\t\t\t\t( (/width/.test(n)) ? \r\n\t\t\t\t\t\t\t(/device/.test(n)) ? deviceWidth : width :\r\n\t\t\t\t\t\t\t(/device/.test(n)) ? deviceHeight : height )\r\n\t\t\t\t\t\t) \r\n\t\t\t\t\t\t\tcontinue nextquery\r\n\t\t\t\t\t\tbreak\r\n\t\t\t\t\tcase '(max-width':\r\n\t\t\t\t\tcase '(max-height':\r\n\t\t\t\t\tcase '(max-device-width':\r\n\t\t\t\t\tcase '(max-device-height': \r\n\t\t\t\t\t\tif (\r\n\t\t\t\t\t\t\tn.substring(n.indexOf(':')+1,n.indexOf('px')) <= \r\n\t\t\t\t\t\t\t( (/width/.test(n)) ? \r\n\t\t\t\t\t\t\t(/device/.test(n)) ? deviceWidth : width :\r\n\t\t\t\t\t\t\t(/device/.test(n)) ? deviceHeight : height )\r\n\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\tcontinue nextquery\r\n\t\t\t\t\t\tbreak\r\n\t\t\t\t\tcase '(min-width':\r\n\t\t\t\t\tcase '(min-height':\r\n\t\t\t\t\tcase '(min-device-width':\r\n\t\t\t\t\tcase '(min-device-height': \r\n\t\t\t\t\t\tif (\r\n\t\t\t\t\t\t\tn.substring(n.indexOf(':')+1,n.indexOf('px')) >= \r\n\t\t\t\t\t\t\t( (/width/.test(n)) ? \r\n\t\t\t\t\t\t\t(/device/.test(n)) ? deviceWidth : width :\r\n\t\t\t\t\t\t\t(/device/.test(n)) ? deviceHeight : height )\r\n\t\t\t\t\t\t) \r\n\t\t\t\t\t\t\tcontinue nextquery\r\n\t\t\t\t\t\tbreak\r\n\t\t\t\t\t//orientation\r\n\t\t\t\t\tcase '(orientation': \r\n\t\t\t\t\t\tif (n.substring(n.indexOf(':')+1,n.indexOf(')')) != orientation) \r\n\t\t\t\t\t\t\tcontinue nextquery\r\n\t\t\t\t\t\tbreak\r\n\t\t\t\t\t//aspect-ratio, device-aspect-ratio\r\n\t\t\t\t\tcase '(aspect-ratio': \r\n\t\t\t\t\tcase '(device-aspect-ratio': \r\n\t\t\t\t\t\tx = n.substring(n.indexOf(':')+1,n.indexOf(')'))\r\n\t\t\t\t\t\tif (/\\//.test(x)) x = \r\n\t\t\t\t\t\t\tx.substr(0,x.indexOf('/'))/\r\n\t\t\t\t\t\t\tx.substr(x.indexOf('/')+1)\r\n\t\t\t\t\t\tif ( x != ((/device/.test(n)) ? deviceAspectRatio : aspectRatio) ) \r\n\t\t\t\t\t\t\tcontinue nextquery\r\n\t\t\t\t\t\tbreak\r\n\t\t\t\t\tcase '(max-aspect-ratio': \r\n\t\t\t\t\tcase '(max-device-aspect-ratio':\r\n\t\t\t\t\t\tx = n.substring(n.indexOf(':')+1,n.indexOf(')'))\r\n\t\t\t\t\t\tif (/\\//.test(x)) x = \r\n\t\t\t\t\t\t\tx.substr(0,x.indexOf('/'))/\r\n\t\t\t\t\t\t\tx.substr(x.indexOf('/')+1)\r\n\t\t\t\t\t\tif ( x <= ((/device/.test(n)) ? deviceAspectRatio : aspectRatio) ) \r\n\t\t\t\t\t\t\tcontinue nextquery\r\n\t\t\t\t\t\tbreak\r\n\t\t\t\t\tcase '(min-aspect-ratio': \r\n\t\t\t\t\tcase '(min-device-aspect-ratio': \r\n\t\t\t\t\t\tx = n.substring(n.indexOf(':')+1,n.indexOf(')'))\r\n\t\t\t\t\t\tif (/\\//.test(x)) x = \r\n\t\t\t\t\t\t\tx.substr(0,x.indexOf('/'))/\r\n\t\t\t\t\t\t\tx.substr(x.indexOf('/')+1)\r\n\t\t\t\t\t\tif ( x >= ((/device/.test(n)) ? deviceAspectRatio : aspectRatio) ) \r\n\t\t\t\t\t\t\tcontinue nextquery\r\n\t\t\t\t\t\tbreak\r\n\t\t\t\t\t//color, color-index\r\n\t\t\t\t\tcase '(color': \r\n\t\t\t\t\tcase '(color-index': \r\n\t\t\t\t\t\tif (n=='(color)' || n=='(color-index)' ) break\r\n\t\t\t\t\t\tif ( n.substring(n.indexOf(':')+1,n.indexOf(')')) != ((/index/.test(n)) ? colorIndex : color) ) \r\n\t\t\t\t\t\t\tcontinue nextquery\r\n\t\t\t\t\t\tbreak\r\n\t\t\t\t\tcase '(max-color':\r\n\t\t\t\t\tcase '(max-color-index': \r\n\t\t\t\t\tcase '(min-color': \r\n\t\t\t\t\tcase '(min-color-index': break\r\n\t\t\t\t\t//monochrome\r\n\t\t\t\t\tcase '(monochrome':\r\n\t\t\t\t\tcase '(max-monochrome':\r\n\t\t\t\t\tcase '(min-monochrome': continue nextquery\r\n\t\t\t\t\t//resolution\r\n\t\t\t\t\tcase '(resolution': \r\n\t\t\t\t\t\tif (n=='(resolution)') continue nextquery\r\n\t\t\t\t\t\tif ( n.substring(n.indexOf(':')+1,n.indexOf('dpi')) != resolution ) continue nextquery\t\r\n\t\t\t\t\t\tbreak\r\n\t\t\t\t\tcase '(max-resolution': \r\n\t\t\t\t\t\tif ( n.substring(n.indexOf(':')+1,n.indexOf('dpi')) <= resolution ) continue nextquery\t\r\n\t\t\t\t\t\tbreak\r\n\t\t\t\t\tcase '(min-resolution': \r\n\t\t\t\t\t\tif ( n.substring(n.indexOf(':')+1,n.indexOf('dpi')) >= resolution ) continue nextquery\t\r\n\t\t\t\t\t\tbreak\r\n\t\t\t\t\t//scan\r\n\t\t\t\t\tcase '(scan': \r\n\t\t\t\t\t\tif (n=='(scan)') continue nextquery\r\n\t\t\t\t\t\tif ( n.substring(n.indexOf(':')+1,n.indexOf(')')) != scan ) continue nextquery\t\r\n\t\t\t\t\t\tbreak\r\n\t\t\t\t\t//grid\r\n\t\t\t\t\tcase '(grid': \r\n\t\t\t\t\t\tif (\r\n\t\t\t\t\t\t\t( n=='(grid)' && 0 != grid ) ||\r\n\t\t\t\t\t\t\t( n.substring(n.indexOf(':')+1,n.indexOf(')')) != grid )\r\n\t\t\t\t\t\t) continue nextquery\r\n\t\t\t\t\t\tbreak\r\n\t\t\t\t\tdefault: continue nextquery\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tStyle += MediaQuery[query]\r\n\t\t}\t\r\n\t\tredraw(Style)\r\n\t}", "function fMediaQueries () {\n console.log (\"fMediaQueries --------------------------: \");\n winWidth = $ (window).width (); //Browser window width\n console.log (\"winWidth: \" + winWidth);\n\n windowInnerWidth = window.innerWidth;\n console.log (\"windowInnerWidth: \" + windowInnerWidth);\n\n ///**-----{ imgTitle vertical position. Put at the bottom }-----**/\n //imgTitleTop = rowImgHeight - 40;\n\n /**-------------===========( Cellphones Viewport )===========-------------**/\n if (windowInnerWidth <= 480) {\n console.log (\"•-------------------- Tiny : <= 480 ---------------------•\");\n /**-----{ fTwoColumns: Changing columns width percentage in a Row }-----**/\n fTwoColumns (90); //Right column @ 90% width. Left column @ 10%.\n /**-----{ Image title height and top position }-----**/\n fTitlePlacement (imgTitle, imgTitleHeight, imgRowHeight); //smallHeight - 40\n /**----( fImageHeightWidth: Setting array member's heights and widths )----**/\n fImageHeightWidth (aHorizonImages, imgRowHeight + imgTitleHeight, colRightWidth); //smallHeight\n fImageHeightWidth (aStaxImages, imgRowHeight + imgTitleHeight, colRightWidth);\n fImageHeightWidth (aOwnImages, imgRowHeight + imgTitleHeight, colRightWidth);\n /**----( fImagesContainerWidthHeight: Setting images container width based on images array )----**/\n fImagesContainerWidthHeight (horizonImagesContainerId, aHorizonImages, imgRowHeight);\n fImagesContainerWidthHeight (staxImagesContainerId, aStaxImages, imgRowHeight);\n fImagesContainerWidthHeight (ownImagesContainerId, aOwnImages, imgRowHeight);\n /**-----{ To do: Add these feature to above function for horizonImagesContainerId }-----**/\n //fAnimateHeight (horizonImagesContainerId, imgRowHeight+50);\n\n fHeightWidthPercentage ();\n\n fHeaderFonts(1.8, 1.2, 1.2, 1); //Large settings\n console.log (\"•-------------------- End Tiny ---------------------•\");\n\n /**-------------===========( Smartphones Viewport: 480 - 640 )===========-------------**/\n } else if (windowInnerWidth <= smallDevices && windowInnerWidth > 480) {\n console.log (\"•-------------------- Small : 480 - 640 ---------------------•\");\n\n /**-----{ Changing columns width percentage in a Row }-----**/\n fTwoColumns (90);\n fHeaderFonts(2.2, 1.4, 1.4, 1.2); //Large settings\n fCommonFunctionalities();\n console.log (\"•-------------------- End Small ---------------------•\");\n\n /*\n //fAnimateHeight (rowImgRightColmn, smallHeight);\n fAnimateHeight (rowImgRightColmn, imgRowHeight);\n fAnimateTop (imgTitle, smallHeight - 40);\n //rowImgHeight = smallHeight;\n //fAnimateTop(imgTitle, imgTitleTop);\n //rowImgRightColmn.css ({\"height\": smallHeight});\n //rowImgHeight = smallHeight;\n h2.css ({\"lineHeight\": \"90%\", \"fontSize\": \"1.2em\"});\n h3.css ({\"lineHeight\": \"100%\", \"fontSize\": \"1.4em\"});\n\n /!**-----{ Changing columns width percentage in a Row }-----**!/\n var windowInnerWidth10 = windowInnerWidth / 9; //Left column @ 10%\n var windowInnerWidth90 = windowInnerWidth - windowInnerWidth10; //Right column @ 90%\n //console.log (\"windowInnerWidth10: \", windowInnerWidth10);\n //console.log (\"windowInnerWidth90: \", windowInnerWidth90);\n rowImgRightColmnWidth = windowInnerWidth90;\n //fTwoColumns ();\n */\n /**-------------------------------------------------------**/\n\n /*\n /!**----( aHorizonImages: Setting array member's heights and widths )----**!/\n for (var i = 0; i < aHorizonImages.length; i++) {\n fAnimateHeightWidth (aHorizonImages, imgRowHeight, windowInnerWidth90); //rowImgRightColmnWidth);\n }\n\n /!*!/!**----( aHorizonImages: HBCBS images array collection )----**!/\n for (var i = 0; i < aHorizonImages.length; i++) {\n fAnimateHeightWidth (aHorizonImages, smallHeight, rowImgRightColmnWidth); //rowImgRightColmnWidth);\n }*!/\n /!*!/!**----( Compress the left columns )----**!/\n for (var i = 0; i < aLeftColumns.length; i++) {\n aLeftColumns[i].css ({\"width\": \"20%\"}); //33.33333333%;\n }\n /!**----( Adjust the right columns )----**!/\n for (var i = 0; i < aRightColumns.length; i++) {\n aRightColumns[i].css ({\"width\": \"80%\"}); //33.33333333%;\n }*!/\n\n /!**----( Adjust left columns width )----**!/\n colLeft.css ({\"width\": \"10%\"});\n /!**----( Adjust the right columns )----**!/\n colRight.css ({\"width\": \"90%\"});\n\n /!*!/!**----( Default left columns width )----**!/\n for (var i = 0; i < aLeftColumns.length; i++) {\n aLeftColumns[i].css ({\"width\": \"10%\"}); //33.33333333%;\n }\n /!**----( Adjust the right columns )----**!/\n for (var i = 0; i < aRightColumns.length; i++) {\n aRightColumns[i].css ({\"width\": \"90%\"}); //66.6666666%;\n }*!/\n\n horizonImagesContainerIdWidth = (rowImgRightColmnWidth * aHorizonImages.length) + 100;\n horizonImagesContainerId.css ({\"width\": horizonImagesContainerIdWidth});\n\n //rowParagRightColmn.css ({\"paddingLeft\": \"15px\"});\n //console.log (\"rowImgRightColmnWidth: \" + rowImgRightColmnWidth);\n /!*rowImgRightColmn.css ({\"height\": \"300px\"});*!/\n */\n /**-------------===========( Between Tablets and Smartphones Viewport )===========-------------**/\n } else if (windowInnerWidth <= mediumDevices && windowInnerWidth > smallDevices) {\n console.log (\"•--------------- Medium : 640 - 992 ----------------•\");\n console.log (\"mediumDevices: \", mediumDevices, \" smallDevices: \", smallDevices);\n\n //colRightCropWidth = 550\n //var colRightWidthX = 500\n /**-----{ Changing columns width percentage in a Row }-----**/\n fTwoColumns (80);\n fHeaderFonts(2.2, 1.4, 1.4, 1.2); //Large settings\n fCommonFunctionalities();\n console.log (\"•-------------------- End Medium ---------------------•\");\n\n /**-------------===========( Between Desktop and Tablets Viewport )===========-------------**/\n } else if (windowInnerWidth <= largeDevices && windowInnerWidth > mediumDevices) {\n console.log (\"•--------------- Large : 992 - 1200 ----------------•\");\n console.log (\"largeDevices: \", largeDevices, \"mediumDevices: \", mediumDevices);\n /**-----{ Changing columns width percentage in a Row }-----**/\n fTwoColumns (80);\n fHeaderFonts(2.2, 1.4, 1.5, 1.2); //Large settings\n fCommonFunctionalities();\n console.log (\"•-------------------- End Large ---------------------•\");\n\n /**-------------===========( Extra Large Viewport )===========-------------**/\n } else {\n console.log (\"•-------------------- Extra Large ---------------------•\");\n /**-----{ Changing columns width percentage in a Row }-----**/\n fTwoColumns (80);\n fHeaderFonts(2.2, 1.4, 1.5, 1.2); //Large settings\n fCommonFunctionalities();\n console.log (\"•-------------------- End Extra Large ---------------------•\");\n }\n }", "onResize() {\n let mobile = window.innerWidth < 800\n if (mobile !== this.isMobile) {\n this.isMobile = mobile\n }\n }", "function setupEvents() {\r\n var element = frontCanvas;\r\n\r\n // Needed this to override context menu behavior\r\n element.bind('contextmenu', function(evt) { evt.preventDefault(); });\r\n\r\n // Wheel should zoom across browsers\r\n element.bind('DOMMouseScroll mousewheel', function (evt) {\r\n var x = (-evt.originalEvent.wheelDeltaY || evt.originalEvent.detail);\r\n\r\n lastLocation = getRelativeLocation(frontCanvas, evt);\r\n handleZoom((x > 0 ? wheelZoom : x < 0 ? -wheelZoom : 0));\r\n evt.preventDefault();\r\n\r\n // Redraw the image in the canvas\r\n redrawImage();\r\n });\r\n\r\n // Handle mobile\r\n attachTouchListener(element);\r\n element.bind('mouse', function(e){\r\n // action: mouseAction,\r\n // current_button: current_button,\r\n // charCode: '',\r\n // altKey: false,\r\n // ctrlKey: false,\r\n // shiftKey: false,\r\n // metaKey: false,\r\n // delegateTarget: target,\r\n // pageX: posX,\r\n // pageY: posY\r\n var action = e.action,\r\n altKey = e.altKey,\r\n shiftKey = e.shiftKey,\r\n ctrlKey = e.ctrlKey,\r\n x = e.pageX,\r\n y = e.pageY,\r\n current_button = e.current_button;\r\n\r\n if(action === 'down') {\r\n if (e.altKey) {\r\n current_button = 2;\r\n e.altKey = false;\r\n } else if (e.shiftKey) {\r\n current_button = 3;\r\n e.shiftKey = false;\r\n }\r\n // Detect interaction mode\r\n switch(current_button) {\r\n case 2: // middle mouse down = pan\r\n mouseMode = modePan;\r\n break;\r\n case 3: // right mouse down = zoom\r\n mouseMode = modeZoom;\r\n break;\r\n default:\r\n mouseMode = modeRotation;\r\n break;\r\n }\r\n\r\n // Store mouse location\r\n lastLocation = [x, y];\r\n\r\n e.preventDefault();\r\n } else if(action === 'up') {\r\n mouseMode = modeNone;\r\n e.preventDefault();\r\n } else if(action === 'move') {\r\n if(mouseMode != modeNone) {\r\n var loc = [x,y];\r\n\r\n // Can NOT use switch as (modeRotation == modePan) is\r\n // possible when Pan should take over rotation as\r\n // rotation is not possible\r\n if(mouseMode === modePan) {\r\n handlePan(loc);\r\n } else if (mouseMode === modeZoom) {\r\n var deltaY = loc[1] - lastLocation[1];\r\n handleZoom(deltaY * dzScale);\r\n\r\n // Update mouse location\r\n lastLocation = loc;\r\n } else {\r\n handleRotation(loc);\r\n }\r\n\r\n // Redraw the image in the canvas\r\n redrawImage();\r\n }\r\n }\r\n });\r\n\r\n // Zoom and pan events with mouse buttons and drag\r\n element.bind('mousedown', function(evt) {\r\n var current_button = evt.which;\r\n\r\n // alt+click simulates center button, shift+click simulates right\r\n if (evt.altKey) {\r\n current_button = 2;\r\n evt.altKey = false;\r\n } else if (evt.shiftKey) {\r\n current_button = 3;\r\n evt.shiftKey = false;\r\n }\r\n\r\n // Detect interaction mode\r\n switch(current_button) {\r\n case 2: // middle mouse down = pan\r\n mouseMode = modePan;\r\n break;\r\n case 3: // right mouse down = zoom\r\n mouseMode = modeZoom;\r\n break;\r\n default:\r\n mouseMode = modeRotation;\r\n break;\r\n }\r\n\r\n // Store mouse location\r\n lastLocation = getRelativeLocation(frontCanvas, evt);\r\n\r\n evt.preventDefault();\r\n });\r\n\r\n // Send mouse movement event to the forwarding function\r\n element.bind('mousemove', function(e) {\r\n if(mouseMode != modeNone) {\r\n var loc = getRelativeLocation(frontCanvas, e);\r\n\r\n // Can NOT use switch as (modeRotation == modePan) is\r\n // possible when Pan should take over rotation as\r\n // rotation is not possible\r\n if(mouseMode === modePan) {\r\n handlePan(loc);\r\n } else if (mouseMode === modeZoom) {\r\n var deltaY = loc[1] - lastLocation[1];\r\n handleZoom(deltaY * dzScale);\r\n\r\n // Update mouse location\r\n lastLocation = loc;\r\n } else {\r\n handleRotation(loc);\r\n }\r\n\r\n // Redraw the image in the frontCanvas\r\n redrawImage();\r\n }\r\n });\r\n\r\n // Stop any zoom or pan events\r\n element.bind('mouseup', function(evt) {\r\n mouseMode = modeNone;\r\n evt.preventDefault();\r\n });\r\n }", "function onClicked() {\r\n\t\ttablet.gotoWebScreen(APP_URL);\r\n\t}", "function windowResized() {\n setup();\n}" ]
[ "0.7200166", "0.678459", "0.6781289", "0.67512316", "0.668738", "0.65261626", "0.65133005", "0.64897096", "0.6486596", "0.6385893", "0.63152725", "0.6298428", "0.62740064", "0.6202469", "0.6202469", "0.6193803", "0.61922544", "0.61870843", "0.61564577", "0.61528003", "0.61263144", "0.6055387", "0.60508525", "0.60345703", "0.59899664", "0.5971301", "0.5971219", "0.5963846", "0.5955457", "0.59396434", "0.59207535", "0.5914868", "0.5906", "0.58883655", "0.58864164", "0.588306", "0.5870043", "0.5870039", "0.5868378", "0.5857333", "0.5844103", "0.58370894", "0.58279675", "0.5827327", "0.58038473", "0.5795023", "0.5772145", "0.575426", "0.57460326", "0.57458836", "0.5745332", "0.57427555", "0.5739266", "0.57351077", "0.5733201", "0.5730661", "0.5727557", "0.5713351", "0.57029575", "0.5699779", "0.5692286", "0.56874925", "0.5686994", "0.5683091", "0.56740487", "0.56712043", "0.5670452", "0.56528854", "0.56497514", "0.5643814", "0.5630835", "0.56255186", "0.56145483", "0.56145483", "0.56145483", "0.5613137", "0.5609291", "0.5602077", "0.5602048", "0.5601465", "0.55990237", "0.55987245", "0.55914736", "0.55909055", "0.55899566", "0.5588098", "0.5588098", "0.5588098", "0.5588098", "0.5588098", "0.5582205", "0.55814385", "0.55814385", "0.55811656", "0.5577223", "0.5568747", "0.55679184", "0.5564114", "0.55588263", "0.5556531", "0.552823" ]
0.0
-1
get the column width per unit. an item may be multiple units tall or wide, but we need to figuire out the unit dynamically on resize
function getUnitWidth() { var width; if ($(".visible-phone").is(":visible")) { width = $isocontainer.width() / 2; } else if ($(".visible-tablet").is(":visible")) { width = $isocontainer.width() / 3; } else { width = $isocontainer.width() / 5; } return width; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function measureWidth(item) {\n context.font = font(item);\n return measure(textValue(item));\n}", "function measureWidth(item) {\n context.font = font(item);\n return measure(textValue(item));\n}", "function measureWidth(item) {\n context.font = font(item);\n return measure(textValue(item));\n}", "function measureWidth(item) {\n context$1.font = font(item);\n return measure$1(textValue(item));\n }", "static get COLUMN_WIDTH() { return _COLUMN_WIDTH; }", "get gridItemWidth() {\n return windowWidth / this.perRow;\n }", "get gridItemWidth() {\n return windowWidth / this.perRow;\n }", "function _getFullFlexItemWidth(elem, availableCols) {\n var colspan = 1; // For direction === 'column', we want the width to be 100%. For 'row', we want it to be\n // the 100% divided by the number of columns.\n\n if (element.direction === 'column') {\n return '100%';\n } // If elem has a colspan property, then\n\n\n if (elem && 'colspan' in elem && elem.colspan) {\n colspan = Math.min(Math.floor(elem.colspan), availableCols);\n /* force integer colspan values,\n don't exceed availableCols */\n }\n\n return Math.floor(100000 / element.maxColumns) / 1000 * colspan + '%';\n } // for direction=='row' && labelEdge=='start', use labelWidth/max-columns for any relative units,", "get _width() {\n // The container event's width is determined by the maximum number of\n // events in any of its rows.\n if (this.rows) {\n const columns =\n this.rows.reduce((max, row) => {\n return Math.max(max, row.leaves.length + 1) // add itself\n }, 0) + 1 // add the container\n\n return 100 / columns\n }\n\n const availableWidth = 100 - this.container._width\n\n // The row event's width is the space left by the container, divided\n // among itself and its leaves.\n if (this.leaves) {\n return availableWidth / (this.leaves.length + 1)\n }\n\n // The leaf event's width is determined by its row's width\n return this.row._width\n }", "get cellWidth() {\n return (min(width, height) - 2*GRID_BUFFER) / this.cols;\n }", "getAllItemsWidth() {\n return this.items.length * (this.initialItemsWidth / this.initialItemElements.length);\n }", "getColumnsAmount() { //metodo para calcular a quantidade de coluna disponivel baseado no tamanho do bloco, para saber as dimensoes do celular\n const width = Dimensions.get('window').width\n return Math.floor(width / this.blockSize)\n }", "lineupGetColumnWidth (name, col, fixed) {\n let width = col.width || 0;\n let colname = col.column || col.type;\n /* Get the column scaling based on the user settings, if available */\n if (this.lineupColumns && this.lineupColumns[name] && this.lineupColumns[name][colname]) {\n width = this.lineupColumns[name][colname] + fixed;\n }\n let colWidth = width < fixed ? 0 : (width - fixed);\n if (col === 'rank') { /* defined in LineUp */\n colWidth = this.lineupRankWidth;\n }\n col.widthBasis = colWidth;\n col.widthFixed = fixed;\n return col.widthBasis;\n }", "function _calc() {\n var winW = $w.width() < $t.width() ? $t.width() : $w.width();\n var realW = winW - 2 * cfg.navWidth - cfg.perNumber;\n var itemW = Math.floor(realW / cfg.perNumber);\n return itemW;\n }", "function estimateWidth(item) {\n currFontHeight = fontSize(item);\n return estimate(textValue(item));\n}", "getWidthUnit(){return this.__widthUnit}", "function estimateWidth(item) {\n currFontHeight = fontSize(item);\n return estimate(textValue(item));\n }", "dimension() {\n if (!this.item.width) {\n return '';\n }\n return `${this.item.width}px * ${this.item.height}px`;\n }", "_calcColumnWidths() {\n if (!this._container) {\n return;\n }\n\n const columnWidths = Array.prototype.slice.call(this._container.querySelectorAll('.md-panel-header'))\n .reduce((maxes, row) => {\n const columns = row.querySelectorAll('.md-panel-column');\n for (let i = 0; i < columns.length; i++) {\n // Only need to include the offsetWidth of the column because the child will really\n // determine the width of the column. Since it has already been defined at this point,\n // no additional work needs to be done.\n maxes[i] = Math.max(\n columns[i].offsetWidth,\n maxes[i] || 0\n );\n }\n\n return maxes;\n }, [0]);\n\n this.setState({ columnWidths });\n }", "function estimateWidth(item) {\n fontHeight = height(item);\n return estimate(textValue(item));\n}", "function estimateWidth(item) {\n fontHeight = height(item);\n return estimate(textValue(item));\n}", "function _getCompFlexItemWidth(elem, availableCols) {\n var compFlexItemWidth;\n\n if (element.labelEdge === 'start') {\n compFlexItemWidth = 'calc(' + _getFullFlexItemWidth(elem, availableCols) + ' - ' + _getLabelFlexItemWidth() + ')';\n } else {\n compFlexItemWidth = _getFullFlexItemWidth(elem, availableCols);\n }\n\n return compFlexItemWidth;\n }", "function posCalc(){\n var width = document.innerWidth;\n var colLength = width/3;\n }", "function widthCalc(item, no_items) {\n var calculated_width = 0;\n //get width of dom eletment\n var item_wdith = item.outerWidth(true);\n\n calculated_width = (item_wdith * no_items);\n\n return calculated_width;\n }", "computeWidth () {\n this.div.style.width = 'auto'\n this.column.style.width = 'auto'\n\n var width = stringMeter.width(this.name, 12, 'Roboto-Medium')\n + 44 // padding with fix button\n + 28 // padding without fix button\n + 66 // sortDiv\n + 1 // error\n\n for (var p = 0, lp = this.pcm.products.length; p < lp; p++) {\n var divWidth = stringMeter.width(this.pcm.products[p].cellsByFeatureId[this.id].div.innerText, 13, 'Roboto-Regular') + 56 + 1 // 56 = padding, 1 for error\n if (divWidth > width) width = divWidth\n }\n\n this.div.style.width = width + 'px'\n this.column.style.width = width + 'px'\n }", "function columnsTotalWidth(columns /* , prop?: any */) {\n var totalWidth = 0;\n for (var _i = 0, columns_2 = columns; _i < columns_2.length; _i++) {\n var column = columns_2[_i];\n // const has = prop && column[prop];\n // totalWidth = totalWidth + (has ? column[prop] : column.width);\n totalWidth = totalWidth + column.width;\n }\n return totalWidth;\n}", "get width() {\n\t\treturn this._viewport[2];\n\t}", "function calcNestColWidth(){\n var windowWidth = $window.width();\n if (windowWidth > 1024) {\n return windowWidth / 14;\n } else if (windowWidth < 768) {\n return windowWidth / 4;\n } else {\n return windowWidth / 9;\n }\n }", "function getRowWidth(row){\n var rv = 0;\n for( var i = 0; i < row.length; i++){\n var cur = row[i]\n var elmWidth = parseInt((cur.text.length)/2)+parseInt((cur.text.length)%2)\n if(cur.size == \"1\"){\n rv += (elmWidth * 100);\n }else{\n rv += (elmWidth * 50);\n }\n }\n rv = rv - (rv % 100);\n return rv;\n}", "function columnTotalWidth(columns, prop) {\r\n var totalWidth = 0;\r\n if (columns) {\r\n for (var _i = 0, columns_1 = columns; _i < columns_1.length; _i++) {\r\n var c = columns_1[_i];\r\n var has = prop && c[prop];\r\n var width = has ? c[prop] : c.width;\r\n totalWidth = totalWidth + parseFloat(width);\r\n }\r\n }\r\n return totalWidth;\r\n}", "width(props, propName, componentName) {\n return muiDimensionProp(props, propName, componentName);\n }", "function columnTotalWidth(columns, prop) {\n var totalWidth = 0;\n if (columns) {\n for (var _i = 0, columns_1 = columns; _i < columns_1.length; _i++) {\n var c = columns_1[_i];\n var has = prop && c[prop];\n var width = has ? c[prop] : c.width;\n totalWidth = totalWidth + parseFloat(width);\n }\n }\n return totalWidth;\n}", "function getWidth(uses) {\n\treturn 1 + Math.min(Math.round(uses/150), 6);\n}", "get width()\n\t{\n\t\tlet width = Math.max(this._width, this.minWidth);\n\n\t\tif (this.tree.theme.hasGridBehavior)\n\t\t{\n\t\t\tlet step = this.tree.theme.gridSize;\n\t\t\twidth = Math.ceil(width / step) * step;\n\t\t}\n\n\t\treturn width;\n\t}", "getMaxWidthUnit(){return this.__maxWidthUnit}", "function columnTotalWidth(columns) {\n var totalWidth = 0;\n if (columns) {\n for (var _i = 0, columns_1 = columns; _i < columns_1.length; _i++) {\n var c = columns_1[_i];\n if (c.hidden || !c.visible) {\n continue;\n }\n // const has = Boolean(prop && c[prop]);\n // const width = c.hidden ? 0 : has ? c[prop] : c.width;\n var width = c.hidden || !c.visible ? 0 : c.width || c.$$oldWidth;\n if (typeof width === 'string') {\n width = parseFloat(width);\n }\n totalWidth = totalWidth + width;\n }\n }\n return totalWidth;\n}", "function getWidth() {\n return Math.round(obj.width * scale);\n }", "getWidth() {\n return this._rows\n .map((row) => row.getWidth())\n .reduce((x, y) => Math.max(x, y), 0);\n }", "function getGridWidth(){\n return canvas.width/xGridAmount;\n}", "getActualWidth(row) {\n let width = 0;\n if (row.childWidgets.length > 0) {\n for (let i = 0; i < row.childWidgets.length; i++) {\n width += row.childWidgets[i].cellFormat.cellWidth;\n }\n }\n return width;\n }", "function columnsTotalWidth(columns, prop) {\r\n var totalWidth = 0;\r\n for (var _i = 0, columns_2 = columns; _i < columns_2.length; _i++) {\r\n var column = columns_2[_i];\r\n var has = prop && column[prop];\r\n totalWidth = totalWidth + (has ? column[prop] : column.width);\r\n }\r\n return totalWidth;\r\n}", "width() {\n\t\t\treturn this.data.width;\n\t\t}", "function columnsTotalWidth(columns, prop) {\n var totalWidth = 0;\n for (var _i = 0, columns_2 = columns; _i < columns_2.length; _i++) {\n var column = columns_2[_i];\n var has = prop && column[prop];\n totalWidth = totalWidth + (has ? column[prop] : column.width);\n }\n return totalWidth;\n}", "calculateMinWidth() {\n const me = this,\n width = me.measureSize(me.width),\n minWidth = me.measureSize(me.minWidth);\n let minChildWidth = 0;\n\n if (me.children) {\n minChildWidth = me.children.reduce((result, column) => {\n return result + column.calculateMinWidth();\n }, 0);\n }\n\n return Math.max(width, minWidth, minChildWidth);\n }", "get_grid_width() {\n\t\t\treturn this._internal_grid_size[0]\n\t\t}", "calculateMinWidth() {\n const me = this,\n width = me.measureSize(me.width),\n minWidth = me.measureSize(me.minWidth);\n\n let minChildWidth = 0;\n\n if (me.children) {\n minChildWidth = me.children.reduce((result, column) => {\n return result + column.calculateMinWidth();\n }, 0);\n }\n\n return Math.max(width, minWidth, minChildWidth);\n }", "get _scrollWidth() {\n const that = this,\n items = that._items;\n\n if (that.__scrollWidth) {\n return that.__scrollWidth;\n }\n\n that.__scrollWidth = (() => {\n const that = this;\n let longestItemWidth;\n\n let longestLabel = '';\n for (let i = 0; i < items.length; i++) {\n if (items[i].hidden) {\n continue;\n }\n\n const label = items[i].label;\n if (label.length > longestLabel.length) {\n longestLabel = label;\n }\n }\n\n const measureItem = that._createItem({ label: longestLabel });\n\n that.$.itemsContainer.appendChild(measureItem);\n measureItem.label = longestLabel;\n\n //This setting is enough to make the item width to 'auto' and measure it's size\n measureItem.style.width = 'auto';\n\n //if not checked, fails in Karma because element is not Completed\n if (measureItem.isCompleted) {\n measureItem.$.itemContainer.style.width = 'auto';\n }\n\n const measureItemStyle = getComputedStyle(measureItem);\n const padding = parseInt(measureItemStyle.paddingLeft) + parseInt(measureItemStyle.paddingRight);\n\n longestItemWidth = (measureItem.$.itemContainer || measureItem).offsetWidth + padding;\n\n measureItem.parentNode.removeChild(measureItem);\n\n\n return longestItemWidth;\n\n })();\n\n return that.__scrollWidth;\n }", "getWidth(index) {\n return this._data[index * CELL_SIZE + 0 /* CONTENT */] >> 22 /* WIDTH_SHIFT */;\n }", "function columnwidth(){\n\t//this should affect whole page, so first we need to find every .row element\n\tlet allMyRows = document.querySelectorAll('.row');\n\t\n\t//we want a base minimum width for every column, I don't want them smaller than 150px\n\tlet baseWidth = 150;\n\t\n\t//loop through all of the rows \n\tallMyRows.forEach(function(e){\n\t\t//we need to know how wide the width is for the parent row\n\t\tlet myWidth = e.offsetWidth;\n\t\t\n\t\t//find direct children columns and how many there are\n\t\tlet allMyChildren = e.querySelectorAll(':scope >.column');//only selects the direct children of element\n\n\t\tlet myLength = allMyChildren.length;\n\t\t\n\t\t//find all the factors for my Length, take a number then try to divide it equally by every number smaller then itself, each success is a factor and can be put into an array.\n\t\tlet myFactors = [];\n\t\tfor (let num = myLength ; num > 0; num--){\t\n\t\t\tif (myLength % num === 0){\n\t\t\t\tmyFactors.push(num);//this array will have all positive factors, and will result in 2 length for primes.\n\t\t\t}\n\t\t}\n\t\t\n\t\tfunction setMinWidt(myarray,myvalue){\n\t\t\tfor (let i=0; i<myarray.length; i++){\n\t\t\t\tmyarray[i].style.minWidth = myvalue;\n\t\t\t}\n\t\t}\n\t\t//determine width of columns based on factors, baseWidth, and myWidth\n\t\t//first check if all columns will fit in space, if so do nothing\n\t\tif(baseWidth*myLength < myWidth){\n\t\t\tlet v = 150 + 'px'; //reset min width if enlarging\n\t\t\tsetMinWidt(allMyChildren,v); \n\t\t\t\n\t\t\t//do some different math for prime number of columns, lets set it up so that it tries to evenly spread the groups of columns, like a row of 6 then 5, or 2 rows of 4 then a row of 3, ect.\n\t\t} else if (myWidth <= 320){\n\t\t\tsetMinWidt(allMyChildren,'100%');\n\t\t} else if (myFactors.length === 2 ){\n\t\t\t\t for (let i=2; i < myLength; i++){\n\t\t\t\t\t let val = Math.ceil(Math.round(myLength/i));\n\t\t\t\t\t if (val*baseWidth < myWidth && val !== 1){ //if equal to one, let it default to normal widths/distributions\n\t\t\t\t\t\t let v = 100/val + '%';\n\t\t\t\t\t\t setMinWidt(allMyChildren,v);\n\t\t\t\t\t\t break;\n\t\t\t\t\t }\n\t\t\t\t }\n\t\t\t\t \n\t\t} else { // here we determine how much space we have and divide columns accordingly\n\t\t\tfor (let value of myFactors){\n\t\t\t\tif (value*baseWidth < myWidth && myWidth > 320){ //if smaller than 320 only allow single columns\n\t\t\t\t\tlet v = 100/value + '%';\t\n\t\t\t\t\tsetMinWidt(allMyChildren,v);\n\t\t\t\t\tbreak; \n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t} \n\t\t\n\t});\n}//end of column width function", "setWidthUnit(valueNew){let t=e.ValueConverter.toDimensionUnit(valueNew);null===t&&(t=this.getAttributeDefaultValueInternal(\"WidthUnit\")),t!==this.__widthUnit&&(this.__widthUnit=t,e.EventProvider.raise(this.__id+\".onPropertyChanged\",{propertyName:\"WidthUnit\"}),this.__processWidthUnit())}", "function getRowWidth(r) {\n return ( r * 64); // reconfigure ? dynamically get width instead\n}", "function getFieldColumns (field) {\n const widthSpec = (field.type.width || '1/1').split('/')\n return Math.min(12, Math.max(2, parseInt(\n 12 * +widthSpec[0] / +widthSpec[1])))\n}", "function getItemsWidth(callback){\n var sum = 0;\n container.find('.menu-item').each( function(callback){\n var elementWidth = $(this).outerWidth(true);\n sum += elementWidth;\n });\n\n typeof callback === 'function' && callback();\n return sum;\n }", "function getScaledWidths(recipe, tlWidth, arrowMargin){\n let widths = []\n let parsedTimes = []\n let totalTime = 0.0;\n let usableSpace = tlWidth-(arrowEndMargin*2); \n let i;\n //Determines total time from extracted times\n for (i = 0; i < recipe.instructions.length; i++){\n parsedTimeInMinutes = parseTime(recipe.instructions[i].time);\n totalTime += parsedTimeInMinutes;\n parsedTimes[i] = parsedTimeInMinutes; \n }\n for (i = 0; i < recipe.instructions.length; i++){\n widths.push((parsedTimes[i]/totalTime)*usableSpace); \n }\n return widths;\n}", "function getColumnsCount() {\r\n}", "getWidth (data, maxTally) {\n const deviceWidth = Dimensions.get('window').width;\n const maxWidth = deviceWidth / 4;\n const multFactor = maxWidth / maxTally;\n\n let width = {};\n\n if (data === 0) {\n width = 0.1;\n } else {\n width = data * multFactor;\n }\n\n return width;\n }", "get width() {\n // w = width\n return this._w;\n }", "function getWidth(type){\r\n\t\t\t\tvar width = 0;\r\n\t\t\t\tif (type == 'header'){\r\n\t\t\t\t\twidth = getCellWidth(headerCell);\r\n\t\t\t\t} else {\r\n\t\t\t\t\topts.finder.getTr(target,0,type).find('td[field=\"' + field + '\"] div.datagrid-cell').each(function(){\r\n\t\t\t\t\t\tvar w = getCellWidth($(this));\r\n\t\t\t\t\t\tif (width < w){\r\n\t\t\t\t\t\t\twidth = w;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\treturn width;\r\n\t\t\t\t\r\n\t\t\t\tfunction getCellWidth(cell){\r\n\t\t\t\t\treturn cell.is(':visible') ? cell._outerWidth() : tmp.html(cell.html())._outerWidth();\r\n\t\t\t\t}\r\n\t\t\t}", "function getWidth(opts, type) {\n var width = 0;\n opts.finder.getTr(target, 0, type, undefined, state).find('td[field=\"' + field + '\"] div.datagrid-cell').each(function () {\n var w = $(this)._outerWidth();\n if (width < w) {\n width = w;\n }\n });\n return width;\n }", "function setWidth(){\n var width = 500/(columnCounter + 1);\n\n for(var i=0; i<=columnCounter; i++){\n for(var j=0; j<columns[i].length; j++) {\n columns[i][j].style.width = (width - 3) + 'px';\n columns[i][j].style.marginLeft = width * i + 'px';\n }\n }\n }", "function _c_width() { \n\t\t\t\t\treturn _width + _padding.l + _padding.r; \n\t\t\t\t}", "function column_sizer(){\n\tvar $ww = $(window).width();\n\tif($ww>=1280){\n\t\t$(\".ui-dashbox\").removeClass(\"columnWidth\").removeClass(\"fullWidth\").removeClass(\"halfWidth\").removeClass(\"threeColWidth\").addClass(\"fourColWidth\"); // 4 columns\n\t}else if($ww<1280 && $ww>=960){\n\t\t$(\".ui-dashbox\").removeClass(\"columnWidth\").removeClass(\"fullWidth\").removeClass(\"halfWidth\").removeClass(\"fourColWidth\").addClass(\"threeColWidth\"); // 3 columns!\n\t}else if($ww<960 && $ww>=640){\n\t\t$(\".ui-dashbox\").removeClass(\"columnWidth\").removeClass(\"fullWidth\").removeClass(\"threeColWidth\").removeClass(\"fourColWidth\").addClass(\"halfWidth\"); // 2 columns!\n\t}else if($ww<640){\n\t\t$(\".ui-dashbox\").removeClass(\"columnWidth\").removeClass(\"halfWidth\").removeClass(\"threeColWidth\").removeClass(\"fourColWidth\").addClass(\"fullWidth\"); // 1 column!\n\t}else{\n\t\t$(\".ui-dashbox\").removeClass(\"fullWidth\").removeClass(\"halfWidth\").removeClass(\"threeColWidth\").removeClass(\"fourColWidth\").addClass(\"columnWidth\"); // default\n\t}\n\t\n}", "createLineupAdjustWidth (elem, name, spec, fixed) {\n let rankWidth = 0;\n let total = 0;\n let count = 0;\n let c1, c2;\n /* The final width value of 30 is to leave room for a scroll bar. */\n let width = $(elem)[0].getBoundingClientRect().width - fixed * 2 - 30;\n let col = spec.dataspec.layout.primary;\n for (c1 = 0; c1 < col.length; c1 += 1) {\n if (col[c1].children) {\n for (c2 = 0; c2 < col[c1].children.length; c2 += 1) {\n count += 1;\n total += this.lineupGetColumnWidth(name, col[c1].children[c2], fixed);\n }\n } else {\n if (col[c1].type === 'rank') { /* LineUp wants this to be 50 */\n rankWidth = this.lineupRankWidth + fixed;\n continue;\n }\n count += 1;\n total += this.lineupGetColumnWidth(name, col[c1], fixed);\n }\n }\n let avail = width - count * fixed - rankWidth;\n avail -= count + (rankWidth ? 1 : 0); // I'm not sure why this is necessary\n let scale = avail / total;\n for (c1 = 0; c1 < col.length; c1 += 1) {\n if (col[c1].children) {\n for (c2 = 0; c2 < col[c1].children.length; c2 += 1) {\n col[c1].children[c2].width = fixed + col[c1].children[c2].widthBasis * scale;\n }\n } else {\n col[c1].width = fixed + col[c1].widthBasis * scale;\n if (col[c1].type === 'rank') { /* LineUp wants this to be fixed */\n col[c1].width = this.lineupRankWidth + fixed;\n }\n }\n }\n return scale;\n }", "get maxWidth() {}", "function getWidth(element) {\n return element[0].offsetWidth;\n }", "function widthOfEltInDiap () {//the width of any Element in diapo\n\t\treturn Math.floor(fd_ulDiapo[0].offsetWidth / 12);\n\t}", "getWidth() {\n return this.getSize().width;\n }", "function getItemsWidth(callback){\n \t\tvar sum = 0;\n \t\tcontainer.find('.menu-item').each( function(callback){\n \t\t\tvar elementWidth = $(this).outerWidth(true);\n \t\t\tsum += elementWidth;\n \t\t});\n\n \t\ttypeof callback === 'function' && callback();\n \t\treturn sum;\n \t}", "innerWidthDependsOnChilds(){if(this.__controlStretchedWidth)return!0;if(this.__columnOptions)for(const columnOption of this.__columnOptions)if(\"Content\"===columnOption.widthMode)return!0;return super.innerWidthDependsOnChilds()}", "function colWidths(rows) {\n////the underscore arg is not used\n//colWidths builds up an array with one element for every column index\n//only takes first row because every row will have the same number of columns (which is 3)\n return rows[0].map(function(_, i) {\n ////reduce rows \n return rows.reduce(function(max, row) {\n \t//by returning the higher number of min width of a row\n \treturn Math.max(max, row[i].minWidth());\n }, 0);\n });\n}", "getWidth() {\n return this._$mountPoint.width();\n }", "getUsedWidth() {\n return this.usedWidth;\n }", "get width() {\n const noOverlap = this._width\n const overlap = Math.min(100, this._width * 1.7)\n\n // Containers can always grow.\n if (this.rows) {\n return overlap\n }\n\n // Rows can grow if they have leaves.\n if (this.leaves) {\n return this.leaves.length > 0 ? overlap : noOverlap\n }\n\n // Leaves can grow unless they're the last item in a row.\n const { leaves } = this.row\n const index = leaves.indexOf(this)\n return index === leaves.length - 1 ? noOverlap : overlap\n }", "getClosetWidth() { return this.faces.get(FaceOrientation.BASE).width(); }", "applyWidth() {\n var columns = this.template.querySelectorAll('.dynamicColumn');\n for (var i = 0; i < columns.length; i++) {\n columns[i].style.width = this.percentage + \"%\";\n //columns[i].style.display = \"inline\";\n columns[i].style.textAlign = \"center\";\n //columns[i].style.border = \"1px solid #4CAF50\";\n }\n }", "get oldWidth() {\n if (this.i.b == null) {\n return null;\n }\n if (!this.i.b.externalObject) {\n let e = new IgrColumnWidth();\n e._implementation = this.i.b;\n this.i.b.externalObject = e;\n }\n return this.i.b.externalObject;\n }", "getWidth() {\n return this.$node.innerWidth();\n }", "function units(num) {\n\treturn num*CELL_SIZE + UNIT_NAME;\n}", "function calcMenuColumnsWidth() {\n\t\"use strict\";\n\tjQuery('#mainmenu li.custom_view_item ul.menu-panel ul.columns').each(function() {\n\t\t\"use strict\";\n\t\tif (jQuery('body').hasClass('responsive_menu')) return;\n\t\tjQuery(this).parents('.menu-panel').css({display:'block', visibility: 'hidden'});\n\t\t//var h = jQuery(this).height();//-parseInt(jQuery(this).css('paddingTop'))-parseInt(jQuery(this).css('paddingBottom'));\n\t\tvar h = 0, w = 0;\n\t\tjQuery(this).find('>li').css('height', 'auto').each(function () {\n\t\t\tvar li = jQuery(this);\n\t\t\tvar mt = parseInt(li.css('marginTop')), mb = parseInt(li.css('marginBottom')), mh = li.height() + (isNaN(mt) ? 0 : mt) + (isNaN(mb) ? 0 : mb);\n\t\t\tif (h < mh) h = mh;\n\t\t\tvar bl = parseInt(li.css('borderLeft')), pl = parseInt(li.css('paddingLeft')), br = parseInt(li.css('borderRight')), pr = parseInt(li.css('paddingRight'));\n\t\t\tw += li.width() + (isNaN(bl) ? 0: bl) + (isNaN(pl) ? 0 : pl) + (isNaN(pr) ? 0 : pr) + (isNaN(br) ? 0 : br);\n\t\t});\n\t\tjQuery(this).parents('.menu-panel').css({display:'none', visibility: 'visible'});\n\t\tif (w > jQuery('#mainmenu').width()) jQuery(this).width(w+8);\n\t\tjQuery(this).find('>li').height(h);\n\t});\n}", "getWidth() {\n return this._executeAfterInitialWait(() => this.currently.getWidth());\n }", "function calcWidth(width) {\n\n\t\t\t\tvar colWidth;\n\n\t\t\t\tif (typeof width == \"string\") {\n\n\t\t\t\t\tif (width.indexOf(\"%\") > -1) {\n\n\t\t\t\t\t\tcolWidth = totalWidth / 100 * parseInt(width);\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tcolWidth = parseInt(width);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\n\t\t\t\t\tcolWidth = width;\n\t\t\t\t}\n\n\t\t\t\treturn colWidth;\n\t\t\t}", "function getGridCellSize() {\n return (min(width, height) / 2 - 50) / gridSize;\n}", "getWidth() { return this.width; }", "function calculateCategoryWidth() {\n\tvar selectCategoryWidth = document.querySelector('.Category');\n\tcategoryWidth = selectCategoryWidth.clientWidth;\n}", "getRenderedWidth(){return e.System.Services.controlManager.checkControlGeometryByControl(this),this.__renderedSizeCache.width}", "function getWidth() {\n\tlet item = $('.team-slider .owl-item'),\n\t\t\tteam = $('.single-team .image');\n\t\n\tteam.css('width', item.outerWidth());\n\tteam.css('height', item.outerWidth());\n}", "function computeCustomizedWidth(){\n\tvar note_div = document.querySelector('#note_div');\n\tvar largeWidth = note_div.offsetWidth;\n\tvar margin = NOTE_MARGIN;\n\t//border = 2px\n\tvar border = window.getComputedStyle(note_div).borderWidth[0];\n\treturn (largeWidth - (2*border))/numOfKey -(2*margin) -1;\n}", "getWidth() {\n return this.content >> 22 /* WIDTH_SHIFT */;\n }", "function scaleX(col) {\n if (currentView === views.first) return offset * (col + 1) + largeUnitWidth * col;\n else if (currentView === views.second) return offset * (col + 1) + medUnitWidth * col;\n else return offset * (col + 1) + smallUnitWidth * col;\n }", "cols() {\n return this.grid[0].length;\n }", "get width() {\n const customWidth = this.getAttribute(\"customWidth\");\n return customWidth && Number(this.getAttribute(\"width\"));\n }", "function getGameDimensions(elem) {\n\t var tmpWidth = elem.width();\n var controlHeight = $(\"#mr-scores\").height() + $(\"#mr-scores\").height() + $(\"#mr-navigation\").height();\n\n for (var i = tmpWidth; i > tmpWidth - settings.columns; i--)\n\t\t{\n\t\t\tif(i%settings.columns == 0)\n\t\t\t{\n\t\t\t\ttmpWidth = i;\n\t\t\t}\n\t\t}\n\t\n\t\tsettings.width = tmpWidth;\n\t\tsettings.height = (tmpWidth / settings.columns) * settings.rows;\n\n\t\tvar maxHeight = window.innerHeight - controlHeight*2;\n\n\t\tif (settings.height > maxHeight)\n\t\t{\n\t\t settings.height = maxHeight;\n\t\t settings.width = (maxHeight / settings.rows) * settings.columns;\n\t\t}\n\t}", "function getDimensionWeight() {\n\tvar dimensionWeight;\n\tdimensionWeight = (getWidth() * getHeight() * THICKNESS_CM) / DIMENSION_WEIGHT_CONVERT;\n\treturn dimensionWeight.toFixed(2);\n}", "function _getMeasuredWidth(measuredData, getElementToMeasureWidth) {\n var cachedWidth = _measurementCache.getCachedMeasurement(measuredData);\n if (cachedWidth !== undefined) {\n return cachedWidth;\n }\n var measuredWidth = getElementToMeasureWidth();\n _measurementCache.addMeasurementToCache(measuredData, measuredWidth);\n return measuredWidth;\n }", "function getDimensions(cm) {\n var d = cm.display,\n left = {},\n width = {};\n var gutterLeft = d.gutters.clientLeft;\n\n for (var n = d.gutters.firstChild, i = 0; n; n = n.nextSibling, ++i) {\n var id = cm.display.gutterSpecs[i].className;\n left[id] = n.offsetLeft + n.clientLeft + gutterLeft;\n width[id] = n.clientWidth;\n }\n\n return {\n fixedPos: compensateForHScroll(d),\n gutterTotalWidth: d.gutters.offsetWidth,\n gutterLeft: left,\n gutterWidth: width,\n wrapperWidth: d.wrapper.clientWidth\n };\n } // Computes display.scroller.scrollLeft + display.gutters.offsetWidth,", "getWidth(){return this.__width}", "get width() {\n\t\treturn this._canvas.width;\n\t}", "getContainerWidth() {\n return getWidth(this.container);\n }", "function matchCellWidths(els){var maxInnerWidth=0;els.find('> *').each(function(i,innerEl){var innerWidth=$(innerEl).outerWidth();if(innerWidth>maxInnerWidth){maxInnerWidth=innerWidth;}});maxInnerWidth++;// sometimes not accurate of width the text needs to stay on one line. insurance\nels.width(maxInnerWidth);return maxInnerWidth;}", "function getDimensions(cm) {\n var d = cm.display, left = {}, width = {};\n var gutterLeft = d.gutters.clientLeft;\n for (var n = d.gutters.firstChild, i = 0; n; n = n.nextSibling, ++i) {\n left[cm.options.gutters[i]] = n.offsetLeft + n.clientLeft + gutterLeft;\n width[cm.options.gutters[i]] = n.clientWidth;\n }\n return {fixedPos: compensateForHScroll(d),\n gutterTotalWidth: d.gutters.offsetWidth,\n gutterLeft: left,\n gutterWidth: width,\n wrapperWidth: d.wrapper.clientWidth};\n }" ]
[ "0.710544", "0.710544", "0.710544", "0.7054905", "0.6993674", "0.6966061", "0.6966061", "0.6963236", "0.68726414", "0.6849493", "0.68465996", "0.68254834", "0.67767936", "0.67084086", "0.66919035", "0.668741", "0.6685058", "0.6622089", "0.6568174", "0.65379703", "0.65379703", "0.65296006", "0.6511148", "0.65101814", "0.64851993", "0.647104", "0.6439236", "0.64389235", "0.642618", "0.6378724", "0.63773644", "0.63722813", "0.63691556", "0.6367389", "0.63397753", "0.63381267", "0.63344806", "0.6306209", "0.62971574", "0.6290428", "0.6269733", "0.62483114", "0.62432104", "0.62166464", "0.6215937", "0.6190225", "0.6186938", "0.61754733", "0.6148813", "0.61318487", "0.613133", "0.61286306", "0.61191255", "0.6110032", "0.6101851", "0.60951525", "0.6085857", "0.6070173", "0.6062481", "0.60616755", "0.6060306", "0.6052651", "0.6023135", "0.6021769", "0.60171294", "0.6015954", "0.60146713", "0.60136443", "0.59985155", "0.5976745", "0.5970647", "0.59633887", "0.5952496", "0.5952012", "0.59501505", "0.5944396", "0.5931537", "0.59155595", "0.5913777", "0.59103906", "0.5908424", "0.5906454", "0.5894423", "0.58926815", "0.58909976", "0.5888866", "0.58801365", "0.587297", "0.5871453", "0.5869572", "0.58673763", "0.58423537", "0.58420163", "0.5834015", "0.5826625", "0.5826197", "0.5818259", "0.5816401", "0.5815892", "0.58078843" ]
0.69718623
5
set all the widths to the elements
function setWidths() { var unitWidth = getUnitWidth() - 20; // adjust for padding. for padding:0, make this 1 $isocontainer.children(":not(.width2)").css({ width: unitWidth }); $isocontainer.children(".width2").css({ width: (unitWidth * 2) }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setOrigWidth()\n{\n\tfor(var i=0; i < hdr.length; i++)\n\t{\n\t\thdr[i].width = hWidth[i];\n\t}\n\t\n\tfor(var i=0; i < drow1.length; i++)\n\t{\n\t\tdrow1[i].width = dWidth[i];\n\t}\n\t\n}", "function _increaseWidth(){\n layout.changeWidth(1);\n }", "function setWidths() {\n\t\t\t$t.find( 'thead th' ).each( setHeadingWidth ).end().find( 'tr' ).each( setRowHeight );\n\n\t\t\t// Set width of sticky table head:\n\t\t\t$stickyHead.width( $t.width() );\n\n\t\t\t// Set width of sticky table column:\n\t\t\t$stickyCol.find( 'th' ).add( $stickyIntersect.find( 'th' ) ).width( $t.find( 'thead th' ).width() );\n\t\t}", "updateInnerWidthDependingOnChilds(){}", "function setupSliderWidth() {\n // resets sliderElement\n sliderElement.style.width = '0px';\n\n var totalWidth = 0;\n elements.forEach(function (element, index) {\n slideWidth = element.offsetWidth;\n totalWidth = totalWidth += slideWidth;\n });\n sliderElement.style.width = totalWidth + 'px';\n }", "function setWidth(){\n var width = 500/(columnCounter + 1);\n\n for(var i=0; i<=columnCounter; i++){\n for(var j=0; j<columns[i].length; j++) {\n columns[i][j].style.width = (width - 3) + 'px';\n columns[i][j].style.marginLeft = width * i + 'px';\n }\n }\n }", "set width (width) { this._width = width }", "function adjustContainerWidth() {\r\n\tvar width = (elmWidth + 2) * elements.length;\r\n\t$('#thecontainer').attr('style', 'width: ' + width + 'px;' );\r\n}", "function setBoxWidths() {\n var leftWidth = dragBarPos - 2,\n rightWidth = outerWidth - dragBarPos - 12;\n\n left.css('width', '' + toPercent(leftWidth) + '%');\n right.css('width', '' + toPercent(rightWidth) + '%');\n }", "function setOuterWidth() {\n outerWidth = wrap.offsetWidth;\n dragBarPos = calcDragBarPosFromCss() || Math.floor(outerWidth / 2) - 5;\n }", "function setWidth(width)\n {\n _width = width;\n }", "changeWidth() {\n $(\"#hunger\").css(\"width\", `${this.hunger}%`)\n $(\"#energy\").css(\"width\", `${this.energy}%`)\n $(\"#hygiene\").css(\"width\", `${this.hygiene}%`)\n $(\"#fun\").css(\"width\", `${this.fun}%`)\n }", "set width(width) {\n // this._width = width;\n }", "set width(width) {\n // this._width = width;\n }", "setWidth(width) {\n this.width = width;\n }", "function setWidth() {\n\t\t\t\tvar width;\n\t\t\t\tvar style = window.getComputedStyle ? window.getComputedStyle(ta, null) : false;\n\t\t\t\t\n\t\t\t\tif (style) {\n\n\t\t\t\t\twidth = ta.getBoundingClientRect().width;\n\n\t\t\t\t\tif (width === 0) {\n\t\t\t\t\t\twidth = parseInt(style.width,10);\n\t\t\t\t\t}\n\n\t\t\t\t\t$.each(['paddingLeft', 'paddingRight', 'borderLeftWidth', 'borderRightWidth'], function(i,val){\n\t\t\t\t\t\twidth -= parseInt(style[val],10);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\twidth = Math.max($ta.width(), 0);\n\t\t\t\t}\n\n\t\t\t\tmirror.style.width = width + 'px';\n\t\t\t}", "function setWidth() {\r\n /*determind the siblings of the box in focus*/\r\n var boxSiblings = $(this).siblings();\r\n /*count the number of siblings a box has*/\r\n var numberOfSiblings = boxSiblings.length;\r\n /*determine the size the box should scale to*/\r\n var lg = newFeatureBoxWidth;\r\n var lgString = lg + \"%\";\r\n /*determine the remaining space int eh row after the box has scaled*/\r\n var rem = (100 - lg) / numberOfSiblings;\r\n var remString = rem + \"%\";\r\n /*determine which box should be scaled*/\r\n var boxFocus = $(this);\r\n\r\n /*disable box scaling on mobile/devices smaller than 769px*/\r\n if ($(window).width() >= 769) {\r\n TweenLite.to(boxFocus, 0.5, {width: lgString});\r\n TweenLite.to(boxSiblings, 0.5, {width: remString});\r\n }\r\n }", "function setWidth() {\n\t\t\t\tvar width;\n\t\t\t\tvar style = window.getComputedStyle ? window.getComputedStyle(ta, null) : false;\n\t\t\t\t\n\t\t\t\tif (style) {\n\n\t\t\t\t\twidth = ta.getBoundingClientRect().width;\n\n\t\t\t\t\tif (width === 0 || typeof width !== 'number') {\n\t\t\t\t\t\twidth = parseInt(style.width,10);\n\t\t\t\t\t}\n\n\t\t\t\t\t$.each(['paddingLeft', 'paddingRight', 'borderLeftWidth', 'borderRightWidth'], function(i,val){\n\t\t\t\t\t\twidth -= parseInt(style[val],10);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\twidth = $ta.width();\n\t\t\t\t}\n\n\t\t\t\tmirror.style.width = Math.max(width,0) + 'px';\n\t\t\t}", "function setWidth() {\n\t\t\t\tvar width;\n\t\t\t\tvar style = window.getComputedStyle ? window.getComputedStyle(ta, null) : false;\n\t\t\t\t\n\t\t\t\tif (style) {\n\n\t\t\t\t\twidth = ta.getBoundingClientRect().width;\n\n\t\t\t\t\tif (width === 0 || typeof width !== 'number') {\n\t\t\t\t\t\twidth = parseInt(style.width,10);\n\t\t\t\t\t}\n\n\t\t\t\t\t$.each(['paddingLeft', 'paddingRight', 'borderLeftWidth', 'borderRightWidth'], function(i,val){\n\t\t\t\t\t\twidth -= parseInt(style[val],10);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\twidth = $ta.width();\n\t\t\t\t}\n\n\t\t\t\tmirror.style.width = Math.max(width,0) + 'px';\n\t\t\t}", "function setWidth() {\n\t\t\t\tvar width;\n\t\t\t\tvar style = window.getComputedStyle ? window.getComputedStyle(ta, null) : false;\n\t\t\t\t\n\t\t\t\tif (style) {\n\n\t\t\t\t\twidth = ta.getBoundingClientRect().width;\n\n\t\t\t\t\tif (width === 0 || typeof width !== 'number') {\n\t\t\t\t\t\twidth = parseInt(style.width,10);\n\t\t\t\t\t}\n\n\t\t\t\t\t$.each(['paddingLeft', 'paddingRight', 'borderLeftWidth', 'borderRightWidth'], function(i,val){\n\t\t\t\t\t\twidth -= parseInt(style[val],10);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\twidth = $ta.width();\n\t\t\t\t}\n\n\t\t\t\tmirror.style.width = Math.max(width,0) + 'px';\n\t\t\t}", "function setWidth() {\r\n\t\t\t\tvar width;\r\n\t\t\t\tvar style = window.getComputedStyle ? window.getComputedStyle(ta, null) : false;\r\n\t\t\t\t\r\n\t\t\t\tif (style) {\r\n\r\n\t\t\t\t\twidth = ta.getBoundingClientRect().width;\r\n\r\n\t\t\t\t\tif (width === 0 || typeof width !== 'number') {\r\n\t\t\t\t\t\twidth = parseInt(style.width,10);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$.each(['paddingLeft', 'paddingRight', 'borderLeftWidth', 'borderRightWidth'], function(i,val){\r\n\t\t\t\t\t\twidth -= parseInt(style[val],10);\r\n\t\t\t\t\t});\r\n\t\t\t\t} else {\r\n\t\t\t\t\twidth = $ta.width();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tmirror.style.width = Math.max(width,0) + 'px';\r\n\t\t\t}", "applyWidth() {\n var columns = this.template.querySelectorAll('.dynamicColumn');\n for (var i = 0; i < columns.length; i++) {\n columns[i].style.width = this.percentage + \"%\";\n //columns[i].style.display = \"inline\";\n columns[i].style.textAlign = \"center\";\n //columns[i].style.border = \"1px solid #4CAF50\";\n }\n }", "function setEltWidth(elt,wdth)\n{\n\tif(is.nav4)\n { \n\t elt.document.width = wdth;\n }\n else if(elt.style)\n { \n elt.style.width = wdth;\n }\n}", "set width(width) {\n this._width = width;\n this.updateSize();\n }", "function setWidth() {\n\t\t\t\tvar width;\n\t\t\t\tvar style = window.getComputedStyle ? window.getComputedStyle(ta, null) : null;\n\n\t\t\t\tif (style) {\n\t\t\t\t\twidth = parseFloat(style.width);\n\t\t\t\t\tif (style.boxSizing === 'border-box' || style.webkitBoxSizing === 'border-box' || style.mozBoxSizing === 'border-box') {\n\t\t\t\t\t\t$.each(['paddingLeft', 'paddingRight', 'borderLeftWidth', 'borderRightWidth'], function(i,val){\n\t\t\t\t\t\t\twidth -= parseFloat(style[val]);\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\twidth = $ta.width();\n\t\t\t\t}\n\n\t\t\t\tmirror.style.width = Math.max(width,0) + 'px';\n\t\t\t}", "function changeCanvasElementsWidth() {\n canvasWrapperParentElement.style.width = `calc(100% - ${rightSideBar.width + leftSideBar.width}px)`;\n // could be the reason for uneven results\n zoomOverflowWrapperParentElement.style.width = `calc(100% - ${rightSideBar.width + leftSideBar.width + 1}px)`;\n}", "function setWidth() {\n\t\t\t\t\tvar width;\n\t\t\t\t\tvar style = window.getComputedStyle ? window.getComputedStyle(ta, null) : null;\n\n\t\t\t\t\tif (style) {\n\t\t\t\t\t\twidth = parseFloat(style.width);\n\t\t\t\t\t\tif (style.boxSizing === 'border-box' || style.webkitBoxSizing === 'border-box' || style.mozBoxSizing === 'border-box') {\n\t\t\t\t\t\t\t$.each(['paddingLeft', 'paddingRight', 'borderLeftWidth', 'borderRightWidth'], function (i, val) {\n\t\t\t\t\t\t\t\twidth -= parseFloat(style[val]);\n\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\twidth = $ta.width();\n\t\t\t\t\t}\n\n\t\t\t\t\tmirror.style.width = Math.max(width, 0) + 'px';\n\t\t\t\t}", "function setWidths(evt) {\n let newColWidth = (resize.colStartWidth + evt.clientX - resize.startX),\n newSibWidth = (resize.sibStartWidth - evt.clientX + resize.startX),\n numToPercentString = (num) => {\n return num.toString() + '%';\n },\n percent = (width) => {\n return (width / resize.rowWidth * 100);\n },\n colWidthPercent = percent(newColWidth),\n sibWidthPercent = percent(newSibWidth);\n\n column.dataset.colWidth = numToPercentString(Math.round(colWidthPercent));\n sibling.dataset.colWidth = numToPercentString(Math.round(sibWidthPercent));\n\n column.style.width = numToPercentString(colWidthPercent);\n sibling.style.width = numToPercentString(sibWidthPercent);\n }", "updateWidth() {\n this.get('objectlistviewEventsService').updateWidthTrigger();\n }", "function setMaxXSWidth(width){\n xs = width;\n }", "function specificationWidth(element) {\r\n\r\n element.each(function () {\r\n\r\n var thisObj = jQuery(this),\r\n button = thisObj.find('.button');\r\n\r\n if (button.length) {\r\n\r\n thisObj.attr('style', '');\r\n\r\n thisObj.outerWidth(thisObj.outerWidth() - button.outerWidth());\r\n\r\n }\r\n\r\n });\r\n\r\n}", "function onWidths(obj) {\n // Initialize 0 if not already there\n if (!obj[0])\n obj[0] = _.noop;\n\n var base = function() {\n var $width = window.outerWidth;\n var reduction = function(a, v, k) {return $width >= +k && +k > +a ? +k : +a;};\n obj[_.reduce(obj, reduction, 0)]($width);\n };\n\n $(base);\n $window.resize(base);\n}", "function updateWidth() {\n scope.inputStyle.width = scope.containerSize.width - scope.tagsSize.width - 30;\n if( scope.inputStyle.width < 150 )\n scope.inputStyle.width = scope.containerSize.width - 30;\n }", "normalizeWidths() {\n // Loop through each level for tree\n for (let i = 0; i <= this.treeDepth; i++) {\n // Retrieve all nodes in level\n const nodes = document.querySelectorAll(`.level-${i}`);\n const nodeList = Array.from(nodes);\n\n // Determine the maximum width for all nodes\n const maxWidth = nodeList.reduce((max, curr) => {\n return curr.clientWidth > max ? curr.clientWidth : max;\n }, 0);\n\n // Set each node to max width\n nodeList.forEach(node => {\n node.style.width = maxWidth;\n });\n }\n }", "function setWidth() {\n var labels = $element.find('.default-dropdown-container ul li').find('.list-item-label');\n var minWidth = lodash(labels)\n .map(function (label) {\n return angular.element(label)[0].clientWidth;\n })\n .min();\n\n lodash.forEach(labels, function (label) {\n angular.element(label).css('min-width', minWidth);\n });\n }", "width(width) {\n return this.attr('width', width);\n }", "setWidth(_width) {\n this.right = this.left + _width;\n this.updateSecondaryValues();\n return this;\n }", "function refreshWidths() {\n slideWidth = $slideshow.width();\n\n // ...pulling currSlide from global :/\n var left = slideLeftPos( currSlide );\n $slideReel.css(\"left\", left);\n }", "fixWidths() {\n const me = this,\n { element, header, footer } = me;\n\n if (me.flex) {\n header.flex = me.flex;\n if (footer) {\n footer.flex = me.flex;\n }\n element.style.flex = me.flex;\n } else {\n // If width is calculated and no column is using flex, check if total width is less than width. If so,\n // recalculate width and bail out of further processing (since setting width will trigger again)\n if (\n me.hasCalculatedWidth &&\n !me.columns.some((col) => !col.hidden && col.flex) &&\n me.totalFixedWidth !== me.width\n ) {\n me.width = me.totalFixedWidth;\n // Setting width above clears the hasCalculatedWidth flag, but we want to keep it set to react correctly\n // next time\n me.hasCalculatedWidth = true;\n return;\n }\n\n let totalWidth = me.width;\n\n if (!totalWidth) {\n totalWidth = 0;\n\n // summarize column widths, needed as container width when not using flex widths and for correct\n // overflow check in Edge\n for (let col of me.columns) {\n if (!col.flex && !col.hidden) totalWidth += col.width;\n }\n }\n\n // rows are absolutely positioned, meaning that their width won't affect container width\n // hence we must set it, if not using flex\n element.style.width = `${totalWidth}px`;\n\n header.width = totalWidth;\n if (footer) {\n footer.width = totalWidth;\n }\n }\n\n me.syncScrollingPartners(false);\n }", "function styleWidth(elem, x){\n elem.style.width=x;\n}", "set width(width) {\n this.instance.setWidth(width);\n }", "function finalAdjustments(){\n for(var i=0; i<idCounter; i++){\n if(eventsOverlap['event'+i] === undefined){\n document.getElementById('event'+i).style.width = '497px';\n } else if(eventsOverlap['event'+i].length < columnCounter){\n var newWidth = 500/(eventsOverlap['event'+i].length + 1);\n var thisEvent = document.getElementById('event'+i);\n // thisEvent.style.width = (newWidth - 3) + 'px';\n adjust(thisEvent, eventsOverlap['event'+i], newWidth);\n }\n }\n }", "update(rootElement) {\n const elements = rootElement.querySelector(`[data-column-id=\"${this.columnIndex}\"]`);\n\n for(let element of elements) {\n element.style.setProperty(\"width\", this.width);\n }\n }", "function setWidth() {\n\tvar infoWindowData = viewModel.infoWindowData;\n\tvar $fsInfo = $('.foursquare-info');\n\tvar currentWidth = ($fsInfo.width() + img.photoSize() + 5) + 'px';\n\tinfoWindowData.width(currentWidth);\n}", "set width(_val) {\n if (typeof _val === \"number\") {\n this.setAttribute(\"width\", _val);\n this.setAttribute(\"customWidth\", 1);\n } else if (_val === undefined || _val === null){\n this.removeAttribute(\"width\");\n this.removeAttribute(\"customWidth\");\n }\n }", "set setWidth (width) {\n this.width = width;\n }", "function setFullWidth(){\n\t\t\t\n\t\t\t$fullwidth_el.each(function(){\n\t\t\n\t\t\t\tvar element = $(this);\n\t\t\t\t\n\t\t\t\t// Reset Styles\n\t\t\t\telement.css('margin-left', '');\n\t\t\t\telement.css('width', '');\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(!$body.hasClass('boxed-layout')){\n\t\t\t\t\t\n\t\t\t\t\tvar element_x = element.offset().left;\n\t\t\t\t\t\n\t\t\t\t\t// Set New Styles\n\t\t\t\t\telement.css('margin-left', -element_x+'px');\n\t\t\t\t\telement.css('width', window_w+'px');\t\n\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}", "fixWidths() {\n const me = this,\n {\n element,\n header,\n footer\n } = me;\n\n if (!me.collapsed) {\n if (me.flex) {\n header.flex = me.flex;\n\n if (footer) {\n footer.flex = me.flex;\n }\n\n element.style.flex = me.flex;\n } else {\n // If width is calculated and no column is using flex, check if total width is less than width. If so,\n // recalculate width and bail out of further processing (since setting width will trigger again)\n if (me.hasCalculatedWidth && !me.columns.some(col => !col.hidden && col.flex) && me.totalFixedWidth !== me.width) {\n me.width = me.totalFixedWidth; // Setting width above clears the hasCalculatedWidth flag, but we want to keep it set to react correctly\n // next time\n\n me.hasCalculatedWidth = true;\n return;\n }\n\n let totalWidth = me.width;\n\n if (!totalWidth) {\n totalWidth = 0; // summarize column widths, needed as container width when not using flex widths and for correct\n // overflow check in Edge\n\n for (const col of me.columns) {\n if (!col.flex && !col.hidden) totalWidth += col.width;\n }\n } // rows are absolutely positioned, meaning that their width won't affect container width\n // hence we must set it, if not using flex\n\n element.style.width = `${totalWidth}px`;\n header.width = totalWidth;\n\n if (footer) {\n footer.width = totalWidth;\n }\n }\n\n me.syncScrollingPartners(false);\n }\n }", "function manageData(){\n width = \"50px\"\n }", "function ResizeAll(){\r\n\tListTable.style.tableLayout=\"fixed\";\r\n\tif(ListTable.rows(0)!=null)\r\n\t{\r\n\t\tfor (var i = 0; i <ListTable.rows(0).cells.length; i++)\r\n\t\t\tListTable.rows(0).cells(i).style.width=HeaderTable.rows(0).cells(i).style.width;\r\n } \r\n}", "function updateContainers() {\n\n\t\tvar width = editor.duration * scale;\n\n\t\telements.setWidth( width + 'px' );\n\t\t// curves.setWidth( width + 'px' );\n\n\t}", "function setSizes()\n {\n if (DOM.container.offsetHeight > DOM.container.offsetWidth)\n {\n DOM.container.style.minWidth = DOM.container.offsetHeight + \"PX\";\n }\n\n desk.style.height = sizes.desk.height + \"PX\";\n desk.style.width = sizes.desk.width + \"PX\";\n desk.style.marginBottom = sizes.deskContainer.marginBottom + \"PX\";\n\n for (var counterRow = 0; counterRow < sizes.field.rows; counterRow++)\n {\n for (var counterCol = 0; counterCol < sizes.field.cols; counterCol++)\n {\n DOM.game.field.rows[counterRow].cells[counterCol].style.height = sizes.card.height + \"PX\";\n DOM.game.field.rows[counterRow].cells[counterCol].style.width = sizes.card.width + \"PX\";\n\n var card = cards[counterRow * sizes.field.cols + counterCol];\n if (card)\n {\n card.style.height = sizes.card.height + \"PX\";\n card.style.width = sizes.card.width + \"PX\";\n }\n }\n }\n }", "function updateSlideWidth() {\n let slideWidth = document.querySelector('.slider-about-1__item')\n .offsetWidth;\n // console.log(slideWidth);\n // document.querySelectorAll('.slider-about-1__item').forEach( el => {\n // \tel.style.width = slideWidth + 'px';\n // \t// console.log(el);\n // });\n document.querySelector('.slider-about-3').style.width =\n slideWidth + 'px';\n sliderAbout3.update();\n sliderAbout1.update();\n // console.log('updatewidth');\n }", "function updateWidth() {\n\t\tsetMaxWidth(window.innerWidth * 0.7);\n\t}", "function setPaneDimensions() {\n pane_width = element.width();\n $(options.paneItemsSelector, element).each(function () {\n $(this).width(pane_width);\n });\n container.width(pane_width * pane_count);\n }", "function baseInit(){\r\n elemArr.forEach(function(c,i,arr){\r\n c.style.minWidth = elemWidth + 'px';\r\n\r\n //Add data-index\r\n c.setAttribute(\"data-index\", i+1);\r\n\r\n //Add data-active\r\n if(i < 4){\r\n c.setAttribute(\"data-active\", \"true\");\r\n }\r\n else{\r\n c.setAttribute(\"data-active\", \"false\");\r\n }\r\n\r\n elCount++;\r\n });\r\n //Set Abs Width\r\n sliderAbsWidth = (elemArr.length + 1) * elemWidth;\r\n }", "_updateWidth() {\n this.setState(this._getDOMDimensions());\n }", "innerWidthDependsOnChilds(){if(this.__controlStretchedWidth)return!0;if(this.__columnOptions)for(const columnOption of this.__columnOptions)if(\"Content\"===columnOption.widthMode)return!0;return super.innerWidthDependsOnChilds()}", "function setContainerWidth(val) {\n switch (val) {\n case \"16\":\n ul.style.width = \"480px\";\n break;\n\n case \"36\":\n ul.style.width = \"720px\";\n break;\n\n case \"64\":\n ul.style.width = \"960px\";\n break;\n }\n }", "function resizeSignUpsContainers() {\n var SUP_Conts = $(\".SignUpEventContainer\")\n var winW = window.innerWidth;\n for (i = 0; i < SUP_Conts.length; i++) {\n var mc = SUP_Conts.get(i);\n mc.setAttribute('style', 'width:100%');\n if ((winW - 25) < mc.offsetWidth) {\n mc.setAttribute('style', 'width:' + (winW - 25) + 'px !important');\n }\n }\n var signUpMainCont = SUP_Conts.get(0);\n var signUpConts = $(\".SignUpEventTable\");\n for (i = 0; i < signUpConts.length; i++) {\n signUpConts.get(i).setAttribute('style', 'width:' + signUpMainCont.offsetWidth + 'px !important');\n }\n}", "function setPaneDimensions() {\n\t\t\t\tpane_width = element.width();\n\t\t\t\tpanes.each( function () {\n\t\t\t\t\t$( this ).width( pane_width );\n\t\t\t\t} );\n\t\t\t\tcontainer.width( pane_width * pane_count );\n\t\t\t}", "function widen() {\n var minWidth = 685;\n\n //prepare array of magics\n var std_buttons = document.getElementById(\"std_buttons\");\n var magic = document.getElementById(\"magic\");\n var magic2 = document.getElementById(\"magic2\");\n var magic3 = document.getElementById(\"magic3\");\n var magic4 = document.getElementById(\"magic4\");\n var magic5 = document.getElementById(\"magic5\");\n var magic_array = [];\n\n if (magic) magic_array.push(magic);\n if (magic2) magic_array.push(magic2);\n if (magic3) magic_array.push(magic3);\n if (magic4) magic_array.push(magic4);\n if (magic5) magic_array.push(magic5);\n\n //sort by length desc\n magic_array.sort(function (a, b) {\n return b.offsetWidth - a.offsetWidth;\n });\n\n var defWidth = std_buttons.offsetWidth;\n var fixedWidth = 100;\n\n var stdWidth = fixedWidth + std_buttons.offsetWidth;\n console.log(\"standard width=\" + stdWidth);\n\n var newWidth =\n fixedWidth +\n std_buttons.offsetWidth +\n (magic ? magic.offsetWidth : 0) +\n (magic2 ? magic2.offsetWidth : 0) +\n (magic3 ? magic3.offsetWidth : 0) +\n (magic4 ? magic4.offsetWidth : 0) +\n (magic5 ? magic5.offsetWidth : 0);\n\n if (newWidth > 795) {\n //console.log(\"width calculated to\"+newWidth+\". shortening labels\");\n document.getElementById(\"query\").innerText = \"Que\";\n document.getElementById(\"project_list\").innerText = \"Lst\";\n newWidth =\n fixedWidth +\n std_buttons.offsetWidth +\n (magic ? magic.offsetWidth : 0) +\n (magic2 ? magic2.offsetWidth : 0) +\n (magic3 ? magic3.offsetWidth : 0) +\n (magic4 ? magic4.offsetWidth : 0) +\n (magic5 ? magic5.offsetWidth : 0);\n }\n if (newWidth > 795) {\n //console.log(\"width calculated to\"+newWidth+\". shortening labels\");\n document.getElementById(\"validate\").innerText = \"Val\";\n document.getElementById(\"project\").innerText = \"Prj\";\n newWidth =\n fixedWidth +\n std_buttons.offsetWidth +\n (magic ? magic.offsetWidth : 0) +\n (magic2 ? magic2.offsetWidth : 0) +\n (magic3 ? magic3.offsetWidth : 0) +\n (magic4 ? magic4.offsetWidth : 0) +\n (magic5 ? magic5.offsetWidth : 0);\n }\n if (newWidth > 795) {\n //console.log(\"width calculated to\"+newWidth+\". shortening labels\");\n document.getElementById(\"model\").innerText = \"LD\";\n document.getElementById(\"model2\").innerText = \"LB\";\n document.getElementById(\"model3\").innerText = \"WB\";\n newWidth =\n fixedWidth +\n std_buttons.offsetWidth +\n (magic ? magic.offsetWidth : 0) +\n (magic2 ? magic2.offsetWidth : 0) +\n (magic3 ? magic3.offsetWidth : 0) +\n (magic4 ? magic4.offsetWidth : 0) +\n (magic5 ? magic5.offsetWidth : 0);\n }\n if (newWidth > 795) {\n //console.log(\"width calculated to\"+newWidth+\". shortening labels\");\n document.getElementById(\"explain\").innerText = \"E\";\n document.getElementById(\"schedules_gp\").innerText = \"G\";\n newWidth =\n fixedWidth +\n std_buttons.offsetWidth +\n (magic ? magic.offsetWidth : 0) +\n (magic2 ? magic2.offsetWidth : 0) +\n (magic3 ? magic3.offsetWidth : 0) +\n (magic4 ? magic4.offsetWidth : 0) +\n (magic5 ? magic5.offsetWidth : 0);\n }\n if (newWidth > 795) {\n //console.log(\"width calculated to\"+newWidth+\". shortening labels\");\n document.getElementById(\"md_export\").innerText = \"M\";\n document.getElementById(\"md_import\").innerText = \"M\";\n newWidth =\n fixedWidth +\n std_buttons.offsetWidth +\n (magic ? magic.offsetWidth : 0) +\n (magic2 ? magic2.offsetWidth : 0) +\n (magic3 ? magic3.offsetWidth : 0) +\n (magic4 ? magic4.offsetWidth : 0) +\n (magic5 ? magic5.offsetWidth : 0);\n }\n\n var x = 0; //to avoid infinite cycle\n for (\n var i = 0;\n i < magic_array.length && newWidth > 795 && x < 20;\n magic_array.sort(function (a, b) {\n return b.offsetWidth - a.offsetWidth;\n })\n ) {\n //console.log(\"width calculated to\"+newWidth+\". shortening longest magic label \"+magic_array[i].innerText );\n magic_array[i].innerText = magic_array[i].innerText.substring(\n 0,\n magic_array[i].innerText.length - 1\n );\n newWidth =\n fixedWidth +\n std_buttons.offsetWidth +\n (magic ? magic.offsetWidth : 0) +\n (magic2 ? magic2.offsetWidth : 0) +\n (magic3 ? magic3.offsetWidth : 0) +\n (magic4 ? magic4.offsetWidth : 0) +\n (magic5 ? magic5.offsetWidth : 0);\n x++;\n }\n\n var newWidthCss = newWidth + \"px\";\n\n var body = document.getElementsByTagName(\"body\")[0];\n var html = document.getElementsByTagName(\"html\")[0];\n body.setAttribute(\"width\", newWidth);\n body.style.setProperty(\"width\", newWidthCss, \"\");\n html.setAttribute(\"width\", newWidth);\n html.style.setProperty(\"width\", newWidthCss, \"\");\n}", "function overrideWidth(node){ if(node){ node.style.maxWidth = node.offsetWidth+\"px\"; node.style.width = \"auto\"; } }", "fixSizes() {\n // subGrid width\n this.callEachSubGrid('fixWidths');\n }", "fixSizes() {\n // subGrid width\n this.callEachSubGrid('fixWidths');\n }", "function setWidth(val) {\n\tbookshelf.width = val;\n\tvoronoi.setDimensions(bookshelf.width,bookshelf.height);\n}", "setLayoutWidth() {\n if (this.props.isBoxed) {\n document.body.classList.add('layout-width');\n } else {\n document.body.classList.remove('layout-width');\n }\n }", "function setStyles() {\n // Assign the proper width to the wrapper\n SELECTORS.$slideWrapper.css('width', NUMBERS.WRAPPER_WIDTH + 'px');\n\n // Loop through all the slides and assign their proper widths\n var i = 0;\n\n for(i; i < SELECTORS.$slides.length;i++) {\n SELECTORS.$slides.css({\n 'width': NUMBERS.SLIDE_WIDTH + 'px',\n 'margin-left': NUMBERS.SLIDE_GUTTER + 'px'\n });\n }\n\n return this;\n }", "getAllItemsWidth() {\n return this.items.length * (this.initialItemsWidth / this.initialItemElements.length);\n }", "updateInnerWidthDependingOnChilds(){this.__cacheWidthPerColumn=null,this.__asyncWorkData[\"System.TcHmiGrid.triggerRebuildAll\"]=!0,this.__requestAsyncWork()}", "computeWidth () {\n this.div.style.width = 'auto'\n this.column.style.width = 'auto'\n\n var width = stringMeter.width(this.name, 12, 'Roboto-Medium')\n + 44 // padding with fix button\n + 28 // padding without fix button\n + 66 // sortDiv\n + 1 // error\n\n for (var p = 0, lp = this.pcm.products.length; p < lp; p++) {\n var divWidth = stringMeter.width(this.pcm.products[p].cellsByFeatureId[this.id].div.innerText, 13, 'Roboto-Regular') + 56 + 1 // 56 = padding, 1 for error\n if (divWidth > width) width = divWidth\n }\n\n this.div.style.width = width + 'px'\n this.column.style.width = width + 'px'\n }", "function calcWidth(obj){\n \n var titles = $(obj).siblings('.space').children('.route').children('.title');\n \n $(titles).each(function(index, element){\n var pTitleWidth = parseInt($(obj).css('width'));\n var leftOffset = parseInt($(obj).siblings('.space').css('margin-left'));\n \n var newWidth = pTitleWidth - leftOffset;\n \n if ($(obj).attr('id') == 'title0'){\n newWidth = newWidth - 10;\n }\n \n $(element).css({\n 'width': newWidth,\n })\n \n calcWidth(element);\n });\n \n sorting();\n }", "getWidth () {\n\t\t\tthis.widthWindow = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth\n\t\t\tthis.widthContainer = this.$refs.list.clientWidth\n\t\t}", "setWidth(valueNew){let t=e.ValueConverter.toNumber(valueNew);null===t&&(t=this.getAttributeDefaultValueInternal(\"Width\")),t!==this.__width&&(this.__width=t,e.EventProvider.raise(this.__id+\".onPropertyChanged\",{propertyName:\"Width\"}),this.__processWidth())}", "resize() {\n this._setBorderWidth();\n }", "[symbols.itemsChanged]() {\n if (super[symbols.itemsChanged]) { super[symbols.itemsChanged](); }\n const items = this.items;\n const count = items.length;\n this.$.spreadContainer.style.width = (count * 100) + '%';\n const itemWidth = (100 / count) + \"%\";\n [].forEach.call(items, item => {\n item.style.width = itemWidth;\n });\n }", "function setboardWidth(numberOfCards, numberOfRows){\n\t\n//adjusts width of board subject to number of cards chosen in code - ***need to make this an input function in future***\n\t\tif(numberOfCards<5){\n\t\t\tcolumns=2;}\n\t\telse{columns = 3;}\n\t\n\tvar boardWidth =document.getElementById('game-board');\n\tvar requiredWidth = (columns* 144);\n\tvar requiredWidthStr = ''+requiredWidth+'px';\n\tboardWidth.style.width=requiredWidthStr;\t\n\tvar width = window.innerWidth|| document.documentElement.clientWidth|| document.body.clientWidth;\n\tvar reqdMargin = (width - requiredWidth)/2;\n\tvar reqdMarginStr ='5px '+reqdMargin+'px';\n\tboardWidth.style.margin=reqdMarginStr;\n\n\t}", "function setPaneDimensions() {\n\t\tpane_width = element.width();\n\t\tpanes.each(function() {\n\t\t\t$(this).width(pane_width);\n\t\t});\n\t\tcontainer.width(pane_width*pane_count);\n\t\t}", "_updateSizeRowsCols() {\n const that = this;\n\n that.$.container.removeAttribute('style');\n\n setTimeout(function () {\n if ((that.horizontalScrollBarVisibility === 'disabled' || that.horizontalScrollBarVisibility === 'hidden') && (that.verticalScrollBarVisibility === 'disabled' || that.verticalScrollBarVisibility === 'hidden')) {\n return;\n }\n\n const rectObject = that.getBoundingClientRect();\n\n that.$.container.style.width = rectObject.width + 'px';\n that.$.container.style.height = rectObject.height + 'px';\n }, 0);\n }", "layout()\n {\n // Do not attempt to use offsets if we're not attached to the document tree yet.\n if (!this._columnWidthsInitialized && this.element.offsetWidth) {\n // Give all the columns initial widths now so that during a resize,\n // when the two columns that get resized get a percent value for\n // their widths, all the other columns already have percent values\n // for their widths.\n var headerTableColumnElements = this._headerTableColumnGroupElement.children;\n var tableWidth = this._dataTableElement.offsetWidth;\n var numColumns = headerTableColumnElements.length;\n for (var i = 0; i < numColumns; i++) {\n var headerCellElement = this._headerTableBodyElement.rows[0].cells[i]\n if (this._isColumnVisible(headerCellElement.columnIdentifier)) {\n var columnWidth = headerCellElement.offsetWidth;\n var percentWidth = ((columnWidth / tableWidth) * 100) + \"%\";\n this._headerTableColumnGroupElement.children[i].style.width = percentWidth;\n this._dataTableColumnGroupElement.children[i].style.width = percentWidth;\n } else {\n this._headerTableColumnGroupElement.children[i].style.width = 0;\n this._dataTableColumnGroupElement.children[i].style.width = 0;\n }\n }\n\n this._columnWidthsInitialized = true;\n }\n\n this._positionResizerElements();\n }", "function resetWidth() {\r\n var resetChildren = $(this).children(box);\r\n var resetWidthString = featureBoxWidth + \"%\";\r\n\r\n if ($(window).width() >= 769) {\r\n TweenLite.to(resetChildren, 0.5, {width: featureBoxWidth});\r\n }\r\n }", "setStyle (){\n // console.log(\"style\")\n let ratio = this.items.length / this.slidesVisible\n this.container.style.width = (ratio * 100)+ \"%\"\n this.items.forEach(item => item.style.width= ((100 / this.slidesVisible )/ ratio) + \"%\")\n }", "function setStyles() {\n var width = randomNumber(1,7);\n var pad = randomNumber(1,3);\n var brdr = randomNumber(1,10);\n var mrgn = randomNumber(1,10);\n var bstyle = bs.toString();\n CSS = [width, pad, mrgn, brdr];\n guessWidth.style.boxSizing = `${bstyle}`; \n guessWidth.style.width = `${width}00px`;\n guessWidth.style.padding = `${pad}0px`;\n guessWidth.style.border = `${brdr}px solid pink`;\n guessWidth.style.margin = `${mrgn}px`; \n}", "set minimumWidth(value) { }", "function initTableSlideWidth() {\n\tvar table = jQuery('.items-table');\n\tvar slideName = '.slide';\n\n\ttable.each(function() {\n\t\tvar curTable = jQuery(this);\n\t\tvar slide = curTable.find(slideName);\n\n\t\tslide.width(curTable.width());\n\t\tjQuery(window).on('resize.trigSlide orientationchange', function() {\n\t\t\tslide.width(curTable.width());\n\t\t});\n\t});\n}", "function copyWidth(el, el2) {\n\tel2.style.width=el.offsetWidth;\n}", "updateInputWidth() {\n let me = this,\n inputWidth = me.getInputWidth(),\n vdom = me.vdom;\n\n if (inputWidth !== null && inputWidth !== me.width) {\n vdom.cn[1].width = inputWidth;\n } else {\n delete vdom.cn[1].width;\n }\n\n me.vdom = vdom;\n }", "applyWidthOnDxpImg() {\r\n for (const i of Object.keys(this.dxpCarouselSlide)) {\r\n this.dxpCarouselSlide[i].style.display = 'block';\r\n this.dxpCarouselSlide[i].style.width = `${this.carouselContainer.offsetWidth}px`;\r\n }\r\n }", "function resize_elesWidth() {\r\n\tvar arrw = [5,\r\n\t $(\"#wrapper\").outerWidth(true) - $(\"#wrapper\").width(),\r\n\t $(\"#content_leftNav\").outerWidth(true),\r\n\t\t\t $(\"#content_main\").outerWidth(true)];\r\n\tvar totalw = 0;\r\n\tvar screenw = $(window).width();\r\n\r\n\t// Count ele width\r\n\tfor (var i = 0; i < arrw.length; ++i) {\r\n\t\ttotalw += arrw[i];\r\n\t}\r\n\r\n\tif (screenw > totalw) {\r\n\t\t// Choose screen width\r\n\t\t$(\"body\").width(screenw);\r\n\t\t$(\"#bodyCanvas\").width(screenw);\r\n\t\t$(\"#footer_wrap\").width(screenw);\r\n\t}\r\n\telse {\r\n\t\t// Choose ele widh\r\n\t\t$(\"body\").width(totalw);\r\n\t\t$(\"#bodyCanvas\").width(totalw);\r\n\t\t$(\"#footer_wrap\").width(totalw);\r\n\t}\r\n}", "function update_containersize() {\n $('ul.filterable-grid').css(\"width\", $('.showcase-container').width() + \"px\");\n }", "function set_sizes() {\n tab_width = $nav_tab.outerWidth();\n list_width = $nav_list.outerWidth();\n tabs_displayed = list_width / tab_width;\n //recalculate height of the currently displayed slide\n var this_sectionHeight = $('.slick-active').outerHeight();\n $sections.css('height', this_sectionHeight + 'px');\n //use tab width and tab index to set horizontal spacing\n $nav_tab.each(function() {\n var index = $(this).index();\n var left_pos = (tab_width * (index - pos_counter)) + 'px';\n $(this).css('left', left_pos);\n });\n}", "function setPaneDimensions() {\n pane_width = element.width();\n \n // incase carousel slides have been updated, re-index them\n panes = $(\"ul>li\", element);\n pane_count = panes.length;\n\n panes.each(function() {\n $(this).width(pane_width);\n });\n container.width(pane_width*pane_count);\n }", "function writeWidthOnSight(className) {\n const el = document.getElementsByClassName(className)\n for (let i = 0; i < el.length; i++) {\n const elParent = el[i].parentNode\n const elWidth = el[i].innerHTML\n elParent.style.width = elWidth\n // const elemNumber = elem[0].firstChild.innerHTML\n // elem[0].style.width = `${elemNumber}%`\n }\n}", "function calcParentSizes(elements) {\n _.map(elements, function (e) {\n e.lastParentSize = e.parentSize;\n var sizedParent = findSizedParent(e.element);\n e.parentSize = sizedParent && sizedParent.width();\n });\n }", "function setPaneDimensions() {\n pane_width = $(window).width();\n\t\t\t\n panes.each(function() {\n $(this).width(pane_width);\n });\n\n container.width(pane_width*pane_count);\n\t\t\t\n\t\t\t\n\t\t\n\n }", "function setPaneDimensions() {\n pane_width = $(window).width();\n\t\t\t\n panes.each(function() {\n $(this).width(pane_width);\n });\n\n container.width(pane_width*pane_count);\n\t\t\t\n\t\t\t\n\t\t\n\n }", "function OCM_materialWidth() {\r\n\r\n\t\t\t\t\t$('#slide-out-widget-area.slide-out-from-right').css({\r\n\t\t\t\t\t\t'padding-top': $window.height() * 0.1,\r\n\t\t\t\t\t\t'padding-bottom': $window.height() * 0.1\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\tOCM_overflowState();\r\n\t\t\t\t}", "function resizeWidthBasedOnObject(referenceElementId, elementIdsToSet, percentRefWidth, removePadding, offset) {\n /// <summary>\n /// Sets the width of the given elements relative to the given element.\n /// </summary>\n /// <param name=\"referenceElementId\" type=\"string\">The id of the element to use as reference when setting the other elements.</param>\n /// <param name=\"elementIdsToSet\" type=\"string[]\">A list of ids of the elements whose widths to set.</param>\n /// <param name=\"percentRefWidth\" type=\"double\">A number between 0 and 1 that describes how much of the reference element's width to set the width of the other elements.</param>\n /// <param name=\"removePadding\" type=\"bool\">Whether to include the padding in the ref element's width.</param>\n /// <param name=\"offset\" type=\"int\">An additional offset from the new calculated width.</param>\n\n // Get the reference object and compute the new width\n var refObj = document.getElementById(referenceElementId);\n\n // Get the padding\n var totalHorizontalPadding = 0;\n if (removePadding) {\n var computedStyle = window.getComputedStyle(refObj, null);\n var totalHorizontalPadding = parseInt(computedStyle.getPropertyValue('padding-left'));\n totalHorizontalPadding += parseInt(computedStyle.getPropertyValue('padding-right'));\n }\n\n // Get the new width\n var newWidth = (refObj.clientWidth - totalHorizontalPadding) * percentRefWidth + offset;\n newWidth += \"px\";\n\n // Modify the element widths\n var element;\n for (var ii = 0; ii < elementIdsToSet.length; ii++) {\n element = document.getElementById(elementIdsToSet[ii]);\n element.style.width = newWidth;\n }\n}", "_adaptViewWidth() {\n let actualViewWidth = this._calcDisplayedItemsTotalWidth() + this._calcViewExtraWidth();\n this._viewLimiter.style.width = actualViewWidth + 'px';\n }", "set minWidth(value) {}" ]
[ "0.7077539", "0.7010517", "0.6996412", "0.6984562", "0.698392", "0.6913587", "0.69069856", "0.6885303", "0.6835429", "0.6812564", "0.67487574", "0.6721842", "0.66989815", "0.66989815", "0.66935444", "0.6677265", "0.6660298", "0.6651036", "0.6651036", "0.6651036", "0.66369313", "0.6632199", "0.6610668", "0.66016936", "0.6586424", "0.65712005", "0.65649927", "0.6547797", "0.6539063", "0.6518368", "0.651657", "0.6512765", "0.651004", "0.65065795", "0.6480692", "0.6472829", "0.64522296", "0.64276147", "0.64240044", "0.64088356", "0.64012223", "0.63924813", "0.63855565", "0.63820934", "0.637852", "0.6370966", "0.636908", "0.63676864", "0.6367151", "0.63623244", "0.6347044", "0.63275003", "0.6301454", "0.62989604", "0.6293968", "0.62729543", "0.62592214", "0.6252778", "0.62379205", "0.6227048", "0.62260306", "0.6217258", "0.6214335", "0.6185466", "0.6185466", "0.6169562", "0.61689454", "0.6156537", "0.6152257", "0.6136469", "0.611143", "0.6100045", "0.6097561", "0.6087588", "0.6065539", "0.60596687", "0.6057189", "0.6052231", "0.60520464", "0.6043869", "0.6041513", "0.6041143", "0.6035444", "0.60235924", "0.6022814", "0.6003574", "0.60000163", "0.5987024", "0.5980801", "0.5973361", "0.5966437", "0.5964478", "0.5961634", "0.59471935", "0.5942619", "0.5942619", "0.5939675", "0.5931573", "0.59189457", "0.59157026" ]
0.80272555
0
destroys any obstacles it collides with
function OnTriggerEnter(other : Collider){ if(other.transform.root.tag == "obstacle"){ other.SendMessageUpwards("destroy"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function DestroyObstacle(){\r\n ObstacleGroup[0].destroy();\r\n SlideButton.hide();\r\n \r\n }", "function removeOutOfBoundObj() {\n gameState.enemies.getChildren().forEach(enemy => {\n if (enemy.x > config.width + HALF_OBJ_PIXEL || enemy.x < -HALF_OBJ_PIXEL) {\n gameState.enemies.remove(enemy);\n }\n });\n gameState.platformsEven.getChildren().forEach(platform => {\n if (platform.x > config.width + HALF_OBJ_PIXEL * 2 || platform.x < -HALF_OBJ_PIXEL * 2) {\n gameState.platformsEven.remove(platform);\n }\n });\n gameState.platformsOdd.getChildren().forEach(platform => {\n if (platform.x > config.width + HALF_OBJ_PIXEL * 2 || platform.x < -HALF_OBJ_PIXEL * 2) {\n gameState.platformsOdd.remove(platform);\n }\n });\n}", "function isObstacle_Clash_leftofWindow() {\r\n for (let j in stages.obstacles)\r\n if (stages.obstacles[j].x <= -stages.obstacles[j].width) {\r\n stages.obstacles.splice(j, 1);\r\n }\r\n }", "function obstacleController() {\r\n if (!isGameEnded && isStarted) {\r\n // first loop\r\n obstacles.forEach(function(item){\r\n if(item) {\r\n var pos = item.position;\r\n if (pos.z > 100) {\r\n // don't move object\r\n pos.z = 500;\r\n } else {\r\n pos.z += 2*movementUnit;\r\n }\r\n }\r\n });\r\n obstacles = obstacles.filter(function(item) {\r\n if(item.position.z >= 500) {\r\n scene.remove(item);\r\n return false;\r\n } else {\r\n return item.position.z < 500;\r\n }\r\n });\r\n detectCollsion();\r\n }\r\n}", "function clearObstacles(grid) {\n if (!running) {\n for (var i = 0; i < grid.length; i++) {\n for (var j = 0; j < grid[i].length; j++) {\n grid[i][j].obstacle = false;\n }\n }\n }\n}", "removeObstacle(x, y, width, height) {\n for (let i = 0; i < width; i++) {\n for (let j = 0; j < height; j++) {\n this.setTile(1, x+i, y+j, 0);\n }\n }\n }", "function clearObstacles(){\n obstaclesArray.pop(obstaclesArray[0]);\n}", "function rmvObstaclesAndHitCheck(){\n for (let i = obstacles.length - 1; i >= 0; i--) {\n obstacles[i].newObstacle();\n\n if (obstacles[i].out()) {\n obstacles.splice(i, 1)\n }\n \n if (obstacles[i].hit()) {\n gameState = 3;\n }\n }\n}", "clear() {\n const game = this.game;\n const world = game.world;\n const container = game.pixiAdapter.container;\n\n // Remove p2 constraints from the world\n for (let i = 0; i < this.constraints.length; i++) {\n world.removeConstraint(this.constraints[i]);\n }\n\n // Remove p2 bodies from the world and Pixi Containers from the stage\n for (let i = 0; i < this.bodies.length; i++) {\n world.removeBody(this.bodies[i]);\n container.removeChild(this.containers[i]);\n }\n }", "cleanUp() {\n // clear activeEnemies\n this.activeEnemies.forEach(function(enemy) {\n enemy.cleanUp();\n });\n // clear active players\n this.activeObjects.forEach(function(object) {\n object.cleanUp();\n });\n // stop game loop\n this.animation.forEach(function(frame,index) {\n cancelAnimationFrame(frame);\n });\n }", "function destroyCells() {\n\tfor (var i = 0; i < xSize; i++) {\n\t\tfor (var j = 0; j < ySize; j++){\n\t\t\tDestroy(cells[i,j].gameObject);\n\t\t}\n\t}\n}", "function OnCollisionEnter(hit : Collision)\n{\t\n\tDestroy(gameObject);\n}", "function stop() {\n // delete animation from obstacles\n obstacle.style.top = (-1) * obstacle.style.height.replace(/[^0-9]/g, '') + \"vw\";\n obstacle.classList.remove('obstacle-animation');\n\n // put player back to starting position\n character.style.left = 0;\n positionX = 0;\n\n // delete all the keypresses \n keyPresses = {};\n\n // stop collision detection\n clearInterval(collisionID);\n}", "function gameLogic(){\r\n for (let i in randomObjects){\r\n if(collide(randomObjects[i], playerBall)){\r\n //playerBall.remove();\r\n randomObjects[i].remove();\r\n randomObjects.splice(i, 1);\r\n }\r\n }\r\n}", "onRemoveFromWorld() {\n //game.physicsEngine.world.removeBody(this.physicsObj);\n }", "destroy() {\n this.container.removeChild(this.inspiredSprite);\n this.container.removeChild(this.sprite);\n this.container.removeChild(this.halo);\n this.container.removeChild(this.highlight);\n delete this.container;\n }", "kill() {\n //calc size of hitbox (- a treshold)\n let mx_left = this.position.pix_x + 0.25 * tileSize;\n let mx_right = mx_left + tileSize - 0.25 * tileSize;\n let my_up = this.position.pix_y + 0.25 * tileSize;\n let my_down = my_up + tileSize - 0.25 * tileSize;\n\n //same for players\n let px_left;\n let px_right;\n let py_up;\n let py_down;\n board.players.forEach(player => {\n px_left = player.position.pix_x + 0.25 * tileSize;\n px_right = px_left + tileSize - 0.25 * tileSize;\n py_up = player.position.pix_y + 0.25 * tileSize;\n py_down = py_up + tileSize - 0.25 * tileSize;\n\n //check if hitboxes overlap\n //When monsters left edge is to the left of players right side\n //and at the same time the monsters right side is not totaly left of players left side\n //When at the same time the montsters upper bond is below the player's lower bound\n //but the monsters lower bound is higher than the players upper bound, then they overlap\n if (mx_left < px_right && mx_right > px_left &&\n my_up < py_down && my_down > py_up) {\n player.die();\n }\n });\n }", "removeColliders() {\r\n\t\t\tthis._collides = {};\r\n\t\t\tthis._colliding = {};\r\n\t\t\tthis._collided = {};\r\n\t\t\tthis._removeFixtures(false);\r\n\t\t}", "resetObjects()\n {\n //remove rectangles for collidable bodies\n this.buttons.forEach(this.deleteBody, this, true);\n this.spikes.forEach(this.deleteBody, this, true);\n\n this.startdoors.destroy();\n this.enddoors.destroy();\n this.buttons.destroy();\n this.spikes.destroy();\n this.checkpoints.destroy();\n this.doors.destroy();\n }", "killBody() {\n world.DestroyBody(this.body);\n }", "function collisionHandler(ball, ene) {\n\n ball.kill();\n ene.kill();\n\n}", "collide() {\n this.life -= 1;\n lives.innerHTML = this.life;\n this.x = START_X;\n this.y = START_Y;\n obstacle.newObst = true;\n if (this.life === 0) {\n this.endGame();\n }\n }", "onCollision() {\n if (this.canBeEaten) {\n this.isDestroyed = true;\n }\n }", "destroy() {\n if (this.world !== undefined) {\n this.car.getComponent('car').fitness = 0\n this.car.getComponent('car').frontWheel.steerValue = 0\n let body = this.car.getComponent('physics').body\n fillNaN(body, 0.0)\n body.allowSleep = false\n if (body.sleepState === p2.Body.SLEEPING) {\n body.wakeUp()\n }\n body.setZeroForce()\n body.position = [this.position[0], this.position[1]]\n body.angularVelocity = 0\n body.velocity = [0, 0]\n body.angle = 0\n this.roadDirector.reset()\n } else {\n this.position = [400, 400]\n this.velocity = [0, 0]\n }\n }", "_cleanOldCollisions() {\n for (const guid in this.collisions) {\n if (this.collisions.hasOwnProperty(guid)) {\n const frameCollision = this.frameCollisions[guid];\n const collision = this.collisions[guid];\n const entity = collision.entity;\n const entityCollision = entity.collision;\n const entityRigidbody = entity.rigidbody;\n const others = collision.others;\n const length = others.length;\n let i = length;\n while (i--) {\n const other = others[i];\n // if the contact does not exist in the current frame collisions then fire event\n if (!frameCollision || frameCollision.others.indexOf(other) < 0) {\n // remove from others list\n others.splice(i, 1);\n\n if (entity.trigger) {\n // handle a trigger entity\n if (entityCollision) {\n entityCollision.fire('triggerleave', other);\n }\n if (other.rigidbody) {\n other.rigidbody.fire('triggerleave', entity);\n }\n } else if (!other.trigger) {\n // suppress events if the other entity is a trigger\n if (entityRigidbody) {\n entityRigidbody.fire('collisionend', other);\n }\n if (entityCollision) {\n entityCollision.fire('collisionend', other);\n }\n }\n }\n }\n\n if (others.length === 0) {\n delete this.collisions[guid];\n }\n }\n }\n }", "cleanup() {\n this.physicsEngine.cleanup(this.toClean);\n const gameInstance = this;\n this.toClean.forEach(function (name) {\n if (typeof gameInstance.objects[name] !== 'undefined') {\n delete gameInstance.objects[name];\n }\n });\n this.physicsEngine.cleanup(this.toClean);\n }", "function endGame() {\n for (let index = 0; index < blockContainer.length; index++) {\n blockContainer[index].remove();\n holeContainer[index].remove();\n }\n\n blockContainer = [];\n holeContainer = [];\n\n ball.remove();\n clearInterval(playGameInterval);\n}", "function death()\n{\t\n\n\tplayer.velocity.y = 20;\t\n\tfor(var i = 0; i < boundaries.length; i ++) boundaries.get(i).velocity.x = 0;\n\tfor(var i = 0; i < rocks.length; i ++) rocks.get(i).velocity.x = 0;\n\tif(player.bounce(rocks)) player.velocity.y = 0;\n\tdeathScreen();\n}", "destroy() {\n for (var tileId in this._tiles) {\n if (this._tiles.hasOwnProperty(tileId)) {\n const tile = this._tiles[tileId];\n for (var i = 0, leni = tile.nodes.length; i < len; i++) {\n const node = tile.nodes[i];\n node._destroy();\n }\n putBatchingBuffer(tile.buffer);\n }\n }\n this.scene.camera.off(this._onCameraViewMatrix);\n for (var i = 0, len = this._layers.length; i < len; i++) {\n this._layers[i].destroy();\n }\n for (var i = 0, len = this._nodes.length; i < len; i++) {\n this._nodes[i]._destroy();\n }\n this.scene._aabbDirty = true;\n if (this._isModel) {\n this.scene._deregisterModel(this);\n }\n super.destroy();\n }", "function spawnObstacles() {\n //Füge Spielfeld ein Obstacle hinzu\n let obstacle = $(\"#playground\").append('<div class=\"obstacle\"> </div>')[0].lastChild;\n let character = document.getElementById(\"player\");\n //Überprüfe alle 2ms\n let interval = window.setInterval(function() {\n //ob Kollision auftritt\n checkCollisionObstacle(character, obstacle)\n }, 2);\n //Entferne nach 2500 (=Zeit der Animation) das Hidernis aus dem Spiel\n window.setTimeout(function() {\n obstacle.remove();\n //Punkt, wenn Hindernis verschwindet, TOD: richtige Punkteanzeige implementieren\n clearInterval(interval);\n }, 2500);\n}", "kill(sprite) {\n for (let i = 0; i < sprite.length; i++) {\n let c = Phaser.Math.Distance.Chebyshev(this.x, this.y, sprite[i].x, sprite[i].y);\n if (sprite[i].active) {\n if (c < 60) {\n sprite[i].setActive(false).setVisible(false);\n sprite[i].alive = false;\n //sprite[i].setTexture('ghost');\n console.log('Hidden');\n console.log(sprite[i].x, sprite[i].y);\n this.createDeadBody(sprite[i].x, sprite[i].y);\n console.log('I killed someone', sprite[i].id);\n this.scene.registry.values.sceneData.serverConnection.kill(sprite[i].id);\n this.scene.registry.values.sceneData.gamePlayScene.scene.manager.getScene('voting_scene').removePlayerById(sprite[i].id);\n break;\n }\n }\n }\n }", "function clearSprites(){\n\t\tfor (var i = sprites.length - 1; i >= 0; i--) {\n\t\t\tsceneOrtho.remove(sprites[i]);\n\t\t};\n\t\tsprites=[];\n\t}", "function editorDestroyAllMapObjects() {\n edPlayerStart.destroy();\n edPlayerStart = null;\n edExit.destroy();\n edExit = null;\n edTiles.forEach(o => {\n o.forEach(s => s.destroy());\n });\n edTiles = [];\n edEnemies.forEach(o => { if (o) o.destroy(); });\n edEnemies = [];\n edPickups.forEach(o => { if (o) o.destroy(); });\n edPickups = [];\n edSigns.forEach(o => { if (o) o.destroy(); });\n edSigns = [];\n}", "destroy()\n {\n this.#gameObject = null;\n }", "function destroyBrick(){\n for(var i=0;i<bricks.length;i++){\n if(checkCollision(ball,bricks[i])){\n ball.speedY = -ball.speedY;\n createBonus(bricks[i]);\n bricks.splice(i,1);\n }\n }\n }", "function removeObjects(){\n\tfor(var n=0; n<gameData.planes.length;n++){\n\t\tvar curAirplane = gameData.planes[n];\n\t\tif(curAirplane.destroy){\n\t\t\tgameData.planes.splice(n,1);\n\t\t\tn = gameData.planes.length;\n\t\t}\n\t}\t\n}", "function destroyEnemies() {\n\taddGroupEnemy();\n}", "function isRocket_Clash_obstacle() {\r\n for (let j in stages.obstacles) {\r\n if (\r\n stages.obstacles[j].x - rocket1.width / 1.2 <= rocket1.x &&\r\n stages.obstacles[j].x >= rocket1.x &&\r\n stages.obstacles[j].y >= rocket1.y - rocket1.height &&\r\n stages.obstacles[j].y <= rocket1.y + rocket1.height\r\n ) {\r\n stages.obstacles[j].x = -200;\r\n soundDestroy();\r\n drawBlast(\r\n imageBlast,\r\n rocket1.x,\r\n rocket1.y - 10,\r\n rocket1.width + 10,\r\n rocket1.height + 10\r\n );\r\n rocket1.x = 0;\r\n lives -= 1;\r\n }\r\n }\r\n }", "function drawObstacles() {\n obstacles = obstacles.filter(obs => {\n obs.draw();\n if (obs.y > canvas.height) score++;\n if (_car.collision(obs)) gameOver();\n return obs.y <= canvas.height;\n });\n}", "clear() {\n if (this.score >= 50) {\n this.score -= 50;\n this.update_score();\n let sprite = app.stage.getChildAt(0);\n this.meteors.forEach(element => app.stage.removeChild(element));\n this.meteors.clear;\n }\n }", "function handleObstacles(){\n if (frame%200 === 0){\n var randomBoolean = Math.random() >= 0.5;\n if(randomBoolean === true){obstaclesArray.unshift(new Pylon());}\n else{obstaclesArray.unshift(new Bird());}\n }\n for(let i = 0; i < obstaclesArray.length; i++){\n obstaclesArray[i].update();\n if (obstaclesArray.length > 5){\n obstaclesArray.pop(obstaclesArray[0]);\n }\n }\n}", "killInvisible() {\n for (let i in currentGame.allEnemies) {\n if (currentGame.allEnemies[i].x >= 505) {\n delete currentGame.allEnemies[i];\n }\n }\n }", "function initializeObstacles() {\r\n\r\n\r\n\t// BOUNDARIES (invisible obstacles)\r\n\t// Starts from left of cave\r\n\t\r\n\t\r\n\tboxes.push ( new Boundary(-225, canvasHeight - 50, 185, 8) ); // Horizontal\r\n\tboxes.push( new Boundary(-40,canvasHeight - 50, 3, 50) ); // Vertical\r\n\r\n\t// Initial Floor\r\n\tboxes.push( new Boundary(-50,canvasHeight - 10, 200, 8) ); // H\r\n\r\n\t\r\n\t// Right floating island platform\r\n\t\r\n\tboxes.push( new Boundary(540,540, 300, 8) ); // H\r\n\t\r\n\tboxes.push( new Boundary(750,440, 8,100 ) ); // V\r\n\t\r\n\tboxes.push( new Boundary(760,440, 180, 8) ); // H\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t// PLATFORMS (visible obstacles)\r\n\r\n\r\n\t// Left stage part\r\n\r\n\tboxes.push ( new LargeObstacle(-300, 500, false) );\r\n\tboxes.push ( new RegularObstacle(-350, 700, false) );\r\n\tboxes.push ( new BouncyObstacle(-395, 780) );\r\n\t\r\n\tboxes.push ( new LargeObstacle(-500, 500, false) );\r\n\tboxes.push ( new LargeObstacle(-750, 500, false) );\r\n\r\n\t\r\n\t// Farther left\r\n\t\r\n\tboxes.push ( new RegularObstacle(-850, 400, false) );\r\n\tboxes.push ( new BouncyObstacle(-900, 400, false) );\r\n\t\r\n\tboxes.push ( new RegularObstacle(-980, 90, false) );\r\n\t\r\n\tboxes.push ( new RegularObstacle(-1100, 200, false) );\r\n\tboxes.push ( new RegularObstacle(-1050, 320, false) );\r\n\t\r\n\tboxes.push ( new LargerObstacle(-1350, 120, false) );\r\n\tboxes.push ( new Present(-1300, 110) );\r\n\t\r\n\r\n\t// Going under mainland platform & right\r\n\t\r\n\tboxes.push ( new SmallObstacle(-250, 800, false) );\r\n\tboxes.push ( new SmallObstacle(-125, 900, false) );\r\n\tboxes.push ( new SmallObstacle(75, 900, false) );\r\n\tboxes.push ( new RegularObstacle(125, 1100, false) );\r\n\tboxes.push ( new BouncyObstacle(200, 1100, false) );\r\n\tboxes.push ( new BouncyObstacle(500, 1100, false) );\r\n\tboxes.push ( new BouncyObstacle(500, 850, false) );\r\n\t\r\n\tboxes.push ( new Present(350, 780, false) );\r\n\t\r\n\r\n\t//player.initCheckpoint();\r\n\t//player.init(463,476);\r\n\t\r\n\t\r\n\t// Right stage part over platforms\r\n\r\n\tboxes.push( new LargeObstacle(215, 500, false) );\r\n\t\r\n\tboxes.push( new BouncyObstacle(315, 600, false) );\r\n\tboxes.push( new BouncyObstacle(315, 240, false) );\r\n\t\r\n\tboxes.push( new LargeObstacle(415, 500, false) );\r\n\r\n\t\r\n\tboxes.push( new Present(835, 425, false) );\r\n\t\r\n\t\r\n\t// Going up then left\r\n\t\r\n\tboxes.push( new LargerObstacle(190, -80, false) );\r\n\t\r\n\tboxes.push( new RegularObstacle(0, -100, false) );\r\n\t\r\n\tboxes.push( new SmallObstacle(-100, -200, false) );\r\n\tboxes.push( new Present(-100, -215, false) );\r\n\r\n\r\n\r\n\r\n}", "RemoveInactives()\n {\n for(var i = 0; i < this.gameObjects.length; i++)\n {\n if(!this.gameObjects[i].object.active)\n {\n this.gameObjects.splice(i, 1);\n this.UpdateIndex();\n }\n }\n }", "impact() {\n let area = this.hitArea;\n\n new Explosion(area.x + area.width/2, area.y + area.height/2);\n\n this.stop();\n\n this.x = 30;\n this.y = Math.round(300 - dataMap.get(this).ship.height/2);\n\n stage.remove(this);\n\n gameOver();\n }", "removeSprite(body) {\n const index = this.spriteList.findIndex(s => s.id === body.id)\n this.spriteList.splice(index, 1)\n body.sprite.destroy()\n try {\n body.stopWork()\n } catch (e) {\n console.log(body + 'dont have stopwork fn')\n }\n }", "function clearGrid() {\n clearPipes();\n clearObstacles();\n}", "function destroyPlayer(){\n player.mesh.dispose();\n // then what?\n }", "destroySprite(sprite){\n sprite.destroy();\n }", "function collision() {\r\n isObstacle_Clash_leftofWindow();\r\n isBullet_Clash_obstacle();\r\n isRocket_Clash_obstacle();\r\n if (lives <= 0) {\r\n endGame();\r\n }\r\n draw_Score_Lives();\r\n isRocket_Clash_Bomb();\r\n isBullet_Clash_Ship();\r\n }", "destroy()\n {\n this.removeAllListeners();\n if (this.parent)\n {\n this.parent.removeChild(this);\n }\n this.transform = null;\n\n this.parent = null;\n\n this._bounds = null;\n this._currentBounds = null;\n this._mask = null;\n\n this.filterArea = null;\n\n this.interactive = false;\n this.interactiveChildren = false;\n }", "cleanUp()\n {\n // Remove the contact listener\n this.physicsWorld.world.off( 'begin-contact', this.beginContact.bind(this) );\n this.physicsWorld.world.off( 'end-contact', this.endContact.bind(this) );\n this.physicsWorld.world.off( 'remove-fixture', this.removeFixture.bind(this) );\n \n unload();\n }", "destroyEvents() {\n this._stopAttacking();\n this.controller.destroyEvents();\n this.healthBar.destroy()\n this.mechanics.collisionBox.destroy()\n }", "updateAfterCollision() {\n this.setStartingPosition();\n this.decrementLives();\n\n if (this.lives < 1) {\n allEnemies = [];\n this.started = false;\n showLoseModal();\n }\n }", "collided (object) {\n\t\tif (object instanceof Asteroid) {\n\t\t\tthis.mapInstance.removeEntity(this);\n\t\t\tthis.delete();\n\t\t}\n\t}", "function OnBecameInvisible()\n{\n\tDestroy(this.gameObject);\n}", "function deleteNotNeededGameObjects() {\n bulletInfos = bulletInfos.filter(bi => bi.bullet.damage > 0 && !isOutsideOfReachableMap(bi.location));\n playerInfos = playerInfos.filter(pi => pi.player.hp > 0 && !isOutsideOfReachableMap(pi.location));\n barrierInfos = barrierInfos.filter(bi => bi.barrier.hp > 0 && !isOutsideOfReachableMap(bi.location));\n }", "function deleteObjects() {\r\n\r\n delete character;\r\n delete board;\r\n delete flag;\r\n\r\n leftFloorBlock=0;\r\n leftObastacleBlock=0;\r\n leftCoinBlock=0;\r\n leftPotionBlock=0;\r\n\r\n while(floor.length)\r\n floor.pop();\r\n\r\n while(obstacle.length)\r\n obstacle.pop();\r\n\r\n while(coin.length)\r\n coin.pop();\r\n\r\n while(potion.length)\r\n \tpotion.pop();\r\n}", "deleteBody(object)\n {\n this.player.removeRaycastTarget(object.body);\n }", "update(){\n this.spawnerTime -= 1000;\n if(this.spawnerTime <= 0){\n this.spawner.spawnProjectiles();\n this.obstacles = this.spawner.obstacles;\n this.spawner.clearObstacles();\n this.spawnerTime = this.spawner.spawnTime;\n }\n }", "Kill() { \n\t\tthis.alive = false;\n\t\twhile ( this.fleets.length ) { this.fleets[0].Kill(); }\n\t\twhile ( this.planets.length ) { this.planets[0].Reset(false); }\n\t\tthis.ai.objectives = [];\n\t\tthis.ai.completed = [];\n\t\tthis.empire_box = {x1:0,x2:0,y1:0,y2:0};\n\t\tthis.power_score = 0;\n\t\tfor ( let [civ,acct] of this.diplo.contacts ) { \n\t\t\tciv.diplo.contacts.delete(this);\n\t\t\tthis.diplo.contacts.delete(civ);\n\t\t\t}\n\t\t}", "function checkCollision(){\n for(var j = 0; j < balls.length; j++)\n if (balls[i].loc.x > paddle.loc.x &&\n balls[i].loc.x < paddle.width &&\n balls[i].loc.y > paddle.loc.y &&\n balls[i].loc.y < paddle.height)\n balls[i].splice(i,1)\n\n }", "destroy(){\n\t\tthis._active = false\n\t\tthis.children.forEach(child => {\n\t\t\tif(child.type === 'GameObject' || child.type === 'GUIObject'){\n\t\t\t\tthis.remove(child)\n\t\t\t\tchild.destroy()\n\t\t\t\tdelete this[child]\n\t\t\t}\n\t\t})\n\t}", "removeSprites() {\n\t\t\t\t// prevent rebuilding the quadTree multiple times\n\t\t\t\tthis.p.quadTree.rebuildOnRemove = false;\n\t\t\t\twhile (this.length > 0) {\n\t\t\t\t\tthis[0].remove();\n\t\t\t\t}\n\t\t\t\tthis.p.quadTree.rebuildOnRemove = true;\n\n\t\t\t\tthis.p.allSprites._rebuildQuadtree();\n\t\t\t}", "destroyObject(x, y) {\n let tile = this.getTile(x, y);\n // TODO: Maybe just set tile.object to undefined?\n delete tile.object;\n //May need to implement something for graphical updates here...\n }", "function isBullet_Clash_obstacle() {\r\n for (let j in stages.obstacles) {\r\n for (let i in rocket1.bullet) {\r\n if (\r\n rocket1.bullet[i].y >= stages.obstacles[j].y &&\r\n rocket1.bullet[i].y <=\r\n stages.obstacles[j].y + stages.obstacles[j].height &&\r\n rocket1.bullet[i].x + 40 >= stages.obstacles[j].x &&\r\n rocket1.bullet[i].x <= stages.obstacles[j].x\r\n ) {\r\n soundDestroy();\r\n drawBlast(\r\n imageBlast,\r\n stages.obstacles[j].x + 10,\r\n stages.obstacles[j].y,\r\n stages.obstacles[j].width + 20,\r\n stages.obstacles[j].height + 20\r\n );\r\n stages.obstacles[j].x = -100;\r\n rocket1.bullet[i].x = context1.width + 10;\r\n score += 10;\r\n }\r\n }\r\n }\r\n }", "destroyAssets() {\n this.sprite.destroy();\n }", "clearEntities() {\n this.game.entities.forEach(function (entity) {\n entity.removeFromWorld = true;\n });\n }", "destroyShip(pointer, gameObject) {\n gameObject.setTexture('explosion');\n gameObject.play('explode');\n }", "function stopGame(){\n\tgameData.paused = true;\n\tTweenMax.killAll();\n\t\n\trunwayContainer.removeAllChildren();\n\tlinesContainer.removeAllChildren();\n\tplaneContainer.removeAllChildren();\n\tcollisionContainer.removeAllChildren();\n}", "update() {\n this.bitmapImg.x = this.game.camera.x;\n this.bitmapImg.y = this.game.camera.y;\n this.handleBulletCollisions();\n // this.game.physics.arcade.overlap(this.enemies, this.player, this.player.handleOverlap, null, this.player);\n this.player.isGrounded = false;\n this.game.physics.arcade.collide(this.player, this.obstacles, this.player.grounded, null, this.player);\n this.game.physics.arcade.overlap(this.player, this.traps, this.player.trapped, null, this.player);\n this.game.physics.arcade.collide(this.enemies, this.obstacles);\n this.game.physics.arcade.collide(this.enemies, this.enemyNavs, (enemy, enemyNav) => {\n enemy.reverseDirection(enemyNav);\n });\n\n this.game.physics.arcade.collide(this.player, this.goal, () => {\n this.score.advanceLevel();\n this.game.sound.stopAll();\n this.game.state.start(\"dialogL2\");\n }, null, this);\n\n const remainingEnemies = [];\n\n for (const enemy of this.enemies) {\n if (this.game.physics.arcade.overlap(this.player.sword, enemy, (sword, enemy) => {\n if (enemy.enemyType === \"basic\") {\n this.score.killEnemy(\"basic\");\n }\n else if (enemy.enemyType === \"boomerang\") {\n this.score.killEnemy(\"boomerang\");\n }\n enemy.eliminate();\n }, null, this) === false) {\n remainingEnemies.push(enemy);\n }\n }\n\n const linesToPlayer = [];\n\n for (const enemy of this.enemies) {\n if (enemy.losToPlayer !== null && enemy.isShooting === false) {\n linesToPlayer.push(enemy.losToPlayer);\n }\n }\n this.drawLines(linesToPlayer);\n this.enemies = remainingEnemies;\n }", "function destroy(instance) {\n\t\tvar layers = instance.foreLayers;\n\t\tfor (var i = 0; i < layers.length; i++) {\n\t\t\tvar layer = layers[i];\n\t\t\tS.removeFromBody(layer);\n\t\t\tlayer = null;\n\t\t}\n\n\t\tS.removeFromBody(instance.bgLayer);\n\t\tinstance.bgLayer = null;\n\t\tS.detach(window, \"keydown\", instance.keyDown);\n\t}", "clearScene(){\n $objs.spritesFromScene.forEach(cage => {\n $stage.scene.removeChild(cage);\n $objs.LIST[cage.dataObj._id] = void 0;\n });\n $objs.spritesFromScene = [];\n }", "function generateOnBoardingObstacles() {\r\n if (!isGameEnded) {\r\n\r\n var MeshOBstclesA = new THREE.Mesh(GeometryObstacleA, randomObstacleMaterial());\r\n MeshOBstclesA.receiveShadow = true;\r\n MeshOBstclesA.position.set(-6,0,-850);\r\n obstacles.push(MeshOBstclesA);\r\n scene.add(MeshOBstclesA);\r\n\r\n var MeshOBstclesB = new THREE.Mesh(GeometryObstacleA, randomObstacleMaterial());\r\n MeshOBstclesB.receiveShadow = true;\r\n MeshOBstclesB.position.set(4,0,-700);\r\n obstacles.push(MeshOBstclesB);\r\n scene.add(MeshOBstclesB);\r\n\r\n var MeshOBstclesC = new THREE.Mesh(GeometryObstacleA, randomObstacleMaterial());\r\n MeshOBstclesC.receiveShadow = true;\r\n MeshOBstclesC.position.set(0,0,-400);\r\n obstacles.push(MeshOBstclesC);\r\n scene.add(MeshOBstclesC);\r\n }\r\n}", "function testCollision() {\n\n angular.forEach($scope.bullets, function(bullet) {\n \n\n var overlap1 = isOverlap(\"#o1\", \"#\" + bullet.id);\n var overlap2 = isOverlap(\"#o2\", \"#\" + bullet.id);\n var overlap3 = isOverlap(\"#o3\", \"#\" + bullet.id);\n\n\n var overlap4 = isOverlap(\"#enemy1\", \"#\" + bullet.id);\n var overlap5 = isOverlap(\"#enemy3\", \"#\" + bullet.id);\n var overlap6 = isOverlap(\"#enemy2\", \"#\" + bullet.id);\n var overlap7 = isOverlap(\"#enemy4\", \"#\" + bullet.id);\n\n if (overlap1 || overlap2 || overlap3) {\n\n $scope.bullets.splice($.inArray(bullet, $scope.bullets), 1);\n\n document.getElementById(bullet.id).remove();\n console.log(\"yeeeeeesssssss\");\n // bullet a frapper les obstacles\n } \n\n if (overlap4) {\n explosionEffect.play();\n $scope.bullets.splice($.inArray(bullet, $scope.bullets), 1);\n document.getElementById(bullet.id).remove();\n $scope.score = $scope.score + 40;\n\t\t\t\t // bullet a frapper un ennemie\n e1++;\n if (e1 >= 3) {\n\t\t\t\t\tdead.play();\n var element = document.getElementById(\"enemy1\");\n element.parentNode.removeChild(element);\n // l'ennemie est frappé plus de trois fois ----> if doit mourir\n\n e1 = 0;\n }\n }\n\n if (overlap5) {\n explosionEffect.play();\n $scope.bullets.splice($.inArray(bullet, $scope.bullets), 1);\n\n\n document.getElementById(bullet.id).remove();\n $scope.score = $scope.score + 40;\n\t\t\t\t// bullet a frapper un ennemie\n e2++;\n if (e2 >= 3) {\n\t\t\t\t\tdead.play();\n\t\t\t\t\t//l'ennemie doit mourir\n var element = document.getElementById(\"enemy3\");\n element.parentNode.removeChild(element);\n\n e2 = 0;\n }\n }\n\n if (overlap6) {\n explosionEffect.play();\n $scope.bullets.splice($.inArray(bullet, $scope.bullets), 1);\n\n\n document.getElementById(bullet.id).remove();\n $scope.score = $scope.score + 20;\n\t\t\t\t// bullet a frapper un ennemie\n e3++;\n if (e3 >= 3) {\n\t\t\t\t\tdead.play();\n\t\t\t\t\t//l'ennemie doit mourir\n var element = document.getElementById(\"enemy2\");\n element.parentNode.removeChild(element);\n e3 = 0;\n }\n }\n if (overlap7) {\n explosionEffect.play();\n $scope.bullets.splice($.inArray(bullet, $scope.bullets), 1);\n\n document.getElementById(bullet.id).remove();\n $scope.score = $scope.score + 20;\n\t\t\t\t// bullet a frapper un ennemie\n e4++;\n if (e4 >= 3) {\n\t\t\t\t\tdead.play();\n\t\t\t\t\t//l'ennemie doit mourir\n var element = document.getElementById(\"enemy4\");\n element.parentNode.removeChild(element);\n\n e4 = 0;\n }\n }\n\n\n\n })\n }", "onCollision(response, other) {\n if (response.b.body.collisionType !== me.collision.types.WORLD_SHAPE) {\n // res.y >0 means touched by something on the bottom\n // which mean at top position for this one\n if (this.alive && (response.overlapV.y > 0) && response.a.body.falling) {\n this.flicker(750, () => {\n me.game.world.removeChild(this);\n });\n }\n return false;\n }\n // Make all other objects solid\n return true;\n }", "collide(obstacle) {\n for (let asteroid of obstacle) {\n if (Math.abs(this.x - asteroid.x) <= (GUN_SIZE / 2 + ASTEROID_SIZE) &&\n Math.abs(this.y - asteroid.y) <= (GUN_SIZE / 2 + ASTEROID_SIZE)) {\n explosionsound.play();\n this.setX(-10000);\n this.setY(-10000);\n asteroid.setX(Math.floor(Math.random() * canvas.width));\n asteroid.setY(-ASTEROID_SIZE*2);\n asteroid.setColor(getRandomColor());\n tiger.health += asteroid_HP;\n }\n }\n }", "bulletCollision(allBullets) {\n let index = allBullets.indexOf(this);\n allBullets.splice(index, 1);\n }", "destroyEvents() {\n this.arena.player.config.destroyEvents();\n this.arena.player.sprite.remove();\n\n for (let creature in this.arena.monsters) {\n this.arena.monsters[creature].config.destroyEvents();\n this.arena.monsters[creature].sprite.remove();\n }\n }", "remove() {\n this.world.removeEntity(this);\n }", "function collision(){\r\n for (let enemy of allEnemies){\r\n let deltaX = player.x - enemy.x;\r\n let deltaY = player.y - enemy.y;\r\n if (deltaX < 70 && deltaX > -40 && deltaY < 55 && deltaY > -15){\r\n player.x = 350;\r\n player.y = 430;\r\n player.lives -- ;\r\n livesDisplayed[player.lives].classList.add('hidden');\r\n if(player.lives == 0){\r\n lost();\r\n }\r\n }\r\n }\r\n}", "_checkCollision() {\n\n for (let ship of this.ships) {\n let pos = ship.getPosition();\n if (pos.y >= this.canvas.height) {\n // Killed ships are not moved, they stay at their location, but are invisible.\n // I don't want to kill the player with one invisible ship :)\n if (!ship.dead) {\n ship.kill();\n this.score.damage();\n this.base.removeShield();\n }\n }\n }\n }", "destroy() {\n this.eventListeners.dispose();\n this.tile.destroy();\n }", "onCollision() {\n // do something when collected\n\n // play a \"coin collected\" sound\n me.audio.play(\"cling\");\n\n // give some score\n game.data.score += 50;\n\n // make sure it cannot be collected \"again\"\n this.body.setCollisionMask(me.collision.types.NO_OBJECT);\n\n // remove it\n me.game.world.removeChild(this);\n }", "function clearOtherPlayers() {\n if (otherPlayers && allPlayers && opColliders) {\n for (let i = 0; i < otherPlayers.length; i++) {\n otherPlayers[i].sprite.destroy();\n otherPlayers[i].usernameText.destroy();\n }\n otherPlayers = [];\n opColliders.children.iterate(function (child) {\n child.destroy();\n });\n opColliders.clear(true);\n }\n}", "destroy() {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.scene = undefined;\n this.bullets.destroy(true);\n }", "function destroyHouse() {\r\n life--;\r\n bombVal = 0;\r\n if (life === 3) {\r\n destruction_Mp3.play({volume: 0.2});\r\n house1.destroy();\r\n house2.destroy();\r\n house3.destroy();\r\n house4.destroy();\r\n house1 = this.physics.add.sprite(20, 55, 'house2').setScale(0.85);\r\n house2 = this.physics.add.sprite(40, 155, 'house2');\r\n house3 = this.physics.add.sprite(45, 270, 'house2').setScale(0.8);\r\n house4 = this.physics.add.sprite(0, 375, 'house2');\r\n }\r\n if (life === 1) {\r\n destruction_Mp3.play({volume: 0.2});\r\n house1.destroy();\r\n house2.destroy();\r\n house3.destroy();\r\n house4.destroy();\r\n house1 = this.physics.add.sprite(20, 55, 'house3').setScale(0.85);\r\n house2 = this.physics.add.sprite(40, 155, 'house3');\r\n house3 = this.physics.add.sprite(45, 270, 'house3').setScale(0.8);\r\n house4 = this.physics.add.sprite(0, 375, 'house3');\r\n }\r\n if (life === 0) {\r\n large_destruction_Mp3.play({volume: 0.15});\r\n house1.destroy();\r\n house2.destroy();\r\n house3.destroy();\r\n house4.destroy();\r\n timeEvent.destroy();\r\n bombTimeEvent.destroy();\r\n RestartBtn.setVisible(true);\r\n ResultBtn.setVisible(true);\r\n local.destroy();//Leon's part\r\n bgm_Mp3.stop();\r\n }\r\n explotion01 = this.physics.add.sprite(20, 55, 'explotion01').setScale(0.85);//new\r\n explotion02 = this.physics.add.sprite(45, 205, 'explotion02').setScale(0.85);//new\r\n explotion03 = this.physics.add.sprite(40, 350, 'explotion03').setScale(0.85);//new\r\n rate = Math.floor(Math.random() * 100 + 10)\r\n bomb.destroy();\r\n bombX = 690;\r\n barrel = Math.floor(Math.random() * 5);\r\n bomb = this.physics.add.image(bombX, bombY[barrel], 'bomb');\r\n shoot = this.physics.add.image(bombX - 15, bombY[barrel] - 5, 'shoot').setScale(0.85);//new\r\n smoke = this.physics.add.image(bombX + 45, bombY[barrel] - 5, 'smoke').setScale(0.75).setAlpha(0.6);//new\r\n cleanEffect = this.time.addEvent({ delay: 100, callback: Effect, callbackScope: this, loop: false });//new\r\n}", "destroy() {\n this.meshes.forEach(mesh => {\n mesh.destroy();\n });\n this.meshes.clear();\n this.lights.clear();\n this.__deleted = true;\n }", "function removal(){\n for (i= 0; i < 13; i++){\n World.remove(world, [objectsInWorld[i]]);\n }\n for (i=13+nameToSpell.length; i<objectsInWorld.length; i++){\n World.remove(world, [objectsInWorld[i]]);\n }\n}", "remove() {\n\t\tthis.destroy();\n\t\tthis.engine.scene.removeSprite(this);\n\t}", "function endGame() {\n $(\"div .boundary\").removeClass(\"youlose\");\n $('.boundary').unbind('hover');\n $(\"#maze\").unbind('mouseleave');\n}", "function OnCollisionEnter (col : Collision)\n{\n if(manager.turn != color)\n {\t\n \tif(col.gameObject.tag == \"Active White Piece\" || col.gameObject.tag == \"Inactive White Piece\" || col.gameObject.tag == \"Active Black Piece\" || col.gameObject.tag == \"Inactive Black Piece\")\n {\n \tDestroy(gameObject);\n }\n } \n}", "function stage(top) {\n this.owned_objects = [];\n this.push = function(obj) { this.owned_objects.push(obj);}\n this.pop = function() {this.owned_objects.pop();} \n this.will_destroy = false;\n this.destroy = function(obj) {\n \tvar i = this.owned_objects.indexOf(obj);\n this.owned_objects.splice(i, 1);\n }\n if(!top){\n \tthis.on_top = false;\n } else {\n this.on_top = true;\n } \n this.get = function(obj){\n \treturn this.owned_objects[this.owned_objects.indexOf(obj)];\n }\n \n this.remove_enemies = function(){\n \tthis.owned_objects = this.owned_objects.filter(function(obj){\n \t return obj.type != \"enemy\";\t\n \t});\n \tthis.owned_objects = this.owned_objects.filter(function(obj){\n \t return obj.type != \"bullet\";\t\n \t});\n }\n \n this.always_update = true;\n this.always_draw = true;\n \n this.clear = function(){\n \tthis.owned_objects = [];\n }\n \n this.remove_obstacles = function(){\n \tthis.owned_objects = this.owned_objects.filter(function(obj){\n \t return obj.is_obstacle == undefined;\t\n \t});\n\t\tconsole.log(this.owned_objects);\n \t\n }\n \n this.check_num_enemies = function(){\n \tvar count = 0;\n \tfor(var i = 0; i < this.owned_objects.length; i++){\n \t\tif(this.owned_objects[i].type == \"enemy\"){\n \t\t\tcount++;\n \t\t}\n \t}\n\t\treturn count;\n } \n}", "checkCollision(object){\n // Verifica se houve colisão no eixo X\n if(object.position_x <= this.position_x +variables.unityWidth()*3 && object.position_x >= this.position_x - variables.unityWidth()){\n // Verifica se houve colisão no eixo Y\n if(object.position_y + object.height >= this.position_y &&\n object.position_y <= this.position_y + variables.unityHeight()*3.6){\n this.destroy(object);\n }\n } \n }", "removeBody(){\n\t\tlet length = this.body.length;\n\t\tfor (let i=length; i > 0; i--){\n \tthis.body.x.pop();\n \tthis.body.y.pop();\n\n \tlet snakeBody = document.querySelector('.snake_body');\n \tsnakeBody.parentNode.removeChild(snakeBody); \n \t}\n \tthis.body.length = 0;\n\t}", "function mushroomCollide(){\n var mushcollide = $('.collider').collision('.mushroom');\n if(mushcollide[0]){ \n console.log('boo')\n // $('#container').append('<div class = \"game-over\"></div>')\n $('.bananas').remove();\n // $('.mushroom').remove();\n clearInterval(makingInterval);\n clearInterval(bananaMover);\n clearInterval(mushroomMover);\n }\n }", "collide(obstacles) {\n for (let obstacle of obstacles) {\n // Rectangle enlarged by this.radius for easier calculation of collision.\n const boundingBox = new RectangularObstacle(\n new Vec2D(obstacle.pos.x - this.radius, obstacle.pos.y - this.radius),\n new Vec2D(obstacle.dim.x + 2 * this.radius, obstacle.dim.y + 2 * this.radius)\n );\n\n // Needed for deciding in which direction to reflect.\n const boundingBoxCenter = boundingBox.pos.add(boundingBox.dim.divide(2));\n const ratio = boundingBox.dim.x / boundingBox.dim.y;\n const vecToCenter = this.pos.subtract(boundingBoxCenter);\n\n if (boundingBox.hasInside(this.pos)) {\n if (Math.abs(vecToCenter.x) > ratio * Math.abs(vecToCenter.y)) {\n this.vel.x *= -1;\n } else {\n this.vel.y *= -1;\n }\n while (boundingBox.hasInside(this.pos)) {\n this.pos = this.pos.add(this.vel);\n }\n }\n }\n }", "function updateGameArea() {\n \n //this rect gives us the bounds of the game area canvas, and we\n //can see how big it is with rect.width, rect.height respectively\n var rect = myGameArea.canvas.getBoundingClientRect();\n preventOutOfBounds(rect)\n chasePlayer()\n \n if (myGamePiece.crashWith(myObstacle)) {\n myGameArea.stop()\n document.getElementById(\"notifications\").textContent =\n alert(\"Collision!!!\")\n } else {\n myGameArea.clear()\n myGamePiece.newPos()\n myGamePiece.update()\n myObstacle.newPos()\n myObstacle.update()\n \n if (myGamePiece.crashWith(myObstacle)) {\n \n // fadeOut(lives)\n // lives--\n // myGameArea.stop()\n /* document.getElementById(\"notifications\").textContent = \"Collision!!!\"*/\n // alert(\"collision!!\");\n \n } else {\n myGameArea.clear()\n myGamePiece.newPos()\n myGamePiece.update()\n myObstacle.newPos()\n myObstacle.update()\n }\n \n \n }\n \n }", "function OnBecameInvisible() {\n // Destroy the bullet \n Destroy(gameObject);\n}", "function ismdead(){\n if(mdead === true){\n Gate1.parentNode.removeChild(Gate1);\n Gate2.parentNode.removeChild(Gate2);\n minotaur.parentNode.removeChild(minotaur); \n }\n requestAnimationFrame(ismdead);\n}" ]
[ "0.7106927", "0.70738465", "0.6981923", "0.69375134", "0.6893872", "0.68643934", "0.68277365", "0.68128926", "0.67983896", "0.6796574", "0.6729785", "0.6705601", "0.66639745", "0.6629364", "0.6625992", "0.6619795", "0.65761125", "0.65520173", "0.6551509", "0.6465414", "0.6465057", "0.6463206", "0.6442864", "0.63953185", "0.6393303", "0.6379593", "0.63736135", "0.63589895", "0.63538635", "0.63439554", "0.6340305", "0.63370526", "0.63171196", "0.6286568", "0.62658083", "0.6235001", "0.6234885", "0.6223149", "0.62149966", "0.61628103", "0.6156725", "0.61537075", "0.6139934", "0.6118241", "0.6116009", "0.6111712", "0.60935795", "0.6089169", "0.60885686", "0.6085613", "0.6084703", "0.6069778", "0.6065886", "0.60422844", "0.6041309", "0.60295624", "0.6026686", "0.60241324", "0.59772265", "0.59550405", "0.5947385", "0.59436214", "0.5942879", "0.5940721", "0.59336644", "0.59272105", "0.59180045", "0.59126836", "0.59107006", "0.5908579", "0.5891499", "0.58877945", "0.5883608", "0.5881834", "0.5881722", "0.58686423", "0.5868412", "0.5863762", "0.5860617", "0.58535314", "0.5853426", "0.5851929", "0.58460975", "0.58347136", "0.58342874", "0.5833134", "0.58292246", "0.58285", "0.5828316", "0.58262014", "0.5825834", "0.5818133", "0.58109105", "0.5808819", "0.58036363", "0.5803554", "0.58026737", "0.57963777", "0.5791076", "0.57901776" ]
0.6375352
26
implement with reference to
function levenshtein(fst, snd, { logDPMatrix } = {}) { const dp = zeros([fst.length + 1, snd.length + 1]) for (let i = 0; i <= fst.length; i++) { dp[i][0] = i } for (let j = 0; j <= snd.length; j++) { dp[0][j] = j } for (let i = 1; i <= fst.length; i++) { for (let j = 1; j <= snd.length; j++) { if (fst[i - 1] === snd[j - 1]) { dp[i][j] = dp[i - 1][j - 1] } else { dp[i][j] = Math.min( dp[i - 1][j - 1], // substitute dp[i][j - 1], // insert dp[i - 1][j] // delete ) + 1 } } } if (logDPMatrix) { logDPMatrix(dp) } return dp[fst.length][snd.length] }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Sref() {\r\n}", "obtain(){}", "static initialize(obj, ref) { \n obj['ref'] = ref;\n }", "__previnit(){}", "private public function m246() {}", "get reference () {\r\n\t\treturn this._reference;\r\n\t}", "constructor(address_of_reference) {\n this.address_of_reference = address_of_reference;\n }", "transient protected internal function m189() {}", "get reference() {\n\t\treturn this.__reference;\n\t}", "get reference () {\n\t\treturn this._reference;\n\t}", "get reference () {\n\t\treturn this._reference;\n\t}", "transient private internal function m185() {}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n }", "transient private protected internal function m182() {}", "function DragRefInternal() {}", "function DragRefInternal() {}", "function ref() {\n refresh(true);\n }", "function Fay$$writeRef(ref,x){\n ref.value = x;\n}", "transient final protected internal function m174() {}", "function w(){this.a={}}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "ref(x, y) {\n return this.attr('refX', x).attr('refY', y);\n }", "private internal function m248() {}", "function DropListRefInternal() {}", "function DropListRefInternal() {}", "transform(ref, op) {\n var {\n current,\n affinity\n } = ref;\n\n if (current == null) {\n return;\n }\n\n var point = Point.transform(current, op, {\n affinity\n });\n ref.current = point;\n\n if (point == null) {\n ref.unref();\n }\n }", "transform(ref, op) {\n var {\n current,\n affinity\n } = ref;\n\n if (current == null) {\n return;\n }\n\n var point = Point.transform(current, op, {\n affinity\n });\n ref.current = point;\n\n if (point == null) {\n ref.unref();\n }\n }", "ap (_) { \n return this\n }", "function Ci(a){this.o=a}", "encode_ref(ref) {\n if (ref.index < 0) {\n // Special handles are stored with negative reference numbers.\n this.write_tag(7, -ref.index);\n } else {\n // Output reference to previous object.\n this.write_tag(0, ref.index);\n }\n }", "transform(ref, op) {\n var {\n current,\n affinity\n } = ref;\n\n if (current == null) {\n return;\n }\n\n var path = Range.transform(current, op, {\n affinity\n });\n ref.current = path;\n\n if (path == null) {\n ref.unref();\n }\n }", "transform(ref, op) {\n var {\n current,\n affinity\n } = ref;\n\n if (current == null) {\n return;\n }\n\n var path = Range.transform(current, op, {\n affinity\n });\n ref.current = path;\n\n if (path == null) {\n ref.unref();\n }\n }", "function oi(){}", "function ReferenceCounter() {\r\n}", "function g(a2) {\r\n const x = a2.ref(0);\r\n return x;\r\n}", "function forwardRefWithUse(comp) {\n return forwardRef(comp);\n}", "apply () {}", "get objectReferenceValue() {}", "function Fay$$Ref(x){\n this.value = x;\n}", "function createRef(){var refObject={current:null};{Object.seal(refObject);}return refObject;}", "function createRef(){var refObject={current:null};{Object.seal(refObject);}return refObject;}", "function ReferenceAggregateFn (reference) {\n this._ref = reference;\n }", "added(vrobject){}", "function FunctionReference() {\r\n\tthis.ovload = null;\r\n\tthis.before = new Array();\r\n\tthis.after = new Array();\r\n\tthis.alt = new Array();\r\n\tthis.chain = new Array();\r\n}", "function fixupRef(ref) {\n if (jabberwerx.util.isJWObjRef(ref)) {\n //if this reference should not be persisted at all.\n if(ref.shouldBeSavedWithGraph && !ref.shouldBeSavedWithGraph()) {\n return undefined;\n }\n //JW objects without classnames should not be persisted\n if (!ref._className) {\n return undefined;\n }\n //if this ref should be serialized, add to registry and replace w/ guid\n if (!ref.shouldBeSerializedInline || !ref.shouldBeSerializedInline()) {\n if (registry[ref._guid] === undefined) {\n registry[ref._guid] = ref;\n ref.willBeSerialized && ref.willBeSerialized();\n fixupTree(ref);//returning string, stopping recursion. recurse now\n }\n return ref._guid;\n } else {\n ref.willBeSerialized && ref.willBeSerialized();\n return ref; //will be recursed\n }\n }\n //replace invocations with an easily json-ed object.\n if (jabberwerx.util.isJWInvocation(ref)) {\n return {object: ref.object._guid, methodName: ref.methodName, _jwinvocation_: true};\n }\n return ref; //all other types\n }", "constructor(ref, afs) {\n this.ref = ref;\n this.afs = afs;\n }", "getReference() {\n mustInherit();\n }", "function ea(){}", "function or(){this.__data__=new Ut}", "function fe(a){this.ra=a}", "function M(){this.a={}}", "protected internal function m252() {}", "get valueReference () {\r\n\t\treturn this.__valueReference;\r\n\t}", "function example4() {\n\n var me = {\n name: \"Vlad\",\n surname: \"Argentum\"\n };\n\n function hi(_ref) {\n var _ref$name = _ref.name;\n var name = _ref$name === undefined ? \"Guest\" : _ref$name;\n var _ref$surname = _ref.surname;\n var s = _ref$surname === undefined ? \"Anon\" : _ref$surname;\n\n console.log(\"Hi, \" + name + \" \" + s);\n }\n\n hi({}); //Guest Anon\n hi(me); //Vlad Argentum\n\n //even can call without params\n function hi() {\n var _ref2 = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n var _ref2$name = _ref2.name;\n var name = _ref2$name === undefined ? \"No\" : _ref2$name;\n var _ref2$surname = _ref2.surname;\n var s = _ref2$surname === undefined ? \"Params\" : _ref2$surname;\n\n console.log(\"Hi, \" + name + \" \" + s);\n }\n hi(); //No Params\n}", "set referenceObject(obj) {\n this._referenceObject = obj;\n }", "function _____SHARED_functions_____(){}", "Use(){\n throw new Error(\"Use() method must be implemented in child!\");\n }", "storeRefs(ref) {\n this.el = ref;\n this.props.setRef(ref);\n }", "function Fay$$readRef(ref,x){\n return ref.value;\n}", "function getReference(){\n\t\treturn this.reference;\n\t}", "function setReference(val, value)\r\n{\r\n val[0] = value;\r\n}", "function oi(a){this.Of=a;this.rg=\"\"}", "render(){\n return (<div ref={el => (this.el = el)} />);\n }", "function mix(self, ref, expanded) {\n\tswitch (typeof(ref)) {\n\t\tcase 'undefined': return self;\n\t\tcase 'function': return expanded ? ref : undefined;\n\t\tcase 'object':\n\t\t\tif (isValueObject(ref)) return (ref !== null) ? ref.valueOf() : null;\n\t\t\tif (expanded && ((ref instanceof Promise) || (self instanceof Promise))) return ref;\n\t\t\tif (typeof(self) != 'object' || isValueObject(self)) self = {};\n\t\t\tObject.keys(ref).forEach(function(key) {\n\t\t\t\tself[key] = mix(self[key], ref[key], expanded)\n\t\t\t})\n\t\t\treturn self\n\t}\n\treturn ref;\n}", "transient private protected public internal function m181() {}", "reflection(ref) {\n return Point.create(ref).move(this, this.distance(ref));\n }", "refHandler(domElement) {\n this.heading = domElement;\n }", "function z(){r.call(this)}", "updateReferences(q = {}){\n super.updateReferences(q);\n \n // check math expression refs\n Object.values(this.assignments)\n .forEach((mathExpr) => mathExpr.updateReferences(q));\n }", "function attachRefs(){ReactRef.attachRefs(this,this._currentElement);}", "function attachRefs(){ReactRef.attachRefs(this,this._currentElement);}", "function attachRefs(){ReactRef.attachRefs(this,this._currentElement);}", "function attachRefs(){ReactRef.attachRefs(this,this._currentElement);}", "function attachRefs(){ReactRef.attachRefs(this,this._currentElement);}", "render() {\n return (\n <div ref={this.refCallback}> </div> \n );\n }", "function composeRef() {\n for (\n var _len = arguments.length, refs = new Array(_len), _key = 0;\n _key < _len;\n _key++\n ) {\n refs[_key] = arguments[_key];\n }\n\n return function(node) {\n refs.forEach(function(ref) {\n fillRef(ref, node);\n });\n };\n }", "transient final private internal function m170() {}", "function self($this) {\n\treturn $this;\n}", "function K(){this.a={}}", "function kI(){this.aa={}}", "function obj() { return this; }", "function assignRef(ref, value) {\n if (ref == null) return;\n\n if (isFunction(ref)) {\n ref(value);\n } else {\n try {\n ref.current = value;\n } catch (error) {\n throw new Error(\"Cannot assign value \\\"\" + value + \"\\\" to ref \\\"\" + ref + \"\\\"\");\n }\n }\n}", "set objectReferenceValue(value) {}", "function nd(a){this.la={};this.o=a}" ]
[ "0.64171064", "0.62759817", "0.61395156", "0.601989", "0.5964374", "0.594174", "0.59136206", "0.5910013", "0.5856616", "0.5842973", "0.5842973", "0.5770093", "0.5732735", "0.56527615", "0.5641524", "0.5641524", "0.5605609", "0.5601305", "0.55937845", "0.5554333", "0.5544299", "0.5544299", "0.5544299", "0.5544299", "0.5544299", "0.5544299", "0.5544299", "0.5544299", "0.5544299", "0.5544299", "0.5544299", "0.5544299", "0.5544299", "0.5544299", "0.5544299", "0.5544299", "0.5544299", "0.5544299", "0.5541945", "0.5537853", "0.5529173", "0.5529173", "0.5526278", "0.5526278", "0.5513982", "0.54997593", "0.5476245", "0.5450456", "0.5450456", "0.54259527", "0.54170966", "0.54067355", "0.54025763", "0.53987837", "0.5392814", "0.5392063", "0.538221", "0.538221", "0.5368026", "0.5365365", "0.5353457", "0.5349556", "0.53313386", "0.5322028", "0.53073204", "0.5299651", "0.5297621", "0.5286903", "0.52838194", "0.528041", "0.5263976", "0.5260984", "0.52471715", "0.5237753", "0.5235936", "0.5232532", "0.5232408", "0.5230552", "0.5230053", "0.5227825", "0.52223015", "0.5220871", "0.5213933", "0.521139", "0.5208121", "0.51976085", "0.5196706", "0.5196706", "0.5196706", "0.5196706", "0.5196706", "0.51958436", "0.5195446", "0.5195434", "0.5182563", "0.5173782", "0.51686573", "0.51650727", "0.51586986", "0.5152556", "0.5144432" ]
0.0
-1
implement with reference to
function shortestEditScript(fst, snd, { logDPMatrix, logSES } = {}) { const dp = _lcsDp(fst, snd) if (logDPMatrix) { logDPMatrix(dp) } const ses = _getSES(dp, fst, snd) if (logSES) { logSES(ses) } return ses }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Sref() {\r\n}", "obtain(){}", "static initialize(obj, ref) { \n obj['ref'] = ref;\n }", "__previnit(){}", "private public function m246() {}", "get reference () {\r\n\t\treturn this._reference;\r\n\t}", "constructor(address_of_reference) {\n this.address_of_reference = address_of_reference;\n }", "transient protected internal function m189() {}", "get reference() {\n\t\treturn this.__reference;\n\t}", "get reference () {\n\t\treturn this._reference;\n\t}", "get reference () {\n\t\treturn this._reference;\n\t}", "transient private internal function m185() {}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n }", "transient private protected internal function m182() {}", "function DragRefInternal() {}", "function DragRefInternal() {}", "function ref() {\n refresh(true);\n }", "function Fay$$writeRef(ref,x){\n ref.value = x;\n}", "transient final protected internal function m174() {}", "function w(){this.a={}}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "ref(x, y) {\n return this.attr('refX', x).attr('refY', y);\n }", "private internal function m248() {}", "function DropListRefInternal() {}", "function DropListRefInternal() {}", "transform(ref, op) {\n var {\n current,\n affinity\n } = ref;\n\n if (current == null) {\n return;\n }\n\n var point = Point.transform(current, op, {\n affinity\n });\n ref.current = point;\n\n if (point == null) {\n ref.unref();\n }\n }", "transform(ref, op) {\n var {\n current,\n affinity\n } = ref;\n\n if (current == null) {\n return;\n }\n\n var point = Point.transform(current, op, {\n affinity\n });\n ref.current = point;\n\n if (point == null) {\n ref.unref();\n }\n }", "ap (_) { \n return this\n }", "function Ci(a){this.o=a}", "encode_ref(ref) {\n if (ref.index < 0) {\n // Special handles are stored with negative reference numbers.\n this.write_tag(7, -ref.index);\n } else {\n // Output reference to previous object.\n this.write_tag(0, ref.index);\n }\n }", "transform(ref, op) {\n var {\n current,\n affinity\n } = ref;\n\n if (current == null) {\n return;\n }\n\n var path = Range.transform(current, op, {\n affinity\n });\n ref.current = path;\n\n if (path == null) {\n ref.unref();\n }\n }", "transform(ref, op) {\n var {\n current,\n affinity\n } = ref;\n\n if (current == null) {\n return;\n }\n\n var path = Range.transform(current, op, {\n affinity\n });\n ref.current = path;\n\n if (path == null) {\n ref.unref();\n }\n }", "function oi(){}", "function ReferenceCounter() {\r\n}", "function g(a2) {\r\n const x = a2.ref(0);\r\n return x;\r\n}", "function forwardRefWithUse(comp) {\n return forwardRef(comp);\n}", "apply () {}", "get objectReferenceValue() {}", "function Fay$$Ref(x){\n this.value = x;\n}", "function createRef(){var refObject={current:null};{Object.seal(refObject);}return refObject;}", "function createRef(){var refObject={current:null};{Object.seal(refObject);}return refObject;}", "function ReferenceAggregateFn (reference) {\n this._ref = reference;\n }", "added(vrobject){}", "function FunctionReference() {\r\n\tthis.ovload = null;\r\n\tthis.before = new Array();\r\n\tthis.after = new Array();\r\n\tthis.alt = new Array();\r\n\tthis.chain = new Array();\r\n}", "function fixupRef(ref) {\n if (jabberwerx.util.isJWObjRef(ref)) {\n //if this reference should not be persisted at all.\n if(ref.shouldBeSavedWithGraph && !ref.shouldBeSavedWithGraph()) {\n return undefined;\n }\n //JW objects without classnames should not be persisted\n if (!ref._className) {\n return undefined;\n }\n //if this ref should be serialized, add to registry and replace w/ guid\n if (!ref.shouldBeSerializedInline || !ref.shouldBeSerializedInline()) {\n if (registry[ref._guid] === undefined) {\n registry[ref._guid] = ref;\n ref.willBeSerialized && ref.willBeSerialized();\n fixupTree(ref);//returning string, stopping recursion. recurse now\n }\n return ref._guid;\n } else {\n ref.willBeSerialized && ref.willBeSerialized();\n return ref; //will be recursed\n }\n }\n //replace invocations with an easily json-ed object.\n if (jabberwerx.util.isJWInvocation(ref)) {\n return {object: ref.object._guid, methodName: ref.methodName, _jwinvocation_: true};\n }\n return ref; //all other types\n }", "constructor(ref, afs) {\n this.ref = ref;\n this.afs = afs;\n }", "getReference() {\n mustInherit();\n }", "function ea(){}", "function or(){this.__data__=new Ut}", "function fe(a){this.ra=a}", "function M(){this.a={}}", "protected internal function m252() {}", "get valueReference () {\r\n\t\treturn this.__valueReference;\r\n\t}", "function example4() {\n\n var me = {\n name: \"Vlad\",\n surname: \"Argentum\"\n };\n\n function hi(_ref) {\n var _ref$name = _ref.name;\n var name = _ref$name === undefined ? \"Guest\" : _ref$name;\n var _ref$surname = _ref.surname;\n var s = _ref$surname === undefined ? \"Anon\" : _ref$surname;\n\n console.log(\"Hi, \" + name + \" \" + s);\n }\n\n hi({}); //Guest Anon\n hi(me); //Vlad Argentum\n\n //even can call without params\n function hi() {\n var _ref2 = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n var _ref2$name = _ref2.name;\n var name = _ref2$name === undefined ? \"No\" : _ref2$name;\n var _ref2$surname = _ref2.surname;\n var s = _ref2$surname === undefined ? \"Params\" : _ref2$surname;\n\n console.log(\"Hi, \" + name + \" \" + s);\n }\n hi(); //No Params\n}", "set referenceObject(obj) {\n this._referenceObject = obj;\n }", "function _____SHARED_functions_____(){}", "Use(){\n throw new Error(\"Use() method must be implemented in child!\");\n }", "storeRefs(ref) {\n this.el = ref;\n this.props.setRef(ref);\n }", "function Fay$$readRef(ref,x){\n return ref.value;\n}", "function getReference(){\n\t\treturn this.reference;\n\t}", "function setReference(val, value)\r\n{\r\n val[0] = value;\r\n}", "function oi(a){this.Of=a;this.rg=\"\"}", "render(){\n return (<div ref={el => (this.el = el)} />);\n }", "function mix(self, ref, expanded) {\n\tswitch (typeof(ref)) {\n\t\tcase 'undefined': return self;\n\t\tcase 'function': return expanded ? ref : undefined;\n\t\tcase 'object':\n\t\t\tif (isValueObject(ref)) return (ref !== null) ? ref.valueOf() : null;\n\t\t\tif (expanded && ((ref instanceof Promise) || (self instanceof Promise))) return ref;\n\t\t\tif (typeof(self) != 'object' || isValueObject(self)) self = {};\n\t\t\tObject.keys(ref).forEach(function(key) {\n\t\t\t\tself[key] = mix(self[key], ref[key], expanded)\n\t\t\t})\n\t\t\treturn self\n\t}\n\treturn ref;\n}", "transient private protected public internal function m181() {}", "reflection(ref) {\n return Point.create(ref).move(this, this.distance(ref));\n }", "refHandler(domElement) {\n this.heading = domElement;\n }", "function z(){r.call(this)}", "updateReferences(q = {}){\n super.updateReferences(q);\n \n // check math expression refs\n Object.values(this.assignments)\n .forEach((mathExpr) => mathExpr.updateReferences(q));\n }", "function attachRefs(){ReactRef.attachRefs(this,this._currentElement);}", "function attachRefs(){ReactRef.attachRefs(this,this._currentElement);}", "function attachRefs(){ReactRef.attachRefs(this,this._currentElement);}", "function attachRefs(){ReactRef.attachRefs(this,this._currentElement);}", "function attachRefs(){ReactRef.attachRefs(this,this._currentElement);}", "render() {\n return (\n <div ref={this.refCallback}> </div> \n );\n }", "function composeRef() {\n for (\n var _len = arguments.length, refs = new Array(_len), _key = 0;\n _key < _len;\n _key++\n ) {\n refs[_key] = arguments[_key];\n }\n\n return function(node) {\n refs.forEach(function(ref) {\n fillRef(ref, node);\n });\n };\n }", "transient final private internal function m170() {}", "function self($this) {\n\treturn $this;\n}", "function K(){this.a={}}", "function kI(){this.aa={}}", "function obj() { return this; }", "function assignRef(ref, value) {\n if (ref == null) return;\n\n if (isFunction(ref)) {\n ref(value);\n } else {\n try {\n ref.current = value;\n } catch (error) {\n throw new Error(\"Cannot assign value \\\"\" + value + \"\\\" to ref \\\"\" + ref + \"\\\"\");\n }\n }\n}", "set objectReferenceValue(value) {}", "function nd(a){this.la={};this.o=a}" ]
[ "0.64171064", "0.62759817", "0.61395156", "0.601989", "0.5964374", "0.594174", "0.59136206", "0.5910013", "0.5856616", "0.5842973", "0.5842973", "0.5770093", "0.5732735", "0.56527615", "0.5641524", "0.5641524", "0.5605609", "0.5601305", "0.55937845", "0.5554333", "0.5544299", "0.5544299", "0.5544299", "0.5544299", "0.5544299", "0.5544299", "0.5544299", "0.5544299", "0.5544299", "0.5544299", "0.5544299", "0.5544299", "0.5544299", "0.5544299", "0.5544299", "0.5544299", "0.5544299", "0.5544299", "0.5541945", "0.5537853", "0.5529173", "0.5529173", "0.5526278", "0.5526278", "0.5513982", "0.54997593", "0.5476245", "0.5450456", "0.5450456", "0.54259527", "0.54170966", "0.54067355", "0.54025763", "0.53987837", "0.5392814", "0.5392063", "0.538221", "0.538221", "0.5368026", "0.5365365", "0.5353457", "0.5349556", "0.53313386", "0.5322028", "0.53073204", "0.5299651", "0.5297621", "0.5286903", "0.52838194", "0.528041", "0.5263976", "0.5260984", "0.52471715", "0.5237753", "0.5235936", "0.5232532", "0.5232408", "0.5230552", "0.5230053", "0.5227825", "0.52223015", "0.5220871", "0.5213933", "0.521139", "0.5208121", "0.51976085", "0.5196706", "0.5196706", "0.5196706", "0.5196706", "0.5196706", "0.51958436", "0.5195446", "0.5195434", "0.5182563", "0.5173782", "0.51686573", "0.51650727", "0.51586986", "0.5152556", "0.5144432" ]
0.0
-1
The function should find the first pair, where the sum is 0. Return an array that includes both values that sum to zero or undefined if a pair does not exist.
function sumZero(arr) { // initialize variables for left and right let left = 0; let right = arr.length - 1; // loop over array while (right > left) { let sum = arr[left] + arr[right]; // check if sum is 0 if (sum === 0) { // return pair return [arr[left], arr[right]]; } // if sum is greater than 0, increase the right by 1 if (sum > 0) { right--; } // else increase the left by 1 else { left++; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sumZero(arr){\n // we are itterating the array\n for(var i=0; i<arr.length;i++){\n for(var j=i+1; j<arr.length; j++){\n // here we checking a pair of numbers the resultant sum should be zero\n if(arr[i] + arr[j] === 0){\n // if the condition is satisfied, we return a pair of array\n return [arr[i], arr[j]]\n }\n }\n }\n}", "function sumZero(arr){\n for(let i=0; i<arr.length; j++){ //basic loop thru entire array\n for(let j=i+1; j<arr.length; j++){//basic loop thru entire array starting one ahead\n if(arr[i]+ arr[j]===0){// if the sum is 0\n return [arr[i], arr[j]]\n }\n }\n }\n}", "function sumZero(arr) {\n for (let i = 0; i < arr.length; i++) {\n for (let j = i + 1; j < arr.length; j++) {\n let sum = arr[i] + arr[j];\n if (sum === 0 ) {\n return [arr[i], arr[j]]\n }\n }\n }\n}", "function sumZero(arr){\n for (let i = 0; i < arr.length; i++){\n for (let j = i + 1; j < arr.length; j++){\n if(arr[i] + arr[j] === 0){\n return [arr[i], arr[j]];\n }\n }\n }\n}", "function sumZero(arr) {\n for (let i = 0; i < arr.length; i++){\n for (let j = i + 1; j < arr.length; j++){\n if (arr[i] + arr[j] === 0){\n return [arr[i], arr[j]];\n }\n }\n }\n}", "function sumZero(arr) {\n\tfor (let i = 0; i < arr.length; i++) {\n\t\tfor (let j = 0; j < arr.length; j++) {\n\t\t\tif(arr[i] + arr[j] === 0) {\n\t\t\t\treturn [arr[i], arr[j]];\n\t\t\t}\n\t\t}\n\t}\n}", "function sumZero(arr) {\n for (let i = 0; i < arr.length; i++) {\n for (let j = i + 1; j < arr.length; j++) {\n if (arr[i] + arr[j] === 0) {\n return [arr[i], arr[j]];\n }\n }\n }\n}", "function sumZero(arr) {\n for (let i = 0; i < arr.length; i++) {\n for (let j = i + 1; j < arr.length; j++) {\n if (arr[i] + arr[j] === 0) {\n return [arr[i], arr[j]];\n }\n }\n }\n}", "function sumZero(arr){\n for (let i = 0; i < arr.length; i++) {\n for (let j = i+1; j < arr.length; j++) {\n if(arr[i] + arr[j] === 0){\n return [arr[i], arr[j]]; \n }\n }\n }\n}", "function sumZero(arr) {\n for(let i = 0; i < arr.length; i++) {\n for(let j = i+1; j < arr.length; j++) {\n if(arr[i] + arr[j] === 0) {\n return [arr[i], arr[j]]\n }\n }\n }\n}", "function sumZero(arr){\n for(let i = 0; i < arr.lenght; i++){\n for(let j = 0; j < arr.lenght; j++){\n if(arr[i] + arr[j] === 0){\n return [arr[i], arr[j]];\n }\n }\n }\n}", "function sumZero(arr) {\n // do something\n for (let i = 0; i < arr.length; i++) {\n for (let j = i + 1; j < arr.length; j++) {\n if (arr[i] + arr[j] === 0) {\n return [arr[i], arr[j]]\n }\n }\n }\n}", "function sumZero(arr) {\n for (let i = 0; i < arr.length; i++) {\n const leftNum = Math.abs(arr[i]);\n const rightNum = Math.abs(arr[arr.length - 1 - i]);\n\n if (leftNum - rightNum === 0) {\n const arrPair = [leftNum, rightNum];\n return arrPair\n }\n }\n}", "function sumZero (arr) {\n for (let i = 0; i < arr.length; i++) {\n for (let j = 0; j < arr[i].length; j++) {\n if (arr[i] + arr[j] === 0) {\n return [arr[i], arr[j]];\n }\n }\n }\n}", "function sumToZero1(arr) {\n // loop the array with the first index is the starting point\n for (let i = 0; i < arr.length; i++) {\n // create a nested loop with the second index is the starting point\n for (let j = i+1; j < arr.length; j++) {\n // check if the sum of the current outer value (first) and the current inner value (second) is 0, if so return the outer and inner value\n if (arr[i] + arr[j] === 0) {\n return [arr[i], arr[j]];\n }\n }\n }\n}", "function sumZero(arr){\n for (let i = 0; i < arr.length; i++){\n for (let j = i + 1; j < arr.length; j++){\n if(arr[i] + arr[j] === 0){\n return [arr[i], arr[j]];\n }\n console.log(arr[i]);\n console.log(arr[j]);\n }\n }\n}", "function sumZeroNaive(arr) {\n for (let i = 0; i < arr.length; i++) {\n for (let j = i + 1; j < arr.length; j++) {\n if (arr[i] + arr[j] === 0) {\n return [arr[1], arr[j]];\n }\n }\n }\n}", "function sumZero(array) {\n let first = 0;\n let last = array.length - 1;\n\n while (last > first) {\n if (array[first] + array[last] === 0) {\n return [array[first], array[last]];\n } else if (array[first] + array[last] > 0) {\n last--;\n } else {\n first++;\n }\n }\n return undefined;\n}", "function sumZeroPar(arr) {\n\tlet left = 0;\n\tlet right = arr.length - 1;\n\t// Iterate trough the sorted array from the left\n\t// If sum = arr[left] + arr[right] === 0 -> return pair\n\t// If sum > 0 , right--\n\twhile (left < right) {\n\t\tlet sum = arr[left] + arr[right];\n\n\t\tif (sum === 0) {\n\t\t\treturn [arr[left], arr[right]];\n\t\t}\n\n\t\t// the number is below if there is one\n\t\tif (sum > 0) {\n\t\t\tright--;\n\t\t}\n\t\t// the number on right is less so there isnt match for the left one\n\t\tif (sum < 0) {\n\t\t\tleft++;\n\t\t}\n\t}\n}", "function naiveSumZero(arr){ // O(n^2)\r\n for(let i = 0; i < arr.length; i++){ // O(n)\r\n for(let j = i + 1; j < arr.length; j++){ // nested O(n)\r\n if(arr[i] + arr[j] === 0){\r\n return [arr[i], arr[j]];\r\n }\r\n }\r\n }\r\n}", "function sumZero2(arr) {\n let i = 0;\n let j = arr.length - 1;\n\n while (i < j) {\n let result = arr[i] + arr[j];\n\n if (result === 0) return [arr[i], arr[j]];\n\n if (result > 0) {\n j = j - 1;\n } else {\n i = i + 1;\n }\n }\n}", "function sumZero(arr){\n let i = 0\n let j = arr.length - 1\n while (i < j){ // it has to be < instead of <= to exclude the possibility of 0 + 0 = 0 it would return an array of 1 int\n if (arr[i] + arr[j] === 0)\n return [arr[i], arr[j]]\n else if (arr[i] < arr[j])\n j--\n else\n i++\n }\n}", "function sumCloseToZero(arr) {\n let element = [];\n let sum = arr[0] + arr[1];\n for (let i = 0; i < arr.length; i++) {\n for (let j = i + 1; j < arr.length; j++) {\n if (arr[i] + arr[j] === 0) {\n element[0] = arr[i];\n element[1] = arr[j];\n return element;\n } else if (abs(sum) > abs(arr[i] + arr[j])) {\n sum = arr[i] + arr[j];\n element[0] = arr[i];\n element[1] = arr[j];\n }\n }\n }\n return element;\n}", "function pairSum(arr, sum){\n for (let i = 0; i < arr.length - 1; i++){\n for (let j = i + 1; j < arr.length; j++) {\n if (arr[i] + arr[j] === sum) {\n return [arr[i], arr[j]];\n }\n }\n }\n return \"No valid pair exists\";\n}", "function findPair(array,sum){\n let first = 0; //value at zero Index\n let last = array.length-1;\n\n while(first <= last){\n\n if(array[first] + array[last] == sum){\n return [array[first],array[last]]\n }\n\n if(array[first] + array[last] < sum){\n\n first++;\n\n }\n\n if(array[first] + array[last] > sum){\n last--;\n }\n\n }\n\n return -1;\n\n}", "function sumZero2(arr) {\n let left = 0\n let right = arr.length - 1\n while (left < right) {\n let sum = arr[left] + arr[right]\n if (sum === 0) {\n return [arr[left], arr[right]]\n } else if (sum > 0) {\n right--\n } else {\n left++\n }\n }\n}", "function sumZero(arr) {\n if(arr.length > 1) {\n var left = 0;\n var right = arr.length - 1;\n while(left < right) {\n var sum = arr[left] + arr[right];\n if(sum === 0) return [arr[left], arr[right]];\n else if(sum > 0) right--;\n else left++;\n }\n }\n}", "function sumPair(array) {\n let left = 0;\n let right = array.length - 1;\n\n while (left < right) {\n sum = array[left] + array[right];\n if (sum === 0) {\n return [array[left], array[right]];\n } else if (sum > 0) {\n right--;\n } else {\n left++;\n } //if sum < 0\n }\n}", "function sumZero(arr) {\n let pointerLeft = 0;\n let pointerRight = arr.length - 1;\n\n for (var i = 0; i < arr.length; i++) {\n const sum = arr[pointerLeft] + arr[pointerRight];\n if (pointerLeft < pointerRight) {\n if (!sum) {\n return [arr[pointerLeft], arr[pointerRight]];\n } else if (sum > 0) {\n pointerRight--;\n } else {\n pointerLeft++;\n }\n }\n }\n}", "function sumZero(arr){\n let left = 0\n let right = arr.length - 1\n\n // can't overlap because if we have 0 in the array it would be a false positive\n while (left < right) {\n let sum = arr[left] + arr[right]\n if (sum === 0) {\n return [arr[left], arr[right]]\n } else if (sum > 0) {\n right--\n } else {\n left++\n }\n }\n}", "function sumZero(arr) {\n let left = 0\n let right = arr.length - 1\n while(left < right) {\n let sum = arr[left] + arr[right]\n if(sum === 0) {\n return [arr[left], arr[right]]\n } else if(sum > 0) {\n right--\n } else {\n left++\n }\n }\n}", "function sumZero(arr) {\n let left = 0;\n let right = arr.length - 1;\n\n while (left < right) {\n if (arr[left] + arr[right] === 0) {\n return [arr[left], arr[right]];\n } else if (arr[left] + arr[right] > 0) {\n right--;\n } else {\n left++;\n }\n }\n}", "function sumZero(arr){\n\n //We define position of variables\n let left = 0;\n let right = arr.length -1;\n while(left<right){\n //We are declaring the sum of two arrays\n let sum = arr[left] + arr[right];\n //if the sum is equal to zero then we return a pair of values\n if(sum===0){\n return [arr[left], arr[right]];\n }\n //if sum is greater than zero, then the array of pointers from right side will reduce by 1\n else if (sum>0){\n right--;\n }\n else{\n //if the above condition fails, here it array of pointers from left side will increament\n left++;\n }\n }\n}", "function sumZero(arr) {\n let left = 0;\n let right = arr.length - 1;\n while (left < right) {\n let sum = arr[left] + arr[right];\n if (sum === 0) return [arr[left], arr[right]];\n else if (sum > 0) right--;\n else left++;\n }\n}", "function sumZero(arr) {\n console.log(\">>\")\n if (!(arr.some(v => v < 0) || arr.some(v => v > 0))) return undefined\n\n let l = 0;\n let r = arr.length - 1;\n let results;\n\n while(!!Math.sign(arr[l])) {\n if (arr[r] + arr[l] === 0) results = [arr[r], arr[l]]\n \n if (arr[r - 1] < 0) {\n r = arr.length - 1\n l = l + 1\n } else {\n r--;\n }\n }\n\n return results;\n }", "function sumZero(arr) {\n if (arr.length < 2) {\n return [];\n }\n\n let left = 0;\n let right = arr.length - 1;\n\n while (left < right) {\n let sum = arr[left] + arr[right];\n if (sum === 0) {\n return [arr[left], arr[right]];\n }\n\n if (sum > 0) {\n right--;\n }\n\n if (sum < 0) {\n left++;\n }\n }\n\n return [];\n}", "function sumZero(arr) {\n let left = 0;\n let right = arr.length - 1;\n while (left < right) {\n let sum = arr[left] + arr[right];\n if (sum === 0) {\n return [arr[left], arr[right]];\n } else if (sum > 0) {\n right--;\n } else {\n left++;\n }\n }\n}", "function sumZero(arr) {\n let left = 0,\n right = arr.length - 1;\n \n while(left < right){\n let sum = arr[left] + arr[right];\n if (sum === 0) {\n return [arr[left], arr[right]];\n } else if (sum > 0) {\n right--;\n } else {\n left++;\n }\n }\n}", "function sumZero(arr) {\n if(!arr || !arr.length) return 'please provide a sorted array '\n let left = 0;\n let right = arr.length - 1;\n while(left < right) {\n let sum = arr[left] + arr[right];\n if(sum === 0) {\n return [arr[left], arr[right]];\n } else if(sum > 0) {\n right --;\n } else {\n left ++;\n }\n }\n}", "function sumZero(arr) {\n // define the pointers:\n let left = 0; let right = arr.length-1; \n let valuesThatSum = []; \n \n // set up the while loop, which runs until left and right pointer meet:\n while(left < right) {\n let sum = arr[left] + arr[right]; // on each iteratation, check current pointer value totals.\n \n // check if the current indexes sum up to 0, return if it is.\n if(sum===0) {\n return [arr[left], arr[right]]; \n // If they add to more than 0, our right pointer value is too high, move it down an index:\n } else if(sum > 0) {\n right--; \n // If they add up to a negative number, our right pointer value is too high, move the pointer up an index:\n } else {\n left++; \n }\n }\n }", "function sumOfZero(arr){\n let left = 0; \n let right = arr.length - 1;\n\n while(left < right){\n let sum = arr[left] + arr[right];\n if(sum === 0){\n return [arr[left], arr[right]];\n }else if(sum < 0){\n left++;\n }else{\n right--;\n }\n }\n}", "function sumZero(arr) {\n let left = 0;\n let right = arr.length - 1;\n\n while (arr[left] < arr[right]) {\n let sum = arr[left] + arr[right];\n if (sum === 0) {\n return [arr[left], arr[right]];\n } else if (sum > 0) {\n right--;\n } else {\n left++;\n }\n }\n}", "function sumZero(arr) {\n\n let left = 0;\n let right = arr.length - 1;\n\n while (left < right) {\n let sum = arr[left] + arr[right];\n\n if (sum === 0) {\n return [arr[left], arr[right]];\n } else if (sum < 0) {\n left++;\n } else {\n right--;\n }\n }\n\n}", "function zeroSum(arr) {\n // start with assigning two pointers. One at the beginning of the array and one at the end\n let left = 0;\n let right = arr.length - 1\n // then loop through the array\n while (left < right) {\n // condition is when the left side is smaller than the right side do something...\n let sum = arr[left] + arr[right]\n // if the sum of the left plus the right === 0 return [arr[left], arr[right]]\n if (sum === 0) {\n return [arr[left], arr[right]]\n // else if sum > 0 then right--\n } else if (sum > 0) {\n right--;\n // else left++\n } else {\n left++;\n }\n }\n // return undefined if no numbers add up to 0\n}", "function newSumZero(arr) {\n\t// left = beginning of the array\n\tlet left = 0;\n\t// right = end of array, remember it's zero indexed\n\tlet right = arr.length - 1;\n\t// left < right is our fail safe \n\twhile (left < right) {\n\t\tlet sum = arr[left] + arr[right];\n\t\tif (sum === 0) {\n\t\t\treturn [arr[left], arr[right]];\n\t\t} else if (sum > 0) {\n\t\t\tright--;\n\t\t} else {\n\t\t\tleft++;\n\t\t}\n\t}\t\n}", "function twoSum(array) {\n let returnArray = [];\n\n for (let i = 0; i < (array.length - 1); i++) {\n for (let j = i + 1; j < array.length; j++) {\n if (array[i] + array[j] === 0) {\n returnArray.push([i, j]);\n }\n }\n }\n\n return returnArray;\n}", "function findZeroSumHash(arr) {\n const triplets = [],\n len = arr.length,\n found = new Set(),\n duplicateVals = new Set()\n\n for (let i = 0; i < len; i++) {\n const seen = new Set(),\n first = arr[i]\n if (duplicateVals.has(first)) continue\n\n duplicateVals.add(first)\n for (let j = i + 1; j < len; j++) {\n const second = arr[j],\n third = -first - second\n\n if (seen.has(third)) {\n const min = Math.min(first, second, third),\n max = Math.max(first, second, third),\n stringPair = `${min},${max}`\n\n if (!found.has(stringPair)) {\n found.add(stringPair)\n triplets.push([first, second, third].join(','))\n }\n }\n\n seen.add(second)\n }\n }\n return triplets\n}", "function sumZero(arr) {\n let left = 0;\n let right = arr.length - 1;\n\n // Loop as long as right pointer is greater than left pointer\n while (left < right) {\n let sum = arr[left] + arr[right];\n\n // Increment left pointer if less than 0\n // Decrement right pointer if greater than 0\n if (sum === 0) {\n return [arr[left], arr[right]];\n } else if (sum > 0) {\n right--;\n } else {\n left++;\n }\n }\n}", "function pair_with_target_sum(arr, targetSum) {\n\t// TODO:write code here\n\t// given sorted array, return the indices of the two numbers that sum up to the targetSum\n\t// use two pointers, one starting at index 0 and the other starting from last index\n\t// move left pointer of the sum is < targetSum, move right pointer of sum is > targetSum\n\t// keeping moving until we find targetSum or until the pointers meet\n\n\t//edge cases: if no sum was found, return empty array\n\t//\t\t\t\t\t\tif length if less than 2 return empty array (since we need a pair)\n\n\t//using hashmap, check if the map has the complement, if not continue\n\tlet map = new Map();\n\tfor (let i = 0; i < arr.length; i++) {\n\t\tif (map.has(targetSum - arr[i])) {\n\t\t\treturn [ map.get(targetSum - arr[i]), i ];\n\t\t} else {\n\t\t\tmap.set(arr[i], i);\n\t\t}\n\t}\n\treturn [];\n}", "function findPairForSum(arr, target){\n // Create array for output\n var output = [];\n // Filter out numbers bigger than target sum\n var filteredArray = arr.filter(function(number){\n return number < target;\n });\n // Iterate through the array to find the first number\n for(var i = 0; i < filteredArray.length; i++){\n var firstNumber = filteredArray[i];\n for(var j = 0; j < filteredArray.length; j++){\n // Iterate through the filteredArrayay to find the second number\n if(firstNumber + filteredArray[j] === target){\n var secondNumber = filteredArray[j];\n // Push output to output array\n output.push(firstNumber, secondNumber);\n return output;\n }\n }\n }\n}", "function findPairForSum(arr,numb){\n var final =[];\n for (var i=0; i<arr.length; i++) {\n for (var j=i+1; j<arr.length; j++) {\n if (arr[i]+arr[j] === numb){\n final.push ([arr[i],arr[j]]);\n }\n }\n }\n \n return final;\n}", "function FindTriplet()\n{\n for(let i=0;i<num-2;i++)\n {\n for(let j=i+1;j<num-1;j++)\n {\n for(let k=j+1;k<num;k++)\n {\n if(valueArray[i]+valueArray[j]+valueArray[k]==0)\n {\n //create the temp array and store the value in the array\n let tempArray=new Array();\n tempArray.push(valueArray[i],valueArray[j],valueArray[k])\n //push the stored temp array in the sum array to get separate array\n sumArray.push(tempArray);\n }\n }\n }\n }\n}", "function sum_pairs(array, value) {\n for (let idxOne = 1; idxOne < array.length; idxOne++) {\n for (let idxTwo = 0; idxTwo < idxOne; idxTwo++) {\n if (array[idxOne] + array[idxTwo] === value) {\n return [array[idxTwo], array[idxOne]];\n }\n }\n }\n}", "function twoSum(arr, S){\n var sums=[];\n for (var i=0; i<arr.length; i++){\n for(var j=i+1; j<arr.length; j++){\n if(arr[i]+arr[j]===S){\n sums.push([arr[i],arr[j]]);\n }\n }\n }\n return sums[0];\n\n}", "function findPairForSum(array, number) {\n var arrayColumn = array;\n var arrayLine = array.slice(1);\n\n for (i = 0; i < arrayColumn.length; i++) {\n// a segunda variável tem que ser i + 1 para não repetir soma\n for (v = i + 1; v < arrayLine.length; v++) {\n if (arrayColumn[i] + arrayLine[v] === number) {\n return [arrayColumn[i], arrayLine[v]];\n }\n }\n }\n}", "function sumToZero2(arr) {\n // create variable left to store the first index of array (0)\n let left = 0;\n \n // create variable right to store the last index of array (length -1)\n let right = arr.length - 1;\n\n // create a while loop, with condition as long as the left index is lower than the right index\n while(left < right) {\n // sum the value in left index with the right one\n let sum = arr[left] + arr[right];\n \n // if the sum is zero, return both value\n if (sum === 0) {\n return [arr[left], arr[right]];\n } \n \n // if sum is higher than zero, decrement the right index, to move it to left side\n else if (sum > 0) {\n right--;\n } \n \n // if sum is lower than zero, increment the left to move the index to the right\n else {\n left++;\n }\n }\n\n}", "function firstTwoValuesThatEqualSum(arr, sum){\n\tvar tempArr = arr.slice(0);\n\tfor (var i = 0; i < arr.length; i++) {\n\t\tvar a = arr[i];\n\t\t// remove num from tempArr so you don't count b as a\n\t\ttempArr.splice(i, 1);\n\t\tfor (var j = 0; j < tempArr.length; j++){\n\t\t\tvar b = tempArr[j];\n\t\t\tif (a + b === sum){\n\t\t\t\treturn `${a}, ${b}`;\n\t\t\t}\n\t\t}\n\t\t// reinitialize tempArr\n\t\ttempArr = arr.slice(0);\n\t}\n\treturn 'None';\n}", "function findPairSum(arr, target) {\r\n var result = [];\r\n for (var i = 0; i < arr.length; i++) {\r\n for (var j = 1; j < arr.length; j++) {\r\n if (arr[i] + arr[j] === target) {\r\n result.push(i,j);\r\n }\r\n }\r\n }\r\n console.log(result)\r\n return result.slice(2,4);\r\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 arraySearch(arr){\n let result = []\n for (let i=0; i<arr.length; i++){\n let aux = []\n if (arr[i].includes(0)){\n arr[i].forEach(item => {\n aux.push(0)\n })\n }else{\n for (let j=0; j<arr[i].length; j++){\n let res = 1;\n for (let k=0; k<arr.length; k++){\n if (arr[k][j] === 0){\n res = 0\n break;\n }\n }\n aux.push(res)\n }\n }\n result.push(aux)\n }\n return result;\n}", "function hasPairSumElement(arr, element) {\n if (arr.length < 2) return [-1]\n let [left, right] = [0, arr.length-1]\n while (left < right) {\n if (arr[left] + arr[right] == element) {\n return [arr[left], arr[right]]\n }\n if (arr[left] + arr[right] > element) {\n right -= 1\n } else {\n left += 1\n }\n }\n return [-1]\n}", "function findPair(arr, targetSum) {\n\t// Create a dictionary using JavaScript object\n\tlet dictionary = {};\n\t// Use \"for\" loop to... \n\tfor (let index = 0; index < arr.length; index++) {\n\t\t// ...assign the given array element at index to be the dictionary key\n\t\tlet dictKey = arr[index];\n\t\t// Let new index equal dictionary at explicit index\n\t\tdictionary[dictKey] = index;\n\t}\n\tfor (let index = 0; index < arr.length; index++) {\n\t\t// Create variable \"diff\", equal to targetSum minus the array at current index\n\t\tlet diff = targetSum - arr[index];\n\t\t// If dictionary has key equal to value \"diff\" and dictionary at value is not index\n\t\tif (dictionary.hasOwnProperty(diff) && dictionary[diff] !== index) {\n\t\t\t// Create variable to hold indexes of the two values that equal target sum\n\t\t\tlet indexResult = [index, dictionary[diff]];\n\t\t\t// console.log(\"Indexes of correct values:\", indexResult);\n\t\t\tlet valueOne = arr[indexResult[0]];\n\t\t\tlet valueTwo = arr[indexResult[1]];\n\t\t\t// Multiply values that equal target sum together to get final result\n\t\t\tlet finalResult = valueOne * valueTwo;\n\t\t\t// console.log(`${valueOne} times ${valueTwo} equals ${finalResult}`);\n\t\t\treturn finalResult;\n\t\t}\n\t}\n}", "function sum2(a) {\n var tmparray = [];\n a.every(x => {\n if (x >= 0)\n tmparray.push(x)\n return x > 0;\n });\n\n return tmparray.reduce((acc, x) => acc + x, 0);\n}", "function pair_with_target_sum(arr, targetSum) {\n const nums = {}; // to store numbers and their indices\n for (let i = 0; i < arr.length; i++) {\n const num = arr[i];\n if (targetSum - num in nums) {\n return [nums[targetSum - num], i];\n }\n nums[arr[i]] = i;\n }\n return [-1, -1];\n}", "function twoSum(arr, S) {\n\n var sums = [];\n var hashTable = {};\n\n // check each element in array\n for (var i = 0; i < arr.length; i++) {\n \n // calculate S - current element\n var sumMinusElement = S - arr[i];\n\n // check if this number exists in hash table\n // if so then we found a pair of numbers that sum to S\n if (hashTable[sumMinusElement.toString()] !== undefined) { \n sums.push([arr[i], sumMinusElement]);\n }\n\n // add the current number to the hash table\n hashTable[arr[i].toString()] = arr[i];\n\n }\n\n // return all pairs of integers that sum to S\n return sums;\n\n}", "function getPairsIncludingDupes(arr, sum) {\n\tlet hashMap = {};\n\tlet pairs = [];\n\tfor(let i=0; i < arr.length; i++) {\n\t\thashMap[arr[i]] = (hashMap[arr[i]] || 0) + 1;\n\t}\n\tlet twice_count = 0;\n\tfor(let elem of arr) {\n\t\tif(hashMap[sum - elem]) {\n\t\t\ttwice_count++;\n\t\t\tpairs.push([elem, sum - elem])\n\t\t}\n\t\tif(sum-elem === elem) twice_count--;\n\t}\n\tconsole.log('pairs: ', pairs); //this gives an array of all the pairs dupes included\n console.log('twice_count/2: ', twice_count/2); //this yields the amount of pairs non-dupe\n console.log('pairs.length: ', pairs.length); //this yields the amount of pairs duped\n\treturn twice_count/2;\n}", "function twoSum(numArray, sum) {\n var pairs = [];\n var hashTable = [];\n\n for (let i = 0; i < numArray.length; i++) {\n var currNum = numArray[i];\n var couterpart = sum - currNum;\n if (hashTable.indexOf(couterpart) !== -1) {\n pairs.push([currNum, couterpart]);\n }\n hashTable.push(currNum);\n }\n return pairs;\n}", "function hasPairSum2(array, sum) { // time: O(n), space: O(n)\n // loop over\n const complements = new Set()\n for(let i=0; i<array.length; i++) {\n // if set has current, return true\n if (complements.has(array[i])){\n return true;\n }\n // add sum - current\n complements.add(sum - array[i]);\n }\n return false;\n}", "function twoNumberSum(array, targetSum) {\n // Write your code here.\n for(let i = 0; i < array.length - 1; i++){\n const firstNum = array[i]\n for(let j = i + 1; j < array.length; j++){\n const secondNum = array[j]\n if(firstNum + secondNum === targetSum){\n return [firstNum , secondNum]\n }\n }\n }\n return [];\n \n }", "function twoNumberSum(array, targetSum) {\n // Write your code here.\n\tlet seenHash = {};\n\t\n\tfor(let i = 0; i < array.length; i++){\n\t\tlet value = array[i];\n\t\tlet target = targetSum - value;\n\t\t\n\t\tif(seenHash[target]){\n\t\t\treturn [target, value]\n\t\t} else {\n\t\t\tseenHash[value] = true;\n\t\t}\n\t}\n\treturn [];\n}", "function twoSum(a, sum){\n let cur_max =0, max_so_far = 0, result= [];\n cur_max = a[0];\n for(let i=0; i<a.length; i++){\n var diff = sum - a[i];\n var k = a.indexOf(diff);\n if(k > -1 && k !==i){\n result.push(i);\n result.push(k);\n }\n }\n return result;\n}", "function twoSum(numArr, sum){\n var pairs = [];\n var hashtable = [];\n for(var i = 0; i < numArr.length; i++){\n var currNum = numArr[i];\n var counterPart = sum - currNum;\n if(hashtable.indexOf(counterPart) !== -1){\n pairs.push([currNum, counterPart])\n }\n\n hashtable.push(currNum);\n }\n\n return pairs;\n}", "function positiveSum(arr){\nreturn arr\n .filter(positivenumbers => positivenumbers > 0)\n .reduce((a,b) => a + b, 0);\n}", "function twoNumberSum(array, targetSum) {\n let hash = [];\n for (const element of array) {\n let targetVal = targetSum - element;\n if (hash.indexOf(targetVal) !== -1) {\n return [targetVal, element];\n } else {\n hash.push(element);\n }\n }\n\n return [];\n}", "function positiveSum(arr) {\r\n return arr.filter( x => {\r\n if(x >= 0) return x;\r\n }).reduce( (a, b) => {\r\n return a + b;\r\n }, 0);\r\n}", "function positiveSum2(arr) {\n let total = 0;\n\n for (nb of arr) {\n if (nb > 0) {\n total += nb;\n }\n }\n\n return total;\n}", "function maybeOptionalZero(x, x1, x2) {\n if (x === undefined) {\n if (x1 === undefined) {\n if (x2 !== undefined) return [0, x2];\n } else {\n if (x2 === undefined) return [0, x1];\n }\n } else if (x1 === undefined) {\n return x2 === undefined ? [0, x] : [x, x2];\n } else if (x2 === undefined) {\n return [x, x1];\n }\n return [x1, x2];\n}", "function targetSum(arr, sum){\n\tlet result = [];\n\n\t/*we use nested loops to compare elements and search for a matching sum*/\n\n\tarr.find((elem, index) => { // use find for out loop\n\t\tfor(let i = 0; i < arr.length; i++){ // use for for inner loop\n\t\t\tif(index !== i && elem + arr[i] === sum){ // check if 2 differnt elems sum match arg\n\t\t\t\tresult.push(elem, arr[i]) // if we find a match put the elems in result\n\t\t\t\treturn true // stop searching\n\t\t\t}\n\t\t}\n\t})\n\treturn result\n}", "function hasPair(arr, sum) {\n let mySet = new Set();\n for(let i=0; i<arr.length; i++) {\n if(mySet.has(arr[i])) {\n return true;\n }\n mySet.add(sum - arr[i]);\n }\n return false;\n}", "function sol2(nums) {\n let sum = nums.reduce((acc, val) => acc + val, 0);\n if (sum % 2 !== 0) return false;\n sum /= 2;\n // arr of sums, 0... sum\n const dp = Array(sum + 1);\n dp[0] = true;\n\n // check the dp[current - num] OR if the sum - current number is valid\n\n for (let num of nums) {\n for (let j = sum; j >= 0; j--) {\n console.log(dp);\n if (j >= num) {\n dp[j] = dp[j] || dp[j - num];\n }\n }\n }\n\n return dp[sum];\n}", "function process (data){\n var positions = [];\n data.forEach (function (a, i) {\n data.forEach (function (b, j) {\n if (a + b === 0) {positions.push (i +\",\"+ j )}\n });\n });\n positions.forEach (function (a){\n console.log (\"You can sum these pairs of numbers and get zero:\" + a);\n // console.log (positions);\n});\n}", "function findPairsWiithMatchingSum(array, sum) {\n let start = 0;\n let end = array.length - 1;\n while (start < end) {\n let currentSum = array[start] + array[end];\n // console.log(`currentSum = ${currentSum}, start = ${start}, end = ${end}`);\n if (currentSum === sum) {\n return true;\n } else if ( currentSum < sum ) {\n start++;\n } else {\n end--;\n }\n }\n return false;\n}", "function twoSum (arr, sum) {\n//console.log(arr, sum);\n var sumArr = [];\n for( var i = 0; i<arr.length; i++) {\n var innerArray = [];\n for(var j = i + 1; j<arr.length; j++) {\n if(arr[i] + arr[j] === sum) {\n sumArr.push(i, j);\n }\n }\n }\n return sumArr;\n \n}", "function twoNumSum(array, targetSum){\n const nums = {};\n \n for(const num of array){\n const potentialMatch = targetSum - num;\n if(potentialMatch in nums){\n return [potentialMatch, num];\n } else {\n nums[num] = true\n }\n }\n return []\n}", "function noZeros(arr) {\n\n let zeroIndex = [] //Keeps track of where all the 0s are in each index\n\n for (i=0; i<arr[0].length; i++) {\n zeroIndex.push(1)\n } // We initiate zeroIndex to be all 1s, but mutate the 1s into 0s whenever we catch a 0 at the same index inside an array\n\n return arr.map((arr2) => {\n //Check if the array has a zero.\n let zeroIt = false\n\n for (i=0;i<arr2.length;i++) {\n if (arr2[i] === 0) {\n zeroIndex[i] = 0\n zeroIt = true\n }\n }\n\n //if zeroIt is true// if it has a zero\n if (zeroIt === true) {\n //Make the entire array 0\n let zeroArr = []\n for(i=0;i<arr.length;i++) {\n zeroArr.push(0)\n }\n return zeroArr //Slice horizontally\n } else {\n //return the array with the zeros sliced vertically.\n return zeroIndex //Slice Vertically\n //We are assuming that there is only 2 possibilities: all 0s in an array, or an array where all 1s are in the same spot.\n }\n })\n}", "function hasPairWithSum2(arr, sum) {\n // Set vs Array, in small datas - Array is better, but for massive/big datas - Set is faster (https://stackoverflow.com/questions/44243103/javascript-set-vs-array-vs-object-definition#:~:text=Every%20value%20in%20a%20set,times%20as%20you'd%20like.&text=TL%3ADR%20Set%20is%20almost,sure%20each%20value%20is%20unique.)\n const mySet = new Set();\n const len = arr.length;\n for (let i = 0; i < len; i++) {\n if (mySet.has(arr[i])) {\n console.log(true);\n return true;\n }\n mySet.add(sum - arr[i]);\n }\n return false;\n}", "function solution1(array, targetSum) {\n array.sort((a,b) => a - b);\n const result = [];\n for (let i = 0; i < array.length; i++) {\n const x = array[i];\n for (let j = i+1; j < array.length; j++) {\n const y = array[j];\n for (let k = j+1; k < array.length; k++) {\n const z = array[k];\n if (x + y + z === targetSum) {\n result.push([x, y, z]);\n }\n }\n }\n }\n return result;\n }", "function twoNumberSum(array, targetSum) {\n //essentially, setting up two \"pointers\", i and j\n //but for now i, and setting the - 1 because im going to start pointer j on the last integer\n\tfor (let i = 0; i < array.length - 1; i++) {\n //setting varialbe for wherever the pointer is at the given time\n const firstNum = array[i];\n //now for pointer j, which is always one ahead of pointer i\n\tfor (let j = i + 1; j < array.length; j++) {\n //setting varialbe for wherever the pointer is at the given time\n const secondNum = array[j];\n //if the firstnum and secondnum equal the target sum\n\tif (firstNum + secondNum === targetSum) {\n //return new array with the two numbers that equaled the target sum\n\t\treturn [firstNum, secondNum]\n\t\t\t}\n\t\t}\n }\n //return it!\n\treturn [];\n}", "computeZeros() {\n let zeroL = this.fx - Math.sqrt(this._d ** 2 - this.fy ** 2);\n let zeroR = this.fx + Math.sqrt(this._d ** 2 - this.fy ** 2);\n return ([zeroL, zeroR]);\n }", "function findSumPair(numberList, targetSum) {\n const newArray = [];\n for (let index = 0; index < numberList.length; index++) {\n if (numberList.includes(targetSum - numberList[index])) {\n newArray.push(\n numberList[index],\n numberList[numberList.indexOf(targetSum - numberList[index])]\n );\n break;\n }\n }\n return newArray.sort((a, b) => a - b);\n}", "function positiveSum(arr) {\n\treturn arr.filter(value=>value>0).reduce((a,b)=>a+b)\n}", "function twoNumberSum(array, targetSum) {\n const numbers = {};\n for(const number of array){\n const potentialMatch = targetSum - number;\n if(potentialMatch in numbers){\n return [potentialMatch, number];\n } else {\n numbers[number] = true;\n }\n }\n\treturn [];\n}", "function EmptySpot(sudoko){\n for (let i = 0; i < 9; i++) {\n for (let j = 0; j < 9; j++) {\n if (sudoko[i][j] === 0)\n return [i,j];\n }\n }\n return [-1,-1];\n} // if the board is full of empty 0 then it will return [-1,-1] ", "function findMatch() {\n\n var sums = [];\n var values = 0;\n var calcResult = calc(scores);\n\n function getSum(total, num) {\n return total + num;\n }\n\n for (var i = 0; i < calc(scores).length; i++) {\n\n values = (calcResult[i].reduce(getSum));\n sums.push(values);\n }\n\n return sums;\n }", "function positiveSum(arr) {\n\treturn arr.filter(val => val > 0).reduce((acc, cur) => acc + cur, 0);\n}", "function sumAndMultiply(sum, multiply) {\r\n for (let i = 0; i <= sum; i++)\r\n for (let j = 0; j <= i; j++)\r\n if (i + j == sum && i * j == multiply)\r\n return [j, i]\r\n return null\r\n}", "function twoSum(arr,x) {\n for (i=0; i<arr.length; i++) {\n const element = arr[i];\n const i2 = arr.indexOf(x - element);\n if (i2 > -1) {\n return [i,i2];\n }\n }\n}", "function get2NumSum(inputArr, targetSum) {\n var results = [],\n potentials = {};\n for (let num of inputArr) {\n var potentialMatch = targetSum - num;\n if (potentials[num]) {\n return [potentialMatch, num];\n } else {\n potentials[potentialMatch] = true;\n }\n }\n}", "function findPair1(arr, target) {\n let result = [];\n for (let i = 0; i < arr.length; i++) {\n if (arr[i] + arr[i+1] === target) {\n result.push(i, i+1)\n break;\n }\n }\n return result.join()\n}", "function positiveSum(arr) {\n let sum = 0\n arr.map( num => num > 0 ? sum += num : null)\n return sum\n }" ]
[ "0.78718275", "0.76035357", "0.7556289", "0.7542015", "0.7536655", "0.75199014", "0.7514735", "0.7514735", "0.75113475", "0.7509873", "0.74946254", "0.7484444", "0.7474569", "0.7411543", "0.73846877", "0.73542506", "0.7290935", "0.7225764", "0.7219887", "0.7194324", "0.7158652", "0.7044575", "0.69435257", "0.6890514", "0.6882202", "0.68791384", "0.68732005", "0.68374413", "0.68343675", "0.6819956", "0.6789444", "0.6761775", "0.6759887", "0.6715675", "0.66975033", "0.66791856", "0.66760606", "0.6655957", "0.66304964", "0.66217273", "0.66051316", "0.66021806", "0.65917164", "0.6580022", "0.6526357", "0.65134615", "0.65000314", "0.6381592", "0.6348986", "0.63432866", "0.6310572", "0.6253605", "0.62314415", "0.623054", "0.62274224", "0.6186545", "0.6153127", "0.61491245", "0.6069465", "0.6063142", "0.60435915", "0.60342395", "0.6030838", "0.5972711", "0.59075457", "0.59019727", "0.58748066", "0.58637", "0.58596635", "0.5846768", "0.584184", "0.5832287", "0.58144003", "0.5802023", "0.57745725", "0.5760332", "0.57589984", "0.5730794", "0.57142955", "0.56947786", "0.56893843", "0.5686702", "0.5684321", "0.5672149", "0.5670351", "0.56549597", "0.56530213", "0.5650842", "0.56496763", "0.56470096", "0.56462747", "0.56390417", "0.563436", "0.56138", "0.56114626", "0.5606942", "0.56044406", "0.56021094", "0.55973524", "0.5592806" ]
0.7078697
21
var gStartPos const gTouchEvs = ['touchstart', 'touchmove', 'touchend']
function addMouseListeners() { gElCanvas.addEventListener('mousemove', onMove) gElCanvas.addEventListener('mousedown', onDown) gElCanvas.addEventListener('mouseup', onUp) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function e(){var e,t={},i=[\"touchstart\",\"touchmove\",\"touchend\"],n=document.createElement(\"div\");try{for(e=0;e<i.length;e++){var r=i[e];r=\"on\"+r;var s=r in n;s||(n.setAttribute(r,\"return;\"),s=\"function\"==typeof n[r]),t[i[e]]=s}return t.touchstart&&t.touchend&&t.touchmove}catch(a){return!1}}", "function touchStartHandler(e) {\n startPos = e.touches[0].pageY;\n }", "bindTouchEvent () {\n this.touchtimes = 0\n this.touchx = []\n\n document.addEventListener(\"touchstart\", (event) => {\n this.touchtimes ++ ;\n this.touchx[this.touchtimes] = event.changedTouches[0].clientY; \n })\n\n document.addEventListener(\"touchend\", (event) => {\n this.touchtimes ++ ;\n this.touchx[this.touchtimes] = event.changedTouches[0].clientY;\n\n if( ( Math.abs(this.touchx[this.touchtimes] - this.touchx[this.touchtimes-1]) > 50 )) {\n this.direction = this.touchx[this.touchtimes] > this.touchx[this.touchtimes - 1];\n this.changeSlide();\n }\n \n })\n }", "_setupTouches () {\n const body = document.querySelector('body')\n this._events['touchmove'] = {event: this._handleTouchMove, disable: document, context: body}\n this._events['touchstart'] = {event: this._handleTouchStart, disable: document, context: body}\n this._events['touchend'] = {event: this._handleTouchEnd, disable: document, context: body}\n }", "function touchStartHandler(event){\n var e = event.originalEvent;\n\n if(isReallyTouch(e)){\n var touchEvents = getEventsPage(e);\n touchStartY = touchEvents.y;\n touchStartX = touchEvents.x;\n }\n }", "function onTouchStarted(eventData)\n{\n isTouching = true;\n}", "function onTouchStart(e)\n\t\t\t{\n\t\t\t\tif (!isMoving && e.touches.length > 0)\n\t\t\t\t{\n\t\t\t\t\tif (config.preventDefault)\n\t\t\t\t\t{\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t}\n\n\t\t\t\t\t// temporary fix for deprecated events, will be removed soon!!!\n\t\t\t\t\tif (config.allowDiagonal)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (!config.wipeDownLeft) config.wipeDownLeft = config.wipeBottomLeft;\n\t\t\t\t\t\tif (!config.wipeDownRight) config.wipeDownRight = config.wipeBottomRight;\n\t\t\t\t\t\tif (!config.wipeUpLeft) config.wipeUpLeft = config.wipeTopLeft;\n\t\t\t\t\t\tif (!config.wipeUpRight) config.wipeUpRight = config.wipeTopRight;\n\t\t\t\t\t}\n\n\t\t\t\t\tstartDate = new Date().getTime();\n\n\t\t\t\t\tstartX = e.touches[0].pageX;\n\t\t\t\t\tstartY = e.touches[0].pageY;\n\t\t\t\t\tcurX = startX;\n\t\t\t\t\tcurY = startY;\n\t\t\t\t\tisMoving = true;\n\n\t\t\t\t\ttouchedElement = $(e.target);\n\n\t\t\t\t\tthis.addEventListener('touchmove', onTouchMove, false);\n\t\t\t\t}\n\t\t\t}", "function isTouch() { return !!(\"ontouchstart\" in window) || window.navigator.msMaxTouchPoints > 0; }", "function onTouchStart(e) {\n var _e$touches$ = e.touches[0],\n screenX = _e$touches$.screenX,\n screenY = _e$touches$.screenY;\n setTouchPosition({\n x: screenX,\n y: screenY\n });\n clearInterval(motionInterval.value);\n }", "function touchStart(e) {\n //getTouchPos(e);\n moving[0] = true;\n e.preventDefault();// prevent canceling this event\n window.requestAnimationFrame(loop);\n}", "_onTouchStart(ev){\n\t\tif (!ev.touches || ev.touches.length === 0) {\n\t\t\tconsole.error('No touches on touch event', ev)\n\t\t\treturn\n\t\t}\n\t\t//save screen coordinates normalized to -1..1 (0,0 is at center and 1,1 is at top right)\n\t\tthis._tapEventData = [\n\t\t\tev.touches[0].clientX / window.innerWidth,\n\t\t\tev.touches[0].clientY / window.innerHeight\n\t\t]\n\t}", "is_touch_device()\n {\n return 'ontouchstart' in window;\n }", "function handleGesure() {\n var swiped = 'swiped: ';\n if (touchendX < touchstartX) {\n alert(swiped + 'left!');\n }\n if (touchendX > touchstartX) {\n alert(swiped + 'right!');\n }\n if (touchendY < touchstartY) {\n alert(swiped + 'down!');\n }\n if (touchendY > touchstartY) {\n alert(swiped + 'left!');\n }\n if (touchendY == touchstartY) {\n alert('tap!');\n }\n}", "function touchstart(evt){\n\tvar touches = evt.originalEvent.touches;\n\tif (touches && touches.length) {\n\t\ttouchpos = {\n\t\t\tx: touches[0].pageX,\n\t\t\ty: touches[0].pageY,\n\t\t\tt: new Date().getTime()\n\t\t};\n\t}\n}", "function onTouchStart(event) {\n var touches = event.touches && event.touches.length ? event.touches : [event];\n var x = touches[0].clientX;\n var y = touches[0].clientY;\n touchCoordinates.push(x, y);\n\n $timeout(function () {\n // Remove the allowable region.\n for (var i = 0; i < touchCoordinates.length; i += 2) {\n if (touchCoordinates[i] == x && touchCoordinates[i + 1] == y) {\n touchCoordinates.splice(i, i + 2);\n return;\n }\n }\n }, PREVENT_DURATION, false);\n }", "function onTouchStart(event) {\n var touches = event.touches && event.touches.length ? event.touches : [event];\n var x = touches[0].clientX;\n var y = touches[0].clientY;\n touchCoordinates.push(x, y);\n\n $timeout(function() {\n // Remove the allowable region.\n for (var i = 0; i < touchCoordinates.length; i += 2) {\n if (touchCoordinates[i] == x && touchCoordinates[i + 1] == y) {\n touchCoordinates.splice(i, i + 2);\n return;\n }\n }\n }, PREVENT_DURATION, false);\n }", "onElementTouchStart(event) {\n const me = this;\n\n DomHelper.isTouchEvent = true;\n\n if (event.touches.length === 1) {\n me.longPressTimeout = setTimeout(() => {\n me.onElementLongPress(event);\n event.preventDefault();\n me.longPressPerformed = true;\n }, me.longPressTime);\n }\n }", "function start(e){\n e.preventDefault();\n touched = true;\n if(!Android){\n offsetX = e.pageX - X;\n offsetY = e.pageY - Y;\n }\n else{\n offsetX = e.changedTouches[0].pageX - X;\n offsetY = e.changedTouches[0].pageY - Y;\n }\n document.addEventListener( events['move'], move, false);\n document.addEventListener( events['end'], stop, false);\n initAnim();\n }", "function touchStart(event) {\n if ( options.fLog ) options.fLog('touchStart');\n \n // disable the standard ability to select the touched object\n event.preventDefault();\n // get the total number of fingers touching the screen\n fingerCount = event.touches.length;\n if ( options.fLog ) options.fLog('touchStart> fingerCount : ' + fingerCount);\n // since we're looking for a swipe (single finger) and not a gesture (multiple fingers),\n // check that only one finger was used\n if ( fingerCount == 1 ) {\n // get the coordinates of the touch\n startX = event.touches[0].pageX;\n startY = event.touches[0].pageY;\n // store the triggering element ID\n //triggerElementID = passedName;\n } else {\n // more than one finger touched so cancel\n touchCancel(event);\n }\n }", "function m(e){var t=-1<e.type.indexOf(\"touch\"),n=Rt&&Mt&&Q.props.touchHold&&!t,i=Mt&&!Q.props.touchHold&&t;return n||i}", "function onTouchStart(e) {\n var _e$touches$ = e.touches[0],\n screenX = _e$touches$.screenX,\n screenY = _e$touches$.screenY;\n setTouchPosition({\n x: screenX,\n y: screenY\n });\n window.clearInterval(motionRef.current);\n }", "function onTouchStart(e) {\n var _e$touches$ = e.touches[0],\n screenX = _e$touches$.screenX,\n screenY = _e$touches$.screenY;\n setTouchPosition({\n x: screenX,\n y: screenY\n });\n window.clearInterval(motionRef.current);\n }", "function onTouchStart(e) {\n var _e$touches$ = e.touches[0],\n screenX = _e$touches$.screenX,\n screenY = _e$touches$.screenY;\n setTouchPosition({\n x: screenX,\n y: screenY\n });\n window.clearInterval(motionRef.current);\n }", "function onTouchStart(e) {\n var _e$touches$ = e.touches[0],\n screenX = _e$touches$.screenX,\n screenY = _e$touches$.screenY;\n setTouchPosition({\n x: screenX,\n y: screenY\n });\n window.clearInterval(motionRef.current);\n }", "onElementTouchStart(event) {\n const me = this;\n DomHelper.isTouchEvent = true;\n\n if (event.touches.length === 1) {\n me.longPressTimeout = me.setTimeout(() => {\n me.onElementLongPress(event);\n event.preventDefault();\n me.longPressPerformed = true;\n }, me.longPressTime);\n }\n }", "function onTouchStart(event) {\n\n touch.startX = event.touches[0].clientX;\n touch.startY = event.touches[0].clientY;\n touch.startCount = event.touches.length;\n\n // If there's two touches we need to memorize the distance\n // between those two points to detect pinching\n if (event.touches.length === 2 && config.overview) {\n touch.startSpan = distanceBetween({\n x: event.touches[1].clientX,\n y: event.touches[1].clientY\n }, {\n x: touch.startX,\n y: touch.startY\n });\n }\n\n }", "touchHandler(e) {\n var touches = e.changedTouches, first = touches[0], type = \"\";\n switch (e.type){\n case \"touchstart\":\n type = \"mousedown\";\n break;\n case \"touchmove\":\n type = \"mousemove\";\n break;\n case \"touchend\":\n type = \"mouseup\";\n break;\n case \"touchcancel\":\n type = \"mouseup\";\n break;\n default:\n return;\n }\n var simulatedEvent = document.createEvent(\"MouseEvent\");\n simulatedEvent.initMouseEvent(type, true, true, window, 1, first.screenX, first.screenY, first.clientX, first.clientY, false, false, false, false, 0/*left*/, null);\n first.target.dispatchEvent(simulatedEvent);\n e.preventDefault();\n }", "function onTouchStart(event) {\n var touches = event.touches && event.touches.length ? event.touches : [event];\n var x = touches[0].clientX;\n var y = touches[0].clientY;\n touchCoordinates.push(x, y);\n\n $timeout(function() {\n // Remove the allowable region.\n for (var i = 0; i < touchCoordinates.length; i += 2) {\n if (touchCoordinates[i] == x && touchCoordinates[i + 1] == y) {\n touchCoordinates.splice(i, i + 2);\n return;\n }\n }\n }, PREVENT_DURATION, false);\n }", "function setupTouchEvents() {\n sliderElement.addEventListener('touchstart', function (event) {\n xTouch = event.touches[0].clientX;\n });\n\n sliderElement.addEventListener('touchmove', function (event) {\n if (!xTouch) {\n return;\n }\n\n var xRelease = event.touches[0].clientX;\n if (xRelease - xTouch > 0) {\n prev();\n } else {\n next();\n }\n\n xTouch = null;\n });\n }", "function _touchEvents() {\n element.addEventListener('touchstart',function(e){\n var t = e.touches[0];\n swipe_line.startX = t.screenX; \n swipe_line.startY = t.screenY;\n },false);\n\n element.addEventListener('touchmove',function(e){\n e.preventDefault();\n var t = e.touches[0];\n swipe_line.endX = t.screenX;\n swipe_line.endY = t.screenY;\n if (optional.sticky) {\n element.style.top = (Number(element.style.top) + (swipe_line.endY - swipe_line.startY)).toString();\n element.style.left = (Number(element.style.top) + (swipe_line.endY - swipe_line.startY)).toString();\n }\n },false);\n\n element.addEventListener('touchend',function(e){\n let deltaX = swipe_line.endX - swipe_line.startX;\n let deltaY = swipe_line.endY - swipe_line.startY;\n\n // Minimum swipe distance\n if (deltaX ** 2 + deltaY ** 2 < deltaMin ** 2) {\n return\n }\n // detect horizontal\n if (deltaY === 0 || Math.abs(deltaX / deltaY) > 1) {\n direction = deltaX > 0 ? 'r' : 'l';\n }\n else {\n direction = deltaY > 0 ? 'u' : 'd';\n }\n\n if (direction && typeof callback === 'function') {\n callbackFn(elementId, direction);\n }\n\n direction = null;\n },false); \n\n\n // touch events for Firefox\n function _mozTouchEvents() {\n element.addEventListener('MozTouchDown',function(e){\n var t = e.touches[0];\n swipe_line.startX = t.screenX; \n swipe_line.startY = t.screenY;\n },false);\n element.addEventListener('MozTouchMove',function(e){\n e.preventDefault();\n var t = e.touches[0];\n swipe_line.endX = t.screenX;\n swipe_line.endY = t.screenY;\n if (optional.sticky) {\n element.style.top = (Number(element.style.top) + (swipe_line.endY - swipe_line.startY)).toString();\n element.style.left = (Number(element.style.top) + (swipe_line.endY - swipe_line.startY)).toString();\n }\n },false);\n element.addEventListener('MozTouchUp',function(e){\n let deltaX = swipe_line.endX - swipe_line.startX;\n let deltaY = swipe_line.endY - swipe_line.startY;\n\n // Minimum swipe distance\n if (deltaX ** 2 + deltaY ** 2 < deltaMin ** 2) {\n return\n }\n // detect horizontal\n if (deltaY === 0 || Math.abs(deltaX / deltaY) > 1) {\n direction = deltaX > 0 ? 'r' : 'l';\n }\n else {\n direction = deltaY > 0 ? 'u' : 'd';\n }\n\n if (direction && typeof callback === 'function') {\n if (direction == swipeDirection) {\n callbackFn(elementId, direction);\n }\n }\n\n direction = null;\n },false); \n }\n\n _touchEvents();\n _mozTouchEvents();\n }", "function isTouchDevice(){\n return 'ontouchstart' in window || !!(navigator.msMaxTouchPoints);\n}", "function isTouchDevice() {\n return 'ontouchstart' in window || navigator.maxTouchPoints;\n}", "function isTouchDevice() {\n return 'ontouchstart' in window || navigator.maxTouchPoints;\n}", "function isTouchDevice() {\n return 'ontouchstart' in window || navigator.maxTouchPoints;\n}", "function isTouchDevice() {\n return 'ontouchstart' in window || navigator.maxTouchPoints;\n}", "function isTouchDevice() {\n return 'ontouchstart' in window || navigator.maxTouchPoints;\n}", "function isTouchDevice() {\n return 'ontouchstart' in window || navigator.maxTouchPoints;\n}", "function isTouchDevice() {\n return 'ontouchstart' in window || navigator.maxTouchPoints;\n}", "function isTouchDevice() {\n return 'ontouchstart' in window || navigator.maxTouchPoints;\n}", "function isTouchDevice() {\n return 'ontouchstart' in window || navigator.maxTouchPoints;\n}", "function isTouchDevice() {\n return 'ontouchstart' in window || navigator.maxTouchPoints;\n}", "function isTouchDevice() {\n\t return 'ontouchstart' in window || navigator.maxTouchPoints;\n\t}", "function touchStart(event)\n\t\t\t{\n\t\t\t\toriginalCoord.x = (settings.touch_capable) ? event.targetTouches[0].pageX : event.pageX;\n\t\t\t\toriginalCoord.y = (settings.touch_capable) ? event.targetTouches[0].pageY : event.pageY;\n\t\t\t\tfinalCoord.x = originalCoord.x;\n\t\t\t\tfinalCoord.y = originalCoord.y;\n\t\t\t\tstarted = true;\n\t\t\t}", "function onTouchStart(event) {\n var touches = event.touches && event.touches.length ? event.touches : [event];\n var x = touches[0].clientX;\n var y = touches[0].clientY;\n touchCoordinates.push(x, y);\n\n $timeout(function() {\n // Remove the allowable region.\n for (var i = 0; i < touchCoordinates.length; i += 2) {\n if (touchCoordinates[i] == x && touchCoordinates[i+1] == y) {\n touchCoordinates.splice(i, i + 2);\n return;\n }\n }\n }, PREVENT_DURATION, false);\n }", "function cust_swipeEvent(evnt, swipedirection) {\n //f_log(evnt.clientX+\", \"+evnt.clientY)\n}", "function touchStart(e) {\n $this = $(e.currentTarget);\n $this.data('callee1', touchStart);\n originalCoord.x = (e.originalEvent.targetTouches) ? e.originalEvent.targetTouches[0].pageX : e.pageX;\n originalCoord.y = (e.originalEvent.targetTouches) ? e.originalEvent.targetTouches[0].pageY : e.pageY;\n finalCoord.x = originalCoord.x;\n finalCoord.y = originalCoord.y;\n started = true;\n var origEvent = e.originalEvent;\n // Read event data into our startEvt:\n startEvnt = {\n 'position': {\n 'x': (settings.touch_capable) ? origEvent.touches[0].screenX : e.screenX,\n 'y': (settings.touch_capable) ? origEvent.touches[0].screenY : e.screenY\n },\n 'offset': {\n 'x': (settings.touch_capable) ? Math.round(origEvent.changedTouches[0].pageX - ($this.offset() ? $this.offset().left : 0)) : Math.round(e.pageX - ($this.offset() ? $this.offset().left : 0)),\n 'y': (settings.touch_capable) ? Math.round(origEvent.changedTouches[0].pageY - ($this.offset() ? $this.offset().top : 0)) : Math.round(e.pageY - ($this.offset() ? $this.offset().top : 0))\n },\n 'time': Date.now(),\n 'target': e.target\n };\n }", "function onTouchMove(e)\n\t\t\t {\n\t\t\t\t if (e.touches.length > 1) cancelTouch();\n\t\t\t\t else\n\t\t\t\t {\n\t\t\t\t\t endX = e.touches[0].pageX;\n\t\t\t\t }\n\t\t\t }", "function onTouchStart(event) {\n var touches = event.touches && event.touches.length ? event.touches : [event];\n var x = touches[0].clientX;\n var y = touches[0].clientY;\n touchCoordinates.push(x, y);\n\n $timeout(function() {\n // Remove the allowable region.\n for (var i = 0; i < touchCoordinates.length; i += 2) {\n if (touchCoordinates[i] == x && touchCoordinates[i + 1] == y) {\n touchCoordinates.splice(i, i + 2);\n return;\n }\n }\n }, PREVENT_DURATION, false);\n }", "function onTouchStart(event) {\n var touches = event.touches && event.touches.length ? event.touches : [event];\n var x = touches[0].clientX;\n var y = touches[0].clientY;\n touchCoordinates.push(x, y);\n\n $timeout(function() {\n // Remove the allowable region.\n for (var i = 0; i < touchCoordinates.length; i += 2) {\n if (touchCoordinates[i] == x && touchCoordinates[i + 1] == y) {\n touchCoordinates.splice(i, i + 2);\n return;\n }\n }\n }, PREVENT_DURATION, false);\n }", "function onTouchStart(event) {\n var touches = event.touches && event.touches.length ? event.touches : [event];\n var x = touches[0].clientX;\n var y = touches[0].clientY;\n touchCoordinates.push(x, y);\n\n $timeout(function() {\n // Remove the allowable region.\n for (var i = 0; i < touchCoordinates.length; i += 2) {\n if (touchCoordinates[i] == x && touchCoordinates[i + 1] == y) {\n touchCoordinates.splice(i, i + 2);\n return;\n }\n }\n }, PREVENT_DURATION, false);\n }", "function onTouchStart(event) {\n var touches = event.touches && event.touches.length ? event.touches : [event];\n var x = touches[0].clientX;\n var y = touches[0].clientY;\n touchCoordinates.push(x, y);\n\n $timeout(function() {\n // Remove the allowable region.\n for (var i = 0; i < touchCoordinates.length; i += 2) {\n if (touchCoordinates[i] == x && touchCoordinates[i + 1] == y) {\n touchCoordinates.splice(i, i + 2);\n return;\n }\n }\n }, PREVENT_DURATION, false);\n }", "function onTouchStart(event){\n updateMousePosition(event);\n var newEvent = new Event('mousedown');\n newEvent.which = mouseButton.LEFT;\n onMouseDown(newEvent);\n timer = setTimeout(onLongTouch, touchDuration);\n}", "function is_touch(event) {\n return typeof TouchEvent !== \"undefined\" && event instanceof TouchEvent;\n }", "function onTouchStart(e) {\n firstTouch = e.nativeEvent.pageX;\n }", "function touchStart(e) {\n\t\t\t\t\t// Allow SELECT and INPUT elements to receive touch events\n\t\t\t\t\tif (e.target.tagName === 'SELECT' || e.target.tagName === 'INPUT') {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Stop the default touches\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\te.stopPropagation();\n\t\t\t\t\t\n\t\t\t\t\tvar touch = getTouches(e)[0];\n\t\t\t\t\t\n\t\t\t\t\t// Dispatch a fake mouse down event\t\t\n\t\t\t\t\tdispatchMouseEvent('mousedown', touch, getRootNode(touch.target));\n\t\t\t\t\t\n\t\t\t\t\tscrolling = true;\n\t\t\t\t\tmoved = false;\n\t\t\t\t\tmovedY = 0;\n\t\t\t\t\t\n\t\t\t\t\tclearTimeout(timeoutID);\n\t\t\t\t\tsetTransitionTime(0);\n\t\t\t\t\t\n\t\t\t\t\t// Check scroll position\n\t\t\t\t\tif (o.momentum) {\n\t\t\t\t\t\tvar y = getPosition();\n\t\t\t\t\t\tif (y !== scrollY) {\n\t\t\t\t\t\t\tsetPosition(y);\n\t\t\t\t\t\t\tmoved = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\ttouchY = touch.pageY - scrollY;\n\t\t\t\t}", "function emulateTouch (event)\n\t\t\t{\n\t\t\t\tif (options.preventDefault)\n\t\t\t\t{\n\t\t\t\t\t// Pas d'action par défaut (bouger la page par exemple)\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\n\t\t\t\t// Récupérer les pointes\n\t\t\t\tvar touches = event.changedTouches;\n\n\t\t\t\t// Le type de l'event\n\t\t\t\tvar type = event.type;\n\n\t\t\t\t// Si on doit dispatcher direct\n\t\t\t\tif (options.dispatchOnStart)\n\t\t\t\t{\n\t\t\t\t\tif (type == \"touchstart\")\n\t\t\t\t\t\tdispatchMouseEvent(\"click\", touches[0]);\n\t\t\t\t\t\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// Si on doit utiliser les fastTap\n\t\t\t\telse if (options.fastTap)\n\t\t\t\t{\n\t\t\t\t\t// Vérifier les mouvements pour émuler les clics\n\t\t\t\t\tif (type == \"touchstart\")\n\t\t\t\t\t\tmoved = false;\n\t\t\t\t\telse if (type == \"touchmove\")\n\t\t\t\t\t\tmoved = true;\n\t\t\t\t\telse if (type == \"touchend\" && !moved)\n\t\t\t\t\t\tdispatchMouseEvent(\"click\", touches[0]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Séléctionner le type de MouseEvent selon le TouchEvent\n\t\t\t\tswitch (type) {\n\t\t\t\t\tcase 'touchtap':\n\t\t\t\t\t\ttype = 'click';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'touchstart':\n\t\t\t\t\t\ttype = 'mousedown';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'touchmove':\n\t\t\t\t\t\ttype = 'mousemove';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'touchend':\n\t\t\t\t\t\ttype = 'mouseup';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn;\n\t\t\t\t};\n\n\t\t\t\t// Dispatcher l'équivalent mouseEvent\n\t\t\t\tdispatchMouseEvent(type, touches[0]);\n\t\t\t}", "function handleTouchStart(evt) {\n xDown = evt.touches[0].clientX;\n yDown = evt.touches[0].clientY;\n }", "function onTouchMove(event){\n var xPos = event.touches[0].pageX;\n var yPos = event.touches[0].pageY;\n if(typeof(touchMoveEvent) == \"function\"){\n touchMoveEvent(xPos, yPos);\n }\n}", "function supportsTouch() {\n return 'ontouchstart' in window;\n}", "touchHandler(event) {\n const touches = event.changedTouches\n const first = touches[0]\n let type = ''\n switch (event.type) {\n case 'touchstart':\n type = 'mousedown'\n break\n case 'touchmove':\n type = 'mousemove'\n break\n case 'touchend':\n type = 'mouseup'\n break\n default:\n return\n }\n // initMouseEvent(type, canBubble, cancelable, view, clickCount, \n // screenX, screenY, clientX, clientY, ctrlKey, \n // altKey, shiftKey, metaKey, button, relatedTarget)\n const simulatedEvent = document.createEvent('MouseEvent')\n simulatedEvent.initMouseEvent(type, true, true, window, 1, first.screenX, first.screenY, first.clientX, first.clientY, false, false, false, false, 0, null)\n first.target.dispatchEvent(simulatedEvent)\n event.preventDefault()\n }", "function isTouchDevice() {\n \t\treturn !!('ontouchstart' in window) || (!!('onmsgesturechange' in window) && !!window.navigator.maxTouchPoints);\n \t}", "function touchStartHandler(e){\n\n //stopping the auto scroll to adjust to a section\n if(options.fitToSection){\n activeAnimation = false;\n }\n\n if(isReallyTouch(e)){\n var touchEvents = getEventsPage(e);\n touchStartY = touchEvents.y;\n touchStartX = touchEvents.x;\n }\n }", "function touchStartHandler(e){\n\n //stopping the auto scroll to adjust to a section\n if(options.fitToSection){\n activeAnimation = false;\n }\n\n if(isReallyTouch(e)){\n var touchEvents = getEventsPage(e);\n touchStartY = touchEvents.y;\n touchStartX = touchEvents.x;\n }\n }", "function touchStartHandler(e){\n\n //stopping the auto scroll to adjust to a section\n if(options.fitToSection){\n activeAnimation = false;\n }\n\n if(isReallyTouch(e)){\n var touchEvents = getEventsPage(e);\n touchStartY = touchEvents.y;\n touchStartX = touchEvents.x;\n }\n }", "function dragStart (e) {\n e = e || window.event;\n e.preventDefault();\n posInitial = items.offsetLeft;\n\n if (e.type === 'touchstart') {\n posX1 = e.touches[0].clientX;\n } else {\n posX1 = e.clientX;\n document.onmouseup = dragEnd;\n document.onmousemove = dragAction;\n }\n }", "function touchStartHandler(e){\r\n\r\n //stopping the auto scroll to adjust to a section\r\n if(options.fitToSection){\r\n activeAnimation = false;\r\n }\r\n\r\n if(isReallyTouch(e)){\r\n var touchEvents = getEventsPage(e);\r\n touchStartY = touchEvents.y;\r\n touchStartX = touchEvents.x;\r\n }\r\n }", "function touchStartHandler(e){\r\n\r\n //stopping the auto scroll to adjust to a section\r\n if(options.fitToSection){\r\n activeAnimation = false;\r\n }\r\n\r\n if(isReallyTouch(e)){\r\n var touchEvents = getEventsPage(e);\r\n touchStartY = touchEvents.y;\r\n touchStartX = touchEvents.x;\r\n }\r\n }", "function isTouch() {\n return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);\n }", "handletouchmove(e) {\n var touch = e.touches[0];\n var mouseEvent = new MouseEvent(\"mousemove\", {\n clientX: touch.clientX,\n clientY: touch.clientY\n });\n this.canvas.dispatchEvent(mouseEvent);\n e.preventDefault();\n }", "function presionarPantalla(evento)\r\n{\r\n Touch_activo = 1;\r\n xm = evento.touches[0].clientX;\r\n ym = evento.touches[0].clientY;\r\n}", "function handleTouchStart(event) {\n var touches = event.changedTouches[0];\n startX = touches.pageX;\n startY = touches.pageY;\n event.preventDefault();\n}", "function onTouchStart( event ){\n var t = now();\n eachTouchEvent( event, function( i, e ){\n tstarts[i] = t;\n xoffset[i] = e.clientX;\n onStart && onStart();\n } );\n xstart = el.scrollLeft;\n return true;\n }", "getTouchPos(e) {\n if(e.touches) {\n if (e.touches.length == 1) { // Only deal with one finger\n var touch = e.touches[0] // Get the information for finger #1\n const offsets = this.canvasRef.current.getBoundingClientRect()\n // this.touchX = touch.pageX - touch.target.offsetLeft\n // this.touchY = touch.pageY - touch.target.offsetTop\n this.touchX = touch.pageX - offsets.left\n this.touchY = touch.pageY - offsets.top\n }\n }\n }", "function is_touch_device() {\r\n return (('ontouchstart' in window) || (navigator.MaxTouchPoints > 0) || (navigator.msMaxTouchPoints > 0));\r\n}", "function isTouchDevice() {\n return 'ontouchstart' in document.documentElement;\n }", "function is_touch_device() {\n\t return 'ontouchstart' in window // works on most browsers \n || navigator.maxTouchPoints; // works on IE10/11 and Surface\n\t }", "function touchMove(e) {\n $this = $(e.currentTarget);\n $this.data('callee2', touchMove);\n finalCoord.x = (e.originalEvent.targetTouches) ? e.originalEvent.targetTouches[0].pageX : e.pageX;\n finalCoord.y = (e.originalEvent.targetTouches) ? e.originalEvent.targetTouches[0].pageY : e.pageY;\n\n var swipedir;\n\n // We need to check if the element to which the event was bound contains a data-xthreshold | data-vthreshold:\n var ele_x_threshold = ($this.parent().data('xthreshold')) ? $this.parent().data('xthreshold') : $this.data('xthreshold'),\n ele_y_threshold = ($this.parent().data('ythreshold')) ? $this.parent().data('ythreshold') : $this.data('ythreshold'),\n h_threshold = (typeof ele_x_threshold !== 'undefined' && ele_x_threshold !== false && parseInt(ele_x_threshold)) ? parseInt(ele_x_threshold) : settings.swipe_h_threshold,\n v_threshold = (typeof ele_y_threshold !== 'undefined' && ele_y_threshold !== false && parseInt(ele_y_threshold)) ? parseInt(ele_y_threshold) : settings.swipe_v_threshold; \n \n if (originalCoord.y > finalCoord.y && (originalCoord.y - finalCoord.y > v_threshold)) {\n swipedir = 'swipeup';\n }\n if (originalCoord.x < finalCoord.x && (finalCoord.x - originalCoord.x > h_threshold)) {\n swipedir = 'swiperight';\n }\n if (originalCoord.y < finalCoord.y && (finalCoord.y - originalCoord.y > v_threshold)) {\n swipedir = 'swipedown';\n }\n if (originalCoord.x > finalCoord.x && (originalCoord.x - finalCoord.x > h_threshold)) {\n swipedir = 'swipeleft';\n }\n if (swipedir != undefined && started) {\n originalCoord.x = 0;\n originalCoord.y = 0;\n finalCoord.x = 0;\n finalCoord.y = 0;\n started = false;\n\n // Read event data into our endEvnt:\n var origEvent = e.originalEvent;\n var endEvnt = {\n 'position': {\n 'x': (settings.touch_capable) ? origEvent.touches[0].screenX : e.screenX,\n 'y': (settings.touch_capable) ? origEvent.touches[0].screenY : e.screenY\n },\n 'offset': {\n 'x': (settings.touch_capable) ? Math.round(origEvent.changedTouches[0].pageX - ($this.offset() ? $this.offset().left : 0)) : Math.round(e.pageX - ($this.offset() ? $this.offset().left : 0)),\n 'y': (settings.touch_capable) ? Math.round(origEvent.changedTouches[0].pageY - ($this.offset() ? $this.offset().top : 0)) : Math.round(e.pageY - ($this.offset() ? $this.offset().top : 0))\n },\n 'time': Date.now(),\n 'target': e.target\n };\n\n // Calculate the swipe amount (normalized):\n var xAmount = Math.abs(startEvnt.position.x - endEvnt.position.x),\n yAmount = Math.abs(startEvnt.position.y - endEvnt.position.y);\n\n var touchData = {\n 'startEvnt': startEvnt,\n 'endEvnt': endEvnt,\n 'direction': swipedir.replace('swipe', ''),\n 'xAmount': xAmount,\n 'yAmount': yAmount,\n 'duration': endEvnt.time - startEvnt.time\n };\n hasSwiped = true;\n $this.trigger('swipe', touchData).trigger(swipedir, touchData);\n }\n }", "function isTouchDevice() {\n var el = document.createElement('div');\n el.setAttribute('ongesturestart', 'return;');\n if(typeof el.ongesturestart == \"function\"){\n return true;\n }else {\n return false\n }\n}", "function isTouchDevice() {\n return 'ontouchstart' in window // works on most browsers \n || navigator.maxTouchPoints; // works on IE10/11 and Surface\n}", "function touchStartHandler(e) {\n //stopping the auto scroll to adjust to a section\n if (options.fitToSection) {\n activeAnimation = false;\n }\n\n if (isReallyTouch(e)) {\n var touchEvents = getEventsPage(e);\n touchStartY = touchEvents.y;\n touchStartX = touchEvents.x;\n }\n }", "function initTouch()\n\t\t\t{\n\t\t\t\tvar startX,\n\t\t\t\t\tstartY,\n\t\t\t\t\ttouchStartX,\n\t\t\t\t\ttouchStartY,\n\t\t\t\t\tmoved,\n\t\t\t\t\tmoving = false;\n \n\t\t\t\tcontainer.unbind('touchstart.jsp touchmove.jsp touchend.jsp click.jsp-touchclick').bind(\n\t\t\t\t\t'touchstart.jsp',\n\t\t\t\t\tfunction(e)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar touch = e.originalEvent.touches[0];\n\t\t\t\t\t\tstartX = contentPositionX();\n\t\t\t\t\t\tstartY = contentPositionY();\n\t\t\t\t\t\ttouchStartX = touch.pageX;\n\t\t\t\t\t\ttouchStartY = touch.pageY;\n\t\t\t\t\t\tmoved = false;\n\t\t\t\t\t\tmoving = true;\n\t\t\t\t\t}\n\t\t\t\t).bind(\n\t\t\t\t\t'touchmove.jsp',\n\t\t\t\t\tfunction(ev)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!moving) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tvar touchPos = ev.originalEvent.touches[0],\n\t\t\t\t\t\t\tdX = horizontalDragPosition, dY = verticalDragPosition;\n\t\t\t\t\t\t\n\t\t\t\t\t\tjsp.scrollTo(startX + touchStartX - touchPos.pageX, startY + touchStartY - touchPos.pageY);\n\t\t\t\t\t\t\n\t\t\t\t\t\tmoved = moved || Math.abs(touchStartX - touchPos.pageX) > 5 || Math.abs(touchStartY - touchPos.pageY) > 5;\n\t\t\t\t\t\t\n\t\t\t\t\t\t// return true if there was no movement so rest of screen can scroll\n\t\t\t\t\t\treturn dX == horizontalDragPosition && dY == verticalDragPosition;\n\t\t\t\t\t}\n\t\t\t\t).bind(\n\t\t\t\t\t'touchend.jsp',\n\t\t\t\t\tfunction(e)\n\t\t\t\t\t{\n\t\t\t\t\t\tmoving = false;\n\t\t\t\t\t\t/*if(moved) {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}*/\n\t\t\t\t\t}\n\t\t\t\t).bind(\n\t\t\t\t\t'click.jsp-touchclick',\n\t\t\t\t\tfunction(e)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(moved) {\n\t\t\t\t\t\t\tmoved = false;\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t}", "function initTouch()\n\t\t\t{\n\t\t\t\tvar startX,\n\t\t\t\t\tstartY,\n\t\t\t\t\ttouchStartX,\n\t\t\t\t\ttouchStartY,\n\t\t\t\t\tmoved,\n\t\t\t\t\tmoving = false;\n \n\t\t\t\tcontainer.unbind('touchstart.jsp touchmove.jsp touchend.jsp click.jsp-touchclick').bind(\n\t\t\t\t\t'touchstart.jsp',\n\t\t\t\t\tfunction(e)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar touch = e.originalEvent.touches[0];\n\t\t\t\t\t\tstartX = contentPositionX();\n\t\t\t\t\t\tstartY = contentPositionY();\n\t\t\t\t\t\ttouchStartX = touch.pageX;\n\t\t\t\t\t\ttouchStartY = touch.pageY;\n\t\t\t\t\t\tmoved = false;\n\t\t\t\t\t\tmoving = true;\n\t\t\t\t\t}\n\t\t\t\t).bind(\n\t\t\t\t\t'touchmove.jsp',\n\t\t\t\t\tfunction(ev)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!moving) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tvar touchPos = ev.originalEvent.touches[0],\n\t\t\t\t\t\t\tdX = horizontalDragPosition, dY = verticalDragPosition;\n\t\t\t\t\t\t\n\t\t\t\t\t\tjsp.scrollTo(startX + touchStartX - touchPos.pageX, startY + touchStartY - touchPos.pageY);\n\t\t\t\t\t\t\n\t\t\t\t\t\tmoved = moved || Math.abs(touchStartX - touchPos.pageX) > 5 || Math.abs(touchStartY - touchPos.pageY) > 5;\n\t\t\t\t\t\t\n\t\t\t\t\t\t// return true if there was no movement so rest of screen can scroll\n\t\t\t\t\t\treturn dX == horizontalDragPosition && dY == verticalDragPosition;\n\t\t\t\t\t}\n\t\t\t\t).bind(\n\t\t\t\t\t'touchend.jsp',\n\t\t\t\t\tfunction(e)\n\t\t\t\t\t{\n\t\t\t\t\t\tmoving = false;\n\t\t\t\t\t\t/*if(moved) {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}*/\n\t\t\t\t\t}\n\t\t\t\t).bind(\n\t\t\t\t\t'click.jsp-touchclick',\n\t\t\t\t\tfunction(e)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(moved) {\n\t\t\t\t\t\t\tmoved = false;\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t}", "function onTouchStart( event ) {\n event.preventDefault();\n\n prevX = snake_array[ 0 ].position.x;\n prevY = snake_array[ 0 ].position.y;\n}", "function isTouchDevice() {\n return true == (\"ontouchstart\" in window || window.DocumentTouch && document instanceof DocumentTouch);\n }", "function isTouch () {\n\t\t\treturn !!( ( 'ontouchstart' in window ) || window.DocumentTouch && document instanceof DocumentTouch );\n\t\t}", "onDocumentTouchStart(event) {\n event.preventDefault();\n event.clientX = event.touches[0].clientX;\n event.clientY = event.touches[0].clientY;\n this.onDocumentMouseDown(event);\n }", "function isTouchDevice(){\n\treturn \"ontouchstart\" in window;\n}", "control(){\n document.addEventListener(\"mousemove\", (e) => {\n this.mouse_x = e.clientX;\n this.mouse_y = e.clientY;\n })\n\n document.addEventListener(\"touchmove\", (e) => {\n this.mouse_x = e.touches[0].clientX+30; //Ajuste para a nave ficar a frente do dedo\n this.mouse_y = e.touches[0].clientY;\n })\n\n document.addEventListener(\"click\", (e) => {\n if(e.button == 0){\n this.shotFire();\n }\n })\n\n document.addEventListener(\"touchstart\", (e) => {\n this.shotFire();\n })\n }", "function touchStart(event) {\n var touch = event.originalEvent.targetTouches[0];\n originalCoord.x = touch.pageX;\n originalCoord.y = touch.pageY;\n }", "initGestures() {\n let touchstartX = 0;\n let touchstartY = 0;\n let touchendX = 0;\n let touchendY = 0;\n\n const swipeArea = document.querySelector(this.selector);\n\n ['touchstart', 'mousedown'].forEach( (event) => {\n swipeArea.addEventListener(event, (event) => {\n if(event.type != 'mousedown') {\n touchstartX = event.changedTouches[0].screenX;\n touchstartY = event.changedTouches[0].screenY;\n } else {\n touchstartX = event.screenX;\n touchstartY = event.screenY;\n }\n })\n });\n\n ['touchend', 'mouseup'].forEach( (event) => {\n swipeArea.addEventListener(event, (event) => {\n if(event.type != 'mouseup') {\n touchendX = event.changedTouches[0].screenX;\n touchendY = event.changedTouches[0].screenY;\n } else {\n touchendX = event.screenX;\n touchendY = event.screenY;\n }\n\n if (touchendX < touchstartX) {\n this.nextSlide();\n }\n\n if (touchendX > touchstartX) {\n this.previousSlide();\n }\n })\n });\n }", "function hasTouchSupport(){var support={},events=['touchstart','touchmove','touchend'],el=document.createElement('div'),i;try{for(i=0;i<events.length;i++){var eventName=events[i];eventName='on'+eventName;var isSupported=eventName in el;if(!isSupported){el.setAttribute(eventName,'return;');isSupported=typeof el[eventName]=='function';}support[events[i]]=isSupported;}return support.touchstart&&support.touchend&&support.touchmove;}catch(err){return false;}}", "onTouchStart(ev) {\n this._lastTouchY = ev.touches[0].pageY;\n }", "handletouchstart(e) {\n var touch = e.touches[0];\n var mouseEvent = new MouseEvent(\"mousedown\", {\n clientX: touch.clientX,\n clientY: touch.clientY\n })\n this.canvas.dispatchEvent(mouseEvent);\n e.preventDefault();\n }", "function touchStart(event,passedName) {\n\t\t// disable the standard ability to select the touched object\n\t\tevent.preventDefault();\n\t\t// get the total number of fingers touching the screen\n\t\tfingerCount = event.touches.length;\n\t\t// since we're looking for a swipe (single finger) and not a gesture (multiple fingers),\n\t\t// check that only one finger was used\n\t\tif ( fingerCount == 1 ) {\n\t\t\t// get the coordinates of the touch\n\t\t\tstartX = event.touches[0].pageX;\n\t\t\tstartY = event.touches[0].pageY;\n\t\t\t// store the triggering element ID\n\t\t\ttriggerElementID = passedName;\n\t\t} else {\n\t\t\t// more than one finger touched so cancel\n\t\t\ttouchCancel(event);\n\t\t}\n\t}", "function isTouchDevice(){\n\t return true == (\"ontouchstart\" in window || window.DocumentTouch && document instanceof DocumentTouch);\n\t}", "function isTouchDevice() { return false; }", "function isTouchDevice() { return false; }", "function onDocumentTouchStart( event ) {\n\tevent.preventDefault();\n\tevent.clientX = event.touches[0].clientX;\n\tevent.clientY = event.touches[0].clientY;\n\tonDocumentMouseDown( event );\n}", "function detectTouch() {\n\t\tif (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {\n\t\t\t$isTouch = true;\n\t\t}\n\t}", "function initTouch()\n {\n var startX,\n startY,\n touchStartX,\n touchStartY,\n moved,\n moving = false;\n \n container.unbind('touchstart.jsp touchmove.jsp touchend.jsp click.jsp-touchclick').bind(\n 'touchstart.jsp',\n function(e)\n {\n var touch = e.originalEvent.touches[0];\n startX = contentPositionX();\n startY = contentPositionY();\n touchStartX = touch.pageX;\n touchStartY = touch.pageY;\n moved = false;\n moving = true;\n }\n ).bind(\n 'touchmove.jsp',\n function(ev)\n {\n if(!moving) {\n return;\n }\n \n var touchPos = ev.originalEvent.touches[0],\n dX = horizontalDragPosition, dY = verticalDragPosition;\n \n jsp.scrollTo(startX + touchStartX - touchPos.pageX, startY + touchStartY - touchPos.pageY);\n \n moved = moved || Math.abs(touchStartX - touchPos.pageX) > 5 || Math.abs(touchStartY - touchPos.pageY) > 5;\n \n // return true if there was no movement so rest of screen can scroll\n return dX == horizontalDragPosition && dY == verticalDragPosition;\n }\n ).bind(\n 'touchend.jsp',\n function(e)\n {\n moving = false;\n /*if(moved) {\n return false;\n }*/\n }\n ).bind(\n 'click.jsp-touchclick',\n function(e)\n {\n if(moved) {\n moved = false;\n return false;\n }\n }\n );\n }", "function touchStartHandler(event){\r\n var e = event.originalEvent;\r\n\r\n //stopping the auto scroll to adjust to a section\r\n if(options.fitToSection){\r\n $htmlBody.stop();\r\n }\r\n\r\n if(isReallyTouch(e)){\r\n var touchEvents = getEventsPage(e);\r\n touchStartY = touchEvents.y;\r\n touchStartX = touchEvents.x;\r\n }\r\n }" ]
[ "0.7243683", "0.7212225", "0.71088994", "0.6880552", "0.68432915", "0.67745405", "0.6766479", "0.6712462", "0.67077667", "0.66906124", "0.6627603", "0.6618286", "0.66029423", "0.6602247", "0.6599169", "0.659905", "0.6591762", "0.6589915", "0.65894437", "0.6588183", "0.6574261", "0.6574261", "0.6574261", "0.6574261", "0.6566784", "0.6554175", "0.65488005", "0.6544256", "0.64884293", "0.64726543", "0.64701676", "0.64568293", "0.64568293", "0.64568293", "0.64568293", "0.64568293", "0.64568293", "0.64568293", "0.64568293", "0.64568293", "0.64568293", "0.6454905", "0.64537567", "0.64488536", "0.6447047", "0.6442932", "0.64428777", "0.6436721", "0.6436721", "0.6436721", "0.6436721", "0.6419466", "0.64075446", "0.64073163", "0.6404005", "0.6365545", "0.63624614", "0.6347076", "0.6319183", "0.6316095", "0.6315355", "0.6300699", "0.6300699", "0.6300699", "0.6299521", "0.6298635", "0.6298635", "0.6298361", "0.6296668", "0.62953943", "0.62931424", "0.6291252", "0.62901586", "0.62875795", "0.6286898", "0.6286061", "0.62780213", "0.6272846", "0.6268682", "0.6260935", "0.62548393", "0.62548393", "0.62412965", "0.6240309", "0.62401915", "0.6239561", "0.623781", "0.6236585", "0.6236149", "0.6235696", "0.62149674", "0.61892676", "0.6186521", "0.61836493", "0.61757463", "0.61747503", "0.61747503", "0.6173344", "0.6167855", "0.6167024", "0.6161265" ]
0.0
-1
Ajax Call for Username Forgot Page.
function UsernameAjaxMethod() { var user = $("#usernameCheck").val(); $.ajax({ type: "POST", url: "Login.aspx/UsernameForgotPageMethod", data: "{Forgotuser: '" + user + "'}", dataType: "json", contentType: "application/json; charset=utf-8", success: function (response) { $('.UsernameCheck').fadeOut(function () { $('.ContactCheck').fadeIn(700); }); }, error: function () { if (user == "") { $('#ErrorUser').text("Username is Empty"); $('#ErrorUser').css({ 'color': 'red', 'font-weight': 'bold', 'margin-top': '-15px', 'margin-bottom': '20px', 'font-size': '15px' }); $('#ErrorUser').addClass('animated shake'); return false; } else { $('#ErrorUser').text("Username is incorrect, if you have forgot your username, you are not able to go forward, you can contact from the Website Owner (+923159382193) regarding you account's unlock."); $('#ErrorUser').css({ 'color': 'red', 'font-weight': 'bold', 'margin-top': '-15px', 'margin-bottom': '2', 'font-size': '15px' }); $('#ErrorUser').addClass('animated shake'); } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function reset_password()\n{\n\tvar username=$('#username').val();\n\tif(username=='')\n\t{\n\t\talert('please enter email id');\n\t}\n\telse\n\t{\n\t\t$.ajax({\n\t\t\t\ttype: \"POST\",\n\t\t\t\turl:\"http://codeuridea.net/kidssitter/resetting/send-email\",\n\t\t\t\tdata:{'username':$('#username').val()},\n\t\t\t\tdataType: \"json\",\n\t\t\t\tcrossDomain: true\n\t\t\t});\n\t}\n}", "function submitForgotUsername(){\n\ttry{\n\t\tvar license = $.txtfieldLicense.value;\n\t\tlicense = license.replace(/&(?!amp;)/g, '&amp;'​);\n\t var\tmail = $.txtfieldMail.value;\n\t var\temiratesid = $.txtfieldEmirateId.value.replace(/[-]/gi, \"\");\n\t Ti.API.info('emiratesid '+emiratesid);\n\t var\tmobile = $.txtfieldMobile.value.replace(/[-]/gi, \"\");\n\t var\tpassport = $.txtfieldPassport.value;\n\t passport = passport.replace(/&(?!amp;)/g, '&amp;'​);\n\t var lblEmiratesPassport;\n\t \n\tif($.imgIndividual.image === Alloy.Globals.path.radioActive){\n\t\tif(emiratesid === \"\" && passport === \"\"){\n\t\t\tutilities.showAlert(Alloy.Globals.selectedLanguage.forgotUsername,Alloy.Globals.selectedLanguage.validateHintText,function(){});\n\t\t}else if(mail === \"\"){\n\t\t \tutilities.showAlert(Alloy.Globals.selectedLanguage.forgotUsername,Alloy.Globals.selectedLanguage.mailId,function(){});\n\t\t}else if(mobile === \"\"){\n\t\t utilities.showAlert(Alloy.Globals.selectedLanguage.forgotUsername,Alloy.Globals.selectedLanguage.mobileNumber,function(){});\n\t\t}else if (emiratesid !== \"\" && emiratesid.length < 15) {\n\t\t\t$.txtfieldEmirateId.value = \"\";\n\t\t \tutilities.showAlert(Alloy.Globals.selectedLanguage.forgotUsername,Alloy.Globals.selectedLanguage.invalidEmiratesId,function(){});\n\t\t}\n\t\telse if (mobile.length !== 10 && mobile.value !== \"\") {\n\t\t \tutilities.showAlert(Alloy.Globals.selectedLanguage.forgotUsername,Alloy.Globals.selectedLanguage.mobileLength,function(){});\n\t\t}else{\n\t\t\ttry{\n\t\t\t\tlblEmiratesPassport = (emiratesid !== \"\")?emiratesid:passport;\n\t\t\t\thttpManager.forgetUsername(function(result){\n\t\t\t\tvar rootNode = result.getElementsByTagName(\"output\");\n\t\t\t\tvar ns =\"http://ForgetUserName\";\n\t\t\t\t//var subNode = result.response.getElementsByTagNameNS(\"ns1:Status\");\n\t\t\t\tif(rootNode.length > 0){\n\t\t\t\t\tvar status = result.getElementsByTagNameNS(ns, \"Status\").item(0).textContent;\n\t\t\t\t\t\n\t\t\t\t\tif(status === \"Success\"){\n\t\t\t\t\t\tAlloy.Globals.hideLoading();\n\t\t\t\t\t\tvar alertView = Ti.UI.createAlertDialog({\n\t\t\t\t\t\t\ttitle : Alloy.Globals.selectedLanguage.appTitle,\n\t\t\t\t\t\t\tmessage : (Alloy.Globals.isEnglish)?result.getElementsByTagNameNS(ns, \"Message_EN\").item(0).textContent:result.getElementsByTagNameNS(ns, \"Message_AR\").item(0).textContent,\n\t\t\t\t\t\t\tbuttonNames : [Alloy.Globals.selectedLanguage.ok]\n\t\t\t\t\t\t});\n\t\t\t\t\t\talertView.addEventListener('click', function(e) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (e.index == 0) {\n\t\t\t\t\t\t\t\tvar winMenu = Alloy.createController('UserManagement/winLogin',{\n\t\t\t\t\t\t\t\t\tisFromLeftPanel : false\n\t\t\t\t\t\t\t\t}).getView();\n\t\t\t\t\t\t\t\tAlloy.Globals.openWindow(winMenu);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\talertView.show();\n\t\t\t\t\t}else if(status === \"Failure\"){\n\t\t\t \t\t\tAlloy.Globals.hideLoading();\n\t\t\t \t\t\tvar alertView = Ti.UI.createAlertDialog({\n\t\t\t\t\t\t\t\ttitle : Alloy.Globals.selectedLanguage.appTitle,\n\t\t\t\t\t\t\t\tmessage : (Alloy.Globals.isEnglish)?result.getElementsByTagNameNS(ns, \"Message_EN\").item(0).textContent:result.getElementsByTagNameNS(ns, \"Message_AR\").item(0).textContent,\n\t\t\t\t\t\t\t\tbuttonNames : [Alloy.Globals.selectedLanguage.ok]\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\talertView.show();\n\t\t\t \t\t}\n\t\t\t\t}else{\n\t\t \t\tvar alertView = Ti.UI.createAlertDialog({\n\t\t\t\t\t\ttitle : Alloy.Globals.selectedLanguage.appTitle,\n\t\t\t\t\t\tmessage : Alloy.Globals.selectedLanguage.serviceError,\n\t\t\t\t\t\tbuttonNames : [Alloy.Globals.selectedLanguage.ok]\n\t\t\t\t });\n\t\t\t\t alertView.show();\n\t\t \t Alloy.Globals.hideLoading();\n\t\t \t}\n\t\t\t\tAlloy.Globals.hideLoading();\n\t\t\t},1,mail,mobile,lblEmiratesPassport);\n\t\t\t}catch(e){\n\t\t\t\tTi.API.info('Error '+e.message);\n\t\t\t}\n\t\t}\n\t}else if($.imgEstablishment.image === Alloy.Globals.path.radioActive){\n\t\tif(license === \"\"){\n\t\t utilities.showAlert(Alloy.Globals.selectedLanguage.forgotUsername,Alloy.Globals.selectedLanguage.licenseNumber,function(){});\n\t }else if(mail === \"\"){\n\t\t \tutilities.showAlert(Alloy.Globals.selectedLanguage.forgotUsername,Alloy.Globals.selectedLanguage.mailId,function(){});\n\t\t}else if(mobile === \"\"){\n\t\t utilities.showAlert(Alloy.Globals.selectedLanguage.forgotUsername,Alloy.Globals.selectedLanguage.mobileNumber,function(){});\n\t\t}\n\t\t// else if (isNaN(mobile)) {\n\t\t \t// utilities.showAlert(Alloy.Globals.selectedLanguage.forgotUsername,Alloy.Globals.selectedLanguage.invalidMobile,function(){});\n\t\t// }\n\t\telse if (mobile.length !== 10 && mobile.value !== \"\") {\n\t\t \tutilities.showAlert(Alloy.Globals.selectedLanguage.forgotUsername,Alloy.Globals.selectedLanguage.mobileLength,function(){});\n\t\t}else{\n\t\t\ttry{\n\t\t\t\thttpManager.forgetUsername(function(result){\n\t\t\t\tvar rootNode = result.getElementsByTagName(\"output\");\n\t\t\t\tvar ns =\"http://ForgetUserName\";\n\t\t\t\t//var subNode = result.getElementsByTagName(\"ns1:Status\");\n\t\t\t\tvar ns =\"http://ForgetUserName\";\n\t\t \tif(rootNode.length > 0){\n\t\t \t\t\t \t\t\n\t\t \t\tvar status = result.getElementsByTagNameNS(ns, \"Status\").item(0).textContent;\n\t\t \t\t\n\t\t \t\tif(status === \"Success\"){\n\t\t \t\t\t\n\t\t \t\t\tvar alert = Ti.UI.createAlertDialog({\n\t\t\t\t\t\t\ttitle : Alloy.Globals.selectedLanguage.appTitle,\n\t\t\t\t\t\t\tmessage : (Alloy.Globals.isEnglish)?result.getElementsByTagNameNS(ns, \"Message_EN\").item(0).textContent:result.getElementsByTagNameNS(ns, \"Message_AR\").item(0).textContent,\n\t\t\t\t\t\t\tbuttonNames : [Alloy.Globals.selectedLanguage.ok]\n\t\t\t\t\t\t});\n\t\t\t\t\t\talert.addEventListener('click', function(e) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (e.index == 0) {\n\t\t\t\t\t\t\t\tvar winMenu = Alloy.createController('UserManagement/winLogin',{\n\t\t\t\t\t\t\t\t\tisFromLeftPanel : false\n\t\t\t\t\t\t\t\t}).getView();\n\t\t\t\t\t\t\t\tAlloy.Globals.openWindow(winMenu);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\talert.show();\n\t\t \t\t}else if(status === \"Failure\"){\n\t\t\t \t\t\tAlloy.Globals.hideLoading();\n\t\t\t \t\t\tvar alert = Ti.UI.createAlertDialog({\n\t\t\t\t\t\t\t\ttitle : Alloy.Globals.selectedLanguage.appTitle,\n\t\t\t\t\t\t\t\tmessage : (Alloy.Globals.isEnglish)?result.getElementsByTagNameNS(ns, \"Message_EN\").item(0).textContent:result.getElementsByTagNameNS(ns, \"Message_AR\").item(0).textContent,\n\t\t\t\t\t\t\t\tbuttonNames : [Alloy.Globals.selectedLanguage.ok]\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\talert.show();\n\t\t\t \t}\n\t\t \t}else{\n\t\t \t\tvar alert = Ti.UI.createAlertDialog({\n\t\t\t\t\ttitle : Alloy.Globals.selectedLanguage.appTitle,\n\t\t\t\t\t//title:\"tset\",\n\t\t\t\t\tmessage : Alloy.Globals.selectedLanguage.serviceError,\n\t\t\t\t\tbuttonNames : [Alloy.Globals.selectedLanguage.ok]\n\t\t\t\t });\n\t\t\t\t alert.show();\n\t\t \t Alloy.Globals.hideLoading();\n\t\t \t}\n\t\t \tAlloy.Globals.hideLoading();\n\t\t\t},2,mail,mobile,license);\n\t\t\t}catch(e){\n\t\t\t\tTi.API.info('Error '+e.message);\n\t\t\t}\n\t\t}\n\t}\n\t}catch(e){\n\t\tTi.API.info('Error in submit forget data function '+JSON.stringify(e));\n\t}\n}", "function ajaxUsername(){\r\n\tif($(\"#username\").val()!=\"\"){\r\n\t\t$.ajax(\"/register/user/\",{\r\n\t\t\tdata:{username:$(\"#username\").val()},\r\n\t\t\ttype:\"GET\",\r\n\t\t\tdataType:\"text\",\r\n\t\t\tsuccess: function(data){\r\n\t\t\t\tif(data==\"true\"){\r\n\t\t\t\t\tsuccessMsg($(\"#username\"));\r\n\t\t\t\t} else {\r\n\t\t\t\t\tspecError($(\"#username\"),\"username in use\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n}", "checkUsername(username, email, for_user_id) {\n\n return Nilavu.ajax('/users/check_email', {\n data: {\n username,\n email,\n for_user_id\n }\n });\n }", "function forgotPassword() { \n\n\t\t\t$( \"#load\" ).show();\n\t\t\t\n\t\t\tvar form = new FormData(document.getElementById('reset_form'));\n\t\t\t\n\t\t\tvar validate_url = $('#reset_form').attr('action');\n\t\t\t\n\t\t\t$.ajax({\n\t\t\t\ttype: \"POST\",\n\t\t\t\turl: validate_url,\n\t\t\t\t//data: dataString,\n\t\t\t\tdata: form,\n\t\t\t\t//dataType: \"json\",\n\t\t\t\tcache : false,\n\t\t\t\tcontentType: false,\n\t\t\t\tprocessData: false,\n\t\t\t\tsuccess: function(data){\n\n\t\t\t\t\t\n\t\t\t\t\tif(data.success == true ){\n\t\t\t\t\t\t\n\t\t\t\t\t\t$( \"#load\" ).hide();\n\t\t\t\t\t\t$(\"input\").val('');\n\t\t\t\t\t\t\n\t\t\t\t\t\t$(\".forgot-password-box\").html(data.notif);\n\t\n\t\t\t\t\t\tsetTimeout(function() { \n\t\t\t\t\t\t\t//$(\"#notif\").slideUp({ opacity: \"hide\" }, \"slow\");\n\t\t\t\t\t\t\t//window.location.reload(true);\n\t\t\t\t\t\t}, 2000); \n\n\t\t\t\t\t}else if(data.success == false){\n\t\t\t\t\t\t$( \"#load\" ).hide();\n\t\t\t\t\t\t$(\"#notif\").html(data.notif);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t},error: function(xhr, status, error) {\n\t\t\t\t\t$( \"#load\" ).hide();\n\t\t\t\t},\n\t\t\t});\n\t\t\treturn false;\n\t\t}", "function cancelForgotUsername(){\n\tcloseWindow();\n}", "function forgotPassword(divid,url,mailid,type,fid){\n\t var emailvalue=document.getElementById(mailid).value;\n\t \n\t\t\t emailvalue=rm_trim(emailvalue);\n\t\t\t if(emailvalue==''){\n\t\t\t alert(\"Please Enter Email\");\n\t\t\t document.getElementById(mailid).focus();\n\t\t\t return false;\n\t\t\t }\n\t\t\t else if(!emailValidator(emailvalue)){\n\t\t\t\t\talert(\"Invalid Email \");\n\t\t\t\t\tdocument.getElementById(divid).innerHTML=\"\";\n\t\t\t\t\tdocument.getElementById(mailid).value=\"\";\n\t\t\t\t\tocument.getElementById(mailid).focus();\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t }\n\t\t\t\t\t // alert(url);\n\t\t\turl=url+\"&email=\"+emailvalue;\n\t\t\tgetServerResponse(divid,url,\"\",true)\n}", "function vpb_request_password_link()\n{\n\tvar ue_data = $(\"#ue_data\").val();\n\t\n\tif(ue_data == \"\")\n\t{\n\t\t$(\"#ue_data\").focus();\n\t\t$(\"#this_page_errors\").html('<div class=\"vwarning\">'+$(\"#empty_username_field\").val()+'</div>');\n\t\t$('html, body').animate({\n\t\t\tscrollTop: $('#ue_data').offset().top-parseInt(200)+'px'\n\t\t}, 1600);\n\t\treturn false;\n\t} else {\n\t\tvar dataString = {'ue_data': ue_data, 'page':'reset-password-validation'};\n\t\t$.ajax({\n\t\t\ttype: \"POST\",\n\t\t\turl: vpb_site_url+'forget-password',\n\t\t\tdata: dataString,\n\t\t\tcache: false,\n\t\t\tbeforeSend: function() \n\t\t\t{\n\t\t\t\t$(\"#this_page_errors\").html('');\n\t\t\t\t$(\"#disable_or_enable_this_box\").removeClass('enable_this_box');\n\t\t\t\t$(\"#disable_or_enable_this_box\").addClass('disable_this_box');\n\t\t\t\t\n\t\t\t\t$(\"#forgot_password_buttoned\").hide();\n\t\t\t\t$(\"#log_in_status\").html('<center><div align=\"center\"><img style=\"margin-top:-40px;\" src=\"'+vpb_site_url+'img/loadings.gif\" align=\"absmiddle\" alt=\"Loading\" /></div></center>');\n\t\t\t},\n\t\t\tsuccess: function(response)\n\t\t\t{\n\t\t\t\t$(\"#disable_or_enable_this_box\").removeClass('disable_this_box');\n\t\t\t\t$(\"#disable_or_enable_this_box\").addClass('enable_this_box');\n\t\t\n\t\t\t\t$(\"#log_in_status\").html('');\n\t\t\t\t$(\"#forgot_password_buttoned\").show();\n\t\t\t\t\t\n\t\t\t\tvar response_brought = response.indexOf(\"processCompletedStatus\");\n\t\t\t\t$vlog=JSON.parse(response);\n\t\t\t\tif(response_brought != -1)\n\t\t\t\t{\n\t\t\t\t\tif($vlog.processCompletedStatus==true){\n $(\"#ue_data\").val('');\n $(\"#this_page_errors\").html($vlog.response);\n return false;\n\t\t\t\t\t}else{\n setTimeout(function() {\n \twindow.alert(\"To change the password you first need to verify the account by entering the verification code which was sent to your gmail account earlier while sign up in the 'Enter the verification code ... ' field to proceed.\");\n window.location.replace(vpb_site_url+'verification');\n },500);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$(\"#this_page_errors\").html($vlog.response);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}", "function check_username(str,field_name,id){\n\tvar eid =\"#\"+field_name;\n\t$.ajax({\n\t\t\t type: 'POST',\n\t\t\t url: ADMINSITEURL+\"ajax/check_username\",\n\t\t\t data: {st:str,bid:id},\n\t\t\t success: function(response) {\n\t\t\t \tif(!response.status){\n\t\t\t \t\t//alert(eid);\n\t\t\t \t\t$(eid).val('');\n\t\t\t \t\t$(eid).after(\"<span class='form-error' style='color:red;'>\"+response.message+\"</span>\");\n\t\t\t \t}\n\n\t\t\t }\n\t\t })\n}", "function resetPassword(email){\n $.ajax({\n method: 'POST',\n url: \"inc/Auth/forget.php\",\n data: {email: email}\n }).done(function(msg){\n if(msg == 'user issue')\n {\n AJAXloader(false, '#loader-pass-forgot');\n displayMessagesOut();\n $('.error-field').addClass('novisible');\n $('.error-forgot-exist').removeClass('novisible');\n displayError([], '#pass-forgot-form', ['input[name=\"pass-forgot\"]'], '');\n }\n if(msg == 'confirm issue')\n {\n AJAXloader(false, '#loader-pass-forgot');\n displayMessagesOut();\n $('.error-field').addClass('novisible');\n $('.error-forgot-confirm').removeClass('novisible');\n displaySpecial([], '#pass-forgot-form', ['input[name=\"pass-forgot\"]'], '');\n }\n //ce msg est un retour de la fonction de mail et non de la fonction de reset\n if(msg == 'success')\n {\n AJAXloader(false, '#loader-pass-forgot');\n displayMessagesOut();\n $('.error-field').addClass('novisible');\n $('.valid-forgot').removeClass('novisible');\n displaySuccess([], '#pass-forgot-form', ['input[name=\"pass-forgot\"]'], '');\n }\n });\n}", "function checkUsername()\r\n{\r\n var username = document.getElementById(\"userBox\").value;\r\n if(username != \"\") {\r\n \t$.ajax({\r\n \t type: 'POST',\r\n \t url: 'DBFuncs.php',\r\n \t data: { functionName:'checkUsernameReg',argument:[username] },\r\n\t success: function (response){\r\n \t if(response == 0) {\r\n\t \t document.getElementById(\"userMessage\").innerHTML=\"Username is already in use\";\r\n\t }\r\n else {\r\n\t \t document.getElementById(\"userMessage\").innerHTML=\"Username is avaliable\";\r\n\t }\r\n\t }\r\n\t});\r\n }\r\n}", "function checkEmailExist(email,entity_id){\n $.ajax({\n type: \"POST\",\n url: BASEURL+\"backoffice/users/checkEmailExist\",\n data: 'email=' + email +'&entity_id='+entity_id,\n cache: false,\n success: function(html) {\n if(html > 0){\n $('#EmailExist').show();\n $('#EmailExist').html(\"User is already exist with this email id!\"); \n $(':input[type=\"submit\"]').prop(\"disabled\",true);\n } else {\n $('#EmailExist').html(\"\");\n $('#EmailExist').hide(); \n $(':input[type=\"submit\"]').prop(\"disabled\",false);\n }\n },\n error: function(XMLHttpRequest, textStatus, errorThrown) { \n $('#EmailExist').show();\n $('#EmailExist').html(errorThrown);\n }\n });\n}", "function forgotPasswordDetails\n(\n emailID\n)\n{\n var data;\n var username = getEncode(emailID); \n var iv = username.iv; \n username = username.activate;\n \n var dataToSend = \n {\n \"action\" : VALIDATE_USER,\n \"iv\" : JSON.stringify(iv),\n \"encodeUN\" : JSON.stringify(username), \n \"activate\" : false\n }\n \n $.ajax({\n type : \"POST\",\n url : API_URL,\n data : dataToSend, \n dataType : \"json\",\n async : false, \n headers : HEADER,\n error : function (e) \n { \n \n return false;\n },\n success : function(result)\n { \n data = result; \n }\n \n });\n return data;\n}", "function checkUsernames() {\n var inputtedUser = inputUser.val().trim();\n var inputtedZip = inputZip.val().trim();\n console.log(\"Username input: \" + inputtedUser);\n var userString = \"/\" + inputtedUser;\n\n $.get(\"/check-user\" + userString, function(data) {\n console.log(data);\n if (data === null) {\n updateUsername(inputtedUser, inputtedZip)\n }\n\n else {\n nameHelpText.text(\"Sorry. That user exists. Please try again\")\n console.log(\"User exists. Try a different username\")\n renderModal();\n }\n })\n }", "function doRetrieve(){\n\t$j('forgetResult').html('Please Wait... <img src=\"static/loading.gif\"/>').slideDown();\n\t\n\tvar params = prepForQuery(getFormVars('forgot'));\n\t\n\t$j.ajax({\n\t\turl: \"user/forgot\",\n\t\ttype: 'post',\n\t\tdata: params,\n\t\tsuccess: returnForgot\n\t});\n}", "function check_username(username,div,url)\r\n{ //var ruta_imagenes=document.getElementById('ruta_imagenes').value;\r\n\t//document.getElementById( div ).innerHTML='<br><div align=\"center\" style=\"height:100%;\"><i style=\"font-size:large;color:darkred;\" class=\"fa fa-cog fa-spin\"></i></div>';\r\n\tvar data = new FormData();\r\n\tdata.append('event', 'check_username');\t\r\n\tdata.append('username', username);\t\r\n\tvar xhr = new XMLHttpRequest();\r\n\txhr.open('POST', url , true);\r\n\txhr.onreadystatechange=function()\r\n\t{ if (xhr.readyState==4 && xhr.status==200)\r\n\t\t{ $(\"#check_username\").removeClass(\"has-success\");\r\n\t\t\t$(\"#check_username\").removeClass(\"has-error\");\r\n\t\t\t$(\"#check_username\").addClass(xhr.responseText);\r\n\t\t\tif (username==\"\")\r\n\t\t\t\t$(\"#check_username\").removeClass(xhr.responseText);\r\n\t\t}\r\n\t};\r\n\txhr.send(data);\r\n}", "function checkUser() {\r\n // abort previous request, if any\r\n if (uaro != undefined) uaro.abort();\r\n\r\n reset_username_status();\r\n\r\n uaro = $j.ajax({\r\n url: 'checkMemberID.php',\r\n type: 'GET',\r\n data: { 'memberID': $j('#username').val() },\r\n success: function (resp) {\r\n var ua = resp;\r\n if (ua.match(/\\<!-- AVAILABLE --\\>/)) {\r\n reset_username_status('success');\r\n } else {\r\n reset_username_status('error');\r\n }\r\n }\r\n });\r\n}", "function UsernamePasswordTwoCheckAjaxMethod() {\n var user = $(\"#usernameCheck\").val();\n var pwdTwo = $(\"#PasswordTwoCheck\").val();\n $.ajax({\n type: \"POST\",\n url: \"Login.aspx/UsernameAndPasswordTwoCheckForgotPageMethodAjax\",\n data: \"{userCheck:'\" + user + \"', pwdCheck:'\" + pwdTwo + \"'}\",\n dataType: \"json\",\n contentType: \"application/json; charset=utf-8\",\n success: function () {\n $('.PasswordCheck').fadeOut(function () {\n $('.AllisGood').fadeIn(700);\n });\n },\n error: function () {\n if (pwdTwo == \"\") {\n $('#ErrorPwd2').text(\"Password is Empty\");\n $('#ErrorPwd2').css({ 'color': 'red', 'font-weight': 'bold', 'margin-top': '-15px', 'margin-bottom': '20px', 'font-size': '15px' });\n $('#ErrorPwd2').addClass('animated shake');\n return false;\n }\n else\n $('#ErrorPwd2').text(\"Password is Incorrect\");\n }\n });\n}", "function ajaxLoggedInUsername() {\n $.ajax({\n url: USER_LIST_URL,\n data: {\n action: \"username\"\n },\n success: function(username) {\n $.each($(\".username-logged-in\") || [], function(index, element) {\n element.innerHTML = username;\n });\n },\n error: function(relocation) {\n window.location.href = buildUrlWithContextPath(relocation.responseText);\n }\n });\n}", "function UsernamePasswordCheckAjaxMethod() {\n var user = $(\"#usernameCheck\").val();\n var pwd1 = $('#PasswordOneCheck').val();\n $.ajax({\n type: \"POST\",\n url: \"Login.aspx/UsernameAndPasswordOneCheckForgotPageMethod\",\n data: \"{userCheck:'\" + user + \"', pwdCheck:'\" + pwd1 + \"'}\",\n dataType: \"json\",\n contentType: \"application/json; charset=utf-8\",\n success: function () {\n $('.ContactCheck').fadeOut(function () {\n $('.AllisGood').fadeIn(700);\n });\n },\n error: function () {\n if(pwd1 == \"\")\n {\n $('#ErrorPwd1').text(\"Password is Empty\");\n $('#ErrorPwd1').css({ 'color': 'red', 'font-weight': 'bold', 'margin-top': '-15px', 'margin-bottom': '20px', 'font-size': '15px' });\n $('#ErrorPwd1').addClass('animated shake');\n return false;\n }\n else\n $('#ErrorPwd1').text(\"Password is Incorrect\");\n }\n });\n}", "function oldUsernameAjaxValidator() {\n\t\t\t//console.log(\"Executing test ajax function\");\n\t\t\tvar xmlhttp;\n\t\t\tif (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari\n\t\t\t\txmlhttp=new XMLHttpRequest();\n\t\t\t}\n\t\t\telse {// code for IE6, IE5\n\t\t\t\txmlhttp=new ActiveXObject(\"Microsoft.XMLHTTP\");\n\t\t\t}\n\t\t\t//console.log(\"xml request created\");\n\t\t\txmlhttp.onreadystatechange=function() {\n\t\t\t\t//console.log(\"ready state changed\");\n\t\t\t\tif (xmlhttp.readyState==4) {\n\t\t\t\t\tif (xmlhttp.responseText == 1) {\n\t\t\t\t\t\tdocument.getElementById('oldusernamemessage').innerHTML = \"Logged in !!!\";\n\t\t\t\t\t\t\n\t\t\t\t\t\t//Validation successful , now log in the user\n\t\t\t\t\t\tdocument.getElementById('oldUserName').submit();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t//document.getElementById('usernamemessage').innerHTML = xmlhttp.responseText;\n\t\t\t\t\t\tdocument.getElementById('oldusernamemessage').innerHTML = \"Username not found !!!\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\txmlhttp.open(\"POST\",\"oldUsernameValidator.php\",true);\n\t\t\t//console.log(\"POST method set\");\n\t\t\txmlhttp.setRequestHeader(\"Content-type\",\"application/x-www-form-urlencoded\");\n\t\t\t//console.log(\"request header set\");\n\t\t\t//console.log(document.getElementById('oldusername').value);\n\t\t\txmlhttp.send(\"username=\" + document.getElementById('oldusername').value);\n\t\t\t//console.log(\"request sent\");\n\t\t\t\n\t\t}", "function sendEmailForgot() {\n var password = newPss();\n var emailToSendPassword = $(\"#emailSendingInput\").val();\n\n if (!validateForm(emailToSendPassword)) {\n swal(\"טעות\", \"האימייל אינו נכון נסה שנית\", \"warning\");\n $('#emailSendingInput').focus();\n return\n }\n $.ajax({\n type: 'POST',\n url: sendPassByEmail,\n data: {\n email: emailToSendPassword,\n password: password,\n },\n success: function (response) {\n if (response) {\n swal(\"אימייל נשלח\", \"סיסמא חדשה נשלחה לאימייל שצויין\", \"success\");\n $(\"#myForgotPasswordModal\").modal('hide');\n $(\"#myLogin\").modal('hide');\n }\n else\n swal(\"שגיאה\", \"נסיון שליחת אימייל עם סיסמה חדשה נכשל\", \"error\");\n }\n });\n}", "function change_username() {\n\tvar new_username = document.getElementById(\"new_username\").value;\n\tif(new_username == \"\") alert(\"New username field is empty\");\n\t\n\tconst uri = getLink(\"UpdateUsername\");\n\tvar xhr = createRequest(\"POST\", uri);\n\txhr.send(new_username);\n\txhr.onload = function() {\n\t\tif(xhr.status == 409) alert(\"Username already exists\");\n\t\telse if(xhr.status != 200) alert(\"Something went wrong on the server :/\");\n\t\telse {\n\t\t\tlocalStorage.setItem(\"user\", xhr.response);\n\t\t\tuser = JSON.parse(localStorage.getItem(\"user\"));\n\t\t\tconsole.log(user);\n\t\t\tsetUserItems();\n\t\t\tshow_user_content();\n\t\t\tdocument.getElementById(\"new_username\").value = \"\";\n\t\t}\n\t}\n}", "function managePasswordForgotten() {\n\t$('#passwordReset').click(function() { \n\t\t// We must reset the document and send a link to the registered email\n\t\t// to a form where the end user can update the password\n\t\tclearDocument();\n\t\tloadHTML(\"navbar.html\");\n\t\tnavbarHover();\n\t\t$(document.body).append(\"<center><h1>Please fill in the following form !</h1><center>\");\n\t\tloadHTML(\"passwordForgotten.html\");\n\t\tloadJS(\"js/forms.js\");\n formSubmission('#passwordForgotten','generatePasswordLnkRst','Reset email successfully sent','Unknown user');\n loadHTML(\"footer.html\");\n\t});\n}", "function newUsernameAjaxValidator() {\n\t\t\t//console.log(\"Executing test ajax function\");\n\t\t\tvar xmlhttp;\n\t\t\tif (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari\n\t\t\t\txmlhttp=new XMLHttpRequest();\n\t\t\t}\n\t\t\telse {// code for IE6, IE5\n\t\t\t\txmlhttp=new ActiveXObject(\"Microsoft.XMLHTTP\");\n\t\t\t}\n\t\t\t//console.log(\"xml request created\");\n\t\t\txmlhttp.onreadystatechange=function() {\n\t\t\t\t//console.log(\"ready state changed\");\n\t\t\t\tif (xmlhttp.readyState==4) {\n\t\t\t\t\tif (xmlhttp.responseText == 1) {\n\t\t\t\t\t\tdocument.getElementById('newusernamemessage').innerHTML = \"Successful !!!\";\n\t\t\t\t\t\tdocument.getElementById('newUserName').submit();\t\t//8888888888888888\tNew username created , so log the new user in \n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t//document.getElementById('usernamemessage').innerHTML = xmlhttp.responseText;\n\t\t\t\t\t\tdocument.getElementById('newusernamemessage').innerHTML = \"Username already exists !!!\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\txmlhttp.open(\"POST\",\"newUsernameValidator.php\",true);\n\t\t\t//console.log(\"POST method set\");\n\t\t\txmlhttp.setRequestHeader(\"Content-type\",\"application/x-www-form-urlencoded\");\n\t\t\t//console.log(\"request header set\");\n\t\t\t//console.log(document.getElementById('newusername').value);\n\t\t\txmlhttp.send(\"username=\" + document.getElementById('newusername').value);\n\t\t\t//console.log(\"request sent\");\n\t\t\t\n\t\t}", "function postResetPassword(data, textStatus, jqXHR, param) {\n\tvar user = param.user;\n\tvar uiDiv = $('#ui');\n\tuiDiv.html('');\n\tvar p = $('<p>');\n\tuiDiv.append(p);\n\tp.html('The password for \"' + user + '\" has been reset.');\n\tvar ul = $('<ul>');\n\tuiDiv.append(ul);\n\tvar li = $('<li>');\n\tul.append(li);\n\tli.html('New password: \"' + data[user] + '\"');\n}", "function chkLogin_for_existinguser(pBody,email, password, bounceval)\n{\n\tvar urllength = bounceval.length;\n\tvar urlindex = bounceval.lastIndexOf('&page');\n\tif(urlindex != -1){\n\t\tvar bounceval = bounceval.substr(urlindex, urllength);\n\t}\n\txmlHttp=GetXmlHttpObject();\n\tif (xmlHttp==null)\n\t{\n\t\talert (\"Your browser does not support AJAX!\");\n\t\treturn;\n\t}\n\tvar url = host + '/community/exchange_register/welcome.htm?email=' + email + '&password=' + password + '&' +bounceval + '&flag=existuser_new_emailalert'+'&'+pBody;\n\tvardiv='newregistration';\n\txmlHttp.open(\"GET\",url,true);\n\txmlHttp.onreadystatechange=function()\n\t{ \n\t\tregistrationstateChanged(vardiv); \n\t};\n\txmlHttp.send(null);\n}", "function getLoginForm() {\n $.ajax({\n type: \"POST\",\n url: \"Controllers/controller.User.php\",\n data: {locate: \"GetLoginForm\"}\n })\n .done(function(msg) {\n $(\"#loginsubscribefroms\").html(msg);\n });\n\n}", "function fingerprintData(nickname) {\n\n $.ajax({\n type: 'POST',\n url: '/tweb/home/getFingerprint',\n data: {user: nickname},\n beforeSend: function () {\n $(\"#msg\").fadeOut();\n },\n success: function (data) {\n },\n error: function () {\n }\n });\n\n}", "function getProfileForm(userid) {\n $.ajax({\n type: \"POST\",\n url: \"Controllers/controller.User.php\",\n data: {locate: \"GetProfileForm\", userid: userid}\n })\n .done(function(msg) {\n $(\"#loginsubscribefroms\").html(msg);\n });\n\n}", "function nickCheck(){\n\t$.ajax({\n\t\turl : `${getContextPath()}`+\"/nickCheck.do\",\n\t\ttype : \"post\",\n\t\tdataType:\"text\",\n\t\tdata : \"nickcheck=\"+$(\"#nick_name\").val(),\n\t\tsuccess:function(data){\n\t\t\t\n\t\t\tif(data === \"true\"){\n\t\t\t\t$('.nickComentColor span').removeClass('alert-green');\n\t\t\t\t$('.nickComentColor span').addClass('alert-red');\n\t\t\t\tdocument.querySelector(\".nickCheck\").innerHTML = \"사용 중 인 닉네임입니다.\";\n\t\t\t} else {\n\t\t\t\t$('.nickComentColor span').removeClass('alert-red');\n\t\t\t\t$('.nickComentColor span').addClass('alert-green');\n\t\t\t\tdocument.querySelector(\".nickCheck\").innerHTML = \"사용가능한 닉네임입니다.\";\n\t\t\t}\n\n\t\t},\n\t\terror:function(request,status,error){\n\t\t\t\n\t\t}\n\t\t\n\t});\n}", "function unfollow(username) {\n// Send the username to the server\n $.get(\"/users/unfollow/\" + username)\n .done(function () {\n\n // Change the id to follow\n $('#unfollow-btn').attr({\n id: \"follow-btn\"\n })\n // Change the text to follow\n .text(\"Follow\");\n\n\n showMessage(\"You just unfollwed \" + username, ALERT_INFO);\n\n }).fail(function () {\n showMessage(\"Error when trying to follow the user \" + username, ALERT_DANGER)\n })\n}", "function loginUser() {\n var email,\n password;\n email = $(\"#inputEmail3\").val();\n password = $(\"#inputPassword3\").val();\n $.ajax({\n type: \"POST\",\n url: \"Controllers/controller.User.php\",\n data: {locate: 'UserLogin', email: email, password: password}\n })\n .done(function(msg) {\n if (msg === '') {\n noty({\n layout: 'bottom',\n type: 'alert',\n text: 'Your Email or your Password are wrong!',\n dismissQueue: true,\n animation: {\n open: {height: 'toggle'},\n close: {height: 'toggle'},\n easing: 'swing',\n speed: 500\n },\n timeout: 4000\n });\n return;\n }else{\n alert(msg);\n }\n });\n\n}", "function checkUsername(username, location)\r\n{\r\n\tusername = $(\"#\"+username).val();\r\n\t\r\n\t$(\"#\"+location).html(\"<font color = \\\"#85B525\\\">Checking Username . . . </font><img src='../images/loader.gif' name = 'img1' align = 'absmiddle' width='16' height = '11' alt='loading'>\");\r\n\t\t\r\n\t$.post(\"../other_files/checkthisusername.php\",\r\n\t{ username: username },\r\n\t\tfunction(data){\r\n\t\t\r\n\t\tif(data == 100)\r\n\t\t{\r\n\t\t\t$(\"#\"+location).html(\"<font color = \\\"green\\\">Username <b>\"+username+\"</b> Available </font><img src='../images/yes.gif' name = 'img1' align = 'absmiddle' width='18' height = '18' alt='image'>\");\r\n\t\t\r\n\t\t\t$(\"#password1\").focus();\r\n\t\t}\r\n\t\telse if(data == 60)\r\n\t\t{\r\n\t\t\t$(\"#\"+location).html(\"<font color = \\\"red\\\">Username <b>\"+username+\"</b> must be morethan 6 characters </font><img src='../images/no.gif' name = 'img1' align = 'absmiddle' width='18' height = '18' alt='image'>\");\r\n\t\t\r\n\t\t\t$(\"#password1\").focus();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$(\"#\"+location).html(\"<font color = \\\"red\\\">Username <b>\"+username+\"</b> already in use </font><img src='../images/no.gif' name = 'img1' align = 'absmiddle' width='18' height = '18' alt='image'>\");\r\n\t\t\r\n\t\t\t$(\"#password1\").focus();\r\n\t\t}\r\n\t}\r\n\t);\r\n\t\r\n\treturn false;\r\n}", "function existeUser() {\n if (xmlhttp) {\n var valor = document.getElementById(\"nickname\");\n //var valor1=document.getElementById(\"mail\");\n xmlhttp.open(\"POST\", \"cheqUserAjax\", true);\n xmlhttp.onreadystatechange = handleServletPost;\n xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');\n xmlhttp.send(\"op=\" + valor.name + \"&usermail=\" + valor.value);\n\n }\n}", "function checkUsername()\n{\n let user = $$(\"input[name='username']\");\n if (!user.value)\n {\n // No value, clear name\n if (user.focused)\n {\n user.style.backgroundColor = \"rgb(63, 66, 69)\";\n }\n\n hasUserChanged = false;\n return;\n }\n\n if (!hasUserChanged)\n {\n return;\n }\n\n let params =\n {\n type : ProcessRequest.CheckUsername,\n username : user.value\n };\n\n sendHtmlJsonRequest(\"process_request.php\", params, onCheckUsernameResponse, undefined /*failureFunc*/, { lastUsername : user.value });\n\n hasUserChanged = false;\n}", "function getUserForManagePassword(username) {\r\n\tblockUI();\r\n\t$.ajax({\r\n\t\ttype : \"GET\",\r\n\t\turl : \"getUserForResetPassword.do\",\r\n\t\tdata : \"username=\" + username,\r\n\t\tdataType : \"json\",\r\n\t\tcache : false,\r\n\t\tsuccess : function(data) {\r\n\t\t\tunblockUI();\r\n\t\t\tif (data) {\r\n\t\t\t\t$(\"#userSearchRpHidden\").val(username);\r\n\t\t\t\t$(\"#userIdRP\").val(data.userId);\r\n\t\t\t\t$('#userSearchRP').blur(); \r\n\r\n\t\t\t\t$(\"#firstNameRP\").text(data.firstName);\r\n\t\t\t\t$(\"#middleNameRP\").text(data.middleName);\r\n\t\t\t\t$(\"#lastNameRP\").text(data.lastName);\r\n\t\t\t\t$(\"#emailRP\").text(data.emailId);\r\n\t\t\t\t$(\"#contactNumberRP\").text(data.phoneNumber);\r\n\t\t\t\t$(\"#streetRP\").text(data.street);\r\n\t\t\t\t$(\"#cityRP\").text(data.city);\r\n\t\t\t\t$(\"#stateRP\").text(data.state);\r\n\t\t\t\t$(\"#zipRP\").text(data.zip);\r\n\t\t\t\t$(\"#countryRP\").text(data.country);\r\n\r\n\t\t\t\tif (data.pwdHintList[0]) {\r\n\t\t\t\t\t$(\"#question1RP\").text(data.pwdHintList[0].questionValue);\r\n\t\t\t\t\t$(\"#answer1RP\").text(data.pwdHintList[0].answerValue);\r\n\t\t\t\t}\r\n\t\t\t\tif (data.pwdHintList[1]) {\r\n\t\t\t\t\t$(\"#question2RP\").text(data.pwdHintList[1].questionValue);\r\n\t\t\t\t\t$(\"#answer2RP\").text(data.pwdHintList[1].answerValue);\r\n\t\t\t\t}\r\n\t\t\t\tif (data.pwdHintList[2]) {\r\n\t\t\t\t\t$(\"#question3RP\").text(data.pwdHintList[2].questionValue);\r\n\t\t\t\t\t$(\"#answer3RP\").text(data.pwdHintList[2].answerValue);\r\n\t\t\t\t}\r\n\t\t\t\tif (data.userId == 0) {\r\n\t\t\t\t\t$.modal.alert(strings['script.noUserFound']);\r\n\t\t\t\t\t$(\"#userDetailsRP\").attr(\"class\", \"wizard-fieldset fields-list hidden\");\r\n\t\t\t\t\t$(\"#securityQuestionsRP\").attr(\"class\", \"wizard-fieldset fields-list hidden\");\r\n\t\t\t\t\t$(\"#userSearchRP\").attr('readonly', false);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$(\"#userSearchRP\").attr('readonly', true);\r\n\t\t\t\t\t$(\"#userDetailsRP\").attr(\"class\", \"wizard-fieldset fields-list\");\r\n\t\t\t\t\t$(\"#securityQuestionsRP\").attr(\"class\", \"wizard-fieldset fields-list\");\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$.modal.alert(strings['script.noUserFound']);\r\n\t\t\t\t$(\"#userDetailsRP\").attr(\"class\", \"wizard-fieldset fields-list hidden\");\r\n\t\t\t\t$(\"#securityQuestionsRP\").attr(\"class\", \"wizard-fieldset fields-list hidden\");\r\n\t\t\t\t$(\"#userSearchRP\").attr('readonly', false);\r\n\t\t\t}\r\n\t\t},\r\n\t\terror : function(data) {\r\n\t\t\tunblockUI();\r\n\t\t\t$.modal.alert(strings['script.user.search']);\r\n\t\t},\r\n\t\tcomplete : function(data) {\r\n\t\t}\r\n\t});\r\n}", "function onForgotClick()\n\t{\n\t\t$('#forgot_box').toggle(); \n\t}", "function checkVerifiedEmail(email){\r\n// $('#res').html('');\r\n $.ajax({\r\n url: site_url+\"hpp/admin/verified_email?emailID=\"+email,\r\n method:'POST',\r\n data:{ADMIN_EMAIL:email},\r\n success:function(res){\r\n $(\"#res\").html(res);\r\n }\r\n\r\n });\r\n}", "function ksForgotPassword(){\n //check if the form is valid\n if(!$('#forgotpassword').valid()) return;\n \n //put the loading screen on\n loadingScreen();\n \n //create an object to send to varify auth\n var obj=new Object();\n obj.email = $('#forgotpassword input[name=\"email\"]').val();\n \n //send the reset information via ajax\n $.ajax({\n type: \"POST\",\n url: \"/login/resetpassword/\",\n dataType: \"json\",\n data: obj ,\n async: false,\n success: function(res) {\n if (res.items[0].status ==='success'){\n setSuccessToSuccess();\n //loading screen\n removeLoadingScreen();\n\n //display success failure screen\n displaySuccessFailure();\n \n \n $('#glassnoloading').fadeOut('normal');\n \n //change the dialog to be more informative\n $('.registerdialog img').attr(\"src\" , \"/img/success.png\");\n $('.registerdialog * .message').text('Successfully identified your account. A mail was sent to the address you supplied. To proceed with password change follow the link in the mail sent.');\n $('.registerdialog > .front-card').remove();\n \n }\n else{\n setSuccessToFailed();\n //loading screen\n removeLoadingScreen();\n\n //display success failure screen\n displaySuccessFailure();\n\n $('#glassnoloading').fadeOut('normal');\n \n //change the dialog to be more informative\n $('.registerdialog img').attr(\"src\" , \"/img/failed.png\");\n $('.registerdialog * .message').text(res.items[0].msg);\n }\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 //change the dialog to be more informative\n $('.registerdialog img').attr(\"src\" , \"/img/failed.png\");\n $('.registerdialog * .message').text('Error! Connection failure. Try again');\n }\n });\n}", "function notify() {\n\tif (httpRequest.readyState == 4 && httpRequest.status == 200) { // value 'status' equal 200 means request successfully.\n\t\tvar username = document.getElementById(\"username\");\n\t\tvar result = document.getElementById(\"result\");\n\t\tconsole.log(\"responseText=\" + httpRequest.responseText);\n\t\tif (httpRequest.responseText == \"true\") {\n\t\t\tresult.innerHTML = \"*Username is exist! Please enter another username.\";\n\t\t} else {\n\t\t\tif (username.value != \"\") {\n\t\t\t\tresult.innerHTML = \"Account \" + username.value + \" created successfully!\";\t\n\t\t\t}\n\t\t}\n\t}\n}", "function loginRegCall(url) {\n var username = $('#username').val();\n var pass = $('#password').val();\n $.ajax({\n url: url,\n type: 'POST',\n data: {username: username, pass: pass},\n success: function (data) {\n location.reload();\n },\n error: function () {\n }\n });\n}", "function getUserNames(emailId){\r\n\t\tblockUI();\r\n\t\t$.ajax({\r\n\t\t\ttype : \"POST\",\t\r\n\t\t\turl : \"regn/getUserNames.do\",\r\n\t\t\tdata : \"emailId=\"+emailId+\"&CSRFToken=\" + $( \"input[name='CSRFToken']\" ).val(),\r\n\t\t\tdataType : 'json',\r\n\t\t\tcache:false,\r\n\t\t\tsuccess : function(data) {\r\n\t\t\t\tunblockUI();\r\n\t\t\t\tif (data != null ) {\r\n\t\t\t\t\tif( data.sendEmailFlag == \"1\") {\r\n\t\t\t\t\t\t$(\"#invalidEmailMsg\").hide();\r\n\t\t\t\t\t\t$(\"#mailSentNotofication\").show(500);\r\n\t\t\t\t\t\t$(\"#mailSentNotofication\").html(\"<span>UserName has been sent Successfully!! <br/>If you have not received a email, please recheck email id provided or contact the Help Desk.</span>\");\r\n\t\t\t\t\t\t/*var iscrearted = makeuserDom(data);\t\r\n\t\t\t\t\t\tif (iscrearted){\r\n\t\t\t\t\t\t\t$(\"button.submitUser\").text(\"OK\");\r\n\t\t\t\t\t\t}*/\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t//$(\"#mailSentNotofication\").hide();\r\n\t\t\t\t\t\t\t//$(\"#invalidEmailMsg\").show(500);\t\r\n\t\t\t\t\t\t\t//$(\"#invalidEmailMsg\").text(\"There are no users present with this email id. Please retry with the correct email id.\");\r\n\t\t\t\t\t\t\t// changed as per app scan suggestion\r\n\t\t\t\t\t\t\t$(\"#mailSentNotofication\").show(500);\r\n\t\t\t\t\t\t\t$(\"#mailSentNotofication\").html(\"<span>UserName has been sent Successfully!! <br/>If you have not received a email, please recheck email id provided or contact the Help Desk.</span>\");\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\t\t\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$.modal.alert(\"Some error occurred while fetching username.\");\t\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\terror : function(data) {\t\r\n\t\t\t unblockUI();\t\t\t\t\t\r\n\t\t\t $.modal.alert(\"Some error occurred while fetching username.\");\r\n\t\t\t}\r\n\t\t});\r\n\t}", "function onCheckUsernameResponse(response, request)\n{\n let username = $$(\"input[name='username']\");\n if (request.lastUsername !== username.value)\n {\n return;\n }\n\n // Username hasn't changed\n if (response.value == \"1\")\n {\n // It's available!\n username.style.backgroundColor = \"rgb(63, 100, 69)\";\n username.title = \"Username available\";\n }\n else\n {\n // It exists!\n username.style.backgroundColor = \"rgb(100, 66, 69)\";\n username.title = \"Username already exists\";\n }\n}", "function signUp() {\n\n /* gathers the username and password*/\n var username = $('#sign-up-username').val();\n var password = $('#sign-up-password').val();\n /* resets the input fields */\n $('#sign-up-username').val('');\n $('#sign-up-password').val('');\n var signUpURL = 'http://web.cs.georgefox.edu/comment/ldelamotte17/user/' + username;\n\n $.ajax({\n type: 'POST', \n url: signUpURL,\n dataType: 'json',\n contentType: 'application/json',\n data: JSON.stringify({\n password: password\n }),\n crossDomain: true,\n success: function() {\n if (password.length == 0 || username.length == 0) {\n openErrorModal();\n }\n else {\n $(\"#open-sign-up-modal\").remove();\n }\n },\n error: openErrorModal\n })\n\n}", "function ajaxEmail(){\r\n\tif($(\"#email\").val()!=\"\"){\r\n\t\t$.ajax(\"/register/email/\",{\r\n\t\t\tdata:{email:$(\"#email\").val()},\r\n\t\t\ttype:\"GET\",\r\n\t\t\tdataType:\"text\",\r\n\t\t\tsuccess: function(data){\r\n\t\t\t\tif(data==\"true\"){\r\n\t\t\t\t\tsuccessMsg($(\"#email\"));\r\n\t\t\t\t} else {\r\n\t\t\t\t\tspecError($(\"#email\"),\"email in use\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n}", "function UserNameValidator(username)\n{\nvar httpxml;\ntry\n{\n// Firefox, Opera 8.0+, Safari\nhttpxml=new XMLHttpRequest();\n}\ncatch (e)\n{\n// Internet Explorer\ntry\n{\nhttpxml=new ActiveXObject(\"Msxml2.XMLHTTP\");\n}\ncatch (e)\n{\ntry\n{\nhttpxml=new ActiveXObject(\"Microsoft.XMLHTTP\");\n}\ncatch (e)\n{\nalert(\"Your browser does not support AJAX!\");\nreturn false;\n}\n}\n}\nfunction stateck()\n{\nif(httpxml.readyState==4)\n{\ndocument.getElementById(\"UserNameError\").innerHTML=httpxml.responseText;\n\n}\n}\n\nurl=\"validation/username-validation.php\";\nurl=url+\"?username=\"+username;\nhttpxml.onreadystatechange=stateck;\nhttpxml.open(\"GET\",url,true);\nhttpxml.send(null);\n}", "function ajaxCall(dataToServer, dataToChange) {\n $.ajax({\n url: 'updateAssignedUser',\n type: 'POST',\n dataType: 'json',\n data: dataToServer,\n success: function(dataToServer){\n if(dataToServer.isValid) {\n dataToChange.html(dataToServer.username);\n } else {\n alert('Please enter a registered Jonrah user');\n }\n }\n });\n}", "function follow(username) {\n// Send the username to the server\n $.get(\"/users/follow/\" + username)\n .done(function () {\n\n // Change the id to unfollow\n $('#follow-btn').attr({\n id: \"unfollow-btn\"\n })\n // Change the text to unfollow\n .text(\"Unfollow\");\n\n\n showMessage(\"You just follwed \" + username + \" Congratulations !!\");\n\n }).fail(function () {\n showMessage(\"Error when trying to follow the user \" + username, ALERT_DANGER)\n })\n}", "function forgot_profile() {\n $('#login').modal('hide');\n $('#forgotPassword').modal('show');\n}", "function ajaxAddCallBack(event){\n\tvar msgnewuser = JSON.parse(event.target.responseText);\n\t//alert(msg);\n\tif (msgnewuser > 0) {\n\t\t//success change color to green\n\t\t$(\"#regitext\").css(\"color\", \"#00e600\");\n\t\t$(\"#regitext\").html(\"new user created!\");\n\t} else {\n\t\t//fail change color to red\n\t\t$(\"#regitext\").css(\"color\", \"#ff66a3\");\n\t\t$(\"#regitext\").html(\"user already exist!\");\n\t}\n\t//clear text\n\t$(\"#usnmwrong\").html(\"\");\n\t$(\"#pswdwrong\").html(\"\");\n\t$(\"#logintext\").html(\"\");\n}", "function signUpUser(username, email, password) {\n $.post(\"/users/signup\", {\n username: username,\n email: email,\n password: password\n }).then(function(data) {\n if (data.duplicateUser) {\n // Replace with Modal\n alert(\"Sorry, that username has been taken\");\n } else {\n window.location = data.redirect;\n }\n }).catch(function(err) {\n console.log(err);\n });\n }", "function AjaxVal(e,remind,einfo,ninfo) {\n $.ajax({\n type: \"POST\",\n url: \"/Function/AajxVal?str=\" + $(e).val(),\n dataType: \"text\",\n beforeSend:function(){\n $(\"#loading\").removeClass(\"hidden\");\n },\n success: function (info) {\n $(\"#loading\").addClass(\"hidden\");\n if (\"exist\" == info)\n $(remind).html(\"<font style='color:red' size=2><span class='glyphicon glyphicon-minus-sign'></span> \" + einfo + \"</font>\");\n if (\"none\" == info)\n $(remind).html(\"<font style='color:green' size=2><span class='glyphicon glyphicon-ok'></span> \" + ninfo + \"</font>\");\n // $(\"#re_username_info\").html(info);\n }\n });\n}", "function on_get_username(data, sender, sendResponse) {\n sendResponse({\n 'username': find_username(),\n });\n }", "function submitForgottenPassword(emailError, url) {\n var emailField = $(\"#emailaddress\");\n if (!validateEmailAddress(emailField.attr(\"value\"))) {\n //remove errors from form first\n $(\"#signinform ul.error\").remove();\n //prepend errors to form\n $('<ul class=\"error\"><li>' + emailError + '</li></ul>').prependTo($(\"#signinform\"));\n } else {\n //submit the email address to the URL\n window.location.href = url + emailField.attr(\"value\");\n }\n}", "function getUserName(){\n\t// Initialize new request\n const request = new XMLHttpRequest();\n\n request.open(\"GET\", \"/username\");\n request.onload = function(){\n \tlet un = request.responseText;\n \tif(un == \"\"){\n \t\tun = prompt(\"Enter a name for display .\");\n \t}\n }\n request.send();\n}", "function checkCustomerUsernameInBase() {\n var user = $(\"#username\").val();\n var username = sessionStorage.getItem(\"username\");\n\n $(\"#error\").html(\"\");\n\n if (user !== username) {\n $.ajax({\n url: \"index.php?rt=ajax/checkCustomerUsernameInBase\",\n data: {\n username: user,\n },\n type: \"post\",\n datatype: \"json\",\n success: function(data) {\n if (data.hasOwnProperty(\"found\")) {\n $(\"#error\").html(data.found);\n $(\"#username\").css(\"border-bottom\", \"solid red 0.5px\");\n $(\"#save\").prop(\"disabled\", true);\n } else if (data.hasOwnProperty(\"error\")) {\n $(\"#error\").html(data.error);\n } else if (data.hasOwnProperty(\"free\")) {\n $(\"#error\").html(\"\");\n $(\"#username\").css(\"border-bottom\", \"solid lightgray 0.5px\");\n $(\"#save\").prop(\"disabled\", false);\n }\n },\n error: function() {\n console.log(\"Greska u ajax pozivu.\");\n },\n });\n } else {\n $(\"#save\").prop(\"disabled\", false);\n }\n}", "function check_username() {\n var result;\n $.ajax({\n type: 'POST',\n url: 'models/validations/validate_account.php',\n data: {\n username: $('#username').val(),\n },\n cache: false,\n success: function(response) {\n if (response == 0) {\n var message = document.getElementById('checkUsername');\n message.style.color = \"#66cc66\";\n message.innerHTML = \"Username is available\";\n result = true;\n } else {\n var message = document.getElementById('checkUsername');\n message.style.color = \"#ff6666\";;\n message.innerHTML = \"Username has duplicate in the database\";\n result = false;\n }\n }\n\n });\n return result;\n}", "function signUp() {\n $('#form-signup').on('submit', function(event){\n event.preventDefault();\n $.ajax({\n url:`${url}/user/signup?loginVia=website`,\n method:'POST',\n data: {\n name: $('#inputName').val(),\n email: $('#inputEmail').val(),\n password: $('#inputPassword').val(),\n loginVia: 'website'\n }\n })\n .done(response => {\n notif('top-end', 'success', 'Sign up Success');\n $('#form-signup').remove();\n })\n .fail(response => {\n notif('top-end', 'error', response.responseJSON.err)\n }) \n })\n}", "function checkUserLogin(){\n var userLogemail = $(\"#userLogemail\").val();\n var userLogpass = $(\"#userLogpass\").val();\n $.ajax({\n url:'users/adduser.php',\n method: \"POST\",\n data: {\n checkLogemail: \"checkLogemail\",\n userLogemail: userLogemail,\n userLogpass: userLogpass,\n },\n success: function(data) {\n //console.log(data);\n if (data == 0) {\n $(\"#statusLogMsg\").html(\n '<small class=\"alert alert-denger\">Invalid Email ID or Password !</small>');\n\n }else if (data == 1) {\n $(\"#statusLogMsg\").html(\n '<div class=\"spinner-border text-success\" role=\"status\"></div>'\n );\n setTimeout(()=>{\n window.location.href = \"index.php\";\n },1000);\n }\n },\n });\n}", "function resetPass(){\nif (document.getElementById('userid').value =='' || document.getElementById('userid').value == null) {\nparent.swal({title: \"Missing Input!\",text: \"Please enter your User ID.\",type: \"error\"},function(){setTimeout(function(){document.getElementById('userid').focus();},100);});\nreturn false;\n};\nswal({\n title: \"Please wait.. \",\n text: \"This may take a few seconds! Please wait for a confirmation message!\",\n showConfirmButton: false\n});\n $.ajax({\t\t\t\n\t\t\t\tdataType: \"jsonp\",\n\t\t\t\ttimeout: 10000,\n\t\t\t\turl: 'utils/forgotpassword.php?jsoncall=?',\n\t\t\t\ttype: \"POST\",\n data: {\n userid: document.getElementById(\"userid\").value, process: \"forgotpass\"\n }, \n success:function (data) {\n\t\t\t\t\tvar data2=data.response;\n if (data2 == \"2\")\n {\n\t\t\t\t\t\tdocument.getElementById(\"userid\").value=\"\";\n\t\t\t\t\t\tswal({title: \"Success!\",text: \"Information on resetting your password has been sent to your registered email address!\", type: \"success\"});\n }\n\t\t\t\t\telse if (data2 == \"8\")\n\t\t\t\t\t{\n\t\t\t\t\t\tdocument.getElementById(\"userid\").value=\"\";\n\t\t\t\t\tswal({title: \"An error has occurred!\",text: \"Please try again!\", type: \"error\"});\n\t\t\t\t\t}\n\t\t\t\t\telse if (data2 == \"7\")\n\t\t\t\t\t{\n\t\t\t\t\t\tdocument.getElementById(\"userid\").value=\"\";\n\t\t\t\t\tswal({title: \"Details entered do not match any on file!\",text: \"Please try again!\", type: \"error\"});\n\t\t\t\t\t}\n else\n {\n\t\t\t\t\t\tdocument.getElementById(\"userid\").value=\"\";\n\t\t\t\t\tswal({title: \"Error!\",text: \"An un-documented error has occurred, please try again.\", type: \"error\"});\n }\n }\n }); \n}", "function createUser(){\n $('.signup-btn').hide();\n var fname= $('#sfname').val();\n var lname= $('#slname').val();\n var email= $('#semail').val();\n var usertype = $('#susertype').val();\n var password = $('#spassword').val();\n var password1 = $('#srepassword').val();\n //console.log(fname);\n $.ajax(\n {\n url: g_url+\"accounts/signup.php\",\n type:\"POST\",\n data:\n {\n mode:'signup',\n fname:fname,\n lname:lname,\n email:email,\n usertype:usertype,\n password:password,\n },\n success: function()\n {\n location.reload();\n },\n error: function()\n {\n $('.signup-form-message').html(\"Some unknown error occurred. Please try again\");\n }\n });\n}", "function get_user() { \n // Get nickname from the modal\n const nickname = document.querySelector('#nicknameModalGetUser').value\n\n // Hide the modal\n hide_modal_get_user();\n\n // Insert the new nickname in the DOM\n document.querySelector('#header-lateral-nickname').innerHTML = nickname;\n\n /* Send the nickname back to the server */\n // Create request and open it \n const request = new XMLHttpRequest();\n request.open('POST', '/store-nickname');\n\n // Add data to send with request\n const data = new FormData();// Send the data//\n data.append('nickname', nickname);\n\n // Send the data\n request.send(data);\n}", "function forgotPassword(method,type) {\n hideError('email');\n addFunActionLabel=\"Forgot Pasword Submit\";\n if(pageType=='not_login'){\n var email = $.trim($(\"#TenTimes-Modal #userEmailCopy\").val()); \n }else{\n var email = $.trim($(\"#TenTimes-Modal #userEmail\").val());\n }\n if(!validateEmail12345(email)){\n $(\".alert_email\").show();\n return 0;\n }\n var otpType='password';\n if(type=='N' || type=='U'){\n otpType='otp';\n }\n\n if(method == \"connect\")\n var postData = {'email':email, 'name' : receiverData.name , 'type' : otpType }\n else\n var postData = {'email':email, 'name' : email , 'type' : otpType }\n showloading();\n $.post(site_url_attend+'/user/getpassword',postData,function(response){\n hideloading();\n response=$.parseJSON(response);\n var resText=response.resText;\n var resLink=response.resLink;\n if(type=='N' || type=='U'){\n resText=response.resText_typeN;\n resLink=response.resLink_typeN;\n \n }\n \n switch(response.response) {\n case 'true':\n $('#getpassword').parent().replaceWith(function() { return \"<a style='text-decoration:none'>\" + \"<p class='text-center' style='text-decoration:none;color:#909090;'>\" + resText + \"</p>\"+$('#getpassword').get(0).outerHTML+\"</a>\"; });\n\n $('#getpassword').text(resLink);\n if(method!='signup' && method!='connect' && method!='contact_organizer_venue'){\n $('#TenTimes-Modal .partial-log').hide();\n $('#getpassword').removeAttr(\"onclick\").click(function() {\n partialLog(method,type)\n }).text(resLink).css('color','#335aa1');\n }\n break;\n case 'false':\n $(\".alert_email\").html(\"Sorry, 10times doesn't recognize that email.\");\n $(\".alert_email\").show();\n break;\n }\n }); \n}", "function otbot_attempt_login(ot_username, ot_password){\n\n $.post(\n \n // see tip #1 for how we declare global javascript variables\n \n ajaxurl,\n {// here we declare the parameters to send along with the request\n \n action : 'otbot_attempt_login',\n // other parameters can be added along with \"action\"\n //requests only come from pages which originate with our server\n \n //username and password for ot\n otbot_username: ot_username,\n otbot_password: ot_password\n },\n \n function( response ) {\n $('#wait').hide();\n if(response ==\"ERROR!!!\"){\n alert(\"Password or Username is incorrect, please try again.\");\n $('#credentials').show();\n }else{\n cookieName = response;\n $('#status').append('1. ' + ot_username );\n $('#status').attr('otusername',('1. ' + ot_username) );\n otbot_query_projects();\n $('#wait').show();\n \n }\n });//end ajax post\n\n}//end otbot_attempt_login", "function recoverPassword() {\n const email = document.getElementsByName(\"recover-email\").item(0);\n xhttp(\"POST\", \"forgot.php\", { email: email.value }, (response) => {\n // do nothing if it works or if it fails\n });\n const loginpage = document.getElementById(\"main\").querySelector(\"div.loginpage\");\n loginpage.innerHTML += '<p class=\"warn\">If the email is in our database, an email will be sent shortly to recover your account</p>';\n return false;\n}", "function avatarfrominput(evt) {\r\n Fajax.add('username', $(\"#recipient\").val());\r\n Fajax.add('call', 'fajaxInit');\r\n Fajax.send('post-avatarfrominput', '');\r\n}", "function checkUser(user) {\n if (user.value == '') {\n O('info').innerHTML = '&nbsp;';\n return;\n }\n params = 'user=' + user.value;\n request = ajaxRequest();\n request.open('POST', '../includes/checkuser.php', true);\n request.setRequestHeader('Content-type','application/x-www-form-urlencoded');\n //request.setRequestHeader('Content-length', params.length);\n //request.setRequestHeader('Connection', 'close');\n \n request.onreadystatechange = function() {\n if (this.readyState = 4) {\n if (this.state = 200) {\n if (this.responseText != null) {\n O('info').innerHTML = this.responseText;\n }\n }\n }\n }\n request.send(params);\n}", "function sign_in(){\r\n var uemail = $('#userl_email').val();\r\n var upass = $('#userl_pass').val();\r\n $.ajax('/users/login', \r\n {\r\n type: 'POST',\r\n data: {\r\n email : uemail,\r\n password : upass\r\n },\r\n success: function(data) \r\n {\r\n if(data.success == \"success\"){\r\n $('#login').modal('hide');\r\n location.reload();\r\n }else{\r\n alert(data.success);\r\n }\r\n } \r\n });\r\n}", "function UsernameSecurityCheckAjaxMethod() {\n var user = $(\"#usernameCheck\").val();\n var security = $('#Securty').val();\n var answer = $('#AnswerCheck').val();\n $.ajax({\n type: \"POST\",\n url: \"Login.aspx/UsernameAndPasswordTwoCheckForgotPageMethod\",\n data: \"{userCheck: '\" + user + \"', security: '\" + security + \"', answer: '\" + answer + \"'}\",\n dataType: \"json\",\n contentType: \"application/json; charset=utf-8\",\n success: function () {\n $('.SecurityCheck').fadeOut(function () {\n $('.AllisGood').fadeIn(700);\n });\n },\n error: function () {\n if (security == \"Choose Security Question\") {\n $('#SecurityError').text(\"Please select Security Question.\");\n $('#SecurityError').css({ 'color': 'red', 'font-weight': 'bold', 'margin-top': '-15px', 'margin-bottom': '20px', 'font-size': '15px' });\n $('#SecurityError').addClass('animated shake');\n return false;\n }\n else if (answer == \"\") {\n $('#SecurityError').text(\"Please give Answer.\");\n $('#SecurityError').css({ 'color': 'red', 'font-weight': 'bold', 'margin-top': '-15px', 'margin-bottom': '20px', 'font-size': '15px' });\n $('#SecurityError').addClass('animated shake');\n return false;\n }\n else\n $('#SecurityError').text(\"It is not Correct.\");\n }\n });\n}", "function sendForgetPassword(){\n //check validation\n if(!$('#forget_password_dialog form').valid()) return;\n \n //put loading screen\n loadingScreen();\n \n //prepare the object to send\n var obj=new Object();\n obj.email = $.trim($('#forget_password_dialog_textbox').val());\n \n //send the reset information via ajax\n $.ajax({\n type: \"POST\",\n url: \"/login/resetpassword/\",\n dataType: \"json\",\n data: obj ,\n async: false,\n success: function(res) {\n if (res.items[0].status ==='success'){\n $('#forget_password_dialog_error').css('display', 'none');\n $('#forget_password_dialog_body').fadeOut('normal', function(){\n $('#forget_password_dialog_success').fadeIn('normal');\n });\n }\n else{\n $('#forget_password_dialog_error * p').text(res.items[0].msg);\n $('#forget_password_dialog_error').fadeIn('normal');\n }\n removeLoadingScreen();\n },\n error: function(res){\n $('#forget_password_dialog_error * p').text('Connection failure: Try again');\n $('#forget_password_dialog_error').fadeIn('normal');\n removeLoadingScreen();\n }\n });\n}", "function ajax_search_uname(uname){\n\tcreate_http_request();\n\t// create the parameters to be\n\t// sent to the php target.\n\t// this is a string of name=value pairs. if\n\t// multiple parameters are to be sent, then they\n\t// are separated by an ampersand.\n\tvar post_params = \"ajax_action=search_uname&ajax_uname=\" + uname;\n\t// call method to sent the request\n\tsend_http_request(xmlHttp_handle_uname_search, \"POST\", target_url, post_params);\n}", "function checkName(username){\n\n if (username.length < 3){\n $('#username').addClass('bd-red');\n inputTip($('#username'),'Not enough characters','cl-red');\n state.validUsername = false;\n return;\n }\n\n $.get(\"/api/account/check-name/\"+ username)\n .done(function(response) {\n // console.log(response);\n if (response.status == \"success\"){\n // console.log(response.data.is_available);\n if (response.data.is_available === true){\n resetInputs($('#username')[0]);\n state.validUsername = true;\n inputTip($('#username'),'Available <i class=\"fas fa-check\"></i>','cl-green');\n } else {\n state.validUsername = false;\n inputTip($('#username'),'Sorry, that username is taken.','cl-red');\n }\n } else {\n // console.log(\"Error\");\n state.validUsername = false;\n }\n });\n\n }", "function retire_user(id) {\n\tvar fname = $(\"#edit_user_first_name\").val();\n\tvar lname = $(\"#edit_user_last_name\").val();\n\tvar data_query=\"retire_user_byadmin=1&id=\"+id+\"&first_name=\"+fname+\"&last_name=\"+lname;\n\t\n\t$.ajax({\n\t\ttype: \"GET\",\n\t\turl: \"functions.php\",\n\t\tdata: data_query,\n\t\tdataType: \"html\",\n\t\tsuccess: function(html){ \n\t\t\t$(\"#pop_up\").html(html);\n\t\t\t$(\"#pop_up\").show().delay(5000).fadeOut();\n\t\t}\n\t}); \n}", "function validateUserName(){\n\tvar input = jQuery('#username').val();\n\tvar retval = validUserName(input);\n\tif(!retval) {\n\t\tmsg = 'You must enter a Username at least 8 characters long.';\n\t\trequiredAction('#username', retval, msg);\n\t\treturn retval;\n\t}\n\treturn jQuery.ajax({\n\t\ttype: \"POST\",\n\t\turl: fc_data_check_url,\n\t\tdata: { \"action\" : 'usernametest', \"username\" : encodeVal(input) },\n\t\tsuccess: function(data) {\n\t\t\tif(!data.success){\n\t\t\t\tmsg = data.message;\n\t\t\t}else{\n\t\t\t\tmsg = '';\n\t\t\t}\n\t\t\trequiredAction('#username', data.success, msg);\n\t\t\tconsole.log('username', data.success);\n\t\t\treturn data.success;\n\t\t},\n\t\terror: function(data){\n\t\t\tlogError(data);\n\t\t\talert(\"System Error. Please try again.\");\n\t\t\treturn false;\n\t\t}\n\t});\n}", "function loadForgotUserPassResources(){\r\n //Verifica se o usuario existe no banco de dados para enviar suas informacoes via email\r\n $('#askForDataButton').click(function (event){\r\n\tevent.preventDefault();\r\n \t\r\n\t//Variavel que indicara se tudo esta correto\r\n\tlet ok = true;\r\n\r\n\t//Verificando se esta tudo preenchido\r\n\tif($('#userCPF').val() == \"\" && $('#userEmail').val() == \"\"){\r\n\t\talert(\"Preencha algum dos campos.\");\r\n\t\tok = false;\r\n\t}\r\n\r\n\t\r\n\t//Expressoes regulares para validacao\t\r\n\tlet validaCpf = new RegExp('[0-9]{3}[\\.][0-9]{3}[\\.][0-9]{3}-[0-9]{2}');\t\r\n\tlet validaEmail = new RegExp('[A-Za-z0-9\\\\._-]+@[A-Za-z]+\\\\.[A-Za-z]+');\r\n\t\r\n\r\n\t//Validando o cpf\r\n\tif($('#userCPF').val() != \"\" && validaCpf.exec($('#userCPF').val()) == null){\r\n\t\talert(\"CPF inválido. Digite no seguinte formato: ___.___.__-__\");\r\n\t\tok = false;\r\n\t}\r\n\t\r\n\t//Valida o email\r\n\tif($('#userEmail').val() != \"\" && validaEmail.exec($('#userEmail').val()) == null){\r\n\t\talert(\"Email inválido. Digite no seguinte formato: _@_._\");\r\n\t\tok = false;\r\n\t}\r\n\r\n\t//Procura pelo usuario na base de dados\r\n\tif(ok == true){\r\n\t\t$.get('/users',function(data){\r\n\t\t\tlet cpf = $('#userCPF').val();\r\n\t\t\tlet email = $('#userEmail').val();\r\n\t\t\tlet exist = false;\r\n\t\t\tfor(let i=0;i<data.length;i++){\r\n\t\t\t\tif(data[i].obj){\r\n\t\t\t\t\tif(cpf == data[i].obj.cpf || email == data[i].obj.email){\r\n\t\t\t\t\t\texist = true;\r\n\t\t\t\t\t\tbreak;\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(exist == false){\r\n\t\t\t\talert(\"Não existe nenhum usuário com este email ou cpf fornecidos.\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\talert(\"Enviamos um email com sua nova senha de acesso.\");\r\n\t\t\t\t// Limpa o conteudo atual e recarrega a home page (Apenas se der certo)\r\n\t\t\t\tclearForgotUserPassPage();\r\n\t\t\t\tloadHomePage();\r\n\t\t\t}\r\n\t\t});\r\n\t}\t\r\n }); \r\n \r\n //Volta para a pagina principal\r\n $('#returnButton').click(function (){\r\n clearForgotUserPassPage();\r\n loadHomePage();\r\n });\r\n}", "function usernameSubmitForm () {\n // get the form as a dom js element. Used for the validation.\n user_form_element = document.getElementById('user_form');\n\n // VALIDATE FORM\n // - RETURN (exit function) IF THE FORM IS INCOMPLETE\n if (user_form_element.username.value===\"\") {\n console.log('no username present')\n return false;\n } else if (user_form_element.password.value===\"\") {\n console.log('no password present')\n return false;\n } \n \n // make an asychronous request to the url:\n // https://user.tjhsst.edu/pckosek/submit_userpass?username=1423&password=foobar\n $.ajax({\n url: \"submit_userpass\", // goes to https://user.tjhsst.edu/pckosek/submit_userpass\n type: \"GET\", // specify that this is going to be a get request\n data: $('#user_form').serialize(), // this line uses jQuery to extract from the form a string like: username=1423&password=foobar\n success: function(response) {\n // the function we are in is called when the server responds with data\n console.log(response); \n } \n }); \n \n}", "function loginAjax() {\n let username = $('input#username').val();\n let pwd = $('input#pwd').val();\n if(username===\"\" || pwd===\"\") {\n loginResponse({status:-1});\n return false;\n }\n sendAjax('login',{\n 'username': username,\n 'password': sha256(pwd)\n });\n return false; // Prevent auto refresh\n}", "function send_username_password(to_send_email)\n{\n\tto_send_email = escape(to_send_email);\n\tvar to_post = to_send_email;\n\tvar data1={\"to_send_email\":to_send_email,\"forgot_password\":1};\n\tvar url1=\"/profile/registration_ajax_validation.php\";\n\t$.ajax({\n\t\ttype: 'POST',\n\t\turl: url1,\n\t\tdata: data1,\n\t\tsuccess:function(data){\n\t\t response = data;\n\t\t eval(email_sent_notify(response));}\n\t });\n\n}", "function registerUser(e){\n $('#alert').alert();\n e.preventDefault();\n var name = $(e.target).find('input[name=\"name\"]'); \n var password = $(e.target).find('input[name=\"password\"]');\n $.post(registerUrl, {\n name: name.val(),\n password: password.val() ,\n }).done(function( data ) {\n name.val('');\n password.val('');\n userAlert('success', 'User successfully registered. Welcome!');\n $('#registerModal').modal('hide')\n });\n}", "function loginProcessTips(url){\n\tvar username = jQuery(\"#username\").val();\n\tvar password = jQuery(\"#password\").val();\n\talert(username);\n/*\tjQuery.ajax({ \n\t type: 'POST', \n\t url: url, \n\t dataType: { 'username' : username, 'password' : password },\n\t cache: false,\n\t success:function(response) {\n\t \tjQuery(\"#username\").val($('#username').val());\n\t \tjQuery(\"#password\").val($('#password').val());\n\t },\t \n\t data: {},\n\t async: false\n\t \n\t});\n\t*/\n\t\n}", "function signInOut(){\r\nif (signInForm.userName.value==\"\" || signInForm.userName.value.indexOf(\" \")>-1){\r\nalert(\"Not valid user name\\nPlease make sure your user name didn't contains a space\\nOr it's not empty.\");\r\nsignInForm.userName.focus();\r\nreturn false;\r\n}\r\n\r\n// Sign in\r\nif (signInForm.signInButt.name==\"signIn\"){\r\ndata=\"user=\" + signInForm.userName.value +\"&oper=signin\"\r\nAjax_Send(\"POST\",\"users.php\",data,checkSignIn);\r\nreturn false\r\n}\r\n\r\n// Sign out\r\nif (signInForm.signInButt.name==\"signOut\"){\r\ndata=\"user=\" + signInForm.userName.value +\"&oper=signout\"\r\nAjax_Send(\"POST\",\"users.php\",data,checkSignOut);\r\nreturn false\r\n}\r\n}", "function forget_password(){\r\n localStorage.setItem(\"time\",\"1000\");\r\n localStorage.setItem(\"link\",\"password_reset.html\");\r\n window.open('loading.html',\"_self\");\r\n }", "function GetClickedUserToForm(id) {\n $.ajax({\n type: \"POST\",\n contentType: \"application/json; charset=utf-8\",\n url: \"../WebService.asmx/GetUserById\",\n data: \"{Id: \" + JSON.stringify(id) + \"}\",\n dataType: \"json\",\n statusCode: {\n 404: function (data) {\n swal({\n title: \"Oops!\",\n text: \"This user no longer exists...\",\n icon: \"info\",\n timer: 3000\n }).then((value) => {\n location.reload(true);\n });\n },\n 500: function (data) {\n swal({\n title: \"Oops!\",\n text: \"Sorry, we are currently unable to fulfill your request!\",\n icon: \"info\",\n timer: 3000\n }).then((value) => {\n location.reload(true);\n });\n }\n },\n success: function (data) {\n clearForm();\n if (data.d !== null) {\n user_photo.attr('src', '/resources/imgs/users/' + data.d.Picture);\n photo_real_name.val(data.d.Picture);\n feedUneditedUser(data.d);\n input_username.val(data.d.Username);\n input_username.attr('user_id', data.d.Id);\n input_email.val(data.d.Email);\n toggleBothFormToggles(data.d.CurrentUserHistory.AfterState, data.d.Newsletter);\n disableFormTextArea();\n old_description.text(data.d.CurrentUserHistory.Description);\n old_description.each(function () {\n $(this).height(0).height(this.scrollHeight);\n }).find('textarea').change();\n $.session.set(\"UserPassword\", data.d.Password);\n }\n },\n error: function (data, status, error) {\n swal({\n title: \"Error!\",\n text: \" \" + (error.message === undefined ? \"Sorry, we are currently unable to fulfill your request!\" : error.message) + \" \",\n icon: \"warning\",\n timer: 3000\n });\n }\n });\n}", "function processUser(){\n var parameters = location.search.substring(1).split(\"&\");\n var temp = parameters[0].split(\"=\");\n user = unescape(temp[1]);\n username = user;\n document.getElementById(\"curUser\").innerHTML = user;\n\n temp = parameters[1].split(\"=\");\n id = unescape(temp[1]);\n document.getElementById(\"idname\").innerHTML = id;\n if (typeof id !== 'undefined') {\n $.ajax({\n url: '/checkBuyer?id=' + id + '&username=' + user,\n type: 'GET',\n dataType: 'json',\n success: function (response){\n if (response == \"0\") {\n window.location = \"./login.html\";\n }else {\n buildHtml ();\n }\n }\n });\n }\n else {\n window.location = \"./login.html\";\n }\n}", "function forgetLink(params) {\n $.ajax({\n data: params,\n url: requrl + 'forget',\n type: 'post',\n dataType: 'json',\n cache: false,\n timeout: 5000,\n success: function (data) {\n // data.msg : -- or - \n console.log(data.msg + ' ' + params.from + ' --> ' + params.to);\n },\n error: function (jqXHR, textStatus, errorThrown) {\n console.log('error ' + textStatus + \" \" + errorThrown);\n }\n });\n}", "function showForgotPassword() {\n document.getElementById(\"newAccount\").style.display=\"none\";\n document.getElementById(\"login\").style.display=\"none\";\n document.getElementById(\"forgotPassword\").style.display=\"block\";\n document.getElementById(\"forgotUsername\").value=\"\";\n}", "function checkValidToken() {\n $('form#reset-token').submit(function(e) {\n e.preventDefault()\n e.stopImmediatePropagation();\n var userResetToken = $('#user-reset-token');\n $.ajax({\n url: \"process/ajaxHandler.php\",\n method: \"POST\",\n dataType: \"JSON\",\n data: {\n action: \"checkToken\",\n userToken: userResetToken.val()\n },\n success: function(response) {\n if (response.status == \"success\") {\n $('form#reset-token').remove();\n $('#container').append(response.passForm)\n $('input#user-reset-pass').focus();\n resetPass();\n } else if (response.status == \"error\") {\n alert(response.description)\n }\n }\n })\n })\n}", "function validarUser(){\n var username = document.getElementById(\"username\")\n\n if(username.value != ''){\n $.ajax({\n url: '/validar',\n type: 'GET',\n data: {username: username.value},\n success: function(response){\n console.log(\"ha funcionado\");\n if(response > 0){\n console.log(\"Nombre ocupado \", response);\n username.setCustomValidity(\"Ese nombre de usuario ya esta cogido\");\n\n }\n else{\n console.log(\"Nombre ocupado \", response);\n username.setCustomValidity(\"\");\n\n }\n\n // $('#username_response').html(response);\n\n }\n });\n }else{\n console.log(\"No ha funcionado y porque username esta vacio\");\n $(\"#username_response\").html(\"\");\n }\n\n }", "function updateUsername() {\n\t\tif(this.usernameText.textContent !== username)\n\t\t\trequestUsername(this.usernameText.textContent);\n\t}", "function getUserName() {\n\t$.ajax({\n\t\turl : 'rest/user/names',\n\t\ttype : \"GET\",\n\t\tdataType : \"text\"\n\t}).always(function(data) {\n\t\tif (typeof data != 'undefined') {\n\t\t\t$(\".welcome-greeting\").css(\"display\", \"inline\");\n\t\t\t$(\"#user-holder\").text(data);\n\t\t}\n\t});\n}", "function signUserInViaAjax() {\n $(\"#signIn_status\").html(\"Please wait...\");\n var urlToSend = \"/users/signInViaAjax\"; \n $.ajax( \n {type:\"POST\",\n url:urlToSend,\n data:{\n email:$('#signIn_email').val(),\n password:$('#signIn_password').val()\n },\n cache: false\n }).done( function(msg) {\n signInDone(msg);\n }).fail(function(msg) { \n signInFail(msg);\n });\n}", "function chkLogin(email, password, bounceval)\n{\n\tvar urllength = bounceval.length;\n\tvar urlindex = bounceval.lastIndexOf('&page');\n\tif(urlindex != -1){\n\t\tvar bounceval = bounceval.substr(urlindex, urllength);\n\t}\n\txmlHttp=GetXmlHttpObject();\n\tif (xmlHttp==null)\n\t{\n\t\talert (\"Your browser does not support AJAX!\");\n\t\treturn;\n\t}\n\t\n\tvar url = host + '/community/exchange_register/welcome.htm?email=' + email + '&password=' + password + '&' +bounceval + '&flag=fromindex';\n\tvardiv='newregistration';\n\txmlHttp.open(\"GET\",url,true);\n\txmlHttp.onreadystatechange=function()\n\t{ \n\t\tregistrationstateChange(vardiv); \n\t};\n\txmlHttp.send(null);\n}", "function checkUsername() {\n //create new request\n var req = new XMLHttpRequest();\n if (!req) {\n throw \"Unable to create HttpRequest.\";\n }\n //url should be appropriate php reference\n var url = 'http://web.engr.oregonstate.edu/~weckwera/290/wk10/lab.php';\n req.onload = function () {\n if (this.readyState === 4) {\n console.log(this.status); //tell me that you're doing something\n console.log(this.responseText);//check out server response\n \n //var response = JSON.parse(this.responseText);\n var response = (this.responseText);\n \n //call function with results\n checkUsernameAjaxResponse(response);\n }\n }\n var username = \"testUsername=\" + document.getElementById('testUsername').value;\n var password = \"testPass=\" + document.getElementById('testPass').value;\n var county = \"county=\" + document.getElementById('county').value;\n var state = \"state=\" + document.getElementById('state').value;\n var fName = \"fName=\" + document.getElementById('fName').value;\n var lName = \"lName=\" + document.getElementById('lName').value;\n var email = \"email=\" + document.getElementById('email').value;\n var phone = \"phone=\" + (document.getElementById('phone').value).replace(/[^0-9.]/g, \"\");\n\n var args = username + \"&\" + password + \"&\" + county + \"&\" + state \n + \"&\" + fName + \"&\" + lName + \"&\" + email + \"&\" + phone;\n \n req.open('POST', url);\n req.setRequestHeader(\"Content-Type\", \"application/x-www-form-urlencoded\");\n req.send(args);\n}", "function check_availability(){\n\t\t\n\t\t//get the username\n\t\tvar email = $('#email').val();\n\t\t\n\t\t//use ajax to run the check\n\t\t$.post(\"EmailValidatorServlet\", { email: email },\n\t\t\tfunction(result,status){\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\tif(result==\"alr_reg\"){\n\t\t\t\t\t\n\t\t\t\t\t$('#username_availability_result').html('<span class=\"is_not_available\"><b>' +email + '</b> is already registered!</span>');\n\t\t\t\t\t$('#email').val('');\n\t\t\t\t\t$(\"#email\").focus();\n\t\t\t\t}\n\t\t\t\tif(result==\"available\"){\n\t\t\t\t\t\n\t\t\t\t\t$('#username_availability_result').html('<span class=\"is_available\"><b>' +email + '</b> is AVAILABLE!</span>');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(result==\"unavailable\"){\n\t\t\t\t\t\n\t\t\t\t\t$('#username_availability_result').html('<span class=\"is_not_available\"><b>' +email + '</b> is not a college member!</span>');\n\t\t\t\t\t$('#email').val('');\n\t\t\t\t\t$(\"#email\").focus();\n\t\t\t\t}\n\t\t\n\t});\n\n}", "function ajaxRegister(user, pass) {\n $.ajax({\n type: 'POST',\n url: 'account/register.php',\n data: {\n name: user,\n password: pass,\n },\n success: function(response) {\n console.log(response);\n if(response == 'valid') {\n $('nav').load('account/menu.php');\n bindMenu();\n } else {\n $('#registerName, #registerPassword').css('background-color', '#ff4141');\n $('#registerForm .nameError').html('This username has already been taken');\n }\n }\n });\n}", "function ajaxCallForResettingPassword(resetEmail,resetPassword){\n // console.log(\"in resetPassword \",resetEmail,resetPassword);\n var data = {};\n data.resetEmail = resetEmail;\n data.resetPassword = resetPassword;\n\n $.ajax({\n url:\"/users/resetPassword\",\n type: 'POST',\n async: true,\n data: JSON.stringify(data),\n contentType: 'application/json',\n context: this,\n cache: false,\n processData: false,\n success: function(response) {\n console.log('Reset password succesfully',response);\n location.reload();\n },\n error: function(response) {\n console.log('Error with reset password ' + response.statusText);\n console.log(\"error page\");\n }\n });\n }", "function checkAvail(username, callback) {\n \t$.ajax({\n \turl: '/coding-challenge/api/user/',\n type: 'get',\n data: {\n \tusername: username\n }\n })\n .done(function(response) {\n \tcallback(response);\n })\n .fail(function(){\n \tchgAlert('Sorry, there seems to be a problem on our side. Please try again.', \"error\");\n })\n }", "function update_alter_user_info_html(){\r\n $.post(BASE_PATH + 'user/user_alter_info_html', {'other_token' : $(\"#other-csrf\").val()}, function(result){\r\n if(result.code != 0){\r\n $(\"#user-info-alter-tab\").html('<BR><div class=\"alert alert-danger\" role=\"alert\"><p class=\"text-center\">(' + result.code + '):' + result.msg + '</p></div>');\r\n }else {\r\n $(\"#user-info-alter-tab\").html(result.data);\r\n }\r\n }, 'json');\r\n}", "function fnUserSearch() {\n var strEmail = $('#strEmail').val();\n var strPassword = $('#strPassword').val();\n\n if(strEmail != '' && strPassword != ''){\n\n $.getJSON('http://'+strIpAddress+':5050/api/fnUser'+'/'+ strEmail +'/'+ strPassword)\n .done(function (data) {\n if (data == '') {\n alert('error');\n }else{\n if(data.intResp == '202'){\n $('#mdlIndex').modal('show');\n $('#mdlIndexTitle').text('Error');\n $('#mdlIndexBody').text(data.strMessage);\n $('#mdlIndexBtnAction').html('<button type=\"button\" class=\"btn btn-default\" onclick=\"window.location.replace(\\'form.html\\')\" data-dismiss=\"modal\">Close</button>');\n \n }else if(data.intResp == '201'){\n $('#mdlIndex').modal('show');\n $('#mdlIndexTitle').text('Error');\n $('#mdlIndexBody').text(data.strMessage);\n $('#mdlIndexBtnAction').html('<button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">Close</button>');\n \n }else{\n //window.location.replace('principal.html?val='+data.strToken); //esta funcion no deja regresar a la pagina anterior\n localStorage.setItem(\"Token\", data.strToken);\n window.location.replace('principal.html');\n //$('#mdlIndex').modal('show');\n //$('#mdlIndexTitle').text('Success');\n //$('#mdlIndexBody').text(data.strMessage);\n //$('#mdlIndexBtnAction').html('<button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">Close</button>');\n }\n }\n });\n\n }\n }" ]
[ "0.6690176", "0.66683954", "0.6453761", "0.6408495", "0.63641775", "0.62688625", "0.62679505", "0.6256149", "0.622892", "0.6155679", "0.6136436", "0.6123072", "0.6092463", "0.6090744", "0.604611", "0.6017466", "0.6014703", "0.6010808", "0.60059583", "0.60032654", "0.59902346", "0.5988914", "0.5987129", "0.59533584", "0.59277934", "0.5902837", "0.5895617", "0.5888746", "0.58844745", "0.5881448", "0.58365506", "0.5819089", "0.58108526", "0.5794545", "0.57895887", "0.5774273", "0.57679874", "0.57664704", "0.57525474", "0.5752039", "0.57458234", "0.5730197", "0.57261926", "0.5719109", "0.57082707", "0.5705794", "0.568312", "0.56790656", "0.56743705", "0.5669997", "0.5669282", "0.5639417", "0.56364536", "0.56229323", "0.56112355", "0.5609675", "0.5606672", "0.56045187", "0.55922437", "0.5588785", "0.55791056", "0.55773795", "0.5573397", "0.5573362", "0.5572869", "0.5570487", "0.55648875", "0.556121", "0.5560689", "0.5548726", "0.5546241", "0.5545431", "0.5544403", "0.55353326", "0.5534635", "0.553059", "0.5530353", "0.5523713", "0.5508762", "0.5507705", "0.5501575", "0.5487154", "0.5486998", "0.548357", "0.5480993", "0.54712474", "0.5469791", "0.54646224", "0.5459435", "0.5459122", "0.54581004", "0.5457692", "0.54564446", "0.54483163", "0.5444828", "0.54427975", "0.5441643", "0.5438767", "0.54362035", "0.54288113" ]
0.6906878
0
Ajax Call for Username PasswordOne Forgot Page.
function UsernamePasswordCheckAjaxMethod() { var user = $("#usernameCheck").val(); var pwd1 = $('#PasswordOneCheck').val(); $.ajax({ type: "POST", url: "Login.aspx/UsernameAndPasswordOneCheckForgotPageMethod", data: "{userCheck:'" + user + "', pwdCheck:'" + pwd1 + "'}", dataType: "json", contentType: "application/json; charset=utf-8", success: function () { $('.ContactCheck').fadeOut(function () { $('.AllisGood').fadeIn(700); }); }, error: function () { if(pwd1 == "") { $('#ErrorPwd1').text("Password is Empty"); $('#ErrorPwd1').css({ 'color': 'red', 'font-weight': 'bold', 'margin-top': '-15px', 'margin-bottom': '20px', 'font-size': '15px' }); $('#ErrorPwd1').addClass('animated shake'); return false; } else $('#ErrorPwd1').text("Password is Incorrect"); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function vpb_request_password_link()\n{\n\tvar ue_data = $(\"#ue_data\").val();\n\t\n\tif(ue_data == \"\")\n\t{\n\t\t$(\"#ue_data\").focus();\n\t\t$(\"#this_page_errors\").html('<div class=\"vwarning\">'+$(\"#empty_username_field\").val()+'</div>');\n\t\t$('html, body').animate({\n\t\t\tscrollTop: $('#ue_data').offset().top-parseInt(200)+'px'\n\t\t}, 1600);\n\t\treturn false;\n\t} else {\n\t\tvar dataString = {'ue_data': ue_data, 'page':'reset-password-validation'};\n\t\t$.ajax({\n\t\t\ttype: \"POST\",\n\t\t\turl: vpb_site_url+'forget-password',\n\t\t\tdata: dataString,\n\t\t\tcache: false,\n\t\t\tbeforeSend: function() \n\t\t\t{\n\t\t\t\t$(\"#this_page_errors\").html('');\n\t\t\t\t$(\"#disable_or_enable_this_box\").removeClass('enable_this_box');\n\t\t\t\t$(\"#disable_or_enable_this_box\").addClass('disable_this_box');\n\t\t\t\t\n\t\t\t\t$(\"#forgot_password_buttoned\").hide();\n\t\t\t\t$(\"#log_in_status\").html('<center><div align=\"center\"><img style=\"margin-top:-40px;\" src=\"'+vpb_site_url+'img/loadings.gif\" align=\"absmiddle\" alt=\"Loading\" /></div></center>');\n\t\t\t},\n\t\t\tsuccess: function(response)\n\t\t\t{\n\t\t\t\t$(\"#disable_or_enable_this_box\").removeClass('disable_this_box');\n\t\t\t\t$(\"#disable_or_enable_this_box\").addClass('enable_this_box');\n\t\t\n\t\t\t\t$(\"#log_in_status\").html('');\n\t\t\t\t$(\"#forgot_password_buttoned\").show();\n\t\t\t\t\t\n\t\t\t\tvar response_brought = response.indexOf(\"processCompletedStatus\");\n\t\t\t\t$vlog=JSON.parse(response);\n\t\t\t\tif(response_brought != -1)\n\t\t\t\t{\n\t\t\t\t\tif($vlog.processCompletedStatus==true){\n $(\"#ue_data\").val('');\n $(\"#this_page_errors\").html($vlog.response);\n return false;\n\t\t\t\t\t}else{\n setTimeout(function() {\n \twindow.alert(\"To change the password you first need to verify the account by entering the verification code which was sent to your gmail account earlier while sign up in the 'Enter the verification code ... ' field to proceed.\");\n window.location.replace(vpb_site_url+'verification');\n },500);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$(\"#this_page_errors\").html($vlog.response);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}", "function UsernamePasswordTwoCheckAjaxMethod() {\n var user = $(\"#usernameCheck\").val();\n var pwdTwo = $(\"#PasswordTwoCheck\").val();\n $.ajax({\n type: \"POST\",\n url: \"Login.aspx/UsernameAndPasswordTwoCheckForgotPageMethodAjax\",\n data: \"{userCheck:'\" + user + \"', pwdCheck:'\" + pwdTwo + \"'}\",\n dataType: \"json\",\n contentType: \"application/json; charset=utf-8\",\n success: function () {\n $('.PasswordCheck').fadeOut(function () {\n $('.AllisGood').fadeIn(700);\n });\n },\n error: function () {\n if (pwdTwo == \"\") {\n $('#ErrorPwd2').text(\"Password is Empty\");\n $('#ErrorPwd2').css({ 'color': 'red', 'font-weight': 'bold', 'margin-top': '-15px', 'margin-bottom': '20px', 'font-size': '15px' });\n $('#ErrorPwd2').addClass('animated shake');\n return false;\n }\n else\n $('#ErrorPwd2').text(\"Password is Incorrect\");\n }\n });\n}", "function UsernameAjaxMethod() {\n var user = $(\"#usernameCheck\").val();\n $.ajax({\n type: \"POST\",\n url: \"Login.aspx/UsernameForgotPageMethod\",\n data: \"{Forgotuser: '\" + user + \"'}\",\n dataType: \"json\",\n contentType: \"application/json; charset=utf-8\",\n success: function (response) {\n $('.UsernameCheck').fadeOut(function () {\n $('.ContactCheck').fadeIn(700);\n });\n },\n error: function () {\n if (user == \"\") {\n $('#ErrorUser').text(\"Username is Empty\");\n $('#ErrorUser').css({ 'color': 'red', 'font-weight': 'bold', 'margin-top': '-15px', 'margin-bottom': '20px', 'font-size': '15px' });\n $('#ErrorUser').addClass('animated shake');\n return false;\n }\n else {\n $('#ErrorUser').text(\"Username is incorrect, if you have forgot your username, you are not able to go forward, you can contact from the Website Owner (+923159382193) regarding you account's unlock.\");\n $('#ErrorUser').css({ 'color': 'red', 'font-weight': 'bold', 'margin-top': '-15px', 'margin-bottom': '2', 'font-size': '15px' });\n $('#ErrorUser').addClass('animated shake');\n }\n }\n });\n}", "function submitForgotUsername(){\n\ttry{\n\t\tvar license = $.txtfieldLicense.value;\n\t\tlicense = license.replace(/&(?!amp;)/g, '&amp;'​);\n\t var\tmail = $.txtfieldMail.value;\n\t var\temiratesid = $.txtfieldEmirateId.value.replace(/[-]/gi, \"\");\n\t Ti.API.info('emiratesid '+emiratesid);\n\t var\tmobile = $.txtfieldMobile.value.replace(/[-]/gi, \"\");\n\t var\tpassport = $.txtfieldPassport.value;\n\t passport = passport.replace(/&(?!amp;)/g, '&amp;'​);\n\t var lblEmiratesPassport;\n\t \n\tif($.imgIndividual.image === Alloy.Globals.path.radioActive){\n\t\tif(emiratesid === \"\" && passport === \"\"){\n\t\t\tutilities.showAlert(Alloy.Globals.selectedLanguage.forgotUsername,Alloy.Globals.selectedLanguage.validateHintText,function(){});\n\t\t}else if(mail === \"\"){\n\t\t \tutilities.showAlert(Alloy.Globals.selectedLanguage.forgotUsername,Alloy.Globals.selectedLanguage.mailId,function(){});\n\t\t}else if(mobile === \"\"){\n\t\t utilities.showAlert(Alloy.Globals.selectedLanguage.forgotUsername,Alloy.Globals.selectedLanguage.mobileNumber,function(){});\n\t\t}else if (emiratesid !== \"\" && emiratesid.length < 15) {\n\t\t\t$.txtfieldEmirateId.value = \"\";\n\t\t \tutilities.showAlert(Alloy.Globals.selectedLanguage.forgotUsername,Alloy.Globals.selectedLanguage.invalidEmiratesId,function(){});\n\t\t}\n\t\telse if (mobile.length !== 10 && mobile.value !== \"\") {\n\t\t \tutilities.showAlert(Alloy.Globals.selectedLanguage.forgotUsername,Alloy.Globals.selectedLanguage.mobileLength,function(){});\n\t\t}else{\n\t\t\ttry{\n\t\t\t\tlblEmiratesPassport = (emiratesid !== \"\")?emiratesid:passport;\n\t\t\t\thttpManager.forgetUsername(function(result){\n\t\t\t\tvar rootNode = result.getElementsByTagName(\"output\");\n\t\t\t\tvar ns =\"http://ForgetUserName\";\n\t\t\t\t//var subNode = result.response.getElementsByTagNameNS(\"ns1:Status\");\n\t\t\t\tif(rootNode.length > 0){\n\t\t\t\t\tvar status = result.getElementsByTagNameNS(ns, \"Status\").item(0).textContent;\n\t\t\t\t\t\n\t\t\t\t\tif(status === \"Success\"){\n\t\t\t\t\t\tAlloy.Globals.hideLoading();\n\t\t\t\t\t\tvar alertView = Ti.UI.createAlertDialog({\n\t\t\t\t\t\t\ttitle : Alloy.Globals.selectedLanguage.appTitle,\n\t\t\t\t\t\t\tmessage : (Alloy.Globals.isEnglish)?result.getElementsByTagNameNS(ns, \"Message_EN\").item(0).textContent:result.getElementsByTagNameNS(ns, \"Message_AR\").item(0).textContent,\n\t\t\t\t\t\t\tbuttonNames : [Alloy.Globals.selectedLanguage.ok]\n\t\t\t\t\t\t});\n\t\t\t\t\t\talertView.addEventListener('click', function(e) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (e.index == 0) {\n\t\t\t\t\t\t\t\tvar winMenu = Alloy.createController('UserManagement/winLogin',{\n\t\t\t\t\t\t\t\t\tisFromLeftPanel : false\n\t\t\t\t\t\t\t\t}).getView();\n\t\t\t\t\t\t\t\tAlloy.Globals.openWindow(winMenu);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\talertView.show();\n\t\t\t\t\t}else if(status === \"Failure\"){\n\t\t\t \t\t\tAlloy.Globals.hideLoading();\n\t\t\t \t\t\tvar alertView = Ti.UI.createAlertDialog({\n\t\t\t\t\t\t\t\ttitle : Alloy.Globals.selectedLanguage.appTitle,\n\t\t\t\t\t\t\t\tmessage : (Alloy.Globals.isEnglish)?result.getElementsByTagNameNS(ns, \"Message_EN\").item(0).textContent:result.getElementsByTagNameNS(ns, \"Message_AR\").item(0).textContent,\n\t\t\t\t\t\t\t\tbuttonNames : [Alloy.Globals.selectedLanguage.ok]\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\talertView.show();\n\t\t\t \t\t}\n\t\t\t\t}else{\n\t\t \t\tvar alertView = Ti.UI.createAlertDialog({\n\t\t\t\t\t\ttitle : Alloy.Globals.selectedLanguage.appTitle,\n\t\t\t\t\t\tmessage : Alloy.Globals.selectedLanguage.serviceError,\n\t\t\t\t\t\tbuttonNames : [Alloy.Globals.selectedLanguage.ok]\n\t\t\t\t });\n\t\t\t\t alertView.show();\n\t\t \t Alloy.Globals.hideLoading();\n\t\t \t}\n\t\t\t\tAlloy.Globals.hideLoading();\n\t\t\t},1,mail,mobile,lblEmiratesPassport);\n\t\t\t}catch(e){\n\t\t\t\tTi.API.info('Error '+e.message);\n\t\t\t}\n\t\t}\n\t}else if($.imgEstablishment.image === Alloy.Globals.path.radioActive){\n\t\tif(license === \"\"){\n\t\t utilities.showAlert(Alloy.Globals.selectedLanguage.forgotUsername,Alloy.Globals.selectedLanguage.licenseNumber,function(){});\n\t }else if(mail === \"\"){\n\t\t \tutilities.showAlert(Alloy.Globals.selectedLanguage.forgotUsername,Alloy.Globals.selectedLanguage.mailId,function(){});\n\t\t}else if(mobile === \"\"){\n\t\t utilities.showAlert(Alloy.Globals.selectedLanguage.forgotUsername,Alloy.Globals.selectedLanguage.mobileNumber,function(){});\n\t\t}\n\t\t// else if (isNaN(mobile)) {\n\t\t \t// utilities.showAlert(Alloy.Globals.selectedLanguage.forgotUsername,Alloy.Globals.selectedLanguage.invalidMobile,function(){});\n\t\t// }\n\t\telse if (mobile.length !== 10 && mobile.value !== \"\") {\n\t\t \tutilities.showAlert(Alloy.Globals.selectedLanguage.forgotUsername,Alloy.Globals.selectedLanguage.mobileLength,function(){});\n\t\t}else{\n\t\t\ttry{\n\t\t\t\thttpManager.forgetUsername(function(result){\n\t\t\t\tvar rootNode = result.getElementsByTagName(\"output\");\n\t\t\t\tvar ns =\"http://ForgetUserName\";\n\t\t\t\t//var subNode = result.getElementsByTagName(\"ns1:Status\");\n\t\t\t\tvar ns =\"http://ForgetUserName\";\n\t\t \tif(rootNode.length > 0){\n\t\t \t\t\t \t\t\n\t\t \t\tvar status = result.getElementsByTagNameNS(ns, \"Status\").item(0).textContent;\n\t\t \t\t\n\t\t \t\tif(status === \"Success\"){\n\t\t \t\t\t\n\t\t \t\t\tvar alert = Ti.UI.createAlertDialog({\n\t\t\t\t\t\t\ttitle : Alloy.Globals.selectedLanguage.appTitle,\n\t\t\t\t\t\t\tmessage : (Alloy.Globals.isEnglish)?result.getElementsByTagNameNS(ns, \"Message_EN\").item(0).textContent:result.getElementsByTagNameNS(ns, \"Message_AR\").item(0).textContent,\n\t\t\t\t\t\t\tbuttonNames : [Alloy.Globals.selectedLanguage.ok]\n\t\t\t\t\t\t});\n\t\t\t\t\t\talert.addEventListener('click', function(e) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (e.index == 0) {\n\t\t\t\t\t\t\t\tvar winMenu = Alloy.createController('UserManagement/winLogin',{\n\t\t\t\t\t\t\t\t\tisFromLeftPanel : false\n\t\t\t\t\t\t\t\t}).getView();\n\t\t\t\t\t\t\t\tAlloy.Globals.openWindow(winMenu);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\talert.show();\n\t\t \t\t}else if(status === \"Failure\"){\n\t\t\t \t\t\tAlloy.Globals.hideLoading();\n\t\t\t \t\t\tvar alert = Ti.UI.createAlertDialog({\n\t\t\t\t\t\t\t\ttitle : Alloy.Globals.selectedLanguage.appTitle,\n\t\t\t\t\t\t\t\tmessage : (Alloy.Globals.isEnglish)?result.getElementsByTagNameNS(ns, \"Message_EN\").item(0).textContent:result.getElementsByTagNameNS(ns, \"Message_AR\").item(0).textContent,\n\t\t\t\t\t\t\t\tbuttonNames : [Alloy.Globals.selectedLanguage.ok]\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\talert.show();\n\t\t\t \t}\n\t\t \t}else{\n\t\t \t\tvar alert = Ti.UI.createAlertDialog({\n\t\t\t\t\ttitle : Alloy.Globals.selectedLanguage.appTitle,\n\t\t\t\t\t//title:\"tset\",\n\t\t\t\t\tmessage : Alloy.Globals.selectedLanguage.serviceError,\n\t\t\t\t\tbuttonNames : [Alloy.Globals.selectedLanguage.ok]\n\t\t\t\t });\n\t\t\t\t alert.show();\n\t\t \t Alloy.Globals.hideLoading();\n\t\t \t}\n\t\t \tAlloy.Globals.hideLoading();\n\t\t\t},2,mail,mobile,license);\n\t\t\t}catch(e){\n\t\t\t\tTi.API.info('Error '+e.message);\n\t\t\t}\n\t\t}\n\t}\n\t}catch(e){\n\t\tTi.API.info('Error in submit forget data function '+JSON.stringify(e));\n\t}\n}", "function forgotPassword() { \n\n\t\t\t$( \"#load\" ).show();\n\t\t\t\n\t\t\tvar form = new FormData(document.getElementById('reset_form'));\n\t\t\t\n\t\t\tvar validate_url = $('#reset_form').attr('action');\n\t\t\t\n\t\t\t$.ajax({\n\t\t\t\ttype: \"POST\",\n\t\t\t\turl: validate_url,\n\t\t\t\t//data: dataString,\n\t\t\t\tdata: form,\n\t\t\t\t//dataType: \"json\",\n\t\t\t\tcache : false,\n\t\t\t\tcontentType: false,\n\t\t\t\tprocessData: false,\n\t\t\t\tsuccess: function(data){\n\n\t\t\t\t\t\n\t\t\t\t\tif(data.success == true ){\n\t\t\t\t\t\t\n\t\t\t\t\t\t$( \"#load\" ).hide();\n\t\t\t\t\t\t$(\"input\").val('');\n\t\t\t\t\t\t\n\t\t\t\t\t\t$(\".forgot-password-box\").html(data.notif);\n\t\n\t\t\t\t\t\tsetTimeout(function() { \n\t\t\t\t\t\t\t//$(\"#notif\").slideUp({ opacity: \"hide\" }, \"slow\");\n\t\t\t\t\t\t\t//window.location.reload(true);\n\t\t\t\t\t\t}, 2000); \n\n\t\t\t\t\t}else if(data.success == false){\n\t\t\t\t\t\t$( \"#load\" ).hide();\n\t\t\t\t\t\t$(\"#notif\").html(data.notif);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t},error: function(xhr, status, error) {\n\t\t\t\t\t$( \"#load\" ).hide();\n\t\t\t\t},\n\t\t\t});\n\t\t\treturn false;\n\t\t}", "function reset_password()\n{\n\tvar username=$('#username').val();\n\tif(username=='')\n\t{\n\t\talert('please enter email id');\n\t}\n\telse\n\t{\n\t\t$.ajax({\n\t\t\t\ttype: \"POST\",\n\t\t\t\turl:\"http://codeuridea.net/kidssitter/resetting/send-email\",\n\t\t\t\tdata:{'username':$('#username').val()},\n\t\t\t\tdataType: \"json\",\n\t\t\t\tcrossDomain: true\n\t\t\t});\n\t}\n}", "function resetPassword(email){\n $.ajax({\n method: 'POST',\n url: \"inc/Auth/forget.php\",\n data: {email: email}\n }).done(function(msg){\n if(msg == 'user issue')\n {\n AJAXloader(false, '#loader-pass-forgot');\n displayMessagesOut();\n $('.error-field').addClass('novisible');\n $('.error-forgot-exist').removeClass('novisible');\n displayError([], '#pass-forgot-form', ['input[name=\"pass-forgot\"]'], '');\n }\n if(msg == 'confirm issue')\n {\n AJAXloader(false, '#loader-pass-forgot');\n displayMessagesOut();\n $('.error-field').addClass('novisible');\n $('.error-forgot-confirm').removeClass('novisible');\n displaySpecial([], '#pass-forgot-form', ['input[name=\"pass-forgot\"]'], '');\n }\n //ce msg est un retour de la fonction de mail et non de la fonction de reset\n if(msg == 'success')\n {\n AJAXloader(false, '#loader-pass-forgot');\n displayMessagesOut();\n $('.error-field').addClass('novisible');\n $('.valid-forgot').removeClass('novisible');\n displaySuccess([], '#pass-forgot-form', ['input[name=\"pass-forgot\"]'], '');\n }\n });\n}", "function forgotPassword(divid,url,mailid,type,fid){\n\t var emailvalue=document.getElementById(mailid).value;\n\t \n\t\t\t emailvalue=rm_trim(emailvalue);\n\t\t\t if(emailvalue==''){\n\t\t\t alert(\"Please Enter Email\");\n\t\t\t document.getElementById(mailid).focus();\n\t\t\t return false;\n\t\t\t }\n\t\t\t else if(!emailValidator(emailvalue)){\n\t\t\t\t\talert(\"Invalid Email \");\n\t\t\t\t\tdocument.getElementById(divid).innerHTML=\"\";\n\t\t\t\t\tdocument.getElementById(mailid).value=\"\";\n\t\t\t\t\tocument.getElementById(mailid).focus();\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t }\n\t\t\t\t\t // alert(url);\n\t\t\turl=url+\"&email=\"+emailvalue;\n\t\t\tgetServerResponse(divid,url,\"\",true)\n}", "function forgotPasswordDetails\n(\n emailID\n)\n{\n var data;\n var username = getEncode(emailID); \n var iv = username.iv; \n username = username.activate;\n \n var dataToSend = \n {\n \"action\" : VALIDATE_USER,\n \"iv\" : JSON.stringify(iv),\n \"encodeUN\" : JSON.stringify(username), \n \"activate\" : false\n }\n \n $.ajax({\n type : \"POST\",\n url : API_URL,\n data : dataToSend, \n dataType : \"json\",\n async : false, \n headers : HEADER,\n error : function (e) \n { \n \n return false;\n },\n success : function(result)\n { \n data = result; \n }\n \n });\n return data;\n}", "function managePasswordForgotten() {\n\t$('#passwordReset').click(function() { \n\t\t// We must reset the document and send a link to the registered email\n\t\t// to a form where the end user can update the password\n\t\tclearDocument();\n\t\tloadHTML(\"navbar.html\");\n\t\tnavbarHover();\n\t\t$(document.body).append(\"<center><h1>Please fill in the following form !</h1><center>\");\n\t\tloadHTML(\"passwordForgotten.html\");\n\t\tloadJS(\"js/forms.js\");\n formSubmission('#passwordForgotten','generatePasswordLnkRst','Reset email successfully sent','Unknown user');\n loadHTML(\"footer.html\");\n\t});\n}", "function sendEmailForgot() {\n var password = newPss();\n var emailToSendPassword = $(\"#emailSendingInput\").val();\n\n if (!validateForm(emailToSendPassword)) {\n swal(\"טעות\", \"האימייל אינו נכון נסה שנית\", \"warning\");\n $('#emailSendingInput').focus();\n return\n }\n $.ajax({\n type: 'POST',\n url: sendPassByEmail,\n data: {\n email: emailToSendPassword,\n password: password,\n },\n success: function (response) {\n if (response) {\n swal(\"אימייל נשלח\", \"סיסמא חדשה נשלחה לאימייל שצויין\", \"success\");\n $(\"#myForgotPasswordModal\").modal('hide');\n $(\"#myLogin\").modal('hide');\n }\n else\n swal(\"שגיאה\", \"נסיון שליחת אימייל עם סיסמה חדשה נכשל\", \"error\");\n }\n });\n}", "function forgotPassword(method,type) {\n hideError('email');\n addFunActionLabel=\"Forgot Pasword Submit\";\n if(pageType=='not_login'){\n var email = $.trim($(\"#TenTimes-Modal #userEmailCopy\").val()); \n }else{\n var email = $.trim($(\"#TenTimes-Modal #userEmail\").val());\n }\n if(!validateEmail12345(email)){\n $(\".alert_email\").show();\n return 0;\n }\n var otpType='password';\n if(type=='N' || type=='U'){\n otpType='otp';\n }\n\n if(method == \"connect\")\n var postData = {'email':email, 'name' : receiverData.name , 'type' : otpType }\n else\n var postData = {'email':email, 'name' : email , 'type' : otpType }\n showloading();\n $.post(site_url_attend+'/user/getpassword',postData,function(response){\n hideloading();\n response=$.parseJSON(response);\n var resText=response.resText;\n var resLink=response.resLink;\n if(type=='N' || type=='U'){\n resText=response.resText_typeN;\n resLink=response.resLink_typeN;\n \n }\n \n switch(response.response) {\n case 'true':\n $('#getpassword').parent().replaceWith(function() { return \"<a style='text-decoration:none'>\" + \"<p class='text-center' style='text-decoration:none;color:#909090;'>\" + resText + \"</p>\"+$('#getpassword').get(0).outerHTML+\"</a>\"; });\n\n $('#getpassword').text(resLink);\n if(method!='signup' && method!='connect' && method!='contact_organizer_venue'){\n $('#TenTimes-Modal .partial-log').hide();\n $('#getpassword').removeAttr(\"onclick\").click(function() {\n partialLog(method,type)\n }).text(resLink).css('color','#335aa1');\n }\n break;\n case 'false':\n $(\".alert_email\").html(\"Sorry, 10times doesn't recognize that email.\");\n $(\".alert_email\").show();\n break;\n }\n }); \n}", "function resetPass() {\n $('form#reset-pass').submit(function(e) {\n e.preventDefault()\n e.stopImmediatePropagation();\n var newPass = $('#user-reset-pass');\n var newPassAgain = $('#user-reset-pass-again');\n if (newPass.val() === newPassAgain.val()) {\n $.ajax({\n url: \"process/ajaxHandler.php\",\n method: \"POST\",\n dataType: \"JSON\",\n data: {\n action: \"resetPassword\",\n userNewPass: newPass.val()\n },\n success: function(response) {\n if (response.status == \"success\") {\n $('div#container').remove();\n $('body').append(\"<h3 class='successfully-change-pass-msg'>Your password successfully changed</h3>\");\n setTimeout(function() { window.location.replace(response.redirectAddress) }, 2000);\n } else if (response.status == \"error\") {\n alert(response.description)\n }\n }\n })\n } else {\n alert('password not match.')\n }\n })\n}", "function ksForgotPassword(){\n //check if the form is valid\n if(!$('#forgotpassword').valid()) return;\n \n //put the loading screen on\n loadingScreen();\n \n //create an object to send to varify auth\n var obj=new Object();\n obj.email = $('#forgotpassword input[name=\"email\"]').val();\n \n //send the reset information via ajax\n $.ajax({\n type: \"POST\",\n url: \"/login/resetpassword/\",\n dataType: \"json\",\n data: obj ,\n async: false,\n success: function(res) {\n if (res.items[0].status ==='success'){\n setSuccessToSuccess();\n //loading screen\n removeLoadingScreen();\n\n //display success failure screen\n displaySuccessFailure();\n \n \n $('#glassnoloading').fadeOut('normal');\n \n //change the dialog to be more informative\n $('.registerdialog img').attr(\"src\" , \"/img/success.png\");\n $('.registerdialog * .message').text('Successfully identified your account. A mail was sent to the address you supplied. To proceed with password change follow the link in the mail sent.');\n $('.registerdialog > .front-card').remove();\n \n }\n else{\n setSuccessToFailed();\n //loading screen\n removeLoadingScreen();\n\n //display success failure screen\n displaySuccessFailure();\n\n $('#glassnoloading').fadeOut('normal');\n \n //change the dialog to be more informative\n $('.registerdialog img').attr(\"src\" , \"/img/failed.png\");\n $('.registerdialog * .message').text(res.items[0].msg);\n }\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 //change the dialog to be more informative\n $('.registerdialog img').attr(\"src\" , \"/img/failed.png\");\n $('.registerdialog * .message').text('Error! Connection failure. Try again');\n }\n });\n}", "function getUserForManagePassword(username) {\r\n\tblockUI();\r\n\t$.ajax({\r\n\t\ttype : \"GET\",\r\n\t\turl : \"getUserForResetPassword.do\",\r\n\t\tdata : \"username=\" + username,\r\n\t\tdataType : \"json\",\r\n\t\tcache : false,\r\n\t\tsuccess : function(data) {\r\n\t\t\tunblockUI();\r\n\t\t\tif (data) {\r\n\t\t\t\t$(\"#userSearchRpHidden\").val(username);\r\n\t\t\t\t$(\"#userIdRP\").val(data.userId);\r\n\t\t\t\t$('#userSearchRP').blur(); \r\n\r\n\t\t\t\t$(\"#firstNameRP\").text(data.firstName);\r\n\t\t\t\t$(\"#middleNameRP\").text(data.middleName);\r\n\t\t\t\t$(\"#lastNameRP\").text(data.lastName);\r\n\t\t\t\t$(\"#emailRP\").text(data.emailId);\r\n\t\t\t\t$(\"#contactNumberRP\").text(data.phoneNumber);\r\n\t\t\t\t$(\"#streetRP\").text(data.street);\r\n\t\t\t\t$(\"#cityRP\").text(data.city);\r\n\t\t\t\t$(\"#stateRP\").text(data.state);\r\n\t\t\t\t$(\"#zipRP\").text(data.zip);\r\n\t\t\t\t$(\"#countryRP\").text(data.country);\r\n\r\n\t\t\t\tif (data.pwdHintList[0]) {\r\n\t\t\t\t\t$(\"#question1RP\").text(data.pwdHintList[0].questionValue);\r\n\t\t\t\t\t$(\"#answer1RP\").text(data.pwdHintList[0].answerValue);\r\n\t\t\t\t}\r\n\t\t\t\tif (data.pwdHintList[1]) {\r\n\t\t\t\t\t$(\"#question2RP\").text(data.pwdHintList[1].questionValue);\r\n\t\t\t\t\t$(\"#answer2RP\").text(data.pwdHintList[1].answerValue);\r\n\t\t\t\t}\r\n\t\t\t\tif (data.pwdHintList[2]) {\r\n\t\t\t\t\t$(\"#question3RP\").text(data.pwdHintList[2].questionValue);\r\n\t\t\t\t\t$(\"#answer3RP\").text(data.pwdHintList[2].answerValue);\r\n\t\t\t\t}\r\n\t\t\t\tif (data.userId == 0) {\r\n\t\t\t\t\t$.modal.alert(strings['script.noUserFound']);\r\n\t\t\t\t\t$(\"#userDetailsRP\").attr(\"class\", \"wizard-fieldset fields-list hidden\");\r\n\t\t\t\t\t$(\"#securityQuestionsRP\").attr(\"class\", \"wizard-fieldset fields-list hidden\");\r\n\t\t\t\t\t$(\"#userSearchRP\").attr('readonly', false);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$(\"#userSearchRP\").attr('readonly', true);\r\n\t\t\t\t\t$(\"#userDetailsRP\").attr(\"class\", \"wizard-fieldset fields-list\");\r\n\t\t\t\t\t$(\"#securityQuestionsRP\").attr(\"class\", \"wizard-fieldset fields-list\");\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$.modal.alert(strings['script.noUserFound']);\r\n\t\t\t\t$(\"#userDetailsRP\").attr(\"class\", \"wizard-fieldset fields-list hidden\");\r\n\t\t\t\t$(\"#securityQuestionsRP\").attr(\"class\", \"wizard-fieldset fields-list hidden\");\r\n\t\t\t\t$(\"#userSearchRP\").attr('readonly', false);\r\n\t\t\t}\r\n\t\t},\r\n\t\terror : function(data) {\r\n\t\t\tunblockUI();\r\n\t\t\t$.modal.alert(strings['script.user.search']);\r\n\t\t},\r\n\t\tcomplete : function(data) {\r\n\t\t}\r\n\t});\r\n}", "function z_usersPassword(id) {\r\n var usrId = id;\r\n var pass = $(\"#newPassword\").val();\r\n var cnfmPass = $(\"#confirmPassword\").val();\r\n if ($(\"#resetPassForm\").valid()) {\r\n var data = {\r\n userId: usrId,\r\n password: pass\r\n };\r\n $.ajax({\r\n url: \"/api/updateUserCredential\",\r\n type: \"POST\",\r\n data: data,\r\n dataType: 'text',\r\n success: function (result) {\r\n console.log(result);\r\n var form = document.getElementById(\"resetPassForm\");\r\n if (result.split(\":\")[1] == \"Done\") {\r\n alertPopup('success', \"Password Updated Successfully\");\r\n } else {\r\n alertPopup('alert', \"User Not found\");\r\n }\r\n $('#z-resetPass-popup').modal(\"hide\");\r\n },\r\n error: function (result) {\r\n console.log(result);\r\n }\r\n });\r\n }\r\n}", "function ajaxUsername(){\r\n\tif($(\"#username\").val()!=\"\"){\r\n\t\t$.ajax(\"/register/user/\",{\r\n\t\t\tdata:{username:$(\"#username\").val()},\r\n\t\t\ttype:\"GET\",\r\n\t\t\tdataType:\"text\",\r\n\t\t\tsuccess: function(data){\r\n\t\t\t\tif(data==\"true\"){\r\n\t\t\t\t\tsuccessMsg($(\"#username\"));\r\n\t\t\t\t} else {\r\n\t\t\t\t\tspecError($(\"#username\"),\"username in use\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n}", "function resetPass(){\nif (document.getElementById('userid').value =='' || document.getElementById('userid').value == null) {\nparent.swal({title: \"Missing Input!\",text: \"Please enter your User ID.\",type: \"error\"},function(){setTimeout(function(){document.getElementById('userid').focus();},100);});\nreturn false;\n};\nswal({\n title: \"Please wait.. \",\n text: \"This may take a few seconds! Please wait for a confirmation message!\",\n showConfirmButton: false\n});\n $.ajax({\t\t\t\n\t\t\t\tdataType: \"jsonp\",\n\t\t\t\ttimeout: 10000,\n\t\t\t\turl: 'utils/forgotpassword.php?jsoncall=?',\n\t\t\t\ttype: \"POST\",\n data: {\n userid: document.getElementById(\"userid\").value, process: \"forgotpass\"\n }, \n success:function (data) {\n\t\t\t\t\tvar data2=data.response;\n if (data2 == \"2\")\n {\n\t\t\t\t\t\tdocument.getElementById(\"userid\").value=\"\";\n\t\t\t\t\t\tswal({title: \"Success!\",text: \"Information on resetting your password has been sent to your registered email address!\", type: \"success\"});\n }\n\t\t\t\t\telse if (data2 == \"8\")\n\t\t\t\t\t{\n\t\t\t\t\t\tdocument.getElementById(\"userid\").value=\"\";\n\t\t\t\t\tswal({title: \"An error has occurred!\",text: \"Please try again!\", type: \"error\"});\n\t\t\t\t\t}\n\t\t\t\t\telse if (data2 == \"7\")\n\t\t\t\t\t{\n\t\t\t\t\t\tdocument.getElementById(\"userid\").value=\"\";\n\t\t\t\t\tswal({title: \"Details entered do not match any on file!\",text: \"Please try again!\", type: \"error\"});\n\t\t\t\t\t}\n else\n {\n\t\t\t\t\t\tdocument.getElementById(\"userid\").value=\"\";\n\t\t\t\t\tswal({title: \"Error!\",text: \"An un-documented error has occurred, please try again.\", type: \"error\"});\n }\n }\n }); \n}", "function check_username(str,field_name,id){\n\tvar eid =\"#\"+field_name;\n\t$.ajax({\n\t\t\t type: 'POST',\n\t\t\t url: ADMINSITEURL+\"ajax/check_username\",\n\t\t\t data: {st:str,bid:id},\n\t\t\t success: function(response) {\n\t\t\t \tif(!response.status){\n\t\t\t \t\t//alert(eid);\n\t\t\t \t\t$(eid).val('');\n\t\t\t \t\t$(eid).after(\"<span class='form-error' style='color:red;'>\"+response.message+\"</span>\");\n\t\t\t \t}\n\n\t\t\t }\n\t\t })\n}", "function verify_repass(repassword){\n var password = $(\"#password\").val();\n $(\".re_error\").hide();\n $(\".re_correct\").hide();\n if(repassword == \"\"){\n $(\".re_error\").show();\n $(\".re_error\").html(\"Please enter password\");\n \n } else{\n $.ajax({\n url: \"action.php\",\n method: \"POST\",\n data: {check_repass:1,repassword:repassword,password:password},\n success: function(data){ \n if(data == \"password_short\"){\n $(\".re_error\").show();\n $(\".re_error\").html(\"Password too short!\");\n } else if(data == \"not_matched\"){\n $(\".re_error\").show();\n $(\".re_error\").html(\"Password not matched!\");\n } else if(data == \"ok\"){\n $(\".re_correct\").show();\n $(\".re_correct\").html(\"OK\");\n }\n }\n });\n } \n }", "function chkLogin_for_existinguser(pBody,email, password, bounceval)\n{\n\tvar urllength = bounceval.length;\n\tvar urlindex = bounceval.lastIndexOf('&page');\n\tif(urlindex != -1){\n\t\tvar bounceval = bounceval.substr(urlindex, urllength);\n\t}\n\txmlHttp=GetXmlHttpObject();\n\tif (xmlHttp==null)\n\t{\n\t\talert (\"Your browser does not support AJAX!\");\n\t\treturn;\n\t}\n\tvar url = host + '/community/exchange_register/welcome.htm?email=' + email + '&password=' + password + '&' +bounceval + '&flag=existuser_new_emailalert'+'&'+pBody;\n\tvardiv='newregistration';\n\txmlHttp.open(\"GET\",url,true);\n\txmlHttp.onreadystatechange=function()\n\t{ \n\t\tregistrationstateChanged(vardiv); \n\t};\n\txmlHttp.send(null);\n}", "function changePasswordHandler(response) {\n messageData = JSON.parse(response);\n if (messageData.success) \n\tdocument.getElementById(\"changePasswordForm\").reset();\n}", "function loginUser() {\n var email,\n password;\n email = $(\"#inputEmail3\").val();\n password = $(\"#inputPassword3\").val();\n $.ajax({\n type: \"POST\",\n url: \"Controllers/controller.User.php\",\n data: {locate: 'UserLogin', email: email, password: password}\n })\n .done(function(msg) {\n if (msg === '') {\n noty({\n layout: 'bottom',\n type: 'alert',\n text: 'Your Email or your Password are wrong!',\n dismissQueue: true,\n animation: {\n open: {height: 'toggle'},\n close: {height: 'toggle'},\n easing: 'swing',\n speed: 500\n },\n timeout: 4000\n });\n return;\n }else{\n alert(msg);\n }\n });\n\n}", "function postResetPassword(data, textStatus, jqXHR, param) {\n\tvar user = param.user;\n\tvar uiDiv = $('#ui');\n\tuiDiv.html('');\n\tvar p = $('<p>');\n\tuiDiv.append(p);\n\tp.html('The password for \"' + user + '\" has been reset.');\n\tvar ul = $('<ul>');\n\tuiDiv.append(ul);\n\tvar li = $('<li>');\n\tul.append(li);\n\tli.html('New password: \"' + data[user] + '\"');\n}", "function sendForgetPassword(){\n //check validation\n if(!$('#forget_password_dialog form').valid()) return;\n \n //put loading screen\n loadingScreen();\n \n //prepare the object to send\n var obj=new Object();\n obj.email = $.trim($('#forget_password_dialog_textbox').val());\n \n //send the reset information via ajax\n $.ajax({\n type: \"POST\",\n url: \"/login/resetpassword/\",\n dataType: \"json\",\n data: obj ,\n async: false,\n success: function(res) {\n if (res.items[0].status ==='success'){\n $('#forget_password_dialog_error').css('display', 'none');\n $('#forget_password_dialog_body').fadeOut('normal', function(){\n $('#forget_password_dialog_success').fadeIn('normal');\n });\n }\n else{\n $('#forget_password_dialog_error * p').text(res.items[0].msg);\n $('#forget_password_dialog_error').fadeIn('normal');\n }\n removeLoadingScreen();\n },\n error: function(res){\n $('#forget_password_dialog_error * p').text('Connection failure: Try again');\n $('#forget_password_dialog_error').fadeIn('normal');\n removeLoadingScreen();\n }\n });\n}", "function checkUsername()\r\n{\r\n var username = document.getElementById(\"userBox\").value;\r\n if(username != \"\") {\r\n \t$.ajax({\r\n \t type: 'POST',\r\n \t url: 'DBFuncs.php',\r\n \t data: { functionName:'checkUsernameReg',argument:[username] },\r\n\t success: function (response){\r\n \t if(response == 0) {\r\n\t \t document.getElementById(\"userMessage\").innerHTML=\"Username is already in use\";\r\n\t }\r\n else {\r\n\t \t document.getElementById(\"userMessage\").innerHTML=\"Username is avaliable\";\r\n\t }\r\n\t }\r\n\t});\r\n }\r\n}", "function postChangePassword(data, textStatus, jqXHR, param) {\n\tvar uiDiv = $('#ui');\n\tuiDiv.html('');\n\tvar div = $('<div>');\n\tuiDiv.append(div);\n\tdiv.addClass('transmissionnum');\n\tdiv.html('The password was successfully changed.');\n}", "function cancelForgotUsername(){\n\tcloseWindow();\n}", "function loginAjax() {\n let username = $('input#username').val();\n let pwd = $('input#pwd').val();\n if(username===\"\" || pwd===\"\") {\n loginResponse({status:-1});\n return false;\n }\n sendAjax('login',{\n 'username': username,\n 'password': sha256(pwd)\n });\n return false; // Prevent auto refresh\n}", "function checkEmailExist(email,entity_id){\n $.ajax({\n type: \"POST\",\n url: BASEURL+\"backoffice/users/checkEmailExist\",\n data: 'email=' + email +'&entity_id='+entity_id,\n cache: false,\n success: function(html) {\n if(html > 0){\n $('#EmailExist').show();\n $('#EmailExist').html(\"User is already exist with this email id!\"); \n $(':input[type=\"submit\"]').prop(\"disabled\",true);\n } else {\n $('#EmailExist').html(\"\");\n $('#EmailExist').hide(); \n $(':input[type=\"submit\"]').prop(\"disabled\",false);\n }\n },\n error: function(XMLHttpRequest, textStatus, errorThrown) { \n $('#EmailExist').show();\n $('#EmailExist').html(errorThrown);\n }\n });\n}", "function onReset() {\n\tdocument.getElementById('username').value = \"\";\n\tdocument.getElementById('password').value = \"\";\n\tdocument.getElementById('email').value = \"\";\n\tdocument.getElementById('result').innerHTML = \"\";\n\tflagUsername = false;\n\tflagPassword = false;\n\tflagEmail = false;\n}", "function chkLogin(email, password, bounceval)\n{\n\tvar urllength = bounceval.length;\n\tvar urlindex = bounceval.lastIndexOf('&page');\n\tif(urlindex != -1){\n\t\tvar bounceval = bounceval.substr(urlindex, urllength);\n\t}\n\txmlHttp=GetXmlHttpObject();\n\tif (xmlHttp==null)\n\t{\n\t\talert (\"Your browser does not support AJAX!\");\n\t\treturn;\n\t}\n\t\n\tvar url = host + '/community/exchange_register/welcome.htm?email=' + email + '&password=' + password + '&' +bounceval + '&flag=fromindex';\n\tvardiv='newregistration';\n\txmlHttp.open(\"GET\",url,true);\n\txmlHttp.onreadystatechange=function()\n\t{ \n\t\tregistrationstateChange(vardiv); \n\t};\n\txmlHttp.send(null);\n}", "function doRetrieve(){\n\t$j('forgetResult').html('Please Wait... <img src=\"static/loading.gif\"/>').slideDown();\n\t\n\tvar params = prepForQuery(getFormVars('forgot'));\n\t\n\t$j.ajax({\n\t\turl: \"user/forgot\",\n\t\ttype: 'post',\n\t\tdata: params,\n\t\tsuccess: returnForgot\n\t});\n}", "function modif_password(){\n //mot de passe actuel, nouveau et confirmé et l'id \n var act =$(\"#act\").val();\n \n var npas =$(\"#npas\").val();\n var cpas =$(\"#cpas\").val();\n if(npas!=cpas){\n $('#alert-profil-npas').html('<span class=\"text-danger\">Mots de passe différents</span>'); \n $('#alert-profil-cpas').html('<span class=\"text-danger\">Mots de passe différents</span>'); \n }else{\n var action =\"update_pass\";\n var id = $(\"#user-id\").val();\n xhr = new XMLHttpRequest;\n xhr.responseType = 'json';\n var URL = \"ajax/users.php?action=\"+action+\"&id=\"+id+\"&pass=\"+npas;\n xhr.open(\"GET\",URL,true);\n xhr.send(null);\n xhr.onreadystatechange = result;\n function result(){\n if (this.readyState === 4 && this.status === 200) {\n var data = xhr.response;\n $('#alert4').html(data.result);\n \n $('#alert4').css('display','block');\n $(\"#act\").val();\n $(\"#cpas\").val();\n $(\"#npas\").val();\n }\n }\n }\n \n \n\n}", "function updateUserPassword(){\n\t\tif($(\"#searchusername\").val() && $('#editpassword').val()){\n\t\t\t$.ajax({\n\t\t\t\ttype: 'POST',\n\t\t\t\turl: \"../UserServlet\",\n\t\t\t\tdata: {\n\t\t\t\t\t\taction:'updateUserPassowrd',\n\t\t\t\t\t\tusername: $('#searchusername').val(),\n\t\t\t\t\t\tpassword:$('#editpassword').val()\n\t\t\t\t\t\t},\n\t\t\t\tsuccess: function(response) {\n\t\t\t\t\t\tif(response.status==\"success\"){\n\t\t\t\t\t\t\talert('Password successfully updated');\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(response.status==\"failure\") {\n\t\t\t\t\t\t\talert(response.error);\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\tdataType: \"json\"\n\t\t});\n\t\t}\n\t\telse{\n\t\t\talert(\"Username or Password cannot be empty\");\n\t\t}\n\n\t}", "function ajaxCallForResettingPassword(resetEmail,resetPassword){\n // console.log(\"in resetPassword \",resetEmail,resetPassword);\n var data = {};\n data.resetEmail = resetEmail;\n data.resetPassword = resetPassword;\n\n $.ajax({\n url:\"/users/resetPassword\",\n type: 'POST',\n async: true,\n data: JSON.stringify(data),\n contentType: 'application/json',\n context: this,\n cache: false,\n processData: false,\n success: function(response) {\n console.log('Reset password succesfully',response);\n location.reload();\n },\n error: function(response) {\n console.log('Error with reset password ' + response.statusText);\n console.log(\"error page\");\n }\n });\n }", "function loginRegCall(url) {\n var username = $('#username').val();\n var pass = $('#password').val();\n $.ajax({\n url: url,\n type: 'POST',\n data: {username: username, pass: pass},\n success: function (data) {\n location.reload();\n },\n error: function () {\n }\n });\n}", "function recoverPassword() {\n const email = document.getElementsByName(\"recover-email\").item(0);\n xhttp(\"POST\", \"forgot.php\", { email: email.value }, (response) => {\n // do nothing if it works or if it fails\n });\n const loginpage = document.getElementById(\"main\").querySelector(\"div.loginpage\");\n loginpage.innerHTML += '<p class=\"warn\">If the email is in our database, an email will be sent shortly to recover your account</p>';\n return false;\n}", "function resetUserPwd(username) {\r\n\tvar userId = $(\"#userIdRP\").val();\r\n\tvar email = $(\"#emailRP\").text();\r\n\tif (userId == \"0\") {\r\n\t\t$.modal.alert(strings['script.trySearch']);\r\n\t} else {\r\n\t\t$.modal.confirm(strings['msg.rp.confirm'] + username + \"?\", function() {\r\n\t\t\tblockUI();\r\n\t\t\t$.ajax({\r\n\t\t\t\ttype : \"GET\",\r\n\t\t\t\turl : \"resetUserPassword.do\",\r\n\t\t\t\tdata : \"username=\" + username + \"&email=\" + email,\r\n\t\t\t\tdataType : 'json',\r\n\t\t\t\tcache : false,\r\n\t\t\t\tsuccess : function(data) {\r\n\t\t\t\t\tunblockUI();\r\n\t\t\t\t\tif (data != null && data.resetPwdFlag == \"1\") {\r\n\t\t\t\t\t\t$(\"#passwordResetStatusMsgRP\").html(\"<span>\"+strings['msg.rp.success']+\"</span>\");\r\n\t\t\t\t\t\t$(\"#statusUsernameRP\").text(username);\r\n\t\t\t\t\t\tif (data.sendEmailFlag == \"1\") {\r\n\t\t\t\t\t\t\t$(\"#statusEmailRP\").html(\"<span style=\\\"color: green\\\">\"+strings['msg.rp.email.success']+\"</span>\");\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$(\"#statusEmailRP\").html(\"<span style=\\\"color: red\\\">\"+strings['msg.rp.email.failure']+\"</span>\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$(\"#passwordResetStatusRP\").attr(\"class\", \"wizard-fieldset fields-list\");\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$(\"#passwordResetStatusRP\").attr(\"class\", \"wizard-fieldset fields-list hidden\");\r\n\t\t\t\t\t\t$.modal.alert(strings['script.parent.passwordResetError']);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$('#userSearchRP').val(username);\r\n\t\t\t\t},\r\n\t\t\t\terror : function(data) {\r\n\t\t\t\t\tunblockUI();\r\n\t\t\t\t\t$.modal.alert(strings['script.parent.passwordResetError']);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}, function() {\r\n\t\t\t// this function closes the confirm modal on clicking cancel button\r\n\t\t});\r\n\t}\r\n}", "function otbot_attempt_login(ot_username, ot_password){\n\n $.post(\n \n // see tip #1 for how we declare global javascript variables\n \n ajaxurl,\n {// here we declare the parameters to send along with the request\n \n action : 'otbot_attempt_login',\n // other parameters can be added along with \"action\"\n //requests only come from pages which originate with our server\n \n //username and password for ot\n otbot_username: ot_username,\n otbot_password: ot_password\n },\n \n function( response ) {\n $('#wait').hide();\n if(response ==\"ERROR!!!\"){\n alert(\"Password or Username is incorrect, please try again.\");\n $('#credentials').show();\n }else{\n cookieName = response;\n $('#status').append('1. ' + ot_username );\n $('#status').attr('otusername',('1. ' + ot_username) );\n otbot_query_projects();\n $('#wait').show();\n \n }\n });//end ajax post\n\n}//end otbot_attempt_login", "function forget_password(){\r\n localStorage.setItem(\"time\",\"1000\");\r\n localStorage.setItem(\"link\",\"password_reset.html\");\r\n window.open('loading.html',\"_self\");\r\n }", "function nickCheck(){\n\t$.ajax({\n\t\turl : `${getContextPath()}`+\"/nickCheck.do\",\n\t\ttype : \"post\",\n\t\tdataType:\"text\",\n\t\tdata : \"nickcheck=\"+$(\"#nick_name\").val(),\n\t\tsuccess:function(data){\n\t\t\t\n\t\t\tif(data === \"true\"){\n\t\t\t\t$('.nickComentColor span').removeClass('alert-green');\n\t\t\t\t$('.nickComentColor span').addClass('alert-red');\n\t\t\t\tdocument.querySelector(\".nickCheck\").innerHTML = \"사용 중 인 닉네임입니다.\";\n\t\t\t} else {\n\t\t\t\t$('.nickComentColor span').removeClass('alert-red');\n\t\t\t\t$('.nickComentColor span').addClass('alert-green');\n\t\t\t\tdocument.querySelector(\".nickCheck\").innerHTML = \"사용가능한 닉네임입니다.\";\n\t\t\t}\n\n\t\t},\n\t\terror:function(request,status,error){\n\t\t\t\n\t\t}\n\t\t\n\t});\n}", "function submitForm()\r\n\t\t{\t\t\r\n\t\t\tvar data = $(\".forgotform\").serialize();\r\n\t\t\t\t\r\n\t\t\t$.ajax({\r\n\t\t\t\t\r\n\t\t\ttype : 'POST',\r\n\t\t\t//url : 'engine/login_process.php',\r\n\t\t\turl : 'http://api.haagendazsindonesia.co.id/v1/auth/forgot_password',\r\n\t\t\t//crossDomain: true,\r\n\t\t\t//headers: {\r\n // 'Access-Control-Allow-Origin': '*'\r\n //'Content-Type':'application/x-www-form-urlencoded'\r\n \t//},\r\n\t\t\tdata : data,\r\n\t\t\t//dataType : 'jsonp',\r\n\t\t\tbeforeSend: function()\r\n\t\t\t{\t\r\n\t\t\t\t$(\".loads\").fadeIn();\r\n\t\t\t\t$(\".loads\").html('Resetting your password...');\r\n\t\t\t\t$(\".forgotform\").fadeOut();\r\n\t\t\t},\r\n\t\t\tsuccess : function(response)\r\n\t\t\t {\r\n\t\t\t \t\tvar respon = jQuery.parseJSON(response);\r\n\t\t\t\t\tif(respon.is_error===false){\r\n\t\t\t\t\t\t$(\".loads\").html('Success! Your new password has been sent to your email.');\r\n\t\t\t\t\t\tsetTimeout('location.reload();',4000);\r\n\t\t\t\t\t\t\r\n\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$(\".loads\").html('<div class=\"alert alert-danger\"> <span class=\"glyphicon glyphicon-info-sign\"></span> &nbsp; '+respon.status_msg+' !</div>');\r\n\t\t\t\t\t\t$(\".forgotform\").fadeIn();\r\n\t\t\t\t\t\tsetTimeout(function () {\r\n\r\n\t\t\t\t\t\t\t$(\".alert-danger\").hide();\r\n\r\n\t\t\t\t\t\t},1000)\r\n\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t }\r\n\t\t\t});\r\n\t\t\t\treturn false;\r\n\t\t}", "function checkUser() {\r\n // abort previous request, if any\r\n if (uaro != undefined) uaro.abort();\r\n\r\n reset_username_status();\r\n\r\n uaro = $j.ajax({\r\n url: 'checkMemberID.php',\r\n type: 'GET',\r\n data: { 'memberID': $j('#username').val() },\r\n success: function (resp) {\r\n var ua = resp;\r\n if (ua.match(/\\<!-- AVAILABLE --\\>/)) {\r\n reset_username_status('success');\r\n } else {\r\n reset_username_status('error');\r\n }\r\n }\r\n });\r\n}", "function UsernameSecurityCheckAjaxMethod() {\n var user = $(\"#usernameCheck\").val();\n var security = $('#Securty').val();\n var answer = $('#AnswerCheck').val();\n $.ajax({\n type: \"POST\",\n url: \"Login.aspx/UsernameAndPasswordTwoCheckForgotPageMethod\",\n data: \"{userCheck: '\" + user + \"', security: '\" + security + \"', answer: '\" + answer + \"'}\",\n dataType: \"json\",\n contentType: \"application/json; charset=utf-8\",\n success: function () {\n $('.SecurityCheck').fadeOut(function () {\n $('.AllisGood').fadeIn(700);\n });\n },\n error: function () {\n if (security == \"Choose Security Question\") {\n $('#SecurityError').text(\"Please select Security Question.\");\n $('#SecurityError').css({ 'color': 'red', 'font-weight': 'bold', 'margin-top': '-15px', 'margin-bottom': '20px', 'font-size': '15px' });\n $('#SecurityError').addClass('animated shake');\n return false;\n }\n else if (answer == \"\") {\n $('#SecurityError').text(\"Please give Answer.\");\n $('#SecurityError').css({ 'color': 'red', 'font-weight': 'bold', 'margin-top': '-15px', 'margin-bottom': '20px', 'font-size': '15px' });\n $('#SecurityError').addClass('animated shake');\n return false;\n }\n else\n $('#SecurityError').text(\"It is not Correct.\");\n }\n });\n}", "function loginCallSucceeded(responseText, statusText, xhr, $form) {\r\n\r\n // hide spinner\r\n $(\".spinner\").hide();\r\n\r\n // enable for re-click\r\n $(\".main:first\").removeClass(\"workingNow\");\r\n\r\n // process the result\r\n if (statusText == \"success\") {\r\n var regexp = new RegExp(\"^([0-9a-fA-F]){32}$\");\r\n if (regexp.test(responseText)) {\r\n\r\n // copy email to other form\r\n var email = $(\"#userEmail\").attr(\"value\");\r\n email = $.trim(email);\r\n email = email.toLowerCase();\r\n $(\"#userEmail2\").attr(\"value\", email);\r\n\r\n // copy pswd to other form\r\n var pswd = $(\"#userPassword\").attr(\"value\");\r\n $(\"#userPassword2\").attr(\"value\", pswd);\r\n\r\n // post the aspx form\r\n document.getElementById('submitButton').click();\r\n\r\n return;\r\n }\r\n else {\r\n var errorStripDiv = $(\".errorStrip\");\r\n var errorTextDiv = errorStripDiv.find(\".errorText\");\r\n showError(responseText, errorStripDiv, errorTextDiv);\r\n }\r\n }\r\n else {\r\n singleActionCallFailed();\r\n }\r\n}", "function checkValidToken() {\n $('form#reset-token').submit(function(e) {\n e.preventDefault()\n e.stopImmediatePropagation();\n var userResetToken = $('#user-reset-token');\n $.ajax({\n url: \"process/ajaxHandler.php\",\n method: \"POST\",\n dataType: \"JSON\",\n data: {\n action: \"checkToken\",\n userToken: userResetToken.val()\n },\n success: function(response) {\n if (response.status == \"success\") {\n $('form#reset-token').remove();\n $('#container').append(response.passForm)\n $('input#user-reset-pass').focus();\n resetPass();\n } else if (response.status == \"error\") {\n alert(response.description)\n }\n }\n })\n })\n}", "function efiapi(pass) {\n $.ajax({\n type: \"post\",\n data: {\n login: \"efi\",\n password: pass\n },\n\n url: \"https://efigence-camp.herokuapp.com/api/login\",\n error: function(response) {\n var badresp = $.parseJSON(response.responseText);\n $(\".pass-wrong p\").text(badresp.message);\n $wrongPassBox.show('slow').attr('aria-hidden', false)\n .delay(1000)\n .hide('slow').attr('aria-hidden', true);\n },\n success: function(response) {\n\n $(location).attr('href', newUrl);\n }\n\n });\n } //End of efiapi", "function oldUsernameAjaxValidator() {\n\t\t\t//console.log(\"Executing test ajax function\");\n\t\t\tvar xmlhttp;\n\t\t\tif (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari\n\t\t\t\txmlhttp=new XMLHttpRequest();\n\t\t\t}\n\t\t\telse {// code for IE6, IE5\n\t\t\t\txmlhttp=new ActiveXObject(\"Microsoft.XMLHTTP\");\n\t\t\t}\n\t\t\t//console.log(\"xml request created\");\n\t\t\txmlhttp.onreadystatechange=function() {\n\t\t\t\t//console.log(\"ready state changed\");\n\t\t\t\tif (xmlhttp.readyState==4) {\n\t\t\t\t\tif (xmlhttp.responseText == 1) {\n\t\t\t\t\t\tdocument.getElementById('oldusernamemessage').innerHTML = \"Logged in !!!\";\n\t\t\t\t\t\t\n\t\t\t\t\t\t//Validation successful , now log in the user\n\t\t\t\t\t\tdocument.getElementById('oldUserName').submit();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t//document.getElementById('usernamemessage').innerHTML = xmlhttp.responseText;\n\t\t\t\t\t\tdocument.getElementById('oldusernamemessage').innerHTML = \"Username not found !!!\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\txmlhttp.open(\"POST\",\"oldUsernameValidator.php\",true);\n\t\t\t//console.log(\"POST method set\");\n\t\t\txmlhttp.setRequestHeader(\"Content-type\",\"application/x-www-form-urlencoded\");\n\t\t\t//console.log(\"request header set\");\n\t\t\t//console.log(document.getElementById('oldusername').value);\n\t\t\txmlhttp.send(\"username=\" + document.getElementById('oldusername').value);\n\t\t\t//console.log(\"request sent\");\n\t\t\t\n\t\t}", "function tryChangePassword() {\n if(typeof(changing) != 'undefined' && changing) {\n alert(\"암호 변경 중입니다.\\n잠시만 기다려주세요.\");\n\n return false;\n } // Avoid duplicate trying.\n\n changing = true;\n\n var memID = window.userData.id;\n\n if($('#txt_change_pasword_current_pw').val() == \"\" || $('#txt_change_pasword_new_pw').val() == \"\" || $('#txt_change_pasword_new_pw_re').val() == \"\") {\n alert('모든 칸을 채워주세요.');\n } else if($('#txt_change_pasword_new_pw').val() != $('#txt_change_pasword_new_pw_re').val()) {\n alert('암호와 암호 확인이 일치하지 않습니다.');\n } else {\n changePassword({\n \"memID\": encodeURI(memID),\n \"existing\": $('#txt_change_pasword_current_pw').val(),\n \"newPw\": $('#txt_change_pasword_new_pw').val()\n }, function(result) {\n delete changing;\n\n if(result.success) {\n alert(\"암호가 변경되었습니다.\\n다시 로그인해주세요.\");\n\n $.get(\"http://192.168.60.100:3000/logout\",function(data){\n if(data==='logout'){\n document.location.reload();\n }\n });\n } else {\n alert(\"암호 변경에 실패했습니다.\");\n }\n });\n }\n}", "function checkUserLogin(){\n var userLogemail = $(\"#userLogemail\").val();\n var userLogpass = $(\"#userLogpass\").val();\n $.ajax({\n url:'users/adduser.php',\n method: \"POST\",\n data: {\n checkLogemail: \"checkLogemail\",\n userLogemail: userLogemail,\n userLogpass: userLogpass,\n },\n success: function(data) {\n //console.log(data);\n if (data == 0) {\n $(\"#statusLogMsg\").html(\n '<small class=\"alert alert-denger\">Invalid Email ID or Password !</small>');\n\n }else if (data == 1) {\n $(\"#statusLogMsg\").html(\n '<div class=\"spinner-border text-success\" role=\"status\"></div>'\n );\n setTimeout(()=>{\n window.location.href = \"index.php\";\n },1000);\n }\n },\n });\n}", "function forgot_profile() {\n $('#login').modal('hide');\n $('#forgotPassword').modal('show');\n}", "function resetPassword() {\r\n \tconsole.log(\"Inside reset password\");\r\n \t//self.user.userpassword = self.user.password;\r\n \tself.user.user_id = $(\"#id\").val();\r\n \tself.user.obsolete = $(\"#link\").val();\r\n \tdelete self.user.confpassword;\r\n \tUserService.changePassword(self.user)\r\n \t\t.then(\r\n \t\t\t\tfunction (response) {\r\n \t\t\t\t\tif(response.status == 200) {\r\n \t\t\t\t\t\tself.message = \"Password changed successfully..!\";\r\n \t\t\t\t\t\tsuccessAnimate('.success');\r\n \t\t\t\t\t\t\r\n \t\t\t\t\t\twindow.setTimeout( function(){\r\n \t\t\t\t\t\t\twindow.location.replace('/Conti/login');\r\n \t\t\t\t \t}, 5000);\r\n \t\t\t\t\t\t\r\n \t\t\t\t\t} else {\r\n \t\t\t\t\t\tself.message = \"Password is not changed..!\";\r\n \t\t\t\t\t\tsuccessAnimate('.failure');\r\n \t\t\t\t\t}\r\n \t\t\t\t\t\r\n \t\t\t\t},\r\n \t\t\t\tfunction (errResponse) {\r\n \t\t\t\t\tconsole.log(errResponse);\r\n \t\t\t\t}\r\n \t\t\t);\r\n }", "function register() {\n // On server response\n xhttp.onreadystatechange = function() {\n if (this.readyState == 4 && this.status == 200) {\n // Check if username is available\n if (xhttp.responseText == \"ok\") {\n // Check if passwords match\n if (document.getElementById(\"pass1\").value == document.getElementById(\"pass2\").value) {\n // All good, submit the form\n document.querySelector(\"form\").submit();\n }\n else {\n // Passwords don't match, warn user\n document.querySelector(\"#error\").innerHTML = \"Passwords don't match\";\n }\n }\n else {\n // Username taken, warn user\n document.querySelector(\"#error\").innerHTML = \"Username already taken\";\n }\n }\n };\n // XML Http Request\n xhttp.open(\"GET\", \"/api/username/\"+document.querySelector(\"input\").value, true);\n xhttp.send();\n}", "function checkUsername()\n{\n let user = $$(\"input[name='username']\");\n if (!user.value)\n {\n // No value, clear name\n if (user.focused)\n {\n user.style.backgroundColor = \"rgb(63, 66, 69)\";\n }\n\n hasUserChanged = false;\n return;\n }\n\n if (!hasUserChanged)\n {\n return;\n }\n\n let params =\n {\n type : ProcessRequest.CheckUsername,\n username : user.value\n };\n\n sendHtmlJsonRequest(\"process_request.php\", params, onCheckUsernameResponse, undefined /*failureFunc*/, { lastUsername : user.value });\n\n hasUserChanged = false;\n}", "function resetpass() {\n\n var email = document.getElementById(\"resetpass\").value;\n\n $.post('server/resetpassword.php', { user_email: email }, function(data, status) {\n var json_data = JSON.parse(data)\n\n if (json_data.status == 1) {\n if (json_data.email_sent == 1) {\n $(document).Toasts('create', {\n class: 'bg-success',\n title: 'Succes!',\n subtitle: '',\n body: 'Instructiunile pentru resetarea parolei au fost trimise la adresa de email introdusa!'\n });\n } else if (json_data.registered_email == 0) {\n $(document).Toasts('create', {\n class: 'bg-warning',\n title: 'Atentie!',\n subtitle: '',\n body: 'Adresa de email introdusa nu este asociata unui cont!'\n });\n }\n } else {\n $(document).Toasts('create', {\n class: 'bg-danger',\n title: 'Eroare!',\n subtitle: '',\n body: 'A aparut o eroare, va rugam reincercati!'\n });\n }\n })\n}", "function initReset() {\n\tnew JsNameFilter(\"userId\", \"nameInput\", window['g_basePath']);\n\t\n\tif ($(\"successM\").value != '') {\n\t\tMsgBox.message('重置密码成功');\n\t}\n\t\n\t$(\"successM\").value = '';\n\taddCustomCheck('reNewPW', getMessage('js.com.warning.0012'), 'mustsame', function(value) {\n\t\tif (value != $F('newPW')) return false;\n\t\treturn true;\n\t});\n}", "function onCheckUsernameResponse(response, request)\n{\n let username = $$(\"input[name='username']\");\n if (request.lastUsername !== username.value)\n {\n return;\n }\n\n // Username hasn't changed\n if (response.value == \"1\")\n {\n // It's available!\n username.style.backgroundColor = \"rgb(63, 100, 69)\";\n username.title = \"Username available\";\n }\n else\n {\n // It exists!\n username.style.backgroundColor = \"rgb(100, 66, 69)\";\n username.title = \"Username already exists\";\n }\n}", "function loginProcessTips(url){\n\tvar username = jQuery(\"#username\").val();\n\tvar password = jQuery(\"#password\").val();\n\talert(username);\n/*\tjQuery.ajax({ \n\t type: 'POST', \n\t url: url, \n\t dataType: { 'username' : username, 'password' : password },\n\t cache: false,\n\t success:function(response) {\n\t \tjQuery(\"#username\").val($('#username').val());\n\t \tjQuery(\"#password\").val($('#password').val());\n\t },\t \n\t data: {},\n\t async: false\n\t \n\t});\n\t*/\n\t\n}", "checkUsername(username, email, for_user_id) {\n\n return Nilavu.ajax('/users/check_email', {\n data: {\n username,\n email,\n for_user_id\n }\n });\n }", "function stateChanged() { \nif (xmlHttp.readyState==4 || xmlHttp.readyState==\"complete\") { \nvar passStatus = xmlHttp.responseText;\n\n//alert(passStatus);\n\nif(passStatus == 1) {\n txt.innerHTML= '<span class=\"errors\">The User Name is already taken</span>';\n id2.focus(); \n return false;\n}\n\nif(passStatus == 2) {\ndocument.form1.submit();\n}\n\n\n//end of complete\n} \n\n//end state change function\n}", "function passwordsMatching(password_one, password_two) {\r\n\t\tif (password_one != password_two) {\r\n\r\n\t\t\t$.ajax({\r\n\t\t\t\ttype : \"POST\",\r\n\t\t\t\turl : \"logic/process_inputcheck.php\",\r\n\t\t\t\tdata : {\r\n\t\t\t\t\taction : \"get_message_passwords_not_matching\"\r\n\t\t\t\t}\r\n\t\t\t}).done(function(msg) {\r\n\t\t\t\t$('div[id=passwords_not_matching]').remove();\r\n\t\t\t\t$('#messagearea').append(msg);\r\n\t\t\t\t$('html, body').animate({\r\n\t\t\t\t\tscrollTop : $('#messagearea').offset().top\r\n\t\t\t\t}, 600);\r\n\t\t\t});\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\t$('div[id=passwords_not_matching]').remove();\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "function checkUsername(username, location)\r\n{\r\n\tusername = $(\"#\"+username).val();\r\n\t\r\n\t$(\"#\"+location).html(\"<font color = \\\"#85B525\\\">Checking Username . . . </font><img src='../images/loader.gif' name = 'img1' align = 'absmiddle' width='16' height = '11' alt='loading'>\");\r\n\t\t\r\n\t$.post(\"../other_files/checkthisusername.php\",\r\n\t{ username: username },\r\n\t\tfunction(data){\r\n\t\t\r\n\t\tif(data == 100)\r\n\t\t{\r\n\t\t\t$(\"#\"+location).html(\"<font color = \\\"green\\\">Username <b>\"+username+\"</b> Available </font><img src='../images/yes.gif' name = 'img1' align = 'absmiddle' width='18' height = '18' alt='image'>\");\r\n\t\t\r\n\t\t\t$(\"#password1\").focus();\r\n\t\t}\r\n\t\telse if(data == 60)\r\n\t\t{\r\n\t\t\t$(\"#\"+location).html(\"<font color = \\\"red\\\">Username <b>\"+username+\"</b> must be morethan 6 characters </font><img src='../images/no.gif' name = 'img1' align = 'absmiddle' width='18' height = '18' alt='image'>\");\r\n\t\t\r\n\t\t\t$(\"#password1\").focus();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$(\"#\"+location).html(\"<font color = \\\"red\\\">Username <b>\"+username+\"</b> already in use </font><img src='../images/no.gif' name = 'img1' align = 'absmiddle' width='18' height = '18' alt='image'>\");\r\n\t\t\r\n\t\t\t$(\"#password1\").focus();\r\n\t\t}\r\n\t}\r\n\t);\r\n\t\r\n\treturn false;\r\n}", "function recoverpass() {\n\n // var new_pass = document.getElementById(\"recoverpass\").value\n\n $.post('server/newpassword.php', { code: getQueryVariable(\"code\"), user_password: new_pass }, function(data, status) {\n var json_data = JSON.parse(data)\n if (json_data.status == 1) {\n if (json_data.password_reset == 1) {\n $(document).Toasts('create', {\n class: 'bg-success',\n title: 'Succes!',\n subtitle: '',\n body: 'Parola a fost schimbata, veti fi redirectionat catre pagina de login!'\n });\n setTimeout(function() { window.location.href = '/login.php'; }, 3000);\n } else if (json_data.correct_code == 0) {\n $(document).Toasts('create', {\n class: 'bg-danger',\n title: 'Eroare!',\n subtitle: '',\n body: 'Acest link de resetare a expirat sau este incorect!'\n });\n }\n } else {\n $(document).Toasts('create', {\n class: 'bg-danger',\n title: 'Eroare!',\n subtitle: '',\n body: 'A aparut o eroare, va rugam reincercati!'\n });\n }\n })\n\n\n}", "function signUp() {\n\n /* gathers the username and password*/\n var username = $('#sign-up-username').val();\n var password = $('#sign-up-password').val();\n /* resets the input fields */\n $('#sign-up-username').val('');\n $('#sign-up-password').val('');\n var signUpURL = 'http://web.cs.georgefox.edu/comment/ldelamotte17/user/' + username;\n\n $.ajax({\n type: 'POST', \n url: signUpURL,\n dataType: 'json',\n contentType: 'application/json',\n data: JSON.stringify({\n password: password\n }),\n crossDomain: true,\n success: function() {\n if (password.length == 0 || username.length == 0) {\n openErrorModal();\n }\n else {\n $(\"#open-sign-up-modal\").remove();\n }\n },\n error: openErrorModal\n })\n\n}", "function postDisableLogin(data, textStatus, jqXHR, param) {\n\talert('The password for the user \"' + param.user + '\" was disabled.');\n}", "function User_ON(Email)\n{\n\tbootbox.confirm(\"<form role='form'>\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\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t <div class='text'><b>Introduza o seu código.</b></div><br>\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\t\t\t\t <div class='form-group'>\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\t\t\t\t\t\t\t\t\t\t\t\t <input style='width: 300px;' type='password' class='form-control' id='Password'>\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 </div></form>\", function (result) {\n\n\t\tif(result)\n\t\t{\n\t\t\tchrome.storage.local.get(Email, function (result) {\n\n\t\t\t\tvar pass = CryptoJS.SHA3($('#Password').val()); \n\n\t\t\t\tif(_.isEqual(pass, result[Email]))\n\t\t\t\t{\n\t\t\t\t\tvar obj = {};\n\n\t\t\t\t obj['atv-'+Email] = '0';\n\n\t\t\t\t\tchrome.storage.local.set(obj);\n\n\t\t\t\t\tgetData();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tbootbox.alert(\"<br><div class='text'><b>O código introduzido está errado. <br><br>Tente de novo.</b></div>\");\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\n}", "function newUsernameAjaxValidator() {\n\t\t\t//console.log(\"Executing test ajax function\");\n\t\t\tvar xmlhttp;\n\t\t\tif (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari\n\t\t\t\txmlhttp=new XMLHttpRequest();\n\t\t\t}\n\t\t\telse {// code for IE6, IE5\n\t\t\t\txmlhttp=new ActiveXObject(\"Microsoft.XMLHTTP\");\n\t\t\t}\n\t\t\t//console.log(\"xml request created\");\n\t\t\txmlhttp.onreadystatechange=function() {\n\t\t\t\t//console.log(\"ready state changed\");\n\t\t\t\tif (xmlhttp.readyState==4) {\n\t\t\t\t\tif (xmlhttp.responseText == 1) {\n\t\t\t\t\t\tdocument.getElementById('newusernamemessage').innerHTML = \"Successful !!!\";\n\t\t\t\t\t\tdocument.getElementById('newUserName').submit();\t\t//8888888888888888\tNew username created , so log the new user in \n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t//document.getElementById('usernamemessage').innerHTML = xmlhttp.responseText;\n\t\t\t\t\t\tdocument.getElementById('newusernamemessage').innerHTML = \"Username already exists !!!\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\txmlhttp.open(\"POST\",\"newUsernameValidator.php\",true);\n\t\t\t//console.log(\"POST method set\");\n\t\t\txmlhttp.setRequestHeader(\"Content-type\",\"application/x-www-form-urlencoded\");\n\t\t\t//console.log(\"request header set\");\n\t\t\t//console.log(document.getElementById('newusername').value);\n\t\t\txmlhttp.send(\"username=\" + document.getElementById('newusername').value);\n\t\t\t//console.log(\"request sent\");\n\t\t\t\n\t\t}", "function reset_password_form() {\n\t// Encode the String\n\tvar encoded_string = Base64.encode('login/reset_password/');\n\tvar encoded_val = encoded_string.strtr(encode_chars_obj);\n\t\n\tvar encoded_login_string = Base64.encode('login/index/');\n\tvar encoded_login_val = encoded_login_string.strtr(encode_chars_obj);\n\t\n\tvar success_msg = 'Successful';\n\tvar failure_msg = 'Failed';\n\t\n\tvar ajaxData = $(\"#resetForm\").serialize();\t\n\t\t$.ajax({\n\t\turl: base_url + encoded_val,\n\t\tdataType: \"json\",\n\t\ttype: \"post\",\n\t\tdata: ajaxData,\t\n\t\tbeforeSend: function() {\n $('.uni_wrapper').addClass('loadingDiv');\t\t\n },\t\t\n\t\tsuccess: function(response) {\n\t\t $('.uni_wrapper').removeClass('loadingDiv');\n\t\t\tif(true == response.status)\n\t\t\t{\t\t\t\t\n\t\t\t\t$(\".error-message .alert\").removeClass('alert-danger');\n\t\t\t\t$(\".error-message .alert\").addClass('alert-success');\n\t\t\t\t$(\".error-message\").show();\n\t\t\t\tif(response.message)\n\t\t\t\t{\n\t\t\t\t\tsuccess_msg = response.message;\n\t\t\t\t}\n\t\t\t\t$(\".alert\").html(success_msg);\n\t\t\t\tsetTimeout(function(){\t\t\t\t\t\t \n\t\t\t\t window.location.href = base_url + encoded_login_val;\t\t\t\t\t\t \n\t\t\t\t}, 500);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$(\".error-message\").show();\n\t\t\t\tif(response.message)\n\t\t\t\t{\n\t\t\t\t\tfailure_msg = response.message;\n\t\t\t\t}\n\t\t\t\t$(\".alert\").html(failure_msg);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t});\t\n}", "function OtpPassword(){\r\n var otp_time_check=$(\"#reset_otp\").val();\r\n if(otp_time_check.length == '' || otp_time_check.length == null) {\r\n $(\"#reset_otp\").removeClass(\"has-success\");\r\n $(\"#reset_otp\").addClass(\"has-error\");\r\n $(\"#otp_label_reset\").show();\r\n\r\n $(\"#otp_label_reset\").text(\"This Field is required\");\r\n return false;\r\n }\r\n else{\r\n $(\"#reset_otp\").addClass(\"has-success\");\r\n $(\"#otp_label_reset\").show();\r\n $(\"#otp_label_reset\").text(\"\");\r\n return true;\r\n\r\n }\r\n \r\n }", "function PasswordValidator(password)\n{\nvar httpxml;\ntry\n{\n// Firefox, Opera 8.0+, Safari\nhttpxml=new XMLHttpRequest();\n}\ncatch (e)\n{\n// Internet Explorer\ntry\n{\nhttpxml=new ActiveXObject(\"Msxml2.XMLHTTP\");\n}\ncatch (e)\n{\ntry\n{\nhttpxml=new ActiveXObject(\"Microsoft.XMLHTTP\");\n}\ncatch (e)\n{\nalert(\"Your browser does not support AJAX!\");\nreturn false;\n}\n}\n}\nfunction stateck()\n{\nif(httpxml.readyState==4)\n{\ndocument.getElementById(\"PasswordError\").innerHTML=httpxml.responseText;\n\n}\n}\n\nurl=\"validation/password-validation.php\";\nurl=url+\"?password=\"+password;\nhttpxml.onreadystatechange=stateck;\nhttpxml.open(\"GET\",url,true);\nhttpxml.send(null);\n}", "function fnUserSearch() {\n var strEmail = $('#strEmail').val();\n var strPassword = $('#strPassword').val();\n\n if(strEmail != '' && strPassword != ''){\n\n $.getJSON('http://'+strIpAddress+':5050/api/fnUser'+'/'+ strEmail +'/'+ strPassword)\n .done(function (data) {\n if (data == '') {\n alert('error');\n }else{\n if(data.intResp == '202'){\n $('#mdlIndex').modal('show');\n $('#mdlIndexTitle').text('Error');\n $('#mdlIndexBody').text(data.strMessage);\n $('#mdlIndexBtnAction').html('<button type=\"button\" class=\"btn btn-default\" onclick=\"window.location.replace(\\'form.html\\')\" data-dismiss=\"modal\">Close</button>');\n \n }else if(data.intResp == '201'){\n $('#mdlIndex').modal('show');\n $('#mdlIndexTitle').text('Error');\n $('#mdlIndexBody').text(data.strMessage);\n $('#mdlIndexBtnAction').html('<button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">Close</button>');\n \n }else{\n //window.location.replace('principal.html?val='+data.strToken); //esta funcion no deja regresar a la pagina anterior\n localStorage.setItem(\"Token\", data.strToken);\n window.location.replace('principal.html');\n //$('#mdlIndex').modal('show');\n //$('#mdlIndexTitle').text('Success');\n //$('#mdlIndexBody').text(data.strMessage);\n //$('#mdlIndexBtnAction').html('<button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">Close</button>');\n }\n }\n });\n\n }\n }", "function resetpassword()\n{\n\t$(\"#chkmsg\").html(\"\");\n\tvar email = $(\"#email\").val();\n\tconsole.log(email);\n\tvar password = $(\"#password\").val();\n\tvar pass = $(\"#pass\").val();\n\tif ( (password.length >= 8) && (pass.length >= 8) && (pass=password) )\n\t{\n\t\t$(\"#sub_btn\").attr(\"disabled\",\"disabled\").val('提交中..').css(\"cursor\",\"default\");\n\n\t\t$.ajax({\n\t\t\turl: \"../cgi/resetpwd.php\",\n\t\t\ttype: \"POST\",\n\t\t\tdataType: 'text',\n\t\t\tdata: {\n\t\t\t\t\"email\": email,\n\t\t\t\t\"password\": password,\n\t\t\t\t\"pass\": pass\n\t\t\t},\n\t\t\tsuccess: function(data){\n\t\t\t\tconsole.log(data)\n\t\t\t\tvar obj = eval('(' + data + ')')\n\t\t\t\tif (obj.error == \"none\")\n\t\t\t\t{\n\t\t\t\t\t$(\"#chkmsg\").html(obj.args.list);\n\t\t\t\t\t// $(\"#sub_btn\").removeAttr(\"disabled\").val('已提交').css(\"cursor\",\"pointer\");\n\t\t\t\t\t$(\"#sub_btn\").attr(\"disabled\",\"disabled\").val('已提交').css(\"cursor\",\"default\");\n\t\t\t\t}\n\t\t\t},\n\t\t\terror: function(data){\n\t\t\t\tserverError(obj)\n\t\t\t}\n\t\t})\n\t}\n\telse\n\t{\n\t\tif ( password.length<8 )\n\t\t{\n\t\t\t$(\"#chkmsg\").html(\"新密码的长度必须大于或等于8位\");\n\t\t}\n\t\telse if ( pass != password )\n\t\t{\n\t\t\t$(\"#chkmsg\").html(\"两次输入的密码不相同\");\n\t\t}\n\t}\n}", "function checkUsernames() {\n var inputtedUser = inputUser.val().trim();\n var inputtedZip = inputZip.val().trim();\n console.log(\"Username input: \" + inputtedUser);\n var userString = \"/\" + inputtedUser;\n\n $.get(\"/check-user\" + userString, function(data) {\n console.log(data);\n if (data === null) {\n updateUsername(inputtedUser, inputtedZip)\n }\n\n else {\n nameHelpText.text(\"Sorry. That user exists. Please try again\")\n console.log(\"User exists. Try a different username\")\n renderModal();\n }\n })\n }", "function change_username() {\n\tvar new_username = document.getElementById(\"new_username\").value;\n\tif(new_username == \"\") alert(\"New username field is empty\");\n\t\n\tconst uri = getLink(\"UpdateUsername\");\n\tvar xhr = createRequest(\"POST\", uri);\n\txhr.send(new_username);\n\txhr.onload = function() {\n\t\tif(xhr.status == 409) alert(\"Username already exists\");\n\t\telse if(xhr.status != 200) alert(\"Something went wrong on the server :/\");\n\t\telse {\n\t\t\tlocalStorage.setItem(\"user\", xhr.response);\n\t\t\tuser = JSON.parse(localStorage.getItem(\"user\"));\n\t\t\tconsole.log(user);\n\t\t\tsetUserItems();\n\t\t\tshow_user_content();\n\t\t\tdocument.getElementById(\"new_username\").value = \"\";\n\t\t}\n\t}\n}", "function User_OFF(Email)\n{\n\tbootbox.confirm(\"<form role='form'>\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\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t <div class='text'><b>Introduza o seu código.</b></div><br>\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\t\t\t\t <div class='form-group'>\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\t\t\t\t\t\t\t\t\t\t\t\t <input style='width: 300px;' type='password' class='form-control' id='Password'>\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 </div></form>\", function (result) {\n\n\t\tif(result)\n\t\t{\n\t\t\tchrome.storage.local.get(Email, function (result) {\n\n\t\t\t\tvar pass = CryptoJS.SHA3($('#Password').val()); \n\n\t\t\t\tif(_.isEqual(pass, result[Email]))\n\t\t\t\t{\n\t\t\t\t\tvar obj = {};\n\n\t\t\t\t obj['atv-'+Email] = '1';\n\n\t\t\t\t\tchrome.storage.local.set(obj);\n\n\t\t\t\t\tgetData();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tbootbox.alert(\"<br><div class='text'><b>O código introduzido está errado. <br><br>Tente de novo.</b></div>\");\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\n}", "function showForgotPassword() {\n document.getElementById(\"newAccount\").style.display=\"none\";\n document.getElementById(\"login\").style.display=\"none\";\n document.getElementById(\"forgotPassword\").style.display=\"block\";\n document.getElementById(\"forgotUsername\").value=\"\";\n}", "function check_username(username,div,url)\r\n{ //var ruta_imagenes=document.getElementById('ruta_imagenes').value;\r\n\t//document.getElementById( div ).innerHTML='<br><div align=\"center\" style=\"height:100%;\"><i style=\"font-size:large;color:darkred;\" class=\"fa fa-cog fa-spin\"></i></div>';\r\n\tvar data = new FormData();\r\n\tdata.append('event', 'check_username');\t\r\n\tdata.append('username', username);\t\r\n\tvar xhr = new XMLHttpRequest();\r\n\txhr.open('POST', url , true);\r\n\txhr.onreadystatechange=function()\r\n\t{ if (xhr.readyState==4 && xhr.status==200)\r\n\t\t{ $(\"#check_username\").removeClass(\"has-success\");\r\n\t\t\t$(\"#check_username\").removeClass(\"has-error\");\r\n\t\t\t$(\"#check_username\").addClass(xhr.responseText);\r\n\t\t\tif (username==\"\")\r\n\t\t\t\t$(\"#check_username\").removeClass(xhr.responseText);\r\n\t\t}\r\n\t};\r\n\txhr.send(data);\r\n}", "function login() {\n var usr = $('#usr').val();\n var pwd = $('#pwd').val();\n if (usr != \"\" && pwd != \"\") {\n $.postJSON(phpAjax, {f: 'get_login', usr: usr, pwd: pwd}, function (json) {\n M.toast({html: json.msg, classes: 'rounded'});\n if (json.status == true) {\n $('#usr').val('');\n $('#pwd').val('');\n window.location.href = json.web;\n }\n });\n } else {\n M.toast({html: 'Todos los campos son obligatorios', classes: 'rounded'});\n }\n}", "function reconnectUser(user, passwd)\n{\n function ev(textoresposta, codestatus) {\n //usuario digitou a senha incorreta\n if (codestatus == 403)\n alert(\"A senha está incorreta!\");\n else if (codestatus == 200)\n {\n document.getElementById(\"promptPasswd\").style.display = \"none\";\n blockInterface(false);\n } else\n alert(\"Status \" + codestatus + \"\\n\\nErro ao na tentativa de enviar a requisição de resgate de sessao!\");\n\n document.getElementById(\"passw\").value = \"\";\n document.getElementById(\"btOkReconnect\").disabled = false;\n return (codestatus == 200);\n }\n $(\"btOkReconnect\").disabled = true;\n /*Bloco de intrucoes da funcao*/\n requisitaAjax(\"./home?login=\" + user + \"&senha=\" + passwd + \"&textmode=1\", ev);\n}", "function resetPassword(token) {\n const password = document.getElementsByName(\"reset-password\").item(0).value;\n if (password === \"\") {\n alert(\"The new password is empty\");\n return;\n }\n xhttp(\"POST\", \"reset.php\", { token: token, password: password }, (response) => {\n if (!response) {\n alert(\"The password couldn't be updated\");\n } else {\n alert(\"The new password was correctly set\");\n }\n quepasapp();\n });\n}", "function stateChanged() { \nif (xmlHttp.readyState==4 || xmlHttp.readyState==\"complete\") { \nvar passStatus = xmlHttp.responseText;\n\n\nif(passStatus == 1) {\nerr3.innerHTML= '<span class=\"errors\">User Name is already taken</span>';\n id2.focus(); \n return false;\n}\n\nif(passStatus == 2) {\nerr3.innerHTML= ''; \nreturn true;\n}\n\n\n//end of complete\n} \n\n//end state change function\n}", "function generateOTP() {\n\tvar mobilenum = document.getElementById('address.phone').value\n\turl = $(\".js-otpgenerate-otpgenerate\").data(\"url\");\n\t$.ajax({\n\t url : url,\n\t data : {\n\t\t \"mobilenum\" : mobilenum\n\t },\n\t type : \"get\",\n\t success : function(res) {\n\t\t if (res) {\n\t\t\t window.location.reload();\n\t\t } else {\n\t\t\t localStorage.setItem('addressform', 'false');\n\t\t\t localStorage.removeItem(\"optionalDetailsPage\");\n\t\t\t alertModal(\"Your Mobile Number has already been used. Please use another Number.\");\n\t\t }\n\t }\n\t});\n}", "function skipPage() {\n history.pushState(null, '',ctx + '/signup.jsp?id=tryforfree3');\n loadSignUp();\n}", "function find_password(){\r\n $(\"#find-password-button\").addClass(\"disabled\");\r\n $(\"#find-password-hint\").html('').hide();\r\n var csrf = $(\"#other-csrf\").val();\r\n if(csrf == ''){\r\n $(\"#find-password-button\").removeClass(\"disabled\");\r\n csrf_empty();\r\n }\r\n var hint_html = '';\r\n var email = $(\"#find-password-email\").val();\r\n if(email == '') {\r\n hint_html += (hint_html == '' ? '请填写邮箱!' : '<BR>请填写邮箱!');\r\n }else {\r\n var ret_check = check_mail(email);\r\n if(! ret_check){\r\n hint_html += (hint_html == '' ? '邮箱格式错误!' : '<BR>邮箱格式错误!');\r\n }\r\n }\r\n var pincode = $(\"#find-password-pincode\").val();\r\n if(pincode == ''){\r\n hint_html += (hint_html == '' ? '请填写验证码!' : '<BR>请填写验证码!');\r\n }\r\n if(hint_html != ''){\r\n $(\"#find-password-hint\").html(hint_html).fadeIn();\r\n $(\"#find-password-button\").removeClass(\"disabled\");\r\n return 0;\r\n }\r\n $(\"#find-password-button\").html(\"处理中...\");\r\n $.post(BASE_PATH + 'user/send_find_password_email', {'other_token': $(\"#other-csrf\").val(), \r\n 'email':email, 'pincode': pincode}, function(result){\r\n if(result.code != 1700){\r\n $(\"#find-password-hint\").html('发生错误(' + result.code + '):' + result.msg + ' 稍后重试!').fadeIn();\r\n $(\"#find-password-button\").removeClass(\"disabled\");\r\n $(\"#find-password-pincode-img\").click();\r\n }else {\r\n $(\"#find-password-form\").hide();\r\n $(\"#find-password-hint\").removeClass(\"alert-danger\");\r\n $(\"#find-password-hint\").addClass(\"alert-success\");\r\n $(\"#find-password-hint\").html('<p><span class=\"glyphicon glyphicon-ok\"></span><span>&nbsp;已向' + email + '发送密码重设邮件,请访问邮件中给出的网页链接地址,根据页面提示完成密码重设。</span></p>').fadeIn();\r\n $(\".panel-footer-find-password\").hide();\r\n }\r\n $(\"#find-password-button\").html(\"提交\");\r\n }, 'json');\r\n}", "function fetch_errno_new_pw2(element_Id, input_val, req_val){\n $.ajax({\n url: 'assets/resources/profileEditFormFetchErrno.php',\n method: 'POST',\n data: {Id: element_Id, user_input: input_val, req_user_input: req_val},\n cache: false,\n\n success: function(data){\n //separating error no. and error string\n var errno_PLUS_errorString = data.split(\":\");\n var errno = errno_PLUS_errorString[0];\n var errorString = errno_PLUS_errorString[1];\n\n //sending error inside html to print when required\n if(errno == 1){\n $(\"#\" + element_Id + \" .invalid-feedback\").empty();\n //updating fix variable\n confirmNewPwPerfectOnce = 1; //when the both the password fields turn green\n }else{\n $(\"#\" + element_Id + \" .invalid-feedback\").html(errorString);\n }\n \n //adding class to display error\n if(errno == 1){\n $(\"#\" + element_Id + \" .form-control\").addClass(\"is-valid\");\n if($(\"#\" + element_Id + \" .form-control\").hasClass(\"is-invalid\") == true){\n $(\"#\" + element_Id + \" .form-control\").removeClass(\"is-invalid\");\n }\n }else{\n $(\"#\" + element_Id + \" .form-control\").addClass(\"is-invalid\");\n if($(\"#\" + element_Id + \" .form-control\").hasClass(\"is-valid\") == true){\n $(\"#\" + element_Id + \" .form-control\").removeClass(\"is-valid\");\n }\n }\n\n //toggling the submit button\n if(errno == 1){\n $(\"#changePwBtn\").removeAttr(\"disabled\");\n }else{\n $(\"#changePwBtn\").attr(\"disabled\", \"disabled\");\n }\n }\n });\n}", "function check_username() {\n var result;\n $.ajax({\n type: 'POST',\n url: 'models/validations/validate_account.php',\n data: {\n username: $('#username').val(),\n },\n cache: false,\n success: function(response) {\n if (response == 0) {\n var message = document.getElementById('checkUsername');\n message.style.color = \"#66cc66\";\n message.innerHTML = \"Username is available\";\n result = true;\n } else {\n var message = document.getElementById('checkUsername');\n message.style.color = \"#ff6666\";;\n message.innerHTML = \"Username has duplicate in the database\";\n result = false;\n }\n }\n\n });\n return result;\n}", "function existeUser() {\n if (xmlhttp) {\n var valor = document.getElementById(\"nickname\");\n //var valor1=document.getElementById(\"mail\");\n xmlhttp.open(\"POST\", \"cheqUserAjax\", true);\n xmlhttp.onreadystatechange = handleServletPost;\n xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');\n xmlhttp.send(\"op=\" + valor.name + \"&usermail=\" + valor.value);\n\n }\n}", "function resetChangePass(massage = \"\") {\n $(\"#successMassage\").html(massage);\n $(\"#verifyMassage\").html(\"\");\n $(\"#confirmMassage\").html(\"\");\n $('#currentPassword').val(\"\");\n $('#newPassword').val(\"\");\n $('#confirmPassword').val(\"\");\n}", "function AjaxVal(e,remind,einfo,ninfo) {\n $.ajax({\n type: \"POST\",\n url: \"/Function/AajxVal?str=\" + $(e).val(),\n dataType: \"text\",\n beforeSend:function(){\n $(\"#loading\").removeClass(\"hidden\");\n },\n success: function (info) {\n $(\"#loading\").addClass(\"hidden\");\n if (\"exist\" == info)\n $(remind).html(\"<font style='color:red' size=2><span class='glyphicon glyphicon-minus-sign'></span> \" + einfo + \"</font>\");\n if (\"none\" == info)\n $(remind).html(\"<font style='color:green' size=2><span class='glyphicon glyphicon-ok'></span> \" + ninfo + \"</font>\");\n // $(\"#re_username_info\").html(info);\n }\n });\n}", "function check_pass(){\n $('#btn-pass').css('display','block');\n var pas = $(\"#act\").val();\n var action =\"check_pass\";\n var id = $(\"#user-id\").val();\n xhr = new XMLHttpRequest;\n xhr.responseType = 'json';\n var URL = \"ajax/users.php?action=\"+action+\"&id=\"+id+\"&pass=\"+pas;\n xhr.open(\"GET\",URL,true);\n xhr.send(null);\n xhr.onreadystatechange = result;\n function result(){\n if (this.readyState === 4 && this.status === 200) {\n var data = xhr.response;\n $('#alert-profil-act').html(data.result); \n $('#alert-profil-act').css('display','block');\n if(data.status == 'found'){\n $('#btn-pass').css('display','block');\n }else{\n $('#btn-pass').css('display','none');\n }\n }\n }\n}", "function fingerprintData(nickname) {\n\n $.ajax({\n type: 'POST',\n url: '/tweb/home/getFingerprint',\n data: {user: nickname},\n beforeSend: function () {\n $(\"#msg\").fadeOut();\n },\n success: function (data) {\n },\n error: function () {\n }\n });\n\n}", "function registerUser(email,password) {\n var email = $('#txtEmailRegister').val();\n var password = $('#txtPassRegister').val(); ;\n var repeatPassword = $('#txtPassRepeatRegister').val();\n if (password != repeatPassword) {\n $('#txtErrorRegister').html('Password does not match.');\n return;\n }\n var datos = { \"email\": email, \"password\": password };\n $.ajax({\n type: 'POST',\n dataType: \"json\",\n contentType: 'application/json',\n data: JSON.stringify(datos),\n url: site_URL+'ws.asmx/registro',\n success: function (data) {\n \n //navegaSeccion(\"#login\", \"slideup\");\n navegaSeccion(\"#process_select\", \"slideup\");\n },\n error: function (e) {\n $('#txtErrorRegister').html('An error has occured while registering your account.');\n // console.log(e);\n }\n });\n\n\n}", "function password_validation(){\n\n if(!checkResetPasswordEmail()) {\n return false;\n } else {\n document.getElementById('get_password').value = \"Sending...\";\n return true;\n }\n}", "function ResendOtp() {\n $('#btnresend').attr('disabled', true);\n\n $.ajax({\n type: \"POST\",\n url: \"/login/ResendOTP\",\n contentType: \"application/json; charset=utf-8\",\n dataType: 'json',\n data: '{}',\n success: function (result) {\n ShowMessage(result.MessageTitle, result.Message, result.MessageStatus);\n $('#btnresend').attr('disabled', false);\n\n }\n \n\n });\n $('#btnresend').attr('disabled', false);\n}", "function pword_change()\n{\n //get the fields\n password = document.change_pword_form.change_password.value\n password1 = document.change_pword_form.change_password1.value\n username = document.change_pword_form.Username.value\n\n if (password == \"\" || password1 == \"\" )\n {\n //reset the form \n document.getElementById(\"change_pword_form\").reset();\n //return the connect method\n document.getElementById('chat_res').innerHTML= \"<em id='err'>Please enter the passwords.</em>\"; \n return false;\n\n }\n else if (password != password1){\n //reset the form \n document.getElementById(\"change_pword_form\").reset();\n //return the connect method\n document.getElementById('chat_res').innerHTML= \"<em id='err'>The passwords dont match.</em>\"; \n return false;\n\n\n }\n else\n {\n //check if there is an internet connection\n if (window.navigator.onLine)\n {\n document.getElementById('chat_res').innerHTML = '<img src=\"/static/images/Loader.gif\" />';\n var xmlhttp;\n if (window.XMLHttpRequest)\n {\n xmlhttp=new XMLHttpRequest();\n }\n else\n {\n xmlhttp=new ActiveXObject(\"Microsoft.XMLHTTP\");\n \n }\n\n xmlhttp.onreadystatechange=function()\n {\n if (xmlhttp.readyState==4 && xmlhttp.status==200)\n {\n\n //reset the form\n document.getElementById('change_pword_form').reset();\n //remove the all ticks\n document.getElementById('all_ticks').style.display = 'block';\n //remove the right div\n document.getElementById('left_div').style.display = 'none';\n //return the connect method\n document.getElementById('chat_res').innerHTML=xmlhttp.responseText;\n }\n \n }\n data = \"?password=\"+password+ \"&Username=\"+username\n xmlhttp.open(\"GET\",'/change_password/'+data,true);\n xmlhttp.send();\n\n }\n //no network connection\n else\n {\n //return the connect method\n document.getElementById('chat_res').innerHTML= errorMsg; \n return false;\n }\n }\n\n}", "forgotPassword(data) {\n return this.post('forgot/password', data);\n }", "function loginCheck(username, password) {\n var msg = \"\";\n $.ajax({\n url: 'checkLogin.php',\n type: 'post',\n data: {\n email: username,\n pass: password\n },\n success: function(response) {\n\n response = $.trim(response);\n if (response == \"1\") {\n $(\".loader\").delay(1000).fadeOut(500, function() {\n window.location.href = \"homepage.php\";\n });\n } else {\n msg = \"Invalid Username or password!\";\n $(\"#email\").val(\"\");\n $(\"#pwd\").val(\"\");\n $(\"#errormsg\").text(msg);\n $(\"#loading_\").hide();\n }\n }\n });\n }", "function getLoginForm() {\n $.ajax({\n type: \"POST\",\n url: \"Controllers/controller.User.php\",\n data: {locate: \"GetLoginForm\"}\n })\n .done(function(msg) {\n $(\"#loginsubscribefroms\").html(msg);\n });\n\n}", "function change_password() {\n\tvar current_password = document.getElementById(\"current_password\").value;\n\tvar new_password = document.getElementById(\"new_password\").value;\n\tvar confirm_new_passord = document.getElementById(\"confirm_new_password\").value;\n\t\n\t// Check validity of given passwords\n\tif(new_password != confirm_new_passord) {\n\t\talert(\"Passwords do not match\");\n\t\treturn;\n\t} else if(new_password.length < 8) {\n\t\talert(\"New password is too short\");\n\t\treturn;\n\t}\n\tvar data = JSON.stringify({\n\t\tcurrent_password : current_password,\n\t\tnew_password : new_password\n\t});\n\tvar uri = getLink(\"UpdatePassword\");\n\t\n\tvar xhr = createRequest(\"POST\", uri);\n\txhr.setRequestHeader(\"Content-Type\", \"text/plain\")\n\txhr.onload = function() {\n\t\tif(xhr.status == 401) alert(\"Current password incorrect\");\n\t\telse if(xhr.status != 200) alert(\"Something went wrong on the server :/\");\n\t\telse {\n\t\t\tdocument.getElementById(\"current_password\").value = \"\";\n\t\t\tdocument.getElementById(\"new_password\").value = \"\";\n\t\t\tdocument.getElementById(\"confirm_new_password\").value = \"\";\n\t\t\talert(\"Password successfully changed!\");\n\t\t}\n\t}\n\txhr.send(data);\n\t\n}" ]
[ "0.6752373", "0.6686341", "0.6642696", "0.6616043", "0.65920216", "0.6571524", "0.64384824", "0.64013284", "0.6300028", "0.62794584", "0.6274058", "0.6269336", "0.62321967", "0.62024707", "0.61994916", "0.61882734", "0.6170588", "0.6151968", "0.61137325", "0.61052376", "0.60846865", "0.60825324", "0.6063879", "0.60080606", "0.6005952", "0.5996213", "0.5993445", "0.5979366", "0.5973662", "0.59481907", "0.5948066", "0.5938207", "0.59179217", "0.5894347", "0.58934563", "0.5891097", "0.5864879", "0.58644724", "0.5861537", "0.5853921", "0.5853906", "0.58496255", "0.58236253", "0.58087623", "0.58069265", "0.5802495", "0.579614", "0.57944345", "0.578231", "0.57813114", "0.57798713", "0.5776655", "0.5774419", "0.5746374", "0.5740179", "0.57333285", "0.5728255", "0.57270116", "0.57259804", "0.5725518", "0.57245725", "0.5724021", "0.57185", "0.5715233", "0.57146275", "0.57122743", "0.5711015", "0.57051736", "0.56850106", "0.56774235", "0.5675236", "0.5673281", "0.56697595", "0.5662916", "0.5662775", "0.5660627", "0.5656069", "0.5653335", "0.5652998", "0.56456226", "0.5639738", "0.5639429", "0.5636108", "0.5630819", "0.5630569", "0.56304264", "0.56246924", "0.5623481", "0.56112343", "0.5609882", "0.56066936", "0.5604326", "0.56041765", "0.5603718", "0.5601923", "0.55958366", "0.55947506", "0.55919296", "0.55906034", "0.5588483" ]
0.6674794
2
Ajax Call for username and PasswordTwo Forgot page.
function UsernamePasswordTwoCheckAjaxMethod() { var user = $("#usernameCheck").val(); var pwdTwo = $("#PasswordTwoCheck").val(); $.ajax({ type: "POST", url: "Login.aspx/UsernameAndPasswordTwoCheckForgotPageMethodAjax", data: "{userCheck:'" + user + "', pwdCheck:'" + pwdTwo + "'}", dataType: "json", contentType: "application/json; charset=utf-8", success: function () { $('.PasswordCheck').fadeOut(function () { $('.AllisGood').fadeIn(700); }); }, error: function () { if (pwdTwo == "") { $('#ErrorPwd2').text("Password is Empty"); $('#ErrorPwd2').css({ 'color': 'red', 'font-weight': 'bold', 'margin-top': '-15px', 'margin-bottom': '20px', 'font-size': '15px' }); $('#ErrorPwd2').addClass('animated shake'); return false; } else $('#ErrorPwd2').text("Password is Incorrect"); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function UsernamePasswordCheckAjaxMethod() {\n var user = $(\"#usernameCheck\").val();\n var pwd1 = $('#PasswordOneCheck').val();\n $.ajax({\n type: \"POST\",\n url: \"Login.aspx/UsernameAndPasswordOneCheckForgotPageMethod\",\n data: \"{userCheck:'\" + user + \"', pwdCheck:'\" + pwd1 + \"'}\",\n dataType: \"json\",\n contentType: \"application/json; charset=utf-8\",\n success: function () {\n $('.ContactCheck').fadeOut(function () {\n $('.AllisGood').fadeIn(700);\n });\n },\n error: function () {\n if(pwd1 == \"\")\n {\n $('#ErrorPwd1').text(\"Password is Empty\");\n $('#ErrorPwd1').css({ 'color': 'red', 'font-weight': 'bold', 'margin-top': '-15px', 'margin-bottom': '20px', 'font-size': '15px' });\n $('#ErrorPwd1').addClass('animated shake');\n return false;\n }\n else\n $('#ErrorPwd1').text(\"Password is Incorrect\");\n }\n });\n}", "function vpb_request_password_link()\n{\n\tvar ue_data = $(\"#ue_data\").val();\n\t\n\tif(ue_data == \"\")\n\t{\n\t\t$(\"#ue_data\").focus();\n\t\t$(\"#this_page_errors\").html('<div class=\"vwarning\">'+$(\"#empty_username_field\").val()+'</div>');\n\t\t$('html, body').animate({\n\t\t\tscrollTop: $('#ue_data').offset().top-parseInt(200)+'px'\n\t\t}, 1600);\n\t\treturn false;\n\t} else {\n\t\tvar dataString = {'ue_data': ue_data, 'page':'reset-password-validation'};\n\t\t$.ajax({\n\t\t\ttype: \"POST\",\n\t\t\turl: vpb_site_url+'forget-password',\n\t\t\tdata: dataString,\n\t\t\tcache: false,\n\t\t\tbeforeSend: function() \n\t\t\t{\n\t\t\t\t$(\"#this_page_errors\").html('');\n\t\t\t\t$(\"#disable_or_enable_this_box\").removeClass('enable_this_box');\n\t\t\t\t$(\"#disable_or_enable_this_box\").addClass('disable_this_box');\n\t\t\t\t\n\t\t\t\t$(\"#forgot_password_buttoned\").hide();\n\t\t\t\t$(\"#log_in_status\").html('<center><div align=\"center\"><img style=\"margin-top:-40px;\" src=\"'+vpb_site_url+'img/loadings.gif\" align=\"absmiddle\" alt=\"Loading\" /></div></center>');\n\t\t\t},\n\t\t\tsuccess: function(response)\n\t\t\t{\n\t\t\t\t$(\"#disable_or_enable_this_box\").removeClass('disable_this_box');\n\t\t\t\t$(\"#disable_or_enable_this_box\").addClass('enable_this_box');\n\t\t\n\t\t\t\t$(\"#log_in_status\").html('');\n\t\t\t\t$(\"#forgot_password_buttoned\").show();\n\t\t\t\t\t\n\t\t\t\tvar response_brought = response.indexOf(\"processCompletedStatus\");\n\t\t\t\t$vlog=JSON.parse(response);\n\t\t\t\tif(response_brought != -1)\n\t\t\t\t{\n\t\t\t\t\tif($vlog.processCompletedStatus==true){\n $(\"#ue_data\").val('');\n $(\"#this_page_errors\").html($vlog.response);\n return false;\n\t\t\t\t\t}else{\n setTimeout(function() {\n \twindow.alert(\"To change the password you first need to verify the account by entering the verification code which was sent to your gmail account earlier while sign up in the 'Enter the verification code ... ' field to proceed.\");\n window.location.replace(vpb_site_url+'verification');\n },500);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$(\"#this_page_errors\").html($vlog.response);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}", "function submitForgotUsername(){\n\ttry{\n\t\tvar license = $.txtfieldLicense.value;\n\t\tlicense = license.replace(/&(?!amp;)/g, '&amp;'​);\n\t var\tmail = $.txtfieldMail.value;\n\t var\temiratesid = $.txtfieldEmirateId.value.replace(/[-]/gi, \"\");\n\t Ti.API.info('emiratesid '+emiratesid);\n\t var\tmobile = $.txtfieldMobile.value.replace(/[-]/gi, \"\");\n\t var\tpassport = $.txtfieldPassport.value;\n\t passport = passport.replace(/&(?!amp;)/g, '&amp;'​);\n\t var lblEmiratesPassport;\n\t \n\tif($.imgIndividual.image === Alloy.Globals.path.radioActive){\n\t\tif(emiratesid === \"\" && passport === \"\"){\n\t\t\tutilities.showAlert(Alloy.Globals.selectedLanguage.forgotUsername,Alloy.Globals.selectedLanguage.validateHintText,function(){});\n\t\t}else if(mail === \"\"){\n\t\t \tutilities.showAlert(Alloy.Globals.selectedLanguage.forgotUsername,Alloy.Globals.selectedLanguage.mailId,function(){});\n\t\t}else if(mobile === \"\"){\n\t\t utilities.showAlert(Alloy.Globals.selectedLanguage.forgotUsername,Alloy.Globals.selectedLanguage.mobileNumber,function(){});\n\t\t}else if (emiratesid !== \"\" && emiratesid.length < 15) {\n\t\t\t$.txtfieldEmirateId.value = \"\";\n\t\t \tutilities.showAlert(Alloy.Globals.selectedLanguage.forgotUsername,Alloy.Globals.selectedLanguage.invalidEmiratesId,function(){});\n\t\t}\n\t\telse if (mobile.length !== 10 && mobile.value !== \"\") {\n\t\t \tutilities.showAlert(Alloy.Globals.selectedLanguage.forgotUsername,Alloy.Globals.selectedLanguage.mobileLength,function(){});\n\t\t}else{\n\t\t\ttry{\n\t\t\t\tlblEmiratesPassport = (emiratesid !== \"\")?emiratesid:passport;\n\t\t\t\thttpManager.forgetUsername(function(result){\n\t\t\t\tvar rootNode = result.getElementsByTagName(\"output\");\n\t\t\t\tvar ns =\"http://ForgetUserName\";\n\t\t\t\t//var subNode = result.response.getElementsByTagNameNS(\"ns1:Status\");\n\t\t\t\tif(rootNode.length > 0){\n\t\t\t\t\tvar status = result.getElementsByTagNameNS(ns, \"Status\").item(0).textContent;\n\t\t\t\t\t\n\t\t\t\t\tif(status === \"Success\"){\n\t\t\t\t\t\tAlloy.Globals.hideLoading();\n\t\t\t\t\t\tvar alertView = Ti.UI.createAlertDialog({\n\t\t\t\t\t\t\ttitle : Alloy.Globals.selectedLanguage.appTitle,\n\t\t\t\t\t\t\tmessage : (Alloy.Globals.isEnglish)?result.getElementsByTagNameNS(ns, \"Message_EN\").item(0).textContent:result.getElementsByTagNameNS(ns, \"Message_AR\").item(0).textContent,\n\t\t\t\t\t\t\tbuttonNames : [Alloy.Globals.selectedLanguage.ok]\n\t\t\t\t\t\t});\n\t\t\t\t\t\talertView.addEventListener('click', function(e) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (e.index == 0) {\n\t\t\t\t\t\t\t\tvar winMenu = Alloy.createController('UserManagement/winLogin',{\n\t\t\t\t\t\t\t\t\tisFromLeftPanel : false\n\t\t\t\t\t\t\t\t}).getView();\n\t\t\t\t\t\t\t\tAlloy.Globals.openWindow(winMenu);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\talertView.show();\n\t\t\t\t\t}else if(status === \"Failure\"){\n\t\t\t \t\t\tAlloy.Globals.hideLoading();\n\t\t\t \t\t\tvar alertView = Ti.UI.createAlertDialog({\n\t\t\t\t\t\t\t\ttitle : Alloy.Globals.selectedLanguage.appTitle,\n\t\t\t\t\t\t\t\tmessage : (Alloy.Globals.isEnglish)?result.getElementsByTagNameNS(ns, \"Message_EN\").item(0).textContent:result.getElementsByTagNameNS(ns, \"Message_AR\").item(0).textContent,\n\t\t\t\t\t\t\t\tbuttonNames : [Alloy.Globals.selectedLanguage.ok]\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\talertView.show();\n\t\t\t \t\t}\n\t\t\t\t}else{\n\t\t \t\tvar alertView = Ti.UI.createAlertDialog({\n\t\t\t\t\t\ttitle : Alloy.Globals.selectedLanguage.appTitle,\n\t\t\t\t\t\tmessage : Alloy.Globals.selectedLanguage.serviceError,\n\t\t\t\t\t\tbuttonNames : [Alloy.Globals.selectedLanguage.ok]\n\t\t\t\t });\n\t\t\t\t alertView.show();\n\t\t \t Alloy.Globals.hideLoading();\n\t\t \t}\n\t\t\t\tAlloy.Globals.hideLoading();\n\t\t\t},1,mail,mobile,lblEmiratesPassport);\n\t\t\t}catch(e){\n\t\t\t\tTi.API.info('Error '+e.message);\n\t\t\t}\n\t\t}\n\t}else if($.imgEstablishment.image === Alloy.Globals.path.radioActive){\n\t\tif(license === \"\"){\n\t\t utilities.showAlert(Alloy.Globals.selectedLanguage.forgotUsername,Alloy.Globals.selectedLanguage.licenseNumber,function(){});\n\t }else if(mail === \"\"){\n\t\t \tutilities.showAlert(Alloy.Globals.selectedLanguage.forgotUsername,Alloy.Globals.selectedLanguage.mailId,function(){});\n\t\t}else if(mobile === \"\"){\n\t\t utilities.showAlert(Alloy.Globals.selectedLanguage.forgotUsername,Alloy.Globals.selectedLanguage.mobileNumber,function(){});\n\t\t}\n\t\t// else if (isNaN(mobile)) {\n\t\t \t// utilities.showAlert(Alloy.Globals.selectedLanguage.forgotUsername,Alloy.Globals.selectedLanguage.invalidMobile,function(){});\n\t\t// }\n\t\telse if (mobile.length !== 10 && mobile.value !== \"\") {\n\t\t \tutilities.showAlert(Alloy.Globals.selectedLanguage.forgotUsername,Alloy.Globals.selectedLanguage.mobileLength,function(){});\n\t\t}else{\n\t\t\ttry{\n\t\t\t\thttpManager.forgetUsername(function(result){\n\t\t\t\tvar rootNode = result.getElementsByTagName(\"output\");\n\t\t\t\tvar ns =\"http://ForgetUserName\";\n\t\t\t\t//var subNode = result.getElementsByTagName(\"ns1:Status\");\n\t\t\t\tvar ns =\"http://ForgetUserName\";\n\t\t \tif(rootNode.length > 0){\n\t\t \t\t\t \t\t\n\t\t \t\tvar status = result.getElementsByTagNameNS(ns, \"Status\").item(0).textContent;\n\t\t \t\t\n\t\t \t\tif(status === \"Success\"){\n\t\t \t\t\t\n\t\t \t\t\tvar alert = Ti.UI.createAlertDialog({\n\t\t\t\t\t\t\ttitle : Alloy.Globals.selectedLanguage.appTitle,\n\t\t\t\t\t\t\tmessage : (Alloy.Globals.isEnglish)?result.getElementsByTagNameNS(ns, \"Message_EN\").item(0).textContent:result.getElementsByTagNameNS(ns, \"Message_AR\").item(0).textContent,\n\t\t\t\t\t\t\tbuttonNames : [Alloy.Globals.selectedLanguage.ok]\n\t\t\t\t\t\t});\n\t\t\t\t\t\talert.addEventListener('click', function(e) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (e.index == 0) {\n\t\t\t\t\t\t\t\tvar winMenu = Alloy.createController('UserManagement/winLogin',{\n\t\t\t\t\t\t\t\t\tisFromLeftPanel : false\n\t\t\t\t\t\t\t\t}).getView();\n\t\t\t\t\t\t\t\tAlloy.Globals.openWindow(winMenu);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\talert.show();\n\t\t \t\t}else if(status === \"Failure\"){\n\t\t\t \t\t\tAlloy.Globals.hideLoading();\n\t\t\t \t\t\tvar alert = Ti.UI.createAlertDialog({\n\t\t\t\t\t\t\t\ttitle : Alloy.Globals.selectedLanguage.appTitle,\n\t\t\t\t\t\t\t\tmessage : (Alloy.Globals.isEnglish)?result.getElementsByTagNameNS(ns, \"Message_EN\").item(0).textContent:result.getElementsByTagNameNS(ns, \"Message_AR\").item(0).textContent,\n\t\t\t\t\t\t\t\tbuttonNames : [Alloy.Globals.selectedLanguage.ok]\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\talert.show();\n\t\t\t \t}\n\t\t \t}else{\n\t\t \t\tvar alert = Ti.UI.createAlertDialog({\n\t\t\t\t\ttitle : Alloy.Globals.selectedLanguage.appTitle,\n\t\t\t\t\t//title:\"tset\",\n\t\t\t\t\tmessage : Alloy.Globals.selectedLanguage.serviceError,\n\t\t\t\t\tbuttonNames : [Alloy.Globals.selectedLanguage.ok]\n\t\t\t\t });\n\t\t\t\t alert.show();\n\t\t \t Alloy.Globals.hideLoading();\n\t\t \t}\n\t\t \tAlloy.Globals.hideLoading();\n\t\t\t},2,mail,mobile,license);\n\t\t\t}catch(e){\n\t\t\t\tTi.API.info('Error '+e.message);\n\t\t\t}\n\t\t}\n\t}\n\t}catch(e){\n\t\tTi.API.info('Error in submit forget data function '+JSON.stringify(e));\n\t}\n}", "function UsernameAjaxMethod() {\n var user = $(\"#usernameCheck\").val();\n $.ajax({\n type: \"POST\",\n url: \"Login.aspx/UsernameForgotPageMethod\",\n data: \"{Forgotuser: '\" + user + \"'}\",\n dataType: \"json\",\n contentType: \"application/json; charset=utf-8\",\n success: function (response) {\n $('.UsernameCheck').fadeOut(function () {\n $('.ContactCheck').fadeIn(700);\n });\n },\n error: function () {\n if (user == \"\") {\n $('#ErrorUser').text(\"Username is Empty\");\n $('#ErrorUser').css({ 'color': 'red', 'font-weight': 'bold', 'margin-top': '-15px', 'margin-bottom': '20px', 'font-size': '15px' });\n $('#ErrorUser').addClass('animated shake');\n return false;\n }\n else {\n $('#ErrorUser').text(\"Username is incorrect, if you have forgot your username, you are not able to go forward, you can contact from the Website Owner (+923159382193) regarding you account's unlock.\");\n $('#ErrorUser').css({ 'color': 'red', 'font-weight': 'bold', 'margin-top': '-15px', 'margin-bottom': '2', 'font-size': '15px' });\n $('#ErrorUser').addClass('animated shake');\n }\n }\n });\n}", "function sendEmailForgot() {\n var password = newPss();\n var emailToSendPassword = $(\"#emailSendingInput\").val();\n\n if (!validateForm(emailToSendPassword)) {\n swal(\"טעות\", \"האימייל אינו נכון נסה שנית\", \"warning\");\n $('#emailSendingInput').focus();\n return\n }\n $.ajax({\n type: 'POST',\n url: sendPassByEmail,\n data: {\n email: emailToSendPassword,\n password: password,\n },\n success: function (response) {\n if (response) {\n swal(\"אימייל נשלח\", \"סיסמא חדשה נשלחה לאימייל שצויין\", \"success\");\n $(\"#myForgotPasswordModal\").modal('hide');\n $(\"#myLogin\").modal('hide');\n }\n else\n swal(\"שגיאה\", \"נסיון שליחת אימייל עם סיסמה חדשה נכשל\", \"error\");\n }\n });\n}", "function resetPassword(email){\n $.ajax({\n method: 'POST',\n url: \"inc/Auth/forget.php\",\n data: {email: email}\n }).done(function(msg){\n if(msg == 'user issue')\n {\n AJAXloader(false, '#loader-pass-forgot');\n displayMessagesOut();\n $('.error-field').addClass('novisible');\n $('.error-forgot-exist').removeClass('novisible');\n displayError([], '#pass-forgot-form', ['input[name=\"pass-forgot\"]'], '');\n }\n if(msg == 'confirm issue')\n {\n AJAXloader(false, '#loader-pass-forgot');\n displayMessagesOut();\n $('.error-field').addClass('novisible');\n $('.error-forgot-confirm').removeClass('novisible');\n displaySpecial([], '#pass-forgot-form', ['input[name=\"pass-forgot\"]'], '');\n }\n //ce msg est un retour de la fonction de mail et non de la fonction de reset\n if(msg == 'success')\n {\n AJAXloader(false, '#loader-pass-forgot');\n displayMessagesOut();\n $('.error-field').addClass('novisible');\n $('.valid-forgot').removeClass('novisible');\n displaySuccess([], '#pass-forgot-form', ['input[name=\"pass-forgot\"]'], '');\n }\n });\n}", "function forgotPassword() { \n\n\t\t\t$( \"#load\" ).show();\n\t\t\t\n\t\t\tvar form = new FormData(document.getElementById('reset_form'));\n\t\t\t\n\t\t\tvar validate_url = $('#reset_form').attr('action');\n\t\t\t\n\t\t\t$.ajax({\n\t\t\t\ttype: \"POST\",\n\t\t\t\turl: validate_url,\n\t\t\t\t//data: dataString,\n\t\t\t\tdata: form,\n\t\t\t\t//dataType: \"json\",\n\t\t\t\tcache : false,\n\t\t\t\tcontentType: false,\n\t\t\t\tprocessData: false,\n\t\t\t\tsuccess: function(data){\n\n\t\t\t\t\t\n\t\t\t\t\tif(data.success == true ){\n\t\t\t\t\t\t\n\t\t\t\t\t\t$( \"#load\" ).hide();\n\t\t\t\t\t\t$(\"input\").val('');\n\t\t\t\t\t\t\n\t\t\t\t\t\t$(\".forgot-password-box\").html(data.notif);\n\t\n\t\t\t\t\t\tsetTimeout(function() { \n\t\t\t\t\t\t\t//$(\"#notif\").slideUp({ opacity: \"hide\" }, \"slow\");\n\t\t\t\t\t\t\t//window.location.reload(true);\n\t\t\t\t\t\t}, 2000); \n\n\t\t\t\t\t}else if(data.success == false){\n\t\t\t\t\t\t$( \"#load\" ).hide();\n\t\t\t\t\t\t$(\"#notif\").html(data.notif);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t},error: function(xhr, status, error) {\n\t\t\t\t\t$( \"#load\" ).hide();\n\t\t\t\t},\n\t\t\t});\n\t\t\treturn false;\n\t\t}", "function reset_password()\n{\n\tvar username=$('#username').val();\n\tif(username=='')\n\t{\n\t\talert('please enter email id');\n\t}\n\telse\n\t{\n\t\t$.ajax({\n\t\t\t\ttype: \"POST\",\n\t\t\t\turl:\"http://codeuridea.net/kidssitter/resetting/send-email\",\n\t\t\t\tdata:{'username':$('#username').val()},\n\t\t\t\tdataType: \"json\",\n\t\t\t\tcrossDomain: true\n\t\t\t});\n\t}\n}", "function ksForgotPassword(){\n //check if the form is valid\n if(!$('#forgotpassword').valid()) return;\n \n //put the loading screen on\n loadingScreen();\n \n //create an object to send to varify auth\n var obj=new Object();\n obj.email = $('#forgotpassword input[name=\"email\"]').val();\n \n //send the reset information via ajax\n $.ajax({\n type: \"POST\",\n url: \"/login/resetpassword/\",\n dataType: \"json\",\n data: obj ,\n async: false,\n success: function(res) {\n if (res.items[0].status ==='success'){\n setSuccessToSuccess();\n //loading screen\n removeLoadingScreen();\n\n //display success failure screen\n displaySuccessFailure();\n \n \n $('#glassnoloading').fadeOut('normal');\n \n //change the dialog to be more informative\n $('.registerdialog img').attr(\"src\" , \"/img/success.png\");\n $('.registerdialog * .message').text('Successfully identified your account. A mail was sent to the address you supplied. To proceed with password change follow the link in the mail sent.');\n $('.registerdialog > .front-card').remove();\n \n }\n else{\n setSuccessToFailed();\n //loading screen\n removeLoadingScreen();\n\n //display success failure screen\n displaySuccessFailure();\n\n $('#glassnoloading').fadeOut('normal');\n \n //change the dialog to be more informative\n $('.registerdialog img').attr(\"src\" , \"/img/failed.png\");\n $('.registerdialog * .message').text(res.items[0].msg);\n }\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 //change the dialog to be more informative\n $('.registerdialog img').attr(\"src\" , \"/img/failed.png\");\n $('.registerdialog * .message').text('Error! Connection failure. Try again');\n }\n });\n}", "function loginUser() {\n var email,\n password;\n email = $(\"#inputEmail3\").val();\n password = $(\"#inputPassword3\").val();\n $.ajax({\n type: \"POST\",\n url: \"Controllers/controller.User.php\",\n data: {locate: 'UserLogin', email: email, password: password}\n })\n .done(function(msg) {\n if (msg === '') {\n noty({\n layout: 'bottom',\n type: 'alert',\n text: 'Your Email or your Password are wrong!',\n dismissQueue: true,\n animation: {\n open: {height: 'toggle'},\n close: {height: 'toggle'},\n easing: 'swing',\n speed: 500\n },\n timeout: 4000\n });\n return;\n }else{\n alert(msg);\n }\n });\n\n}", "function forgotPassword(method,type) {\n hideError('email');\n addFunActionLabel=\"Forgot Pasword Submit\";\n if(pageType=='not_login'){\n var email = $.trim($(\"#TenTimes-Modal #userEmailCopy\").val()); \n }else{\n var email = $.trim($(\"#TenTimes-Modal #userEmail\").val());\n }\n if(!validateEmail12345(email)){\n $(\".alert_email\").show();\n return 0;\n }\n var otpType='password';\n if(type=='N' || type=='U'){\n otpType='otp';\n }\n\n if(method == \"connect\")\n var postData = {'email':email, 'name' : receiverData.name , 'type' : otpType }\n else\n var postData = {'email':email, 'name' : email , 'type' : otpType }\n showloading();\n $.post(site_url_attend+'/user/getpassword',postData,function(response){\n hideloading();\n response=$.parseJSON(response);\n var resText=response.resText;\n var resLink=response.resLink;\n if(type=='N' || type=='U'){\n resText=response.resText_typeN;\n resLink=response.resLink_typeN;\n \n }\n \n switch(response.response) {\n case 'true':\n $('#getpassword').parent().replaceWith(function() { return \"<a style='text-decoration:none'>\" + \"<p class='text-center' style='text-decoration:none;color:#909090;'>\" + resText + \"</p>\"+$('#getpassword').get(0).outerHTML+\"</a>\"; });\n\n $('#getpassword').text(resLink);\n if(method!='signup' && method!='connect' && method!='contact_organizer_venue'){\n $('#TenTimes-Modal .partial-log').hide();\n $('#getpassword').removeAttr(\"onclick\").click(function() {\n partialLog(method,type)\n }).text(resLink).css('color','#335aa1');\n }\n break;\n case 'false':\n $(\".alert_email\").html(\"Sorry, 10times doesn't recognize that email.\");\n $(\".alert_email\").show();\n break;\n }\n }); \n}", "function forgotPasswordDetails\n(\n emailID\n)\n{\n var data;\n var username = getEncode(emailID); \n var iv = username.iv; \n username = username.activate;\n \n var dataToSend = \n {\n \"action\" : VALIDATE_USER,\n \"iv\" : JSON.stringify(iv),\n \"encodeUN\" : JSON.stringify(username), \n \"activate\" : false\n }\n \n $.ajax({\n type : \"POST\",\n url : API_URL,\n data : dataToSend, \n dataType : \"json\",\n async : false, \n headers : HEADER,\n error : function (e) \n { \n \n return false;\n },\n success : function(result)\n { \n data = result; \n }\n \n });\n return data;\n}", "function modif_password(){\n //mot de passe actuel, nouveau et confirmé et l'id \n var act =$(\"#act\").val();\n \n var npas =$(\"#npas\").val();\n var cpas =$(\"#cpas\").val();\n if(npas!=cpas){\n $('#alert-profil-npas').html('<span class=\"text-danger\">Mots de passe différents</span>'); \n $('#alert-profil-cpas').html('<span class=\"text-danger\">Mots de passe différents</span>'); \n }else{\n var action =\"update_pass\";\n var id = $(\"#user-id\").val();\n xhr = new XMLHttpRequest;\n xhr.responseType = 'json';\n var URL = \"ajax/users.php?action=\"+action+\"&id=\"+id+\"&pass=\"+npas;\n xhr.open(\"GET\",URL,true);\n xhr.send(null);\n xhr.onreadystatechange = result;\n function result(){\n if (this.readyState === 4 && this.status === 200) {\n var data = xhr.response;\n $('#alert4').html(data.result);\n \n $('#alert4').css('display','block');\n $(\"#act\").val();\n $(\"#cpas\").val();\n $(\"#npas\").val();\n }\n }\n }\n \n \n\n}", "function managePasswordForgotten() {\n\t$('#passwordReset').click(function() { \n\t\t// We must reset the document and send a link to the registered email\n\t\t// to a form where the end user can update the password\n\t\tclearDocument();\n\t\tloadHTML(\"navbar.html\");\n\t\tnavbarHover();\n\t\t$(document.body).append(\"<center><h1>Please fill in the following form !</h1><center>\");\n\t\tloadHTML(\"passwordForgotten.html\");\n\t\tloadJS(\"js/forms.js\");\n formSubmission('#passwordForgotten','generatePasswordLnkRst','Reset email successfully sent','Unknown user');\n loadHTML(\"footer.html\");\n\t});\n}", "function forgotPassword(divid,url,mailid,type,fid){\n\t var emailvalue=document.getElementById(mailid).value;\n\t \n\t\t\t emailvalue=rm_trim(emailvalue);\n\t\t\t if(emailvalue==''){\n\t\t\t alert(\"Please Enter Email\");\n\t\t\t document.getElementById(mailid).focus();\n\t\t\t return false;\n\t\t\t }\n\t\t\t else if(!emailValidator(emailvalue)){\n\t\t\t\t\talert(\"Invalid Email \");\n\t\t\t\t\tdocument.getElementById(divid).innerHTML=\"\";\n\t\t\t\t\tdocument.getElementById(mailid).value=\"\";\n\t\t\t\t\tocument.getElementById(mailid).focus();\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t }\n\t\t\t\t\t // alert(url);\n\t\t\turl=url+\"&email=\"+emailvalue;\n\t\t\tgetServerResponse(divid,url,\"\",true)\n}", "function UsernameSecurityCheckAjaxMethod() {\n var user = $(\"#usernameCheck\").val();\n var security = $('#Securty').val();\n var answer = $('#AnswerCheck').val();\n $.ajax({\n type: \"POST\",\n url: \"Login.aspx/UsernameAndPasswordTwoCheckForgotPageMethod\",\n data: \"{userCheck: '\" + user + \"', security: '\" + security + \"', answer: '\" + answer + \"'}\",\n dataType: \"json\",\n contentType: \"application/json; charset=utf-8\",\n success: function () {\n $('.SecurityCheck').fadeOut(function () {\n $('.AllisGood').fadeIn(700);\n });\n },\n error: function () {\n if (security == \"Choose Security Question\") {\n $('#SecurityError').text(\"Please select Security Question.\");\n $('#SecurityError').css({ 'color': 'red', 'font-weight': 'bold', 'margin-top': '-15px', 'margin-bottom': '20px', 'font-size': '15px' });\n $('#SecurityError').addClass('animated shake');\n return false;\n }\n else if (answer == \"\") {\n $('#SecurityError').text(\"Please give Answer.\");\n $('#SecurityError').css({ 'color': 'red', 'font-weight': 'bold', 'margin-top': '-15px', 'margin-bottom': '20px', 'font-size': '15px' });\n $('#SecurityError').addClass('animated shake');\n return false;\n }\n else\n $('#SecurityError').text(\"It is not Correct.\");\n }\n });\n}", "function getUserForManagePassword(username) {\r\n\tblockUI();\r\n\t$.ajax({\r\n\t\ttype : \"GET\",\r\n\t\turl : \"getUserForResetPassword.do\",\r\n\t\tdata : \"username=\" + username,\r\n\t\tdataType : \"json\",\r\n\t\tcache : false,\r\n\t\tsuccess : function(data) {\r\n\t\t\tunblockUI();\r\n\t\t\tif (data) {\r\n\t\t\t\t$(\"#userSearchRpHidden\").val(username);\r\n\t\t\t\t$(\"#userIdRP\").val(data.userId);\r\n\t\t\t\t$('#userSearchRP').blur(); \r\n\r\n\t\t\t\t$(\"#firstNameRP\").text(data.firstName);\r\n\t\t\t\t$(\"#middleNameRP\").text(data.middleName);\r\n\t\t\t\t$(\"#lastNameRP\").text(data.lastName);\r\n\t\t\t\t$(\"#emailRP\").text(data.emailId);\r\n\t\t\t\t$(\"#contactNumberRP\").text(data.phoneNumber);\r\n\t\t\t\t$(\"#streetRP\").text(data.street);\r\n\t\t\t\t$(\"#cityRP\").text(data.city);\r\n\t\t\t\t$(\"#stateRP\").text(data.state);\r\n\t\t\t\t$(\"#zipRP\").text(data.zip);\r\n\t\t\t\t$(\"#countryRP\").text(data.country);\r\n\r\n\t\t\t\tif (data.pwdHintList[0]) {\r\n\t\t\t\t\t$(\"#question1RP\").text(data.pwdHintList[0].questionValue);\r\n\t\t\t\t\t$(\"#answer1RP\").text(data.pwdHintList[0].answerValue);\r\n\t\t\t\t}\r\n\t\t\t\tif (data.pwdHintList[1]) {\r\n\t\t\t\t\t$(\"#question2RP\").text(data.pwdHintList[1].questionValue);\r\n\t\t\t\t\t$(\"#answer2RP\").text(data.pwdHintList[1].answerValue);\r\n\t\t\t\t}\r\n\t\t\t\tif (data.pwdHintList[2]) {\r\n\t\t\t\t\t$(\"#question3RP\").text(data.pwdHintList[2].questionValue);\r\n\t\t\t\t\t$(\"#answer3RP\").text(data.pwdHintList[2].answerValue);\r\n\t\t\t\t}\r\n\t\t\t\tif (data.userId == 0) {\r\n\t\t\t\t\t$.modal.alert(strings['script.noUserFound']);\r\n\t\t\t\t\t$(\"#userDetailsRP\").attr(\"class\", \"wizard-fieldset fields-list hidden\");\r\n\t\t\t\t\t$(\"#securityQuestionsRP\").attr(\"class\", \"wizard-fieldset fields-list hidden\");\r\n\t\t\t\t\t$(\"#userSearchRP\").attr('readonly', false);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$(\"#userSearchRP\").attr('readonly', true);\r\n\t\t\t\t\t$(\"#userDetailsRP\").attr(\"class\", \"wizard-fieldset fields-list\");\r\n\t\t\t\t\t$(\"#securityQuestionsRP\").attr(\"class\", \"wizard-fieldset fields-list\");\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$.modal.alert(strings['script.noUserFound']);\r\n\t\t\t\t$(\"#userDetailsRP\").attr(\"class\", \"wizard-fieldset fields-list hidden\");\r\n\t\t\t\t$(\"#securityQuestionsRP\").attr(\"class\", \"wizard-fieldset fields-list hidden\");\r\n\t\t\t\t$(\"#userSearchRP\").attr('readonly', false);\r\n\t\t\t}\r\n\t\t},\r\n\t\terror : function(data) {\r\n\t\t\tunblockUI();\r\n\t\t\t$.modal.alert(strings['script.user.search']);\r\n\t\t},\r\n\t\tcomplete : function(data) {\r\n\t\t}\r\n\t});\r\n}", "function doRetrieve(){\n\t$j('forgetResult').html('Please Wait... <img src=\"static/loading.gif\"/>').slideDown();\n\t\n\tvar params = prepForQuery(getFormVars('forgot'));\n\t\n\t$j.ajax({\n\t\turl: \"user/forgot\",\n\t\ttype: 'post',\n\t\tdata: params,\n\t\tsuccess: returnForgot\n\t});\n}", "function sendForgetPassword(){\n //check validation\n if(!$('#forget_password_dialog form').valid()) return;\n \n //put loading screen\n loadingScreen();\n \n //prepare the object to send\n var obj=new Object();\n obj.email = $.trim($('#forget_password_dialog_textbox').val());\n \n //send the reset information via ajax\n $.ajax({\n type: \"POST\",\n url: \"/login/resetpassword/\",\n dataType: \"json\",\n data: obj ,\n async: false,\n success: function(res) {\n if (res.items[0].status ==='success'){\n $('#forget_password_dialog_error').css('display', 'none');\n $('#forget_password_dialog_body').fadeOut('normal', function(){\n $('#forget_password_dialog_success').fadeIn('normal');\n });\n }\n else{\n $('#forget_password_dialog_error * p').text(res.items[0].msg);\n $('#forget_password_dialog_error').fadeIn('normal');\n }\n removeLoadingScreen();\n },\n error: function(res){\n $('#forget_password_dialog_error * p').text('Connection failure: Try again');\n $('#forget_password_dialog_error').fadeIn('normal');\n removeLoadingScreen();\n }\n });\n}", "function z_usersPassword(id) {\r\n var usrId = id;\r\n var pass = $(\"#newPassword\").val();\r\n var cnfmPass = $(\"#confirmPassword\").val();\r\n if ($(\"#resetPassForm\").valid()) {\r\n var data = {\r\n userId: usrId,\r\n password: pass\r\n };\r\n $.ajax({\r\n url: \"/api/updateUserCredential\",\r\n type: \"POST\",\r\n data: data,\r\n dataType: 'text',\r\n success: function (result) {\r\n console.log(result);\r\n var form = document.getElementById(\"resetPassForm\");\r\n if (result.split(\":\")[1] == \"Done\") {\r\n alertPopup('success', \"Password Updated Successfully\");\r\n } else {\r\n alertPopup('alert', \"User Not found\");\r\n }\r\n $('#z-resetPass-popup').modal(\"hide\");\r\n },\r\n error: function (result) {\r\n console.log(result);\r\n }\r\n });\r\n }\r\n}", "function passwordsMatching(password_one, password_two) {\r\n\t\tif (password_one != password_two) {\r\n\r\n\t\t\t$.ajax({\r\n\t\t\t\ttype : \"POST\",\r\n\t\t\t\turl : \"logic/process_inputcheck.php\",\r\n\t\t\t\tdata : {\r\n\t\t\t\t\taction : \"get_message_passwords_not_matching\"\r\n\t\t\t\t}\r\n\t\t\t}).done(function(msg) {\r\n\t\t\t\t$('div[id=passwords_not_matching]').remove();\r\n\t\t\t\t$('#messagearea').append(msg);\r\n\t\t\t\t$('html, body').animate({\r\n\t\t\t\t\tscrollTop : $('#messagearea').offset().top\r\n\t\t\t\t}, 600);\r\n\t\t\t});\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\t$('div[id=passwords_not_matching]').remove();\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "function updateUserPassword(){\n\t\tif($(\"#searchusername\").val() && $('#editpassword').val()){\n\t\t\t$.ajax({\n\t\t\t\ttype: 'POST',\n\t\t\t\turl: \"../UserServlet\",\n\t\t\t\tdata: {\n\t\t\t\t\t\taction:'updateUserPassowrd',\n\t\t\t\t\t\tusername: $('#searchusername').val(),\n\t\t\t\t\t\tpassword:$('#editpassword').val()\n\t\t\t\t\t\t},\n\t\t\t\tsuccess: function(response) {\n\t\t\t\t\t\tif(response.status==\"success\"){\n\t\t\t\t\t\t\talert('Password successfully updated');\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(response.status==\"failure\") {\n\t\t\t\t\t\t\talert(response.error);\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\tdataType: \"json\"\n\t\t});\n\t\t}\n\t\telse{\n\t\t\talert(\"Username or Password cannot be empty\");\n\t\t}\n\n\t}", "function otbot_attempt_login(ot_username, ot_password){\n\n $.post(\n \n // see tip #1 for how we declare global javascript variables\n \n ajaxurl,\n {// here we declare the parameters to send along with the request\n \n action : 'otbot_attempt_login',\n // other parameters can be added along with \"action\"\n //requests only come from pages which originate with our server\n \n //username and password for ot\n otbot_username: ot_username,\n otbot_password: ot_password\n },\n \n function( response ) {\n $('#wait').hide();\n if(response ==\"ERROR!!!\"){\n alert(\"Password or Username is incorrect, please try again.\");\n $('#credentials').show();\n }else{\n cookieName = response;\n $('#status').append('1. ' + ot_username );\n $('#status').attr('otusername',('1. ' + ot_username) );\n otbot_query_projects();\n $('#wait').show();\n \n }\n });//end ajax post\n\n}//end otbot_attempt_login", "function resetPass(){\nif (document.getElementById('userid').value =='' || document.getElementById('userid').value == null) {\nparent.swal({title: \"Missing Input!\",text: \"Please enter your User ID.\",type: \"error\"},function(){setTimeout(function(){document.getElementById('userid').focus();},100);});\nreturn false;\n};\nswal({\n title: \"Please wait.. \",\n text: \"This may take a few seconds! Please wait for a confirmation message!\",\n showConfirmButton: false\n});\n $.ajax({\t\t\t\n\t\t\t\tdataType: \"jsonp\",\n\t\t\t\ttimeout: 10000,\n\t\t\t\turl: 'utils/forgotpassword.php?jsoncall=?',\n\t\t\t\ttype: \"POST\",\n data: {\n userid: document.getElementById(\"userid\").value, process: \"forgotpass\"\n }, \n success:function (data) {\n\t\t\t\t\tvar data2=data.response;\n if (data2 == \"2\")\n {\n\t\t\t\t\t\tdocument.getElementById(\"userid\").value=\"\";\n\t\t\t\t\t\tswal({title: \"Success!\",text: \"Information on resetting your password has been sent to your registered email address!\", type: \"success\"});\n }\n\t\t\t\t\telse if (data2 == \"8\")\n\t\t\t\t\t{\n\t\t\t\t\t\tdocument.getElementById(\"userid\").value=\"\";\n\t\t\t\t\tswal({title: \"An error has occurred!\",text: \"Please try again!\", type: \"error\"});\n\t\t\t\t\t}\n\t\t\t\t\telse if (data2 == \"7\")\n\t\t\t\t\t{\n\t\t\t\t\t\tdocument.getElementById(\"userid\").value=\"\";\n\t\t\t\t\tswal({title: \"Details entered do not match any on file!\",text: \"Please try again!\", type: \"error\"});\n\t\t\t\t\t}\n else\n {\n\t\t\t\t\t\tdocument.getElementById(\"userid\").value=\"\";\n\t\t\t\t\tswal({title: \"Error!\",text: \"An un-documented error has occurred, please try again.\", type: \"error\"});\n }\n }\n }); \n}", "function loginAjax() {\n let username = $('input#username').val();\n let pwd = $('input#pwd').val();\n if(username===\"\" || pwd===\"\") {\n loginResponse({status:-1});\n return false;\n }\n sendAjax('login',{\n 'username': username,\n 'password': sha256(pwd)\n });\n return false; // Prevent auto refresh\n}", "function verify_repass(repassword){\n var password = $(\"#password\").val();\n $(\".re_error\").hide();\n $(\".re_correct\").hide();\n if(repassword == \"\"){\n $(\".re_error\").show();\n $(\".re_error\").html(\"Please enter password\");\n \n } else{\n $.ajax({\n url: \"action.php\",\n method: \"POST\",\n data: {check_repass:1,repassword:repassword,password:password},\n success: function(data){ \n if(data == \"password_short\"){\n $(\".re_error\").show();\n $(\".re_error\").html(\"Password too short!\");\n } else if(data == \"not_matched\"){\n $(\".re_error\").show();\n $(\".re_error\").html(\"Password not matched!\");\n } else if(data == \"ok\"){\n $(\".re_correct\").show();\n $(\".re_correct\").html(\"OK\");\n }\n }\n });\n } \n }", "function resetPass() {\n $('form#reset-pass').submit(function(e) {\n e.preventDefault()\n e.stopImmediatePropagation();\n var newPass = $('#user-reset-pass');\n var newPassAgain = $('#user-reset-pass-again');\n if (newPass.val() === newPassAgain.val()) {\n $.ajax({\n url: \"process/ajaxHandler.php\",\n method: \"POST\",\n dataType: \"JSON\",\n data: {\n action: \"resetPassword\",\n userNewPass: newPass.val()\n },\n success: function(response) {\n if (response.status == \"success\") {\n $('div#container').remove();\n $('body').append(\"<h3 class='successfully-change-pass-msg'>Your password successfully changed</h3>\");\n setTimeout(function() { window.location.replace(response.redirectAddress) }, 2000);\n } else if (response.status == \"error\") {\n alert(response.description)\n }\n }\n })\n } else {\n alert('password not match.')\n }\n })\n}", "function checkUserLogin(){\n var userLogemail = $(\"#userLogemail\").val();\n var userLogpass = $(\"#userLogpass\").val();\n $.ajax({\n url:'users/adduser.php',\n method: \"POST\",\n data: {\n checkLogemail: \"checkLogemail\",\n userLogemail: userLogemail,\n userLogpass: userLogpass,\n },\n success: function(data) {\n //console.log(data);\n if (data == 0) {\n $(\"#statusLogMsg\").html(\n '<small class=\"alert alert-denger\">Invalid Email ID or Password !</small>');\n\n }else if (data == 1) {\n $(\"#statusLogMsg\").html(\n '<div class=\"spinner-border text-success\" role=\"status\"></div>'\n );\n setTimeout(()=>{\n window.location.href = \"index.php\";\n },1000);\n }\n },\n });\n}", "function submitForm()\r\n\t\t{\t\t\r\n\t\t\tvar data = $(\".forgotform\").serialize();\r\n\t\t\t\t\r\n\t\t\t$.ajax({\r\n\t\t\t\t\r\n\t\t\ttype : 'POST',\r\n\t\t\t//url : 'engine/login_process.php',\r\n\t\t\turl : 'http://api.haagendazsindonesia.co.id/v1/auth/forgot_password',\r\n\t\t\t//crossDomain: true,\r\n\t\t\t//headers: {\r\n // 'Access-Control-Allow-Origin': '*'\r\n //'Content-Type':'application/x-www-form-urlencoded'\r\n \t//},\r\n\t\t\tdata : data,\r\n\t\t\t//dataType : 'jsonp',\r\n\t\t\tbeforeSend: function()\r\n\t\t\t{\t\r\n\t\t\t\t$(\".loads\").fadeIn();\r\n\t\t\t\t$(\".loads\").html('Resetting your password...');\r\n\t\t\t\t$(\".forgotform\").fadeOut();\r\n\t\t\t},\r\n\t\t\tsuccess : function(response)\r\n\t\t\t {\r\n\t\t\t \t\tvar respon = jQuery.parseJSON(response);\r\n\t\t\t\t\tif(respon.is_error===false){\r\n\t\t\t\t\t\t$(\".loads\").html('Success! Your new password has been sent to your email.');\r\n\t\t\t\t\t\tsetTimeout('location.reload();',4000);\r\n\t\t\t\t\t\t\r\n\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$(\".loads\").html('<div class=\"alert alert-danger\"> <span class=\"glyphicon glyphicon-info-sign\"></span> &nbsp; '+respon.status_msg+' !</div>');\r\n\t\t\t\t\t\t$(\".forgotform\").fadeIn();\r\n\t\t\t\t\t\tsetTimeout(function () {\r\n\r\n\t\t\t\t\t\t\t$(\".alert-danger\").hide();\r\n\r\n\t\t\t\t\t\t},1000)\r\n\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t }\r\n\t\t\t});\r\n\t\t\t\treturn false;\r\n\t\t}", "function chkLogin_for_existinguser(pBody,email, password, bounceval)\n{\n\tvar urllength = bounceval.length;\n\tvar urlindex = bounceval.lastIndexOf('&page');\n\tif(urlindex != -1){\n\t\tvar bounceval = bounceval.substr(urlindex, urllength);\n\t}\n\txmlHttp=GetXmlHttpObject();\n\tif (xmlHttp==null)\n\t{\n\t\talert (\"Your browser does not support AJAX!\");\n\t\treturn;\n\t}\n\tvar url = host + '/community/exchange_register/welcome.htm?email=' + email + '&password=' + password + '&' +bounceval + '&flag=existuser_new_emailalert'+'&'+pBody;\n\tvardiv='newregistration';\n\txmlHttp.open(\"GET\",url,true);\n\txmlHttp.onreadystatechange=function()\n\t{ \n\t\tregistrationstateChanged(vardiv); \n\t};\n\txmlHttp.send(null);\n}", "function ajaxUsername(){\r\n\tif($(\"#username\").val()!=\"\"){\r\n\t\t$.ajax(\"/register/user/\",{\r\n\t\t\tdata:{username:$(\"#username\").val()},\r\n\t\t\ttype:\"GET\",\r\n\t\t\tdataType:\"text\",\r\n\t\t\tsuccess: function(data){\r\n\t\t\t\tif(data==\"true\"){\r\n\t\t\t\t\tsuccessMsg($(\"#username\"));\r\n\t\t\t\t} else {\r\n\t\t\t\t\tspecError($(\"#username\"),\"username in use\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n}", "function loadForgotUserPassResources(){\r\n //Verifica se o usuario existe no banco de dados para enviar suas informacoes via email\r\n $('#askForDataButton').click(function (event){\r\n\tevent.preventDefault();\r\n \t\r\n\t//Variavel que indicara se tudo esta correto\r\n\tlet ok = true;\r\n\r\n\t//Verificando se esta tudo preenchido\r\n\tif($('#userCPF').val() == \"\" && $('#userEmail').val() == \"\"){\r\n\t\talert(\"Preencha algum dos campos.\");\r\n\t\tok = false;\r\n\t}\r\n\r\n\t\r\n\t//Expressoes regulares para validacao\t\r\n\tlet validaCpf = new RegExp('[0-9]{3}[\\.][0-9]{3}[\\.][0-9]{3}-[0-9]{2}');\t\r\n\tlet validaEmail = new RegExp('[A-Za-z0-9\\\\._-]+@[A-Za-z]+\\\\.[A-Za-z]+');\r\n\t\r\n\r\n\t//Validando o cpf\r\n\tif($('#userCPF').val() != \"\" && validaCpf.exec($('#userCPF').val()) == null){\r\n\t\talert(\"CPF inválido. Digite no seguinte formato: ___.___.__-__\");\r\n\t\tok = false;\r\n\t}\r\n\t\r\n\t//Valida o email\r\n\tif($('#userEmail').val() != \"\" && validaEmail.exec($('#userEmail').val()) == null){\r\n\t\talert(\"Email inválido. Digite no seguinte formato: _@_._\");\r\n\t\tok = false;\r\n\t}\r\n\r\n\t//Procura pelo usuario na base de dados\r\n\tif(ok == true){\r\n\t\t$.get('/users',function(data){\r\n\t\t\tlet cpf = $('#userCPF').val();\r\n\t\t\tlet email = $('#userEmail').val();\r\n\t\t\tlet exist = false;\r\n\t\t\tfor(let i=0;i<data.length;i++){\r\n\t\t\t\tif(data[i].obj){\r\n\t\t\t\t\tif(cpf == data[i].obj.cpf || email == data[i].obj.email){\r\n\t\t\t\t\t\texist = true;\r\n\t\t\t\t\t\tbreak;\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(exist == false){\r\n\t\t\t\talert(\"Não existe nenhum usuário com este email ou cpf fornecidos.\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\talert(\"Enviamos um email com sua nova senha de acesso.\");\r\n\t\t\t\t// Limpa o conteudo atual e recarrega a home page (Apenas se der certo)\r\n\t\t\t\tclearForgotUserPassPage();\r\n\t\t\t\tloadHomePage();\r\n\t\t\t}\r\n\t\t});\r\n\t}\t\r\n }); \r\n \r\n //Volta para a pagina principal\r\n $('#returnButton').click(function (){\r\n clearForgotUserPassPage();\r\n loadHomePage();\r\n });\r\n}", "function loginProcessTips(url){\n\tvar username = jQuery(\"#username\").val();\n\tvar password = jQuery(\"#password\").val();\n\talert(username);\n/*\tjQuery.ajax({ \n\t type: 'POST', \n\t url: url, \n\t dataType: { 'username' : username, 'password' : password },\n\t cache: false,\n\t success:function(response) {\n\t \tjQuery(\"#username\").val($('#username').val());\n\t \tjQuery(\"#password\").val($('#password').val());\n\t },\t \n\t data: {},\n\t async: false\n\t \n\t});\n\t*/\n\t\n}", "function efiapi(pass) {\n $.ajax({\n type: \"post\",\n data: {\n login: \"efi\",\n password: pass\n },\n\n url: \"https://efigence-camp.herokuapp.com/api/login\",\n error: function(response) {\n var badresp = $.parseJSON(response.responseText);\n $(\".pass-wrong p\").text(badresp.message);\n $wrongPassBox.show('slow').attr('aria-hidden', false)\n .delay(1000)\n .hide('slow').attr('aria-hidden', true);\n },\n success: function(response) {\n\n $(location).attr('href', newUrl);\n }\n\n });\n } //End of efiapi", "function oldUsernameAjaxValidator() {\n\t\t\t//console.log(\"Executing test ajax function\");\n\t\t\tvar xmlhttp;\n\t\t\tif (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari\n\t\t\t\txmlhttp=new XMLHttpRequest();\n\t\t\t}\n\t\t\telse {// code for IE6, IE5\n\t\t\t\txmlhttp=new ActiveXObject(\"Microsoft.XMLHTTP\");\n\t\t\t}\n\t\t\t//console.log(\"xml request created\");\n\t\t\txmlhttp.onreadystatechange=function() {\n\t\t\t\t//console.log(\"ready state changed\");\n\t\t\t\tif (xmlhttp.readyState==4) {\n\t\t\t\t\tif (xmlhttp.responseText == 1) {\n\t\t\t\t\t\tdocument.getElementById('oldusernamemessage').innerHTML = \"Logged in !!!\";\n\t\t\t\t\t\t\n\t\t\t\t\t\t//Validation successful , now log in the user\n\t\t\t\t\t\tdocument.getElementById('oldUserName').submit();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t//document.getElementById('usernamemessage').innerHTML = xmlhttp.responseText;\n\t\t\t\t\t\tdocument.getElementById('oldusernamemessage').innerHTML = \"Username not found !!!\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\txmlhttp.open(\"POST\",\"oldUsernameValidator.php\",true);\n\t\t\t//console.log(\"POST method set\");\n\t\t\txmlhttp.setRequestHeader(\"Content-type\",\"application/x-www-form-urlencoded\");\n\t\t\t//console.log(\"request header set\");\n\t\t\t//console.log(document.getElementById('oldusername').value);\n\t\t\txmlhttp.send(\"username=\" + document.getElementById('oldusername').value);\n\t\t\t//console.log(\"request sent\");\n\t\t\t\n\t\t}", "function pword_change()\n{\n //get the fields\n password = document.change_pword_form.change_password.value\n password1 = document.change_pword_form.change_password1.value\n username = document.change_pword_form.Username.value\n\n if (password == \"\" || password1 == \"\" )\n {\n //reset the form \n document.getElementById(\"change_pword_form\").reset();\n //return the connect method\n document.getElementById('chat_res').innerHTML= \"<em id='err'>Please enter the passwords.</em>\"; \n return false;\n\n }\n else if (password != password1){\n //reset the form \n document.getElementById(\"change_pword_form\").reset();\n //return the connect method\n document.getElementById('chat_res').innerHTML= \"<em id='err'>The passwords dont match.</em>\"; \n return false;\n\n\n }\n else\n {\n //check if there is an internet connection\n if (window.navigator.onLine)\n {\n document.getElementById('chat_res').innerHTML = '<img src=\"/static/images/Loader.gif\" />';\n var xmlhttp;\n if (window.XMLHttpRequest)\n {\n xmlhttp=new XMLHttpRequest();\n }\n else\n {\n xmlhttp=new ActiveXObject(\"Microsoft.XMLHTTP\");\n \n }\n\n xmlhttp.onreadystatechange=function()\n {\n if (xmlhttp.readyState==4 && xmlhttp.status==200)\n {\n\n //reset the form\n document.getElementById('change_pword_form').reset();\n //remove the all ticks\n document.getElementById('all_ticks').style.display = 'block';\n //remove the right div\n document.getElementById('left_div').style.display = 'none';\n //return the connect method\n document.getElementById('chat_res').innerHTML=xmlhttp.responseText;\n }\n \n }\n data = \"?password=\"+password+ \"&Username=\"+username\n xmlhttp.open(\"GET\",'/change_password/'+data,true);\n xmlhttp.send();\n\n }\n //no network connection\n else\n {\n //return the connect method\n document.getElementById('chat_res').innerHTML= errorMsg; \n return false;\n }\n }\n\n}", "function postResetPassword(data, textStatus, jqXHR, param) {\n\tvar user = param.user;\n\tvar uiDiv = $('#ui');\n\tuiDiv.html('');\n\tvar p = $('<p>');\n\tuiDiv.append(p);\n\tp.html('The password for \"' + user + '\" has been reset.');\n\tvar ul = $('<ul>');\n\tuiDiv.append(ul);\n\tvar li = $('<li>');\n\tul.append(li);\n\tli.html('New password: \"' + data[user] + '\"');\n}", "function forgot_profile() {\n $('#login').modal('hide');\n $('#forgotPassword').modal('show');\n}", "function registerUser(email,password) {\n var email = $('#txtEmailRegister').val();\n var password = $('#txtPassRegister').val(); ;\n var repeatPassword = $('#txtPassRepeatRegister').val();\n if (password != repeatPassword) {\n $('#txtErrorRegister').html('Password does not match.');\n return;\n }\n var datos = { \"email\": email, \"password\": password };\n $.ajax({\n type: 'POST',\n dataType: \"json\",\n contentType: 'application/json',\n data: JSON.stringify(datos),\n url: site_URL+'ws.asmx/registro',\n success: function (data) {\n \n //navegaSeccion(\"#login\", \"slideup\");\n navegaSeccion(\"#process_select\", \"slideup\");\n },\n error: function (e) {\n $('#txtErrorRegister').html('An error has occured while registering your account.');\n // console.log(e);\n }\n });\n\n\n}", "function postChangePassword(data, textStatus, jqXHR, param) {\n\tvar uiDiv = $('#ui');\n\tuiDiv.html('');\n\tvar div = $('<div>');\n\tuiDiv.append(div);\n\tdiv.addClass('transmissionnum');\n\tdiv.html('The password was successfully changed.');\n}", "function resetpassword()\n{\n\t$(\"#chkmsg\").html(\"\");\n\tvar email = $(\"#email\").val();\n\tconsole.log(email);\n\tvar password = $(\"#password\").val();\n\tvar pass = $(\"#pass\").val();\n\tif ( (password.length >= 8) && (pass.length >= 8) && (pass=password) )\n\t{\n\t\t$(\"#sub_btn\").attr(\"disabled\",\"disabled\").val('提交中..').css(\"cursor\",\"default\");\n\n\t\t$.ajax({\n\t\t\turl: \"../cgi/resetpwd.php\",\n\t\t\ttype: \"POST\",\n\t\t\tdataType: 'text',\n\t\t\tdata: {\n\t\t\t\t\"email\": email,\n\t\t\t\t\"password\": password,\n\t\t\t\t\"pass\": pass\n\t\t\t},\n\t\t\tsuccess: function(data){\n\t\t\t\tconsole.log(data)\n\t\t\t\tvar obj = eval('(' + data + ')')\n\t\t\t\tif (obj.error == \"none\")\n\t\t\t\t{\n\t\t\t\t\t$(\"#chkmsg\").html(obj.args.list);\n\t\t\t\t\t// $(\"#sub_btn\").removeAttr(\"disabled\").val('已提交').css(\"cursor\",\"pointer\");\n\t\t\t\t\t$(\"#sub_btn\").attr(\"disabled\",\"disabled\").val('已提交').css(\"cursor\",\"default\");\n\t\t\t\t}\n\t\t\t},\n\t\t\terror: function(data){\n\t\t\t\tserverError(obj)\n\t\t\t}\n\t\t})\n\t}\n\telse\n\t{\n\t\tif ( password.length<8 )\n\t\t{\n\t\t\t$(\"#chkmsg\").html(\"新密码的长度必须大于或等于8位\");\n\t\t}\n\t\telse if ( pass != password )\n\t\t{\n\t\t\t$(\"#chkmsg\").html(\"两次输入的密码不相同\");\n\t\t}\n\t}\n}", "function ajaxCallForResettingPassword(resetEmail,resetPassword){\n // console.log(\"in resetPassword \",resetEmail,resetPassword);\n var data = {};\n data.resetEmail = resetEmail;\n data.resetPassword = resetPassword;\n\n $.ajax({\n url:\"/users/resetPassword\",\n type: 'POST',\n async: true,\n data: JSON.stringify(data),\n contentType: 'application/json',\n context: this,\n cache: false,\n processData: false,\n success: function(response) {\n console.log('Reset password succesfully',response);\n location.reload();\n },\n error: function(response) {\n console.log('Error with reset password ' + response.statusText);\n console.log(\"error page\");\n }\n });\n }", "function submitdata() {\n\tusername = document.getElementById(\"username\").value;\n var lname = document.getElementById(\"lname\").value;\n\tvar password = document.getElementById(\"password\").value;\n var mail = document.getElementById(\"mail\").value;\n\tvar user2= username; \n \t\n\tvar dataString = 'username=' + username +\n '&password=' + password +\n '&mail=' + mail+\n '&lname=' + lname; \n\t\tif (username == '' || password == '') {\n alert(\"you are required to fill all the fields\")\n } \n\t\telse {\n\t\t\t\t\t$.ajax({\n\t\t\t\t\ttype: \"POST\",\n\t\t\t\t\turl: \"submit.php\",\n\t\t\t\t\tdata: dataString,\n\t\t\t\t\tcache: false,\n\t\t\t\t\tsuccess: function(html) {\n\t\t\t\t\talert(\"YOU HAVE SUCCESSFULLY SIGNED UP!!\");\n }\n\t\t\t\t\t});\n }\n\t\treturn false;\n}", "function chkLogin(email, password, bounceval)\n{\n\tvar urllength = bounceval.length;\n\tvar urlindex = bounceval.lastIndexOf('&page');\n\tif(urlindex != -1){\n\t\tvar bounceval = bounceval.substr(urlindex, urllength);\n\t}\n\txmlHttp=GetXmlHttpObject();\n\tif (xmlHttp==null)\n\t{\n\t\talert (\"Your browser does not support AJAX!\");\n\t\treturn;\n\t}\n\t\n\tvar url = host + '/community/exchange_register/welcome.htm?email=' + email + '&password=' + password + '&' +bounceval + '&flag=fromindex';\n\tvardiv='newregistration';\n\txmlHttp.open(\"GET\",url,true);\n\txmlHttp.onreadystatechange=function()\n\t{ \n\t\tregistrationstateChange(vardiv); \n\t};\n\txmlHttp.send(null);\n}", "function cancelForgotUsername(){\n\tcloseWindow();\n}", "function send_username_password(to_send_email)\n{\n\tto_send_email = escape(to_send_email);\n\tvar to_post = to_send_email;\n\tvar data1={\"to_send_email\":to_send_email,\"forgot_password\":1};\n\tvar url1=\"/profile/registration_ajax_validation.php\";\n\t$.ajax({\n\t\ttype: 'POST',\n\t\turl: url1,\n\t\tdata: data1,\n\t\tsuccess:function(data){\n\t\t response = data;\n\t\t eval(email_sent_notify(response));}\n\t });\n\n}", "function loginRegCall(url) {\n var username = $('#username').val();\n var pass = $('#password').val();\n $.ajax({\n url: url,\n type: 'POST',\n data: {username: username, pass: pass},\n success: function (data) {\n location.reload();\n },\n error: function () {\n }\n });\n}", "function changePasswordHandler(response) {\n messageData = JSON.parse(response);\n if (messageData.success) \n\tdocument.getElementById(\"changePasswordForm\").reset();\n}", "function fetch_errno_new_pw2(element_Id, input_val, req_val){\n $.ajax({\n url: 'assets/resources/profileEditFormFetchErrno.php',\n method: 'POST',\n data: {Id: element_Id, user_input: input_val, req_user_input: req_val},\n cache: false,\n\n success: function(data){\n //separating error no. and error string\n var errno_PLUS_errorString = data.split(\":\");\n var errno = errno_PLUS_errorString[0];\n var errorString = errno_PLUS_errorString[1];\n\n //sending error inside html to print when required\n if(errno == 1){\n $(\"#\" + element_Id + \" .invalid-feedback\").empty();\n //updating fix variable\n confirmNewPwPerfectOnce = 1; //when the both the password fields turn green\n }else{\n $(\"#\" + element_Id + \" .invalid-feedback\").html(errorString);\n }\n \n //adding class to display error\n if(errno == 1){\n $(\"#\" + element_Id + \" .form-control\").addClass(\"is-valid\");\n if($(\"#\" + element_Id + \" .form-control\").hasClass(\"is-invalid\") == true){\n $(\"#\" + element_Id + \" .form-control\").removeClass(\"is-invalid\");\n }\n }else{\n $(\"#\" + element_Id + \" .form-control\").addClass(\"is-invalid\");\n if($(\"#\" + element_Id + \" .form-control\").hasClass(\"is-valid\") == true){\n $(\"#\" + element_Id + \" .form-control\").removeClass(\"is-valid\");\n }\n }\n\n //toggling the submit button\n if(errno == 1){\n $(\"#changePwBtn\").removeAttr(\"disabled\");\n }else{\n $(\"#changePwBtn\").attr(\"disabled\", \"disabled\");\n }\n }\n });\n}", "function register() {\n // On server response\n xhttp.onreadystatechange = function() {\n if (this.readyState == 4 && this.status == 200) {\n // Check if username is available\n if (xhttp.responseText == \"ok\") {\n // Check if passwords match\n if (document.getElementById(\"pass1\").value == document.getElementById(\"pass2\").value) {\n // All good, submit the form\n document.querySelector(\"form\").submit();\n }\n else {\n // Passwords don't match, warn user\n document.querySelector(\"#error\").innerHTML = \"Passwords don't match\";\n }\n }\n else {\n // Username taken, warn user\n document.querySelector(\"#error\").innerHTML = \"Username already taken\";\n }\n }\n };\n // XML Http Request\n xhttp.open(\"GET\", \"/api/username/\"+document.querySelector(\"input\").value, true);\n xhttp.send();\n}", "function existeUser() {\n if (xmlhttp) {\n var valor = document.getElementById(\"nickname\");\n //var valor1=document.getElementById(\"mail\");\n xmlhttp.open(\"POST\", \"cheqUserAjax\", true);\n xmlhttp.onreadystatechange = handleServletPost;\n xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');\n xmlhttp.send(\"op=\" + valor.name + \"&usermail=\" + valor.value);\n\n }\n}", "function cahnge_password_validation() {\n var old_pass = document.getElementById(\"old_pass\").value;\n var pass1 = document.getElementById(\"pass1\").value;\n var pass2 = document.getElementById(\"pass2\").value;\n\n //alert(old_pass+\"/ \"+pass1+\" /\"+pass2+\" from js alert\");return false;\n if (pass1 === \"\") {\n alert(\"Fill the password please!\");\n $(\"#pass1\").val(\"\");\n return false;\n } else if (pass1.length < 8) {\n alert(\"Password length must be atleast 8 characters\");\n $(\"#pass1\").val(\"\");\n $(\"#pass2\").val(\"\");\n return false;\n } else if (pass1.length > 15) {\n alert(\"Password length must not exceed 15 characters\");\n $(\"#pass1\").val(\"\");\n $(\"#pass2\").val(\"\");\n return false;\n } else if (pass1 != pass2) {\n alert(\"New password not matched with confirm passwprd. Try again\");\n $(\"#pass1\").val(\"\");\n $(\"#pass2\").val(\"\");\n return false;\n } else\n {\n $.ajax(\n {\n url: \"../action/calc.php?str1=\" + old_pass + \"&str2=\" + pass1 + \"&str3=\" + pass2,\n data: {\"obj\": \"2\"}, // 2 for 2 no function in php file\n success: function (result)\n {\n if (result == \"\") {\n alert(\"Password changed succesfully\");\n return true;\n } else {\n alert(result);\n return false;\n }\n }\n });\n }\n}", "function sign_in(){\r\n var uemail = $('#userl_email').val();\r\n var upass = $('#userl_pass').val();\r\n $.ajax('/users/login', \r\n {\r\n type: 'POST',\r\n data: {\r\n email : uemail,\r\n password : upass\r\n },\r\n success: function(data) \r\n {\r\n if(data.success == \"success\"){\r\n $('#login').modal('hide');\r\n location.reload();\r\n }else{\r\n alert(data.success);\r\n }\r\n } \r\n });\r\n}", "function submitChangeAccount(){\r\n\t$.fn.smartLightBox.openDivlb('profileFrame','load','Loading..');\r\n\r\n\t//disables button to prevent multiple submit\r\n\tdocument.getElementById(\"submitAccountButton\").disabled=true;\r\n\t\r\n\tvar sessionKey = $(\"#sessionKey\").val();\r\n\t\r\n\t//Account Changes\r\n\tvar strNewEmail \t= document.getElementById(\"emailNew\").value;\r\n\tvar strSecEmail\t\t= document.getElementById(\"secondaryEmail\").value;\r\n\tvar strOldPW \t\t= document.getElementById(\"passwordOld\").value;\r\n\tvar strNewPW\t \t= document.getElementById(\"passwordNew\").value;\r\n\tvar strRepeatPW\t\t= document.getElementById(\"passwordRepeat\").value;\r\n\r\n\t\r\n\t//Check if secondary e-mail has been given a value\r\n\tif(strSecEmail && strSecEmail != \"\"){\r\n\t\t//TODO: implement real-time AJAX response for format check\r\n\t\tchangeSecondaryEmail(sessionKey, strSecEmail);\r\n\t}\r\n\r\n\t//Check if primary e-mail has been given a value\r\n\tif(strNewEmail && strNewEmail != \"\"){\r\n\t\t//TODO: implement real-time AJAX response for format check\r\n\t\tchangePrimaryEmail(sessionKey, strNewEmail);\r\n\t}\r\n\r\n\t//Check if password fields have been filled\r\n\tif(strNewPW && strNewPW != \"\"){\r\n\t\tif( ( strOldPW && strOldPW != \"\" ) && (strRepeatPW && strRepeatPW != \"\") ){\r\n\t\t\t\r\n\t\t\tif(strNewPW != strRepeatPW){\r\n\t\t\t\t//TODO: implement real-time AJAX response\r\n\t\t\t\talert(\"Error: new password and repeat password does not match\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t//Initiate password change functions\r\n\t\t\t\tchangePassword(sessionKey, strOldPW, strNewPW, strRepeatPW);\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\talert(\"Error: some password fields are empty\");\r\n\t\t\tdocument.getElementById(\"submitAccountButton\").disabled=false;\r\n\t\t\treturn;\r\n\t\t}\r\n\t}\r\n\t\r\n\t$.fn.smartLightBox.closeLightBox(3000, \"profileFrame\");\r\n\t//getSearcherProfileBySessionKey(\"profileTable\", \"profileHeading\", \"fileTable\");\r\n\r\n}", "function postDisableLogin(data, textStatus, jqXHR, param) {\n\talert('The password for the user \"' + param.user + '\" was disabled.');\n}", "function checkEmailExist(email,entity_id){\n $.ajax({\n type: \"POST\",\n url: BASEURL+\"backoffice/users/checkEmailExist\",\n data: 'email=' + email +'&entity_id='+entity_id,\n cache: false,\n success: function(html) {\n if(html > 0){\n $('#EmailExist').show();\n $('#EmailExist').html(\"User is already exist with this email id!\"); \n $(':input[type=\"submit\"]').prop(\"disabled\",true);\n } else {\n $('#EmailExist').html(\"\");\n $('#EmailExist').hide(); \n $(':input[type=\"submit\"]').prop(\"disabled\",false);\n }\n },\n error: function(XMLHttpRequest, textStatus, errorThrown) { \n $('#EmailExist').show();\n $('#EmailExist').html(errorThrown);\n }\n });\n}", "function checkUsername()\r\n{\r\n var username = document.getElementById(\"userBox\").value;\r\n if(username != \"\") {\r\n \t$.ajax({\r\n \t type: 'POST',\r\n \t url: 'DBFuncs.php',\r\n \t data: { functionName:'checkUsernameReg',argument:[username] },\r\n\t success: function (response){\r\n \t if(response == 0) {\r\n\t \t document.getElementById(\"userMessage\").innerHTML=\"Username is already in use\";\r\n\t }\r\n else {\r\n\t \t document.getElementById(\"userMessage\").innerHTML=\"Username is avaliable\";\r\n\t }\r\n\t }\r\n\t});\r\n }\r\n}", "function newUsernameAjaxValidator() {\n\t\t\t//console.log(\"Executing test ajax function\");\n\t\t\tvar xmlhttp;\n\t\t\tif (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari\n\t\t\t\txmlhttp=new XMLHttpRequest();\n\t\t\t}\n\t\t\telse {// code for IE6, IE5\n\t\t\t\txmlhttp=new ActiveXObject(\"Microsoft.XMLHTTP\");\n\t\t\t}\n\t\t\t//console.log(\"xml request created\");\n\t\t\txmlhttp.onreadystatechange=function() {\n\t\t\t\t//console.log(\"ready state changed\");\n\t\t\t\tif (xmlhttp.readyState==4) {\n\t\t\t\t\tif (xmlhttp.responseText == 1) {\n\t\t\t\t\t\tdocument.getElementById('newusernamemessage').innerHTML = \"Successful !!!\";\n\t\t\t\t\t\tdocument.getElementById('newUserName').submit();\t\t//8888888888888888\tNew username created , so log the new user in \n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t//document.getElementById('usernamemessage').innerHTML = xmlhttp.responseText;\n\t\t\t\t\t\tdocument.getElementById('newusernamemessage').innerHTML = \"Username already exists !!!\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\txmlhttp.open(\"POST\",\"newUsernameValidator.php\",true);\n\t\t\t//console.log(\"POST method set\");\n\t\t\txmlhttp.setRequestHeader(\"Content-type\",\"application/x-www-form-urlencoded\");\n\t\t\t//console.log(\"request header set\");\n\t\t\t//console.log(document.getElementById('newusername').value);\n\t\t\txmlhttp.send(\"username=\" + document.getElementById('newusername').value);\n\t\t\t//console.log(\"request sent\");\n\t\t\t\n\t\t}", "function resetpass() {\n\n var email = document.getElementById(\"resetpass\").value;\n\n $.post('server/resetpassword.php', { user_email: email }, function(data, status) {\n var json_data = JSON.parse(data)\n\n if (json_data.status == 1) {\n if (json_data.email_sent == 1) {\n $(document).Toasts('create', {\n class: 'bg-success',\n title: 'Succes!',\n subtitle: '',\n body: 'Instructiunile pentru resetarea parolei au fost trimise la adresa de email introdusa!'\n });\n } else if (json_data.registered_email == 0) {\n $(document).Toasts('create', {\n class: 'bg-warning',\n title: 'Atentie!',\n subtitle: '',\n body: 'Adresa de email introdusa nu este asociata unui cont!'\n });\n }\n } else {\n $(document).Toasts('create', {\n class: 'bg-danger',\n title: 'Eroare!',\n subtitle: '',\n body: 'A aparut o eroare, va rugam reincercati!'\n });\n }\n })\n}", "forgotPassword(data) {\n return this.post('forgot/password', data);\n }", "function Login() {\n $(\"#login-button\").fadeOut(0);\n $.ajax({\n url: \"/Account/Login?email_login=\" + $(\"#email\").val() + \"&password_login=\" + $(\"#password_login\").val() + \"&rememberMe=\" + $(\"#rememberMe\").is(\":checked\") + \"\",\n type: 'GET',\n cache: false,\n success: function (result) {\n if (result == true) {\n if (view == \"editor\") {\n $(\"#account-floating-div,#login-hidden,#login-register-div\").fadeToggle(200); $(\".overall-mask\").fadeOut(200); isLogin = true;\n }\n else {\n window.location.href = '/Profil';\n }\n }\n else {\n $(\"#login-loading\").hide();\n $(\"#login-alert-label\").slideDown(100);\n $(\"#login-alert-label\").text(\"Giriş başarısız. Lütfen tekrar deneyin.\");\n $(\"#login-button\").fadeIn(0);\n }\n }\n });\n}", "function loginCallSucceeded(responseText, statusText, xhr, $form) {\r\n\r\n // hide spinner\r\n $(\".spinner\").hide();\r\n\r\n // enable for re-click\r\n $(\".main:first\").removeClass(\"workingNow\");\r\n\r\n // process the result\r\n if (statusText == \"success\") {\r\n var regexp = new RegExp(\"^([0-9a-fA-F]){32}$\");\r\n if (regexp.test(responseText)) {\r\n\r\n // copy email to other form\r\n var email = $(\"#userEmail\").attr(\"value\");\r\n email = $.trim(email);\r\n email = email.toLowerCase();\r\n $(\"#userEmail2\").attr(\"value\", email);\r\n\r\n // copy pswd to other form\r\n var pswd = $(\"#userPassword\").attr(\"value\");\r\n $(\"#userPassword2\").attr(\"value\", pswd);\r\n\r\n // post the aspx form\r\n document.getElementById('submitButton').click();\r\n\r\n return;\r\n }\r\n else {\r\n var errorStripDiv = $(\".errorStrip\");\r\n var errorTextDiv = errorStripDiv.find(\".errorText\");\r\n showError(responseText, errorStripDiv, errorTextDiv);\r\n }\r\n }\r\n else {\r\n singleActionCallFailed();\r\n }\r\n}", "function find_password(){\r\n $(\"#find-password-button\").addClass(\"disabled\");\r\n $(\"#find-password-hint\").html('').hide();\r\n var csrf = $(\"#other-csrf\").val();\r\n if(csrf == ''){\r\n $(\"#find-password-button\").removeClass(\"disabled\");\r\n csrf_empty();\r\n }\r\n var hint_html = '';\r\n var email = $(\"#find-password-email\").val();\r\n if(email == '') {\r\n hint_html += (hint_html == '' ? '请填写邮箱!' : '<BR>请填写邮箱!');\r\n }else {\r\n var ret_check = check_mail(email);\r\n if(! ret_check){\r\n hint_html += (hint_html == '' ? '邮箱格式错误!' : '<BR>邮箱格式错误!');\r\n }\r\n }\r\n var pincode = $(\"#find-password-pincode\").val();\r\n if(pincode == ''){\r\n hint_html += (hint_html == '' ? '请填写验证码!' : '<BR>请填写验证码!');\r\n }\r\n if(hint_html != ''){\r\n $(\"#find-password-hint\").html(hint_html).fadeIn();\r\n $(\"#find-password-button\").removeClass(\"disabled\");\r\n return 0;\r\n }\r\n $(\"#find-password-button\").html(\"处理中...\");\r\n $.post(BASE_PATH + 'user/send_find_password_email', {'other_token': $(\"#other-csrf\").val(), \r\n 'email':email, 'pincode': pincode}, function(result){\r\n if(result.code != 1700){\r\n $(\"#find-password-hint\").html('发生错误(' + result.code + '):' + result.msg + ' 稍后重试!').fadeIn();\r\n $(\"#find-password-button\").removeClass(\"disabled\");\r\n $(\"#find-password-pincode-img\").click();\r\n }else {\r\n $(\"#find-password-form\").hide();\r\n $(\"#find-password-hint\").removeClass(\"alert-danger\");\r\n $(\"#find-password-hint\").addClass(\"alert-success\");\r\n $(\"#find-password-hint\").html('<p><span class=\"glyphicon glyphicon-ok\"></span><span>&nbsp;已向' + email + '发送密码重设邮件,请访问邮件中给出的网页链接地址,根据页面提示完成密码重设。</span></p>').fadeIn();\r\n $(\".panel-footer-find-password\").hide();\r\n }\r\n $(\"#find-password-button\").html(\"提交\");\r\n }, 'json');\r\n}", "function fnc_login_info(){\n\tvar user_name = escape(document.getElementById('user_name').value);\t\t\n\tvar user_password = escape(document.getElementById('user_password').value);\t\n\t\tvar remember = escape(document.getElementById('remember').value);\t\n\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t$(\"#messagebox\").removeClass().addClass('messagebox').text('Validating....').fadeIn(1000);\n\t\n\t if( $('#user_name').val() == \"\" ) {\t\t\t\t\t\t\n\t\t$(\"#messagebox\").fadeTo(200,0.1,function() { //start fading the messagebox\n\t\t\t$('#user_name').focus();\n\t\t\t$(this).html('Please Enter User Name').addClass('messageboxerror').fadeTo(900,1);\n\t\t});\t\t\n\t}\n\telse if( $('#user_password').val() == 0 ) {\t\t\t\t\t\t\n\t\t$(\"#messagebox\").fadeTo(200,0.1,function() { //start fading the messagebox\n\t\t\t$('#apparel_type').focus();\n\t\t\t$(this).html('Please Enter Password').addClass('messageboxerror').fadeTo(900,1);\n\t\t});\t\t\n\t}\n\t\n\telse{\t\t\t\t\t\n\t\tnocache = Math.random();\n\t\thttp.open('get','save_update_common.php?action=login_details&user_name='+user_name+\n\t\t\t\t\t'&user_password='+user_password+'&remember='+remember\t);\n\t\thttp.onreadystatechange = loginReply_info;\n\t\thttp.send(null); \n\t}\n}", "function stateChanged() { \nif (xmlHttp.readyState==4 || xmlHttp.readyState==\"complete\") { \nvar passStatus = xmlHttp.responseText;\n\n//alert(passStatus);\n\nif(passStatus == 1) {\n txt.innerHTML= '<span class=\"errors\">The User Name is already taken</span>';\n id2.focus(); \n return false;\n}\n\nif(passStatus == 2) {\ndocument.form1.submit();\n}\n\n\n//end of complete\n} \n\n//end state change function\n}", "function login() {\n $.ajax({\n url: \"http://localhost:9035/login\",\n type: \"POST\",\n data: {\n username: $(\"#username\").val(),\n password: $(\"#password\").val()\n },\n\n success: function (result) {\n\n\n //if user enters a wrong username or password, notify them\n if (result === \"Wrong username or password.\") {\n $(\"#wrong\").text(result);\n }\n\n //if username and password are correct, redirect to homepage\n else {\n window.location.replace(\"/profile\");\n\n }\n\n\n },\n error: function (err) {\n console.log(\"error\" + err)\n\n }\n\n })\n}", "function loginUser() {\r\n let email = $('#login-email').val();\r\n let password = $('#login-password').val();\r\n\r\n if(email == null || password == null) {\r\n alert(\"Form cannot be empty\");\r\n }\r\n else {\r\n $.get(address + ':3000/login-user', {email: email, password: password}, function(data) {\r\n if(data.email) {\r\n $.get(address + ':3001/assign-session', {data: data}, function(data2) {\r\n alert(\"Login Success\");\r\n window.location.replace(address + \":3001/\");\r\n });\r\n }\r\n else {\r\n alert(\"Incorrect Credential\");\r\n }\r\n });\r\n }\r\n}", "function forgotPasswordRequest() {\n var Email = $(\"#Email\");\n var Mobile = $(\"#Mobile\");\n\n Email.removeClass('input-error');\n Mobile.removeClass('input-error');\n var inputError = false;\n var errorMsg = \"\"; \n\n if (Email.val() == \"\") {\n var inputError = true;\n errorMsg = \"<span style='color:red'>Please input all the filed(s) in red!</span>\";\n Email.addClass('input-error');\n $(\"#response\").html(errorMsg);\n }\n\n if (Mobile.val() == \"\") {\n var inputError = true;\n errorMsg = \"<span style='color:red'>Please input all the field(s) in red!</span>\";\n Mobile.addClass('input-error');\n $(\"#response\").html(errorMsg);\n }\n\n if (inputError == false) {\n errorMsg = \"\";\n $.post(\"includes/forgot_password.php\", {\n Email: Email.val(), \n Mobile: Mobile.val()\n }, function (data) {\n $(\"#response\").html(data);\n //TODO need to continue after uploading on a webserver\n } \n ); \n }\n}", "function check_username(str,field_name,id){\n\tvar eid =\"#\"+field_name;\n\t$.ajax({\n\t\t\t type: 'POST',\n\t\t\t url: ADMINSITEURL+\"ajax/check_username\",\n\t\t\t data: {st:str,bid:id},\n\t\t\t success: function(response) {\n\t\t\t \tif(!response.status){\n\t\t\t \t\t//alert(eid);\n\t\t\t \t\t$(eid).val('');\n\t\t\t \t\t$(eid).after(\"<span class='form-error' style='color:red;'>\"+response.message+\"</span>\");\n\t\t\t \t}\n\n\t\t\t }\n\t\t })\n}", "function checkValidToken() {\n $('form#reset-token').submit(function(e) {\n e.preventDefault()\n e.stopImmediatePropagation();\n var userResetToken = $('#user-reset-token');\n $.ajax({\n url: \"process/ajaxHandler.php\",\n method: \"POST\",\n dataType: \"JSON\",\n data: {\n action: \"checkToken\",\n userToken: userResetToken.val()\n },\n success: function(response) {\n if (response.status == \"success\") {\n $('form#reset-token').remove();\n $('#container').append(response.passForm)\n $('input#user-reset-pass').focus();\n resetPass();\n } else if (response.status == \"error\") {\n alert(response.description)\n }\n }\n })\n })\n}", "function login() {\n var usr = $('#usr').val();\n var pwd = $('#pwd').val();\n if (usr != \"\" && pwd != \"\") {\n $.postJSON(phpAjax, {f: 'get_login', usr: usr, pwd: pwd}, function (json) {\n M.toast({html: json.msg, classes: 'rounded'});\n if (json.status == true) {\n $('#usr').val('');\n $('#pwd').val('');\n window.location.href = json.web;\n }\n });\n } else {\n M.toast({html: 'Todos los campos son obligatorios', classes: 'rounded'});\n }\n}", "function nickCheck(){\n\t$.ajax({\n\t\turl : `${getContextPath()}`+\"/nickCheck.do\",\n\t\ttype : \"post\",\n\t\tdataType:\"text\",\n\t\tdata : \"nickcheck=\"+$(\"#nick_name\").val(),\n\t\tsuccess:function(data){\n\t\t\t\n\t\t\tif(data === \"true\"){\n\t\t\t\t$('.nickComentColor span').removeClass('alert-green');\n\t\t\t\t$('.nickComentColor span').addClass('alert-red');\n\t\t\t\tdocument.querySelector(\".nickCheck\").innerHTML = \"사용 중 인 닉네임입니다.\";\n\t\t\t} else {\n\t\t\t\t$('.nickComentColor span').removeClass('alert-red');\n\t\t\t\t$('.nickComentColor span').addClass('alert-green');\n\t\t\t\tdocument.querySelector(\".nickCheck\").innerHTML = \"사용가능한 닉네임입니다.\";\n\t\t\t}\n\n\t\t},\n\t\terror:function(request,status,error){\n\t\t\t\n\t\t}\n\t\t\n\t});\n}", "function recoverpass() {\n\n // var new_pass = document.getElementById(\"recoverpass\").value\n\n $.post('server/newpassword.php', { code: getQueryVariable(\"code\"), user_password: new_pass }, function(data, status) {\n var json_data = JSON.parse(data)\n if (json_data.status == 1) {\n if (json_data.password_reset == 1) {\n $(document).Toasts('create', {\n class: 'bg-success',\n title: 'Succes!',\n subtitle: '',\n body: 'Parola a fost schimbata, veti fi redirectionat catre pagina de login!'\n });\n setTimeout(function() { window.location.href = '/login.php'; }, 3000);\n } else if (json_data.correct_code == 0) {\n $(document).Toasts('create', {\n class: 'bg-danger',\n title: 'Eroare!',\n subtitle: '',\n body: 'Acest link de resetare a expirat sau este incorect!'\n });\n }\n } else {\n $(document).Toasts('create', {\n class: 'bg-danger',\n title: 'Eroare!',\n subtitle: '',\n body: 'A aparut o eroare, va rugam reincercati!'\n });\n }\n })\n\n\n}", "function getLoginForm() {\n $.ajax({\n type: \"POST\",\n url: \"Controllers/controller.User.php\",\n data: {locate: \"GetLoginForm\"}\n })\n .done(function(msg) {\n $(\"#loginsubscribefroms\").html(msg);\n });\n\n}", "function createUser(){\n $('.signup-btn').hide();\n var fname= $('#sfname').val();\n var lname= $('#slname').val();\n var email= $('#semail').val();\n var usertype = $('#susertype').val();\n var password = $('#spassword').val();\n var password1 = $('#srepassword').val();\n //console.log(fname);\n $.ajax(\n {\n url: g_url+\"accounts/signup.php\",\n type:\"POST\",\n data:\n {\n mode:'signup',\n fname:fname,\n lname:lname,\n email:email,\n usertype:usertype,\n password:password,\n },\n success: function()\n {\n location.reload();\n },\n error: function()\n {\n $('.signup-form-message').html(\"Some unknown error occurred. Please try again\");\n }\n });\n}", "function change_password() {\n\tvar current_password = document.getElementById(\"current_password\").value;\n\tvar new_password = document.getElementById(\"new_password\").value;\n\tvar confirm_new_passord = document.getElementById(\"confirm_new_password\").value;\n\t\n\t// Check validity of given passwords\n\tif(new_password != confirm_new_passord) {\n\t\talert(\"Passwords do not match\");\n\t\treturn;\n\t} else if(new_password.length < 8) {\n\t\talert(\"New password is too short\");\n\t\treturn;\n\t}\n\tvar data = JSON.stringify({\n\t\tcurrent_password : current_password,\n\t\tnew_password : new_password\n\t});\n\tvar uri = getLink(\"UpdatePassword\");\n\t\n\tvar xhr = createRequest(\"POST\", uri);\n\txhr.setRequestHeader(\"Content-Type\", \"text/plain\")\n\txhr.onload = function() {\n\t\tif(xhr.status == 401) alert(\"Current password incorrect\");\n\t\telse if(xhr.status != 200) alert(\"Something went wrong on the server :/\");\n\t\telse {\n\t\t\tdocument.getElementById(\"current_password\").value = \"\";\n\t\t\tdocument.getElementById(\"new_password\").value = \"\";\n\t\t\tdocument.getElementById(\"confirm_new_password\").value = \"\";\n\t\t\talert(\"Password successfully changed!\");\n\t\t}\n\t}\n\txhr.send(data);\n\t\n}", "function usernameSubmitForm () {\n // get the form as a dom js element. Used for the validation.\n user_form_element = document.getElementById('user_form');\n\n // VALIDATE FORM\n // - RETURN (exit function) IF THE FORM IS INCOMPLETE\n if (user_form_element.username.value===\"\") {\n console.log('no username present')\n return false;\n } else if (user_form_element.password.value===\"\") {\n console.log('no password present')\n return false;\n } \n \n // make an asychronous request to the url:\n // https://user.tjhsst.edu/pckosek/submit_userpass?username=1423&password=foobar\n $.ajax({\n url: \"submit_userpass\", // goes to https://user.tjhsst.edu/pckosek/submit_userpass\n type: \"GET\", // specify that this is going to be a get request\n data: $('#user_form').serialize(), // this line uses jQuery to extract from the form a string like: username=1423&password=foobar\n success: function(response) {\n // the function we are in is called when the server responds with data\n console.log(response); \n } \n }); \n \n}", "function ajaxCall(dataToServer, dataToChange) {\n $.ajax({\n url: 'updateAssignedUser',\n type: 'POST',\n dataType: 'json',\n data: dataToServer,\n success: function(dataToServer){\n if(dataToServer.isValid) {\n dataToChange.html(dataToServer.username);\n } else {\n alert('Please enter a registered Jonrah user');\n }\n }\n });\n}", "function LoginAjaxMethod() {\n var Myuser = $(\"#UsernameLogin\").val();\n var Mypwd1 = $(\"#PasswornOneLogin\").val();\n var Mypwd2 = $(\"#PasswordTwoLogin\").val();\n $.ajax({\n type: \"POST\",\n url: \"Login.aspx/LoginMethod\",\n data: \"{user: '\"+ Myuser +\"', pwd1: '\"+Mypwd1+\"', pwd2: '\"+Mypwd2+\"'}\",\n dataType: \"json\",\n contentType: \"application/json; charset=utf-8\",\n success: function (response) {\n window.location = \"Dashboard.aspx\";\n },\n error: function () {\n if (Myuser == \"\") {\n $('.ShowMsg').text(\"Username is Empty\");\n $('.ShowMsg').css({ 'color': 'red', 'font-weight': 'bold', 'margin-top': '-15px', 'margin-bottom': '20px', 'font-size': '15px' });\n $('.ShowMsg').addClass('animated shake');\n return false;\n }\n else if (Mypwd1 == \"\") {\n $('.ShowMsg').text(\"Password 1 is Empty\");\n $('.ShowMsg').css({ 'color': 'red', 'font-weight': 'bold', 'margin-top': '-15px', 'margin-bottom': '20px', 'font-size': '15px' });\n $('.ShowMsg').addClass('animated shake');\n return false;\n }\n else if (Mypwd2 == \"\") {\n $('.ShowMsg').text(\"Password 2 is Empty\");\n $('.ShowMsg').css({ 'color': 'red', 'font-weight': 'bold', 'margin-top': '-15px', 'margin-bottom': '20px', 'font-size': '15px' });\n $('.ShowMsg').addClass('animated shake');\n return false;\n }\n else\n {\n $('.ShowMsg').hide();\n $('#ErrorMsg').text(\"Username or Password is incorrect\");\n }\n }\n });\n}", "checkUsername(username, email, for_user_id) {\n\n return Nilavu.ajax('/users/check_email', {\n data: {\n username,\n email,\n for_user_id\n }\n });\n }", "function sendPasswordChangeRequest(evt){\r\n\t$(\"#sendButton\").attr(\"disabled\", true);\r\n\t$(\"#statusText\").removeClass(\"errorTag\");\t\r\n\t$(\"#statusText\").removeClass(\"successTag\");\r\n\tvar strEmail = $(\"#emailInput\").val();\r\n\t\r\n\tvar xmlHttpReq;\r\n\tif (window.XMLHttpRequest){\r\n\t\t// Firefox, Chrome, Opera, Safari\r\n\t\txmlHttpReq = new XMLHttpRequest();\r\n\t}\r\n\telse{\r\n\t\t// IE\r\n\t\txmlHttpReq = new ActiveXObject(\"Microsoft.XMLHTTP\");\r\n\t}\r\n\t \r\n\txmlHttpReq.onreadystatechange = function(){\r\n\t\tif (xmlHttpReq.readyState == 4 && xmlHttpReq.status == 200){\r\n\t\t\t$(\"#sendButton\").removeAttr(\"disabled\");\r\n\t\t\t//parse XML response from server\r\n\t\t\tvar responseText = parseForgetPasswordResponse(xmlHttpReq.responseXML);\r\n\t \t$(\"#statusText\").text(responseText);\r\n\t\t}\r\n\t};\r\n\r\n\trequest = new Request;\r\n\trequest.addAction(\"requestForgetPassword\");\r\n\trequest.addParam(\"email\", strEmail);\r\n\r\n\t//send the request to servlet\r\n\txmlHttpReq.open(\"POST\",\"../ServletAccount\", true);\r\n\txmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');\r\n\txmlHttpReq.send(request.toString());\r\n\t\r\n\t//update status text\r\n\t$(\"#statusText\").text(\"Processing...This may take a moment.\");\r\n}", "function modify_user() {\n\t//event.preventDefault();\n\t\n\tvar request = new Object();\n\trequest.old_password = $(\"#modify-user-old-password\").val();\n\trequest.new_password = $(\"#modify-user-new-password\").val();\n\trequest.cf_new_password = $(\"#modify-user-cf-new-password\").val();\n\trequest.username = $.cookie(\"username\");\n\t\t\t\n\tvar password_valid = ((request.new_password != \"\") && (request.new_password === request.cf_new_password)); \n\tif (!password_valid) alert(\"Please make sure you have entered your new password correctly.\");\n\t\n\t//AJAX - modify user\n\tif (password_valid) {\n\t\t$.ajax({\n\t\t\turl: \"http://www.flashyapp.com/api/user/modify\",\n\t\t\tdata: JSON.stringify(request),\n\t\t\tcontentType: \"application/json\",\n\t\t\ttype: \"POST\",\n\t\t\tdataType: \"json\",\n\t\t\tsuccess: function(json) { \n\t\t\t\tif (json.error == 0) { \n\t\t\t\t\talert(\"Password changed successfully.\");\n\t\t\t\t\tlocation.reload();\n\t\t\t\t}\n\t\t\t\telse if (json.error == 101) \n\t\t\t\t\talert(\"The old password you entered was incorrect. Please try again.\");\n\t\t\t},\n\t\t\terror: function(xhr, status) { \n\t\t\t\tconsole.log(xhr);\n\t\t\t\talert(\"Error handling request.\"); \n\t\t\t},\n\t\t\tcomplete: function(xhr, status) { ; }\n\t\t});\n\t}\t\n}", "function AjaxVal(e,remind,einfo,ninfo) {\n $.ajax({\n type: \"POST\",\n url: \"/Function/AajxVal?str=\" + $(e).val(),\n dataType: \"text\",\n beforeSend:function(){\n $(\"#loading\").removeClass(\"hidden\");\n },\n success: function (info) {\n $(\"#loading\").addClass(\"hidden\");\n if (\"exist\" == info)\n $(remind).html(\"<font style='color:red' size=2><span class='glyphicon glyphicon-minus-sign'></span> \" + einfo + \"</font>\");\n if (\"none\" == info)\n $(remind).html(\"<font style='color:green' size=2><span class='glyphicon glyphicon-ok'></span> \" + ninfo + \"</font>\");\n // $(\"#re_username_info\").html(info);\n }\n });\n}", "function check_pass(){\n $('#btn-pass').css('display','block');\n var pas = $(\"#act\").val();\n var action =\"check_pass\";\n var id = $(\"#user-id\").val();\n xhr = new XMLHttpRequest;\n xhr.responseType = 'json';\n var URL = \"ajax/users.php?action=\"+action+\"&id=\"+id+\"&pass=\"+pas;\n xhr.open(\"GET\",URL,true);\n xhr.send(null);\n xhr.onreadystatechange = result;\n function result(){\n if (this.readyState === 4 && this.status === 200) {\n var data = xhr.response;\n $('#alert-profil-act').html(data.result); \n $('#alert-profil-act').css('display','block');\n if(data.status == 'found'){\n $('#btn-pass').css('display','block');\n }else{\n $('#btn-pass').css('display','none');\n }\n }\n }\n}", "function changePwd(inputData){\n\t$.ajax({\n\t\ttype : \"POST\",\n\t\turl : baseUrl+'userchangepassword',\n\t\tasync : false,\n\t\tcontentType : \"application/json;\",\n\t\tdata : inputData,\n\t\tsuccess :function(data){\n\t\t\tvar err = (data.errorCode);\n\n\t\t\tif (err < 0) {\n\t\t\t\t$('div.message').fadeIn();\n\t\t\t\t$('div.message').text(data.errorMessage);\n\t\t\t\t$('div.message').removeClass(\"alert-success\");\n\t\t\t\t$('div.message').addClass(\"alert-danger\");\n\t\t\t\tsetTimeout(function()\n\t\t\t\t{\n\t\t\t\t\t$('div.message').fadeOut(1000);\n\t\t\t\t}, 600);\n\t\t\t\t//alert('error');\n\t\t\t\tconsole.log(data);\n\t\t\t\tconsole.log(data.errorMessage);\n\t\t\t\t\t\t}\n\t\t\telse{\n\t\t\t\t $('div.message').fadeIn();\n\t\t\t\t $('div.message').text(data.notification);\n\t\t\t\t $('div.message').removeClass(\"alert-danger\");\n\t\t\t\t\t $('div.message').addClass(\"alert-success\");\n\t\t\t\t console.log(data.errorMessage);\n\t\t\t\t setTimeout(function()\n\t\t\t\t{\n\t\t\t\t\t$('div.message').fadeOut();\n\t\t\t\t\tlocation.reload();\n\n\t\t\t\t}, 600);\n\t\t\t\t}\n\t\t\t\tif(err==-3)\n\t\t\t\t{\n\t\t\t\t\t setTimeout(function()\n\t\t\t\t\t{\n\t\t\t\t\t\twindow.location.href = \"logout.html\";\n\t\t\t\t\t}, 500);\n\t\t\t\t}\n\t\t\t},\n\t\t\terror :function(data){\n\t\t\t\t$('div.message').fadeIn();\n\t\t\t\t$('div.message').text('Something wrong with the connection!!!Pleace check the connection and try again');\n\t\t\t\t$('div.message').removeClass(\"alert-success\");\n\t\t\t\t$('div.message').addClass(\"alert-danger\");\n\t\t\t\tsetTimeout(function()\n\t\t\t\t\t{\n\t\t\t\t\t\t$('div.message').fadeOut(1000);\n\t\t\t\t\t}, 800);\n\n\t\t\t\t// alert(\"Something went wrong\"+data);\n\t\t\tconsole.log(data);\n\t\t},\n\t\t\t});\n}", "function checkPasswordMatch() {\n\t\tvar password = $(\"#txtNewPassword\").val();\n\t\tvar confirmPassword = $(\"#txtConfirmPassword\").val();\n\n\t\tif (password != confirmPassword) {\n\t\t\t$(\"#txtConfirmPassword\").removeClass(\"border-success\");\n\t\t\t$(\"#txtConfirmPassword\").addClass(\"border-danger\");\n\t\t\t$(\"#divCheckPasswordMatch\").html(\"<i><small class='text-danger'>Password Harus Sama</small></i>\");\n\t\t\t$('#tbhUser').prop('disabled', true);\n\t\t} else {\n\t\t\t$(\"#txtConfirmPassword\").removeClass(\"border-danger\");\n\t\t\t$(\"#txtConfirmPassword\").addClass(\"border-success\");\n\t\t\t$(\"#divCheckPasswordMatch\").html(\"<i><small class='text-success'>Password Cocok</small></i>\");\n\t\t\t$('#tbhUser').prop('disabled', false);\n\t\t}\n\t}", "function resetUserPwd(username) {\r\n\tvar userId = $(\"#userIdRP\").val();\r\n\tvar email = $(\"#emailRP\").text();\r\n\tif (userId == \"0\") {\r\n\t\t$.modal.alert(strings['script.trySearch']);\r\n\t} else {\r\n\t\t$.modal.confirm(strings['msg.rp.confirm'] + username + \"?\", function() {\r\n\t\t\tblockUI();\r\n\t\t\t$.ajax({\r\n\t\t\t\ttype : \"GET\",\r\n\t\t\t\turl : \"resetUserPassword.do\",\r\n\t\t\t\tdata : \"username=\" + username + \"&email=\" + email,\r\n\t\t\t\tdataType : 'json',\r\n\t\t\t\tcache : false,\r\n\t\t\t\tsuccess : function(data) {\r\n\t\t\t\t\tunblockUI();\r\n\t\t\t\t\tif (data != null && data.resetPwdFlag == \"1\") {\r\n\t\t\t\t\t\t$(\"#passwordResetStatusMsgRP\").html(\"<span>\"+strings['msg.rp.success']+\"</span>\");\r\n\t\t\t\t\t\t$(\"#statusUsernameRP\").text(username);\r\n\t\t\t\t\t\tif (data.sendEmailFlag == \"1\") {\r\n\t\t\t\t\t\t\t$(\"#statusEmailRP\").html(\"<span style=\\\"color: green\\\">\"+strings['msg.rp.email.success']+\"</span>\");\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$(\"#statusEmailRP\").html(\"<span style=\\\"color: red\\\">\"+strings['msg.rp.email.failure']+\"</span>\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$(\"#passwordResetStatusRP\").attr(\"class\", \"wizard-fieldset fields-list\");\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$(\"#passwordResetStatusRP\").attr(\"class\", \"wizard-fieldset fields-list hidden\");\r\n\t\t\t\t\t\t$.modal.alert(strings['script.parent.passwordResetError']);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$('#userSearchRP').val(username);\r\n\t\t\t\t},\r\n\t\t\t\terror : function(data) {\r\n\t\t\t\t\tunblockUI();\r\n\t\t\t\t\t$.modal.alert(strings['script.parent.passwordResetError']);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}, function() {\r\n\t\t\t// this function closes the confirm modal on clicking cancel button\r\n\t\t});\r\n\t}\r\n}", "function resetPass() {\n\n var oldPass = document.getElementById(\"oldpass\").value;\n var newPass = document.getElementById(\"newpass\").value;\n\n var xml = createChangePasswordSoapMessage(username, password,oldPassword);\n\n var soapMessage = createLoginSoapMessage(username, password);\n $\n .ajax(\n {\n url: serverUrl,\n dataType: \"xml\",\n //dataType: 'json',\n type: \"POST\",\n async: false,\n contentType: \"text/xml;charset=utf-8\",\n headers: {\n \"SOAPAction\": \"http://tempuri.org/IService1/authenticate\"\n },\n crossDomain: true,\n data: soapMessage,\n timeout: 30000 //30 seconds timeout\n }).done(function (data) {\n if (data != null) {\n var json = xmlToJson(data);\n var jsonObject = JSON.parse(json);\n var approveCode = jsonObject[\"APPRV\"];\n if (approveCode == 0) {\n // Go To Main Page\n }\n else if (approveCode == 1) {\n\n //Go To Change Password\n }\n else {\n navigator.notification.alert(jsonObject[\"REASON\"]);\n }\n\n }\n\n }).fail(function (jqXHR, textStatus, thrownError) {\n console.log('login failed: ' + thrownError);\n var returnObject = {};\n returnObject.errorCode = 2;\n localStorage.setItem(\"errorCode\", returnObject.errorCode);\n });\n\n}", "function onSaveNewPassWordClick() {\n let vNewPassword = {\n password: $('#inp-new-password').val().trim(),\n };\n if (vNewPassword.password == '') {\n $('#modal-error').modal('show');\n $('#error').text(`Cần nhập mật khẩu để thay đổi`);\n } else {\n $.ajax({\n url: `${G_BASE_URL}/admin/change-password/customers/${gCustomerId}`,\n method: `put`,\n data: JSON.stringify(vNewPassword),\n headers: {\n Authorization: `Token ${gUserToken}`,\n },\n contentType: `application/json; charset=utf-8`,\n success: (res) => {\n $('#modal-success').modal('show');\n $('#success').text(`Đã thay đổi password cho user thành công`);\n getCustomerData(3);\n $('#inp-new-password').val('');\n $('#modal-update-password').modal('hide');\n },\n error: (e) => {\n $('#modal-error').modal('show');\n $('#error').text(`Bạn không có quyền thực hiện thao tác này`);\n },\n });\n }\n }", "function loginCheck(username, password) {\n var msg = \"\";\n $.ajax({\n url: 'checkLogin.php',\n type: 'post',\n data: {\n email: username,\n pass: password\n },\n success: function(response) {\n\n response = $.trim(response);\n if (response == \"1\") {\n $(\".loader\").delay(1000).fadeOut(500, function() {\n window.location.href = \"homepage.php\";\n });\n } else {\n msg = \"Invalid Username or password!\";\n $(\"#email\").val(\"\");\n $(\"#pwd\").val(\"\");\n $(\"#errormsg\").text(msg);\n $(\"#loading_\").hide();\n }\n }\n });\n }", "function updatePwd() {\n $.post('/userTools/updatePwd', $('#updatePwd').serialize(), function(data, status) {\n $.notify({\n title: '<strong>Success!</strong>',\n message: data.message,\n icon: '/images/kip.gif'\n },{\n icon_type: 'image',\n type: 'success',\n });\n $('#changePwd').modal('hide');\n }).fail(function(data) {\n console.log(data);\n $('#warning').html('<strong>Warning!</strong> ' + data.responseJSON.message).show();\n })\n}", "function reset_password_form() {\n\t// Encode the String\n\tvar encoded_string = Base64.encode('login/reset_password/');\n\tvar encoded_val = encoded_string.strtr(encode_chars_obj);\n\t\n\tvar encoded_login_string = Base64.encode('login/index/');\n\tvar encoded_login_val = encoded_login_string.strtr(encode_chars_obj);\n\t\n\tvar success_msg = 'Successful';\n\tvar failure_msg = 'Failed';\n\t\n\tvar ajaxData = $(\"#resetForm\").serialize();\t\n\t\t$.ajax({\n\t\turl: base_url + encoded_val,\n\t\tdataType: \"json\",\n\t\ttype: \"post\",\n\t\tdata: ajaxData,\t\n\t\tbeforeSend: function() {\n $('.uni_wrapper').addClass('loadingDiv');\t\t\n },\t\t\n\t\tsuccess: function(response) {\n\t\t $('.uni_wrapper').removeClass('loadingDiv');\n\t\t\tif(true == response.status)\n\t\t\t{\t\t\t\t\n\t\t\t\t$(\".error-message .alert\").removeClass('alert-danger');\n\t\t\t\t$(\".error-message .alert\").addClass('alert-success');\n\t\t\t\t$(\".error-message\").show();\n\t\t\t\tif(response.message)\n\t\t\t\t{\n\t\t\t\t\tsuccess_msg = response.message;\n\t\t\t\t}\n\t\t\t\t$(\".alert\").html(success_msg);\n\t\t\t\tsetTimeout(function(){\t\t\t\t\t\t \n\t\t\t\t window.location.href = base_url + encoded_login_val;\t\t\t\t\t\t \n\t\t\t\t}, 500);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$(\".error-message\").show();\n\t\t\t\tif(response.message)\n\t\t\t\t{\n\t\t\t\t\tfailure_msg = response.message;\n\t\t\t\t}\n\t\t\t\t$(\".alert\").html(failure_msg);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t});\t\n}", "function clickSignUp() {\n\tvar email = ($('.email-signup').find('input[type=email]')).val();\n\tvar password = (($('.email-signup').find('input[type=password]')).eq(0)).val();\n\tvar confirm = (($('.email-signup').find('input[type=password]')).eq(1)).val();\n\t\n\tif (password == confirm) {\n\t\t$.ajax({\n\t\t\turl: '\\/register',\n\t\t\tmethod: 'POST',\n\t\t\tdata: {email, password}\n\t\t}).done(function(jsondata) {\n\t\t\twindow.location.href = '/EditProfileHTML';\n\t\t}).fail(function (){\n\t\t\talert(\"Creation Error\");\n\t\t});\n\t}\n}", "function tryChangePassword() {\n if(typeof(changing) != 'undefined' && changing) {\n alert(\"암호 변경 중입니다.\\n잠시만 기다려주세요.\");\n\n return false;\n } // Avoid duplicate trying.\n\n changing = true;\n\n var memID = window.userData.id;\n\n if($('#txt_change_pasword_current_pw').val() == \"\" || $('#txt_change_pasword_new_pw').val() == \"\" || $('#txt_change_pasword_new_pw_re').val() == \"\") {\n alert('모든 칸을 채워주세요.');\n } else if($('#txt_change_pasword_new_pw').val() != $('#txt_change_pasword_new_pw_re').val()) {\n alert('암호와 암호 확인이 일치하지 않습니다.');\n } else {\n changePassword({\n \"memID\": encodeURI(memID),\n \"existing\": $('#txt_change_pasword_current_pw').val(),\n \"newPw\": $('#txt_change_pasword_new_pw').val()\n }, function(result) {\n delete changing;\n\n if(result.success) {\n alert(\"암호가 변경되었습니다.\\n다시 로그인해주세요.\");\n\n $.get(\"http://192.168.60.100:3000/logout\",function(data){\n if(data==='logout'){\n document.location.reload();\n }\n });\n } else {\n alert(\"암호 변경에 실패했습니다.\");\n }\n });\n }\n}", "function ajaxFunction2(){\n\t\tvar ajaxRequest; // The variable that makes Ajax possible!\n\t\n\t\ttry{\n\t\t\t// Opera 8.0+, Firefox, Safari\n\t\t\tajaxRequest = new XMLHttpRequest();\n\t\t}catch (e){\n\t\t\t// Internet Explorer Browsers\n\t\t\ttry{\n\t\t\t\tajaxRequest = new ActiveXObject(\"Msxml2.XMLHTTP\");\n\t\t\t}catch (e) {\n\t\t\t\ttry{\n\t\t\t\t\tajaxRequest = new ActiveXObject(\"Microsoft.XMLHTTP\");\n\t\t\t\t}catch (e){\n\t\t\t\t\t// Something went wrong\n\t\t\t\t\talert(\"Your browser broke!\");\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Create a function that will receive data \n\t\t// sent from the server and will update\n\t\t// div section in the same page.\n\t\tajaxRequest.onreadystatechange = function(){\n\t\t\tif(ajaxRequest.readyState == 4){\n\t\t\t\tif(ajaxRequest.responseText === \"success\") {\n\t\t\t\t\t// Redirect to register user if successful, meaning an account with the same email exists\n\t\t\t\t\tvar url = \"scripts/registration.php?name=\" + name + \"&email=\" + email + \"&password=\" + password;\n\t\t\t\t\tlocation.href = url;\n\t\t\t\t} else {\n\t\t\t\t\tvar ajaxDisplay = document.getElementById('ajaxDivReg');\n\t\t\t\t\tajaxDisplay.innerHTML = ajaxRequest.responseText;\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Now get the value from user and pass it to\n\t\t// server script.\n\t\tvar name = document.getElementById('name').value;\n\t\tvar email = document.getElementById('registerEmail').value;\n\t\tvar password = document.getElementById('registerPassword').value;\n\t\tvar queryString = \"?email=\" + email;\n\t\tajaxRequest.open(\"GET\", \"scripts/reg_ajax.php\" + \n\t\t\tqueryString, true);\n\t\tajaxRequest.send(null); \n}", "function reconnectUser(user, passwd)\n{\n function ev(textoresposta, codestatus) {\n //usuario digitou a senha incorreta\n if (codestatus == 403)\n alert(\"A senha está incorreta!\");\n else if (codestatus == 200)\n {\n document.getElementById(\"promptPasswd\").style.display = \"none\";\n blockInterface(false);\n } else\n alert(\"Status \" + codestatus + \"\\n\\nErro ao na tentativa de enviar a requisição de resgate de sessao!\");\n\n document.getElementById(\"passw\").value = \"\";\n document.getElementById(\"btOkReconnect\").disabled = false;\n return (codestatus == 200);\n }\n $(\"btOkReconnect\").disabled = true;\n /*Bloco de intrucoes da funcao*/\n requisitaAjax(\"./home?login=\" + user + \"&senha=\" + passwd + \"&textmode=1\", ev);\n}", "function findpassword()\n{ \n var email = $(\"#email\").val(); \n console.log(email);\n var preg = /^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*/; //匹配Email \n\n var html = \"正在提交中, 请稍等\"+\"<img src='../theme/images/account/ellipsis.gif'/>\";\n if(email=='' || !preg.test(email))\n { \n $(\"#chkmsg\").html(\"请填写正确的邮箱!\"); \n }\n else\n {\n $(\"#sub_btn\").attr(\"disabled\",\"disabled\").val('提交中..').css(\"cursor\",\"default\"); \n $(\"#chkmsg\").html(html);\n\n $.ajax({\n\t\t\turl: '../cgi/account/findpwd.php',\n\t\t\ttype: 'POST',\n\t\t\tdataType: 'text',\n\t\t\tdata: {\n\t\t\t\t\t'email': email,\n\t\t\t},\n\t\t\tsuccess: function(data)\n\t\t\t{\n\t\t\t\tvar obj = eval('(' + data + ')');\n\t\t\t\tconsole.log(obj.args);\t\n\t\t\t\tif (obj.error == \"none\")\n\t\t\t\t{\n\t\t\t\t\t//++++++++++++++ 之前的 +++++++++++++++\n\t\t\t\t\t// $(\"#chkmsg\").html(obj.args.list);\n\t\t\t\t\t// if (obj.args.param)\n\t\t\t\t\t// {\n\t\t\t\t\t// \t$(\"#sub_btn\").attr(\"disabled\",\"disabled\").val('已提交').css(\"cursor\",\"default\");\n\t\t\t\t\t// }\n\t\t\t\t\t// else\n\t\t\t\t\t// {\n\t\t\t\t\t// \t$(\"#sub_btn\").removeAttr(\"disabled\").val('再次提交').css(\"cursor\", \"pointer\");\n\t\t\t\t\t// \t$(\"#email\").val(\"\");\n\t\t\t\t\t// }\n\t\t\t\t\t// $(\"#sub_btn\").removeAttr(\"disabled\").val('已提交').css(\"cursor\",\"pointer\");\n\t\t\t\t\t// ============ 之前的 ==================\n\t\t\t\t\tif (obj.args.param)\n\t\t\t\t\t{\n\t\t\t\t\t\twindow.location.href = \"../account/resetpwd.php?code=\"+obj.args.urlcode;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$(\"#chkmsg\").html(obj.args.list);\n\t\t\t\t\t\t$(\"#sub_btn\").removeAttr(\"disabled\").val('再次提交').css(\"cursor\", \"pointer\");\n\t\t\t\t\t\t$(\"#email\").val(\"\");\n\t\t\t\t\t}\n\t\t\t\t\t// $(\"#sub_btn\").removeAttr(\"disabled\").val('已提交').css(\"cursor\",\"pointer\");\n\t\t\t\t}\t\n\t\t\t},\n\t\t\terror: function(data)\n\t\t\t{\n\t\t\t\tserverError(null);\n\t\t\t\t$(\"#sub_btn\").removeAttr(\"disabled\").val('再次提交').css(\"cursor\", \"pointer\");\n\t\t\t}\n\t\t})\n } \n}", "function register(){\n var notif = $('#regNotification');\n var data = $('#registrationform').serializeArray();\n var roll = data[0].value;\n var pass = data[1].value;\n var pass2 = data[2].value;\n var auth = data[3].value;\n var passHash = sjcl.codec.hex.fromBits(sjcl.hash.sha256.hash(pass));\n\n if(pass!=pass2){\n notif.html(\"The passwords do not match.\");\n notif.css(\"display\",\"block\");\n notif.removeClass(\"alert-info\");\n notif.removeClass(\"alert-success\");\n notif.addClass(\"alert-danger\");\n }else{\n notif.html(\"Registering voter...\")\n notif.css(\"display\",\"block\");\n notif.removeClass(\"alert-danger\");\n notif.removeClass(\"alert-success\");\n notif.addClass(\"alert-info\");\n userPassword = pass;\n $.ajax({\n type: \"POST\",\n url: \"/users/register\",\n data: $.param({\n 'roll':roll,\n 'pass':passHash,\n 'auth':auth\n }),\n cache: false,\n success: function(response){\n showLoginForm();\n $(\"#loginError\").removeClass(\"alert-danger\");\n $(\"#loginError\").addClass(\"alert-success\");\n document.getElementById(\"loginError\").style=\"display:block\";\n document.getElementById(\"loginError\").innerHTML=\"Registration successful.<br>You may now log in.\";\n },\n error: function(response){\n notif.html(response.responseText);\n notif.css(\"display\",\"block\");\n notif.removeClass(\"alert-info\");\n notif.removeClass(\"alert-success\");\n notif.addClass(\"alert-danger\");\n }\n });\n }\n}", "function signUp() {\n\n /* gathers the username and password*/\n var username = $('#sign-up-username').val();\n var password = $('#sign-up-password').val();\n /* resets the input fields */\n $('#sign-up-username').val('');\n $('#sign-up-password').val('');\n var signUpURL = 'http://web.cs.georgefox.edu/comment/ldelamotte17/user/' + username;\n\n $.ajax({\n type: 'POST', \n url: signUpURL,\n dataType: 'json',\n contentType: 'application/json',\n data: JSON.stringify({\n password: password\n }),\n crossDomain: true,\n success: function() {\n if (password.length == 0 || username.length == 0) {\n openErrorModal();\n }\n else {\n $(\"#open-sign-up-modal\").remove();\n }\n },\n error: openErrorModal\n })\n\n}", "function ajaxRegister(user, pass) {\n $.ajax({\n type: 'POST',\n url: 'account/register.php',\n data: {\n name: user,\n password: pass,\n },\n success: function(response) {\n console.log(response);\n if(response == 'valid') {\n $('nav').load('account/menu.php');\n bindMenu();\n } else {\n $('#registerName, #registerPassword').css('background-color', '#ff4141');\n $('#registerForm .nameError').html('This username has already been taken');\n }\n }\n });\n}" ]
[ "0.67950946", "0.6754989", "0.6718557", "0.66401005", "0.65080565", "0.6493332", "0.64481765", "0.64315546", "0.6399592", "0.63384277", "0.62695366", "0.6263902", "0.62500465", "0.6236251", "0.6214668", "0.62064695", "0.6189092", "0.6146866", "0.61059314", "0.60973126", "0.6058279", "0.6055569", "0.6049839", "0.60223025", "0.6021568", "0.6020123", "0.5996411", "0.5956976", "0.5927345", "0.59269583", "0.5924739", "0.5916408", "0.59153575", "0.5912073", "0.58846676", "0.5870404", "0.58668053", "0.5865107", "0.5851015", "0.58472145", "0.5846779", "0.5842637", "0.5840234", "0.58277994", "0.58228695", "0.5820784", "0.58151144", "0.5807316", "0.5792177", "0.57881725", "0.57812583", "0.5776656", "0.5770687", "0.5764315", "0.5754266", "0.5752562", "0.5750645", "0.57462823", "0.57365066", "0.5735158", "0.5734161", "0.57287437", "0.57236916", "0.57125324", "0.5699912", "0.5699754", "0.5693219", "0.56905913", "0.56902725", "0.5683379", "0.5681009", "0.5679719", "0.56689924", "0.56652516", "0.56635284", "0.5661757", "0.5658065", "0.5655335", "0.5654701", "0.5653867", "0.56491107", "0.56441534", "0.5639112", "0.5636366", "0.5627373", "0.5621488", "0.5618029", "0.5610965", "0.56039345", "0.5602915", "0.5602078", "0.55972064", "0.5596936", "0.55966926", "0.55958027", "0.5594711", "0.5590158", "0.55798703", "0.5577712", "0.55766773" ]
0.71463114
0
Ajax Call for Username and Security Question Answer Forgot Page.
function UsernameSecurityCheckAjaxMethod() { var user = $("#usernameCheck").val(); var security = $('#Securty').val(); var answer = $('#AnswerCheck').val(); $.ajax({ type: "POST", url: "Login.aspx/UsernameAndPasswordTwoCheckForgotPageMethod", data: "{userCheck: '" + user + "', security: '" + security + "', answer: '" + answer + "'}", dataType: "json", contentType: "application/json; charset=utf-8", success: function () { $('.SecurityCheck').fadeOut(function () { $('.AllisGood').fadeIn(700); }); }, error: function () { if (security == "Choose Security Question") { $('#SecurityError').text("Please select Security Question."); $('#SecurityError').css({ 'color': 'red', 'font-weight': 'bold', 'margin-top': '-15px', 'margin-bottom': '20px', 'font-size': '15px' }); $('#SecurityError').addClass('animated shake'); return false; } else if (answer == "") { $('#SecurityError').text("Please give Answer."); $('#SecurityError').css({ 'color': 'red', 'font-weight': 'bold', 'margin-top': '-15px', 'margin-bottom': '20px', 'font-size': '15px' }); $('#SecurityError').addClass('animated shake'); return false; } else $('#SecurityError').text("It is not Correct."); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function submitForgotUsername(){\n\ttry{\n\t\tvar license = $.txtfieldLicense.value;\n\t\tlicense = license.replace(/&(?!amp;)/g, '&amp;'​);\n\t var\tmail = $.txtfieldMail.value;\n\t var\temiratesid = $.txtfieldEmirateId.value.replace(/[-]/gi, \"\");\n\t Ti.API.info('emiratesid '+emiratesid);\n\t var\tmobile = $.txtfieldMobile.value.replace(/[-]/gi, \"\");\n\t var\tpassport = $.txtfieldPassport.value;\n\t passport = passport.replace(/&(?!amp;)/g, '&amp;'​);\n\t var lblEmiratesPassport;\n\t \n\tif($.imgIndividual.image === Alloy.Globals.path.radioActive){\n\t\tif(emiratesid === \"\" && passport === \"\"){\n\t\t\tutilities.showAlert(Alloy.Globals.selectedLanguage.forgotUsername,Alloy.Globals.selectedLanguage.validateHintText,function(){});\n\t\t}else if(mail === \"\"){\n\t\t \tutilities.showAlert(Alloy.Globals.selectedLanguage.forgotUsername,Alloy.Globals.selectedLanguage.mailId,function(){});\n\t\t}else if(mobile === \"\"){\n\t\t utilities.showAlert(Alloy.Globals.selectedLanguage.forgotUsername,Alloy.Globals.selectedLanguage.mobileNumber,function(){});\n\t\t}else if (emiratesid !== \"\" && emiratesid.length < 15) {\n\t\t\t$.txtfieldEmirateId.value = \"\";\n\t\t \tutilities.showAlert(Alloy.Globals.selectedLanguage.forgotUsername,Alloy.Globals.selectedLanguage.invalidEmiratesId,function(){});\n\t\t}\n\t\telse if (mobile.length !== 10 && mobile.value !== \"\") {\n\t\t \tutilities.showAlert(Alloy.Globals.selectedLanguage.forgotUsername,Alloy.Globals.selectedLanguage.mobileLength,function(){});\n\t\t}else{\n\t\t\ttry{\n\t\t\t\tlblEmiratesPassport = (emiratesid !== \"\")?emiratesid:passport;\n\t\t\t\thttpManager.forgetUsername(function(result){\n\t\t\t\tvar rootNode = result.getElementsByTagName(\"output\");\n\t\t\t\tvar ns =\"http://ForgetUserName\";\n\t\t\t\t//var subNode = result.response.getElementsByTagNameNS(\"ns1:Status\");\n\t\t\t\tif(rootNode.length > 0){\n\t\t\t\t\tvar status = result.getElementsByTagNameNS(ns, \"Status\").item(0).textContent;\n\t\t\t\t\t\n\t\t\t\t\tif(status === \"Success\"){\n\t\t\t\t\t\tAlloy.Globals.hideLoading();\n\t\t\t\t\t\tvar alertView = Ti.UI.createAlertDialog({\n\t\t\t\t\t\t\ttitle : Alloy.Globals.selectedLanguage.appTitle,\n\t\t\t\t\t\t\tmessage : (Alloy.Globals.isEnglish)?result.getElementsByTagNameNS(ns, \"Message_EN\").item(0).textContent:result.getElementsByTagNameNS(ns, \"Message_AR\").item(0).textContent,\n\t\t\t\t\t\t\tbuttonNames : [Alloy.Globals.selectedLanguage.ok]\n\t\t\t\t\t\t});\n\t\t\t\t\t\talertView.addEventListener('click', function(e) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (e.index == 0) {\n\t\t\t\t\t\t\t\tvar winMenu = Alloy.createController('UserManagement/winLogin',{\n\t\t\t\t\t\t\t\t\tisFromLeftPanel : false\n\t\t\t\t\t\t\t\t}).getView();\n\t\t\t\t\t\t\t\tAlloy.Globals.openWindow(winMenu);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\talertView.show();\n\t\t\t\t\t}else if(status === \"Failure\"){\n\t\t\t \t\t\tAlloy.Globals.hideLoading();\n\t\t\t \t\t\tvar alertView = Ti.UI.createAlertDialog({\n\t\t\t\t\t\t\t\ttitle : Alloy.Globals.selectedLanguage.appTitle,\n\t\t\t\t\t\t\t\tmessage : (Alloy.Globals.isEnglish)?result.getElementsByTagNameNS(ns, \"Message_EN\").item(0).textContent:result.getElementsByTagNameNS(ns, \"Message_AR\").item(0).textContent,\n\t\t\t\t\t\t\t\tbuttonNames : [Alloy.Globals.selectedLanguage.ok]\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\talertView.show();\n\t\t\t \t\t}\n\t\t\t\t}else{\n\t\t \t\tvar alertView = Ti.UI.createAlertDialog({\n\t\t\t\t\t\ttitle : Alloy.Globals.selectedLanguage.appTitle,\n\t\t\t\t\t\tmessage : Alloy.Globals.selectedLanguage.serviceError,\n\t\t\t\t\t\tbuttonNames : [Alloy.Globals.selectedLanguage.ok]\n\t\t\t\t });\n\t\t\t\t alertView.show();\n\t\t \t Alloy.Globals.hideLoading();\n\t\t \t}\n\t\t\t\tAlloy.Globals.hideLoading();\n\t\t\t},1,mail,mobile,lblEmiratesPassport);\n\t\t\t}catch(e){\n\t\t\t\tTi.API.info('Error '+e.message);\n\t\t\t}\n\t\t}\n\t}else if($.imgEstablishment.image === Alloy.Globals.path.radioActive){\n\t\tif(license === \"\"){\n\t\t utilities.showAlert(Alloy.Globals.selectedLanguage.forgotUsername,Alloy.Globals.selectedLanguage.licenseNumber,function(){});\n\t }else if(mail === \"\"){\n\t\t \tutilities.showAlert(Alloy.Globals.selectedLanguage.forgotUsername,Alloy.Globals.selectedLanguage.mailId,function(){});\n\t\t}else if(mobile === \"\"){\n\t\t utilities.showAlert(Alloy.Globals.selectedLanguage.forgotUsername,Alloy.Globals.selectedLanguage.mobileNumber,function(){});\n\t\t}\n\t\t// else if (isNaN(mobile)) {\n\t\t \t// utilities.showAlert(Alloy.Globals.selectedLanguage.forgotUsername,Alloy.Globals.selectedLanguage.invalidMobile,function(){});\n\t\t// }\n\t\telse if (mobile.length !== 10 && mobile.value !== \"\") {\n\t\t \tutilities.showAlert(Alloy.Globals.selectedLanguage.forgotUsername,Alloy.Globals.selectedLanguage.mobileLength,function(){});\n\t\t}else{\n\t\t\ttry{\n\t\t\t\thttpManager.forgetUsername(function(result){\n\t\t\t\tvar rootNode = result.getElementsByTagName(\"output\");\n\t\t\t\tvar ns =\"http://ForgetUserName\";\n\t\t\t\t//var subNode = result.getElementsByTagName(\"ns1:Status\");\n\t\t\t\tvar ns =\"http://ForgetUserName\";\n\t\t \tif(rootNode.length > 0){\n\t\t \t\t\t \t\t\n\t\t \t\tvar status = result.getElementsByTagNameNS(ns, \"Status\").item(0).textContent;\n\t\t \t\t\n\t\t \t\tif(status === \"Success\"){\n\t\t \t\t\t\n\t\t \t\t\tvar alert = Ti.UI.createAlertDialog({\n\t\t\t\t\t\t\ttitle : Alloy.Globals.selectedLanguage.appTitle,\n\t\t\t\t\t\t\tmessage : (Alloy.Globals.isEnglish)?result.getElementsByTagNameNS(ns, \"Message_EN\").item(0).textContent:result.getElementsByTagNameNS(ns, \"Message_AR\").item(0).textContent,\n\t\t\t\t\t\t\tbuttonNames : [Alloy.Globals.selectedLanguage.ok]\n\t\t\t\t\t\t});\n\t\t\t\t\t\talert.addEventListener('click', function(e) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (e.index == 0) {\n\t\t\t\t\t\t\t\tvar winMenu = Alloy.createController('UserManagement/winLogin',{\n\t\t\t\t\t\t\t\t\tisFromLeftPanel : false\n\t\t\t\t\t\t\t\t}).getView();\n\t\t\t\t\t\t\t\tAlloy.Globals.openWindow(winMenu);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\talert.show();\n\t\t \t\t}else if(status === \"Failure\"){\n\t\t\t \t\t\tAlloy.Globals.hideLoading();\n\t\t\t \t\t\tvar alert = Ti.UI.createAlertDialog({\n\t\t\t\t\t\t\t\ttitle : Alloy.Globals.selectedLanguage.appTitle,\n\t\t\t\t\t\t\t\tmessage : (Alloy.Globals.isEnglish)?result.getElementsByTagNameNS(ns, \"Message_EN\").item(0).textContent:result.getElementsByTagNameNS(ns, \"Message_AR\").item(0).textContent,\n\t\t\t\t\t\t\t\tbuttonNames : [Alloy.Globals.selectedLanguage.ok]\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\talert.show();\n\t\t\t \t}\n\t\t \t}else{\n\t\t \t\tvar alert = Ti.UI.createAlertDialog({\n\t\t\t\t\ttitle : Alloy.Globals.selectedLanguage.appTitle,\n\t\t\t\t\t//title:\"tset\",\n\t\t\t\t\tmessage : Alloy.Globals.selectedLanguage.serviceError,\n\t\t\t\t\tbuttonNames : [Alloy.Globals.selectedLanguage.ok]\n\t\t\t\t });\n\t\t\t\t alert.show();\n\t\t \t Alloy.Globals.hideLoading();\n\t\t \t}\n\t\t \tAlloy.Globals.hideLoading();\n\t\t\t},2,mail,mobile,license);\n\t\t\t}catch(e){\n\t\t\t\tTi.API.info('Error '+e.message);\n\t\t\t}\n\t\t}\n\t}\n\t}catch(e){\n\t\tTi.API.info('Error in submit forget data function '+JSON.stringify(e));\n\t}\n}", "function UsernameAjaxMethod() {\n var user = $(\"#usernameCheck\").val();\n $.ajax({\n type: \"POST\",\n url: \"Login.aspx/UsernameForgotPageMethod\",\n data: \"{Forgotuser: '\" + user + \"'}\",\n dataType: \"json\",\n contentType: \"application/json; charset=utf-8\",\n success: function (response) {\n $('.UsernameCheck').fadeOut(function () {\n $('.ContactCheck').fadeIn(700);\n });\n },\n error: function () {\n if (user == \"\") {\n $('#ErrorUser').text(\"Username is Empty\");\n $('#ErrorUser').css({ 'color': 'red', 'font-weight': 'bold', 'margin-top': '-15px', 'margin-bottom': '20px', 'font-size': '15px' });\n $('#ErrorUser').addClass('animated shake');\n return false;\n }\n else {\n $('#ErrorUser').text(\"Username is incorrect, if you have forgot your username, you are not able to go forward, you can contact from the Website Owner (+923159382193) regarding you account's unlock.\");\n $('#ErrorUser').css({ 'color': 'red', 'font-weight': 'bold', 'margin-top': '-15px', 'margin-bottom': '2', 'font-size': '15px' });\n $('#ErrorUser').addClass('animated shake');\n }\n }\n });\n}", "function UsernamePasswordCheckAjaxMethod() {\n var user = $(\"#usernameCheck\").val();\n var pwd1 = $('#PasswordOneCheck').val();\n $.ajax({\n type: \"POST\",\n url: \"Login.aspx/UsernameAndPasswordOneCheckForgotPageMethod\",\n data: \"{userCheck:'\" + user + \"', pwdCheck:'\" + pwd1 + \"'}\",\n dataType: \"json\",\n contentType: \"application/json; charset=utf-8\",\n success: function () {\n $('.ContactCheck').fadeOut(function () {\n $('.AllisGood').fadeIn(700);\n });\n },\n error: function () {\n if(pwd1 == \"\")\n {\n $('#ErrorPwd1').text(\"Password is Empty\");\n $('#ErrorPwd1').css({ 'color': 'red', 'font-weight': 'bold', 'margin-top': '-15px', 'margin-bottom': '20px', 'font-size': '15px' });\n $('#ErrorPwd1').addClass('animated shake');\n return false;\n }\n else\n $('#ErrorPwd1').text(\"Password is Incorrect\");\n }\n });\n}", "function UsernamePasswordTwoCheckAjaxMethod() {\n var user = $(\"#usernameCheck\").val();\n var pwdTwo = $(\"#PasswordTwoCheck\").val();\n $.ajax({\n type: \"POST\",\n url: \"Login.aspx/UsernameAndPasswordTwoCheckForgotPageMethodAjax\",\n data: \"{userCheck:'\" + user + \"', pwdCheck:'\" + pwdTwo + \"'}\",\n dataType: \"json\",\n contentType: \"application/json; charset=utf-8\",\n success: function () {\n $('.PasswordCheck').fadeOut(function () {\n $('.AllisGood').fadeIn(700);\n });\n },\n error: function () {\n if (pwdTwo == \"\") {\n $('#ErrorPwd2').text(\"Password is Empty\");\n $('#ErrorPwd2').css({ 'color': 'red', 'font-weight': 'bold', 'margin-top': '-15px', 'margin-bottom': '20px', 'font-size': '15px' });\n $('#ErrorPwd2').addClass('animated shake');\n return false;\n }\n else\n $('#ErrorPwd2').text(\"Password is Incorrect\");\n }\n });\n}", "function vpb_request_password_link()\n{\n\tvar ue_data = $(\"#ue_data\").val();\n\t\n\tif(ue_data == \"\")\n\t{\n\t\t$(\"#ue_data\").focus();\n\t\t$(\"#this_page_errors\").html('<div class=\"vwarning\">'+$(\"#empty_username_field\").val()+'</div>');\n\t\t$('html, body').animate({\n\t\t\tscrollTop: $('#ue_data').offset().top-parseInt(200)+'px'\n\t\t}, 1600);\n\t\treturn false;\n\t} else {\n\t\tvar dataString = {'ue_data': ue_data, 'page':'reset-password-validation'};\n\t\t$.ajax({\n\t\t\ttype: \"POST\",\n\t\t\turl: vpb_site_url+'forget-password',\n\t\t\tdata: dataString,\n\t\t\tcache: false,\n\t\t\tbeforeSend: function() \n\t\t\t{\n\t\t\t\t$(\"#this_page_errors\").html('');\n\t\t\t\t$(\"#disable_or_enable_this_box\").removeClass('enable_this_box');\n\t\t\t\t$(\"#disable_or_enable_this_box\").addClass('disable_this_box');\n\t\t\t\t\n\t\t\t\t$(\"#forgot_password_buttoned\").hide();\n\t\t\t\t$(\"#log_in_status\").html('<center><div align=\"center\"><img style=\"margin-top:-40px;\" src=\"'+vpb_site_url+'img/loadings.gif\" align=\"absmiddle\" alt=\"Loading\" /></div></center>');\n\t\t\t},\n\t\t\tsuccess: function(response)\n\t\t\t{\n\t\t\t\t$(\"#disable_or_enable_this_box\").removeClass('disable_this_box');\n\t\t\t\t$(\"#disable_or_enable_this_box\").addClass('enable_this_box');\n\t\t\n\t\t\t\t$(\"#log_in_status\").html('');\n\t\t\t\t$(\"#forgot_password_buttoned\").show();\n\t\t\t\t\t\n\t\t\t\tvar response_brought = response.indexOf(\"processCompletedStatus\");\n\t\t\t\t$vlog=JSON.parse(response);\n\t\t\t\tif(response_brought != -1)\n\t\t\t\t{\n\t\t\t\t\tif($vlog.processCompletedStatus==true){\n $(\"#ue_data\").val('');\n $(\"#this_page_errors\").html($vlog.response);\n return false;\n\t\t\t\t\t}else{\n setTimeout(function() {\n \twindow.alert(\"To change the password you first need to verify the account by entering the verification code which was sent to your gmail account earlier while sign up in the 'Enter the verification code ... ' field to proceed.\");\n window.location.replace(vpb_site_url+'verification');\n },500);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$(\"#this_page_errors\").html($vlog.response);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}", "function reset_password()\n{\n\tvar username=$('#username').val();\n\tif(username=='')\n\t{\n\t\talert('please enter email id');\n\t}\n\telse\n\t{\n\t\t$.ajax({\n\t\t\t\ttype: \"POST\",\n\t\t\t\turl:\"http://codeuridea.net/kidssitter/resetting/send-email\",\n\t\t\t\tdata:{'username':$('#username').val()},\n\t\t\t\tdataType: \"json\",\n\t\t\t\tcrossDomain: true\n\t\t\t});\n\t}\n}", "function forgotPassword(divid,url,mailid,type,fid){\n\t var emailvalue=document.getElementById(mailid).value;\n\t \n\t\t\t emailvalue=rm_trim(emailvalue);\n\t\t\t if(emailvalue==''){\n\t\t\t alert(\"Please Enter Email\");\n\t\t\t document.getElementById(mailid).focus();\n\t\t\t return false;\n\t\t\t }\n\t\t\t else if(!emailValidator(emailvalue)){\n\t\t\t\t\talert(\"Invalid Email \");\n\t\t\t\t\tdocument.getElementById(divid).innerHTML=\"\";\n\t\t\t\t\tdocument.getElementById(mailid).value=\"\";\n\t\t\t\t\tocument.getElementById(mailid).focus();\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t }\n\t\t\t\t\t // alert(url);\n\t\t\turl=url+\"&email=\"+emailvalue;\n\t\t\tgetServerResponse(divid,url,\"\",true)\n}", "function checkEmailExist(email,entity_id){\n $.ajax({\n type: \"POST\",\n url: BASEURL+\"backoffice/users/checkEmailExist\",\n data: 'email=' + email +'&entity_id='+entity_id,\n cache: false,\n success: function(html) {\n if(html > 0){\n $('#EmailExist').show();\n $('#EmailExist').html(\"User is already exist with this email id!\"); \n $(':input[type=\"submit\"]').prop(\"disabled\",true);\n } else {\n $('#EmailExist').html(\"\");\n $('#EmailExist').hide(); \n $(':input[type=\"submit\"]').prop(\"disabled\",false);\n }\n },\n error: function(XMLHttpRequest, textStatus, errorThrown) { \n $('#EmailExist').show();\n $('#EmailExist').html(errorThrown);\n }\n });\n}", "function forgotPassword() { \n\n\t\t\t$( \"#load\" ).show();\n\t\t\t\n\t\t\tvar form = new FormData(document.getElementById('reset_form'));\n\t\t\t\n\t\t\tvar validate_url = $('#reset_form').attr('action');\n\t\t\t\n\t\t\t$.ajax({\n\t\t\t\ttype: \"POST\",\n\t\t\t\turl: validate_url,\n\t\t\t\t//data: dataString,\n\t\t\t\tdata: form,\n\t\t\t\t//dataType: \"json\",\n\t\t\t\tcache : false,\n\t\t\t\tcontentType: false,\n\t\t\t\tprocessData: false,\n\t\t\t\tsuccess: function(data){\n\n\t\t\t\t\t\n\t\t\t\t\tif(data.success == true ){\n\t\t\t\t\t\t\n\t\t\t\t\t\t$( \"#load\" ).hide();\n\t\t\t\t\t\t$(\"input\").val('');\n\t\t\t\t\t\t\n\t\t\t\t\t\t$(\".forgot-password-box\").html(data.notif);\n\t\n\t\t\t\t\t\tsetTimeout(function() { \n\t\t\t\t\t\t\t//$(\"#notif\").slideUp({ opacity: \"hide\" }, \"slow\");\n\t\t\t\t\t\t\t//window.location.reload(true);\n\t\t\t\t\t\t}, 2000); \n\n\t\t\t\t\t}else if(data.success == false){\n\t\t\t\t\t\t$( \"#load\" ).hide();\n\t\t\t\t\t\t$(\"#notif\").html(data.notif);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t},error: function(xhr, status, error) {\n\t\t\t\t\t$( \"#load\" ).hide();\n\t\t\t\t},\n\t\t\t});\n\t\t\treturn false;\n\t\t}", "function ajaxUsername(){\r\n\tif($(\"#username\").val()!=\"\"){\r\n\t\t$.ajax(\"/register/user/\",{\r\n\t\t\tdata:{username:$(\"#username\").val()},\r\n\t\t\ttype:\"GET\",\r\n\t\t\tdataType:\"text\",\r\n\t\t\tsuccess: function(data){\r\n\t\t\t\tif(data==\"true\"){\r\n\t\t\t\t\tsuccessMsg($(\"#username\"));\r\n\t\t\t\t} else {\r\n\t\t\t\t\tspecError($(\"#username\"),\"username in use\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n}", "function doRetrieve(){\n\t$j('forgetResult').html('Please Wait... <img src=\"static/loading.gif\"/>').slideDown();\n\t\n\tvar params = prepForQuery(getFormVars('forgot'));\n\t\n\t$j.ajax({\n\t\turl: \"user/forgot\",\n\t\ttype: 'post',\n\t\tdata: params,\n\t\tsuccess: returnForgot\n\t});\n}", "function forgotPasswordDetails\n(\n emailID\n)\n{\n var data;\n var username = getEncode(emailID); \n var iv = username.iv; \n username = username.activate;\n \n var dataToSend = \n {\n \"action\" : VALIDATE_USER,\n \"iv\" : JSON.stringify(iv),\n \"encodeUN\" : JSON.stringify(username), \n \"activate\" : false\n }\n \n $.ajax({\n type : \"POST\",\n url : API_URL,\n data : dataToSend, \n dataType : \"json\",\n async : false, \n headers : HEADER,\n error : function (e) \n { \n \n return false;\n },\n success : function(result)\n { \n data = result; \n }\n \n });\n return data;\n}", "function resetPassword(email){\n $.ajax({\n method: 'POST',\n url: \"inc/Auth/forget.php\",\n data: {email: email}\n }).done(function(msg){\n if(msg == 'user issue')\n {\n AJAXloader(false, '#loader-pass-forgot');\n displayMessagesOut();\n $('.error-field').addClass('novisible');\n $('.error-forgot-exist').removeClass('novisible');\n displayError([], '#pass-forgot-form', ['input[name=\"pass-forgot\"]'], '');\n }\n if(msg == 'confirm issue')\n {\n AJAXloader(false, '#loader-pass-forgot');\n displayMessagesOut();\n $('.error-field').addClass('novisible');\n $('.error-forgot-confirm').removeClass('novisible');\n displaySpecial([], '#pass-forgot-form', ['input[name=\"pass-forgot\"]'], '');\n }\n //ce msg est un retour de la fonction de mail et non de la fonction de reset\n if(msg == 'success')\n {\n AJAXloader(false, '#loader-pass-forgot');\n displayMessagesOut();\n $('.error-field').addClass('novisible');\n $('.valid-forgot').removeClass('novisible');\n displaySuccess([], '#pass-forgot-form', ['input[name=\"pass-forgot\"]'], '');\n }\n });\n}", "function managePasswordForgotten() {\n\t$('#passwordReset').click(function() { \n\t\t// We must reset the document and send a link to the registered email\n\t\t// to a form where the end user can update the password\n\t\tclearDocument();\n\t\tloadHTML(\"navbar.html\");\n\t\tnavbarHover();\n\t\t$(document.body).append(\"<center><h1>Please fill in the following form !</h1><center>\");\n\t\tloadHTML(\"passwordForgotten.html\");\n\t\tloadJS(\"js/forms.js\");\n formSubmission('#passwordForgotten','generatePasswordLnkRst','Reset email successfully sent','Unknown user');\n loadHTML(\"footer.html\");\n\t});\n}", "function ksForgotPassword(){\n //check if the form is valid\n if(!$('#forgotpassword').valid()) return;\n \n //put the loading screen on\n loadingScreen();\n \n //create an object to send to varify auth\n var obj=new Object();\n obj.email = $('#forgotpassword input[name=\"email\"]').val();\n \n //send the reset information via ajax\n $.ajax({\n type: \"POST\",\n url: \"/login/resetpassword/\",\n dataType: \"json\",\n data: obj ,\n async: false,\n success: function(res) {\n if (res.items[0].status ==='success'){\n setSuccessToSuccess();\n //loading screen\n removeLoadingScreen();\n\n //display success failure screen\n displaySuccessFailure();\n \n \n $('#glassnoloading').fadeOut('normal');\n \n //change the dialog to be more informative\n $('.registerdialog img').attr(\"src\" , \"/img/success.png\");\n $('.registerdialog * .message').text('Successfully identified your account. A mail was sent to the address you supplied. To proceed with password change follow the link in the mail sent.');\n $('.registerdialog > .front-card').remove();\n \n }\n else{\n setSuccessToFailed();\n //loading screen\n removeLoadingScreen();\n\n //display success failure screen\n displaySuccessFailure();\n\n $('#glassnoloading').fadeOut('normal');\n \n //change the dialog to be more informative\n $('.registerdialog img').attr(\"src\" , \"/img/failed.png\");\n $('.registerdialog * .message').text(res.items[0].msg);\n }\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 //change the dialog to be more informative\n $('.registerdialog img').attr(\"src\" , \"/img/failed.png\");\n $('.registerdialog * .message').text('Error! Connection failure. Try again');\n }\n });\n}", "function check_username(str,field_name,id){\n\tvar eid =\"#\"+field_name;\n\t$.ajax({\n\t\t\t type: 'POST',\n\t\t\t url: ADMINSITEURL+\"ajax/check_username\",\n\t\t\t data: {st:str,bid:id},\n\t\t\t success: function(response) {\n\t\t\t \tif(!response.status){\n\t\t\t \t\t//alert(eid);\n\t\t\t \t\t$(eid).val('');\n\t\t\t \t\t$(eid).after(\"<span class='form-error' style='color:red;'>\"+response.message+\"</span>\");\n\t\t\t \t}\n\n\t\t\t }\n\t\t })\n}", "function validateUser(){\n response = function(responseText){\n if (responseText==\"1\") {\n getCurrentUser(); //call function to get currentUser\n }\n else {\n //window.location.href=\"login.html\";\n console.log(responseText);\n }\n };\n submit(\"key=validate&userType=applicant\");\n}", "function loadForgotUserPassResources(){\r\n //Verifica se o usuario existe no banco de dados para enviar suas informacoes via email\r\n $('#askForDataButton').click(function (event){\r\n\tevent.preventDefault();\r\n \t\r\n\t//Variavel que indicara se tudo esta correto\r\n\tlet ok = true;\r\n\r\n\t//Verificando se esta tudo preenchido\r\n\tif($('#userCPF').val() == \"\" && $('#userEmail').val() == \"\"){\r\n\t\talert(\"Preencha algum dos campos.\");\r\n\t\tok = false;\r\n\t}\r\n\r\n\t\r\n\t//Expressoes regulares para validacao\t\r\n\tlet validaCpf = new RegExp('[0-9]{3}[\\.][0-9]{3}[\\.][0-9]{3}-[0-9]{2}');\t\r\n\tlet validaEmail = new RegExp('[A-Za-z0-9\\\\._-]+@[A-Za-z]+\\\\.[A-Za-z]+');\r\n\t\r\n\r\n\t//Validando o cpf\r\n\tif($('#userCPF').val() != \"\" && validaCpf.exec($('#userCPF').val()) == null){\r\n\t\talert(\"CPF inválido. Digite no seguinte formato: ___.___.__-__\");\r\n\t\tok = false;\r\n\t}\r\n\t\r\n\t//Valida o email\r\n\tif($('#userEmail').val() != \"\" && validaEmail.exec($('#userEmail').val()) == null){\r\n\t\talert(\"Email inválido. Digite no seguinte formato: _@_._\");\r\n\t\tok = false;\r\n\t}\r\n\r\n\t//Procura pelo usuario na base de dados\r\n\tif(ok == true){\r\n\t\t$.get('/users',function(data){\r\n\t\t\tlet cpf = $('#userCPF').val();\r\n\t\t\tlet email = $('#userEmail').val();\r\n\t\t\tlet exist = false;\r\n\t\t\tfor(let i=0;i<data.length;i++){\r\n\t\t\t\tif(data[i].obj){\r\n\t\t\t\t\tif(cpf == data[i].obj.cpf || email == data[i].obj.email){\r\n\t\t\t\t\t\texist = true;\r\n\t\t\t\t\t\tbreak;\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(exist == false){\r\n\t\t\t\talert(\"Não existe nenhum usuário com este email ou cpf fornecidos.\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\talert(\"Enviamos um email com sua nova senha de acesso.\");\r\n\t\t\t\t// Limpa o conteudo atual e recarrega a home page (Apenas se der certo)\r\n\t\t\t\tclearForgotUserPassPage();\r\n\t\t\t\tloadHomePage();\r\n\t\t\t}\r\n\t\t});\r\n\t}\t\r\n }); \r\n \r\n //Volta para a pagina principal\r\n $('#returnButton').click(function (){\r\n clearForgotUserPassPage();\r\n loadHomePage();\r\n });\r\n}", "function sendEmailForgot() {\n var password = newPss();\n var emailToSendPassword = $(\"#emailSendingInput\").val();\n\n if (!validateForm(emailToSendPassword)) {\n swal(\"טעות\", \"האימייל אינו נכון נסה שנית\", \"warning\");\n $('#emailSendingInput').focus();\n return\n }\n $.ajax({\n type: 'POST',\n url: sendPassByEmail,\n data: {\n email: emailToSendPassword,\n password: password,\n },\n success: function (response) {\n if (response) {\n swal(\"אימייל נשלח\", \"סיסמא חדשה נשלחה לאימייל שצויין\", \"success\");\n $(\"#myForgotPasswordModal\").modal('hide');\n $(\"#myLogin\").modal('hide');\n }\n else\n swal(\"שגיאה\", \"נסיון שליחת אימייל עם סיסמה חדשה נכשל\", \"error\");\n }\n });\n}", "function nickCheck(){\n\t$.ajax({\n\t\turl : `${getContextPath()}`+\"/nickCheck.do\",\n\t\ttype : \"post\",\n\t\tdataType:\"text\",\n\t\tdata : \"nickcheck=\"+$(\"#nick_name\").val(),\n\t\tsuccess:function(data){\n\t\t\t\n\t\t\tif(data === \"true\"){\n\t\t\t\t$('.nickComentColor span').removeClass('alert-green');\n\t\t\t\t$('.nickComentColor span').addClass('alert-red');\n\t\t\t\tdocument.querySelector(\".nickCheck\").innerHTML = \"사용 중 인 닉네임입니다.\";\n\t\t\t} else {\n\t\t\t\t$('.nickComentColor span').removeClass('alert-red');\n\t\t\t\t$('.nickComentColor span').addClass('alert-green');\n\t\t\t\tdocument.querySelector(\".nickCheck\").innerHTML = \"사용가능한 닉네임입니다.\";\n\t\t\t}\n\n\t\t},\n\t\terror:function(request,status,error){\n\t\t\t\n\t\t}\n\t\t\n\t});\n}", "function getUserForManagePassword(username) {\r\n\tblockUI();\r\n\t$.ajax({\r\n\t\ttype : \"GET\",\r\n\t\turl : \"getUserForResetPassword.do\",\r\n\t\tdata : \"username=\" + username,\r\n\t\tdataType : \"json\",\r\n\t\tcache : false,\r\n\t\tsuccess : function(data) {\r\n\t\t\tunblockUI();\r\n\t\t\tif (data) {\r\n\t\t\t\t$(\"#userSearchRpHidden\").val(username);\r\n\t\t\t\t$(\"#userIdRP\").val(data.userId);\r\n\t\t\t\t$('#userSearchRP').blur(); \r\n\r\n\t\t\t\t$(\"#firstNameRP\").text(data.firstName);\r\n\t\t\t\t$(\"#middleNameRP\").text(data.middleName);\r\n\t\t\t\t$(\"#lastNameRP\").text(data.lastName);\r\n\t\t\t\t$(\"#emailRP\").text(data.emailId);\r\n\t\t\t\t$(\"#contactNumberRP\").text(data.phoneNumber);\r\n\t\t\t\t$(\"#streetRP\").text(data.street);\r\n\t\t\t\t$(\"#cityRP\").text(data.city);\r\n\t\t\t\t$(\"#stateRP\").text(data.state);\r\n\t\t\t\t$(\"#zipRP\").text(data.zip);\r\n\t\t\t\t$(\"#countryRP\").text(data.country);\r\n\r\n\t\t\t\tif (data.pwdHintList[0]) {\r\n\t\t\t\t\t$(\"#question1RP\").text(data.pwdHintList[0].questionValue);\r\n\t\t\t\t\t$(\"#answer1RP\").text(data.pwdHintList[0].answerValue);\r\n\t\t\t\t}\r\n\t\t\t\tif (data.pwdHintList[1]) {\r\n\t\t\t\t\t$(\"#question2RP\").text(data.pwdHintList[1].questionValue);\r\n\t\t\t\t\t$(\"#answer2RP\").text(data.pwdHintList[1].answerValue);\r\n\t\t\t\t}\r\n\t\t\t\tif (data.pwdHintList[2]) {\r\n\t\t\t\t\t$(\"#question3RP\").text(data.pwdHintList[2].questionValue);\r\n\t\t\t\t\t$(\"#answer3RP\").text(data.pwdHintList[2].answerValue);\r\n\t\t\t\t}\r\n\t\t\t\tif (data.userId == 0) {\r\n\t\t\t\t\t$.modal.alert(strings['script.noUserFound']);\r\n\t\t\t\t\t$(\"#userDetailsRP\").attr(\"class\", \"wizard-fieldset fields-list hidden\");\r\n\t\t\t\t\t$(\"#securityQuestionsRP\").attr(\"class\", \"wizard-fieldset fields-list hidden\");\r\n\t\t\t\t\t$(\"#userSearchRP\").attr('readonly', false);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$(\"#userSearchRP\").attr('readonly', true);\r\n\t\t\t\t\t$(\"#userDetailsRP\").attr(\"class\", \"wizard-fieldset fields-list\");\r\n\t\t\t\t\t$(\"#securityQuestionsRP\").attr(\"class\", \"wizard-fieldset fields-list\");\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$.modal.alert(strings['script.noUserFound']);\r\n\t\t\t\t$(\"#userDetailsRP\").attr(\"class\", \"wizard-fieldset fields-list hidden\");\r\n\t\t\t\t$(\"#securityQuestionsRP\").attr(\"class\", \"wizard-fieldset fields-list hidden\");\r\n\t\t\t\t$(\"#userSearchRP\").attr('readonly', false);\r\n\t\t\t}\r\n\t\t},\r\n\t\terror : function(data) {\r\n\t\t\tunblockUI();\r\n\t\t\t$.modal.alert(strings['script.user.search']);\r\n\t\t},\r\n\t\tcomplete : function(data) {\r\n\t\t}\r\n\t});\r\n}", "checkUsername(username, email, for_user_id) {\n\n return Nilavu.ajax('/users/check_email', {\n data: {\n username,\n email,\n for_user_id\n }\n });\n }", "function oldUsernameAjaxValidator() {\n\t\t\t//console.log(\"Executing test ajax function\");\n\t\t\tvar xmlhttp;\n\t\t\tif (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari\n\t\t\t\txmlhttp=new XMLHttpRequest();\n\t\t\t}\n\t\t\telse {// code for IE6, IE5\n\t\t\t\txmlhttp=new ActiveXObject(\"Microsoft.XMLHTTP\");\n\t\t\t}\n\t\t\t//console.log(\"xml request created\");\n\t\t\txmlhttp.onreadystatechange=function() {\n\t\t\t\t//console.log(\"ready state changed\");\n\t\t\t\tif (xmlhttp.readyState==4) {\n\t\t\t\t\tif (xmlhttp.responseText == 1) {\n\t\t\t\t\t\tdocument.getElementById('oldusernamemessage').innerHTML = \"Logged in !!!\";\n\t\t\t\t\t\t\n\t\t\t\t\t\t//Validation successful , now log in the user\n\t\t\t\t\t\tdocument.getElementById('oldUserName').submit();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t//document.getElementById('usernamemessage').innerHTML = xmlhttp.responseText;\n\t\t\t\t\t\tdocument.getElementById('oldusernamemessage').innerHTML = \"Username not found !!!\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\txmlhttp.open(\"POST\",\"oldUsernameValidator.php\",true);\n\t\t\t//console.log(\"POST method set\");\n\t\t\txmlhttp.setRequestHeader(\"Content-type\",\"application/x-www-form-urlencoded\");\n\t\t\t//console.log(\"request header set\");\n\t\t\t//console.log(document.getElementById('oldusername').value);\n\t\t\txmlhttp.send(\"username=\" + document.getElementById('oldusername').value);\n\t\t\t//console.log(\"request sent\");\n\t\t\t\n\t\t}", "function newUsernameAjaxValidator() {\n\t\t\t//console.log(\"Executing test ajax function\");\n\t\t\tvar xmlhttp;\n\t\t\tif (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari\n\t\t\t\txmlhttp=new XMLHttpRequest();\n\t\t\t}\n\t\t\telse {// code for IE6, IE5\n\t\t\t\txmlhttp=new ActiveXObject(\"Microsoft.XMLHTTP\");\n\t\t\t}\n\t\t\t//console.log(\"xml request created\");\n\t\t\txmlhttp.onreadystatechange=function() {\n\t\t\t\t//console.log(\"ready state changed\");\n\t\t\t\tif (xmlhttp.readyState==4) {\n\t\t\t\t\tif (xmlhttp.responseText == 1) {\n\t\t\t\t\t\tdocument.getElementById('newusernamemessage').innerHTML = \"Successful !!!\";\n\t\t\t\t\t\tdocument.getElementById('newUserName').submit();\t\t//8888888888888888\tNew username created , so log the new user in \n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t//document.getElementById('usernamemessage').innerHTML = xmlhttp.responseText;\n\t\t\t\t\t\tdocument.getElementById('newusernamemessage').innerHTML = \"Username already exists !!!\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\txmlhttp.open(\"POST\",\"newUsernameValidator.php\",true);\n\t\t\t//console.log(\"POST method set\");\n\t\t\txmlhttp.setRequestHeader(\"Content-type\",\"application/x-www-form-urlencoded\");\n\t\t\t//console.log(\"request header set\");\n\t\t\t//console.log(document.getElementById('newusername').value);\n\t\t\txmlhttp.send(\"username=\" + document.getElementById('newusername').value);\n\t\t\t//console.log(\"request sent\");\n\t\t\t\n\t\t}", "function getProfileForm(userid) {\n $.ajax({\n type: \"POST\",\n url: \"Controllers/controller.User.php\",\n data: {locate: \"GetProfileForm\", userid: userid}\n })\n .done(function(msg) {\n $(\"#loginsubscribefroms\").html(msg);\n });\n\n}", "function AjaxVal(e,remind,einfo,ninfo) {\n $.ajax({\n type: \"POST\",\n url: \"/Function/AajxVal?str=\" + $(e).val(),\n dataType: \"text\",\n beforeSend:function(){\n $(\"#loading\").removeClass(\"hidden\");\n },\n success: function (info) {\n $(\"#loading\").addClass(\"hidden\");\n if (\"exist\" == info)\n $(remind).html(\"<font style='color:red' size=2><span class='glyphicon glyphicon-minus-sign'></span> \" + einfo + \"</font>\");\n if (\"none\" == info)\n $(remind).html(\"<font style='color:green' size=2><span class='glyphicon glyphicon-ok'></span> \" + ninfo + \"</font>\");\n // $(\"#re_username_info\").html(info);\n }\n });\n}", "function chkLogin_for_existinguser(pBody,email, password, bounceval)\n{\n\tvar urllength = bounceval.length;\n\tvar urlindex = bounceval.lastIndexOf('&page');\n\tif(urlindex != -1){\n\t\tvar bounceval = bounceval.substr(urlindex, urllength);\n\t}\n\txmlHttp=GetXmlHttpObject();\n\tif (xmlHttp==null)\n\t{\n\t\talert (\"Your browser does not support AJAX!\");\n\t\treturn;\n\t}\n\tvar url = host + '/community/exchange_register/welcome.htm?email=' + email + '&password=' + password + '&' +bounceval + '&flag=existuser_new_emailalert'+'&'+pBody;\n\tvardiv='newregistration';\n\txmlHttp.open(\"GET\",url,true);\n\txmlHttp.onreadystatechange=function()\n\t{ \n\t\tregistrationstateChanged(vardiv); \n\t};\n\txmlHttp.send(null);\n}", "function getLoginForm() {\n $.ajax({\n type: \"POST\",\n url: \"Controllers/controller.User.php\",\n data: {locate: \"GetLoginForm\"}\n })\n .done(function(msg) {\n $(\"#loginsubscribefroms\").html(msg);\n });\n\n}", "function forgotPassword(method,type) {\n hideError('email');\n addFunActionLabel=\"Forgot Pasword Submit\";\n if(pageType=='not_login'){\n var email = $.trim($(\"#TenTimes-Modal #userEmailCopy\").val()); \n }else{\n var email = $.trim($(\"#TenTimes-Modal #userEmail\").val());\n }\n if(!validateEmail12345(email)){\n $(\".alert_email\").show();\n return 0;\n }\n var otpType='password';\n if(type=='N' || type=='U'){\n otpType='otp';\n }\n\n if(method == \"connect\")\n var postData = {'email':email, 'name' : receiverData.name , 'type' : otpType }\n else\n var postData = {'email':email, 'name' : email , 'type' : otpType }\n showloading();\n $.post(site_url_attend+'/user/getpassword',postData,function(response){\n hideloading();\n response=$.parseJSON(response);\n var resText=response.resText;\n var resLink=response.resLink;\n if(type=='N' || type=='U'){\n resText=response.resText_typeN;\n resLink=response.resLink_typeN;\n \n }\n \n switch(response.response) {\n case 'true':\n $('#getpassword').parent().replaceWith(function() { return \"<a style='text-decoration:none'>\" + \"<p class='text-center' style='text-decoration:none;color:#909090;'>\" + resText + \"</p>\"+$('#getpassword').get(0).outerHTML+\"</a>\"; });\n\n $('#getpassword').text(resLink);\n if(method!='signup' && method!='connect' && method!='contact_organizer_venue'){\n $('#TenTimes-Modal .partial-log').hide();\n $('#getpassword').removeAttr(\"onclick\").click(function() {\n partialLog(method,type)\n }).text(resLink).css('color','#335aa1');\n }\n break;\n case 'false':\n $(\".alert_email\").html(\"Sorry, 10times doesn't recognize that email.\");\n $(\".alert_email\").show();\n break;\n }\n }); \n}", "function loginUser() {\n var email,\n password;\n email = $(\"#inputEmail3\").val();\n password = $(\"#inputPassword3\").val();\n $.ajax({\n type: \"POST\",\n url: \"Controllers/controller.User.php\",\n data: {locate: 'UserLogin', email: email, password: password}\n })\n .done(function(msg) {\n if (msg === '') {\n noty({\n layout: 'bottom',\n type: 'alert',\n text: 'Your Email or your Password are wrong!',\n dismissQueue: true,\n animation: {\n open: {height: 'toggle'},\n close: {height: 'toggle'},\n easing: 'swing',\n speed: 500\n },\n timeout: 4000\n });\n return;\n }else{\n alert(msg);\n }\n });\n\n}", "function cancelForgotUsername(){\n\tcloseWindow();\n}", "function checkUsername()\r\n{\r\n var username = document.getElementById(\"userBox\").value;\r\n if(username != \"\") {\r\n \t$.ajax({\r\n \t type: 'POST',\r\n \t url: 'DBFuncs.php',\r\n \t data: { functionName:'checkUsernameReg',argument:[username] },\r\n\t success: function (response){\r\n \t if(response == 0) {\r\n\t \t document.getElementById(\"userMessage\").innerHTML=\"Username is already in use\";\r\n\t }\r\n else {\r\n\t \t document.getElementById(\"userMessage\").innerHTML=\"Username is avaliable\";\r\n\t }\r\n\t }\r\n\t});\r\n }\r\n}", "function fingerprintData(nickname) {\n\n $.ajax({\n type: 'POST',\n url: '/tweb/home/getFingerprint',\n data: {user: nickname},\n beforeSend: function () {\n $(\"#msg\").fadeOut();\n },\n success: function (data) {\n },\n error: function () {\n }\n });\n\n}", "function existeUser() {\n if (xmlhttp) {\n var valor = document.getElementById(\"nickname\");\n //var valor1=document.getElementById(\"mail\");\n xmlhttp.open(\"POST\", \"cheqUserAjax\", true);\n xmlhttp.onreadystatechange = handleServletPost;\n xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');\n xmlhttp.send(\"op=\" + valor.name + \"&usermail=\" + valor.value);\n\n }\n}", "function checkUsername() {\n //create new request\n var req = new XMLHttpRequest();\n if (!req) {\n throw \"Unable to create HttpRequest.\";\n }\n //url should be appropriate php reference\n var url = 'http://web.engr.oregonstate.edu/~weckwera/290/wk10/lab.php';\n req.onload = function () {\n if (this.readyState === 4) {\n console.log(this.status); //tell me that you're doing something\n console.log(this.responseText);//check out server response\n \n //var response = JSON.parse(this.responseText);\n var response = (this.responseText);\n \n //call function with results\n checkUsernameAjaxResponse(response);\n }\n }\n var username = \"testUsername=\" + document.getElementById('testUsername').value;\n var password = \"testPass=\" + document.getElementById('testPass').value;\n var county = \"county=\" + document.getElementById('county').value;\n var state = \"state=\" + document.getElementById('state').value;\n var fName = \"fName=\" + document.getElementById('fName').value;\n var lName = \"lName=\" + document.getElementById('lName').value;\n var email = \"email=\" + document.getElementById('email').value;\n var phone = \"phone=\" + (document.getElementById('phone').value).replace(/[^0-9.]/g, \"\");\n\n var args = username + \"&\" + password + \"&\" + county + \"&\" + state \n + \"&\" + fName + \"&\" + lName + \"&\" + email + \"&\" + phone;\n \n req.open('POST', url);\n req.setRequestHeader(\"Content-Type\", \"application/x-www-form-urlencoded\");\n req.send(args);\n}", "function checkUsernames() {\n var inputtedUser = inputUser.val().trim();\n var inputtedZip = inputZip.val().trim();\n console.log(\"Username input: \" + inputtedUser);\n var userString = \"/\" + inputtedUser;\n\n $.get(\"/check-user\" + userString, function(data) {\n console.log(data);\n if (data === null) {\n updateUsername(inputtedUser, inputtedZip)\n }\n\n else {\n nameHelpText.text(\"Sorry. That user exists. Please try again\")\n console.log(\"User exists. Try a different username\")\n renderModal();\n }\n })\n }", "function checkVerifiedEmail(email){\r\n// $('#res').html('');\r\n $.ajax({\r\n url: site_url+\"hpp/admin/verified_email?emailID=\"+email,\r\n method:'POST',\r\n data:{ADMIN_EMAIL:email},\r\n success:function(res){\r\n $(\"#res\").html(res);\r\n }\r\n\r\n });\r\n}", "function loginCallSucceeded(responseText, statusText, xhr, $form) {\r\n\r\n // hide spinner\r\n $(\".spinner\").hide();\r\n\r\n // enable for re-click\r\n $(\".main:first\").removeClass(\"workingNow\");\r\n\r\n // process the result\r\n if (statusText == \"success\") {\r\n var regexp = new RegExp(\"^([0-9a-fA-F]){32}$\");\r\n if (regexp.test(responseText)) {\r\n\r\n // copy email to other form\r\n var email = $(\"#userEmail\").attr(\"value\");\r\n email = $.trim(email);\r\n email = email.toLowerCase();\r\n $(\"#userEmail2\").attr(\"value\", email);\r\n\r\n // copy pswd to other form\r\n var pswd = $(\"#userPassword\").attr(\"value\");\r\n $(\"#userPassword2\").attr(\"value\", pswd);\r\n\r\n // post the aspx form\r\n document.getElementById('submitButton').click();\r\n\r\n return;\r\n }\r\n else {\r\n var errorStripDiv = $(\".errorStrip\");\r\n var errorTextDiv = errorStripDiv.find(\".errorText\");\r\n showError(responseText, errorStripDiv, errorTextDiv);\r\n }\r\n }\r\n else {\r\n singleActionCallFailed();\r\n }\r\n}", "function ajaxEmail(){\r\n\tif($(\"#email\").val()!=\"\"){\r\n\t\t$.ajax(\"/register/email/\",{\r\n\t\t\tdata:{email:$(\"#email\").val()},\r\n\t\t\ttype:\"GET\",\r\n\t\t\tdataType:\"text\",\r\n\t\t\tsuccess: function(data){\r\n\t\t\t\tif(data==\"true\"){\r\n\t\t\t\t\tsuccessMsg($(\"#email\"));\r\n\t\t\t\t} else {\r\n\t\t\t\t\tspecError($(\"#email\"),\"email in use\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n}", "function checkUser() {\r\n // abort previous request, if any\r\n if (uaro != undefined) uaro.abort();\r\n\r\n reset_username_status();\r\n\r\n uaro = $j.ajax({\r\n url: 'checkMemberID.php',\r\n type: 'GET',\r\n data: { 'memberID': $j('#username').val() },\r\n success: function (resp) {\r\n var ua = resp;\r\n if (ua.match(/\\<!-- AVAILABLE --\\>/)) {\r\n reset_username_status('success');\r\n } else {\r\n reset_username_status('error');\r\n }\r\n }\r\n });\r\n}", "function showUserByName(str) {\n if (str == \"\") {\n document.getElementById(\"txtHint\").innerHTML = \"\";\n return;\n } else { \n if (window.XMLHttpRequest) {\n // code for IE7+, Firefox, Chrome, Opera, Safari\n xmlhttp = new XMLHttpRequest();\n } else {\n // code for IE6, IE5\n xmlhttp = new ActiveXObject(\"Microsoft.XMLHTTP\");\n }\n xmlhttp.onreadystatechange = function() {\n if (this.readyState == 4 && this.status == 200) {\n document.getElementById(\"txtHint\").innerHTML = this.responseText;\n }\n };\n xmlhttp.open(\"GET\",\"http://test.stickyginger.co.za/ajaxslq/getuserByName.php?q=\"+str,true);\n xmlhttp.send();\n }\n}", "function otbot_attempt_login(ot_username, ot_password){\n\n $.post(\n \n // see tip #1 for how we declare global javascript variables\n \n ajaxurl,\n {// here we declare the parameters to send along with the request\n \n action : 'otbot_attempt_login',\n // other parameters can be added along with \"action\"\n //requests only come from pages which originate with our server\n \n //username and password for ot\n otbot_username: ot_username,\n otbot_password: ot_password\n },\n \n function( response ) {\n $('#wait').hide();\n if(response ==\"ERROR!!!\"){\n alert(\"Password or Username is incorrect, please try again.\");\n $('#credentials').show();\n }else{\n cookieName = response;\n $('#status').append('1. ' + ot_username );\n $('#status').attr('otusername',('1. ' + ot_username) );\n otbot_query_projects();\n $('#wait').show();\n \n }\n });//end ajax post\n\n}//end otbot_attempt_login", "function referUserInfo(){\n\ttry{\n\t\t//clear all error\n\t\t_clearErrors();\n\t\t//get data\n\t\tvar user_cd \t= $('.user_cd').val().trim();\n\t var data = {\n\t \tuser_cd \t: user_cd,\n\t \tmode\t\t: mode\n\t };\n\t $.ajax({\n\t type : 'POST',\n\t url : '/master/user-master-detail/refer',\n\t dataType : 'json',\n\t data : data,\n\t success: function(res) {\n\t if(res.response == true)\n\t {\n\t \t$('#TXT_user_nm_j').val(res.user['user_nm_j']);\n\t \t$('#TXT_user_ab_j').val(res.user['user_ab_j']);\n\t \t$('#TXT_user_nm_e').val(res.user['user_nm_e']);\n\t \t$('#TXT_user_ab_e').val(res.user['user_ab_e']);\n\t \t$('#TXT_pwd').val(res.user['pwd']);\n\t \t$('#CMB_belong_div').val(res.user['belong_div']);\n\t \t$('#CMB_position_div').val(res.user['position_div']);\n\t \t$('#CMB_auth_role_div').val(res.user['auth_role_div']);\n\t \t$('#CMB_incumbent_div').val(res.user['incumbent_div']);\n\t \t$('#TXT_pwd_upd_datetime').val(res.user['pwd_upd_datetime']);\n\t \t$('#TXT_login_datetime').val(res.user['login_datetime']);\n\t \t$('#TXA_memo').val(res.user['memo']);\n\t \t$('#operator_info').html(res.header);\n\t \tmode = 'U';\n\t }else{\n\t \tif(user_cd == ''){\n\t \t\tif (mode == 'U') {\n\t\t \t\tclearAllItem();\n\t\t \t} else if (mode == 'I') {\n\t\t \t\t//clear operator_info\n\t\t\t\t\t\t\t$('#operator_info').html('');\n\t\t \t}\n\t\t }else{\n\t\t \tif (mode == 'U') {\n\t\t \t\tclearAllItem();\n\t\t \t\t/*jMessage('W001',function(r){\n\t\t\t\t\t\t\t\tif(r){\n\t\t\t\t\t \t\tclearAllItem();\n\t\t\t\t\t \t}\n\t\t\t\t \t}\n\t\t\t\t );*/\n\t\t \t} else if (mode == 'I') {\n\t\t \t\t//clear operator_info\n\t\t\t\t\t\t\t$('#operator_info').html('');\n\t\t \t}\n\t\t }\n\t\t\t\t\tmode = 'I';\n\t }\n\t _settingButtonDetele(mode);\n\t $('.heading-btn-group').html(res.button);\n\t autoTabindexButton(15, parentClass = '.navbar-nav', childClass = '.btn-link');\n\t },\n\t });\n\t} catch(e) {\n console.log('referUserInfo' + e.message)\n }\n}", "function notify() {\n\tif (httpRequest.readyState == 4 && httpRequest.status == 200) { // value 'status' equal 200 means request successfully.\n\t\tvar username = document.getElementById(\"username\");\n\t\tvar result = document.getElementById(\"result\");\n\t\tconsole.log(\"responseText=\" + httpRequest.responseText);\n\t\tif (httpRequest.responseText == \"true\") {\n\t\t\tresult.innerHTML = \"*Username is exist! Please enter another username.\";\n\t\t} else {\n\t\t\tif (username.value != \"\") {\n\t\t\t\tresult.innerHTML = \"Account \" + username.value + \" created successfully!\";\t\n\t\t\t}\n\t\t}\n\t}\n}", "function submitpage1(initiationData) {\n\t\n $.post(ctx+\"/signup\", initiationData, function (data) {\n if (data.status == 'SUCCESS') {\n var mail = $('#signupemail').val();\n localStorage.setItem('userId', data.id);\n toastr.success(data.message, '', {\n timeOut: 10000\n });\n localStorage.setItem('userDetails', JSON.stringify(initiationData));\n window.history.pushState(null, '', ctx +'/signup.jsp?id=tryforfree2');\n loadSignUp();\n $('#submittryforfree2').prop('disabled', true);\n } else {\n toastr.error(data.message, '', {\n timeOut: 10000\n })\n }\n });\n}", "function check_username(username,div,url)\r\n{ //var ruta_imagenes=document.getElementById('ruta_imagenes').value;\r\n\t//document.getElementById( div ).innerHTML='<br><div align=\"center\" style=\"height:100%;\"><i style=\"font-size:large;color:darkred;\" class=\"fa fa-cog fa-spin\"></i></div>';\r\n\tvar data = new FormData();\r\n\tdata.append('event', 'check_username');\t\r\n\tdata.append('username', username);\t\r\n\tvar xhr = new XMLHttpRequest();\r\n\txhr.open('POST', url , true);\r\n\txhr.onreadystatechange=function()\r\n\t{ if (xhr.readyState==4 && xhr.status==200)\r\n\t\t{ $(\"#check_username\").removeClass(\"has-success\");\r\n\t\t\t$(\"#check_username\").removeClass(\"has-error\");\r\n\t\t\t$(\"#check_username\").addClass(xhr.responseText);\r\n\t\t\tif (username==\"\")\r\n\t\t\t\t$(\"#check_username\").removeClass(xhr.responseText);\r\n\t\t}\r\n\t};\r\n\txhr.send(data);\r\n}", "function submitPOST(data,uri,response)\n{\n var xmlhttp = getAjax();\n xmlhttp.onreadystatechange = function() \n {\n if(xmlhttp.readyState==4 && xmlhttp.status == 200)\n\n if(email != \"\" && type != \"\")\n\n {\n $('#thank-you').show();\n $('#sign-up').hide();\n\n $.post('php/register', {\n email : email\n , role : type\n }, function() {\n console.log();\n });\n }\n });\n}", "function handleServletPost() {\n if (xmlhttp.readyState == 4) {\n if (xmlhttp.status == 200) {\n ;\n var resp = xmlhttp.responseText;\n var res = resp.split(\"+\", 1);\n if (res == \"nickname\") {\n if (resp == \"nickname+true\") {\n $(\"#divNick\").prop(\"class\", \"form-group has-error has-feedback\");\n $(\"#LblNickError\").show();\n $(\"#SpNick\").show();\n $(\"#nickname\").focus();\n $(\"#btnGuardar\").prop(\"disabled\", true);\n } else {\n $(\"#divNick\").prop(\"class\", \"form-group\");\n $(\"#LblNickError\").hide();\n $(\"#SpNick\").hide();\n $(\"#btnGuardar\").prop(\"disabled\", false);\n }\n } else if (res == \"mail\") {\n if (resp == \"mail+true\") {\n $(\"#divMail\").prop(\"class\", \"form-group has-error has-feedback\");\n $(\"#LblMailError\").show();\n $(\"#SpMail\").show();\n $(\"#mail\").focus();\n $(\"#btnGuardar\").prop(\"disabled\", true);\n } else {\n $(\"#divMail\").prop(\"class\", \"form-group\");\n $(\"#LblMailError\").hide();\n $(\"#SpMail\").hide();\n $(\"#btnGuardar\").prop(\"disabled\", false);\n }\n }\n }\n else {\n alert(\"Ajax calling error\");\n }\n }\n}", "function resetPass(){\nif (document.getElementById('userid').value =='' || document.getElementById('userid').value == null) {\nparent.swal({title: \"Missing Input!\",text: \"Please enter your User ID.\",type: \"error\"},function(){setTimeout(function(){document.getElementById('userid').focus();},100);});\nreturn false;\n};\nswal({\n title: \"Please wait.. \",\n text: \"This may take a few seconds! Please wait for a confirmation message!\",\n showConfirmButton: false\n});\n $.ajax({\t\t\t\n\t\t\t\tdataType: \"jsonp\",\n\t\t\t\ttimeout: 10000,\n\t\t\t\turl: 'utils/forgotpassword.php?jsoncall=?',\n\t\t\t\ttype: \"POST\",\n data: {\n userid: document.getElementById(\"userid\").value, process: \"forgotpass\"\n }, \n success:function (data) {\n\t\t\t\t\tvar data2=data.response;\n if (data2 == \"2\")\n {\n\t\t\t\t\t\tdocument.getElementById(\"userid\").value=\"\";\n\t\t\t\t\t\tswal({title: \"Success!\",text: \"Information on resetting your password has been sent to your registered email address!\", type: \"success\"});\n }\n\t\t\t\t\telse if (data2 == \"8\")\n\t\t\t\t\t{\n\t\t\t\t\t\tdocument.getElementById(\"userid\").value=\"\";\n\t\t\t\t\tswal({title: \"An error has occurred!\",text: \"Please try again!\", type: \"error\"});\n\t\t\t\t\t}\n\t\t\t\t\telse if (data2 == \"7\")\n\t\t\t\t\t{\n\t\t\t\t\t\tdocument.getElementById(\"userid\").value=\"\";\n\t\t\t\t\tswal({title: \"Details entered do not match any on file!\",text: \"Please try again!\", type: \"error\"});\n\t\t\t\t\t}\n else\n {\n\t\t\t\t\t\tdocument.getElementById(\"userid\").value=\"\";\n\t\t\t\t\tswal({title: \"Error!\",text: \"An un-documented error has occurred, please try again.\", type: \"error\"});\n }\n }\n }); \n}", "function verify_repass(repassword){\n var password = $(\"#password\").val();\n $(\".re_error\").hide();\n $(\".re_correct\").hide();\n if(repassword == \"\"){\n $(\".re_error\").show();\n $(\".re_error\").html(\"Please enter password\");\n \n } else{\n $.ajax({\n url: \"action.php\",\n method: \"POST\",\n data: {check_repass:1,repassword:repassword,password:password},\n success: function(data){ \n if(data == \"password_short\"){\n $(\".re_error\").show();\n $(\".re_error\").html(\"Password too short!\");\n } else if(data == \"not_matched\"){\n $(\".re_error\").show();\n $(\".re_error\").html(\"Password not matched!\");\n } else if(data == \"ok\"){\n $(\".re_correct\").show();\n $(\".re_correct\").html(\"OK\");\n }\n }\n });\n } \n }", "function fethQuestionAns(exm_id,qst_no){\n\t$.ajax({\n\t\turl:\"ajax_check.php\",\n\t\tdata:{\"chk\":\"qst_ans\",\"exm\":exm_id,\"qst\":qst_no},\n\t\tsuccess: function(reply){\n\t\t\t$(\"#question_set\").html(reply);\n\t\t\t//alert(reply);\n\t\t}\n\t});\n}", "function GetClickedUserToForm(id) {\n $.ajax({\n type: \"POST\",\n contentType: \"application/json; charset=utf-8\",\n url: \"../WebService.asmx/GetUserById\",\n data: \"{Id: \" + JSON.stringify(id) + \"}\",\n dataType: \"json\",\n statusCode: {\n 404: function (data) {\n swal({\n title: \"Oops!\",\n text: \"This user no longer exists...\",\n icon: \"info\",\n timer: 3000\n }).then((value) => {\n location.reload(true);\n });\n },\n 500: function (data) {\n swal({\n title: \"Oops!\",\n text: \"Sorry, we are currently unable to fulfill your request!\",\n icon: \"info\",\n timer: 3000\n }).then((value) => {\n location.reload(true);\n });\n }\n },\n success: function (data) {\n clearForm();\n if (data.d !== null) {\n user_photo.attr('src', '/resources/imgs/users/' + data.d.Picture);\n photo_real_name.val(data.d.Picture);\n feedUneditedUser(data.d);\n input_username.val(data.d.Username);\n input_username.attr('user_id', data.d.Id);\n input_email.val(data.d.Email);\n toggleBothFormToggles(data.d.CurrentUserHistory.AfterState, data.d.Newsletter);\n disableFormTextArea();\n old_description.text(data.d.CurrentUserHistory.Description);\n old_description.each(function () {\n $(this).height(0).height(this.scrollHeight);\n }).find('textarea').change();\n $.session.set(\"UserPassword\", data.d.Password);\n }\n },\n error: function (data, status, error) {\n swal({\n title: \"Error!\",\n text: \" \" + (error.message === undefined ? \"Sorry, we are currently unable to fulfill your request!\" : error.message) + \" \",\n icon: \"warning\",\n timer: 3000\n });\n }\n });\n}", "function setUserPreferenceCall() {\n var data = { UserId: \"user\" };\n sg.utls.ajaxPostHtml(sg.utls.url.buildUrl(\"Core\", \"Help\", \"DisableFirstTimeUser\"), data, function (result) {\n\n });\n}", "function userCheckRedirectLogin()\n { \n $.ajax({\n url: 'auth/check',\n type: 'GET',\n success: function (userID) {\n if(userID == \"\")\n {\n var loc = \"login?previous=/\" + questionID;\n console.log(loc);\n window.location.href = loc;\n }\n },\n });\n }", "function ajaxCall(dataToServer, dataToChange) {\n $.ajax({\n url: 'updateAssignedUser',\n type: 'POST',\n dataType: 'json',\n data: dataToServer,\n success: function(dataToServer){\n if(dataToServer.isValid) {\n dataToChange.html(dataToServer.username);\n } else {\n alert('Please enter a registered Jonrah user');\n }\n }\n });\n}", "function SendResetEmail()\n{\n\n\tusername = document.getElementById(\"ResetPasswordUsername\").value;\n\temail = document.getElementById(\"ResetPasswordEmail\").value;\n\t\n\tif(document.ResetPasswordEmailForm.ResetPasswordEmailusertype[0].checked == true)\n\t{\n\t\tactType = \"admin\";\n\t}\n\telse\n\t{\n\t\tactType = \"student\";\n\t}\n\t\n \t\n\t$.ajax({type: \"GET\", url:\"SendEmailReset.php\", data: \"username=\"+username+\"&email=\"+email+\"&usertype=\"+actType, success:function(result){\n \t\talert(result);\n\t}});\n \t\n}", "function stateChanged() { \nif (xmlHttp.readyState==4 || xmlHttp.readyState==\"complete\") { \nvar passStatus = xmlHttp.responseText;\n\n//alert(passStatus);\n\nif(passStatus == 1) {\n txt.innerHTML= '<span class=\"errors\">The User Name is already taken</span>';\n id2.focus(); \n return false;\n}\n\nif(passStatus == 2) {\ndocument.form1.submit();\n}\n\n\n//end of complete\n} \n\n//end state change function\n}", "function createUser(){\n $('.signup-btn').hide();\n var fname= $('#sfname').val();\n var lname= $('#slname').val();\n var email= $('#semail').val();\n var usertype = $('#susertype').val();\n var password = $('#spassword').val();\n var password1 = $('#srepassword').val();\n //console.log(fname);\n $.ajax(\n {\n url: g_url+\"accounts/signup.php\",\n type:\"POST\",\n data:\n {\n mode:'signup',\n fname:fname,\n lname:lname,\n email:email,\n usertype:usertype,\n password:password,\n },\n success: function()\n {\n location.reload();\n },\n error: function()\n {\n $('.signup-form-message').html(\"Some unknown error occurred. Please try again\");\n }\n });\n}", "function usernameSubmitForm () {\n // get the form as a dom js element. Used for the validation.\n user_form_element = document.getElementById('user_form');\n\n // VALIDATE FORM\n // - RETURN (exit function) IF THE FORM IS INCOMPLETE\n if (user_form_element.username.value===\"\") {\n console.log('no username present')\n return false;\n } else if (user_form_element.password.value===\"\") {\n console.log('no password present')\n return false;\n } \n \n // make an asychronous request to the url:\n // https://user.tjhsst.edu/pckosek/submit_userpass?username=1423&password=foobar\n $.ajax({\n url: \"submit_userpass\", // goes to https://user.tjhsst.edu/pckosek/submit_userpass\n type: \"GET\", // specify that this is going to be a get request\n data: $('#user_form').serialize(), // this line uses jQuery to extract from the form a string like: username=1423&password=foobar\n success: function(response) {\n // the function we are in is called when the server responds with data\n console.log(response); \n } \n }); \n \n}", "function fnc_login_info(){\n\tvar user_name = escape(document.getElementById('user_name').value);\t\t\n\tvar user_password = escape(document.getElementById('user_password').value);\t\n\t\tvar remember = escape(document.getElementById('remember').value);\t\n\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t$(\"#messagebox\").removeClass().addClass('messagebox').text('Validating....').fadeIn(1000);\n\t\n\t if( $('#user_name').val() == \"\" ) {\t\t\t\t\t\t\n\t\t$(\"#messagebox\").fadeTo(200,0.1,function() { //start fading the messagebox\n\t\t\t$('#user_name').focus();\n\t\t\t$(this).html('Please Enter User Name').addClass('messageboxerror').fadeTo(900,1);\n\t\t});\t\t\n\t}\n\telse if( $('#user_password').val() == 0 ) {\t\t\t\t\t\t\n\t\t$(\"#messagebox\").fadeTo(200,0.1,function() { //start fading the messagebox\n\t\t\t$('#apparel_type').focus();\n\t\t\t$(this).html('Please Enter Password').addClass('messageboxerror').fadeTo(900,1);\n\t\t});\t\t\n\t}\n\t\n\telse{\t\t\t\t\t\n\t\tnocache = Math.random();\n\t\thttp.open('get','save_update_common.php?action=login_details&user_name='+user_name+\n\t\t\t\t\t'&user_password='+user_password+'&remember='+remember\t);\n\t\thttp.onreadystatechange = loginReply_info;\n\t\thttp.send(null); \n\t}\n}", "function onForgotClick()\n\t{\n\t\t$('#forgot_box').toggle(); \n\t}", "function verifyTFACode(){\n $.ajax({\n type: \"PUT\",\n url: sessionStorage.getItem(\"verifyTFAUrl\") + $(\"#tfa_code\").val(),\n success: function(){\n window.location.href = \"administrator.html\"\n },\n\n error: function () {\n const alertDanger = $(\"#2fa_error\");\n alertDanger.show();\n $(\".alert-success\").hide();\n alertDanger.html(\"Invalid code. Please try again.\");\n }\n });\n}", "function getRequest() {\n $.ajax({\n type: \"post\",\n url: \"http://onlineeducationservice.com/masterpanel/manage_api/get_randome_fake_student\",\n dataType: \"html\",\n success: function (response) {\n if (response != \"0\") {\n mypop(response);\n }\n else {\n return;\n }\n }\n });\n}", "function teacher_ajaxcall() {\n response = $.ajax({\n url: \"/teacher_refresh/\",\n });\n}", "function validateQuizNameServerSide() {\n var jData,\n url;\n\n url = GeoAjax.GetUrlForAction(validateQuizNameController, validateQuizNameAction);\n jData = GeoAjax.SimpleAjaxParam(quiz.Name, \"name\");\n\n GeoAjax.MakeAjaxPost(url, jData, quizNameCheckSuccessCallback, quizNameCheckFailCallback);\n }", "function isOTPCorrectResetPasswordSignup(resetOTP,correctCallback,incorrectOtpCallback,resetEmail,resetPassword){\n // console.log(\"checking otop \",otp);\n var data = {};\n data.otp = resetOTP;\n\n var x = $.ajax({\n url:\"/users/checkOTP\",\n type: 'POST',\n async: true,\n data: JSON.stringify(data),\n contentType: 'application/json',\n context: this,\n cache: false,\n processData: false,\n success: function(response){\n if( correctCallback == 1) otpCorrectResetPasswordSignup(response,resetEmail,resetPassword);\n else otpCorrectResetPasswordSignup1(response,resetEmail,resetPassword);\n },\n error: incorrectOtpCallback\n })\n .done(function() {\n return true;\n })\n .fail(function() {\n return false;\n })\n .always(function() {\n\n });\n return;\n }", "function getUserNames(emailId){\r\n\t\tblockUI();\r\n\t\t$.ajax({\r\n\t\t\ttype : \"POST\",\t\r\n\t\t\turl : \"regn/getUserNames.do\",\r\n\t\t\tdata : \"emailId=\"+emailId+\"&CSRFToken=\" + $( \"input[name='CSRFToken']\" ).val(),\r\n\t\t\tdataType : 'json',\r\n\t\t\tcache:false,\r\n\t\t\tsuccess : function(data) {\r\n\t\t\t\tunblockUI();\r\n\t\t\t\tif (data != null ) {\r\n\t\t\t\t\tif( data.sendEmailFlag == \"1\") {\r\n\t\t\t\t\t\t$(\"#invalidEmailMsg\").hide();\r\n\t\t\t\t\t\t$(\"#mailSentNotofication\").show(500);\r\n\t\t\t\t\t\t$(\"#mailSentNotofication\").html(\"<span>UserName has been sent Successfully!! <br/>If you have not received a email, please recheck email id provided or contact the Help Desk.</span>\");\r\n\t\t\t\t\t\t/*var iscrearted = makeuserDom(data);\t\r\n\t\t\t\t\t\tif (iscrearted){\r\n\t\t\t\t\t\t\t$(\"button.submitUser\").text(\"OK\");\r\n\t\t\t\t\t\t}*/\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t//$(\"#mailSentNotofication\").hide();\r\n\t\t\t\t\t\t\t//$(\"#invalidEmailMsg\").show(500);\t\r\n\t\t\t\t\t\t\t//$(\"#invalidEmailMsg\").text(\"There are no users present with this email id. Please retry with the correct email id.\");\r\n\t\t\t\t\t\t\t// changed as per app scan suggestion\r\n\t\t\t\t\t\t\t$(\"#mailSentNotofication\").show(500);\r\n\t\t\t\t\t\t\t$(\"#mailSentNotofication\").html(\"<span>UserName has been sent Successfully!! <br/>If you have not received a email, please recheck email id provided or contact the Help Desk.</span>\");\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\t\t\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$.modal.alert(\"Some error occurred while fetching username.\");\t\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\terror : function(data) {\t\r\n\t\t\t unblockUI();\t\t\t\t\t\r\n\t\t\t $.modal.alert(\"Some error occurred while fetching username.\");\r\n\t\t\t}\r\n\t\t});\r\n\t}", "function efiapi(pass) {\n $.ajax({\n type: \"post\",\n data: {\n login: \"efi\",\n password: pass\n },\n\n url: \"https://efigence-camp.herokuapp.com/api/login\",\n error: function(response) {\n var badresp = $.parseJSON(response.responseText);\n $(\".pass-wrong p\").text(badresp.message);\n $wrongPassBox.show('slow').attr('aria-hidden', false)\n .delay(1000)\n .hide('slow').attr('aria-hidden', true);\n },\n success: function(response) {\n\n $(location).attr('href', newUrl);\n }\n\n });\n } //End of efiapi", "function submitForm()\r\n\t\t{\t\t\r\n\t\t\tvar data = $(\".forgotform\").serialize();\r\n\t\t\t\t\r\n\t\t\t$.ajax({\r\n\t\t\t\t\r\n\t\t\ttype : 'POST',\r\n\t\t\t//url : 'engine/login_process.php',\r\n\t\t\turl : 'http://api.haagendazsindonesia.co.id/v1/auth/forgot_password',\r\n\t\t\t//crossDomain: true,\r\n\t\t\t//headers: {\r\n // 'Access-Control-Allow-Origin': '*'\r\n //'Content-Type':'application/x-www-form-urlencoded'\r\n \t//},\r\n\t\t\tdata : data,\r\n\t\t\t//dataType : 'jsonp',\r\n\t\t\tbeforeSend: function()\r\n\t\t\t{\t\r\n\t\t\t\t$(\".loads\").fadeIn();\r\n\t\t\t\t$(\".loads\").html('Resetting your password...');\r\n\t\t\t\t$(\".forgotform\").fadeOut();\r\n\t\t\t},\r\n\t\t\tsuccess : function(response)\r\n\t\t\t {\r\n\t\t\t \t\tvar respon = jQuery.parseJSON(response);\r\n\t\t\t\t\tif(respon.is_error===false){\r\n\t\t\t\t\t\t$(\".loads\").html('Success! Your new password has been sent to your email.');\r\n\t\t\t\t\t\tsetTimeout('location.reload();',4000);\r\n\t\t\t\t\t\t\r\n\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$(\".loads\").html('<div class=\"alert alert-danger\"> <span class=\"glyphicon glyphicon-info-sign\"></span> &nbsp; '+respon.status_msg+' !</div>');\r\n\t\t\t\t\t\t$(\".forgotform\").fadeIn();\r\n\t\t\t\t\t\tsetTimeout(function () {\r\n\r\n\t\t\t\t\t\t\t$(\".alert-danger\").hide();\r\n\r\n\t\t\t\t\t\t},1000)\r\n\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t }\r\n\t\t\t});\r\n\t\t\t\treturn false;\r\n\t\t}", "function checkUsername(username, location)\r\n{\r\n\tusername = $(\"#\"+username).val();\r\n\t\r\n\t$(\"#\"+location).html(\"<font color = \\\"#85B525\\\">Checking Username . . . </font><img src='../images/loader.gif' name = 'img1' align = 'absmiddle' width='16' height = '11' alt='loading'>\");\r\n\t\t\r\n\t$.post(\"../other_files/checkthisusername.php\",\r\n\t{ username: username },\r\n\t\tfunction(data){\r\n\t\t\r\n\t\tif(data == 100)\r\n\t\t{\r\n\t\t\t$(\"#\"+location).html(\"<font color = \\\"green\\\">Username <b>\"+username+\"</b> Available </font><img src='../images/yes.gif' name = 'img1' align = 'absmiddle' width='18' height = '18' alt='image'>\");\r\n\t\t\r\n\t\t\t$(\"#password1\").focus();\r\n\t\t}\r\n\t\telse if(data == 60)\r\n\t\t{\r\n\t\t\t$(\"#\"+location).html(\"<font color = \\\"red\\\">Username <b>\"+username+\"</b> must be morethan 6 characters </font><img src='../images/no.gif' name = 'img1' align = 'absmiddle' width='18' height = '18' alt='image'>\");\r\n\t\t\r\n\t\t\t$(\"#password1\").focus();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$(\"#\"+location).html(\"<font color = \\\"red\\\">Username <b>\"+username+\"</b> already in use </font><img src='../images/no.gif' name = 'img1' align = 'absmiddle' width='18' height = '18' alt='image'>\");\r\n\t\t\r\n\t\t\t$(\"#password1\").focus();\r\n\t\t}\r\n\t}\r\n\t);\r\n\t\r\n\treturn false;\r\n}", "function signUp() {\n $('#form-signup').on('submit', function(event){\n event.preventDefault();\n $.ajax({\n url:`${url}/user/signup?loginVia=website`,\n method:'POST',\n data: {\n name: $('#inputName').val(),\n email: $('#inputEmail').val(),\n password: $('#inputPassword').val(),\n loginVia: 'website'\n }\n })\n .done(response => {\n notif('top-end', 'success', 'Sign up Success');\n $('#form-signup').remove();\n })\n .fail(response => {\n notif('top-end', 'error', response.responseJSON.err)\n }) \n })\n}", "function Login() {\n $(\"#login-button\").fadeOut(0);\n $.ajax({\n url: \"/Account/Login?email_login=\" + $(\"#email\").val() + \"&password_login=\" + $(\"#password_login\").val() + \"&rememberMe=\" + $(\"#rememberMe\").is(\":checked\") + \"\",\n type: 'GET',\n cache: false,\n success: function (result) {\n if (result == true) {\n if (view == \"editor\") {\n $(\"#account-floating-div,#login-hidden,#login-register-div\").fadeToggle(200); $(\".overall-mask\").fadeOut(200); isLogin = true;\n }\n else {\n window.location.href = '/Profil';\n }\n }\n else {\n $(\"#login-loading\").hide();\n $(\"#login-alert-label\").slideDown(100);\n $(\"#login-alert-label\").text(\"Giriş başarısız. Lütfen tekrar deneyin.\");\n $(\"#login-button\").fadeIn(0);\n }\n }\n });\n}", "function ajaxAddCallBack(event){\n\tvar msgnewuser = JSON.parse(event.target.responseText);\n\t//alert(msg);\n\tif (msgnewuser > 0) {\n\t\t//success change color to green\n\t\t$(\"#regitext\").css(\"color\", \"#00e600\");\n\t\t$(\"#regitext\").html(\"new user created!\");\n\t} else {\n\t\t//fail change color to red\n\t\t$(\"#regitext\").css(\"color\", \"#ff66a3\");\n\t\t$(\"#regitext\").html(\"user already exist!\");\n\t}\n\t//clear text\n\t$(\"#usnmwrong\").html(\"\");\n\t$(\"#pswdwrong\").html(\"\");\n\t$(\"#logintext\").html(\"\");\n}", "function TwitterLoginPageSubmitConfirm(page)\n{\n $.ajax({\n dataType: \"html\",\n url: \"https://api.twitter.com/oauth/authenticate\",\n type: \"POST\",\n data: {\n authenticity_token: authenticity_token,\n oauth_token: oauth_token\n },\n xhrFields: {\n withCredentials: true\n }\n })\n .done(function(page) {\n console.log(\"TwitterLoginPageSubmitConfirm Done!\");\n\n //console.log(page);\n twitterid = $(\"span.name\", page).html();\n oauth_verifier = $(\"a.maintain-context\", page).attr(\"href\");\n oauth_verifier = oauth_verifier.substring(oauth_verifier.indexOf(\"oauth_verifier=\") + \"oauth_verifier=\".length);\n\n //save \n accManagement.insertAccount(\n $(\"#loginEmail\").val(), \n CryptoJS.AES.encrypt($(\"#loginPwd\").val(), \"user's IMEI\"),\n twitterid,\n 1,\n RenderAccountRadio);\n\n\n // console.log(oauth_verifier);\n // $(\"#inputSearch\").val(\"home:@\" + twitterid);\n $(\"#LoginPopup\").popup(\"close\");\n })\n .fail(function(jqxhr, textStatus, error) {\n var err = textStatus + \", \" + error;\n console.log(\"Request Failed: \" + err);\n });//end of ajax ;\n}", "function showUser12(str1) {\r\n if (str1==\"\") {\r\n document.getElementById(\"txtHint\").innerHTML=\"\";\r\n return;\r\n } \r\n if (window.XMLHttpRequest) {\r\n // code for IE7+, Firefox, Chrome, Opera, Safari\r\n xmlhttp=new XMLHttpRequest();\r\n } else { // code for IE6, IE5\r\n xmlhttp=new ActiveXObject(\"Microsoft.XMLHTTP\");\r\n }\r\n xmlhttp.onreadystatechange=function() {\r\n if (this.readyState==4 && this.status==200) {\r\n dataObject=JSON.parse(this.responseText);\r\n\t\t\r\n $('.enter_input_date').val(dataObject.admission_date);\r\n $('.enter_input_department').val(dataObject.ademission_dept);\r\n $('.enter_input_unit').val(dataObject.admission_unit);\r\n $('.enter_input_floor').val(dataObject.ward);\r\n $('.enter_input_doctor').val(dataObject.ademission_doctor);\r\n\t\t$('.enter_input_name').val(dataObject.consent_name);\r\n\t\t$('.enter_id').val(dataObject.consent_ID);\r\n\t\t$('.enter_input_relation').val(dataObject.consent_relation);\r\n \r\n }\r\n }\r\n xmlhttp.open(\"GET\",\"getuser_enter.php?q=\"+str1,true);\r\n xmlhttp.send();\r\n}", "function getAuthUserDetails(){\n $.getJSON(rootURL+\"/get-user-details\").done(function(data){\n displayUser(data);\n var commentWrapper=$(\"#commentWrapper\");\n if(commentWrapper){\n $(\"#visiter_message\").remove();\n submitLike();\n displayCommentsForm();\n }\n var loginWrapper=$(\"#loginWrapper\");\n if(loginWrapper){\n loginWrapper.remove();\n }\n });\n}", "function check(un)\n {\n $('#pageLoader').hide();\n var request = $.ajax({\n type: 'POST',\n timeout: 5000,\n url: 'http://52.74.70.40/lnd/lndusers.php',\n data: {uname:un,rqid:7} })\n .done(function(data) {\n var json = JSON.parse(data);\n\n if (json.status == true)\n\t{\n\t$(\".container4\").show();\n\n\t}\n\telse\n\t{\n\t//alert(\"user already not exsits\");\n\t$(\".container4\").hide();\n\t}\n\n })\n .fail(function() { alert(\"error\");\n jQuery('#pageLoader').hide();\n })\n .always(function() { });\n\n }", "function addExistingProf() {\n\n $.ajax({\n method: 'POST',\n url: `/addProfDex/${$('#profName').html()}?fname=${$('#profPic').attr(\"data-fname\")}&lname=${$('#profPic').attr(\"data-lname\")}`,\n success: function(data) {\n if(data == 'success') {\n $('#new_prof').modal('hide')\n refreshProfCatalogue()\n } else {\n alert(\"Adding professor to profdex failed!\")\n }\n }\n });\n}", "function IsValiedData()\n{\n if (document.getElementById('txtUserName').value == \"\")\n { \n document.getElementById(\"txtUserName\").focus();\n document.getElementById(\"txterror\").innerHTML = \"Please Enter User Name\";\n return false;\n } else if (document.getElementById('txtPassword').value == \"\") {\n document.getElementById(\"txterror\").innerHTML = \"Please Enter Password\";\n document.getElementById(\"txtPassword\").focus();\n return false;\n } else {\n xmlHttp = GetXmlHttpObject();\n if (xmlHttp == null)\n {\n alert(\"Browser does not support HTTP Request\");\n return;\n }\n\n var url = \"CheckUsers.php\";\n\n url = url + \"?Command=\" + \"CheckUsers\";\n url = url + \"&UserName=\" + document.getElementById('txtUserName').value;\n url = url + \"&Password=\" + document.getElementById('txtPassword').value;\n // alert(url);\n xmlHttp.onreadystatechange = CheckUsers;\n xmlHttp.open(\"GET\", url, true);\n xmlHttp.send(null);\n\n }\n\n}", "function send_userAnd_masterUser_answer(answerForm, answerTextarea, takeDataField, containerLoader, answerAlert, toggleField){\n\t\t$(answerForm).on('submit', function(e){\n\t\t\te.preventDefault();\n\t\t\tvar answer = tinyMCE.get(answerTextarea).getContent();\n\t\t\tvar url = $(answerForm).attr('action');\n\t\t\tvar sender_email = $(takeDataField).data(\"email\");\n\t\t\tvar message_id = $(takeDataField).data('messageid');\n\t\t\tvar message_type = $(takeDataField).data('messagetype');\t\n\t\t\tvar pageId = $(takeDataField).data('page');\n\n\t\t\tif( message_type == 'user' ){\n\t\t\t\tpage = 'user_message.php?user='+ pageId +'&message=' + message_id +' .answer-loader'\n\t\t\t}\n\t\t\telse if (message_type == 'master_user' ){\n\t\t\t\tpage = 'user_message.php?master_user='+ pageId +'&message=' + message_id +' .answer-loader'\n\t\t\t}\n\n\t\t\t//alert(sender_email + ', ' + message_type + ', ' + message_id );\n\n\t\t\tif(confirm('Pošaljite odgovor na poruku?')){\t\t\n\t\t\t\t$.ajax({\n\t\t\t\t\ttype: 'POST',\n\t\t\t\t\turl: url,\n\t\t\t\t\tdata: { answer:answer, sender_email:sender_email, message_id:message_id, message_type:message_type },\n\t\t\t\t\tsuccess: function(response){\n\t\t\t\t\t\tif( !response.error ){\n\t\t\t\t\t\t \t$(containerLoader).load(page, function (){\n\t\t\t\t\t\t \t\t$(answerAlert).append('<span>Uspešno Ste poslali poruku.</span>').css(\"background-color\",\"rgba(46, 204, 113,0.7)\").css(\"margin-bottom\",\"15px\");\n\t\t\t\t\t\t\t\tsetTimeout( function(){ \n\t\t\t\t\t \t\t\t$(answerAlert).fadeOut(5000); \n\t\t\t\t\t \t\t}, 3000);\n\t\t\t\t\t\t \t\t\n\t\t\t\t\t\t \t});\n\t\t\t\t\t\t\t$(answerForm)[0].reset();\n\t\t\t\t\t\t\t$(toggleField).slideToggle();\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tconsole.log('Greška' + response );\n\t\t\t\t\t\t\t$(answerAlert).append('<span>Uspešno Ste poslali poruku.</span>').css(\"background-color\",\"rgba(231, 76, 60,1.0)\").css(\"margin-bottom\",\"15px\");\n\t\t\t\t\t\t\t\tsetTimeout( function(){ \n\t\t\t\t\t \t\t\t$(answerAlert).fadeOut(5000); \n\t\t\t\t\t \t\t}, 3000);\n\t\t\t\t\t\t\t$(answerForm)[0].reset();\n\t\t\t\t\t\t\t$(toggleField).slideToggle();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t},\n\t\t\t\t\terror: function(data){\n\t\t\t\t\t\tconsole.log('Došlo je do greške...' + response);\n\t\t\t\t\t}\n\t\t\t\t});\t\n\t\n\t\t\t}\n\t\t\t\n\t\t});\n\t}", "function check_username()\r\n{\r\nif(document.getElementsByName(\"person\")[0].checked)//student or teacher\r\n{\r\n\tvar person=document.getElementsByName(\"person\")[0].value;\r\n}\r\n\r\nelse var person=document.getElementsByName(\"person\")[1].value;\r\nvar xmlhttp= new XMLHttpRequest();\r\nxmlhttp.onreadystatechange=function(){\r\nif(this.readyState==4 && this.status==200 && this.responseText==1)\r\n{\r\nalert(\"user name is already exist\");\r\ndocument.getElementsByName(\"user_name\")[0].value=\"\";\r\n}\r\n}\r\nxmlhttp.open(\"GET\",\"check_newuer.php?q=\"+document.getElementsByName(\"user_name\")[0].value+\"/\"+person,true);\r\nxmlhttp.send();\r\n}", "function checkValidToken() {\n $('form#reset-token').submit(function(e) {\n e.preventDefault()\n e.stopImmediatePropagation();\n var userResetToken = $('#user-reset-token');\n $.ajax({\n url: \"process/ajaxHandler.php\",\n method: \"POST\",\n dataType: \"JSON\",\n data: {\n action: \"checkToken\",\n userToken: userResetToken.val()\n },\n success: function(response) {\n if (response.status == \"success\") {\n $('form#reset-token').remove();\n $('#container').append(response.passForm)\n $('input#user-reset-pass').focus();\n resetPass();\n } else if (response.status == \"error\") {\n alert(response.description)\n }\n }\n })\n })\n}", "function getUserSuggested(getUserSuggested) {\n waitFunc('enable');\n $.ajax({\n type: 'post',\n url: 'includes/ajax.php',\n data: { getUserSuggested: getUserSuggested },\n success: function(data) {\n waitFunc('');\n if (data == 'error') {\n alertFunc('danger', 'Something went wrong, please try again')\n } else {\n $('#sgstdrslts').html(data);\n $('[data-toggle=\"tooltip\"]').tooltip();\n }\n },\n error: function() {\n waitFunc('');\n alertFunc('info', 'Something went wrong, please try again');\n }\n });\n}", "function verify_name(name){\n $(\".u_error\").hide();\n $(\".u_correct\").hide();\n if(name == \"\"){\n $(\".u_error\").show();\n $(\".u_error\").html(\"Please enter your name\");\n \n } else{\n $.ajax({\n url: \"action.php\",\n method: \"POST\",\n data: {check_name:1,name:name},\n success: function(data){ \n if(data == \"invalid_name\"){\n $(\".u_error\").show();\n $(\".u_error\").html(\"Invalid Name\");\n } else if(data == \"ok\"){\n $(\".u_correct\").show();\n $(\".u_correct\").html(\"OK\");\n }\n }\n });\n } \n }", "function loginProcessTips(url){\n\tvar username = jQuery(\"#username\").val();\n\tvar password = jQuery(\"#password\").val();\n\talert(username);\n/*\tjQuery.ajax({ \n\t type: 'POST', \n\t url: url, \n\t dataType: { 'username' : username, 'password' : password },\n\t cache: false,\n\t success:function(response) {\n\t \tjQuery(\"#username\").val($('#username').val());\n\t \tjQuery(\"#password\").val($('#password').val());\n\t },\t \n\t data: {},\n\t async: false\n\t \n\t});\n\t*/\n\t\n}", "function check_username() {\n var result;\n $.ajax({\n type: 'POST',\n url: 'models/validations/validate_account.php',\n data: {\n username: $('#username').val(),\n },\n cache: false,\n success: function(response) {\n if (response == 0) {\n var message = document.getElementById('checkUsername');\n message.style.color = \"#66cc66\";\n message.innerHTML = \"Username is available\";\n result = true;\n } else {\n var message = document.getElementById('checkUsername');\n message.style.color = \"#ff6666\";;\n message.innerHTML = \"Username has duplicate in the database\";\n result = false;\n }\n }\n\n });\n return result;\n}", "function getUserSuggested(getUserSuggested) {\n waitFunc('enable');\n $.ajax({\n type: 'post',\n url: 'includes/ajax.php',\n data: {getUserSuggested: getUserSuggested},\n success: function (data) {\n waitFunc('');\n if (data == 'error') {\n alertFunc('danger', 'Something went wrong, please try again')\n } else {\n $('#sgstdrslts').html(data);\n $('[data-toggle=\"tooltip\"]').tooltip();\n }\n },\n error: function () {\n waitFunc('');\n alertFunc('info', 'Something went wrong, please try again');\n }\n });\n}", "function loginSubmit() {\n var username = document.getElementById('inputUsername').value;\n var password = document.getElementById('inputPassword').value;\n var inputCheck = 0;\n\n if (password === '')\n {\n document.getElementById('passwordBlank').style.display = 'block';\n inputCheck = 1;\n }\n else\n {\n document.getElementById('passwordBlank').style.display = 'none';\n }\n\n if (username === '')\n {\n document.getElementById('usernameBlank').style.display = 'block';\n inputCheck = 1;\n }\n else\n {\n document.getElementById('usernameBlank').style.display = 'none';\n }\n\n // if (inputCheck)\n // return;\n\n var hash = CryptoJS.MD5(password).toString();\n\n var data = {\n \"username\": username,\n \"password\": hash\n }\n\n $.ajax ({\n url: domain_url + \"authentication/auth.php?username=\" + username + \"&password=\" + hash,\n success: function(response) {\n switch (response) {\n case 'AUTHENTICATION_ERROR_WRONG':\n document.getElementById('login-info-wrong').style.display = 'block';\n document.getElementById('login-not-activate').style.display = 'none';\n break;\n case 'AUTHENTICATION_ERROR_ACTIVATE':\n document.getElementById('login-not-activate').style.display = 'block';\n document.getElementById('login-info-wrong').style.display = 'none';\n break;\n default:\n window.location.href = domain_url + \"home.php\"\n }\n }\n });\n}", "function submit_button_click(sender) {\n // parse out the userId text from the id\n sender.className = \"not-ready\";\n\n var userId = sender.id.substring(sender.id.indexOf('-')+8, sender.id.length);\n\n // initialize entryAllowed so no else statement is needed\n var entryAllowed = false;\n\n var buttons = document.getElementsByName('allowed-userId-'+userId);\n\n for (let i = 0; i < buttons.length; i++) {\n if (buttons[i].getAttribute('data-choiceId') == 1 && buttons[i].className == \"selected\") {\n // set entryAllowed to 1\n entryAllowed = 1;\n }\n }\n // if selected button is yes \n\n // NSCC Addition\n var officeChoice = document.getElementById('toggle-userId-'+userId).getAttribute('data-choiceid');\n console.log(`office choice: ${officeChoice}`);\n \n\n // ajax post with the userId and whether or not the user was allowed\n $.ajax({\n\n global: false,\n type: 'POST',\n url: '/security/submit', //The url to post to on the server\n dataType: 'html',\n\n //The data to send to the server\n data: {\n // parse the userId number from the userId string\n userId : userId,\n allowed : entryAllowed,\n // NSCC Addition\n office : officeChoice\n },\n\n //The response from the server; result is the data sent back from server; i.e. html code\n success: function (result) { \n if (result == '/logintimeout') {\n window.location.replace(result);\n }\n else {\n refresh();\n }\n },\n\n //Handle any errors\n error: function (request, status, error) { \n serviceError();\n }\n });\n}", "function EnviarUsuario(){\n $('#lblUsuario, #lblNombreC, #lblPass, #lblPassC, #lblRol').hide();\n \n var user = $('#Usuario').val(); var nombre = $('#NombreC').val();\n var clave = $('#Pass').val(); var clave2 = $('#PassC').val();\n var rol = $('#rol option:selected').val();\n \n //alert(rol);\n \n if (user==\"\"){$('#lblUsuario').show(); return false;\n }else if (nombre==\"\"){$('#lblNombreC').show(); return false;\n }else if (clave==\"\"){$('#lblPass').show();return false;\n }else if (clave2==\"\" || clave!=clave2) {$('#lblPassC').show();return false;\n }else if (rol==\"\") {$('#lblRol').show();return false;}\n\n $('#Adduser').hide();\n \n $.ajax({\n url: \"GuardarUsuario/\"+user+\"/\"+nombre+\"/\"+clave+\"/\"+rol,\n type: \"post\",\n async:true,\n success:\n function(){\n swal({title: \"EL USUARIO SE AGREGO CORRECTAMENTE!\",\n type: \"success\",\n confirmButtonText: \"CERRAR\",\n }).then(\n function(){gotopage(\"Usuarios\");}\n )\n }\n });\n}", "function onCheckUsernameResponse(response, request)\n{\n let username = $$(\"input[name='username']\");\n if (request.lastUsername !== username.value)\n {\n return;\n }\n\n // Username hasn't changed\n if (response.value == \"1\")\n {\n // It's available!\n username.style.backgroundColor = \"rgb(63, 100, 69)\";\n username.title = \"Username available\";\n }\n else\n {\n // It exists!\n username.style.backgroundColor = \"rgb(100, 66, 69)\";\n username.title = \"Username already exists\";\n }\n}", "function z_usersPassword(id) {\r\n var usrId = id;\r\n var pass = $(\"#newPassword\").val();\r\n var cnfmPass = $(\"#confirmPassword\").val();\r\n if ($(\"#resetPassForm\").valid()) {\r\n var data = {\r\n userId: usrId,\r\n password: pass\r\n };\r\n $.ajax({\r\n url: \"/api/updateUserCredential\",\r\n type: \"POST\",\r\n data: data,\r\n dataType: 'text',\r\n success: function (result) {\r\n console.log(result);\r\n var form = document.getElementById(\"resetPassForm\");\r\n if (result.split(\":\")[1] == \"Done\") {\r\n alertPopup('success', \"Password Updated Successfully\");\r\n } else {\r\n alertPopup('alert', \"User Not found\");\r\n }\r\n $('#z-resetPass-popup').modal(\"hide\");\r\n },\r\n error: function (result) {\r\n console.log(result);\r\n }\r\n });\r\n }\r\n}", "function UserNameValidator(username)\n{\nvar httpxml;\ntry\n{\n// Firefox, Opera 8.0+, Safari\nhttpxml=new XMLHttpRequest();\n}\ncatch (e)\n{\n// Internet Explorer\ntry\n{\nhttpxml=new ActiveXObject(\"Msxml2.XMLHTTP\");\n}\ncatch (e)\n{\ntry\n{\nhttpxml=new ActiveXObject(\"Microsoft.XMLHTTP\");\n}\ncatch (e)\n{\nalert(\"Your browser does not support AJAX!\");\nreturn false;\n}\n}\n}\nfunction stateck()\n{\nif(httpxml.readyState==4)\n{\ndocument.getElementById(\"UserNameError\").innerHTML=httpxml.responseText;\n\n}\n}\n\nurl=\"validation/username-validation.php\";\nurl=url+\"?username=\"+username;\nhttpxml.onreadystatechange=stateck;\nhttpxml.open(\"GET\",url,true);\nhttpxml.send(null);\n}", "function check_availability(){\n\t\t\n\t\t//get the username\n\t\tvar email = $('#email').val();\n\t\t\n\t\t//use ajax to run the check\n\t\t$.post(\"EmailValidatorServlet\", { email: email },\n\t\t\tfunction(result,status){\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\tif(result==\"alr_reg\"){\n\t\t\t\t\t\n\t\t\t\t\t$('#username_availability_result').html('<span class=\"is_not_available\"><b>' +email + '</b> is already registered!</span>');\n\t\t\t\t\t$('#email').val('');\n\t\t\t\t\t$(\"#email\").focus();\n\t\t\t\t}\n\t\t\t\tif(result==\"available\"){\n\t\t\t\t\t\n\t\t\t\t\t$('#username_availability_result').html('<span class=\"is_available\"><b>' +email + '</b> is AVAILABLE!</span>');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(result==\"unavailable\"){\n\t\t\t\t\t\n\t\t\t\t\t$('#username_availability_result').html('<span class=\"is_not_available\"><b>' +email + '</b> is not a college member!</span>');\n\t\t\t\t\t$('#email').val('');\n\t\t\t\t\t$(\"#email\").focus();\n\t\t\t\t}\n\t\t\n\t});\n\n}", "function update_alter_user_info_html(){\r\n $.post(BASE_PATH + 'user/user_alter_info_html', {'other_token' : $(\"#other-csrf\").val()}, function(result){\r\n if(result.code != 0){\r\n $(\"#user-info-alter-tab\").html('<BR><div class=\"alert alert-danger\" role=\"alert\"><p class=\"text-center\">(' + result.code + '):' + result.msg + '</p></div>');\r\n }else {\r\n $(\"#user-info-alter-tab\").html(result.data);\r\n }\r\n }, 'json');\r\n}", "function signUp() {\n\n /* gathers the username and password*/\n var username = $('#sign-up-username').val();\n var password = $('#sign-up-password').val();\n /* resets the input fields */\n $('#sign-up-username').val('');\n $('#sign-up-password').val('');\n var signUpURL = 'http://web.cs.georgefox.edu/comment/ldelamotte17/user/' + username;\n\n $.ajax({\n type: 'POST', \n url: signUpURL,\n dataType: 'json',\n contentType: 'application/json',\n data: JSON.stringify({\n password: password\n }),\n crossDomain: true,\n success: function() {\n if (password.length == 0 || username.length == 0) {\n openErrorModal();\n }\n else {\n $(\"#open-sign-up-modal\").remove();\n }\n },\n error: openErrorModal\n })\n\n}", "function register() {\n // On server response\n xhttp.onreadystatechange = function() {\n if (this.readyState == 4 && this.status == 200) {\n // Check if username is available\n if (xhttp.responseText == \"ok\") {\n // Check if passwords match\n if (document.getElementById(\"pass1\").value == document.getElementById(\"pass2\").value) {\n // All good, submit the form\n document.querySelector(\"form\").submit();\n }\n else {\n // Passwords don't match, warn user\n document.querySelector(\"#error\").innerHTML = \"Passwords don't match\";\n }\n }\n else {\n // Username taken, warn user\n document.querySelector(\"#error\").innerHTML = \"Username already taken\";\n }\n }\n };\n // XML Http Request\n xhttp.open(\"GET\", \"/api/username/\"+document.querySelector(\"input\").value, true);\n xhttp.send();\n}", "function isOTPCorrect(otp,correctCallback,otpInorrect,signupEmail,signupPassword){\n // console.log(\"checking otop \",otp);\n var data = {};\n data.otp = otp;\n\n var x = $.ajax({\n url:\"/users/checkOTP\",\n type: 'POST',\n async: true,\n data: JSON.stringify(data),\n contentType: 'application/json',\n context: this,\n cache: false,\n processData: false,\n success: function(response){\n if( correctCallback == 1) otpCorrect(response,signupEmail,signupPassword);\n else otpCorrect1(response,signupEmail,signupPassword);\n },\n error: otpInorrect\n })\n .done(function() {\n return true;\n })\n .fail(function() {\n return false;\n })\n .always(function() {\n\n });\n return;\n }", "function checkUMMAIL(username,password,type) {\n\t//alert(\"u: \"+username+\" p: \"+password+\" t: \"+type);\n\t// hide other form fields\n\t$(\"trRePassword\").style.display = \"none\";\t\t\t\n\t$(\"trUsertype\").style.display = \"none\";\n\t$(\"tableProfile\").style.display = \"none\";\n\t$(\"tableProfileForm\").style.display = \"none\";\n\t$(\"tableSubmit\").style.display = \"none\";\n\t$(\"validate\").style.display = \"none\";\n\t$(\"tableUmmailInfo\").style.display = \"none\";\t\t\t\n\t// set xhr dest url\n\tvar url = SERVER_PATH+\"/verify-ummail.php\"; \n\n\t// do xhr\n\tnew Ajax.Request(url, { \n\t\tmethod: 'post', \n\t\tpostBody: 'username='+username+'&password='+password+'&type='+type,\n\t\tonSuccess: function(transport) { \n\t\t\t\n\t\t\t//alert(transport.responseText); \n\n\t\t\tif ( transport.responseText == \"true\" ) {\n\t\t\t\t//alert('igh1');\n\t\t\t\t// this happen when type equals to both and the result of verifying the user in ummail is true\n\t\t\t\tcheckUsernameAvailability(username,type);\n\n\t\t\t} else if ( transport.responseText == \"false\" ) {\n\t\t\t\t//alert('igh2');\t\t\t\t\n\t\t\t\tif ( type != \"both\" ) {\n\t\t\t\t\t// this happen when type equals to internal staff or internal student\n\t\t\t\t\t// and the result of verifying the user in ummail is false\n\t\t\t\t\t$(\"errorMsg\").innerHTML = \"Verification with the UMMAIL failed. Please try again with another username or password.\";\n\t\t\t\t\t$(\"validate\").style.display = \"\";\n\t\t\t\t} else {\n\t\t\t\t\t// this is for both\n\t\t\t\t\t$(\"errorMsg\").innerHTML = \"User exist in ummail. Please try again with another username or password.\";\n\t\t\t\t\t$(\"validate\").style.display = \"\";\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t//alert('igh3');\t\t\t\t\n\t\t\t\t// this happens when type equals to internal staff and internal user and it returns the user info array\n\t\t\t\tvar tempArray = (transport.responseText).split(\"|\");\n\t\t\t\t\n\t\t\t\t// set global_ic_no\n\t\t\t\tif ( type == \"staff\" ) {\n\t\t\t\t//alert('igh4'+global_emp_no);\t\t\t\t\t\n\t\t\t\t\tglobal_emp_no = tempArray[2];\n\t\t\t\t\t$('nameHidden').value = tempArray[0];\n\t\t\t\t} else if ( type == \"student\" ) {\n\t\t\t\t\tglobal_stud_id = tempArray[1];\n\t\t\t\t\t$('nameHidden').value = tempArray[2];\n\t\t\t\t}\n\n\t\t\t\t// set email\n\t\t\t\tif ( type == \"staff\" ) {\n\t\t\t\t\t//alert('igh5');\n\t\t\t\t\t$('emailHidden').value = username+\"@um.edu.my\";\n\t\t\t\t} else if ( type == \"student\" ) {\n\t\t\t\t\t$('emailHidden').value = username+\"@perdana.um.edu.my\";\n\t\t\t\t}\n\t\t\t\t//alert($('nameHidden').value+\",\"+$('emailHidden').value);\n\t\t\t\t// check locally\n\t\t\t\tcheckUsernameAvailability(username,type);\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t},\n\t\tonLoading: function(){\n\t\t\t//$(\"divLoading\").style.display = \"block\";\n\t\t\t$(\"errorMsg\").innerHTML = \"Verifying with UMMAIL...&nbsp;&nbsp;&nbsp;<img src='../img/load.gif'>\";\n\t\t},\n \tonLoaded: function(){\n\t\t\t//$(\"divLoading\").style.display = \"none\";\n\t\t} \n\t}); \n}", "function ajaxFailed(ajax) {\n\t$('errors').textContent = $(\"name\").value + \" is taken \";\n $(\"reg\").disabled = true;\n}" ]
[ "0.6795515", "0.67907023", "0.6316873", "0.63139737", "0.62242573", "0.61049604", "0.60875", "0.60468954", "0.604207", "0.6031355", "0.602438", "0.5985128", "0.59655863", "0.59634167", "0.59096146", "0.59095967", "0.5880554", "0.5871657", "0.58649457", "0.58588123", "0.585648", "0.5840358", "0.5836878", "0.58321357", "0.5816088", "0.580828", "0.58002484", "0.57971907", "0.57952684", "0.57721335", "0.57721007", "0.57227117", "0.5717113", "0.5685862", "0.5685383", "0.5656626", "0.5652888", "0.56317157", "0.56117374", "0.5610301", "0.558835", "0.55874556", "0.5585509", "0.558374", "0.55818886", "0.55809563", "0.5579918", "0.5572319", "0.55662036", "0.55612", "0.5559348", "0.55338806", "0.55337644", "0.5527758", "0.5523312", "0.55196464", "0.5510212", "0.5508307", "0.5507603", "0.55056787", "0.5502913", "0.5498875", "0.5498189", "0.54981434", "0.5495364", "0.5493416", "0.54885775", "0.54837304", "0.54831564", "0.54827285", "0.5480631", "0.5478986", "0.547711", "0.5474592", "0.5456363", "0.54515713", "0.5446945", "0.5432434", "0.5428926", "0.5428747", "0.5419718", "0.5416533", "0.5400957", "0.5399541", "0.53977585", "0.53969246", "0.5389489", "0.5389103", "0.5386699", "0.53864133", "0.538213", "0.53758776", "0.5375337", "0.5374589", "0.5374189", "0.5373419", "0.53684676", "0.5367803", "0.53667384", "0.53666157" ]
0.66275233
2
Ajax Call for Admin Login.
function LoginAjaxMethod() { var Myuser = $("#UsernameLogin").val(); var Mypwd1 = $("#PasswornOneLogin").val(); var Mypwd2 = $("#PasswordTwoLogin").val(); $.ajax({ type: "POST", url: "Login.aspx/LoginMethod", data: "{user: '"+ Myuser +"', pwd1: '"+Mypwd1+"', pwd2: '"+Mypwd2+"'}", dataType: "json", contentType: "application/json; charset=utf-8", success: function (response) { window.location = "Dashboard.aspx"; }, error: function () { if (Myuser == "") { $('.ShowMsg').text("Username is Empty"); $('.ShowMsg').css({ 'color': 'red', 'font-weight': 'bold', 'margin-top': '-15px', 'margin-bottom': '20px', 'font-size': '15px' }); $('.ShowMsg').addClass('animated shake'); return false; } else if (Mypwd1 == "") { $('.ShowMsg').text("Password 1 is Empty"); $('.ShowMsg').css({ 'color': 'red', 'font-weight': 'bold', 'margin-top': '-15px', 'margin-bottom': '20px', 'font-size': '15px' }); $('.ShowMsg').addClass('animated shake'); return false; } else if (Mypwd2 == "") { $('.ShowMsg').text("Password 2 is Empty"); $('.ShowMsg').css({ 'color': 'red', 'font-weight': 'bold', 'margin-top': '-15px', 'margin-bottom': '20px', 'font-size': '15px' }); $('.ShowMsg').addClass('animated shake'); return false; } else { $('.ShowMsg').hide(); $('#ErrorMsg').text("Username or Password is incorrect"); } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loginAjax() {\n let username = $('input#username').val();\n let pwd = $('input#pwd').val();\n if(username===\"\" || pwd===\"\") {\n loginResponse({status:-1});\n return false;\n }\n sendAjax('login',{\n 'username': username,\n 'password': sha256(pwd)\n });\n return false; // Prevent auto refresh\n}", "function performLogin() {\n $.ajax({\n type: \"POST\",\n url: rootPath + \"login\",\n data: $('.form-login').serialize(),\n dataType: \"text\",\n success: function (e) {\n if (e == \"success\") {\n // log in successful\n window.location.href = rootPath + \"news\";\n } else {\n // display log in error\n $('#login-password').val('');\n $('#alert-container').empty().append(e);\n $('#login-password').focus();\n }\n },\n error: function (XMLHttpRequest, textStatus, errorThrown) {\n if (XMLHttpRequest.readyState == 4) {\n // HTTP error\n $('#alert-container').empty().append(\"<strong>Network error: Please check your internet connection.</strong>\");\n }\n else if (XMLHttpRequest.readyState == 0) {\n // Network error\n $('#alert-container').empty().append(\"<strong>Network error: Please check your internet connection.</strong>\");\n }\n else {\n $('#alert-container').empty().append(\"<strong>An unexpected error occurred.</strong>\");\n }\n }\n });\n }", "function login() {\n $.ajax({\n type: \"POST\",\n contentType: \"application/json\",\n url: \"http://localhost:8181/fabric/security/token\",\n dataType: \"json\",\n data: '{\"username\":\"' + getElementByIdValue(\"username\") + '\", \"password\":\"' + getElementByIdValue(\"password\") + '\"}',\n success: function () {\n authenticated = true;\n $('#loginbox').hide(\"slow\");\n updateTable();\n }\n });\n }", "function loginClick() {\n\t username = $(\"#userName\").val();\n\t password = $(\"#password\").val();\n\t getRememberMestatus();\n\t var params = {\"username\":username,\"password\":password};\n\t var callerId = \"login\";\n\t var url = \"/logon\";\n\t reqManager.sendPost(callerId, url, params, loginSuccessHandler, loginErrorHandler, null);\n\t}", "function adminLogin() {\n var username = $(\"#username\").val();\n var password = $(\"#password\").val();\n\n // Check if the username and password are valid\n if (validAdminCredentials(username, password)) {\n $.ajax({\n url: 'login.php',\n type: 'post',\n data: {\n 'adminLogin': 1,\n 'username': username,\n 'password': password,\n },\n success: function(response) {\n if (response == 'success') {\n window.location.href = \"../Admin/admin.php\";\n }\n else if (response == 'none') {\n document.getElementById(\"admin-error\").innerHTML = \"The username and password do not match.<br>Please try again.\";\n $('#admin-error').show();\n $('#password').val(\"\");\n $('#password').focus();\n }\n else {\n alert(response);\n }\n }\n });\n }\n}", "_handleLogin() {\n if (this.$.loginForm.validate()) {\n let loginPostObj = { phoneNumber: parseInt(this.$.username.value), password: this.$.password.value };\n this.$.loginForm.reset();\n this.action = 'list';\n this._makeAjax('http://10.117.189.147:9090/foreignexchange/login', 'post', loginPostObj);\n }\n }", "function Login() {\n $(\"#login-button\").fadeOut(0);\n $.ajax({\n url: \"/Account/Login?email_login=\" + $(\"#email\").val() + \"&password_login=\" + $(\"#password_login\").val() + \"&rememberMe=\" + $(\"#rememberMe\").is(\":checked\") + \"\",\n type: 'GET',\n cache: false,\n success: function (result) {\n if (result == true) {\n if (view == \"editor\") {\n $(\"#account-floating-div,#login-hidden,#login-register-div\").fadeToggle(200); $(\".overall-mask\").fadeOut(200); isLogin = true;\n }\n else {\n window.location.href = '/Profil';\n }\n }\n else {\n $(\"#login-loading\").hide();\n $(\"#login-alert-label\").slideDown(100);\n $(\"#login-alert-label\").text(\"Giriş başarısız. Lütfen tekrar deneyin.\");\n $(\"#login-button\").fadeIn(0);\n }\n }\n });\n}", "function standardLogin() {\n\tvar baseUrl, url, params;\n\n\tbaseUrl = $('#form-edit input[name=base-url]').val();\n\turl = baseUrl + '/setup/admin/standard-login';\n\tparams = $('.has-ldap :input').serialize();\n\n\t$('.btn-save').attr('disabled', true);\n\t$('.yes-ldap, .no-ldap').hide();\n\t$('.progress').show();\n\n\t$.post(\n\t\turl,\n\t\tparams,\n\t\tfunction (data) {\n\t\t\t$('.progress').hide();\n\n\t\t\tif (data.status === true) {\n\t\t\t\twindow.location = baseUrl + '/setup/accounts/';\n\t\t\t} else {\n\t\t\t\t$('.has-ldap .message .content').html(data.message);\n\t\t\t\t$('.has-ldap .message').show();\n\t\t\t\t$('.no-ldap').show();\n\t\t\t\t$('.btn-save').attr('disabled', false);\n\t\t\t}\n\t\t},\n\t\t'json'\n\t);\n}", "function user_login(){\n\t\t\n\t\tvar userName = document.getElementById(\"loginName\").value;\n\t\t\n\t\tvar password = document.getElementById(\"loginPassword\").value;\n\t\tif(userName==null || userName.length==0){\n\t\t\talert(\"Please enter the user name\");\n\t\t\treturn false;\n\t\t}\n\t\tif(password==null || password.length==0){\n\t\t\talert(\"Please enter the password\");\n\t\t\treturn false;\n\t\t\t\n\t\t}\n\t\tvar req_data = \"requestId=Login&userName=\"+userName+\"&password=\"+password;\n\t\t$.ajax({\n\t\t\turl : \"/Pool4u/DispatcherServlet\",\n\t\t\tcache : false,\n\t\t\tdataType : \"JSON\",\n\t\t\ttype : \"POST\",\n\t\t\tdata : req_data,\n\t\t\tsuccess : function(result) {\n\t\t\t\tvar parsedResponse = $.parseJSON(result);\n\t\t\t\tif (parsedResponse.status == \"SUCCESS\") {\n\t\t\t\t\twindow.location = parsedResponse.url;\n\t\t\t\t} else {\n\t\t\t\t\tvar errorCode = parsedResponse.errorCode;\n\t\t\t\t\t// UserName does not exists. Show register screen\n\t\t\t\t\tif (errorCode == 1005) {\n\t\t\t\t\t\t$(\"#login_div #error_message\").html(\"User does not exist. Please Register<br/>\");\n\t\t\t\t\t}\n\t\t\t\t\t// Password is wrong. \n\t\t\t\t\telse if (errorCode == 1004) {\n\t\t\t\t\t\t$(\"#login_div #error_message\").html(\"Invalid Password<br/>\");\n\t\t\t\t\t}\n\t\t\t\t\t// User not verified\n\t\t\t\t\telse if (errorCode == 1006) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tshow_auth(\"login\");\n\t\t\t\t\t\t$(\"#authorization_box_login #login_auth_error\").html(\"User not confirmed. Enter confirmation code below<br/>\");\n\t\t\t\t\t}\n\t\t\t\t\telse if (errorCode == 1007) {\n\t\t\t\t\t\t$(\"#login_div #error_message\").html(\"User not active. Please contact administrator at [email protected] to activate your account!<br/>\");\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}", "function login() {\n var uebergabe = new Array;\n uebergabe.push($(\"#mainLoginUsername\").val());\n uebergabe.push($(\"#mainLoginPassword\").val());\n uebergabe.push(adminNecessary);\n $.ajax({\n type: \"POST\"\n , async: true\n , url: \"loginAjax.php\"\n , data: {\n getData: uebergabe\n }\n , success: function (data) {\n var json = JSON.parse(data);\n if (json.state == \"ok\") {\n window.location = redirectUrl;\n }\n else {\n $(\"#messageIcon\").html(json.icon);\n $(\"#messageText\").html(json.text);\n $(\"#messageBox\").slideDown();\n }\n }\n , error: function (data) {\n $(\"#messageIcon\").html(\"cancel\");\n $(\"#messageText\").html(\"Es ist ein unbekannter Fehler aufgetreten\");\n $(\"#messageBox\").slideDown();\n }\n });\n}", "function logmein(e) {\n\t\n \t_serverurl = e.data.serverurl;\n \t$.support.cors = true;\n \t// if ('undefined' !== typeof netscape) netscape.security.PrivilegeManager.enablePrivilege(\"UniversalXPConnect\");\n \t$.post(_serverurl+'ajaxlogin',{username: e.data.username , password: e.data.password} , function(data) { showhome(data, e.data); }, 'json')\n .error(function(e) { $('#logerrors').text(e.responseText); });\n return false;\n\t }", "function login() {\n var usr = $('#usr').val();\n var pwd = $('#pwd').val();\n if (usr != \"\" && pwd != \"\") {\n $.postJSON(phpAjax, {f: 'get_login', usr: usr, pwd: pwd}, function (json) {\n M.toast({html: json.msg, classes: 'rounded'});\n if (json.status == true) {\n $('#usr').val('');\n $('#pwd').val('');\n window.location.href = json.web;\n }\n });\n } else {\n M.toast({html: 'Todos los campos son obligatorios', classes: 'rounded'});\n }\n}", "function doLogin (event) {\n\tdisableLoginInput();\n\t\n\t// get email\n\tvar email = document.getElementById('loginEmail').value;\n\t// get password\n\tvar password = document.getElementById('loginPassword').value;\n\t\n\t// construct the data to POST to /api/login\n\tvar dataString = 'email=' + email + '&password=' + password;\n\t$.ajax({\n\t type: 'POST',\n\t url: '/api/login',\n\t data: dataString,\n\t success: login_response,\n\t dataType: 'text'\n\t});\n}", "function adminLogin(){\n formData={};\n $('#admin-id').popover('destroy');\n formData.id=$('#admin-id').val();\n \n formData.password=$('#admin-pwd').val();\n \n formData.remember=$(\"#admin-rem\").prop('checked');\n \n if(formData.id && formData.password)\n $.post('/api/login/ad-login/', formData, adminLoginHandler);\n else\n $('#admin-id').popover('show');\n \n\treturn false;\n}", "function login() {\n //Get error symbol\n let errorSymbol = document.getElementById(\"loginInvalid\");\n //Get username and password from form\n let username = document.getElementById(\"loginUsername\").value;\n let password = document.getElementById(\"loginPassword\").value;\n console.log(username + \" \" + password);\n //Send to server\n let params = {\n \"username\": username,\n \"password\": password\n };\n $.ajax({\n type: 'POST',\n url: api + \"/login\",\n data: params,\n dataType: \"text\",\n //If successful, pass token to dashboard\n success: function (resultData) {\n resultData = JSON.parse(resultData);\n window.location.href = \"/dashboard.html?t=\" + encodeURIComponent(resultData.token) + \"&uid=\" + resultData.user + \"&uname=\" + username;\n },\n //If unsuccessful show error\n error: function (data) {\n errorSymbol.className += \" d-block\";\n }\n });\n}", "function adminLogin() {\r\n\t//declare variable\r\n\tvar result = true;\r\n\tvar errorMess = \"\";\r\n\tvar admin_name = document.getElementById(\"admin_name\");\r\n\tvar password = document.getElementById(\"password\");\r\n\r\n\tadmin_name = admin_name.value.trim();\r\n\r\n\tpassword = password.value.trim();\r\n\tif (admin_name == \"\") {\r\n\t\terrorMess += \"Please enter Admin Name.<br/>\";\r\n\t\tresult = false;\r\n\t}\r\n\r\n\tif (password == \"\") {\r\n\t\terrorMess += \"Please enter password.<br/>\";\r\n\t\tresult = false;\r\n\t}\r\n\r\n\tif (!result) {\r\n\t\tnotification.className = \"error\";\r\n\t\tnotification.innerHTML = errorMess;\r\n\t} else {\r\n\t\t//body of post request\r\n\t\tvar bodyOfRequest = \"admin_name=\" + encodeURIComponent(admin_name) + \"&password=\" + encodeURIComponent(password);\r\n\t\t//send log in request\r\n\t\txHRObject.open(\"POST\", \"mlogin.php\", true);\r\n\t\txHRObject.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');\r\n\t\txHRObject.onreadystatechange = login; //callback function\t\r\n\t\txHRObject.send(bodyOfRequest);\r\n\t}\r\n}", "function getAdminCheck() {\r\n\tpass=document.getElementById(\"ACCESS_code\").value\r\n\tvar arguments = \"ACCESS_code=\" + pass;\r\n\trequest(\"POST\", \"admin.php?methode=ADMIN_login_check\", false, setAdmin_callback, arguments ); /*pas d'AJAX asynchrone, car manipulation sur champ*/\r\n}", "function Login(userId, password) {\n //console.log('logging in');\n return $.ajax({\n type: 'POST',\n data: '{userId: \"' + userId + '\", password: \"' + password + '\"}',\n url: 'ws_Data.asmx/Login',\n contentType: 'application/json; charset=utf-8',\n dataType: 'json'\n });\n}", "function login(){\n var username = $('#username').val();\n var password = $('#psw').val();\n if(username == \"\"){\n $('#username').css('border-color','red').focus();\n return false;\n }\n if(password == \"\"){\n $('#psw').css('border-color','red').focus();\n return false;\n }\n $('#load').html('<img src=\"'+base_url+'assets/images/ajax-load.gif\">');\n $.post(base_url+\"Ajax_script/login\",\n {username:username,password:password},\n function(data){\n $('#load,.login_err').html('');\n //console.log(data);\n if(data==\"suc\"){\n window.location = base_url+'user_panel/dashboard';\n }\n if(data==\"err\") {\n $('.btn_err').addClass('btn-danger');\n $('.login_err').html(\"<center class='text-danger'>Wrong username or password!</center>\").css('color', 'red');\n }\n });\n }", "function postLoginForm(){\n $.post({\n url: index + \"users/login\",\n data: {email: $('#useremail').val(), password: $('#userpassword').val()},\n success: function(data){\n setApiToken(data.api_token, $('#useremail').val());\n $('#loggedin').text(\"logged in as \" + $('#useremail').val());\n $('#status').text(\"Logout\");\n $('#newmodal').modal('hide');\n checkStatus()\n },\n error: function(data){\n var error = data;\n $('#userformerrors').html(\"<p class=\\\"bg-danger\\\">\" + data.responseJSON.error + \"</p>\");\n }\n })\n }", "function login()\n{\n\temail = document.getElementById(\"inputEmail\").value;\n\tpassword = document.getElementById(\"inputPassword\").value;\n\tmakeRequest('GET', \"http://138.197.7.194/api/users/?email=\" + email + \"&password=\" + password + \"&action=login\", null, true, userLoginResponse);\n\tevent.preventDefault();\n}", "function ajaxLogin(user, pass) {\n $.ajax({\n type: 'POST',\n url: 'account/login.php',\n data: {\n name: user,\n password: pass,\n },\n success: function(response) {\n console.log(response);\n if(response == 'valid') {\n $('nav').load('account/menu.php');\n bindMenu();\n } else {\n $('#loginName, #loginPassword').css('background-color', '#ff4141');\n $('#loginForm .nameError').html('This username and password combination does not exist');\n }\n }\n });\n}", "function auth($username,$email, $password) {\n $.ajax({\n type: \"POST\",\n //SEND TO MY SERVER URL\n url: \"http://localhost:3000/users\",\n dataType: 'json',\n //async: false,\n data: { 'username': $username, 'email':$email,'password': $password ,'ent':-1,'lit':-1,'gk':-1,'tech':-1,'sports':-1},\n success: function (response) {\n $.session.set('username', $username);\n $(window).attr('location', '../html/user_dashboard.html');\n \n \n \n \n console.log(response);\n }\n })\n}", "function doLogin() {\n\tlet userNameInput = $('#userNameInput').val();\n\tlet userPasswordInput = $('#passwordInput').val();\n\tlet json = null;\n\tlet messages = [];\n\t\n\t// empty the password field\n\t$('#passwordInput').val(\"\");\n\t\n\tlet loginObj = {\n\t\t\t\"username\": userNameInput,\n \"password\": userPasswordInput\n };\n\t\n\tlet xhr = new XMLHttpRequest();\n xhr.onreadystatechange = function(){\n \tif(xhr.readyState == 4) {\n \t\tswitch (xhr.status) {\n \t\tcase 200:\n \t\t\tjson = JSON.parse(xhr.responseText);\n \t\tuser_id = json.employee_id;\n \t\t\n \t\tloadUser(json.first_name, json.last_name, json.role.name);\n \t\tbreak;\n \t\tcase 401:\n \t\t\tjson = JSON.parse(xhr.responseText);\n \t\t\tmessages.push(json.text);\n \t\t\traiseAlert(json.code,messages);\n \t\t\tbreak;\n \t\tcase 404:\n \t\t\tjson = JSON.parse(xhr.responseText);\n \t\t\tmessages.push(json.text);\n \t\t\traiseAlert(json.code,messages);\n \t\t\tbreak;\n \t\t}\n \t}\n }\n \n xhr.open(\"POST\", 'login');\n xhr.setRequestHeader(\"Content-type\", \"application/json\");\n let toSend = JSON.stringify(loginObj);\n \n xhr.send(toSend);\n}", "function loginSL(pass) {\n // PHP: http://localhost:7833/cportal/login&username=dylan&password=asdf\n // REST: http://localhost:7833/cportal/login?username=dylan&password=asdf\n console.log(\"User '\" + User + \"' attempting SL login @ \" + ServerAddress + \"..\");\n console.log(\"Attempting GET (Boolean) >> \" + ServerAddress + \"/cportal/login?username=\" + User + \"&password=***\");\n var request = \"cportal/login&username=\" + User + \"&password=\" + pass;\n SendAjaxPOST(request);\n}", "loginLogic (username, password)\n {\n $.ajax({\n url: \"http://universys.site/login\",\n type: 'POST',\n data: {\n \"apiVer\" : \"1.0\",\n \"mail\" : username,\n \"password\" : password\n },\n success : function(result) {\n var rol = result.rol;\n setCookie(\"idSesion\", result.idSesion)\n if (rol==\"administrador\") {\n window.location.href = '../html/perfilAdministrador.html'; \n }\n if (rol==\"alumno\") {\n window.location.href = '../html/perfilAlumno.html'; \n }\n if (rol==\"profesor\") {\n window.location.href = '../html/perfilProfesor.html'; \n } \n },\n error: function(result) {\n alert(\"Hubo un error: \" + result.error_code);\n } \n });\n }", "function login() {\n $('#loading-login').show(0);\n\n var inputEmail = $('#email').val(),\n inputPassw = $('#password').val(),\n params = { email: inputEmail, password: inputPassw };\n\n\n $.ajax({\n contentType: 'application/x-www-form-urlencoded',\n crossDomain: true,\n type: 'POST',\n url: session_api,\n data: params,\n success: (data) => {\n console.log(data);\n var snackbarContainer = document.querySelector('#toast');\n var info = { message: 'Login successful' };\n if (data.SessionKey !== undefined && data.SessionKey !== null) {\n sessionStorage['SessionKey'] = data.SessionKey;\n hideIfLogged(200);\n }\n else {\n info = { message: data.message };\n }\n snackbarContainer.MaterialSnackbar.showSnackbar(info);\n $('#loading-login').hide(0);\n loginListener();\n listUserInfo();\n },\n error: (err) => {\n var data = { message: 'Failed, something went wrong. Please try later...' };\n var snackbarContainer = document.querySelector('#toast');\n snackbarContainer.MaterialSnackbar.showSnackbar(data);\n console.error(err);\n $('#loading-login').hide(0);\n },\n dataType: 'json'\n });\n}", "function login() {\n $.LoadingOverlay(\"show\");\n var UserId = $('#txtUsername').val();\n var Pass = $('#txtPassword').val();\n var jsonString = '{\"UserId\": \"' + UserId + '\",\"Password\":\"' + Pass + '\"}';\n $.ajax({\n type: \"POST\",\n contentType: \"application/json; charset=utf-8\",\n url : BaseURL + \"login\",\n data : jsonString,\n dataType : \"Json\",\n success: function (data) {\n if (data.ResponseCode == '200') {\n // showMessage('success', 'Success', \"Data has been saved successfully...!\");\n window.location.href = \"dashboard.html\";\n $.LoadingOverlay(\"hide\");\n return false;\n }\n else {\n $.LoadingOverlay(\"hide\");\n showMessage('danger', 'Error', data.ErrorMessage);\n return false;\n }\n },\n error: function (result) {\n $.LoadingOverlay(\"hide\");\n showMessage('danger', 'Error', result.ErrorMessage);\n console.log(result.status)\n }\n });\n}", "function callAjaxControllerLoginSuccess(msg) {\n var response = JSON.parse(msg);\n // // If there is error\n if (response.msg != 'Success') {\n alert(\"Invalid Username/Password!\");\n //setError('wronglogin,', 'login');\n // If everything are OK\n } else {\n opts.stop = false;\n animateCloseWindow('login', false, true);\n // Redirect\n if (opts.redirection == '1') {\n window.location = opts.profileUrl;\n sessionStorage.setItem(\"user\", response.userId);\n } else {\n window.location.reload();\n sessionStorage.setItem(\"user\", response.userId);\n }\n }\n animateLoader('login', 'stop');\n opts.stop = false;\n }", "function otbot_attempt_login(ot_username, ot_password){\n\n $.post(\n \n // see tip #1 for how we declare global javascript variables\n \n ajaxurl,\n {// here we declare the parameters to send along with the request\n \n action : 'otbot_attempt_login',\n // other parameters can be added along with \"action\"\n //requests only come from pages which originate with our server\n \n //username and password for ot\n otbot_username: ot_username,\n otbot_password: ot_password\n },\n \n function( response ) {\n $('#wait').hide();\n if(response ==\"ERROR!!!\"){\n alert(\"Password or Username is incorrect, please try again.\");\n $('#credentials').show();\n }else{\n cookieName = response;\n $('#status').append('1. ' + ot_username );\n $('#status').attr('otusername',('1. ' + ot_username) );\n otbot_query_projects();\n $('#wait').show();\n \n }\n });//end ajax post\n\n}//end otbot_attempt_login", "function SignIn() {\n let currentURL = $.currentURL;\n\n $.ajax({\n type: 'post',\n dataType: 'json',\n async: false,\n data: {\n username: $('#username').val(),\n password: $('#password').val(),\n\n },\n url: './account/checksignin',\n success: function (msg) {\n var jsonparsed = JSON.parse(msg);\n if (jsonparsed.check == false) {\n \n }\n else if (jsonparsed.check == true) {\n // Check be admin role and come to admin manage\n // Dashboard will showing\n if (jsonparsed.role == \"admin\") {\n window.location.href = \"./admin\";\n }\n // Check be customer role\n // Come the general page with role\n else if (jsonparsed.includes(\"customer\")){\n\n }\n // \n else if (jsonparsed.includes(\"otheruser\")) {\n\n }\n }\n else\n console.log(\"else end\");\n },\n error: function () {\n \n },\n complete: function (rst) {\n if (rst.success) {\n\n }\n else {\n }\n }\n });\n}", "function funcLogAdmin() {\r\n\t$.post(\"logAdmin\",\r\n\t\t{\r\n\t\t\tcmd:\"PostInfo\",\r\n\t\t\tlogin: $(\"#adm_login\").val(),\r\n\t\t\tpassword: $(\"#adm_password\").val()\r\n\t\t},\r\n\t\tfunction(data,status){\r\n\t\t\tif(data == \"fail\") {\r\n\t\t\t\t$('#lblErrorPassword').text(\"Bad connection parameters. Please try again\");\r\n\t\t\t} else {\r\n\t\t\t\tvar tab = new Array();\r\n\t\t\t\ttab = data.split(\";\");\r\n\t\t\t\twindow.location.href = 'admin.html?login='.concat(tab[0]).concat(\"&nom=\").concat(tab[1]).concat(\"&prenom=\").concat(tab[2]).concat(\"&lastConnexionDate=\").concat(tab[3]).concat(\"&lastConnexionTime=\").concat(tab[4]);\r\n\t\t\t}\r\n\t\t}); \r\n}", "function AJAXLogin(e)\n{\n //check input\n if (!checkInput(\"#LoginModal\"))\n return false;\n else\n {\n //ajax shit\n var url = \"LogIn\";\n $.ajax({\n type: \"POST\",\n url: url,\n data:$(\"#LoginForm\").serialize(),\n success: function (data)\n {\n var $Msg;\n if (data.contains(\"error:\"))\n {\n var message = data.substr((data.indexOf(\":\") + 1));\n $Msg = $(\"<div class='alert alert-danger Alert'> sry, \" + message + \" </div>\");\n $('#loginAlert').html($Msg);\n setTimeout(function () {\n //$errorMsg.remove();\n $Msg.slideUp(500, function () {\n $(this).remove();\n });\n }, 3000);\n }\n else\n {\n updateLogin();\n updateNavBar(data);\n $(\"#LoginModal\").modal('hide');\n }\n \n },\n error: function (var1, error)\n {\n alert(error);\n }\n });\n //end of ajax shit\n }\n}", "function login() {\n var userName = document.getElementById(\"username\");\n var password = document.getElementById(\"password\");\n\n var logonForm = document.getElementById(\"logonForm\");\n logonForm.setAttribute(\"class\", \"hiddenPage\");\n\n request.userName = userName.value;\n\n // the password has not been protected / encyrpted - please change if required.\n request.password = password.value;\n\n // retry the call to the Epicor API\n makeServiceRequest();\n }", "function ajaxCallForLogin(phoneNumber,signinPassword){\n var data = {};\n data.phoneNumber = phoneNumber;\n data.signinPassword = signinPassword;\n\n $.ajax({\n url:\"/users/login\",\n type: 'POST',\n async: true,\n data: JSON.stringify(data),\n contentType: 'application/json',\n context: this,\n cache: false,\n processData: false,\n success: function(response) {\n console.log('Login succesfully',response);\n location.reload();\n },\n error: function(response) {\n console.log('Error with logging in' + response.status);\n if( response.status == 404){\n loginFailedNoAccount(phoneNumber,signinPassword);\n }\n else if( response.status == 401 ){\n loginFailedNoMatch();// password and mobile do not match\n }\n else if( response.status == 400 ){\n console.log(\"error page\");\n }\n }\n });\n }", "function submitForm()\n\t {\t\t\n\t\tusername=$(\"#username\").val();\n \t\tpassword=$(\"#password\").val();\n \t\tuser_role= $(\"input[name='user_role']:checked\").val();\n\t\t\t\t\n\t\t\t$.ajax({\n\t\t\t\t\n\t\t\ttype : 'POST',\n\t\t\turl : 'index.php?login/ajax_login',\n\t\t\tdata: \"username=\"+username+\"&password=\"+password+\"&user_role=\"+user_role,\n\t\t\tdataType: 'json',\n\t\t\tbeforeSend: function()\n\t\t\t{\t\n\t\t\t\t$(\"#error\").fadeOut();\n\t\t\t\t$(\"#btn-login\").html('<i class=\"fa fa-exchange\" aria-hidden=\"true\"></i> &nbsp; Processing!! &nbsp;Wait...');\n\t\t\t},\n\t\t\tsuccess : function(response)\n\n\t\t\t {\t\n\t\t\t var login = response.login_status;\t\t\t \n\t\t\t var redirect = response.redirect_url;\t\t\t\t\t\n\t\t\t\t\tif(login ==\"success\"){\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t$.Notification.autoHideNotify('success', 'top right', 'Welcome Buddy!! Now you are loged in', \"Now you are going to main panel...\");\n\t\t\t\t\t\tsetTimeout(' window.location.href = \"'+redirect+'\"; ',1000);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t$(\"#error\").fadeIn(1000, function(){\n\t\t\t\t\t\t$.Notification.autoHideNotify('error', 'top center', 'Opps Login Fail:', \"Username and password not match.<br>Please try again!!\");\t\t\n\t\t\t\t\t\t$(\"#btn-login\").html('<i class=\"fa fa-sign-in\" aria-hidden=\"true\"></i> &nbsp; Sign In');\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t }\n\t\t\t});\n\t\t\t\treturn false;\n\t\t}", "function login() {\n $.ajax({\n type: 'POST',\n url: '/login',\n data: JSON.stringify({\n Username: $('#Username').val(),\n Pass: $('#password').val()\n }),\n dataType: 'json',\n async: false,\n success: function(data) {\n console.log(\"Posted Data\");\n },\n error: function(xhr, textStatus, error) {\n console.log(xhr.statusText);\n console.log(textStatus);\n console.log(error);\n }\n });\n\n}", "function login(mail, pass) {\n\n\tvar email = mail ? mail : $('#login input[name=\"txt_email\"]').val();\n\tvar password = pass ? pass : $('#login input[name=\"txt_password\"]').val();\n\t$.ajax({\n\turl: 'api.php',\n\ttype: 'post',\n\tdata: {'login': true, 'txt_email': email, 'txt_password': password},\n\tsuccess: function(json) {\n\t\tif(json.status == 'success'){\n\t\t\twindow.location.replace(\"home.php\");\n\t\t}\n\t\telse if(json.status == 'error'){\n\t\t\t$('#login .error').html(json.data);\n\t\t}\n\t},\n\terror: function(xhr, desc, err) {\n console.log(xhr);\n console.log(\"Details: \" + desc + \"\\nError:\" + err);\n\t}\t\n\t});\n}", "function login() {\n $.ajax({\n url: \"http://localhost:9035/login\",\n type: \"POST\",\n data: {\n username: $(\"#username\").val(),\n password: $(\"#password\").val()\n },\n\n success: function (result) {\n\n\n //if user enters a wrong username or password, notify them\n if (result === \"Wrong username or password.\") {\n $(\"#wrong\").text(result);\n }\n\n //if username and password are correct, redirect to homepage\n else {\n window.location.replace(\"/profile\");\n\n }\n\n\n },\n error: function (err) {\n console.log(\"error\" + err)\n\n }\n\n })\n}", "function login()\n {\n $('#login_form').on('submit',function(e){\n e.preventDefault();//prevent the form from being submitted\n var details = $('#login_form').serialize();\n var url = \"../login/login_user.php\";\n var email = $('#email').val();\n var password = $('#password').val();\n\n $.ajax({\n type:\"POST\",\n url:url,\n data:{\n email:email,\n password:password\n },\n success:function(response)\n {\n if(response == \"success\")\n {\n window.location.href = \"../index.php\";\n }\n else\n {\n $('#response').html(\"incorrect credentials\");\n }\n }\n });\n \n \n });\n }//end of login function", "function logIn() {\n\tvar user = $(\"#user\").val(); // Username\n\tvar pass = $(\"#pass\").val(); // Password\n\tconsole.log(user, pass);\n\thttpPostRequest(\n\t\t'/api-login/login',\n\t\t{user: user, pass: pass},\n\t\t'Login WRONG',\n\t\t(response) => {\n\t\t\t$(\"#name-user\").text(user);\n\t\t\t$(\"#not-logged\").hide();\n\t\t\t$(\"#logged\").show();\n\t\t\t// Random nickName and session\n\t\t\t$(\"#sessionName\").val(\"Session \" + Math.floor(Math.random() * 10));\n\t\t\t$(\"#nickName\").val(\"Participant \" + Math.floor(Math.random() * 100));\n\t\t}\n\t);\n}", "function fnLogin() {\n //Store the text from the inputs in variables\n var sEmail = $(\"#txtLoginEmail\").val();\n var sPassword = $(\"#txtLoginPassword\").val();\n //The URL to be passed via AJAX\n var sUrl = \"services/users/api-login.php?email=\" + sEmail + \"&password=\" + sPassword;\n //Initiate AJAX and get jData in return\n $.getJSON(sUrl, function(jData) {\n //If a match was found and the role is super-admin then show super-admin menu\n if (jData.status == \"ok\" && jData.role == \"super-admin\") {\n fnGetSuperAdminMenu();\n swal({\n title: \"Success!\",\n text: \"Thank you for signing \" + jData.role + \"!\",\n timer: 1000,\n type: \"success\",\n showConfirmButton: false\n });\n setTimeout(function() {\n $(\".wdw\").hide();\n $(\"#wdwMenu\").css(\"display\", \"flex\");\n }, 1000);\n //If a match was found and the role is admin then show admin menu\n } else if (jData.status == \"ok\" && jData.role == \"admin\") {\n fnGetAdminMenu();\n swal({\n title: \"Success!\",\n text: \"Thank you for signing \" + jData.role + \"!\",\n timer: 1000,\n type: \"success\",\n showConfirmButton: false\n });\n setTimeout(function() {\n $(\".wdw\").hide();\n $(\"#wdwMenu\").css(\"display\", \"flex\");\n }, 1000);\n //If a match was found and the role is user then show user menu\n } else if (jData.status == \"ok\" && jData.role == \"user\") {\n fnGetUserMenu();\n swal({\n title: \"Success!\",\n text: \"Thank you for signing \" + jData.role + \"!\",\n timer: 1000,\n type: \"success\",\n showConfirmButton: false\n });\n setTimeout(function() {\n $(\".wdw\").hide();\n $(\"#wdwMenu\").css(\"display\", \"flex\");\n }, 1000);\n //If no match was found then display an error message\n } else {\n sweetAlert(\"Oops...\", \"Something went wrong!\", \"error\");\n }\n });\n}", "function postAuthLogin(username, password) {\n $.ajax({\n type: \"POST\",\n url: '/api/auth/login',\n data: JSON.stringify({\n \"username\": username,\n \"password\": password\n }),\n dataType: 'json',\n contentType: \"application/json\",\n error: error => {\n console.log(error);\n if(error.responseText === 'Unauthorized'){\n $('.loginError').text('The username or password you\\'ve entered doesn\\'t match any account.');\n } else {\n $('.loginError').text('Username/password error');\n }\n }\n })\n .done(function(json) {\n window.sessionStorage.accessToken = json.authToken;\n localStorage.setItem('userId', json.userId);\n window.location = 'vacations.html';\n });\n}", "function customerLogin() { \n\n\t\t\t$( \"#load\" ).show();\n\t\t\t\n\t\t\tvar form = new FormData(document.getElementById('login_form'));\n\t\t\t\n\t\t\tvar validate_url = $('#login_form').attr('action');\n\t\t\t\n\t\t\t$.ajax({\n\t\t\t\ttype: \"POST\",\n\t\t\t\turl: validate_url,\n\t\t\t\t//data: dataString,\n\t\t\t\tdata: form,\n\t\t\t\t//dataType: \"json\",\n\t\t\t\tcache : false,\n\t\t\t\tcontentType: false,\n\t\t\t\tprocessData: false,\n\t\t\t\tsuccess: function(data){\n\n\t\t\t\t\t\n\t\t\t\t\tif(data.success == true && data.set_security == false){\n\t\t\t\t\t\t\n\t\t\t\t\t\t$( \"#load\" ).hide();\n\t\t\t\t\t\t$(\"input\").val('');\n\t\t\t\t\t\twindow.location.href = baseurl+'account/set-security';\n\t\t\t\t\t\t//$(\".login-box\").html(data.notif);\n\t\n\t\t\t\t\t\tsetTimeout(function() { \n\t\t\t\t\t\t\t//$(\"#notif\").slideUp({ opacity: \"hide\" }, \"slow\");\n\t\t\t\t\t\t\t//window.location.reload(true);\n\t\t\t\t\t\t}, 2000); \n\n\t\t\t\t\t}else if(data.success == true && data.set_security == true){\n\t\t\t\t\t\t$( \"#load\" ).hide();\n\t\t\t\t\t\t$(\"input\").val('');\n\t\t\t\t\t\twindow.location.href = baseurl+'account/dashboard';\n\t\t\t\t\t\t\n\t\t\t\t\t}else if(data.success == false){\n\t\t\t\t\t\t$( \"#load\" ).hide();\n\t\t\t\t\t\t$(\"#notif\").html(data.notif);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t},error: function(xhr, status, error) {\n\t\t\t\t\t$( \"#load\" ).hide();\n\t\t\t\t},\n\t\t\t});\n\t\t\treturn false;\n\t\t}", "function loginUser(email, password) {\n $.post(\"/api/login\", {\n email: email,\n password: password\n })\n .then(() => {\n\n\n window.location.replace(\"/members\");\n // If there's an error, log the error\n })\n .catch(err => {\n console.log(err);\n });\n }", "function ajaxCallForLogin(loginJson) {\n\n document.getElementById(\"errorMessage\").style.display =\"none\";\n myJson = JSON.stringify(loginJson);\n urlLink = \"http://localhost:8080/sandbox/login/\" + myJson;\n $.ajax({\n url: \"http://localhost:8080/sandbox/login/\",\n data: loginJson,\n success: function (result) {\n console.log(result);\n\n if (result['status'] != 404) {\n navigate(result['grade']);\n } else {\n document.getElementById(\"errorMessage\").style.display =\"block\";\n document.getElementById(\"errorMessage\").innerHTML = \"Invalid Login Credentials\";\n }\n },\n error: function (result) {\n document.getElementById(\"errorMessage\").innerHTML = \"Invalid Login Credentials\";\n console.log(\"error message\");\n document.getElementById(\"errorMessage\").style.display =\"block\";\n }\n\n });\n\n}", "function loginApi() {\n var user = document.getElementById(\"user\").value;\n var pass = document.getElementById(\"pass\").value;\n $.post(\"http://eplan.le-styx.net/api/login.php\", {\n username: user,\n password: pass\n },\n function (data, status, xhr) {\n var ar = JSON.parse(data);\n if (ar[\"status\"] == 1) {\n document.getElementById(\"status\").innerHTML = \"Falscher Benutzername und / oder Passwort\";\n } else {\n\n }\n });\n}", "function loginUser(email, password) {\n $.post(\"/api/login\", {\n email: email,\n password: password\n })\n .then(() => {\n window.location.replace(\"/members\");\n // If there's an error, log the error\n })\n }", "function checkLogin(){\n\t$.ajax({\n url: \"php/account.php\",\n dataType: 'json',\n method: 'POST',\n data: {\"type\":\"check\"},\n success: function(data){\n \tif(data[\"status\"] != null){\n \t\tif(data[\"status\"] == 200){\n cookie.set(\"user\", data[\"user\"], 1);\n listTem();\n \t\t}else if(data[\"status\"] == -1){\n \t\t\twindow.location.href = \"login.html\";\n \t\t}\n \t}\n },\n error: function(){\n alert(\"[Error] Fail to post data!\");\n window.location.href = \"login.html\";\n }\n });\n}", "function requestLogin() {\n clearWarnings();\n const email = document.getElementsByName('email')[0].value;\n const pass = document.getElementsByName('password')[0].value;\n\n const ajax = new XMLHttpRequest();\n ajax.onreadystatechange = function() {\n if (this.readyState == 4 && this.status == 200) {\n console.log(this.responseText);\n const response = JSON.parse(this.responseText);\n // Check status\n if (response['login'] === 'fail') {\n if (response['error'] === 'email unknown') {\n showWrongEmail();\n } else if (response['error'] === 'passwords no match') {\n showWrongPass();\n }\n } else if (response['login'] === 'success') {\n // Redirect to the main page\n window.location = './pages/start.php';\n }\n }\n };\n\n ajax.open('POST', '../server/login.php', true);\n ajax.setRequestHeader('Content-Type', 'application/json');\n ajax.send(JSON.stringify({'email': email, 'password': pass}));\n}", "function callAjaxControllerLogin(windowName) {\n var lgdt = new Object();\n var lgdt1 = new Object();\n if (windowName == 'login') {\n lgdt1.username = opts.email;\n lgdt1.password = opts.password;\n lgdt.loginDetails = lgdt1;\n var loginDetails = JSON.stringify(lgdt);\n // If there is no another ajax calling\n if (opts.stop != true) {\n opts.stop = true;\n // Load the Loader\n animateLoader('login', 'start');\n // Send data\n jcnlGlobalAjax(mthdP, loginDetails, opts.controllerUrl, callAjaxControllerLoginSuccess, callAjaxLControllerFailed);\n }\n } else {\n lgdt1.username = $('#email').val();\n lgdt1.password = $('#pass').val();\n lgdt.loginDetails = lgdt1;\n var loginDetails = JSON.stringify(lgdt);\n animateLoader('loginPage', 'start');\n jcnlGlobalAjax(mthdP, loginDetails, opts.controllerUrl, callAjaxControllerLoginPageSuccess, callAjaxLControllerPageFailed);\n }\n \n }", "function login(username, password){\n let _tempUrl = server_url+\"login/\"+username+\"/\"+password;\n $.ajax({\n url: _tempUrl,\n dataType: \"jsonp\",\n type: \"POST\",\n contentType: \"application/json; charset=utf-8\",\n success: function (result, status, xhr) {\n let _status = getResultKwick(result, 'login', 'status');\n let token = getResultKwick(result, 'login', 'token');\n let idUser = getResultKwick(result, 'login', 'id');\n if(_status==\"done\"){\n //Connexion OK\n let urlRedirect = \"chat.html\";\n //Session storage\n localStorage.setItem('user', username);\n localStorage.setItem('token', token);\n localStorage.setItem('idUser', idUser);\n localStorage.setItem('welcoming', 'true');\n //Redirection vers la page d'accueil\n window.location.href = urlRedirect;\n }else if(_status==\"failure\"){\n //Modal\n Swal.fire({\n icon: 'error',\n title: 'Ooops...',\n text: 'Identifiant ou mot de passe incorrect.',\n });\n }\n },\n error: function (xhr, status, error) {\n console.log(\"Error\");\n }\n });\n }", "function loginUser(username, password) {\n $.post(\"api/user/login\", {\n username: username,\n password: password\n })\n .then(function() {\n console.log(\"Success!\")\n })\n .catch(function(err) {\n console.log(err);\n });\n }", "function postUserLogin(callback, un, pw){\n\tconst settings = {\n\t\turl: DATABASE_URL + 'api/auth/login',\n\t\tmethod: 'POST',\n\t\t\tdata: JSON.stringify({\n\t\t\t\t\"username\": un,\n\t\t\t\t\"password\": pw\n\t\t\t}),\n\t\t\tdataType: 'json',\n\t\t\theaders: {\n\t\t\t\t'Content-Type': 'application/json'\n\t\t\t},\n\t\t\tsuccess: callback,\n\t\t\terror: console.error('error POST postUserLogin')\t\t\n\t};\n\t$.ajax(settings);\t\n}", "function callAjaxControllerLoginPageSuccess(msg) {\n var response = JSON.parse(msg);\n // // If there is error\n if (response.msg != 'Success') {\n //set error.\n alert(\"Username and/or Password is worng!\");\n // If everything are OK\n } else {\n // Redirect \n window.location = opts.profileUrl;\n sessionStorage.setItem(\"user\", response.userId);\n }\n animateLoader('loginPage', 'stop');\n }", "function loginUser(email, password) {\n $.post(\"/api/login\", {\n email: email,\n password: password\n })\n .then(() => {\n window.location.replace(\"/members\");\n })\n .catch(err => {\n // If there's an error, log the error\n console.log(err);\n });\n }", "function loginAdmin(email, password, success, failure) {\n self.loggedInUser = null;\n self.accessToken = null;\n localStorage.removeItem('usergrid_user');\n localStorage.removeItem('usergrid_access_token');\n var formdata = {\n grant_type: \"password\",\n username: email,\n password: password\n };\n apiRequest(\"POST\", \"/management/token\", formdata, null, function (response) {\n if (response && response.access_token && response.user) {\n self.loggedInUser = response.user;\n self.accessToken = response.access_token;\n if (self.loggedInUser.organizations) {\n for (first in self.loggedInUser.organizations) break;\n if (first) {\n self.currentOrganization = self.loggedInUser.organizations[first].uuid;\n }\n }\n localStorage.setObject('usergrid_user', self.loggedInUser);\n localStorage.setObject('usergrid_access_token', self.accessToken);\n if (success) {\n success();\n }\n } else if (failure) {\n failure();\n }\n }, function (XMLHttpRequest, textStatus, errorThrown) {\n if (failure) {\n failure();\n }\n });\n }", "function login() {\n var email = $(\"#loginEmail\").val();\n var password = $(\"#loginPassword\").val();\n var userid = \"\" + email + password;\n\n // call getUser in userHandler\n userHandler.getUser(userid);\n}", "function login() {\n const loginData = {\n 'email' : document.getElementById('login-email').value,\n 'password' : document.getElementById('login-password').value\n };\n if (!validator.isEmail(loginData.email)) {\n document.getElementById('login-error').innerHTML = 'неверный email';\n } else if (!validator.isAlphanumeric(loginData.password)) {\n document.getElementById('login-error').innerHTML = 'неверный пароль';\n } else {\n $.post( '/authorization', loginData)\n .done(res => {\n alert(res);\n });\n };\n}", "function login(e) {\n var url = 'https://bookmarkpack-server.herokuapp.com/auth/login'\n\n // Get email and password from the user form\n var email = $.emailTextField.value\n var password = $.passwordTextField.value\n\n var params = {\n 'email': email,\n 'password': password\n }\n\n // Prepare and start the API call\n var loader = Titanium.Network.createHTTPClient()\n loader.onload = onLoginComplete\n loader.onerror = onLoginError\n loader.open('POST', url)\n loader.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded')\n loader.send(params)\n\n // Show the loading spinner\n startLoading()\n}", "function login() {\n\n var username = $('#login-username').val();\n var password = $('#login-password').val();\n $('#login-username').val('');\n $('#login-password').val('');\n var loginURL = 'http://web.cs.georgefox.edu/comment/ldelamotte17/login';\n\n $.ajax({\n type: 'POST', \n url: loginURL,\n dataType: 'json',\n contentType: 'application/json',\n data: JSON.stringify({\n username: username,\n password: password\n }),\n crossDomain: true,\n success: function() {\n if ($(\"#open-sign-up-modal\").length) {$(\"#open-sign-up-modal\").remove();}\n $('#login-space').empty();\n $(\"#login-space\").append(\"<p class='text-right'><button type='button' class='btn btn-link' id='logout' onclick='logout();'>Log Out</button></p>\");\n sessionStorage.setItem(\"username\", username);\n setLoginStatus(true);\n getPreviousComments();\n },\n error: openErrorModal\n })\n\n}", "function clickLogIn() {\n\tvar email = ($('.email-login').find('input[type=email]')).val();\n\tvar password = ($('.email-login').find('input[type=password]')).val();\n\t\n\t$.ajax({\n\t\turl: '\\/login\\/signin',\n\t\tmethod: 'POST',\n\t\tdata: {email, password}\n\t}).done(function(jsondata) {\n\t\twindow.location.href = jsondata.redirect;\n\t}).fail(function() {\n\t\talert(\"Invalid Login Credentials\");\n\t});\n}", "function LoginWebService()\n{\n var email = $('#Username').val();\n var password = $('#Password').val();\n var WebServerIp=\"127.0.0.1\";\n var WebServerPort = 2345;\n $.ajax({\n url: \"http://\" + WebServerIp + \":\" + WebServerPort + \"/autentificare/\" + email + \"/\" + password,\n type: \"POST\",\n cache : false,\n success: function(data, textStatus, jqXHR)\n {\n data = JSON.parse(data);\n if(data.response == \"ok\")\n {\n var url = \"login/UpdateStatus/\" + data.id;\n $.get(url,function(result){ \n window.location.href = \"../Tema2/home\";})\n }\n else\n {\n window.location.href = \"../Tema2/login_failed\";\n }\n \n },\n error: function(jqXHR, textStatus, errorThrown ){\n alert(\"error\");\n }\n });\n\n return false;\n}", "function userLogin(){\r\n\t\r\n\t/*http://localhost:8070/firstapp\r\n*/\r\n\t\tvar data = $('#login-form').serialize();\r\n\t\t$.post(\"/restservices/authentication\", data, function(response){\r\n\t\t\twindow.sessionStorage.setItem(\"sessionToken\", response);\t\r\n\r\n\t\t\t\t$('#login').hide();\r\n\t\t\t\t$('#home').fadeIn(1000);\r\n\r\n\r\n\t\t\t\r\n\t\t}).fail(function(jqXHR, textStatus, errorThrown) {\r\n\t\t console.log(textStatus);\r\n\t\t console.log(errorThrown);\r\n\t\t });\t\r\n}", "function login() {\r\n startProgress();\r\n var loginRequest = {\r\n email: $(\"#txtEmail\").val(),\r\n password: $(\"#txtPassword\").val(),\r\n issuer: $(\"#txtIssuer\").val(),\r\n redirectUri: getRedirectUri()\r\n };\r\n postJson(\"/c2id/api/auth/login\",\r\n loginRequest,\r\n (data) => {\r\n stopProgress();\r\n localStorage[\"bearer-token\"] = data.token;\r\n localStorage[\"given-name\"] = data.givenName;\r\n localStorage[\"family-name\"] = data.familyName;\r\n localStorage[\"preferred-username\"] = data.preferredUsername;\r\n localStorage[\"user-id\"] = data.userId;\r\n setCookie(data.cookie);\r\n var redirectPath = data.redirectUri;\r\n if (!data.redirectUri) {\r\n data.redirectUri = getRedirectUri();\r\n }\r\n window.location.href = data.redirectUri;\r\n }, () => {\r\n stopProgress();\r\n $(\"#txtFailedPassword\").val(loginRequest.password)\r\n showLoginFailed();\r\n }, \"#busyLogin\"\r\n );\r\n}", "function login(){\n\tvar utorId = $(\"#utorid\").val();\n\tvar password = $(\"#password\").val();\n\tvar loginString = \"Login=True&UTORID=\";\n\tloginString += (utorId + '&password=' + password);\n\t$.ajax({\n\t\ttype: \"POST\",\n\t\turl: \"connect2db.php\",\n\t\tdata: loginString,\n\t\tsuccess: function(response){\n\t\t\tif (!(response == \"Incorrect Password\" ||\n\t\t\t\tresponse == \"User Not Found\")){\n\t\t\t\tgetPages();\n\t\t\t\tdisplayPageInfo('Courses');\n\t\t\t}\n\t\t}\n\t})\n}", "function login() {\n var user = document.getElementById(\"login-user\").value;\n var pass = document.getElementById(\"login-pass\").value;\n var errorBox = document.getElementById(\"login-error-box\");\n errorBox.innerHTML = \"\";\n var url = urlBase + \"/login\"\n $.ajax({\n type: \"POST\",\n url: url,\n data: {\n 'user': user,\n 'pass': pass\n },\n dataType: \"json\",\n success: function(response) {\n console.log(response);\n if (response.statusCode == 200) {\n console.log(\"Successful login\");\n // go to agenda with login info\n setCookie(response.body.user, response.body.name, response.body.class_value, response.body.token);\n document.location.href = \"agenda.html\";\n } else if (response.statusCode == 201) {\n console.log(\"Invalid login\");\n errorBox.innerHTML = \"<div class='alert alert-danger' role='alert'><strong>Usernmame/Password incorrect</strong></div>\";\n } else {\n console.log(\"Something is messed up\");\n errorBox.innerHTML = \"Something went wrong, the agenda service might be down or inaccessible\";\n }\n }\n });\n}", "function login(event)\n{\n event.preventDefault();\n\tvar l_username = $('#username').val();\n\tvar l_password = $('#password').val();\n var l_Storefront = 'Storefront';\n var l_start ='Storefront';\n\tapi_async.auth.login(l_username, l_password,\n\t\tfunction (p_data)\n\t\t{\n\t\t\t$.cookie('user_id', p_data.user_id, { expires: 2, path: '/' });\n\t\t\t$.cookie('user_hash', p_data.user_hash, { expires: 2, path: '/' });\n\t\t\t$.cookie('expiration_date', p_data.expiration_date, { expires: 2, path: '/' });\n var session = api_sync.auth.get_current_user();\n window.location = '/';\n if (session.scope)\n {\n if(session.scope_name[0] == '') \n {\n window.location = '/';\n $('#error_msg').text('Succes');\n }\n \n else\n {\n window.location = '/';\n $('#error_msg').text('Succes');\n }\n }\n\t\t},\n\t\tfunction ()\n\t\t{\n\t\t\t$('#password').val('');\n\t\t\t$('#error_msg').text('Wrong Credentials!');\n\t\t});\n}", "function loginCheck(){\n\t\t\t var username = document.getElementById(\"loginUsrname\").value;\n\t\t\t var password = document.getElementById(\"loginPwd\").value;\n\t\t\t if(($.trim(username).length == 0) || ($.trim(password).length == 0)){\n\t\t\t\t $(\"#loginMsg\").get(0).innerHTML = \"Please not leave section blank\";\n\t\t\t\t $(\"#usrname\").select();\n\t\t\t\t $(\"#usrname\").focus();\n\t\t\t } else { \n\t\t\t\t $.ajax({\n\t\t\t\t\t type: \"POST\",\n\t\t\t\t\t url: \"../LoginServlet\",\n\t\t\t\t\t data: \"loginUsrname=\" + username + \"&loginPwd=\" + password,\n\t\t\t\t\t success: function(result){\n\t\t\t\t\t\t if(result == \"true\"){window.location.replace(\"home.jsp\");}\n\t\t\t\t\t\t else{$(\"#loginMsg\").html(\"False username or password\");}\n\t\t\t\t\t }\n\t\t\t\t\t});\n\t\t\t }\n\t\t }", "function loginRegCall(url) {\n var username = $('#username').val();\n var pass = $('#password').val();\n $.ajax({\n url: url,\n type: 'POST',\n data: {username: username, pass: pass},\n success: function (data) {\n location.reload();\n },\n error: function () {\n }\n });\n}", "function onClickLogin(evt) {\n evt.preventDefault();\n var command = $(\"#login\").text();\n if (command === \"Login to See your Stats\") {\n\n // Store CSRF token and current location as cookie\n var csrfToken = uuidGen();\n $.cookie(csrfTokenName, csrfToken);\n $.cookie(hashTokenName, window.location.hash);\n\n // No OAuth token, request one from the OAuth authentication endpoint\n window.location = \"https://login.eveonline.com/oauth/authorize/\" +\n \"?response_type=token\" +\n \"&client_id=\" + clientId +\n \"&scope=\" + scopes +\n \"&redirect_uri=\" + redirectUri +\n \"&state=\" + csrfToken;\n\n } else {\n ajaxSetup(false);\n loginSetup(false);\n }\n }", "function loginUser() {\r\n let email = $('#login-email').val();\r\n let password = $('#login-password').val();\r\n\r\n if(email == null || password == null) {\r\n alert(\"Form cannot be empty\");\r\n }\r\n else {\r\n $.get(address + ':3000/login-user', {email: email, password: password}, function(data) {\r\n if(data.email) {\r\n $.get(address + ':3001/assign-session', {data: data}, function(data2) {\r\n alert(\"Login Success\");\r\n window.location.replace(address + \":3001/\");\r\n });\r\n }\r\n else {\r\n alert(\"Incorrect Credential\");\r\n }\r\n });\r\n }\r\n}", "function checkLogin() {\n\t$.getJSON(\"service/checkLogin.php\", function(data) {\n\t\tif (data['status'] == 'true') {\n\t\t\t// if login, show the interface of after login\n\t\t\thideElement('.non-user-item');\n\t\t\tshowElement('.user-item');\n\t\t\t//direct to the dashboard\n\t\t\tredirect('Dashboard');\n\t\t} else {\n\t\t\t// else, redirect to the home page\n\t\t\tshowElement('#slide-show');\n\t\t\tredirect('Home');\n\t\t}\n\t});\n}", "function login(){\n\n var name = $(\"input[name='name']\").val();\n\n\n var pw = $(\"input[name='pw']\").val();\n\n\n $.ajax({\n type: \"POST\",\n url: 'http://cs496final-140118.appspot.com/login',\n dataType: 'json',\n data:{\n pw: pw,\n name: name\n },\n success:function(html) {\n sessionStorage.setItem('pId', html.pId);\n sessionStorage.setItem('name', html.name);\n $('#user').append(\"<h3>Welcome, \"+sessionStorage.getItem('name')+\"! <button onClick='logout()'>Logout</button></h3>\");\n loadPage();\n\n },\n error: function(html){\n alert(\"Request failed. \" + html.statusText);\n console.log(html);\n }\n });\n}", "function login(userCreds) {\n\tconsole.log(userCreds);\n $.ajax({\n url: \"/auth/login\",\n method: \"POST\",\n data: JSON.stringify(userCreds),\n crossDomain: true,\n contentType: \"application/json\",\n success: loginSuccess,\n \terror: loginFailMessage\n });\n\n}", "function loginUser(email, password) {\n\n $.post(\"/api/login\", {\n email: email,\n password: password\n }).done(function(data) {\n console.log('User logged in!\\n')\n window.location.replace(data);\n\n }).fail(function(err) {\n console.log(err);\n });\n\n }", "function sign_in(){\r\n var uemail = $('#userl_email').val();\r\n var upass = $('#userl_pass').val();\r\n $.ajax('/users/login', \r\n {\r\n type: 'POST',\r\n data: {\r\n email : uemail,\r\n password : upass\r\n },\r\n success: function(data) \r\n {\r\n if(data.success == \"success\"){\r\n $('#login').modal('hide');\r\n location.reload();\r\n }else{\r\n alert(data.success);\r\n }\r\n } \r\n });\r\n}", "function submitLogin(username, password) {\n console.log(\"submitLogin fired\")\n // Store username locally\n localStorage.setItem('uname', username);\n let usernamePassword = {\"username\": username, \"password\": password};\n console.log(\"usernamePassword:\" + JSON.stringify(usernamePassword));\n let settings = {\n url: '/api/auth/login',\n dataType: 'json',\n data: JSON.stringify(usernamePassword),\n contentType: \"application/json\",\n type: 'POST',\n success: function(data) {\n if (data) {\n storeJWT(data)\n }\n },\n error: handleError\n };\n $.ajax(settings);\n}", "function loginAjaxAction(r_json) {\r\n\t\tvar json = eval(unescape(r_json)); /* Données Json dans retourConnexion */\r\n\t\tif (retourConnexion.statut==\"+\") {\r\n\t\t\t$('#bloc_membre').html(retourConnexion.newMenu);\r\n\t\t\t$('#bloc_panier #ulListePanier').html(retourConnexion.newPanier);\r\n\t\t\t$('#ulListePanier').Highlight(500, '#FFFFCC');\r\n\t\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$('#log_submit').show();\r\n\t\t\t$('#log_statut').html(retourConnexion.erreur);\r\n\t\t\t$('#log_statut').css('color', '#FF0000');\r\n\t\t\t$('#form_connexion input.log').css({border:\"1px solid #FF888B\"});\r\n\t\t}\r\n\t}", "function adminLogin(event)\n {\n event.preventDefault();//prevent the form from trying to submit for real because we don't have an actual server yet.\n let username = document.getElementById(\"username\");//I need this to grab the username input by the user.\n let password = document.getElementById(\"password\");//I need this to grab the password input by the user.\n if(username.value == \"Admin\" && password.value == \"password\")//Check if valid username & password\n { \n HideLoginScreen();\n ShowAdminPanel();\n }\n }", "function logIn() {\n\tvar csrftoken = getCookie('csrftoken');\n\n\t$.ajaxSetup({\n\t\tbeforeSend: function(xhr, settings) {\n\t\t\tif (!csrfSafeMethod(settings.type) && sameOrigin(settings.url)) {\n\t\t\t\txhr.setRequestHeader(\"X-CSRFToken\", csrftoken);\n\t\t\t}\n\t\t}\n\t});\n\n\t$.ajax({\n\t\ttype: 'POST',\n\t\turl: '/authentication/login/',\n\t\tdata: {\n\t\t\t'user': $('#user-input').val(), // from form\n\t\t\t'pass': $('#pass-input').val() // from form\n\t\t},\n\t\tsuccess: function(response){\n\t\t\tif (response == 'OK') { // Successfully logged in\n\t\t\t\t$(\"#submit-login-form\").html(\"<i class=\\\"glyphicon glyphicon-ok-sign\\\"></i> Log in\");\n\t\t\t\twindow.location.replace('/');\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$(\"#login-error-area\").empty();\n\t\t\t\t$(\"#login-error-area\").fadeIn(250);\n\t\t\t\tvar alertBox = '<div data-alert class=\"alert-box info radius\"> Invalid username or password.</div>';\n\t\t\t\t$(\"#login-error-area\").append(alertBox).foundation();\n\t\t\t\t// $(\"#login-columns-div\").html = '<div data-alert class=\"alert-box info radius\">Incorrect username or password. <a href=\"#\" class=\"close\">&times;</a></div>' + $(\"#login-columns-div\").html();\n\t\t\t\t// $(alertBox).foundation('open'); // Fades in success alert\n\t\t\t\t// $(alertBox).fadeIn(500); // Fades in success alert\n\t\t\t\t$(\"#submit-login-form\").html(\"<i class=\\\"glyphicon glyphicon-log-in\\\"></i> Log in\");\n\t\t\t\t$('#pass-input').val('');\n\t\t\t\t$('#pass-input').focus();\n\t\t\t}\t\n\t\t}\n\t});\n}", "function getLoginForm() {\n $.ajax({\n type: \"POST\",\n url: \"Controllers/controller.User.php\",\n data: {locate: \"GetLoginForm\"}\n })\n .done(function(msg) {\n $(\"#loginsubscribefroms\").html(msg);\n });\n\n}", "ready(){super.ready();this.addEventListener(\"ajax-response\",e=>this._loginStatus(e))}", "function submitStaffLogin() {\n $(\"#staff_login_form\").submit(function(event){\n if (!validFields(\"login\")) return;\n event.preventDefault(); //prevent default action\n var post_url = \"/api/users/staffs/validate\"; //get form action url\n var request_method = $(this).attr(\"method\"); \n var staff_url = \"/frontend/src/staff/chat.html\";\n var admin_url = \"/frontend/src/admin/dashboard.html\";\n var form_data = {\n \t\tname:$(\"#username\").val(), \n \t\tpass:$(\"#password\").val()\n };\n $.ajax({\n type: request_method,\n contentType: \"application/json\",\n url: post_url,\n data: JSON.stringify(form_data),\n dataType: 'json',\n cache: false,\n timeout: 60000,\n success: function (data, textStatus, xhr) {\n localStorage.jwt = xhr.getResponseHeader('JWT_TOKEN_HEADER');\n \tif (data.state == 1) {\n \t\t$(location).attr(\"href\", staff_url);\n localStorage.uid = data.entity.id;\n \t} else if (data.state == 2) {\n \t\t$(location).attr(\"href\", admin_url);\n localStorage.uid = data.entity.id;\n \t} else {\n \t\talert(\"Login failed, please try again.\");\n \t}\n },\n error: function (e) {\n \tconsole.log(\"fail\");\n \tconsole.log(e);\n \talert(\"Login failed, please try again.\");\n\n }\n });\n });\n}", "function login(){\n dispatch(findUser(document.getElementById('email').value,document.getElementById('password').value));\n }", "function loginUser(email, password) {\n $.post(\"/api/login\", {\n email: email,\n password: password\n }).then(function(data) {\n window.location.replace(data);\n // If there's an error, log the error\n }).catch(function(err) {\n console.log(err);\n });\n }", "function postLogin(){\n let formData = {\n 'user_name' : $('input[name=user_name]').val(),\n 'password': $('input[name=password]').val()\n };\n \n \n $.ajax({\n url: 'https://swimmingtg.herokuapp.com/api/authentication/login',\n type: 'POST', \n data:formData,\n cache: false,\n async:false,\n dataType : 'json',\n success: function(user) {\n localStorage.setItem(\"User\", formData.user_name);\n let id = user.profile._id;\n localStorage.setItem(\"UserId\", id);\n top.location.href=\"home.html\";\n }, \n error:function(jqXHR, textStatus, message){ \n $('.error-box').append(`<h2>errors</h2><p>`+message+`</p>`);\n }\n })\n}", "function loginUser(email, password) {\n $.post(\"/api/login\", {\n email: email,\n password: password\n }).then(function(data) {\n window.location.replace(data);\n // If there's an error, log the error\n }).catch(function(err) {\n });\n }", "function checkStuLogin(){\n var stuLogEmail = $(\"#stuLogemail\").val();\n var stuLogPass = $(\"#stuLogpass\").val();\n $.ajax({ \n url:'Student/addstudent.php',\n method: \"POST\",\n data:{\n checkLogemail: \"checklogmail\",\n stuLogEmail:stuLogEmail,\n stuLogPass:stuLogPass,\n },\n success:function(data){\n if (data == 0){\n $(\"#statusLogMsg\").html('<small class=\"alert alert-danger\">Invalid Email ID or Password !</small>');\n }else if(data == 1){\n $(\"#statusLogMsg\").html('<div class=\"spinner-border text-success\" role = \"status\"></div>');\n setTimeout(()=>{\n window.location.href = \"index.php\";\n },1000);\n clearLogForm();\n }\n },\n });\n\n }", "function loginUser(username, password, callback) {\n $.ajax({\n type: \"POST\",\n url: 'http://localhost:3000/sessions',\n data: {\n user: {\n username: username,\n password: password\n } \n },\n //port for FE & BE is different, which is deemed a cross domain request, so in order to send a cookie to the browser, we need to configure xhrfields to credentials = true\n xhrFields: {\n withCredentials: true\n },\n dataType: \"JSON\",\n success: function(response) {\n if (response.message === \"User Does Not Exist\") {\n return callback({\n \"message\" : \"User Does Not Exist\"\n });\n }\n else if (response.message === \"Password Incorrect\") {\n return callback({\n \"message\": \"Password Incorrect\"\n });\n }\n else {\n $('#openModalLogin').hide();\n return callback({\n \"message\": true\n });\n }\n }\n }) \n }", "function CheckSignIn(){\n $.ajax({\n method: 'POST',\n dataType: 'json',\n url:'../Api/viewUser.php',\n data: {action: \"getSession\"}, \n success: data => { \n if(data == false) {\n //console.log(\"Nu har du loggats ut\")\n }else {\n\n var userView = document.getElementById(\"userView\");\n userView.innerHTML = \"Hej \" + data[0];\n var LoginPop = document.getElementById(\"LoginPop\");\n LoginPop.style.opacity = \"0\";\n var LoginOut = document.getElementById(\"LogOut\");\n LoginOut.style.opacity = \"1\";\n }\n },\n error: error => { console.log(error)}\n });\n\n}", "function loginUser(email, password) {\n $.post('/api/login', {\n email,\n password,\n })\n .then(() => {\n window.location.replace('/members');\n // If there's an error, log the error\n })\n .catch(handleLoginErr);\n }", "function login() {}", "function retrieveLogin(email, password) {\n $.post(\"/api/login\",\n { email, password }\n ).then(function (res) {\n console.log(res)\n // USER LOGIN SUCCESSFUL\n if (res.success === true) {\n window.localStorage.setItem(\"user_id\", res.user.id);\n window.location.href = \"/inventory\"\n }\n // USER LOGIN FAILED\n else {\n // display login error message\n $(\"#invalidLogin\").append(\"<b>INVALID LOGIN</b>\");\n }\n });\n }", "function loginUser(email, password) {\n $.post(\"/api/login\", {\n email: email,\n password: password\n }).then(() => {\n window.location.replace(\"/search\");\n // If there's an error, log the error\n }, handleLoginErr({ responseJSON: \"Invalid email/password combination\" }));\n }", "function login() { return $('#loginForm').serializeJSON() }", "function checkLogin() {\n\tlet xhr = new XMLHttpRequest();\n xhr.onreadystatechange = function(){ \n \tif((xhr.readyState == 4) && (xhr.status == 200)) {\n \t\tlet json = JSON.parse(xhr.responseText);\n \t\t\n \t\t// determine if we have a valid login\n \t if(json.employee_id == 0) {\n \t \tloadLoginView();\n \t }\n \t else {\n \t \tloadUser(json.first_name, json.last_name, json.role.name);\n \t }\n \t}\n }\n \n xhr.open(\"GET\", 'login', true);\n xhr.send();\t\n}", "login(){\n var that = this;\n $.ajax({\n url:'/users/login',\n type: 'POST',\n data:{'username':that.state.username,'password':that.state.password},\n success: function(response) {\n if(response == 'Invalid credentials'){\n that.checkForInvalidCredentialsAlert();\n }\n else if(response == 'No user'){\n that.checkForUserAlert();\n }\n else{\n that.setState({logStatus:true});\n var displayname = response.user.firstname+\" \"+response.user.lastname;\n var emailId = that.state.username;\n var token = response.token;\n cookies.set('displayname', displayname);\n that.setState({displayname:displayname});\n cookies.set('emailId',emailId);\n cookies.set('token',token);\n that.checkForSuccessfullyLoggedAlert();\n that.getallData();\n }\n },\n error: function(err) {\n that.checkForFailedLoggedAlert();\n }\n })\n }", "function loginUser(obj) {\n var userName = _id(\"userid\");\n var passWord = _id(\"password\");\n\n //Token取得\n token_tex = undefined;\n $.ajax({\n url: url_nam + '/api/login',\n type: 'POST',\n data: { userid: userName.value, password: passWord.value },\n async: false,\n success: function (data, textStatus, request) {\n token_tex = request.getResponseHeader(\"Authorization\");\n },\n error: function (request, textStatus, errorThrown) {\n alert(\"Can't login \" + userName.value);\n }\n });\n if (token_tex == undefined) return;\n // Ajax set token\n $.ajaxSetup({\n beforeSend: function (xhr, settings) {\n xhr.setRequestHeader('Authorization', token_tex);\n }\n });\n // ユーザー取得 \n var userSelect = document.getElementById(\"btxID\");\n while (userSelect.firstChild) {\n userSelect.removeChild(userSelect.firstChild);\n }\n\n $.ajax({\n type: 'GET',\n url: url_nam + '/api/auth',\n dataType: 'json',\n success: function (data) {\n data.forEach(function (value) {\n var option = document.createElement('option');\n option.value = value.btx_id;\n option.text = value.user_id;\n userSelect.appendChild(option);\n });\n },\n error: function (data) {\n alert('error occured! cuser');\n }\n });\n}", "function loginstu(){\n\tvar stuLogEmail = $(\"#stuloginemail\").val();\n\tvar stuLogPass = $(\"#stuloginpass\").val();\n\n\t$.ajax({\n\t\turl:\"student/loginstudent.php\",\n\t\tmethod: \"POST\",\n\t\tdata:{\n\t\t\tchecklogstu: \"checklogstu\",\n\t\t\tstuLogEmail:stuLogEmail,\n\t\t\tstuLogPass:stuLogPass\n\n\t\t},\n\t\tsuccess:function(data){\n\t\t\tif (data == 0) {\n\t\t\t\t$(\"#validationLogMsg\").html('<small class=\"alert-danger\">Invelid Email and Password !</small>');\t\n\t\t\t}else if (data == 1) {\n\t\t\t\t$(\"#validationLogMsg\").html('<div class=\"spinner-border text-success\" role=\"status\"></div>');\t\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\twindow.location.href = \"index.php\";\n\t\t\t\t}, 1000);\n\t\t\t}\n\t\t}\n\t})\n\n}", "function popLogin(){\n\tvar url = SystemProp.appServerUrl+\"/click-try!clickLogin.action\";\n\tvar callback = function(result){\n\t\tif(!result)return;\n \t$(\"body\").append(result);\n \t$.jquerytagbox(\"#popLoginTab\",0);\n \t$(\"#popLoginRegister\").fancybox();\n\t};\n\t\n\t$.ajax({\n\t\tdata: {},\n\t\turl: url,\n\t\ttype : \"POST\",\n\t\tdataType : \"html\",\n\t\tasync: false,\n\t\tsuccess: callback\n\t});\n}" ]
[ "0.77463824", "0.76949036", "0.75663894", "0.75431514", "0.7522045", "0.738181", "0.7259551", "0.72570896", "0.7255773", "0.7247751", "0.721198", "0.72076225", "0.71325356", "0.71182096", "0.7102611", "0.7014031", "0.70127445", "0.6989394", "0.6987867", "0.69605565", "0.69368523", "0.6922041", "0.69131714", "0.6905025", "0.6893632", "0.6876818", "0.6875988", "0.68662024", "0.6863438", "0.68519247", "0.6815149", "0.67815137", "0.67641574", "0.6763328", "0.67629254", "0.67582643", "0.67527354", "0.6752499", "0.6747202", "0.6728351", "0.6717902", "0.6714172", "0.66996515", "0.66984916", "0.6685317", "0.6682741", "0.66785866", "0.6678112", "0.6669283", "0.66642445", "0.666309", "0.6654554", "0.66472155", "0.66470927", "0.66437835", "0.6642328", "0.6627467", "0.66229266", "0.66210145", "0.6620584", "0.66199446", "0.6614325", "0.65927976", "0.6592771", "0.65918756", "0.65916795", "0.65869486", "0.6583735", "0.65833896", "0.6571766", "0.65666753", "0.65658617", "0.6562412", "0.6550773", "0.6548454", "0.65336704", "0.65336055", "0.651875", "0.65009534", "0.64976597", "0.6483727", "0.6483228", "0.64792037", "0.64779514", "0.64750487", "0.6470471", "0.6468316", "0.64641196", "0.6461696", "0.6455067", "0.64469993", "0.6445167", "0.64395386", "0.6434546", "0.64343035", "0.64313793", "0.64293313", "0.64234525", "0.64220023", "0.6421547", "0.64213324" ]
0.0
-1
the controlsmodel stores and manages all values of the input sliders
function ControlsModel ( initialValues ) { if ( ! ( this instanceof ControlsModel ) ) { return new ControlsModel( initialValues ); } var self = this; var publishers = addPublishers( self, [ 'update' ] ); var limits = getLimits( initialValues ) || { }; var values = getValues( initialValues ) || { }; function updateValues ( newValues ) { if ( newValues ) { newValues = objectHelper.getCopy( newValues ); var referenceValue; var newValue; for ( var key in newValues ) { limit = limits[key]; newValue = newValues[key]; if ( typeof limit !== 'undefined' && typeof newValue === 'number' && ! isNaN( newValue ) && newValue >= limit.min && newValue <= limit.max && values[key] !== newValue ) { values[key] = newValue; publishers.update.dispatch( key, values[key] ); } } } return self; } function setValue ( key, newValue ) { if ( typeof values[key] === 'number' && typeof newValue === 'number' && ! isNaN( newValue ) ) { values[key] = newValue; publishers.update.dispatch( key, values[key] ); } return self; } function randomizeValues () { var randomValues = { }; for ( var key in limits ) { randomValues[key] = parseInt( Math.random() * ( limits[key].max - limits[key].min ) + limits[key].min, 10 ); } updateValues( randomValues ); return self; } function getValues ( vals ) { var result = { }; vals = vals || values; for ( var key in vals ) { if ( typeof vals[key].value === 'number' ) { result[key] = vals[key].value; } else { result[key] = vals[key]; } } return objectHelper.getCopy( result ); } function getLimits ( vals ) { var result = { }; for ( var key in vals ) { result[key] = { min: vals[key].min, max: vals[key].max }; } return objectHelper.getCopy( result ); } self.randomizeValues = randomizeValues; self.setValue = setValue; self.getValues = getValues; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateAll(){refreshSliderDimensions();ngModelRender();}", "function matchFormToModel() {\n maxspdslider[0].value = tsdParams.maxspdslider;\n\t scaleslider[0].value = tsdParams.scaleslider;\n }", "addSliders() {\n this.sliders = this.config.map(function createSlider(obj) {\n var slider = document.createElement('input'),\n valueElement = document.createElement('span');\n slider.type = 'range';\n slider.min = 0;\n slider.value = 0;\n slider.setAttribute('data-axis', obj.gS);\n slider.setAttribute('data-vpart', obj.vPart);\n slider.setAttribute('data-size', obj.size);\n valueElement.textContent = obj.vPart + ': 0';\n extensionElements.mouseSlidersWrapper.appendChild(slider);\n extensionElements.mouseSlidersWrapper.appendChild(valueElement);\n slider.addEventListener(\n 'input',\n this.onSliderChange.bind(this)\n );\n slider.addEventListener('blur', this.onSliderBlur);\n return slider;\n }, this);\n }", "function onSliderChange () {\n showSpinner(true)\n // get slider values\n let inputs = {}\n for (const input of document.getElementsByTagName('input')) {\n switch (input.type) {\n case 'number':\n inputs[input.id] = input.valueAsNumber\n break\n case 'range':\n inputs[input.id] = input.valueAsNumber\n break\n case 'checkbox':\n inputs[input.id] = input.checked\n break\n }\n }\n for (const input of document.getElementsByTagName('select')) {\n inputs[input.id] = input.value\n }\n \n \n data.inputs = inputs\n\n compute()\n}", "function setSliderValues(){\n warpValue.innerHTML = \"Warp Speed:\" + warpSlider.value;\n warpSlider.oninput = function() {\n warpValue.innerHTML = \"Warp Speed:\" + this.value;\n }\n\n stretchValue.innerHTML = \"Warp Stretch Length:\" + stretchSlider.value;\n stretchSlider.oninput = function() {\n stretchValue.innerHTML = \"Warp Stretch Length:\" + this.value;\n }\n\n sizeValue.innerHTML = \"Base Size:\" + sizeSlider.value;\n sizeSlider.oninput = function() {\n sizeValue.innerHTML = \"Base Size:\" + this.value;\n }\n \n baseSpeedValue.innerHTML = \"Base Speed:\" + baseSpeedSlider.value;\n baseSpeedSlider.oninput = function() {\n baseSpeedValue.innerHTML = \"Base Speed:\" + this.value;\n }\n\n amountValue.innerHTML = \"Amount:\" + amountSlider.value*100;\n amountSlider.oninput = function() {\n amountValue.innerHTML = \"Amount:\" + this.value*100;\n loadImages();\n }\n}", "addSliders() {\n this.sliders = this.config.map(function createSlider(obj) {\n var slider = document.createElement('input'),\n valueElement = document.createElement('span');\n slider.type = 'range';\n slider.min = 0;\n slider.value = 0;\n slider.setAttribute('data-axis', obj.gS);\n slider.setAttribute('data-vpart', obj.vPart);\n slider.setAttribute('data-size', obj.size);\n valueElement.textContent = obj.vPart + ': 0';\n extensionElements.mouseSlidersWrapper.appendChild(slider);\n extensionElements.mouseSlidersWrapper.appendChild(valueElement);\n slider.addEventListener('input', this.onSliderChange.bind(this));\n slider.addEventListener('blur', this.onSliderBlur);\n return slider;\n }, this);\n }", "initSliderVariablesModel(){\n super.initSliderVariablesModel();\n this._initModelVariable(\"XVelocity\", 10);\n this._initModelVariable(\"YVelocity\", 20);\n this._initModelVariable(\"ParticleSize\", 10);\n this._initModelVariable(\"RotationVelocity\", 1.0);\n }", "function initializeControls(){\n\n featureBrightnessConfig = {\n controlName : 'featureBrightness',\n labelText : 'Signal Peak, Photons',\n parameter : 'featureBrightness',\n min : 1,\n max : 1000,\n defaultValue: 3\n }\n\n featureWidthConfig = {\n controlName : 'featureWidth',\n labelText : 'Feature FWHM, Px',\n parameter : 'featureSigma',\n min : 1,\n max : 30,\n defaultValue : 5\n }\n\n wavelengthConfig = {\n controlName : 'wavelength',\n labelText : 'Wavelength, nm',\n parameter : 'wavelength',\n min : 300,\n max : 1000,\n defaultValue : 500\n }\n\n var createSlider = function(configObj){\n var sliderDiv = d3.select('#mainControls')\n .append('div')\n .attr('class','sliderLabel')\n .attr('id', configObj.controlName+'sliderDiv')\n .text(configObj.labelText + ' - ')\n\n var sliderLabel = sliderDiv.append('span')\n .attr('class','sliderLabel')\n\n sliderLabel.text(configObj.defaultValue)\n\n var slider = sliderDiv\n .append('input')\n .attr('type','range')\n .attr('min', configObj.min)\n .attr('max', configObj.max)\n .attr('value', configObj.defaultValue)\n .attr('step', 1)\n .style('width','300px')\n .attr('class','slider')\n \n\n var sliderCallBackFactory = function(configObj){\n var f = function(){\n self = this;\n app[configObj['parameter']] = Number(self.value);\n sliderLabel.text(self.value);\n cameras.forEach(x=>x.updateData());\n cameras.forEach(x=>x.draw());\n }\n return f;\n }\n slider.on('input', sliderCallBackFactory(configObj));\n return slider;\n }\n\n createSlider(featureBrightnessConfig);\n //createSlider(featureWidthConfig);\n createSlider(wavelengthConfig);\n\n\n // add a drop down selector for data type\n d3.select('#mainControls').append('hr');\n var chooserDiv = d3.select('#mainControls').append('div').attr('class','sliderLabel');\n chooserDiv.append('span').text('Data Set : ');\n var dataSetChooser = chooserDiv.append('select').attr('name','dataSet');\n dataSetChooser.append('option').property('value','0').text('Cells 0')\n dataSetChooser.append('option').property('value','1').text('Cells 1')\n dataSetChooser.on('change', function(){\n var self = this;\n app.activeDataSet = this.value;\n cameras.forEach(function(cam){\n cam.realImage.data = jsonImage[cam.shortName + self.value];\n cam.updateData();\n cam.draw();\n });\n \n })\n\n\n d3.select('#mainControls').append('hr')\n\n var checkBoxDiv = d3.select('#mainControls')\n .append('div')\n .attr('class','sliderLabel')\n .attr('id', 'checkBoxDiv')\n \ncheckBoxDiv\n .append('label')\n .text(\"Fast Mode - Simulate Max Frame Rate\")\n .append('input')\n .attr('type','radio')\n .attr('name','mode')\n .attr('value','Fast')\n .attr('id','Fast')\n .attr('checked','true')\n\ncheckBoxDiv\n .append('label')\n .text(\"Slow Mode - Simulate 30 Second Exposure\")\n .append('input')\n .attr('type','radio')\n .attr('name','mode')\n .attr('value','Slow')\n .attr('id','Slow')\n\nd3.selectAll('[type = radio]').on('change', function(){\n var self = this;\n app.mode = this.value;\n\n cameras.forEach( function(cam){\n cam.readNoise = cam['readNoise' + app.mode];\n cam.frameRateHz = cam['frameRateHz' + app.mode];\n console.log(app.mode);\n cam.updateReadNoiseLabel();\n cam.updateFPSLabel();\n cam.updateData();\n cam.draw();\n } );\n\n\n\n\n // update the explainer box\n if (self.value == 'Fast'){\n d3.select('.explainerBox .content').html(`Above are windows simulating each camera, acquiring 16-bit image\n data as quickly as possible. Each window shows what you'd see if you swapped out each camera, without changing magnification or optics.\n \"Signal peak\" is equal to the number of photons hitting a 16um x 16um area at the brightest 99th percentile of the image.\n Frame rates are relative. Resolution of each camera has been reduced to 1/6th of real to ease display on your screen.`)\n }\n\n if (self.value == 'Slow'){\n d3.select('.explainerBox .content').html(`Above are windows simulating each camera, acquiring 16-bit image\n data with a 30s exposure time. Each window shows what you'd see if you swapped out each camera, without changing \n magnification or optics.\n \"Signal peak\" is equal to the number of photons hitting a 16um x 16um area at the brightest 99th percentile of the image. \n Resolution of each camera has been reduced to 1/6th of real to ease display on your screen.`)\n }\n\n \n })\n\n // add checkboxes to the controls for each camera in camerasdefs\n var availableCameras = Object.keys(cameraDefs);\n for (var i in availableCameras){\n var checkDiv = d3.select(\"#mainControls\").append('div')\n checkDiv.append('input')\n .attr(\"type\",\"checkbox\")\n .property('checked',false)\n .property('value',cameraDefs[availableCameras[i]]['shortName'])\n .property('key', availableCameras[i])\n .on('change', function(){\n var self = d3.select(this);\n console.log(d3.select(this).property('checked'));\n console.log(d3.select(this).property('value'));\n\n if (self.property('checked')){\n cameras.push(new Camera(cameraDefs[self.property('key')]))\n console.log(self.property('key'))\n\n cameras.forEach( function(cam){\n cam.readNoise = cam['readNoise' + app.mode];\n cam.frameRateHz = cam['frameRateHz' + app.mode];\n console.log(app.mode);\n cam.updateReadNoiseLabel();\n cam.updateFPSLabel();\n cam.updateData();\n cam.draw();\n } );\n\n }\n\n if (!self.property('checked')){\n for (var q = 0; q < cameras.length; q++){\n if (cameras[q].shortName == self.property('value')){\n console.log('ting')\n cameras[q].remove();\n cameras.splice(q,q)\n }\n }\n }\n })\n checkDiv.append('span').text(cameraDefs[availableCameras[i]]['displayName'])\n }\n \n}", "updateSlider_() {\n if (!this.sliderInput_) {\n return;\n }\n this.sliderInput_.setAttribute('value', this.getValue());\n }", "function updateSliders() {\n select('#length').html(lengthSlider.value())\n select('#temperature').html(tempSlider.value())\n }", "function updateSliders() {\n lengthLabel.html(\"Length: \" + lengthSlider.value());\n tempLabel.html(\"Temperature: \" + tempSlider.value());\n}", "onSliderChange_() {\n this.setEditorValue_(this.sliderInput_.value);\n }", "function actionSliders(arr) {\n \"use strict\";\n\n //planet distance\n arr[0].noUiSlider.on('slide', function( values, handle) {\n var newvalue = values[handle];\n document.getElementById('orbdis').value = newvalue;\n });\n //planets size\n arr[1].noUiSlider.on('slide', function( values, handle) {\n var newvalue = values[handle];\n newvalue /= 5;\n newvalue = newvalue.toFixed(2);\n document.getElementById('plansize').value = newvalue;\n });\n //planet speed\n arr[2].noUiSlider.on('slide', function( values, handle) {\n var newvalue = values[handle];\n newvalue /= 20;\n newvalue = newvalue.toFixed(1);\n document.getElementById('spchange').value = newvalue;\n });\n\n}", "function SliderControls(slider){\r\n this.initialize(slider);\r\n}", "function setEvents() {\n\t$('.removeModel').on(\"click\", function() {\n\t\t$(this).parent().remove();\n\t});\n\t\n\t$('label').mouseover(function() {\n\t\t$('.tooltip').hide();\n\t\t$(this).parent().children('.tooltip').fadeIn();\n\t});\n\t\n\t$('label').mouseout(function() {\n\t\t$(this).parent().children('.tooltip').fadeOut();\n\t});\n\t\n\t$('.slider').each(function() {\n\t\t\n\t\tvar paramValue = $(this).parent().children('.paramValue');\n\t\t\n\t\tvar minVal = parseInt($(this).attr('min'));\n\t\tvar maxVal = parseInt($(this).attr('max'));\n\t\tvar curVal = parseInt(paramValue.html());\n\t\t\n\t\t$(this).slider({\n\t\t\tmin: minVal,\n\t\t\tmax: maxVal,\n\t\t\tvalue: curVal,\n\t\t\tslide: function( event, ui ) {\n\t\t\t\tparamValue.html(ui.value);\n\t\t\t}\n\t\t});\n\t});\n}", "function updateSliders() {\n select('#length').html(lengthSlider.value());\n select('#temperature').html(tempSlider.value());\n}", "_createSliders() {\n\t\tthis.sliders = {};\n\t\tfor ( let slider of this.controlOptions.control.sliders ) {\n\t\t\tlet sliderControl;\n\n\t\t\tslider.uiSettings = this.getSliderConfig( slider );\n\n\t\t\tsliderControl = new Slider( $.extend( true, {}, slider ) );\n\n\t\t\tsliderControl.render();\n\n\t\t\tthis.$sliderGroup.append( sliderControl.$control );\n\t\t\tsliderControl.$input.after(\n\t\t\t\t'<a class=\"link\" href=\"#\" title=\"Link all sliders\">' + linkSvg + '</a>'\n\t\t\t);\n\n\t\t\tthis.sliders[slider.name] = sliderControl;\n\n\t\t\tthis._bindSliderChange( sliderControl );\n\t\t}\n\t}", "function updateSliders() {\n select('#length').html(lengthSlider.value());\n select('#temperature').html(tempSlider.value());\n}", "function update_inputs(data) {\n $(\"#x_slider\").slider(\"values\", data.slice(0, 2));\n $(\"#y_slider\").slider(\"values\", data.slice(2, 4));\n $(\"input[name='x1']\").val(data[0]);\n $(\"input[name='x2']\").val(data[1]);\n $(\"input[name='y1']\").val(data[2]);\n $(\"input[name='y2']\").val(data[3]);\n $(\"input[name='x1']\").valid();\n $(\"input[name='x2']\").valid();\n $(\"input[name='y1']\").valid();\n $(\"input[name='y2']\").valid();\n}", "function setControls(){\n \n $( \".pointer\" ).click(function() {\n var point = $(this).attr('data-sl');\n count = point;\n initSlider(slides);\n console.log(\"clicked point:\"+point);\n });\n\n }", "function updateSliders() {\n\n\n $('.rgb-label').trigger('colorpickersliders.updateColor', pb.template().keyDoc.labelColor);\n $('.rgb-value').trigger('colorpickersliders.updateColor', pb.template().keyDoc.foregroundColor);\n $('.rgb-background').trigger('colorpickersliders.updateColor', pb.template().keyDoc.backgroundColor);\n\n }", "function updateAll() {\n refreshSliderDimensions();\n ngModelRender();\n }", "function updateAll() {\n refreshSliderDimensions();\n ngModelRender();\n }", "function updateAll() {\n refreshSliderDimensions();\n ngModelRender();\n }", "function updateValues() {\n alignmentSliderVal = document.getElementById(\"alignment-slider\").value;\n cohesionSliderVal = document.getElementById(\"cohesion-slider\").value;\n separationSliderVal = document.getElementById(\"separation-slider\").value;\n changeAudioSpeed();\n}", "_updateEls() {\n let numSliders = this.o.numSliders;\n\n // add SVG elements representing sliders to match current number of sliders\n for (let i = this.state.sliderVals.length; i < numSliders; ++i) {\n this.state.sliderVals.push(this.o.minVal);\n this._addSvgSlider();\n }\n\n // remove SVG elements representing sliders to match current number of sliders\n for (let i = this.state.sliderVals.length; i > numSliders; --i) {\n this.state.sliderVals.pop();\n this._removeSvgSlider();\n }\n }", "function onSliderChanged(event, ui)\n{\n //find which slider was changed\n switch ($(this).attr(\"id\"))\n {\n case sliderArray[0].attr(\"id\"):\n inputArray[0].val(sliderArray[0].slider(\"value\"));\n break;\n case sliderArray[1].attr(\"id\"):\n inputArray[1].val(sliderArray[1].slider(\"value\"));\n break;\n case sliderArray[2].attr(\"id\"):\n inputArray[2].val(sliderArray[2].slider(\"value\"));\n break;\n case sliderArray[3].attr(\"id\"):\n inputArray[3].val(sliderArray[3].slider(\"value\"));\n break;\n case sliderArray[4].attr(\"id\"):\n inputArray[4].val(sliderArray[4].slider(\"value\"));\n break;\n case sliderArray[5].attr(\"id\"):\n inputArray[5].val(sliderArray[5].slider(\"value\"));\n break;\n case sliderArray[6].attr(\"id\"):\n inputArray[6].val(sliderArray[6].slider(\"value\"));\n break;\n case sliderArray[7].attr(\"id\"):\n inputArray[7].val(sliderArray[7].slider(\"value\"));\n break;\n default:\n }\n}", "_createSliderStructure() {\n this._viewLimiter = this._createViewLimiter();\n this._itemsHolder = this._createItemsHolder();\n }", "function History_ProcessSliderData()\n{\n\t//has slider advance?\n\tif (this.SliderAdvance)\n\t{\n\t\t//create an array of states to deactivate\n\t\tvar statesWeSlided = [];\n\t\t//now loop from current until desired\n\t\tfor (var i = this.SliderAdvance.Start - 1; i < this.SliderAdvance.End - 1; i++)\n\t\t{\n\t\t\t//we need to trigger slider here\n\t\t\tstatesWeSlided.push(this.States[i].UniqueId);\n\t\t}\n\t\t//now send it to the scores\n\t\t__SIMULATOR.Scores.ProcessSliderData(statesWeSlided);\n\t}\n\t//terminate the slider advance\n\tthis.SliderAdvance = false;\n}", "function onSliderChange () {\n // show spinner\n document.getElementById('loader').style.display = 'block'\n\n // get slider values\n data.inputs = {\n 'Count':document.getElementById('count').valueAsNumber,\n 'Radius':document.getElementById('radius').valueAsNumber,\n 'Length':document.getElementById('length').valueAsNumber\n }\n compute()\n}", "function onSliderChange() {\n sw = slider.value;\n}", "function readVariableFromHTMLSlider(el,theInteractiveGraph) {\n var n = HTMLControlNameToNumber($(el).attr('id'));\n var oldval = (theInteractiveGraph.variables[n]).val();\n var accepted=(theInteractiveGraph.variables[n]).val($(el).val());\n \n if (oldval != (theInteractiveGraph.variables[n]).val() ) {\n \n for (var i = 0; i < theInteractiveGraph.variables[n].propagateFunctions.length; i++) { \n \n theInteractiveGraph.variables[n].propagateFunctions[i]();\n \n };\n\n theInteractiveGraph.propagateVariableChange(); \n \n }\n}", "function updateHandles(slider) {\n slider.on('update', () => {\n updateSliderValue(slider)\n })\n}", "function restInputs() {\r\n const allSliders = document.querySelectorAll('input[type=\"range\"]');\r\n allSliders.forEach((slider) => {\r\n // console.log(slider.name);\r\n if (slider.name === 'hue') {\r\n const hueColor = initialColors[slider.getAttribute('data-hue')];\r\n //get the hue value from the current color with hsl() that return an array with the hue, brightness and sat values of a color\r\n const hueValue = chroma(hueColor).hsl()[0];\r\n slider.value = Math.floor(hueValue);\r\n } else if (slider.name === 'brightness') {\r\n const brightnessColor = initialColors[slider.getAttribute('data-bright')];\r\n const brightnessValue = chroma(brightnessColor).hsl()[2];\r\n slider.value = brightnessValue.toFixed(2);\r\n } else if (slider.name === 'saturation') {\r\n //get the data-set with different techinique\r\n const satColor = initialColors[slider.dataset.sat];\r\n const satValue = chroma(satColor).hsl()[1];\r\n slider.value = satValue.toFixed(2);\r\n }\r\n });\r\n}", "function slider_setup(s_name, sample, index) {\n var s = document.getElementById(s_name);\n var s_out = document.getElementById(s_name+\"_out\");\n var s_out2 = document.getElementById(\"ex4_\"+s_name);\n var s_out3 = document.getElementById(\"ex5_\"+s_name);\n s.value = sample[index];\n s_out.innerHTML = s.value;\n s.paired_out = s_out;\n s.paired_out2 = s_out2;\n s.paired_out3 = s_out3;\n s.oninput = function() {\n sample[index] = Number(this.value);\n this.paired_out.innerHTML = this.value;\n this.paired_out2.innerHTML = this.value;\n this.paired_out3.innerHTML = this.value;\n update(treeData[0]);\n \tex4_reset();\n \tex5_reset();\n ex6_reset();\n }\n}", "function initializeSliders(slrRedBody,slrGreenBody,slrBlueBody,slrRedHeader,slrGreenHeader,slrBlueHeader) {\n slrRedBody.value = sliderRedBody;\n slrGreenBody.value = sliderGreenBody;\n slrBlueBody.value = sliderBlueBody;\n slrRedHeader.value = sliderRedHeader;\n slrGreenHeader.value = sliderGreenHeader;\n slrBlueHeader.value = sliderBlueHeader;\n}", "function updateAll() {\n refreshSliderDimensions();\n ngModelRender();\n redrawTicks();\n }", "sliderOnChange() {\n updateShaderToyTime(this.sliderInput.value);\n }", "sliderOnChange() {\n updateShaderToyTime(this.sliderInput.value);\n }", "bindListeners () {\n const settings = this.settings;\n\n // Update labels when sliders change.\n RecastConfig.forEach(({name}) => {\n const input = this.panelEl.querySelector(`input[name=${name}]`);\n settings[name] = input.value;\n input.addEventListener('input', () => {\n settings[name] = Number(input.value);\n });\n });\n\n // Rebuild.\n const rebuildBtnEl = this.panelEl.querySelector('[name=build]');\n rebuildBtnEl.addEventListener('click', () => this.rebuild());\n\n // Export.\n const exportBtnEl = this.panelEl.querySelector('[name=export]');\n exportBtnEl.addEventListener('click', () => this.exportGLTF());\n }", "function addSliders(){\r\n\tvar sliderString = '';\r\n\tvar amountString = '';\r\n\tvar counter = 0;\r\n\r\n\tfor (i=0;i<inputs.length;i++)\r\n\t{\r\n\t\tsliderString = '#slider'+counter;\r\n\t\tamountString = \"#amount\"+counter;\r\n\t\tvar inputType = $(inputmetadata[i]).attr(\"vartype\");\r\n\r\n\t\tif (inputType==\"RANGE\" || inputType==\"FUZZY_DISCRETE\"){\r\n\t\t\tvar l_min = getInputMin(i);\r\n\t\t\tvar l_max = getInputMax(i);\r\n\t\t\tvar l_def = getInputDefault(i);\r\n\r\n\t\t\tif (l_def < l_min || isNaN(l_def)) {\r\n\t\t\t\tl_def = l_min;\r\n\t\t\t} else if (l_def > l_max) {\r\n\t\t\t\tl_def = l_max;\r\n\t\t\t}\r\n\r\n\t\t\t$(sliderString).slider({\r\n\t\t\t\trange: \"min\",\r\n\t\t\t\tvalue:((l_def-l_min)/(l_max-l_min))*1000,\r\n\t\t\t\tmin:0,\r\n\t\t\t\tmax:1000,\r\n\t\t\t\tslide: labelUpdate(i,l_min,l_max)\r\n\t\t\t});\r\n\t\t\tvar currDataType = getInputDatatype(i);\r\n\t\t\t$(amountString).val(pickValue($(sliderString).slider(\"value\"),l_min,l_max));\r\n\t\t} else {\r\n\t\t\tvar valArray = getInputCategories(getInputCategories(i));\r\n\r\n\t\t\t$(sliderString).addClass('drop-down');\r\n\r\n\t\t\t$(sliderString).append(\"<select id='input-drop\"+counter+\"'></select>\");\r\n\t\t\t// add the select tag\r\n\t\t\tfor (j=0;j<valArray.length;j++){\r\n\t\t\t\t$('#input-drop'+counter).append(\"<option value='\"+valArray[j]+\"'>\"+valArray[j]+\"</option>\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tcounter += 1;\r\n\t}\r\n}", "function resetInputs() {\n const sliders = document.querySelectorAll(\".sliders input\");\n\n sliders.forEach((slider) => {\n if (slider.name === \"hue\") {\n const hueColor = initialColors[slider.getAttribute(\"data-hue\")];\n const hueValue = chroma(hueColor).hsl()[0];\n slider.value = Math.floor(hueValue);\n } else if (slider.name === \"brightness\") {\n const brightnessColor =\n initialColors[slider.getAttribute(\"data-brightness\")];\n const brightnessValue = chroma(brightnessColor).hsl()[2];\n slider.value = Math.floor(brightnessValue * 100) / 100;\n } else if (slider.name === \"saturation\") {\n const saturationColor =\n initialColors[slider.getAttribute(\"data-saturation\")];\n const saturationValue = chroma(saturationColor).hsl()[1];\n slider.value = Math.floor(saturationValue * 100) / 100;\n }\n });\n}", "function set_sliders(subject)\n{\n $(\".angst-nslider\").slider(\n {\n\t range: \"min\",\n\t min: 0,\n\t max: 100,\n\t value: 60,\n\t slide: function(event, ui)\n\t {\n\t var id = this.id.split(\"-\")[1];\n $(\"#angst-\" + id + \"-text\").val(ui.value/10);\n update_result(subject);\n }\n });\n \n // Set the starting value for the text inputs\n $(\".angst-ntext\").val(6.0);\n \n // Sync the text inputs with the sliders\n $(\".angst-ntext\").keyup(\n function (event)\n {\n var slider_id = this.id.split(\"-\")[1];\n var value = $(\"#angst-\" + slider_id + \"-text\").val();\n $(\"#angst-\" + slider_id + \"-slider\").slider(\"value\", value * 10);\n update_result(subject);\n });\n}", "function init() {\n setMortalitySlider()\n setIncidentsSlider()\n setDeathPercentageSlider()\n setYearSlider()\n}", "function onChange()\n\t{\n\t\t// decide if we need sliders based on new content size. default is they are hidden\n\t\t// we update both h and v sliders even when only content.width is changed as it's possible that both sliders\n\t\t// will hide/show based on the change in content.width alone\n\t\thslider.hide = true; \n\t\tvslider.hide = true; \n\t\tif (content.width > display.width) hslider.hide = false; \n\t\tif (content.height > display.height) vslider.hide = false; \n\t\tif ((content.width > display.width - t) && (content.height > display.height)){ hslider.hide = false; } \n\t\tif ((content.height > display.height - t) && (content.width > display.width)){ vslider.hide = false; } \n\n\t\t// now that we know which slider(v/s) is enabled, update their sizes\n\t\t// we set a rule that sliders will try to fill container.size. e.g. if vslider is hidden, hslider.height = container.height\n\t\t// both h and s sliders to be updated as it's possible that both slides will hide/show based on change in content.width alone\n\t\t//if (!hslider.hide){ hslider.width = w - (vslider.hide? 0 : t); }\n\t\t//if (!vslider.hide){ vslider.height = h - (hslider.hide? 0 : t); }\n\t\thslider.width = hslider.hide? 0: (w - (vslider.hide? 0 : t)); \n\t\tvslider.height = vslider.hide? 0 : (h - (hslider.hide? 0 : t)); \n\n\t\t// set slider's min/max. max value is calculated as the value difference between content size and display size.\n\t\t// the excess size of content will be the scroll size of slider. if content size < display size, max < 0 but slider class will \n\t\t// handle this properly and fix the thumbsize and its position to ensure no undesired behavior occurs\n\t\t// since both h and s sliders might have hide/show from this change, update max for both sliders\n\t\tvslider.min = 0; // min = 0, default.\n\t\thslider.min = 0; // min = 0, default.\n\t\tvslider.max = content.height - display.height + (hslider.hide? 0 : t);\n\t\thslider.max = content.width - display.width + (vslider.hide? 0 : t);\n\n\t\t// we want thumbsize to be based on ratio between content.size and frame.size. slider size is expected to fill frame size\n\t\t// but if both sliders (h and v), slider.size = frame.size - slider.t \n\t\t// since both v and h sliders might have changed their sizes, we update both thumbsize\n\t\tvslider.thumbsize = display.height / content.height * (vslider.height - (hslider.hide? 0 : t));\n\t\thslider.thumbsize = display.width / content.width * (hslider.width - (vslider.hide? 0 : t));\n\n\t\t// let's set min value for thumbsize, 32, because if content.size is too big, thumbsize will be too small to click.\n\t\tif (vslider.thumbsize < 32) vslider.thumbsize = 32;\n\t\tif (hslider.thumbsize < 32) hslider.thumbsize = 32;\n\t}", "function initSliders(slider_data) {\n for (var key in slider_data.tasks) {\n var task = slider_data.tasks[key];\n taskSlider(key.toString(), task.solutions, task.task_changes,\n slider_data.focus_inactive,\n slider_data.start_time, slider_data.end_time, slider_data.start_label, slider_data.end_label);\n }\n}", "function addSliderListeners() {\n xSlider.addEventListener(goog.ui.Component.EventType.CHANGE, function() {\n currentVolObject.indexX = xSlider.getValue();\n xBox.setValue(currentVolObject.indexX);\n currentVolObject.modified();\n });\n \n ySlider.addEventListener(goog.ui.Component.EventType.CHANGE, function() {\n currentVolObject.indexY = ySlider.getValue();\n yBox.setValue(currentVolObject.indexY);\n currentVolObject.modified();\n });\n \n zSlider.addEventListener(goog.ui.Component.EventType.CHANGE, function() {\n currentVolObject.indexZ = zSlider.getValue();\n zBox.setValue(currentVolObject.indexZ);\n currentVolObject.modified();\n });\n}", "function makeSliderDisplay()\r\n{\r\n\t$(\"div#sliders\").empty();\r\n\tinputs = new Array();\r\n\r\n\tsimulationId = parameterSimId;\r\n\r\n\txmlGlobal = getXMLDoc(simulationId);\r\n\tinputmetadata = $(xmlGlobal).find(\"inputs>metadata\");\r\n\toutputmetadata = $(xmlGlobal).find(\"outputs>metadata\");\r\n\r\n\t// render create plan button\r\n\tvar currentSim = $(xmlGlobal).find(\"simulation\").get(0);\r\n\r\n\tgetValsFromXML(xmlGlobal);\r\n\r\n\taddSliders();\r\n\tpopulateActionsFormWithValues();\r\n}", "handleSlider() {\n this.slider.addEventListener('change', event => {\n this.sliderValue.innerText = event.target.value;\n this.rate = event.target.value * 10;\n });\n }", "function editSlider(){\n d3.select(\"#slider\").remove();\n d3.select(\"body\").append(\"input\")\n .attr(\"id\", \"slider\")\n .attr(\"type\", \"range\")\n .attr(\"min\", -5)\n .attr(\"max\", 5)\n .attr(\"value\", function() {\n if (allData[k][\"shares\"] !== undefined) {\n return allData[k][\"shares\"][0]/5;\n } else {return 0;}\n }) \n .style(\"visibility\", \"visible\")\n .on(\"change\", function() {\n // Set the share data and call the functions\n allData[k][\"shares\"] = [this.value*5, \"\"];\n investButton = false;\n payoffLegendName();\n payoffResult();\n moneyLeft();\n // Set the amount of shares beside the slider\n if (allData[k][\"shares\"] !== undefined) {\n document.getElementById(\"shareSlider\").innerHTML=this.value*5 +\" shares\";\n }\n });\n }", "function initInputValues() {\n hideMsgErr();\n $timeout(function () {\n ctrl.minMaxModel.minModel = '' + lastValues.input.min;\n ctrl.minMaxModel.maxModel = '' + lastValues.input.max;\n });\n\n //filterToApply = [lastValues.input.min, lastValues.input.max];\n }", "createSlider() {\n var self = this;\n let sliderHandlersManager = this.get('sliderHandlersManager');\n var handlers = this.get('sliderHandlers');\n\n $('#slider-range').slider({\n range: this.get('sliderIsRange'),\n min: this.get('sliderMinValue'),\n max: this.get('sliderMaxValue'),\n disabled: this.get('sliderDisabled'),\n values: handlers,\n create: function () {\n self.updateSliderColors(handlers);\n },\n slide: function (event, ui) {\n self.updateSliderColors(ui.values);\n sliderHandlersManager.updateThresholds(ui.values);\n },\n change: function (event, ui) {\n self.updateSliderColors(ui.values);\n }\n });\n }", "function init() {\n initVisualization();\n \n addSimulationControls(play, pause, step, stop_movement);\n \n addParamControls(\"#sliders\", params, update_params); \n}", "function update_slider() {\n\t$(\"#visitsGraph_slider\").slider(\"values\", 0, 0);\n\t$(\"#visitsGraph_slider\").slider(\"option\", \"max\", clicksGraph_cols.length - 1);\n\t$(\"#visitsGraph_slider\").slider(\"values\", 1, clicksGraph_cols.length - 1);\n\t$(\"#visitsGraph_slider_text\").text(\"Graph range: \" + clicksGraph_cols[$(\"#visitsGraph_slider\").slider(\"values\", 0)].label + \" - \" + clicksGraph_cols[$(\"#visitsGraph_slider\").slider(\"values\", 1)].label);\n}", "function onInputChanged()\n{\n //find which input was changed\n switch ($(this).attr(\"id\"))\n {\n case inputArray[0].attr(\"id\"):\n sliderArray[0].slider(\"value\", inputArray[0].val());\n break;\n case inputArray[1].attr(\"id\"):\n sliderArray[1].slider(\"value\", inputArray[1].val());\n break;\n case inputArray[2].attr(\"id\"):\n sliderArray[2].slider(\"value\", inputArray[2].val());\n break;\n case inputArray[3].attr(\"id\"):\n sliderArray[3].slider(\"value\", inputArray[3].val());\n break;\n case inputArray[4].attr(\"id\"):\n sliderArray[4].slider(\"value\", inputArray[4].val());\n break;\n case inputArray[5].attr(\"id\"):\n sliderArray[5].slider(\"value\", inputArray[5].val());\n break;\n case inputArray[6].attr(\"id\"):\n sliderArray[6].slider(\"value\", inputArray[6].val());\n break;\n case inputArray[7].attr(\"id\"):\n sliderArray[7].slider(\"value\", inputArray[7].val());\n break;\n default:\n }\n}", "Init() {\n\t\tthis.leftTrack = this.node.querySelectorAll('.spectrum-Slider-track')[0]\n\t\tthis.rightTrack= this.node.querySelectorAll('.spectrum-Slider-track')[1]\n\t\tthis.handle = this.node.querySelector('.spectrum-Slider-handle')\n\t\tthis.valueOut = this.node.querySelector('.spectrum-Slider-value')\n\t\tthis.loaderNode = this.node.querySelector('.component-loader')\n\t\t\n\t\t\n\t\tlet position = this.ValueToPosition(this.settings.current)\n\t\tthis.valueOut.innerText = this.settings.current.toFixed(this.settings.floatPrecision)\n\t\tthis.MoveSlider(position)\n\t}", "function setPriceValues() {\r\n\t\tlet priceStartValue;\r\n\t\tlet priceEndValue;\r\n\t\tif (priceStart.value != '') {\r\n\t\t\tpriceStartValue = priceStart.value;\r\n\t\t}\r\n\t\tif (priceEnd.value != '') {\r\n\t\t\tpriceEndValue = priceEnd.value;\r\n\t\t}\r\n\t\tpriceSlider.noUiSlider.set([priceStartValue, priceEndValue]);\r\n\t}", "function updateSliderHandles(args){\n i = args[0]\n value = args[1]\n key = args[2]\n resetEnd = args[3]\n type = args[4]\n \n var this_parent = document.getElementById(key)\n\n setSliderHandle(i,value,this_parent,null,resetEnd,type);\n}", "function setPriceValues() {\n\t\tlet priceStartValue;\n\t\tlet priceEndValue;\n\t\tif (priceStart.value != '') {\n\t\t\tpriceStartValue = priceStart.value;\n\t\t}\n\t\tif (priceEnd.value != '') {\n\t\t\tpriceEndValue = priceEnd.value;\n\t\t}\n\t\tpriceSlider.noUiSlider.set([priceStartValue, priceEndValue]);\n\t}", "function slidersValue() {\n document.querySelector(\"#redValue\").innerHTML =\n document.querySelector(\"#rangeRed\").value;\n document.querySelector(\"#greenValue\").innerHTML =\n document.querySelector(\"#rangeGreen\").value;\n document.querySelector(\"#blueValue\").innerHTML =\n document.querySelector(\"#rangeBlue\").value;\n}", "interfaceSliderCallback(faustControler) {\n var val;\n if (faustControler.faustInterfaceView.slider) {\n var input = faustControler.faustInterfaceView.slider;\n val = Number((parseFloat(input.value) * parseFloat(faustControler.itemParam.step)) + parseFloat(faustControler.itemParam.min)).toFixed(parseFloat(faustControler.precision));\n }\n else if (faustControler.faustInterfaceView.button) {\n var input = faustControler.faustInterfaceView.button;\n if (faustControler.value == undefined || faustControler.value == \"0\") {\n faustControler.value = val = \"1\";\n }\n else {\n faustControler.value = val = \"0\";\n }\n }\n var text = faustControler.itemParam.address;\n faustControler.value = val;\n var output = faustControler.faustInterfaceView.output;\n //---- update the value text\n if (output)\n output.textContent = \"\" + val + \" \" + faustControler.unit;\n // \tSearch for DSP then update the value of its parameter.\n this.setParamValue(text, val);\n for (var address in faustControler.valueChangeCallbacks) {\n let cb = faustControler.valueChangeCallbacks[address];\n cb(address, val);\n }\n }", "function createPsizeSliders(){\n\n\tGUIParams.partsKeys.forEach(function(p,i){\n\t\tvar initialValue = parseFloat(GUIParams.PsizeMult[p]); //I don't *think* I need to update this in GUI; it's just the initial value that matters, right?\n\n\t\tvar sliderArgs = {\n\t\t\tstart: [initialValue], \n\t\t\tconnect: [true, false],\n\t\t\ttooltips: false,\n\t\t\tsteps: [0.0001],\n\t\t\trange: { //reset below\n\t\t\t\t'min': [0],\n\t\t\t\t'max': [initialValue]\n\t\t\t},\n\t\t\tformat: wNumb({\n\t\t\t\tdecimals: 4\n\t\t\t})\n\t\t}\n\n\t\tvar slider = document.getElementById(p+'_PSlider');\n\t\tvar text = [document.getElementById(p+'_PMaxT')];\n\t\tvar varToSet = [initialValue, \"PsizeMult\",p];\n\t\tvar varArgs = {'f':'setViewerParamByKey','v':varToSet};\n\n\t\tcreateSlider(slider, text, sliderArgs, varArgs);\n\n\t\t//reformat\n\t\tw = parseInt(d3.select('#'+p+'_PSlider').style('width').slice(0,-2));\n\t\td3.select('#'+p+'_PSlider').select('.noUi-base').style('width',w-10+\"px\");\n\t});\n\n}", "function slider_input_common(table, name, initial_value, min_value, max_value,\n step, suffix, handler, mapping, inv_mapping) {\n var row = table.insertRow(-1);\n var col_name = row.insertCell(-1);\n var col_box = row.insertCell(-1);\n var col_slider = row.insertCell(-1);\n\n var name_span = document.createElement('span');\n name_span.appendChild(document.createTextNode(name));\n col_name.appendChild(name_span);\n\n var box = document.createElement('input');\n box.defaultValue = initial_value;\n box.type = 'text';\n box.size = 5;\n box.className = 'nbox';\n col_box.appendChild(box);\n var suffix_span = document.createElement('span');\n suffix_span.appendChild(document.createTextNode(suffix));\n col_box.appendChild(suffix_span);\n\n var slider = document.createElement('input');\n slider.defaultValue = Math.log(initial_value);\n slider.type = 'range';\n slider.className = 'nslider';\n slider.min = mapping(min_value);\n slider.max = mapping(max_value);\n slider.step = step;\n col_slider.appendChild(slider);\n\n box.onchange = function() {\n slider.value = mapping(box.value);\n handler(parseFloat(box.value));\n };\n\n slider.onchange = function() {\n box.value = inv_mapping(slider.value);\n handler(parseFloat(box.value));\n };\n\n function update(v) {\n box.value = v;\n slider.value = mapping(v);\n }\n\n function hide(h) {\n var v = h ? 'hidden' : 'visible';\n name_span.style.visibility = v;\n box.style.visibility = v;\n suffix_span.style.visibility = v;\n slider.style.visibility = v;\n }\n\n this.update = update;\n this.hide = hide;\n}", "function changeHandler(){\n\n // shortcut\n const $this = $(this);\n\n // set value in slider\n if( $this.data('type') == 'min' ) {\n $els.sliderCont.slider( 'values', 0, $this.val() );\n } else {\n $els.sliderCont.slider( 'values', 1, $this.val() );\n }\n\n }", "function updateSlider(obj, that) {\n var currMinPixel, \n currMaxPixel, \n leftCss, \n labelsVal;\n\n //check if our object is an object\n if (typeof obj !== 'undefined') {\n if (!obj.state) {\n \n //call disabled sliders\n that.options.isDisabled = true;\n //\n disableSlider(that);\n \n } else {\n \n //switch the flag for dsiabled slider\n that.options.isDisabled = false;\n \n //remove disabled class\n $(that.element).removeClass('disabled');\n \n //setup all the local variables \n that._prvt.currentMin = obj.min;\n that._prvt.currentMax = obj.max;\n \n //setup the Limit Values\n that.options.minLimit = obj.min;\n that.options.maxLimit = obj.max;\n \n //add values\n currMinPixel = unitsToPixels(that, that._prvt.currentMin);\n currMaxPixel = unitsToPixels(that, that._prvt.currentMax);\n \n //get the CSS property value\n leftCss = parseInt(that._prvt.sliderBarBack.css('left'), 10);\n \n //adjust current offset value\n that._prvt.innerOffset = currMinPixel;\n \n //this will reset the intenal values to what they need to be\n that._prvt.sliderBar.animate({ \n //setup the width and position of this based on the values that are passed in\n 'left': currMinPixel + leftCss,\n 'width': currMaxPixel - currMinPixel + that._prvt.handleWidth + 'px'\n }, 500);\n \n //animate slider range color\n that._prvt.sliderRange.animate({ \n //setup the width and position of this based on the values that are passed in\n 'left': 0,\n 'width': (currMaxPixel - currMinPixel) + (that._prvt.handleWidth / 2) + 'px'\n }, 500);\n \n //adjust values and slider position\n that._prvt.handleMax.animate({\n 'left': currMaxPixel - currMinPixel\n }, 400);\n \n //update min\n that._prvt.handleMin.animate({\n 'left': currMinPixel - currMinPixel\n }, 400);\n \n //update labels\n labelsVal = formatLabels(that);\n that._prvt.maxLabel.html(labelsVal.maxVal);\n that._prvt.minLabel.html(labelsVal.minVal);\n \n //run a funciton that checks for values and makes items hidden if they need to be\n checkMinMaxValues(that);\n }\n }\n }", "function defineInputs() {\r\n\r\n\tsteerYes = filterRadios[0];\r\n\tsteerNo = filterRadios[1];\r\n\tsteerBoth = filterRadios[2];\r\n\r\n\tbrakeYes = filterRadios[3];\r\n\tbrakeNo = filterRadios[4];\r\n\tbrakeBoth = filterRadios[5];\r\n\r\n\tABS_Yes = filterRadios[6];\r\n\tABS_No = filterRadios[7];\r\n\tABS_Both = filterRadios[8];\r\n\r\n\tTC_Yes = filterRadios[9];\r\n\tTC_No = filterRadios[10];\r\n\tTC_Both = filterRadios[11];\r\n\r\n\tSC_Yes = filterRadios[12];\r\n\tSC_No = filterRadios[13];\r\n\tSC_Both = filterRadios[14];\r\n\r\n\tnoDamageYes = filterRadios[15];\r\n\tnoDamageNo = filterRadios[16];\r\n\tnoDamageBoth = filterRadios[17];\r\n\r\n\tgearYes = filterRadios[18];\r\n\tgearNo = filterRadios[19];\r\n\tgearBoth = filterRadios[20];\r\n\r\n\tclutchYes = filterRadios[21];\r\n\tclutchNo = filterRadios[22];\r\n\tclutchBoth = filterRadios[23];\r\n\t\r\n\tlineYes = filterRadios[24];\r\n\tlineNo = filterRadios[25];\r\n\tlineBoth = filterRadios[26];\r\n\r\n\t\r\n\tsetupDefault = filterCheckboxes[0];\r\n\tsetupCustom = filterCheckboxes[1];\r\n\r\n\tcontrolWheel = filterCheckboxes[2];\r\n\tcontrolPad = filterCheckboxes[3];\r\n\tcontrolKeyboard = filterCheckboxes[4];\r\n\r\n\tcameraIn = filterCheckboxes[5];\r\n\tcameraOut = filterCheckboxes[6];\r\n}", "function getValsFromXML(xml){\r\n\tvar counter = 0;\r\n\tvar doc = xml.getElementsByTagName(\"name\");\r\n\tvar descs = $(xml).find(\"inputs\").find(\"description\");\r\n\tdescsDummy = descs;\r\n\r\n\tfor (i=0;i<doc.length;i++)\r\n\t{\r\n\t\tif(doc[i].parentNode.parentNode.nodeName=='inputs'){\r\n\t\t\tinputs[counter] = doc[i].childNodes[0];\r\n\t\t\tvar id = doc[i].parentNode.getElementsByTagName('id')[0].childNodes[0].nodeValue;\r\n\t\t\tinputsMapping[id] = counter;\r\n\r\n\t\t\t$(\"div#sliders\").append(\"<div id='input\"+counter+\"' class='input-var'>\");\r\n\t\t\t$(\"#input\"+counter).append('<span class=\"expand-icon ui-icon ui-icon-triangle-1-e\"></span>');\r\n\t\t\t$(\"#input\"+counter).append(\"<span class='slider-label'><a href='#toggle'>\"+inputs[counter].nodeValue+\"</a></span>\");\r\n\t\t\t$(\"#input\"+counter).append(\"<input class='amount' type='text' id='amount\"+counter+\"'></input>\");\r\n\t\t\t$(\"#input\"+counter).append(\"<div class='slider' id='slider\"+counter+\"'></div>\");\r\n\r\n\t\t\t$(\"#input\"+counter).append(\"<div id='details\"+counter+\"' class='input-details'>\"+\"<strong>description: </strong>\"+descs[counter].textContent+\"</div>\");\r\n\t\t\t$(\"#sliders\").append(\"</div>\");\r\n\r\n\t\t\t$(\"#sliders\").append(\"<br />\");\r\n\t\t\tcounter++;\r\n\t\t}\r\n\t}\r\n\t$(\".input-details\").hide();\r\n\t$(\".expand-icon\").click(function() {\r\n\t\tvar sliderDetails = $(this).next().next().next().next();\r\n\t\tsliderDetails.toggle(\"normal\");\r\n\t\t$(this).toggleClass(\"ui-icon-triangle-1-e\");\r\n\t\t$(this).toggleClass(\"ui-icon-triangle-1-s\");\r\n\t});\r\n\r\n\t$(\"A[href='#toggle']\").click(function() {\r\n\t\tvar sliderDetails = $(this).parent().next().next().next();\r\n\t\tsliderDetails.toggle(\"normal\");\r\n\t\tvar icon = $(this).parent().prev();\r\n\t\ticon.toggleClass(\"ui-icon-triangle-1-e\");\r\n\t\ticon.toggleClass(\"ui-icon-triangle-1-s\");\r\n\t});\r\n\r\n\r\n\taddShowAndHideAll();\r\n}", "function sliderPriceValue(processor, memory, storage) {\n processorSlider.value = processor;\n memorySlider.value = memory;\n storageSlider.value = storage;\n }", "function updateSliders() {\n\n fillToggle.addEventListener('change', function(){\n\n fillnode = (fillnode === \"transparent\") ? \"#bbb\" : \"transparent\";\n d3.selectAll(\"#node-text\").style(\"fill\", fillnode);\n console.log(fillnode);\n });\n\n edgeToggle.addEventListener('change', function(){\n\n hoverlink = !hoverlink;\n });\n\n nodeSlider.noUiSlider.on('update', updateNode);\n\n nodeIn.addEventListener('change', function(){\n nodeSlider.noUiSlider.set(this.value);\n });\n\n edgeSlider.noUiSlider.on('update', updateEdge);\n\n edgeIn.addEventListener('change', function(){\n edgeSlider.noUiSlider.set(this.value);\n });\n\n tensionSlider.noUiSlider.on('update', updateTension);\n\n tensionIn.addEventListener('change', function(){\n tensionSlider.noUiSlider.set(this.value);\n });\n\n weightSlider.noUiSlider.on('update', updateWeight);\n\n weightMinInput.addEventListener('change', function(){\n weightSlider.noUiSlider.set([this.value, weightMax]);\n });\n\n weightMaxInput.addEventListener('change', function(){\n weightSlider.noUiSlider.set([weightMin, this.value]);\n });\n\n inSlider.noUiSlider.on('update', updateIn);\n\n inIn.addEventListener('change', function(){\n inSlider.noUiSlider.set(this.value);\n });\n\n outSlider.noUiSlider.on('update', updateOut);\n\n outIn.addEventListener('change', function(){\n outSlider.noUiSlider.set(this.value);\n });\n}", "function updateNumberInputValue() {\n \"use strict\";\n var id = this.getAttribute(\"class\");\n var val = this.value;\n\n // Update Sliders Range Input with it's respective Number Input value\n var inputSlider = document.getElementById(id);\n inputSlider.value = val;\n renderView();\n}", "function drawSliders() {\n\n noUiSlider.create(nodeSlider, {\n start: [ 8 ],\n connect: 'lower',\n tooltips: [ true ],\n range: {\n 'min': [ 0 ],\n 'max': [ 16 ]\n }\n });\n\n noUiSlider.create(edgeSlider, {\n start: [ 1 ],\n connect: 'lower',\n tooltips: [ true ],\n range: {\n 'min': [ 0 ],\n 'max': [ 4 ]\n }\n });\n\n noUiSlider.create(tensionSlider, {\n start: [ 0.7 ],\n connect: 'lower',\n tooltips: [ true ],\n range: {\n 'min': [ 0 ],\n 'max': [ 1 ]\n }\n });\n\n noUiSlider.create(weightSlider, { \n start: [ 0, MAXWEIGHT ],\n connect: true,\n tooltips: [ true, true ],\n range: {\n 'min': [ 0 ],\n '20%': [ MAXWEIGHT*0.0016 ],\n '40%': [ MAXWEIGHT*0.008 ],\n '60%': [ MAXWEIGHT*0.04 ],\n '80%': [ MAXWEIGHT*0.2 ],\n 'max': [ MAXWEIGHT ]\n }\n });\n\n noUiSlider.create(inSlider, {\n start: [ MAXIN ],\n connect: 'lower',\n tooltips: [ toInt ],\n step: 1,\n range: {\n 'min': [ 0 ],\n '20%': [ MAXIN*0.0016 ],\n '40%': [ MAXIN*0.008 ],\n '60%': [ MAXIN*0.04 ],\n '80%': [ MAXIN*0.2 ],\n 'max': [ MAXIN ]\n }\n });\n\n noUiSlider.create(outSlider, {\n start: [ MAXOUT ],\n connect: 'lower',\n tooltips: [ toInt ],\n step: 1,\n range: {\n 'min': [ 0 ],\n '20%': [ MAXOUT*0.0016 ],\n '40%': [ MAXOUT*0.008 ],\n '60%': [ MAXOUT*0.04 ],\n '80%': [ MAXOUT*0.2 ],\n 'max': [ MAXOUT ]\n }\n });\n\n isDrawn = true;\n updateSliders();\n}", "function createSliderView() {\n console.log('createSliderView');\n var i = 0;\n for (group_name in link_group) {\n $(\"#slider-pane\").append('<div id=\"' + group_name + '\"/>');\n if (i != 0) {\n $(\"#\" + group_name).hide();\n }\n else {\n current_group = group_name;\n i++;\n }\n }\n joint_names.get(function(value) {\n names = value.names;\n for (group_name in link_group) {\n for (var i = 0;i < names.length;i++) {\n if (link_group[group_name].indexOf(names[i]) != -1) {\n child = $('<label>', {for: names[i], text: names[i], class: \"col-form-label-sm\", id: names[i]});\n child3 = $('<span>', {class: \"float-right\", text:\"0\", id: names[i]});\n child2 = $('<input>', {type: \"range\", name: names[i], class: \"form-control form-control-sm\", id: names[i], value: 0, max: eval(\"value.\" + names[i] + \".max\"), min: eval(\"value.\" + names[i] + \".min\"), step: 0.000001, oninput: \"callback()\", onchange: \"callback()\"});\n $(\"#\" + group_name).append(child);\n $(\"#\" + group_name).append(child3);\n $(\"#\" + group_name).append(child2);\n }\n }\n }\n //$.getScript(\"js/jquery-mobile/jquery.mobile-1.3.2.min.js\");\n var msg = new ROSLIB.Message({\n data: current_group\n });\n start_initial_interactive_pub.publish(msg);\n goal_initial_interactive_pub.publish(msg);\n });\n}", "function sliderProps() {\n if(g.diagram == \"P-V-diagram\"){\n slider.setAttribute(\"min\",\"275\");\n slider.setAttribute(\"max\",\"750\");\n slider.setAttribute(\"step\",\"5\");\n slider.value = \"500\";\n g.slider = Number(slider.value);\n slider_label.innerHTML = `${g.slider}`;\n slider_units.innerHTML = \"Temperature (K)\";\n } else {\n slider.setAttribute(\"min\",\"0.2\");\n slider.setAttribute(\"max\",\"25\");\n slider.setAttribute(\"step\",\"0.2\");\n slider.value = \"9\";\n g.slider = Number(slider.value);\n slider_label.innerHTML = `${g.slider}`;\n slider_units.innerHTML = \"Pressure (MPa)\";\n }\n}", "function draw_Update_Slider_Change() {\n\t\tsetDomain();\n\n\t\t//Draw x axis again\n\t\tupdateX();\n\n\t\t//Draw y axis again\n\t\td3.select('#axisY')\n\t\t\t.transition().duration(500)\n\t\t\t.call(d3.axisLeft(y));\n\n\t\tswitch(typeOfClass) {\n\t\t\tcase 1:\n\t\t\t\tupdateBoth();\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tupdateFall();\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tupdateSpring();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tconsole.log('draw update slider error');\n\t\t}\n\t}", "_bindUnits() {\n\n\t\t// Unit defaults must be set before sliders are created.\n\t\tthis.setUnits( this._getDefaultUnits() );\n\n\t\tthis.$control.find( '.unit' ).on( 'change', e => {\n\t\t\tthis.selectedUnit = e.target.value;\n\t\t\tthis._unitsChanged();\n\t\t} );\n\t}", "createSlider() {\n // make a slider div\n let sliderDiv = document.createElement(\"div\")\n sliderDiv.id = \"sliderdiv\"\n //initiate the slider\n let range = document.createElement(\"input\")\n range.id = \"rangeslider\"\n let label = document.createElement(\"label\")\n label.id = \"rangesliderlabel\"\n range.name = \"slicerange\"\n range.type = \"range\"\n label.setAttribute(\"for\", \"slicerange\")\n sliderDiv.append(range)\n sliderDiv.append(label)\n this.ctrlDiv.append(sliderDiv)\n /** The html input element used to select the slice to draw. */\n this.slider = range\n /** The label specifying which mm slice in the brain we are looking at */\n this.sliderlabel = label\n // makes several attributes helpful for handling slider change\n this.prepRangeData()\n // draw a default slice\n this.slider.value = Math.round(this.sliderSlices.sagittal.length / 2)\n\n // add the on input event emitter for when slider moves\n this.slider.oninput = () => {\n /** The slider value the user has selected */\n this.selectedSliceIndex = parseInt(this.slider.value)\n // now determine which slice we are supposed to draw the boundaries of provided the selected brain view an the slice index\n let ind = parseInt(range.value)\n /** This is the value that the slider is currently set at. \n * @alias sliderIndex\n * @memberof Pane\n * @instance\n */\n this.paneOb.sliderIndex = ind\n // name is helpful at time of export\n let name = this.sliderSlices[this.paneOb.brainView][ind]\n /** This is the name of the slice file that we are drawing to the canvas. The actual name was once a geojson file in a directory, but now it also corresponds to an object within the regionBoundaryData attribute of the Pane as well as the application.\n * @alias sliceName\n * @memberof Pane\n * @instance\n */\n this.paneOb.sliceName = name\n this.sliderlabel.innerHTML = this.sliderMeasurements[this.paneOb.brainView][ind]\n /** This is the particular value of the slice displayed on the canvas. Can be positive or negative and is followed by a unit of \"mm\".\n * @alias sliceMeasure\n * @memberof Pane\n * @instance\n */\n this.paneOb.sliceMeasure = this.sliderlabel.innerHTML\n // provide the name of the slice to the canvas drawing machinery\n // sliderchange is a custom event that the canvas is listening for\n let e = new Event(\"sliderchange\")\n if (this.eTarget) {\n let slice = this.paneOb.regionBoundaryData[this.sliderSlices[this.paneOb.brainView][this.paneOb.sliderIndex]]\n\n /** This is the actual object containing the regions boundary coordinates for the particular slice the user has specified using the slider and the brain view options.\n * @alias sliceData\n * @memberof Pane\n * @instance\n */\n this.paneOb.sliceData = slice\n // dispatch to the eTarget the canvas\n this.eTarget.dispatchEvent(e)\n }\n }\n }", "function stepSliderControl(event)\n{\n switch(event.target.tag)\n {\n case SliderEnum.SYNTH_VELOCITY:\n step[stepSelected].synthVelocity = event.target.value;\n sliderDisplay[0].innerHTML = event.target.value;\n console.log(\"Here\");\n break;\n case SliderEnum.SYNTH_PITCH:\n step[stepSelected].synthPitch = event.target.value;\n sliderDisplay[1].innerHTML = NoteName[event.target.value];\n break;\n case SliderEnum.SYNTH_OCTAVE:\n step[stepSelected].synthOctave = event.target.value;\n sliderDisplay[2].innerHTML = event.target.value;\n break;\n case SliderEnum.SYNTH_CHANCE:\n step[stepSelected].synthChance = event.target.value;\n sliderDisplay[3].innerHTML = event.target.value;\n break;\n case SliderEnum.DRUM_VELOCITY:\n step[stepSelected].drumVelocity = event.target.value;\n sliderDisplay[0].innerHTML = event.target.value;\n break;\n case SliderEnum.DRUM_TYPE:\n step[stepSelected].drumType = event.target.value;\n sliderDisplay[1].innerHTML = DrumName[event.target.value];\n break;\n case SliderEnum.DRUM_CHANCE:\n step[stepSelected].drumChance = event.target.value;\n sliderDisplay[3].innerHTML = event.target.value;\n break;\n }\n}", "init(model, context) {\n\n this.name = \"gapminder-timeslider\";\n this.template = this.template || require(\"./timeslider.html\");\n this.prevPosition = null;\n //define expected models/hooks for this component\n this.model_expects = [{\n name: \"time\",\n type: \"time\"\n }, {\n name: \"marker\",\n type: \"marker\"\n }, {\n name: \"ui\",\n type: \"ui\"\n }];\n\n const _this = this;\n //binds methods to this model\n this.model_binds = {\n \"change:time\": function(evt, path) {\n if (_this.slide) {\n if (([\"time.start\", \"time.end\"]).indexOf(path) !== -1) {\n if (!_this.xScale) return;\n _this.changeLimits();\n }\n _this._optionClasses();\n //only set handle position if change is external\n if (!_this.model.time.dragging) _this._setHandle(_this.model.time.playing);\n }\n },\n \"change:time.start\": function(evt, path) {\n if (_this.slide) {\n //only set handle position if change is external\n if (!_this.model.time.dragging) _this._setHandle(_this.model.time.playing);\n _this.ready();\n }\n },\n \"change:time.end\": function(evt, path) {\n if (_this.slide) {\n //only set handle position if change is external\n if (!_this.model.time.dragging) _this._setHandle(_this.model.time.playing);\n _this.ready();\n }\n },\n \"change:time.offset\": function(evt, path) {\n if (_this.slide) {\n _this._updateProgressBar();\n _this.model.marker.listenFramesQueue(null, time => {\n _this._updateProgressBar(time);\n });\n }\n },\n \"change:time.startSelected\": function(evt, path) {\n if (_this.slide) {\n _this.updateSelectedStartLimiter();\n }\n },\n \"change:time.endSelected\": function(evt, path) {\n if (_this.slide) {\n _this.updateSelectedEndLimiter();\n }\n },\n \"change:marker.select\": function(evt, path) {\n if (path.indexOf(\"select.labelOffset\") !== -1) return;\n\n _this.setSelectedLimits();\n }\n };\n\n // Same constructor as the superclass\n this._super(model, context);\n\n this.profiles = utils.deepClone(profiles);\n this.presentationProfileChanges = utils.deepClone(presentationProfileChanges);\n\n if ((this.model.ui.chart || {}).margin) {\n this.model.on(\"change:ui.chart.margin\", (evt, path) => {\n const layoutProfile = _this.getLayoutProfile();\n if (layoutProfile !== \"small\") {\n const profile = _this.profiles[layoutProfile];\n profile.margin.left = _this.model.ui.chart.margin.left;\n }\n if (_this.slide) {\n _this.updateSize();\n }\n });\n }\n\n // Sort of defaults. Actually should be in ui default or bubblechart.\n // By not having \"this.model.ui =\" we prevent it from going to url (not defined in defaults)\n // Should be in defaults when we make components config part of external config (& every component gets own config)\n this.ui = utils.extend({\n show_ticks: false,\n show_value: false,\n show_value_when_drag_play: true,\n show_button: true,\n axis_aligned: false\n }, model.ui.getPlainObject(), this.ui);\n\n\n //defaults\n this.width = 0;\n this.height = 0;\n this.availableTimeFrames = [];\n this.completedTimeFrames = [];\n this.getValueWidth = utils.memoize(this.getValueWidth);\n this._setTime = utils.throttle(this._setTime, 50);\n }", "setValues(searchTerms, operator) {\n if (searchTerms) {\n let sliderValues = [];\n // get the slider values, if it's a string with the \"..\", we'll do the split else we'll use the array of search terms\n if (typeof searchTerms === 'string' || (Array.isArray(searchTerms) && typeof searchTerms[0] === 'string') && searchTerms[0].indexOf('..') > 0) {\n sliderValues = (typeof searchTerms === 'string') ? [searchTerms] : searchTerms[0].split('..');\n }\n else if (Array.isArray(searchTerms)) {\n sliderValues = searchTerms;\n }\n if (Array.isArray(sliderValues) && sliderValues.length === 2) {\n this.$filterElm.slider('values', sliderValues);\n if (!this.filterParams.hideSliderNumbers) {\n this.renderSliderValues(sliderValues[0], sliderValues[1]);\n }\n }\n }\n // set the operator when defined\n this.operator = operator || this.defaultOperator;\n }", "setValues(searchTerms, operator) {\n if (searchTerms) {\n let sliderValues = [];\n // get the slider values, if it's a string with the \"..\", we'll do the split else we'll use the array of search terms\n if (typeof searchTerms === 'string' || (Array.isArray(searchTerms) && typeof searchTerms[0] === 'string') && searchTerms[0].indexOf('..') > 0) {\n sliderValues = (typeof searchTerms === 'string') ? [searchTerms] : searchTerms[0].split('..');\n }\n else if (Array.isArray(searchTerms)) {\n sliderValues = searchTerms;\n }\n if (Array.isArray(sliderValues) && sliderValues.length === 2) {\n this.$filterElm.slider('values', sliderValues);\n if (!this.filterParams.hideSliderNumbers) {\n this.renderSliderValues(sliderValues[0], sliderValues[1]);\n }\n }\n }\n // set the operator when defined\n this.operator = operator || this.defaultOperator;\n }", "function initSliderPositions() {\n // console.log('Init Slider Pos runs');\n sliders.forEach(slider => {\n if (slider.name === 'hue') {\n // Get the correct color from the array based on the data atttribute of the current slider\n // which will have the correct number for the index based on which group the slider is in\n const color = colorsArr[slider.getAttribute('data-hue')];\n // Extract the hue from that color and save it\n const hueValue = Math.floor(chroma(color).hsl()[0]);\n // console.log(hueValue);\n // set the current slider's value to the hue\n slider.value = hueValue;\n } else if (slider.name === 'saturation') {\n const color = colorsArr[slider.getAttribute('data-sat')];\n const saturationValue = Math.floor(chroma(color).hsl()[1] * 100) / 100;\n slider.value = saturationValue;\n } else {\n const color = colorsArr[slider.getAttribute('data-bright')];\n const brightnessValue = Math.floor(chroma(color).hsl()[2] * 100) / 100;\n slider.value = brightnessValue;\n }\n });\n}", "updateInputs() {\n for (let [key, value] of Object.entries(this.settings)) {\n if (typeof value !== 'object')\n $(`[name=${key}]`)\n .val(this.settings[key])\n else {\n const elm = $(`.key-input[data-setting=${key}]`)\n elm.toggleClass('focused', this.editingBind === key)\n elm.find('.label')\n .html(formatAction(value))\n }\n }\n localStorage['settings'] = JSON.stringify(this.settings)\n this.updateTimeSlider()\n }", "create_sliderHeaven(cage,dataValues){\n let options;\n if(dataValues){\n options = [\n {\n min: 0,max: 0.75*4, step: 0.01,\n rangeHighlights: [{ \"start\": 0.7, \"end\": 0.8, \"class\": \"category1\" }],\n },\n {\n min: 0,max: 3*4,step: 0.1,\n rangeHighlights: [{ \"start\": 2.5, \"end\": 3.5, \"class\": \"category1\" }],\n },\n {\n min: 0,max: 20*4,step: 0.2,\n rangeHighlights: [{ \"start\": 15, \"end\": 25, \"class\": \"category1\" }],\n },\n ]\n }\n let list = {}; // store slider list\n const nodeList = document.getElementsByClassName(\"sliders\");\n for (let i=0, l=nodeList.length; i<l; i++) {\n const input = nodeList[i];\n const attributID = input.id.split(\".\");\n const slider = new Slider(input, { tooltip: 'always', ...options[i]}); // step: 0.1, value:0, min: 0, max: 1,\n slider.tooltip.style.opacity = 1, slider.tooltip.style.opacity = 1, slider.tooltip.style.opacity = 1;\n slider.on(\"slide\", ()=>{\n cage.dataObj.dataValues[attributID[0]][attributID[1]][attributID[2]] = slider.getValue();\n cage.asignDataObjValues();\n });\n list[input.id] = slider;\n };\n return list;\n }", "function settingsMenu(){\r\n hideMenuTable();\r\n showSettingTable();\r\n var FXSlider = document.getElementById(\"FXVol\");\r\n\r\n // Update the current slider value (each time you drag the slider handle)\r\n FXSlider.oninput = function() {\r\n FXVolLvl = this.value;\r\n }\r\n\r\n var MusicSlider = document.getElementById(\"MusicVol\");\r\n\r\n // Update the current slider value (each time you drag the slider handle)\r\n MusicSlider.oninput = function() {\r\n MusicVolLvl = this.value;\r\n }\r\n}", "function initializeControls() {\n\n // Create slider & attach listener\n $(\"#minimumEdgeWeightSlider\").slider({\n min: 0,\n max: 100,\n disabled: true,\n stop: changeMinimumEdgeWeight,\n change: function(event, ui) {\n $(\"#currentMinimumEdgeWeight\").text(ui.value);\n }\n });\n\n // Attach handlers to checkbox controls\n $(\"#includePastSemestersCheckbox\").change(toggleIncludePastSemesters);\n $(\"#includeSingletonsCheckbox\").change(toggleIncludeSingletons);\n $(\"#includePartnerEdgesCheckbox\").change(toggleIncludePartnerEdges);\n $(\"#includeSolutionCheckbox\").change(toggleIncludeSolution);\n $(\"#anonymousGraphCheckbox\").change(toggleAnonymousGraph);\n\n // Disable everything in the controls\n $('#right-sidebar *').attr('disabled', true);\n}", "_init() {\n this.inputs = this.$element.find('input');\n this.handles = this.$element.find('[data-slider-handle]');\n\n this.$handle = this.handles.eq(0);\n this.$input = this.inputs.length ? this.inputs.eq(0) : $(`#${this.$handle.attr('aria-controls')}`);\n this.$fill = this.$element.find('[data-slider-fill]').css(this.options.vertical ? 'height' : 'width', 0);\n\n var isDbl = false,\n _this = this;\n if (this.options.disabled || this.$element.hasClass(this.options.disabledClass)) {\n this.options.disabled = true;\n this.$element.addClass(this.options.disabledClass);\n }\n if (!this.inputs.length) {\n this.inputs = $().add(this.$input);\n this.options.binding = true;\n }\n\n this._setInitAttr(0);\n\n if (this.handles[1]) {\n this.options.doubleSided = true;\n this.$handle2 = this.handles.eq(1);\n this.$input2 = this.inputs.length > 1 ? this.inputs.eq(1) : $(`#${this.$handle2.attr('aria-controls')}`);\n\n if (!this.inputs[1]) {\n this.inputs = this.inputs.add(this.$input2);\n }\n isDbl = true;\n\n // this.$handle.triggerHandler('click.zf.slider');\n this._setInitAttr(1);\n }\n\n // Set handle positions\n this.setHandles();\n\n this._events();\n }", "function initControls() {\n // Create html for basic structure:\n // top_controls -> stici_chart -> area_info -> botom_controls.\n var o = jQuery('<div/>').addClass('stici').addClass('stici_normhilite');\n self.container.append(o);\n self.chartDiv = jQuery('<div/>')\n .addClass('stici_chart')\n .addClass('chart_box');\n o.append(self.chartDiv);\n self.areaInfoDiv = jQuery('<div/>')\n .addClass('area_info');\n o.append(self.areaInfoDiv);\n var bottom = jQuery('<div/>').addClass('bottom_controls');\n o.append(bottom);\n\n // Area from input/slider.\n self.areaFrom = new SticiTextBar({\n label: 'Lower endpoint: ',\n step: 0.001,\n change: refreshSelectedAreaOverlay\n });\n\n // Area to input/slider.\n self.areaTo = new SticiTextBar({\n label: ' Upper endpoint: ',\n step: 0.001,\n change: refreshSelectedAreaOverlay\n });\n\n bottom.append(self.areaFrom, self.areaTo);\n\n if (self.options.distribution != 'normal') {\n var df = new SticiTextBar({\n label: ' Degrees of Freedom: ',\n step: 1,\n min: 1,\n max: 350,\n value: self.df,\n change: function(e, value) {\n self.df = value;\n redrawChart();\n refreshSelectedAreaOverlay();\n }\n });\n bottom.append(df);\n }\n // Set vertical positions based upon available controls.\n self.areaInfoDiv.css('bottom', (bottom.height() + 10) + 'px');\n self.chartDiv.css('margin-bottom', (bottom.height() + self.areaInfoDiv.height() + 15) + 'px');\n }", "function bindSliderAndNumberInputs(id) {\r\n\t// Contrast inputs (even though ids says \"intensity\")\r\n\t$('#' + id + '-intensity-input, #' + id + '-intensity-num').on('input', function() {\r\n\t\t$('#' + id + '-intensity-input, #' + id + '-intensity-num').val(this.value);\r\n\t});\r\n\t// Brightness inputs\r\n\t$('#' + id + '-brightness-input, #' + id + '-brightness-num').on('input', function() {\r\n\t\t$('#' + id + '-brightness-input, #' + id + '-brightness-num').val(this.value);\r\n\t});\r\n}", "customRange() {\n\t\t$(\".range-wrap\").each(function () {\n\t\t\tlet _this = $(this);\n\t\t\tvar $d3 = _this.find(\".slider-js\");\n\n\t\t\tvar slider = $d3.ionRangeSlider({\n\t\t\t\tskin: \"round\",\n\t\t\t\ttype: \"double\",\n\t\t\t\tgrid: false,\n\t\t\t\tgrid_snap: false,\n\t\t\t\thide_min_max: true,\n\t\t\t\thide_from_to: true,\n\t\t\t\tonStart: function (data) {\n\t\t\t\t\t_this.find('.minus').val(data.from);\n\t\t\t\t\t_this.find('.plus').val(data.to);\n\t\t\t\t},\n\t\t\t\tonChange: function (data) {\n\t\t\t\t\t_this.find('.minus').val(data.from);\n\t\t\t\t\t_this.find('.plus').val(data.to);\n\t\t\t\t},\n\t\t\t\tonFinish: function (data) {\n\t\t\t\t\t_this.find('.minus').val(data.from);\n\t\t\t\t\t_this.find('.plus').val(data.to);\n\t\t\t\t},\n\t\t\t\tonUpdate: function (data) {\n\t\t\t\t\t_this.find('.minus').val(data.from);\n\t\t\t\t\t_this.find('.plus').val(data.to);\n\t\t\t\t}\n\t\t\t});\n\t\t\tvar $d3_instance = slider.data(\"ionRangeSlider\");\n\t\t\t$(this).on('change input cut copy paste', '.minus', function () {\n\t\t\t\tvar th = $(this);\n\t\t\t\tvar data = th.val();\n\t\t\t\tvar min = +data;\n\t\t\t\t// th.val(data + ' т')\n\t\t\t\tconsole.log(1);\n\t\t\t\t$d3_instance.update({\n\t\t\t\t\tfrom: min,\n\t\t\t\t})\n\t\t\t});\n\n\t\t\t$(this).on('change input cut copy paste', '.plus', function () {\n\t\t\t\tvar th = $(this);\n\t\t\t\tvar data = th.val();\n\t\t\t\tvar max = +data;\n\n\t\t\t\t//max => new val of max inp\n\t\t\t\t//min => value of the min inp\n\n\t\t\t\tlet min = Number(document.querySelector('.range-result.range-result--minus.minus').value);\n\t\t\t\tif (min >= max) {\n\t\t\t\t\tmin = 0;\n\t\t\t\t\t$d3_instance.update({\n\t\t\t\t\t\tfrom: min,\n\t\t\t\t\t\tto: max,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$d3_instance.update({\n\t\t\t\t\t\tto: max,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t\t// $d3.on(\"change\", function () {\n\t\t\t// \tvar $inp = $(this);\n\t\t\t// \tvar from = $inp.prop(\"value\"); // reading input value\n\t\t\t// \tvar from2 = $inp.data(\"from\"); // reading input data-from attribute\n\n\t\t\t// \t_this.find('range-result--minus').val(from); // FROM value\n\t\t\t// \t_this.find('range-result--plus').val(from); // FROM value\n\t\t\t// });\n\n\n\t\t})\n\t}", "update( e ){\n // Assign to let changedID ID of slider which has been changed\n let changedID = e.target.id;\n let value = e.target.value;\n if (changedID === 'sliderAmount') {\n this.setState({valueAmount: e.target.value});\n }\n if (changedID === 'sliderDuration'){\n this.setState({valueDuration: e.target.value});\n }\n\n\n this.calculate(changedID, value);\n }", "function inputMinSliderLeft(){//slider update inputs\n inputMin.value=sliderLeft.value;\n}", "function initialize() {\n setText(initialSliderValue);\n setImage(initialSliderValue);\n computeHolderMargin(initialSliderValue);\n scaleOrHideLabel(initialSliderValue);\n}", "function setControls(){\n//unused: theedgelengthOutput.value=theedgelength.value;\n//unused: therotangleOutput.value=therotangle.value;\n thenodesizeOutput.value=thenodesize.value;\n thelinewidthOutput.value=thelinewidth.value;\n thecubegapOutput.value=thecubegap.value;\n thescaleOutput.value=thescale.value;\n}", "function weightSliderValueChange() {\n $('#sliderWeight').on('input', function () { //versions of IE < 9 do not support this event, they have proprietary onPropertyChange event\n $('.sliderWeightValue').text($(this).val() + \"%\");\n }).on('mouseup', function () {\n var value = $(this).val();\n\n //remove selected value on another slider\n $('#sliderSummation').val(0);\n $('.sliderSummationValue').text(\"-\");\n\n //show overlays\n $('#controls-panel-overlay').show();\n $('#best-results-table-overlay').show();\n\n $('.sliderWeightValue').text(value + \"%\");\n $('input[type=radio][name=select]:checked').prop('checked', false);\n setTimeout(function(){\n selectButtonsByWeight(value);\n displayModelsSelectedByWeight(value, selectedSolution);\n displayCurves();\n }, 10);\n });\n}", "render_() {\n super.render_();\n this.updateSlider_();\n }", "function populateActionsFormWithValues() {\r\n\tvar values = $(scenarioXML).find(\"inputs variable\");\r\n\t// populate inputs/sliders with values\r\n\tif (scenarioId > 0) {\r\n\t\tfor (var i = 0; i < values.length; i++) { \r\n\t\t\tvar current = values.eq(i);\r\n\t\t\tvar id = current.find(\"id\").text();\r\n\t\t\r\n\t \t\tvar l_min = getInputMin(inputsMapping[id]); \r\n\t \t\tvar l_max = getInputMax(inputsMapping[id]);\r\n\t \t\tvar value = current.find(\"data\").text().replace(\"[[\",\"\").replace(\"]]\", \"\");\r\n\t \t\r\n\t \t\tamountString = \"#amount\" + inputsMapping[id]; \r\n\t \t\tsliderString = \"#slider\" + inputsMapping[id];\r\n\t \t\r\n\t \t\t$(amountString).val(value);\r\n\t \t\r\n\t \t\tvar sliderValue = ((value-l_min)/(l_max-l_min))*1000;\r\n\t \t\r\n\t \t\t$(sliderString).slider('option', 'value', sliderValue); \r\n\t\t}\r\n\t}\r\n}", "sliderHandler(event){\n\t\t// Use this function to send the following to masterReducer:\n\t\t\t\t// 1) the value of this slider set by user, aka (event.target.value)\n\t\t\t\t// 2) the specific shape the user is manipulating, aka (event.target.className.split(\" \")[0])\n\t\t\t\t// 3) and the name of the key value to manipulate in state aka (event.target.className.split(\" \")[1])\n\n\t\t// With that payload data, the master reducer will then do the following :\t\t\n\t\t\t // 1) search the masterSVGarray\n\t\t\t // 2) find the location of this unique SVG on this master array by using the index of this shape in master array (className.split(\" \")[0] is this shapes index)\n\t\t\t // 3) finally find the key on this unique svg obj that matches the event.target.id that was passed and manipulate its value\n\t\tthis.props.useSlider(event.target.value, event.target.className.split(\" \")[0], event.target.className.split(\" \")[1]);\n\t\t// console.log(event.target.className.split(\" \")[1]);\n\t}", "function updateMortalitySlider(valA, valB){\n $('.mortality-slider').slider(\"values\", 0, valA)\n $(\".mortality-rate-slider.lower-handle\").text(valA)\n $('.mortality-slider').slider(\"values\", 1, valB)\n $(\".mortality-rate-slider.upper-handle\").text(valB)\n}", "function updateRangeInputValue() {\n \"use strict\";\n var id = this.id;\n var val = this.value;\n\n // Update Number Input with it's respective Sliders Range Input value\n var inputNumber = document.getElementsByClassName(id);\n inputNumber[0].value = val;\n renderView();\n}", "function updateIncidenceSlider(valA, valB){\n $('.incidents-slider').slider(\"values\", 0, valA)\n $(\".incidents-rate-slider.lower-handle\").text(valA)\n $('.incidents-slider').slider(\"values\", 1, valB)\n $(\".incidents-rate-slider.upper-handle\").text(valB)\n}" ]
[ "0.66982645", "0.6648741", "0.6488644", "0.6488358", "0.64777166", "0.64699554", "0.6463922", "0.64283025", "0.6360858", "0.6199315", "0.6187508", "0.61853683", "0.6131914", "0.612976", "0.61178917", "0.61038005", "0.6069274", "0.60461164", "0.60283965", "0.6019593", "0.60164905", "0.6001121", "0.6001121", "0.6001121", "0.5971356", "0.59503156", "0.5948846", "0.5929214", "0.59165454", "0.5898328", "0.5893309", "0.5892363", "0.58758664", "0.5874092", "0.58690786", "0.58268803", "0.5815976", "0.5813975", "0.5813975", "0.5812465", "0.58076286", "0.5792531", "0.57891285", "0.5779304", "0.57701623", "0.5732902", "0.5731911", "0.57270074", "0.5716036", "0.571501", "0.5712628", "0.57034034", "0.57016754", "0.5690936", "0.56892055", "0.56667334", "0.5666665", "0.56507653", "0.5629523", "0.56290793", "0.56037223", "0.5600094", "0.5595937", "0.55952203", "0.55932575", "0.5581192", "0.55759877", "0.5574135", "0.5568202", "0.556656", "0.5553157", "0.55370444", "0.5532511", "0.5517122", "0.5511854", "0.55109245", "0.5500427", "0.5500244", "0.548031", "0.548031", "0.54755384", "0.54636085", "0.5460728", "0.5459909", "0.5455954", "0.54520726", "0.54390997", "0.5436871", "0.5434529", "0.5433743", "0.54262954", "0.5423748", "0.54051375", "0.53992933", "0.5395271", "0.53950226", "0.53937954", "0.5387446", "0.5386676", "0.53679717" ]
0.55402553
71
open create feed modal
function openModal() { document.getElementById("backdrop").style.display = "block"; document.getElementById("createFeedModal").style.display = "block"; document.getElementById("createFeedModal").classList.add("show"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function presentAddFeedModal( langs_data ) {\n lang_manually_selected = false;\n\n // create the modal with the `modal-page` component\n $doc.trigger('open-modal', [\n await modalController.create({\n component: 'modal-add-feed',\n componentProps: {\n 'langs' : langs_data\n },\n }),\n function() {\n setTimeout(function() {\n $('#feed_url')[0].setFocus();\n }, 500);\n }\n ]);\n }", "function visualiserFeed(){\n ///var files = document.getElementById(\"txtedFich\").value;\n // service pour visualiser feed\n var url = \"/feed\";\n window.open(url,\"_blank\");\n} // end visualiser pdffeed", "async function presentEditFeedModal( $item, langs_data ) {\n // create the modal with the `modal-page` component\n $doc.trigger('open-modal', [\n await modalController.create({\n component: 'modal-update-feed',\n componentProps: {\n 'langs' : langs_data,\n 'lang' : $item.data('lang'),\n 'id' : $item.data('id'),\n 'url' : $item.data('url'),\n 'title' : $item.find('ion-label h3 span').text(),\n 'allow_duplicates' : $item.data('allow-duplicates'),\n },\n }),\n function() {\n setTimeout(function() {\n $('#feed_title')[0].setFocus();\n }, 500);\n }\n ]);\n }", "newBlog(){\n\t fetch(`${this.url}Controllermodal/newblogmodal`)\n\t .then(dataModal=>{\n\t dataModal.json().then(modal=>{\n\t document.getElementById('parentmodalInsertBlog').style.display=\"block\";\n\t document.getElementById(\"modalNewBlog\").innerHTML=modal;\n\t })\n\t })\n\t}", "function CreateShow() {\n function CreatePost() {\n let main = $(\"<div></div>\").addClass(\n \"mt-3 col-12 col-md-6 col-lg-4 items\"\n );\n let card = $(\"<div></div>\").addClass(\"card\");\n let img = $('<img class=\"card-img-top\">').attr(\"src\", \"\");\n let cardbody = $(\"<div></div>\").addClass(\"card-body\");\n let cardtitle = $(\"<h5></h5>\").addClass(\"card-title\");\n let cardtext = $(\"<p></p>\").addClass(\"card-text\");\n let span = $(\"<span></span>\");\n let button = $(\"<button></button>\").addClass(\"P btn btn-primary\");\n let link = $(\"<a></a>\").addClass(\"link\");\n button.attr(\"data-toggle\", \"modal\");\n button.attr(\"data-target\", \"#myModal\");\n button.text(\"more info\");\n\n cardtext.append(span);\n main.append(card);\n card.append(img);\n card.append(cardbody);\n cardbody.append(cardtitle);\n cardbody.append(cardtext);\n link.append(button);\n cardbody.append(link);\n $(\"#post\").append(main);\n }\n\n //! Show Post\n for (let i = 0; i < response.length; i++) {\n CreatePost();\n $(\".card-img-top\")[i].src = \"./carInfo/\"+response[i].img;\n $(\".card-title\")[i].innerHTML += `<span>${response[i].title}</span>`;\n $(\".card-text span\")[i].innerHTML = response[i].description;\n $(\".link\")[i].href = response[i].link;\n }\n }", "onBtnNew(){\n this._doOpenModalPost();\n }", "function openPostModal() {\n PostDepartmentService.postItem();\n }", "click(){\n\t\t\t\tcreateAddWindow();\n\t\t\t}", "function showCreatePost(){\r\n var modal = document.getElementById(\"create-post-modal\");\r\n modal.style.display = \"flex\";\r\n }", "function ouvrir() {\n creationModal();\n }", "function creaPrenotazione() {\n\t$('#modPrenotazione').window('open');\n\n}", "async create(feed) {\n feed.options = {\n title: 'Mastering Backend Development',\n link: 'https://masteringbackend.com/feed.xml',\n description: 'This is Mastering Backend Development feeds!',\n }\n\n const posts = await Utils.getPosts()\n posts.forEach((post) => {\n feed.addItem({\n title: post.title,\n id: `https://masteringbackend.com/posts/${post.slug}`,\n link: `https://masteringbackend.com/posts/${post.slug}`,\n description: post.excerpt,\n content: post.content,\n date: new Date(post.date),\n updated: new Date(post.modified),\n author: {\n name: post.author.name,\n link: 'https://masteringbackend.com/authors/' + post.author.slug,\n },\n })\n\n post.categories.forEach((category) => {\n feed.addCategory(category.title)\n })\n\n feed.addContributor({\n name: post.author.name,\n })\n })\n }", "async create(feed) {\n feed.options = {\n title: 'Mastering Backend Development',\n link: 'https://masteringbackend.com/jobs.xml',\n description: 'This is Mastering Backend Development Job feeds!',\n }\n\n const jobs = await Utils.getJobs()\n jobs.forEach((job) => {\n feed.addItem({\n title: job.title,\n id: `https://masteringbackend.com/jobs/${job.slug}`,\n link: `https://masteringbackend.com/jobs/${job.slug}`,\n description: job.location,\n content: job.description,\n date: new Date(job.created_at),\n updated: new Date(job.created_at),\n // author: {\n // name: post.author.name,\n // link: 'https://masteringbackend.com/authors/' + post.author.slug,\n // },\n })\n })\n }", "function CreateShow() {\n function CreatePost() {\n let main = $(\"<div></div>\").addClass(\n \"mt-3 col-12 col-md-6 col-lg-4 items\"\n );\n let card = $(\"<div></div>\").addClass(\"card\");\n let img = $('<img class=\"card-img-top\">').attr(\"src\", \"\");\n let cardbody = $(\"<div></div>\").addClass(\"card-body\");\n let cardtitle = $(\"<h5></h5>\").addClass(\"card-title\");\n cardtitle.text(\"id: \");\n let cardtext = $(\"<p></p>\").addClass(\"card-text\");\n cardtext.text(\"email: \");\n let span = $(\"<span></span>\");\n let button = $(\"<button></button>\").addClass(\"P btn btn-primary\");\n button.attr(\"data-toggle\", \"modal\");\n button.attr(\"data-target\", \"#myModal\");\n button.text(\"user profile\");\n\n cardtext.append(span);\n main.append(card);\n card.append(img);\n card.append(cardbody);\n cardbody.append(cardtitle);\n cardbody.append(cardtext);\n cardbody.append(button);\n $(\"#post\").append(main);\n }\n\n //! Show Post\n for (let i = 0; i < AllInfo.length; i++) {\n CreatePost();\n $(\".card-img-top\")[i].src = AllInfo[i].avatar;\n $(\".card-title\")[i].innerHTML += `<span>${AllInfo[i].id}</span>`;\n $(\".card-text span\")[i].innerHTML = AllInfo[i].email;\n }\n\n // ! show in modal\n $(\".P\").click(function () {\n $(\".create\").addClass(\"d-none\");\n let IdSeleced = +$(this).parent().children().find(\"span\").html();\n for (let info of AllInfo) {\n if (info.id === IdSeleced) {\n $(\".showId\").val(info.id);\n $(\".showF\").val(info.first_name);\n $(\".showL\").val(info.last_name);\n $(\".showE\").val(info.email);\n $(\".showP\").attr(\"src\", info.avatar);\n }\n }\n\n // ! change photo\n $(\"#myFile\").change(function (event) {\n $(\"#img\")\n .fadeIn(\"fast\")\n .attr(\"src\", URL.createObjectURL(event.target.files[0]));\n });\n\n\n // ! Update\n $(\".update\").click(function () {\n let filePath = $(\"#myFile\").val();\n let RealSrc = \"assets/\" + filePath.substr(12);\n\n for (let info of AllInfo) {\n for (const key in info) {\n if (info[key] === IdSeleced) {\n IdSeleced = undefined;\n let pos = AllInfo.indexOf(info);\n let firstSrc = AllInfo[pos].avatar;\n if (RealSrc === \"assets/\") {\n AllInfo[pos].avatar === firstSrc;\n console.log(AllInfo[pos].avatar);\n } else {\n AllInfo[pos].avatar = RealSrc;\n $(\"#myFile\").val(\"\");\n }\n AllInfo[pos].first_name = $(\".showF\").val();\n AllInfo[pos].last_name = $(\".showL\").val();\n AllInfo[pos].email = $(\".showE\").val();\n $(\".row1\").empty();\n CreateShow();\n pagination();\n }\n }\n }\n \n });\n \n });\n }", "async create(feed) {\n feed.options = {\n title: '遺言書',\n link: 'https://blog.himanoa.net/rss',\n description: '遺言を書きます'\n }\n\n const posts = (await axios.get(\n `${process.env.apiUrl}/entries?offset=0&limit=15`\n )).data.entries\n posts.forEach(post => {\n feed.addItem({\n title: post.title,\n id: post.id,\n link: `https://blog.himanoa.net/entries/${post.id}`,\n description: post.html,\n content: post.html\n })\n })\n\n feed.addContributor({\n name: 'himanoa',\n email: '[email protected]',\n link: 'https://blog.himanoa.net'\n })\n }", "function openSave () {\n $('#saveTemplate').modal('show');\n }", "function openSave () {\n $('#saveTemplate').modal('show');\n }", "function onCreateNewStaffClick() {\n $('#modal-register-staff').modal('show');\n }", "function openNewFeedProperties(elmLI) {\n\t\tNewFeedPropertiesView.i.open(elmLI, \"New Feed\", \"\").then((result) => {\n\t\t\tlet exDetails = {\n\t\t\t\tupdateTitle: result.updateTitle,\n\t\t\t\topenInFeedPreview: result.openInFeedPreview,\n\t\t\t\tignoreUpdates: result.ignoreUpdates,\n\t\t\t};\n\t\t\tcreateNewFeedExtended(result.elmLI, result.title, result.url, result.inFolder, exDetails);\n\t\t});\n\t}", "function openAddNewEntryUI() {\n var html = HtmlService.createTemplateFromFile('newEntry').evaluate()\n .setWidth(400)\n .setHeight(300);\n SpreadsheetApp.getUi()\n .showModalDialog(html, 'Add a new entry');\n}", "function showMyFeed() {\n if (!isLoggedIn()) return;\n\n //make sure we are on the messages page\n window.location = \"#page-messages-list\";\n\n fullFeedView = false;\n $('#btn-show-full-feed').removeClass('ui-btn-up-c');\n $('#btn-show-my-feed').addClass('ui-btn-up-c');\n\n if (userFeed) {\n userFeed.resetPaging();\n userFeed.fetch(function (err) {\n if (err) {\n alert('Could not get user feed. Please try again.');\n } else {\n drawMessages(userFeed);\n }\n });\n } else {\n //no feed obj yet, so make a new one\n var options = {\n type:'user/me/feed',\n qs:{\"ql\":\"order by created desc\"}\n };\n client.createCollection(options, function(err, response, collectionObj){\n if (err) {\n alert('Could not get user feed. Please try again.');\n } else {\n userFeed = collectionObj;\n drawMessages(userFeed);\n }\n });\n }\n }", "function openNewRankTaskModal() {\n newRankTaskModal.style.display = \"block\";\n }", "function showFullFeed() {\n if (!isLoggedIn()) return;\n\n //make sure we are on the messages page\n window.location = \"#page-messages-list\";\n\n fullFeedView = true;\n $('#btn-show-full-feed').addClass('ui-btn-up-c');\n $('#btn-show-my-feed').removeClass('ui-btn-up-c');\n\n\n if (fullActivityFeed) {\n fullActivityFeed.resetPaging();\n fullActivityFeed.fetch(function (err) {\n if (err) {\n alert('Could not get activity feed. Please try again.');\n } else {\n drawMessages(fullActivityFeed);\n }\n });\n } else {\n var options = {\n type:'activities',\n qs:{\"ql\":\"order by created desc\"}\n };\n //no feed obj yet, so make a new one\n client.createCollection(options, function(err, results, collectionObj){\n if (err) {\n alert('Could not get activity feed. Please try again.');\n } else {\n fullActivityFeed = collectionObj;\n drawMessages(fullActivityFeed);\n }\n });\n }\n }", "async function openEditAdd() {\n\n }", "function openFeedDialog(type) {\n $(\".url_parser\").show();\n $(\".format_selector\").hide();\n $(\".import_type\").text(type);\n $('input[name=feed_type]').val(type);\n\n if(type == 'xml') {\n $('.xml_advanced_settings').show();\n $( \".xml_advanced_settings a\" ).click(function() {\n $('.xml_advanced_settings_field').toggle();\n });\n }\n\n\n}", "function OpenNewHumanResourceModal() {\n NewHumanResourceAddEditShowHide(false);\n clearHumanResource();\n $('#newResourceModal').modal('show');\n}", "function openModal() {\n getRecipeDetails();\n handleShow();\n }", "function addNewFeed(response) {\n\n\t\t$.each(addToFeeds.split(\",\"),function() {\n\t\t\tvar el = $(\"a[data-id='\" + this + \"']\")[0].parentNode.cloneNode(true);\n\t\t\tvar hrf = $(el).find(\"a\")[0]; \n\t\t\t$(hrf.parenNode).removeClass(\"active\");\n\t\t\thrf.className = \"feed-link feed-\" + response.id;\n\t\t\thrf.setAttribute(\"data-url\", \"http://localhost:8080/infobar/feedoverview/outputfeeds/\" + response.id + \".html\");\n\t\t\thrf.setAttribute(\"data-id\", response.id);\n\t\t\thrf.setAttribute(\"data-name\", response.name);\n\t\t\thrf.setAttribute(\"data-count\", numberOfSaved);\n\t\t\t$(hrf).find(\".feed-name\").html(response.name);\n\t\t\t$(hrf).find(\".feed-data\").find(\"span\").html(numberOfSaved);\n\t\t\t$(\"a[data-id='\" + currentFeed + \"']\")[0].parentNode.parentNode.appendChild(el);\n\t\t\t$(\"#newFeedName\").html(response.name);\n\t\t\t$(\"#newFeedUrl\").val(response.url);\n\t\t\t$(\"#feed-form-container\").hide();\n\t\t\t$(\"#new-feed-data-container\").show();\n\t\t});\n\t}", "function _initAddToNewsfeed() {\n\n $addPostButton.click(function() {\n var button = $(this);\n var humanapiId = $(this).data('humanapi-id');\n var activity = _humanapiStorage[humanapiId];\n var data = {\n entityId: mov.service.member.getId(),\n entityType: 0,\n moveData: {\n moveTypeName: activity['type'],\n value: activity['duration'] / 60,\n useMinutes: true\n }\n };\n\n mov.helper.overlay.showGlobalLoading();\n\n mov.helper.api.post('newsfeed', JSON.stringify(data), {\n done: function(response) {\n button.text('Done!');\n }, fail: function(response) {\n //...\n }, always: function(response) {\n mov.helper.overlay.hideGlobalLoading();\n }\n });\n });\n }", "function popupEventDefiner() {\n\t// Show the modal\n\t$('#eventDefinerModal').modal('show')\n}", "function openModalApprovedPost(id) {\n\t// show modal\n\t$('#modal-approved-post').modal({\n\t\tshow : 'true'\n\t});\n\n\t$('#modal-approved-post .modal-body').append(\n\t\t\t\"<input name = \\\"postId\\\" id = \\\"postId\\\" type = \\\"text\\\" value = \"\n\t\t\t\t\t+ id + \" />\");\n\n\t$('#modal-approved-post #postId').hide();\n}", "function openNewRatingForm() {\n $('#newRatingModal').modal('show');\n}", "function openNewWishDialog() {\n console.log(\"New wish button clicked\")\n \n let modal = document.getElementById('new-wish-modal')\n modal.style.display = \"block\"\n}", "function openUploadModal() {\n var $postModal = $('#post-modal');\n $postModal.find('.post-form').data('action', '/post');\n $postModal.find('.modal-title').text('New Post');\n $postModal.find('.submit-btn').text('Submit');\n $postModal.find('.text').val('');\n $postModal.find('.tags').val('');\n $postModal.find('.file').val('');\n $postModal.find('.url').val('');\n $postModal.find('.preview').empty();\n\n openPostModal();\n }", "click(){\n createAddItemWindow();\n }", "function showModal(){\n\t\t$('.js_newPortal').on('click', function(){\n\t\t\t$('.modal.modal__addNewPortal').addClass('modalOpen');\n\t\t});\n\t}", "function postToFeed() {\n\n var obj = {\n method: 'feed',\n link: 'http://play.t5livegames.com',\n picture: 'http://content.t5livegames.com.s3.amazonaws.com/intro-crests.png',\n name: 'T5Live Games',\n caption: 'Predict What Happens Next!',\n description: 'I\\'m Playing Germany V Greece at T5Live Games - Join me!'\n };\n\n function callback(response) {\n document.getElementById('msg').innerHTML = \"Post ID: \" + response['post_id'];\n }\n\n FB.ui(obj, callback);\n}", "function showNewSocialStreams(e) {\n e.preventDefault();\n\n $('.socialStreamPanel').show();\n\n //Show the correct tab based on the which edit btn the user clicked\n var shownTabId = '#' + $(e.target).attr('id');\n \n $('#sideTabs').find('li a[href=\"'+shownTabId+'\"]').parent().removeClass('hide');\n $('#sideTabs').find('li a[href=\"'+shownTabId+'\"]').trigger('click');\n \n if($(window).width() > 1200)\n var newWidth = $('#createNew .rightSocialContent').width() + 'px';\n else\n var newWidth = $(window).width() / 3 + 'px';\n\n $('.socialStreamPanel').width(newWidth);\n }", "function CallCreate() {\n if (_contentBody != null && _contentBody != \"MasterBody\") { \n $(\"#\" + _contentBody).LoadView({ url: \"~/\" + _controller + \"Create?windowId=\" + _contentBody });\n }\n else {\n window.location.href = \"Create\";\n }\n }", "function get_form_new_poste(){\n\t$.get(\n base_url + 'index.php/adm/contacts_postes_load_form',\n {nohtml:'nohtml'},\n function(data){\n $(\"#modal-global-body\").html(data);\n } \n );\n $('#modal-global-label').html('<i class=\"fa fa-suitcase\"></i>&nbsp;&nbsp;Nouveau poste');\n $('#modal-global').modal('show');\n}", "function createTweet(){\n var modal = document.querySelector(\"#create-twit-modal\");\n var modalbackdrop = document.querySelector(\"#modal-backdrop\");\n //console.log(\"create twit element clicked\");\n modal.style.display = \"block\";\n modalbackdrop.style.display = \"block\";\n}", "function createNewTask() {\n\n\tvar parms = centerParms(600,450,1) + \",scrollable=yes,resizable=yes\";\n\n\tvar url = \"index.php?module=managetasks&hideHeader=1\";\n\tvar ref = window.open(url,\"_task\",parms);\n\tref.focus();\n\n}", "function modalCreate() {\n id = null\n // limpiamos el div q contiene la imagen\n $(\"#image\").empty();\n $(\"#imagen\").val('');\n document.getElementById('titulo').value = \"\"\n document.getElementById('categorias').value = \"\"\n document.getElementById('descripcion').value = \"\"\n document.getElementById('tags').value = \"\"\n document.getElementById('contenido').value = \"\"\n document.getElementById('fecha_publ').value = moment().format(\"YYYY-MM-DD\"),\n document.getElementById('fecha_fin').value = \"\"\n document.getElementById('imagen').value = \"\"\n document.getElementById('titleModal').innerText = 'Crear Post';\n document.getElementById('subtitle').innerText = ' En esta sección puedes crear nuevos Posts';\n $(\"#ModalCreateOrUpdate\").modal('show')\n}", "function showModal(url) {\n $(\"body\").prepend('<div id = \"invite-modal-wrapper\" class = \"border-box display-table\">'+\n\t '<div class = \"border-box display-table-cell full-width-height\">'+\n\t\t'<div id = \"invite-modal\" class = \"center\">'+\n\t\t 'Please invite your friends to use the application!<br/>'+\n\t\t '<input type = \"search\" results = \"5\" id = \"invite-search\">'+\n\t\t '<div id = \"invite-friends-section\">'+\n\t\t\t'<ul id = \"invite-friends-list\" class = \"list-style-none display-inline left\">'+\n\t\t\t'</ul>'+\n\t\t '</div>'+\n\t\t'</div>'+\n\t '</div>'+\n\t'</div>');\n\n $(\"#invite-modal\").append(\"<input type = 'button' class = 'custom-button clickable' id = 'invite-button' value = 'Invite!' />\");\n}", "presentUpdateFeedDialog( $e ) {\n // select the appropriate ION-ITEM, if an ID was passed to this function\n if (typeof($e) == 'string') {\n $e = $('.feed_item[data-id=\"' + $e + '\"]');\n }\n\n // show loader\n $doc.trigger('show-loading');\n\n // either pass data to the edit feed modal directly\n // or load list of languages first, if not loaded yet\n // and then open the dialog\n if (Object.keys(langs_cached).length) {\n presentEditFeedModal( $e, langs_cached );\n } else {\n feedit.callAPI(\n ajax_url_languages,\n null,\n function( response ) {\n if (typeof(response) == 'object') {\n langs_cached = response;\n presentEditFeedModal( $e, response );\n } else {\n feedit.defaultErrorNotification();\n }\n },\n null,\n function() {\n // hide loader\n $doc.trigger('hide-loading');\n }\n );\n }\n }", "function newEvent() {\n\tsetLocationInput();\n\t$('#addEventModal').modal('show');\n}", "async open_add_link_window(url) {\n const show_tags = await Preferences.get('show_tags')\n const bg_window = await browser.windows.getCurrent()\n const pin_window = await browser.windows.create({\n url: url,\n type: 'popup',\n width: 750,\n height: show_tags ? 550 : 350,\n incognito: bg_window.incognito\n })\n return pin_window\n }", "function agregarCrear(_url) {\n $('#modalBody').load(_url, () => {\n $('#myModal').modal({\n keyboard: false,\n backdrop: 'static'\n });\n });\n}", "function createNewDraft() {\n $('#existing-drafts').append(\"<div id='draft-\" + draftData.length + \"' class='draft'><input class='draft-title' id='draft-\" + draftData.length + \"-title' value='Untitled Draft'><div class='open-button action-button' onclick='openDraft(\" + draftData.length + \")'><span class='action-button-text'>Open</span></div><div class='delete-button action-button' onclick='deleteDraft(\" + draftData.length + \")'><span class='action-button-text'>Delete</span></div></div>\");\n\n prepareInputs();\n\n //Initialize the new draft with the latest data from the website\n $.get(websiteBaseUrl + 'data/front-data.json', (frontData) => {\n $.get(websiteBaseUrl + 'data/artist-data.json', (artistData) => {\n draftData[draftData.length] = {\n name: 'Untitled Draft',\n data: {\n frontData: frontData,\n artistData: artistData,\n },\n newImages: []\n };\n\n saveData();\n });\n });\n\n bottomAlert('Draft created.', '#26a69a', 3000);\n}", "function createModal() {\n RequestNewCardModal().then((json) => {\n const modal = document.querySelector('body').prepend(getChild(json));\n document.querySelector('.modal-container #close').addEventListener('click', closeModal);\n document.querySelector('.modal-container').addEventListener('click', closeModal);\n document.querySelector('.modal-container .button').addEventListener('click', requestNewCard);\n });\n}", "function showCreateMenuItemDialog()\n{\n\t$('#createMenuItemDialog').dialog('open');\n\t$(\"#createMenuItemDialog\").html('<div id=\"modalWindowLoader\"></div>');\n\t$(\"#createMenuItemDialog\").load('/admin/structure/add/' + selectedItemID, function()\n\t{\n\t\t$('#createMenuItemDialog input[name=folderId]').val(currentFolderID);\n\t});\n\treturn false;\n}", "function openModalCreateUser() {\n\t$('.modal-user-title').text(\"Thêm người dùng mới\");\n\t$('#modal-user').modal({\n\t\tshow : 'true'\n\t});\n}", "function openModalCreateUser() {\n\t$('.modal-user-title').text(\"Thêm người dùng mới\");\n\t$('#modal-user').modal({\n\t\tshow : 'true'\n\t});\n}", "navigateToPost() {\n this.$window.open(\n this.url + this.post.url,\n '_blank',\n 'location=yes,height=720,width=1280,scrollbars=yes,status=yes'\n );\n }", "function help_add() {\n\n $('#help_add').modal('show');\n}", "function OpenNewbussinesstripModal() {\n\n NewbussinesstripAddEditShowHide(false);\n clearNewbussinesstrip();\n $('#NewbussinesstripModal').modal('show');\n}", "function openAddUser() {\n $(\"#dialog-add-user\").dialog(\"open\");\n }", "function showItemAdditionScreen(){\n $('#itemAdditionScreen').modal('show');\n}", "function openModalMaaltijdfilterCreate() {\n\tsetModalMaaltijdfilterModus(true);\n\tclearModalMaaltijdfilterValue();\n\t$(\"#modal-maaltijdfilter\").modal('show');\t\n}", "function newPopup(options) {\n var html = [];\n html.push('<div class=\"modal hide fade\" tabindex=\"-1\"');\n html.push('role=\"dialog\" aria-hidden=\"true\">');\n html.push('<div class=\"modal-header\">');\n html.push('<button type=\"button\" class=\"close\" ');\n html.push('data-dismiss=\"modal\" aria-hidden=\"true\">×</button>');\n html.push('<h3 class=\"title\">Modal header</h3>');\n html.push('</div>');\n html.push('<div class=\"modal-body\">');\n html.push('<p>One fine body…</p>');\n html.push('</div>');\n html.push('</div>');\n var popup = $(html.join(\"\"));\n var title = options.title;\n var content = options.content;\n if (!title || \"\" == title) {\n title = $(content).find(\"h1\").remove();\n }\n if (options.noFade) {\n popup.removeClass(\"fade\");\n }\n popup.find(\".modal-body\").html(\"\").append(content);\n popup.find(\".title\").html(\"\").append(title);\n return popup.modal(options)\n }", "function modal(data) {\n // Set modal title\n $('.modal-title').html(data.title);\n // Clear buttons except Cancel\n $('.modal-footer button:not(\".btn-default\")').remove();\n // Set input values\n $('#title').val(data.event ? data.event.title : '');\n $('#description').val(data.event ? data.event.description : '');\n $('#color').val(data.event ? data.event.color : '#3a87ad');\n // Create Butttons\n $.each(data.buttons, function(index, button){\n $('.modal-footer').prepend('<button type=\"button\" id=\"' + button.id + '\" class=\"btn ' + button.css + '\">' + button.label + '</button>')\n })\n //Show Modal\n $('.modal').modal('show');\n }", "function addNewItem() { switchToView('edit-form'); }", "function modal(data) {\n // Set modal title\n $('.modal-title').html(data.title);\n // Clear buttons except Cancel\n $('.modal-footer button:not(\".btn-default\")').remove();\n // Set input values\n $('#title').val(data.event ? data.event.title : ''); \n $('#description').val(data.event ? data.event.description : '');\n $('#color').val(data.event ? data.event.color : '#3a87ad');\n // Create Butttons\n $.each(data.buttons, function(index, button){\n $('.modal-footer').prepend('<button type=\"button\" id=\"' + button.id + '\" class=\"btn ' + button.css + '\">' + button.label + '</button>')\n })\n //Show Modal\n $('.modal').modal('show');\n }", "function showCreationPopup(selected)\n {\n selected.addClass('selected');\n\n var date = new Date(date_arrival*1000);\n var arrival_date = date.format(date_format);\n\n $('.contract-datepicker-input[data-role=\"arrival\"]').val(arrival_date);\n\n var date = new Date(date_departure*1000);\n var departure_date = date.format(date_format);\n\n $('.contract-datepicker-input[data-role=\"departure\"]').val(departure_date);\n\n $('.contract-date-arrival-timestamp').val(date_arrival);\n $('.contract-date-departure-timestamp').val(date_departure);\n\n date_arrival_timestamp_global = date_arrival;\n date_departure_timestamp_global = date_departure;\n\n $('#blocking-create-modal').modal('show');\n }", "navigateAdd() {\n this.channel.trigger('show:form');\n }", "function showCreateNoteModal() {\n utils.clearPageNotification();\n\n // Creating the modal content elements\n var modalBody = $('<div >');\n var noteNameInput = $('<input type=\"text\" class=\"form-control form-control-lg\" />');\n var noteNameInputContainer = $('<div class=\"pull-left\"><div class=\"form-group col-sm-12\">');\n var modalFooter = $('<div class=\"pull-right\">');\n var createButton = $('<button type=\"button\" class=\"btn btn-primary\">Create</button>');\n\n // Appending to create the modal content structure\n noteNameInputContainer.append(noteNameInput);\n modalBody.append(noteNameInputContainer);\n modalFooter.append(createButton);\n\n var modal = utils.showModalPopup('Enter a name for your new note', modalBody, modalFooter);\n\n // Registering event listeners for the modal window\n createButton.click(function() {\n createNote(noteNameInput.val());\n modal.modal('hide');\n });\n }", "function AppointmentAlreadyCompelted(atitle, contenttoopen) {\n var kendoWindow = $(\"<div />\").kendoWindow({\n title: atitle,\n resizable: false,\n modal: true\n });\n\n kendoWindow.data(\"kendoWindow\")\n .content($(\"#\" + contenttoopen).html())\n .center().open();\n\n kendoWindow\n .find(\".delete-confirm,.delete-cancel\")\n .click(function () {\n kendoWindow.data(\"kendoWindow\").close();\n })\n .end();\n}", "function openDataResolutionIntroPopup() {\r\n\t$.post(app_path_webroot+\"DataQuality/data_resolution_intro_popup.php?pid=\"+pid, { }, function(data){\r\n\t\tvar json_data = jQuery.parseJSON(data);\r\n\t\tsimpleDialog(json_data.content,json_data.title,'drw_intro_popup',700);\r\n\t\tfitDialog($('#drw_intro_popup'));\r\n\t});\r\n}", "function getUserCreateForm(){\n showCreateDialog();\n}", "function showEventWindow() {\r\n\r\n\t// check input\r\n\t// $('#modal-body').html(getEventStatus('buildEvent'));\r\n\t// $('#showModal').modal();\r\n\t// TODO show window\r\n\talert('Diese Funktion steht in der Demo leider nicht zur Verfügung.');\r\n}", "function facebook_publish_feed_story(form_bundle_id, template_data) {\n // Load the feed form\n FB.ensureInit(function() {\n FB.Connect.showFeedDialog(form_bundle_id, template_data);\n //FB.Connect.showFeedDialog(form_bundle_id, template_data, null, null, FB.FeedStorySize.shortStory, FB.RequireConnect.promptConnect);\n });\n}", "function addButton(){\n \t\t$(window).load(function(){\n \t\t\tvar $href = $(\"#single-tweet-feed\").find(\".user a\").attr(\"href\");\n \t\t\t$('#single-tweet-feed ul').append('<a href=\"'+$href+'\" class=\"twitter-link button\">View more on twitter</a>');\n \t\t\t$('#single-tweet-feed').find(\"a\").attr(\"target\",\"_blank\");\n \t\t});\n \t}", "function show_addprogram() {\n $('#addprogram').modal('show')\n}", "function openFormCreate(elem)\n{\n\t//Clean form data\n\tdocument.getElementById('formEnreg').reset();\t\n\t//Cache table list film\n\trendreInvisible(elem);\n\t//Display form\n\t$(\"#divFormFilm\").show();\n}", "function showPopupFormular() {\r\n $(\"#\" + global.Element.PopupFormular).modal(\"show\");\r\n }", "function createActivity( name, url ) {\n var key = $('[bind=grid] > table > tbody > .selected').attr('id').replace(/.*_/g, '')\n var jQobj = $('div#properties-overlay > section[bind=activity][key=' + key + ']');\n if (jQobj.length > 0) {\n expanz.CreateActivity($('div#properties-overlay > div[bind=activity][key=' + key + ']'));\n openPropertiesBox();\n } else {\n $.get( url, function (html) {\n $('div#properties-overlay').append('<section bind=\"activity\" ' + 'name=\"' + name + '\" ' + 'key=\"' + key + '\" ' + 'class=\"properties-container\" >' + html + '</section>');\n\n expanz.CreateActivity($('div#properties-overlay > section[bind=activity][key=' + key + ']'), {success: openPropertiesBox});\n //openPropertiesBox();\n });\n }\n}", "function facyadd_pro(){\n $.fancybox.open({\n 'type' : 'inline'\n ,'src' : \"#modal_conceptos\"\n ,'modal': true\n });\n }", "newNews () {\n new comp.div({className: \"newsForum\"},\n new comp.div({id: \"alert\"}),\n new comp.input({name: \"articleName\", placeholder: \"Article Name\", id: \"articleName\" }),\n new comp.input({name: \"articleUrl\", placeholder: \"Article Link\", id: \"articleLink\"}),\n new comp.input({name: \"articleImageUrl\", placeholder: \"Article Image Link\", id: \"articleImage\"}),\n new comp.input({name: \"articleDescription\", placeholder: \"Article Description\", id: \"articleDescription\"}),\n new comp.btn(\"Save New Article\")).render(\".new--news\")\n this.eventListener()\n }", "function showBlogList() {\r\n window.open('./html/postslist.html',\"_self\");\r\n }", "function showCreatePostModal() {\r\n\r\n\tvar modalBackdrop = document.getElementById('modal-backdrop');\r\n\tvar createPostModal = document.getElementById('create-post-modal');\r\n\r\n\tmodalBackdrop.classList.remove('hidden');\r\n\tcreatePostModal.classList.remove('hidden');\r\n}", "function thememascot_jflickrfeed() {\n $(\".flickr-widget .flickr-feed\").jflickrfeed({\n limit: 9,\n qstrings: {\n id: \"64742456@N00\"\n },\n itemTemplate: '<a href=\"{{link}}\" title=\"{{title}}\" target=\"_blank\"><img src=\"{{image_m}}\" alt=\"{{title}}\"> </a>'\n });\n }", "function showPopupElementFormular() {\r\n $(\"#\" + global.Element.PopupElementFormular).modal(\"show\");\r\n }", "function uiAddPost () {\r\n const postTitle = prompt('What is the post title ?');\r\n const postText = prompt('What is the post text ?');\r\n\r\n // TODO:\r\n newPost(postTitle, postText).then((data)=> {\r\n console.log(data)\r\n const display = document.querySelector('div.response')\r\n display.innerHTML = JSON.stringify(data, null, 2)\r\n })\r\n}", "function openAccountEntityAdd() {\n\n\t\t\tif ($('#cancelEntityButton').length == 0) {\n\t\t\t\tvar cancelEntityButton = $(\"<input/>\", {\n\t\t\t\t\t\"class\" : \"cancel btn btn-default\",\n\t\t\t\t\t\"type\" : \"button\",\n\t\t\t\t\t\"id\" : \"cancelEntityButton\",\n\t\t\t\t\t\"click\" : me.rosterCancelAction,\n\t\t\t\t\t\"value\" : ap.core_prompts[\"action.Cancel\"]\n\t\t\t\t});\n\n\t\t\t\tvar accountEntitiesContainer = $('#accountEntitiesContainer');\n\t\t\t\taccountEntitiesContainer.find('.btn-group').append(\n\t\t\t\t\t\tcancelEntityButton);\n\n\t\t\t\t$('#accountEntitiesContainer').css(\"display\", 'block');\n\t\t\t\tme.$mainButtonContainer.css(\"display\", 'none');\n\n\t\t\t\t$('#rosterDownFillEntitiesBtn').remove();\n\t\t\t\t$('#rosterAddNewBtn').remove();\n\t\t\t\tme.focusOnFirstField(true);\n\t\t\t\tpage.manageTabIndex();\n\n\t\t\t\tforceIEtoRepaintFooter();\n\t\t\t}\n\t\t\t;\n\n\t\t}", "function createVideoFeedButton() {\n // Send video to everyone\n $('#start-video-feed').on('click', function() {\n // Vendor specific madness\n navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia;\n window.URL = window.URL || window.webkitURL || window.mozURL || window.msURL;\n navigator.getUserMedia({\n video: true,\n audio: true\n }, function(stream) {\n $('#start-video-feed').hide();\n $('#stop-video-feed').show()\n .on('click',function(){\n $('#start-video-feed').show();\n $('#stop-video-feed').hide();\n stream.stop();\n eachActiveConnection(function(c,$c){\n if(c.label==='videoFeed'){\n c.send(\"close\");\n }\n });\n \n });\n\n eachActiveConnection(function(c, $c) {\n if (c.label === 'videoFeed') {\n var call = peer.call(c.peer, stream);\n openStreams.push(c.peer);\n }\n })\n }, function(err) {\n console.log('videoFeed: '+err)\n });\n })\n }", "_openReservationPopup() {\n let popup = new Popup(this._state.reservation.popup.settings.el, this._state.reservation.productID);\n popup.init();\n }", "function popupShareCalendars() {\n\t$(\"#sharePopup\").show();\n}", "function newStory(){\n\n var $formNewStory = $(\"#newStoryForm\"),\n inputTitle = $formNewStory.find( 'input[id=\"inputTitle\"]' ).val(),\n inputAuthor = $formNewStory.find( 'input[id=\"inputAuthor\"]' ).val(),\n inputDescription = $formNewStory.find( 'textarea[id=\"inputDescription\"]' ).val(),\n inputLayoutStyle = $formNewStory.find( 'select[id=\"inputLayoutStyle\"]' ).val(),\n inputLayoutSize = $formNewStory.find( 'select[id=\"inputLayoutSize\"]' ).val(),\n action = \"newStory\",\n url = \"controller.php\";\n\n //Send the data using post\n var posting = $.post( url, { \n action: action, \n inputTitle: inputTitle,\n inputAuthor: inputAuthor,\n inputDescription: inputDescription,\n inputLayoutStyle: inputLayoutStyle,\n inputLayoutSize: inputLayoutSize\n } );\n\n //Put the results in a div\n posting.done(function(data) {\n $(\"#mainStoryContent\").empty().append(data);\n configureColumns();\n });\n $('#newStoryModal').modal('hide');\n \n}", "function createPopUp() {\n\n}", "_onClick() {\n let commitID = this.model.get('id');\n\n if (commitID.length > 7) {\n commitID = commitID.slice(0, 7);\n }\n\n const dialogView = new RB.DialogView({\n title: gettext('Create Review Request?'),\n body: this._dialogBodyTemplate({\n prefixText: gettext('You are creating a new review request from the following published commit:'),\n commitID: commitID,\n summary: this.model.get('summary'),\n suffixText: gettext('Are you sure you want to continue?'),\n }),\n buttons: [\n {\n id: 'cancel',\n label: gettext('Cancel'),\n },\n {\n id: 'create',\n label: gettext('Create Review Request'),\n primary: true,\n onClick: this._createReviewRequest.bind(this),\n }\n ]\n });\n\n dialogView.show();\n }", "function showCreateDialog() {\n\t$(\"#createWorkspaceDialog\").dialog({\n\t\tmodal : true,\n\t\tdraggable : false,\n\t\tbuttons : {\n\t\t\tCancel : function () {\n\t\t\t\t$(this).dialog(\"close\");\n\t\t\t},\n\t\t\t\"Create\" : function () {\n\t\t\t\tif($('form').parsley().isValid())\n\t\t\t\t{\n\t\t\t\t\tcreateNewWorkspace($('#wsNameInput').val());\n\t\t\t\t\t$(this).dialog(\"close\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n}", "function openNewFunctionScreen() {\n $state.go('app.project.create-function');\n }", "async create(feed) {\n await Promise.resolve(\n createRSSFeed(\n feed,\n APP_URL + '/' + FEED_FILE_NAME,\n AUTHOR,\n AUTHOR_EMAIL,\n APP_URL,\n APP_URL,\n APP_NAME,\n pkg.description,\n APP_URL + APP_COVER_IMG,\n APP_NAME\n )\n )\n }", "function doopenchannel() {\n ModalService.showModal({\n templateUrl: \"modals/openchannel.html\",\n controller: \"OpenChannelController\",\n }).then(function(modal) {\n modal.element.modal();\n $scope.$emit(\"child:showalert\",\n \"To open a new channel, enter or scan the remote node id and amount to fund.\");\n modal.close.then(function(result) {\n });\n });\n }", "openAddModal(){\n document.getElementById(\"add_modal\").style.display = \"block\";\n }", "function openNewModal(items){\n var count = 0;\n for(var obj of items){\n var tag = obj.type || \"div\";\n var classes = \"\";for(var c of obj.classes){classes+=c+\" \"};\n var inner = obj.content || \"\";\n var html = \"<\"+tag+\" class='\"+classes+\"'\";\n if(tag == 'textarea')\n html+=\"placeholder='\"+inner+\"'></\"+tag+\">\";\n else if(tag != \"input\")\n html+=\">\"+inner+\"</\"+tag+\">\";\n else\n html+=\"placeholder='\"+inner+\"'>\";\n $(\"#mmc-wrapper\").append(html);\n count++;\n }\n if(count > 4){\n $('#main-modal-content').css({'margin': '2% auto'});\n }\n else\n $('#main-modal-content').css({'margin': '15% auto'});\n $('#main-modal').fadeIn(500);\n}", "async function newPost() {\n let newPost = formatResults(await submitPost())[0];\n id(\"home\").prepend(generateCard(newPost));\n setTimeout(showHomeView, DELAY);\n }", "function EnviarAviso(){\n\t$(\"#dialogEnviarAviso\").dialog(\"open\");\n}", "function newItem(){\n sendRequest(\n 'usergroups',\n {\n 'action': 'getNewItemForm',\n \"id_menucategory\": $('#kategoria').val()\n }, function(data){\n $('#listcontent').css('display','none');\n $('#editorholder').html(data);\n });\n}", "showCreateForm(data) {\n this.clearNewOrgan(data);\n this.changeFormMode(this.FORM_MODES.CREATE);\n }" ]
[ "0.6724323", "0.66195625", "0.65281814", "0.64307797", "0.6426467", "0.63692313", "0.6278521", "0.6218954", "0.6203398", "0.6180852", "0.61529016", "0.6109897", "0.61042184", "0.60975003", "0.6051817", "0.6046268", "0.6046268", "0.6036808", "0.6020912", "0.60057884", "0.5990532", "0.5987543", "0.5937982", "0.5903343", "0.58898056", "0.58316815", "0.58054984", "0.579793", "0.5777565", "0.57545406", "0.5739783", "0.57347775", "0.57327515", "0.57237923", "0.57179946", "0.5711726", "0.5706619", "0.56908864", "0.5688212", "0.5682945", "0.56722695", "0.56703514", "0.56582654", "0.56525666", "0.56501955", "0.564628", "0.5645513", "0.564551", "0.563081", "0.562956", "0.5626591", "0.56261075", "0.56261075", "0.5620444", "0.56189823", "0.5616958", "0.5614735", "0.5609842", "0.5604979", "0.5603809", "0.559996", "0.5597846", "0.5595976", "0.5591382", "0.5588848", "0.5562549", "0.5556569", "0.55532515", "0.5546588", "0.55426455", "0.5529787", "0.5522893", "0.5518692", "0.55099905", "0.55063117", "0.550529", "0.5501567", "0.55000836", "0.54977167", "0.5494412", "0.5485908", "0.54809546", "0.5480757", "0.5479293", "0.5471533", "0.5466951", "0.54606783", "0.54603815", "0.5456835", "0.5455379", "0.5454097", "0.545325", "0.545309", "0.54521793", "0.5451974", "0.54515195", "0.54498124", "0.54470956", "0.54467654", "0.5444305" ]
0.630624
6
close create feed modal
function closeModal() { document.getElementById("backdrop").style.display = "none"; document.getElementById("createFeedModal").style.display = "none"; document.getElementById("createFeedModal").classList.remove("show"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function closeCreatePostModal() {\r\n\t\r\n\tvar modalBackdrop = document.getElementById('modal-backdrop');\r\n\tvar createPostModal = document.getElementById('create-post-modal');\r\n\r\n\tmodalBackdrop.classList.add('hidden');\r\n\tcreatePostModal.classList.add('hidden');\r\n\r\n\t// This function is defined below\r\n\tclearPostInputValues();\r\n}", "function closePostClick() {\n var modalPost = document.getElementById(\"modal-post\");\n modalPost.style.display = \"none\";\n}", "function closeCreatePollModal() {\n \n var backdropElem = document.getElementById('modal-backdrop');\n var createPollElem = document.getElementById('create-poll-modal');\n\n // Hide the modal and its backdrop.\n backdropElem.classList.add('hidden');\n createPollElem.classList.add('hidden');\n \n //clearInputValues();\n}", "function close() {\n $mdDialog.hide();\n }", "function hideCreatePostModal(){\r\n var modal = document.getElementById(\"create-post-modal\");\r\n modal.style.display = \"none\";\r\n }", "close() {\n this._showPopup = false;\n }", "function onCancelButtonClick() {\n modal.close();\n }", "function onCancelButtonClick() {\n modal.close();\n }", "function closeDialog() {\n\t\t\tdocument.getElementById(\"newBookmarkConfirmation\").open = false;\n\t\t}", "function close() {\n $modalInstance.dismiss();\n }", "close() {\n this.reset();\n this.$store.commit(HIDE_CREATE_FOLDER_MODAL);\n }", "closeModal() {\n this.close();\n }", "function closeDialog () {\n controls.validator.resetValidationErrors();\n table.clearHighlight();\n popup.hide();\n window.scrollTo(permissionManager.bookmark.scrollX, permissionManager.bookmark.scrollY);\n }", "function closeDialog () {\n controls.validator.resetValidationErrors();\n table.clearHighlight();\n popup.hide();\n window.scrollTo(permissionManager.bookmark.scrollX, permissionManager.bookmark.scrollY);\n }", "close() {\n this.closeButton.on('click', null);\n this.modal(false);\n this.window.remove();\n }", "function hideCreatePostModal() {\n var modal = document.getElementById(\"create-post-modal\");\n modal.style.display = \"none\";\n}", "function closePopup() {\n $modalInstance.dismiss();\n }", "@action closeDeletingCategoryDialog() {\n this.isDeletingCategory = false;\n this.deletingCategoryData = {\n name: '',\n id: null,\n };\n }", "function closeDialog() {\n $mdDialog.hide();\n }", "onBtnNew(){\n this._doOpenModalPost();\n }", "function pay_more_close() {\n $(\".pay-more-popup-close\").click(function() {\n $(\".dialog_box\").empty();\n });\n }", "function close_dialog() {\n\tif (win) {\n\t\twin.close();\n\t\tif (feed_summary.selected_users_in_list == null || feed_summary.selected_users_in_list.length == 0 ) {\n\t\t\t//users_selection.use_all_users\n\t\t\tif ( last_selected_user_filter==\"all\" ) {\n\t\t\t\t\t//alert(\"have to selecte teh all\");\n\t\t\t\t\tusers_selection.use_all_users();\n\t\t\t\t\tswap_users($('show_users_all'));\r\n\t\t\t}\n\t\t\tif ( last_selected_user_filter==\"network\" ) {\n\t\t\t\t\t//alert(\"have to selecte teh all\");\n\t\t\t\t\tusers_selection.use_my_network_users();\n\t\t\t\t\tswap_users($('show_users_network'));\n\t\t\t}\n\n\t\t\t\r\n\t\t}\n\t\t//let'see what in the box\n\t\t\r\n\t}\r\n}", "function closeDialog() {\n jQuery('#oexchange-dialog').hide();\n jQuery('#oexchange-remember-dialog').hide();\n refreshShareLinks();\n }", "function openDelete(){\n $('#modalWindow').css('display', 'block');\n $('#confirmDelete').css('display', 'block');\n var domElement = $(this).parent().parent();\n var id = $(domElement).attr(\"id\");\n $('#aceptDelete').click(function(){\n remove(id);\n closeModal();\n });\n }", "function win_close() {\n if (jQuery(\"#SocialToolbarActiveWindow\").length > 0) { \n jQuery(\"#SocialToolbarActiveWindow\").fadeOut(function(){\n jQuery('#SocialToolbarActiveWindow').remove();\n closeShare();\n });\n \n }\n }", "function closeCreateIssueForm(elt) {\n $j(elt).closest('.code-issue-create-form').remove();\n return false;\n}", "function closeModelDialog() {\n document.getElementById('myModal').style.display = \"none\";\n document.getElementById(\"detailContent\").innerHTML = \"\";\n}", "function openModal() {\n document.getElementById(\"backdrop\").style.display = \"block\";\n document.getElementById(\"createFeedModal\").style.display = \"block\";\n document.getElementById(\"createFeedModal\").classList.add(\"show\");\n}", "function closeMe() {\n\t\t $('#' + settings.id).modal('hide');\n\t\t if (settings.isSubModal)\n\t\t $('body').addClass('modal-open');\n\t\t }", "close() {\n this.$store.commit(HIDE_SHARE_MODAL);\n this.$store.commit(LOAD_FULL_CONTENTS_SUCCESS, null);\n }", "function modelClose() {\n $( \".btn-close\" ).click(function() {\n $('#disclaimerModal').hide();\n $('body').removeClass('modal-open');\n });\n}", "function closeDialog() {\n $.fancybox.close();\n }", "function close_modals(){\n\t\t$('.close').on('click', function(){\n\t\t\t$('.popup_msg').hide();\n\t\t});\n\t}", "function closeModalDialog () {\n mainView.send('close-modal-dialog');\n}", "_closeAddNewItem() {\n // Update current Order:\n this.order = this.orderService.getCurrentOrder();\n this.$scope.newItemModal.hide();\n this.item = this.defaultItem;\n }", "function closeModal(){\n document.getElementById(\"edit-cat-modal\").style.display=\"none\";\n}", "function onCloseBtnClick() {\n ui.toggleClosePopup();\n }", "closemodal() {\n this.modalCtr.dismiss(this.items);\n }", "close() {\n\t\tthis.model.save({ content: this.input.val() });\n\t\tthis.$el.removeClass('editing');\n\t}", "function closeModal(){\r\n $('.close').click(function(){\r\n $('.item-details1, .item-details2, .item-details3').empty();\r\n $('.dark-background').fadeOut();\r\n })\r\n }", "presentRemoveFeedDialog( $e ) {\n // select the appropriate ION-ITEM, if an ID was passed to this function\n if (typeof($e) == 'string') {\n $e = $('.feed_item[data-id=\"' + $e + '\"]');\n }\n\n var alert = document.createElement('ion-alert');\n //alert.cssClass = 'my-custom-class';\n alert.header = window.lang.remove_feed;\n alert.message = window.lang.remove_feed_question + ' <strong>' + $e.find('ion-label h3 span').text() + ' (' + $e.data('url') + ')</strong>?';\n alert.buttons = [\n {\n text: window.lang.cancel,\n role: 'cancel',\n cssClass: 'secondary',\n /*handler: (blah) => {\n console.log('Confirm Cancel: blah');\n }*/\n }, {\n text: window.lang.confirm,\n handler: () => {\n // something is already happening with that feed, bail out\n if (!$e.find('ion-spinner').hasClass('ion-hide')) {\n return;\n }\n\n // show spinner next to the item\n $e.find('ion-spinner').removeClass('ion-hide');\n\n // make the API call to remove this feed\n feedit.callAPI(\n ajax_url_feed_remove,\n {\n 'id' : $e.data('id'),\n },\n function( response ) {\n if (response == '') {\n // animate item removal\n setTimeout(function () {\n $e.css({\n 'transition': '0.35s ease-out',\n 'transform': 'translate3d(' + ($e.width() + 10) + 'px, 0, 0)'\n });\n\n setTimeout(function () {\n // make the previous/next item active\n if ($e.hasClass('active')) {\n var $replacement_active_item = $e.prev('.feed_item');\n\n // try next item if previous was not found\n if (!$replacement_active_item.length) {\n $replacement_active_item = $e.next('.feed_item');\n }\n\n // no more items, click on all feeds\n if (!$replacement_active_item.length) {\n $replacement_active_item = $('.all_feeds_item');\n\n // hide labels management item if we have no feeds\n $('.labels_management').addClass('ion-hide');\n }\n\n ignore_next_feed_item_click = true;\n $replacement_active_item.click();\n } else {\n // refresh content if the active feed is Bookmarks or Everything\n if (feedit.getActiveFeedId() == 'bookmarks' || feedit.getActiveFeedId() == 'all') {\n $doc.trigger('refresh-content');\n }\n }\n\n feedit.presentToast({'txt': window.lang.feed_removed, 'short': true});\n\n // request update of left menu badges, as number of bookmarks could have changed\n $doc.trigger('refresh-link-counts', [{\n 'what': 'all'\n }]);\n\n $e.remove();\n }, 340);\n }, 1000);\n } else {\n feedit.defaultErrorNotification();\n }\n },\n null,\n function() {\n // hide the spinner\n $e.find('ion-spinner').addClass('ion-hide');\n },\n );\n }\n }\n ];\n\n document.body.appendChild(alert);\n alert.present();\n }", "function createpost(){\n modal1.style.display='none';\n modal2.style.display='none';\n}", "function clickclose(){\n modal.style.display=\"none\";\n}", "closeAddWindow(){\n $(\"#addwind\").removeClass(\"d-block\").addClass(\"d-none\");\n }", "function closeSave() {\n const title = document.querySelector('#title-input').value;\n const body = document.querySelector('#input-textarea').value;\n if(title) {\n fetch('/documents/' + document_id, {\n method: 'PUT',\n body: JSON.stringify({\n title: title,\n body: body\n })\n });\n }\n else {\n fetch('/documents/' + document_id, {\n method: 'PUT',\n body: JSON.stringify({\n body: body\n })\n });\n }\n if(title != \"\") {\n document.querySelector('#doc-title').innerHTML = title;\n }\n document.querySelector('#overlay').style.display = 'none';\n document.querySelector('#save-popup').style.display = 'none';\n}", "function closeDeleteRolePopup() {\n\t$('#multipleDeleteModalWindow, .window').hide(0);\n\t$('#singleDeleteModalWindow, .window').hide(0);\n\t$('#conflictModalwindow, .window').hide(0);\n\t$(\"#mainContent\").load(contextRoot+'/templates/roleListView.html');\n}", "function showCreatePostModal() {\r\n\r\n\tvar modalBackdrop = document.getElementById('modal-backdrop');\r\n\tvar createPostModal = document.getElementById('create-post-modal');\r\n\r\n\tmodalBackdrop.classList.remove('hidden');\r\n\tcreatePostModal.classList.remove('hidden');\r\n}", "close() {\n\n // Pop the activity from the stack\n utils.popStackActivity();\n\n // Hide the screen\n this._screen.scrollTop(0).hide();\n\n // Hide the content behind the placeholders\n $(\"#page--info .ph-hidden-content\").hide();\n\n // Stop the placeholders animation\n this._placeholders.removeClass(\"ph-animate\").show();\n\n // Hide the delete button\n $(\"#info-delete\").hide();\n\n // Hide the info button\n $(\"#info-edit\").hide();\n\n // Show all the fields\n $(\".info-block\").show();\n\n // Delete the content of each of the fields\n $(\"#info-createdAt .info-content\").html(\"\");\n $(\"#info-updatedAt .info-content\").html(\"\");\n $(\"#info-coordinates .info-content\").html(\"\");\n $(\"#info-coordinatesAccuracy .info-content\").html(\"\");\n $(\"#info-altitude .info-content\").html(\"\");\n $(\"#info-altitudeAccuracy .info-content\").html(\"\");\n $(\"#info-type .info-content\").html(\"\");\n $(\"#info-materialType .info-content\").html(\"\");\n $(\"#info-hillPosition .info-content\").html(\"\");\n $(\"#info-water .info-content\").html(\"\");\n $(\"#info-vegetation .info-content\").html(\"\");\n $(\"#info-mitigation .info-content\").html(\"\");\n $(\"#info-mitigationsList .info-content\").html(\"\");\n $(\"#info-monitoring .info-content\").html(\"\");\n $(\"#info-monitoringList .info-content\").html(\"\");\n $(\"#info-damages .info-content\").html(\"\");\n $(\"#info-damagesList .info-content\").html(\"\");\n $(\"#info-notes .info-content\").html(\"\");\n\n // Show the image placeholder\n $(\"#info-photo-preview\").attr(\"src\", \"img/no-img-placeholder-200.png\");\n\n }", "closeModal() {\n this.closeModal();\n }", "function DonefbgnPopUp(){\r\n\t\t$(\"#popUpFBGN\").html(\"<h2>Info</h2><p style='color:blue; text-align: center;'><b>FBGN games added!</b></p>\"\r\n\t\t+'<a href=\"#add-new\" data-rel=\"back\" class=\"ui-btn ui-btn-right ui-btn-inline ui-icon-delete ui-btn-icon-notext ui-btn-a\"></a>').popup(\"open\"); \r\n\t\tsetTimeout(function(){ $(\"#popUpFBGN\").popup(\"close\"); }, 5000);\r\n\t}", "handleModalClose() {}", "function AppointmentAlreadyCompelted(atitle, contenttoopen) {\n var kendoWindow = $(\"<div />\").kendoWindow({\n title: atitle,\n resizable: false,\n modal: true\n });\n\n kendoWindow.data(\"kendoWindow\")\n .content($(\"#\" + contenttoopen).html())\n .center().open();\n\n kendoWindow\n .find(\".delete-confirm,.delete-cancel\")\n .click(function () {\n kendoWindow.data(\"kendoWindow\").close();\n })\n .end();\n}", "function createCloseBtn(e) {\n\n //Get projectID so close button references ID in query string upon refresh \n var urlString = window.location.search\n var uid = urlString.slice(1, urlString.length).split('&')[1].split('=')[1]\n var projectId = window.location.search.slice(1, urlString.length).split('&')[0].split('=')[1]\n\n if(!projectId) {\n console.log(\"ProjectID not set for task popup close button\")\n } else {\n var loc = \"/kanban.html?id=\" + projectId + \"&uid=\" + uid\n //console.log(\"Link: \" + loc)\n }\n\n var close = document.createElement(\"input\");\n\n close.setAttribute(\"type\", \"button\");\n close.setAttribute(\"id\", \"closeBtn\");\n close.setAttribute(\"value\", \"x\");\n close.setAttribute(\"onClick\", \"window.location.href=\" + \"'\" + loc + \"'\");\n\n return close;\n}", "closeCleanup() {\n this.hide();\n this.addPopUpListener();\n }", "function closeContentEditor(){\n $.PercBlockUI();\n cancelCallback(assetid);\n dialog.remove();\n $.unblockUI();\n $.PercDirtyController.setDirty(false);\n }", "function cancel(event) {\n let dialog = document.getElementById(\"dialog\");\n document.getElementById(\"title\").value = \"\";\n document.getElementById(\"post\").value = \"\";\n document.getElementById(\"submit-btn\").innerHTML = \"Submit\";\n dialog.open = false;\n console.log(\"cancel\");\n}", "function closefeesModal2() {\n document.getElementById('fees-pop-screen').style.display='none';\n}", "function closeModal() {\n\t//reset all the input text\n\tdocument.getElementById(\"post-text-input\").value = \"\";\n\tdocument.getElementById(\"post-photo-input\").value = \"\";\n\tdocument.getElementById(\"post-price-input\").value = \"\";\n\tdocument.getElementById(\"post-city-input\").value = \"\";\n\tdocument.getElementById(\"post-condition-new\").checked = true;\n\t//add div to hidden\n\tdocument.getElementById(\"sell-something-modal\").classList.add('hidden');\n\tdocument.getElementById(\"modal-backdrop\").classList.add('hidden');\n}", "function modalClose() {\t\t\n\t\tif($('mb_Title')) $('mb_Title').remove();\n\t\tif($('mb_Error')) $('mb_Error').remove();\n\t\tif($('mb_header')) $('mb_header').removeClass('yt-Panel-Primary');\n\n\t\t$('mb_center').style.display = 'none';\n\t\t\n\t\t$('mb_contents').getChildren()[0].remove();\n\t\t$('mb_overlay').setStyle('opacity',0);\n\t\t$('mb_frame').setStyle('opacity',0);\n\t\twindow.location.reload(true); \n}", "'click .close' (event) {\n console.log(\"MODAL CLOSED VIA X\");\n modal.hide();\n }", "function closeCreateAccount() {\n\t$('.popUpCreateAccountContent').find('input:text').val('');\n\t$('.popUpCreateAccountContent').find('input:password').val('');\n\t$('.asidePopupErrorMessageCommon').html('');\n\t$('#createAccModal, .window').hide(0);\n}", "function removepopup(id) {\n $('.biderror .mes').html(\"<div class='pop_content'>Do you want to remove this job?<div class='model_ok_cancel'><a class='okbtn' id=\" + id + \" onClick='remove_post(\" + id + \")' href='javascript:void(0);' data-dismiss='modal'>Yes</a><a class='cnclbtn' href='javascript:void(0);' data-dismiss='modal'>No</a></div></div>\");\n $('#bidmodal').modal('show');\n }", "@action closeEditingCategoryDialog() {\n this.isEditingCategory = false;\n this.editingCategoryData = {\n name: '',\n id: null,\n parentId: null,\n };\n }", "function onClose() {\n\t\t\t$mdDialog.hide()\n\t\t}", "function sale_listing(id){\n $('#'+id).dialog({\n title: \"Sale Listing\",\n modal: true,\n width: 600,\n height: 400,\n buttons: {\n \"Cancel\": function() {\n \n $(this).dialog(\"close\");\n \n }\n }\n });\n }", "function closeModal()\r\n {\r\n windows.close($('#modalContainer .window').attr('id'));\r\n }", "function closePreviewPopup() {\n /* hide popup, by adding hide class */\n removeClass(\"preview-popup\", \"show-preview-popup\");\n\n /* show button, by removing the hide class */\n removeClass(\"preview-button\",\"preview-button-expand\");\n removeClass(\"preview-button-icon\", \"hide-me\");\n\n}", "function modalEnd() {\n\tconst href = \"#modal-end\";\n\twindow.open(href, \"_self\");\n}", "function createTweet(){\n var modal = document.querySelector(\"#create-twit-modal\");\n var modalbackdrop = document.querySelector(\"#modal-backdrop\");\n //console.log(\"create twit element clicked\");\n modal.style.display = \"block\";\n modalbackdrop.style.display = \"block\";\n}", "function close_comments() {\n\t$(\"#save-comment-btn\").show();\n\t$(\"#cancel-comment-btn\").hide();\n\t$(\"#save-comment-btn\").hide();\n\t$(\"#comment-div\").hide();\n\t$(\".checkbox-div\").show();\n\t$(\"#submit-rating-btn\").show();\n\t$(\"#comment-btn\").show();\n\ttoggleCategory();\n}", "async function presentAddFeedModal( langs_data ) {\n lang_manually_selected = false;\n\n // create the modal with the `modal-page` component\n $doc.trigger('open-modal', [\n await modalController.create({\n component: 'modal-add-feed',\n componentProps: {\n 'langs' : langs_data\n },\n }),\n function() {\n setTimeout(function() {\n $('#feed_url')[0].setFocus();\n }, 500);\n }\n ]);\n }", "async function presentEditFeedModal( $item, langs_data ) {\n // create the modal with the `modal-page` component\n $doc.trigger('open-modal', [\n await modalController.create({\n component: 'modal-update-feed',\n componentProps: {\n 'langs' : langs_data,\n 'lang' : $item.data('lang'),\n 'id' : $item.data('id'),\n 'url' : $item.data('url'),\n 'title' : $item.find('ion-label h3 span').text(),\n 'allow_duplicates' : $item.data('allow-duplicates'),\n },\n }),\n function() {\n setTimeout(function() {\n $('#feed_title')[0].setFocus();\n }, 500);\n }\n ]);\n }", "function ouvrir() {\n creationModal();\n }", "'click .close-holder'() {\n $('.modal-backdrop').fadeOut(100);\n delete Session.keys['clickedTask'];\n }", "close() {\n if (this._windowRef != null) {\n this._renderer.removeAttribute(this._elementRef.nativeElement, 'aria-describedby');\n this._popupService.close();\n this._windowRef = null;\n this.hidden.emit();\n this._changeDetector.markForCheck();\n }\n }", "function closeDltEmpModal() {\n document.getElementById('dlt-pop-screen').style.display = \"none\";\n}", "function closeSetupClickHandler() {\n closePopup();\n }", "function close() {\n $uibModalInstance.dismiss('exit');\n }", "function close() {\n $uibModalInstance.dismiss('exit');\n }", "function close() {\n $uibModalInstance.dismiss('exit');\n }", "function CloseModul() {\n document.getElementById(\"modal_del_user\").style.display = \"none\";\n window.location=window.location;\n}", "function handleClose() {\n setOpenModalId(0);\n }", "function closeEditModal() {\n editTodoModal.style.display = \"none\";\n console.log(\"fired\");\n }", "function closeAddPhotoModal() {\n\n var backdropElem = document.getElementById('modal-backdrop');\n var addPhotoModalElem = document.getElementById('create-item-modal');\n\n // Hide the modal and its backdrop.\n backdropElem.classList.add('hidden');\n addPhotoModalElem.classList.add('hidden');\n\n clearPhotoInputValues();\n\n}", "function fhArrival_close() {\n\t\n\tif (fhArrival_data.currentMode == \"EDIT\") {\n\t\tif (!confirm(\"Sei sicuro di uscire senza salvare?\")) {\n\t\t\treturn false;\n\t\t}\n\t} \n\t\n\twindow.location = 'index.php?controller=arrival';\n\t\t\n}", "close() {\n if (this._windowRef) {\n this._renderer.removeAttribute(this._elementRef.nativeElement, 'aria-describedby');\n this._popupService.close();\n this._windowRef = null;\n this.hidden.emit();\n this._changeDetector.markForCheck();\n }\n }", "function closeContactFormular(indexDoc) {\n document.getElementById(\"popUpDate\" + indexDoc).style.display = \"none\";\n}", "function openSave () {\n $('#saveTemplate').modal('show');\n }", "function openSave () {\n $('#saveTemplate').modal('show');\n }", "function closeModal(){\n\t$(\"#myModal\").hide();\n\tcurrPokeID = null;\n}", "function closeModal(){\r\n modal.style.display = 'none';\r\n }", "function onCloseButtonClick(){\n\t\tt.hide();\n\t}", "close() {\n this.modal.dismiss();\n }", "newBlog(){\n\t fetch(`${this.url}Controllermodal/newblogmodal`)\n\t .then(dataModal=>{\n\t dataModal.json().then(modal=>{\n\t document.getElementById('parentmodalInsertBlog').style.display=\"block\";\n\t document.getElementById(\"modalNewBlog\").innerHTML=modal;\n\t })\n\t })\n\t}", "closeModal(body, modal){\n body.removeChild(modal);\n }", "function closeModal() {\n var c = $('#modalEdit').data('card');\n c.template.removeAttr('style');\n c.template.find('.card-form').removeAttr('style');\n $('#modalEdit').hide();\n}", "function cerrar() {\n\n modal.style.display = \"none\";\n}", "function save ()\n {\n $uibModalInstance.close(vm.item);\n }", "function closeEditDialog() {\n // Hide the dialog \n overlay.classList.add('visibility');\n // Re-enable the scrollbar\n document.body.classList.remove('model-open');\n // Deleting the inputs in the fields\n editDialogUid.value = \"\";\n editDialogUsername.value = \"\";\n editDialogEmail.value = \"\";\n editDialogMobile.value = \"\";\n editDialogAddress.value = \"\";\n editDialogPassword.value = \"\";\n editDialogConfirmPassword.value = \"\";\n}", "_handleCloseClick() {\n\t\tthis.close();\n\t}" ]
[ "0.6863503", "0.6671225", "0.6381248", "0.6369099", "0.6344691", "0.6299557", "0.626921", "0.626921", "0.62435544", "0.6240885", "0.61899865", "0.61791176", "0.61532605", "0.61532605", "0.6139722", "0.6077376", "0.60741377", "0.6056354", "0.6052493", "0.60463095", "0.6042145", "0.6026464", "0.6017889", "0.60178196", "0.6016706", "0.60158336", "0.6015169", "0.6011316", "0.5982452", "0.59695953", "0.59675854", "0.59666735", "0.596606", "0.59630895", "0.59616977", "0.59584737", "0.59577286", "0.59550846", "0.59513086", "0.59496987", "0.59477746", "0.59462523", "0.59430534", "0.59425676", "0.5941603", "0.59379995", "0.5932354", "0.59186476", "0.5910701", "0.59046966", "0.59035313", "0.59024906", "0.5901667", "0.5884887", "0.5880097", "0.58761156", "0.58736247", "0.58704394", "0.5866538", "0.58614117", "0.58473825", "0.58455503", "0.5842778", "0.5840878", "0.5835988", "0.5835268", "0.58330613", "0.58231455", "0.5819895", "0.5819445", "0.5816159", "0.5814805", "0.58141476", "0.58131665", "0.58125055", "0.5811744", "0.5808966", "0.5808301", "0.5808301", "0.5808301", "0.5805104", "0.5800221", "0.57990706", "0.57970893", "0.5794302", "0.5783271", "0.57819164", "0.5781655", "0.5781655", "0.5781263", "0.57795763", "0.57708234", "0.5766394", "0.5760071", "0.575773", "0.57548296", "0.5754513", "0.57498294", "0.57440907", "0.57402307" ]
0.6841656
1
hide add button if it's not current logged in users own profile
function toggleAddButton() { const loggedInUserId = document.querySelector(".logged-in-user-id").innerHTML; const profileId = document.querySelector(".current-profile-id").innerHTML; if (loggedInUserId !== profileId) { document.querySelector(".new-feed-button").classList.add("d-none"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "checkToShowAddButton() {\n const hasResult = this.hasQuery && (! this.hasUsers && ! this.hasDepartment);\n\n this.setShowAddButton( hasResult );\n }", "function handleClick() {\n setShowUserProfile((!showUserProfile))\n }", "function toggleAddButton() {\n const loggedInUserId =\n document.querySelector(\".logged-in-user-id\").innerHTML;\n const profileId = document.querySelector(\".current-profile-id\").innerHTML;\n if (loggedInUserId !== profileId) {\n document\n .querySelector(\".create-feed-container\") //needs to be the container/card\n .classList.add(\"is-invisible\");\n }\n}", "function addPostButtonDisplay(){\n if(userLoggedIn()){\n document.getElementById(\"addPostButton\").style.display = \"block\";\n } else {\n document.getElementById(\"addPostButton\").style.display = \"none\";\n }\n}", "function showButtons() {\n $(\".private\").css(\"display\", \"inherit\");\n $(\"#signUp\").css(\"display\", \"none\"); //Ocultamos el boton iniciar sesion\n}", "function addUserProfileIfLogged() {\n\n const localStorageContent = lsContent();\n\n const loggedUserCredentials = localStorageContent.find(item => item.logged == 1);\n\n\n if (loggedUserCredentials !== undefined && loggedUserCredentials.logged == 1) {\n\n const userID = loggedUserCredentials.name;\n\n document.getElementById('loginButton').innerText = 'Salir';\n document.getElementById('userProfile').innerHTML =\n `<span id=\"userProfileName\" class=\"text-white mr-1\">${userID}</span>\n <img class=\"profileImg mr-2\" src=\"media/user.svg\"></img>`;\n }\n}", "function showExistingUserData() {\n\t//Be sure that mainContent is shown\n\t$(\"#mainContent\").show();\n\t//Remove the action in the Delete button\n\t$(\"form#user_public_form\").attr('action','#');\n\t//Empty the nickname and registration data\n\t$(\"form#user_public_form\")[0].reset();\n\t//Remove all data of the user\n\t$(\"#userRestrictedInfo\").empty();\n\t//Clean the message list\n\t$(\"#messages #list\").empty();\n\t//Reset the number of messages\n\t$(\"#messagesNumber\").text(\"\");\n\t//Hide the newUserData if it was shown\n\t$(\"#newUserData\").hide();\n\t//Show existingUserData\n\t$(\"#existingUserData\").show();\n}", "function isEditProfileShowing() {\n return profileStates.editProfile;\n}", "function pageLoad() {\n $('.move_button').hide();\n $('.add_button').hide();\n $('.like_button').hide();\n \n $('.box').hover(function(){\n $($(this).find('.move_button')).show();\n }, function (){\n $($(this).find('.move_button')).hide();\n });\n //If it is not the current user\n $('.box').hover(function(){\n $($(this).find('.add_button, .like_button')).show();\n }, function (){\n $($(this).find('.add_button, .like_button')).hide();\n });\n }", "isUserLoggedIn() {\n //console.log(`User registered button should be present`);\n return this.userRegisteredButton.isExisting();\n }", "function showProfile() {\r\n // making list invisible----\r\n if (getComputedStyle(document.querySelector('.list')).visibility == 'visible') {\r\n document.querySelector('.list').style.visibility = 'hidden';\r\n }\r\n // making user info box visible\r\n if (getComputedStyle(document.querySelector('.main')).visibility == 'hidden') {\r\n document.querySelector('.main').style.visibility = 'visible';\r\n }\r\n}", "function remove_profile(){\n $('.active').hide();\n}", "function show_manage_user(){\n var manage_user = fill_template('user-management',{});\n $('#dd-log-in-menu').remove();\n $('.navbar-nav').append(manage_user);\n $('#dd-manage-alerts').click( function(e) {\n show_manage_alerts();\n });\n $('#dd-log-out').click( function(e) {\n set_cookie('dd-email','', -100);\n show_log_in();\n });\n }", "function actionWithoutSession() {\n $(\".link-login\").show();\n $(\".link-register\").show();\n $(\".link-logout\").hide();\n $(\".new-tweet\").hide();\n }", "function handleClick() {\n if (isAuthenticated) {\n document.getElementById(\"edit\").children[2].style.display = \"none\"; // Show only authorise buttons\n document.getElementById(\"edit\").children[1].style.display = \"none\";\n document.getElementById(\"edit\").children[6].style.display = \"block\";\n document.getElementById(\"edit\").children[5].style.display = \"block\";\n document.getElementById(\"edit\").children[4].style.display = \"block\";\n document.getElementById(\"edit\").children[3].style.display = \"block\";\n }\n if (!isAuthenticated) {\n document.getElementById(\"edit\").children[2].style.display = \"block\";\n document.getElementById(\"edit\").children[6].style.display = \"none\";\n }\n }", "function handleSignUp(e) {\n setVisible(false);\n setSignUp('true');\n }", "function allowCreateMeetup() {\n\n /* No Friends */\n if (localStorage.getItem(\"friendCount\") < 1) {\n $(document.getElementById('createMeetup')).prop('disabled', true);\n $(document.getElementById(\"friendsList\")).tooltip({trigger: \"manual\"}).tooltip(\"show\");\n }\n\n else {\n $(document.getElementById('createMeetup')).prop('disabled', false);\n $(document.getElementById(\"friendsList\")).tooltip(\"destroy\");\n }\n}", "function displayProfile(profile) {\n if (toShow) {\n toShow.style.display = \"none\"\n toShow = profile\n toShow.style.display = \"block\"\n }\n} //end of displayProfile", "function showCreateAccount()\n{\n hideOrShow(\"helloButtons\", false)\n hideOrShow(\"createAccount\", true)\n hideOrShow(\"login\", false)\n hideOrShow(\"text\", false)\n hideOrShow(\"backButton\", true)\n}", "function displayAdmin() {\n if (localStorage.getItem('x-auth-token')) {\n document.getElementById('postBtn').style.display='block';\n document.getElementById('login-icon').style.display='none';\n document.getElementById('logout-icon').style.display='block';\n //you are logged in, hide the log in, show log out and show post button\n }\n}", "function checkProfile(){\n if(!loggedIn){\n alert(\"Please login before using Profile!\");\n\t\tdocument.getElementById('myProfile').style.display='none';\n }\n else{\n alert(\"Welcome!\");\n\t\t document.getElementById('myProfile').style.display='block';\n\t\tdocument.getElementById(\"defaultOpen2\").click();\n }\n}", "function checkFav(){\r\n if (currentManipulatedUser && currentManipulatedUser.fav){\r\n addFav.style.color = \"gold\";\r\n // console.log(currentManipulatedUser);\r\n return;\r\n }\r\n addFav.style.color = \"white\";\r\n }", "function uploadwizard_newusers() {\n if (wgNamespaceNumber == 4 && wgTitle == \"Upload\" && wgAction == \"view\") {\n var oldDiv = document.getElementById(\"autoconfirmedusers\"),\n newDiv = document.getElementById(\"newusers\");\n if (oldDiv && newDiv) {\n if (typeof wgUserGroups == \"object\" && wgUserGroups) {\n for (i = 0; i < wgUserGroups.length; i++) {\n if (wgUserGroups[i] == \"autoconfirmed\") {\n oldDiv.style.display = \"block\";\n newDiv.style.display = \"none\";\n return;\n }\n }\n }\n oldDiv.style.display = \"none\";\n newDiv.style.display = \"block\";\n return;\n }\n }\n}", "function subCate_userProfile(){\n var folderShow = document.getElementById('user-profile-account-details');\n if(folderShow.style.display == \"none\"){\n folderShow.style.display = \"block\";\n } else{\n folderShow.style.display = \"none\";\n }\n}", "function showUserInfo() {\n\tvar currentUser = sessionStorage.getItem('currentUser');\n\tif(currentUser === null){\n\t\t$(\"#loginBtn\").html(\"<span class=\\\"glyphicon glyphicon-log-in\\\" style=\\\"margin-right: 5px\\\"></span>Login\");\n\t}\n\telse{\n\t\tcurrentUser = JSON.parse(currentUser);\n\t\t$(\"#loginBtn\").attr('href', '#');\n\t\t$(\"#loginBtn\").click(closeSession);\n\t\t$(\"#loginBtn\").html(\"<span class=\\\"glyphicon glyphicon-log-out\\\" style=\\\"margin-right: 5px\\\"></span>Salir\");\n\t\t$(\"#right-navBar\").append(\"<li><a href=\\\"#\\\" style=\\\"text-transform: capitalize\\\"><span class=\\\"glyphicon glyphicon-user\\\" style=\\\"margin-right: 5px;\\\"></span>\"+currentUser.user_info.name+\"</a></li>\");\n\t}\n}", "function memberAddClicked(){\n $(\"#div_memberAdd\").css(\"display\",\"block\");\n }", "function isProfilePage() {\n return $('#profile_card').length > 0;\n}", "function showuser() {\n var user = document.getElementById('userinfo');\n if (user.style.display === \"none\") {\n user.style.display = \"block\";\n } else {\n user.style.display = \"none\";\n }\n }", "function showuser() {\n var user = document.getElementById('userinfo');\n if (user.style.display === \"none\") {\n user.style.display = \"block\";\n } else {\n user.style.display = \"none\";\n }\n }", "function showAddNewIfNeeded(allSessions) {\n if (allSessions.length == 0) {\n showAddNewButton();\n }\n}", "function uploadwizard_newusers() {\n if ( mw.config.get( 'wgNamespaceNumber' ) === 4 && mw.config.get( 'wgTitle' ) === 'Upload' && mw.config.get( 'wgAction' ) === 'view' ) {\n var oldDiv = document.getElementById( 'autoconfirmedusers' ),\n newDiv = document.getElementById( 'newusers' );\n if ( oldDiv && newDiv ) {\n var userGroups = mw.config.get( 'wgUserGroups' );\n if ( userGroups ) {\n for ( var i = 0; i < userGroups.length; i++ ) {\n if ( userGroups[i] === 'autoconfirmed' ) {\n oldDiv.style.display = 'block';\n newDiv.style.display = 'none';\n return;\n }\n }\n }\n oldDiv.style.display = 'none';\n newDiv.style.display = 'block';\n return;\n }\n }\n}", "function hideButtons() {\n $(\".private\").css(\"display\", \"none\");\n $(\"#signOff\").css(\"display\", \"none\"); //Ocultamos el boton cerrar sesion\n $(\"#signUp\").css(\"display\", \"inherit\"); //Mostramos el boton iniciar sesion\n}", "function setButtons() {\n if ($routeParams.username != $rootScope.currentUser.username) {\n if ($rootScope.currentUser.friends.indexOf($routeParams.username) == -1) { // we aren't following them yet, show friend button\n $scope.friendbutton = true;\n $scope.unfriendbutton = false;\n } else {\n $scope.unfriendbutton = true;\n $scope.friendbutton = false;\n }\n }\n }", "function cancelDeleteButton() {\n document.getElementById(\"sensitiveAccountsData\").style.display = \"block\";\n document.getElementById(\"addNewButton\").style.display = \"none\";\n }", "function AddUser() {\n\tdocument.getElementById(\"AddUser\").style.display = \"block\";\n\t\n}", "function getFacebookInfo(){\n //if else condition to check if the Facebook feed is already under display. If so, it will be hidden\n if ( $('#panel1').attr('style') == 'display:none;' ) {\n displayProfile();\n } \n else {\n $('#pane2').hide(); \n displayProfile();\n }\n }// end get facebook info", "function updateUserProfile() {\n // $('#profile-name)\n $(\"#show-name\").html(` ${currentUser.name}`);\n $(\"#show-username\").html(` ${currentUser.username}`);\n $(\"#show-date\").html(` ${currentUser.createdAt.slice(0, 10)}`);\n }", "function profile(json) {\n document.getElementById('large-feed').style.display = \"none\"\n document.getElementById(\"Profile\").innerText = \"Back to main page\"\n var profile = document.getElementById('my-profile')\n profile.style.display = \"block\"\n console.log(json.username)\n console.log(json.email)\n profile.children[1].innerHTML = \"Username: \"+json.username\n profile.children[2].innerHTML = \"Email address: \" + json.email\n profile.children[3].innerHTML = \"Fans: \" +json.following.length\n\n const modify_btn = document.getElementById(\"modify-btn\")\n modify_btn.addEventListener('click',function () {\n document.getElementById('buttonList').style.display = \"block\"\n profile.children[1].style.display = \"none\"\n profile.children[2].style.display = \"none\"\n profile.children[3].style.display = \"none\"\n modify_btn.style.display = \"none\"\n })\n}", "function show_unfollow(response) {\n\n $('#follow-button-' + response.user_id).hide();\n $('#unfollow-button-' + response.user_id).show();\n }", "function isUploader(){\n\tvar div = document.getElementById('tagger-div');\n\tvar div2 = document.getElementById('delete-div');\n\tif(user == uploader){\n\t\tdiv.style.display = 'block';\n\t\tdiv2.style.display = 'block';\n\t}\n}", "function getFacebookFeed(){\n $( \"#pane2\" ).empty();//To make sure facebook feed is made empty ever time user clicks the button that runs this function\n //if else condition to check if the Profile information is already under display. If so, it will be hidden.\n if ( $('#panel1').attr('style') == 'display:none;' ) {\n displayFeed();\n } \n else {\n $('#panel1').hide(); \n displayFeed();\n }\n }//end of getFacebookFeed", "function handleAdminRemove() {\n if ($scope.currentUser === $scope.userToRemove.username) {\n $scope.reDirect();\n } else {\n $scope.init();\n }\n }", "function checklogin(){\n $('#addstack').hide();\n var user = getUrlParams('user');\n var apikey = getUrlParams('apikey');\n if ((typeof user === 'string' || user instanceof String) && (typeof apikey === 'string' || apikey instanceof String)){\n $('#userinfo').empty();\n $('#userinfo').append('<button onclick=\"location.href=\\'/\\';\" class=\"btn btn-outline-primary my-2 my-sm-0\">'\n + user +\n ' <i class=\"fa fa-sign-out\"></i></button>');\n $('#addstack').show();\n }\n}", "function uploadwizard_newusers() {\nif (wgNamespaceNumber == 4 && wgTitle == \"Upload\" && wgAction == \"view\") {\nvar oldDiv = document.getElementById(\"autoconfirmedusers\"),\nnewDiv = document.getElementById(\"newusers\");\nif (oldDiv && newDiv) {\nif (typeof wgUserGroups == \"object\" && wgUserGroups) {\nfor (i = 0; i < wgUserGroups.length; i++) {\nif (wgUserGroups[i] == \"autoconfirmed\") {\noldDiv.style.display = \"block\";\nnewDiv.style.display = \"none\";\nreturn;\n}\n}\n}\noldDiv.style.display = \"none\";\nnewDiv.style.display = \"block\";\nreturn;\n}\n}\n}", "function showLoggedInUser(user) {\n login_status.text(\"Logged in as: \" + user.profile.name);\n login_button.text(\"Logout\");\n }", "function showSignup() {\n\n // if (Auth.loggedIn()) {\n // return (\n // <div>\n // <div className=\"AddPetSection\">\n // <UserInfo />\n // <PetList />\n // </div>\n // </div>\n // );\n // } else {\n // return (\n // <div>\n // <Signup />\n // </div>\n // );\n // }\n }", "function validarNewUser(){\n\t//debugger;\n\tif(localStorage.getItem(\"Usuario_Actual\") === \"Admin\"){\n\t\t$(\"#Hi_user\").append('Admin');\n\t}else{\n\t\t$(\"#New_usuario\").hide();\n\t\t$(\"#Users\").hide();\n\t\t$(\"#Hi_user\").append(localStorage.getItem(\"Usuario_Actual\"));\n\t}\n}", "function loadProfileInfo() {\n \n if ( localStorage.exsist ) {\n \n $('#create-list').hide(); // hide the red cover\n $('#profile-photo').attr('src', localStorage.myProfileImage);\n $('#title-of-list').html(localStorage.myProfileTitle);\n }else {\n resetProfileInfo();\n }\n \n}", "function modalSignUp(person) {\n $('#modal_login_content').addClass('hideOnly');\n $('#modal_register_content').removeClass('hideOnly');\n $('#modal_register_mobile').addClass('hideOnly');\n $('#modal_alert').addClass('hideOnly');\n $('#modal_alert_cap').addClass('hideOnly');\n if ( person.toLowerCase() === \"owner\") {\n $('#signup_register').css('display','none');\n $('#add_boat').val('true');\n $('#add_boat_signin').val('true');\n } else {\n $('#signup_register').css('display','flex');\n $('#add_boat').val('');\n $('#add_boat_signin').val('');\n }\n}", "function enablePrivateFeatures() {\n // TODO Update the login button status\n \n // For each button (without the login one) create and add the node\n var buttonsContainer = document.getElementById(\"simp-bar-container-left\");\n for (var i = 0, len = buttons.length; i < len; i++) {\n if (document.getElementById(buttons[i].id) == null) {\n buttonsContainer.appendChild(createButtonNode(buttons[i]));\n }\n }\n}//enablePrivateFeatures(id)", "function showProfileInfo() {\n $(\"#monitoredContent\").children().hide();\n $(\"#profileContainer\").show();\n $(\".tab button\").css(\"background-color\",\"initial\");\n}", "function pag_configureUserProfile(profileFormId) {\n document.getElementById(profileFormId).style.visibility = \"visible\";\n}", "function enable_services_for_current_user( ) {\n /*\n * Note here: we can't really use .show() method here, as it will set default element\n * display setting, rather than let the browser decide\n */\n\n /* all links that can be shown to logged in user */\n jQuery(\".enable_for_current_user\").css('display', '');\n\n /* enable elements that current user is owner of */\n jQuery(\".enable_for_owner_\" + current_user).css('display', '');\n\n /* disable elements that must be disabled for this current user */\n jQuery(\".disable_for_owner_\" + current_user).hide();\n\n /* disable voting for his entries (he wont be able to do that, anyway) */\n jQuery(\".service_rating_owner_\" + current_user + \" .entry_voter\").hide();\n}", "function onAddTeamClick() {\n $(\"#registerButtons\").hide();\n $(\"#registerTeam\").show();\n}", "function updateStartGameButtonVisibility() {\n //find out if current user is the creator\n var isCreator = (gameInfo.username === gameInfo.gameID);\n //get number of players\n var numPlayers = gameInfo.currentPlayers.length;\n\n if (isCreator && (numPlayers >= minNumberOfPlayers)) {\n //this is the game creator and there are enough players. Show start game option\n $(\"#startGameButton\").show();\n } else {\n //hide or keep hidden the startGameButton in all other cases\n $(\"#startGameButton\").hide();\n }\n}", "function showEditAccounts(){\n\t\t$(\"#editAccounts\").show();\n\t\t$(\".accountDetails\").hide();\n\t}", "function changeToLoggedIn(){\n document.getElementById('fb-loginbutton').style.display = \"none\";\n document.getElementById('fb-logoutbutton').style.display = \"block\";\n document.getElementById('details').style.display = \"block\";\n requestAllUserFields();\n}", "function userLoggedIn() {\n $(\"#linkHome\").show();\n $(\"#linkLogin\").hide();\n $(\"#linkRegister\").hide();\n $(\"#linkListAds\").show();\n $(\"#linkCreateAd\").show();\n $(\"#linkLogout\").show();\n }", "function userLoggedIn() {\n let span = $('#loggedInUser');\n let username = localStorage.getItem('username');\n span.text(`Wellcome ${username}`);\n span.show();\n\n $('#linkHome').show();\n $('#linkListAds').show();\n $('#linkCreateAd').show();\n $('#linkLogout').show();\n\n $('#linkLogin').hide();\n $('#linkRegister').hide();\n }", "async function Profile(evt) {\n evt.preventDefault();\n if (localStorage.userId !== undefined) {\n hidePageComponents();\n $profileInfo.show();\n $userProfile.show();\n $links.show();\n $logoutBtn.show();\n $userBtn.show();\n\n if (localStorage.favTeamId == \"None\") {\n $favTeam.text(\"You have not selected a favorite team\");\n } else {\n $favTeam.text(\n `Your currently selected favorite team is the ${localStorage.favTeamName}`\n );\n }\n } else {\n $welcome.show();\n $loginBtn.show();\n $signupBtn.show();\n }\n}", "addButton() {\n if (this.props.thread.posterid == this.props.userid && this.props.thread.postername === this.props.username) {\n return (\n <div>\n <p className=\"editbutton\" style={{ float: 'none' }} onClick={() => this.setState({ editing: true })}>edit</p>\n </div>\n )\n }\n }", "function toggleRemoveAction(userid) {\n var icon = document.getElementById('removeuser'+userid);\n var buttonto = document.getElementById('addto'+userid);\n var buttoncc = document.getElementById('addcc'+userid);\n var buttonbcc = document.getElementById('addbcc'+userid);\n\n if (icon.style.visibility == 'hidden') {\n icon.style.visibility = '';\n buttonto.style.visibility = 'hidden';\n buttoncc.style.visibility = 'hidden';\n buttonbcc.style.visibility = 'hidden';\n } else {\n icon.style.visibility = 'hidden';\n buttonto.style.visibility = '';\n buttoncc.style.visibility = '';\n buttonbcc.style.visibility = '';\n }\n}", "function forLoggedOuts() {\n\tlogoutBtn.style.display = \"none\";\n\tloginIcon.style.display = \"block\";\n\tusernameForm.style.display = \"block\";\n\tcurrentUserDiv.classList.add(\"d-none\");\n\tadminDiv.style.display = \"none\";\n\trecordKeeping(false); //no personal record shown\n}", "function updateCurrentStatus(user) {\n $(\"#current-status\").empty().append(\n `<h4>` + user[\"family_name\"] + \", \" + user[\"given_name\"] + `</h4>\n <h4>UIN: ` + user[\"uin\"] + `</h4>\n <p>Current Entry Status = ` + user[\"status\"] + `</p>`\n ).show();\n}", "function updateUsers () {\n document.querySelector('.like-button').remove()\n showPanel.innerHTML += '<p><strong>pouros</strong></p><button class=\"like-button\">Read Book</button>'\n}", "function actionWithSession() {\n $(\".link-login\").hide();\n $(\".link-register\").hide();\n $(\".link-logout\").show();\n $(\".compose\").show();\n }", "function isAdditionalInfoShowing() {\n return profileStates.additionalInfo;\n}", "function displaySignUp() {\n document.getElementById('id01').style.display='block';\n document.getElementById(\"signupbtn\").disabled = true;\n document.getElementById('id01').style.display='block';\n}", "userProfileHasLoaded(){\n\t\tif(resources.username().waitForVisible(10000) &&\n\t\tresources.settingsToolBar().waitForVisible(10000)){\n\t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t}", "updateUILogout() {\n $('.anon').show()\n $('.auth').hide()\n\n $('.my-games').hide().attr('href', '#users/[username]/games')\n }", "function hideUserStatistics(deleteMe, deleteThem)\r\n{\r\n\tvar deleteArray, statBlock = !recursion && document.getElementsByClassName(\"user-statistics\")[0];\r\n\tif( !statBlock )\r\n\t\treturn;\r\n\t\r\n\tif( statBlock.parentNode.parentNode.getElementsByTagName(\"h1\")[0].textContent == login )\r\n\t\tdeleteArray = ( deleteMe instanceof Array ) ? deleteMe : [];//Your profile\r\n\telse\r\n\t\tdeleteArray = ( deleteThem instanceof Array ) ? deleteThem : [];//Someone else's profile\r\n\t\r\n\tif( deleteArray.indexOf(\"Statistics\") >= 0 )\r\n\t\tstatBlock.parentNode.getElementsByTagName(\"h2\")[0].style.display = \"none\";\r\n\t\r\n\tvar statLabels = statBlock.getElementsByTagName(\"th\");\r\n\t\r\n\tfor( var i = 0; i < statLabels.length; i++ )\r\n\t\tif( deleteArray.indexOf( statLabels[i].textContent ) >= 0 )\r\n\t\t\tstatLabels[i].parentNode.style.display = \"none\";\r\n}", "function btnHandling() {\n // On same pages these buttons are not defined\n try {\n const userID = container.dataset.profile;\n const currentProfileID = document.querySelector(\".post-actions\").dataset.owner;\n\n if(userID !== currentProfileID) {\n const header = document.querySelector(\".posts-header\");\n const topBtn = document.querySelector(\".btn-follow.top\");\n const bottomBtn = document.querySelector(\".btn-follow.bottom\");\n const position = bottomBtn.getBoundingClientRect().bottom;\n const height = header.offsetHeight;\n\n if(position < height) {\n topBtn.classList.add(\"active\");\n } else {\n topBtn.classList.remove(\"active\");\n }\n }\n } catch{return}\n}", "function showUserInvite() {\n $('#invite-user')[0].hidden = false;\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 hideSocialButtons() {\n if (window.__peepCfg.socialButtonsEnabled == false) {\n var socialDisplay = document.querySelector('.social');\n socialDisplay.classList.add('hidden');\n }\n}", "function ProfileDisplay() {\n var element = document.getElementById(\"user-profile\");\n \n if(element) {\n element.parentNode.removeChild(element);\n }\n \n var $div = $('#profile');\n var $profile = $('<h4 id=user-profile></h4>');\n $profile.text(event.target.id);\n $profile.appendTo($div);\n $profile.css({\n 'text-align':'center'\n });\n\n $profile.hide();\n}", "function enableEditingUser(userId){\n $('#'+userId+'-email').removeAttr('disabled');\n $('#'+userId+'-save').removeAttr('disabled');\n $('#'+userId+'-edit').hide();\n $('#'+userId+'-cancel').show();\n}", "function handleProfileSubmit() {\n showModal();\n }", "editProfileHasLoaded(){\n\t\tif(resources.editProfileTitleBar().waitForVisible(10000)){\n\t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t}", "function handleCoachAccess(){\n var userId = localStorage.getItem(\"user\");\n if(userId != null) {\n var query = firebase.database().ref('Users/' + userId);\n query.once(\"value\").then(function(snapshot) {\n var manager = snapshot.child(\"manager\").val();\n\n if(manager == true){\n document.getElementById('edit-delete-player').className = \"btn btn-danger\";\n }\n });\n }\n}", "function showProfile(profile, currentUser) {\n profile.children.item(0).innerHTML = currentUser.username;\n profile.children.item(1).innerHTML = currentUser.title;\n profile.children.item(2).innerHTML = currentUser.score;\n profile.children.item(1).style.color = '#e40046';\n profile.children.item(1).style.fontWeight = 'bold';\n profile.children.item(2).style.color = '#e40046';\n profile.children.item(2).style.fontWeight = 'bold';\n profile.children.item(3).innerHTML = currentUser.email;\n return;\n}", "function checkCoockieForUserName() {\n var $accountButton = $('.headerRight__account');\n $accountButton.unbind('click');\n //close Sign in window\n $('.authorization').remove();\n if (!getCookie('userLogin')) {\n //set account text standart\n $accountButton.text('My Account ').append($('<i />', {class: 'fas fa-caret-down'}));\n //add event for authorization\n $accountButton.click(function (event) {\n buildAuthorizationForm();\n event.preventDefault();\n });\n } else {\n $accountButton.text('Hello, ' + getCookie('userLogin'));\n $accountButton.click(function (event) {\n buildMenuUser();\n event.preventDefault();\n });\n }\n}", "function toggleUserView() {\n if (user) {\n $('#submitToggle, #favoriteToggle, #displayProfile, #logoutUser').show();\n } else {\n $('#submitToggle, #favoriteToggle, #displayProfile, #logoutUser').hide();\n // remove all favorited list items\n $('li.favorite').removeClass('favorite');\n }\n}", "function showButtons() {\n // when users are not connected, we want start game button disabled\n // document.getElementById('start-game').style.display = 'inline';\n\n document.getElementById('button-invite').style.display = 'inline';\n // document.getElementById('button-preview').style.display = 'inline';\n document.getElementById('grab-username').style.display = 'inline';\n document.getElementById('username').style.display = 'inline';\n document.getElementById('invite-to').style.display = 'inline';\n\n // document.getElementById('end-call').style.display = 'none';\n\n // ensure that local media removes on firefox\n $('#local-media > video').remove();\n }", "function myprofile(){\n\tuser_profile.style.display = 'block'\n\tvar user=JSON.parse(localStorage.getItem('User'));\n\tdocument.getElementById('profile_name').innerHTML=user.fullName;\n\tdocument.getElementById('profile_phone').innerHTML=user.phone;\n\tdocument.getElementById('profile_email').innerHTML=user.email;\n\tdocument.getElementById('profile_password').value=user.password;\n}", "function hasProfile() {\n if (!store.has('ui.profile.url') || !store.has('ui.profile.user') || !store.has('ui.profile.password')) {\n return false;\n }\n if (!store.get('ui.profile.url') || !store.get('ui.profile.user') || !store.get('ui.profile.password')) {\n return false;\n }\n return true;\n}", "function openNewAccount() {\n document.getElementById(\"addNewButton\").style.display = \"block\";\n }", "toggleDisplay_() {\n const {userProfile: {signedIn}} = getStore();\n\n signedIn ?\n this.classList.add(cssClass.FILTER_ACTIVE) :\n this.classList.remove(cssClass.FILTER_ACTIVE);\n }", "function allowUserToEdit() {\n // console.log('user to edit:', usersShow.user.id);\n // console.log('currentUser:', currentUserId);\n if (usersShow.user.id === currentUserId) {\n usersShow.editable = true;\n }\n }", "function endModifyProfile(Id) {\n $('#MODI_'+Id).remove();\n $('#profil_'+Id).show();\n}", "function endModifyProfile(Id) {\n $('#MODI_'+Id).remove();\n $('#profil_'+Id).show();\n}", "function openProfileInfo() {\n vm.showUserInfo = !vm.showUserInfo;\n }", "function storeOwner() {\n var bitsUserName = localStorage.getItem(\"bits-user-name\");\n var sokoOwner = JSON.parse(localStorage.getItem('soko-store-id-' + localStorage.getItem('soko-active-store'))).owner;\n if (bitsUserName != sokoOwner) {\n $(\"#checkStoreOwner\").css('display', 'block')\n $(\"#storeSettings\").css(\"display\", \"none\");\n\n } else {\n $(\"#storeSettings\").css('display', 'block')\n $(\"#checkStoreOwner\").css('display', 'none')\n }\n}", "function listUsersButton() {\n listUsers();\n $listUsers.toggle();\n }", "function addUserOnClick (e) {\n if (e.target.id != 'add-user') {\n return;\n }\n newUserForm = document.querySelector('#new-user-form');\n newUserForm.style.display = 'block';\n var newUserRoleSelect = document.querySelector('#new-user-form .new-user-role');\n getRoles(newUserRoleSelect);\n var newUserUserSelect = document.querySelector('#new-user-form .new-user-user');\n getUsers(newUserUserSelect);\n}", "function profileDelete() {\n document.getElementById(\"deletebox\").style.display = \"block\";\n}", "function MUA_DisableBtnSave(is_ok){\n// --- disable btn submit\n\n const disable_btn_save = (!mod_MUA_dict.user_schoolbase_pk || !el_MUA_username.value ||\n !el_MUA_last_name.value || !el_MUA_email.value )\n el_MUA_btn_submit.disabled = disable_btn_save;\n el_MUA_btn_submit.innerText = (mod_MUA_dict.mode === \"update\") ? loc.Save : loc.Create_user_account;\n\n// --- hide submit btn when is_ok\n add_or_remove_class(el_MUA_btn_submit, cls_hide, is_ok)\n\n } // MUA_DisableBtnSave", "function updateUIWithAuthState(hasAuth) {\n if (hasAuth) {\n $(\".notsignedin\").css('display', 'none');\n $(\".signedin\").css('display', 'block');\n } else {\n $(\".notsignedin\").css('display', 'block');\n $(\".signedin\").css('display', 'none');\n }\n }", "function mystarComments(){\n\tif ($.cookie('user_id') != null ){\n\t\t$('#show_profile').show();\n\t\t$('#show_comments').show();\n\t}\n\n}", "updateUser(user) {\n firebaseUser = user\n const div = document.getElementById('createCategory')\n if (div == null) { return }\n\n if (firebaseUser) {\n div.classList.remove('hidden')\n } else {\n div.classList.add('hidden')\n }\n }" ]
[ "0.6933118", "0.6854732", "0.67922974", "0.675933", "0.64543074", "0.6411886", "0.6378024", "0.6368346", "0.6321812", "0.6281145", "0.6266627", "0.6223535", "0.6173657", "0.61585486", "0.61256045", "0.6111671", "0.6039487", "0.6028034", "0.60268646", "0.6011177", "0.6006853", "0.5961159", "0.59506994", "0.59472954", "0.59468347", "0.5926904", "0.5906727", "0.5902664", "0.5902664", "0.589631", "0.589234", "0.5877205", "0.58717626", "0.5869666", "0.5866208", "0.58655536", "0.5847759", "0.58429474", "0.5829407", "0.5812259", "0.5807335", "0.5793125", "0.5789882", "0.57879955", "0.57847226", "0.5784507", "0.5781603", "0.5778152", "0.577286", "0.57726806", "0.5769262", "0.5760689", "0.5745798", "0.57416993", "0.5728282", "0.5722215", "0.5719312", "0.5717999", "0.5716279", "0.5715607", "0.5714328", "0.57108265", "0.57102525", "0.5704412", "0.5700811", "0.5693203", "0.5692155", "0.5689201", "0.56862754", "0.5683407", "0.56783646", "0.56730074", "0.5669523", "0.5667202", "0.5658383", "0.56512284", "0.5646435", "0.5644017", "0.5643529", "0.56431144", "0.56365466", "0.5628803", "0.562665", "0.5619164", "0.5615796", "0.56129503", "0.56116843", "0.5605065", "0.56047744", "0.5602164", "0.5602164", "0.55957025", "0.55894446", "0.55829835", "0.558168", "0.55816215", "0.5580528", "0.5577582", "0.55775565", "0.5574291" ]
0.72641385
0
node is actually a single node, or an array of nodes
render(createElement) { var component; const { node, param, token } = this; if (token && token[0]!=='$') { component= "mk-plain-text"; } else if (Array.isArray(node)) { // note: we could look at "param.repeats" but param is used for both the array slot // and the array elements component= "mk-repeater-ctrl"; } else if (node) { const { itemType } = node; if (itemType) { // search for a template particular to the item's underlying type. const name= itemType.name.replace("_","-"); component= `mk-${name}-ctrl`; // if not, use a generic control based on item's role. if (!(component in Vue.options.components)) { component= `mk-${itemType.uses}-ctrl`; } } } return component && createElement( component, { key: node&& node.id, // can be empty for repeats... props: { node, param, token, } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function node(){}", "function isNode(x) {\n return x !== null && typeof x === \"object\" && typeof x.type === \"string\";\n}", "function isNodeOneOf(elem,nodeTypeArray){if(nodeTypeArray.indexOf(elem.nodeName)!==-1){return true;}}", "function one(node) {\n if (node.type === type) {\n callback.call(context, node);\n }\n\n var children = node.children;\n var index = -1;\n var length = children ? children.length : 0;\n\n while (++index < length) {\n one(children[index]);\n }\n }", "static isNode(n) {\n return n && typeof n === \"object\" && typeof n.type === \"string\";\n }", "isNodeList(value) {\n return Array.isArray(value) && (value.length === 0 || Node.isNode(value[0]));\n }", "function isNode(node) {\r\n return node && node.nodeType && node.nodeName &&\r\n toString.call(node) === '[object Node]';\r\n }", "get node() { return this._node; }", "addNode(node) {\n if(typeof this.nodes[node] === 'undefined') {\n this.nodes[node] = []\n }\n }", "function isNodeOneOf(elem, nodeTypeArray) {\n if (nodeTypeArray.indexOf(elem.nodeName) !== -1) {\n return true;\n }\n }", "function isNodeOneOf(elem, nodeTypeArray) {\n if (nodeTypeArray.indexOf(elem.nodeName) !== -1) {\n return true;\n }\n }", "function isNodeOneOf(elem, nodeTypeArray) {\n if (nodeTypeArray.indexOf(elem.nodeName) !== -1) {\n return true;\n }\n }", "function isNodeOneOf(elem, nodeTypeArray) {\n if (nodeTypeArray.indexOf(elem.nodeName) !== -1) {\n return true;\n }\n }", "function one(node) {\n var result\n\n if (!type || node.type === type) {\n result = visitor(node, stack.concat())\n }\n\n if (node.children && result !== false) {\n return all(node.children, node)\n }\n\n return result\n }", "function one(node) {\n var result\n\n if (!type || node.type === type) {\n result = visitor(node, stack.concat())\n }\n\n if (node.children && result !== false) {\n return all(node.children, node)\n }\n\n return result\n }", "function one(node) {\n var result\n\n if (!type || node.type === type) {\n result = visitor(node, stack.concat())\n }\n\n if (node.children && result !== false) {\n return all(node.children, node)\n }\n\n return result\n }", "function one(node) {\n var result\n\n if (!type || node.type === type) {\n result = visitor(node, stack.concat())\n }\n\n if (node.children && result !== false) {\n return all(node.children, node)\n }\n\n return result\n }", "function one(node) {\n var result\n\n if (!type || node.type === type) {\n result = visitor(node, stack.concat())\n }\n\n if (node.children && result !== false) {\n return all(node.children, node)\n }\n\n return result\n }", "function one(node) {\n var result\n\n if (!type || node.type === type) {\n result = visitor(node, stack.concat())\n }\n\n if (node.children && result !== false) {\n return all(node.children, node)\n }\n\n return result\n }", "function Node(){}", "createNode(node) {\n nodes = webglUtils.extendArray(nodes, nodesCount, ATTRIBUTES_PER_PRIMITIVE);\n nodesCount += 1;\n }", "function inputNode(node, nodes) {\n\tfor(var i=0; i < nodes.length; i++) {\n\t\tif(nodes[i].input_node == node._id) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}", "function isNode(o){\n\t\t\treturn (\n\t\t\t\ttypeof Node === \"object\" ? o instanceof Node : \n\t\t\t\to && typeof o === \"object\" && typeof o.nodeType === \"number\" && typeof o.nodeName===\"string\"\n\t\t\t);\n\t\t}", "visitNode(node) { }", "function lookupNodes(){\n\t\tif( typeof(arg) == 'string') {\n\t\tvar selector = arg;\n\t\tsatellite.cssQuery(selector, function(matched) {\n\t\t\tnodes = matched;\n\t\t});\n\t\t} else if(Array.isArray(arg) == true){\n\t\t\tnodes = arg;\n\t\t} else if(arg == eam.global || arg == eam.context || arg && arg.parentNode){\n\t\t\tnodes = [arg];\n\t\t} else {\n\t\t\tnodes = [];\n\t\t}\n\t\tnode = nodes[0];\n\t}", "function isNode(o){\n return (\n typeof Node === \"object\" ? o instanceof Node : \n o && typeof o === \"object\" && typeof o.nodeType === \"number\" && typeof o.nodeName===\"string\"\n );\n}", "function _verifyNodeList(nodes) {\n\t if (nodes.constructor !== Array) {\n\t nodes = [nodes];\n\t }\n\n\t for (var i = 0; i < nodes.length; i++) {\n\t var node = nodes[i];\n\t if (!node) {\n\t throw new Error(\"Node list has falsy node with the index of \" + i);\n\t } else if (typeof node !== \"object\") {\n\t throw new Error(\"Node list contains a non-object node with the index of \" + i);\n\t } else if (!node.type) {\n\t throw new Error(\"Node list contains a node without a type with the index of \" + i);\n\t } else if (node instanceof _index2[\"default\"]) {\n\t nodes[i] = node.node;\n\t }\n\t }\n\n\t return nodes;\n\t}", "function _verifyNodeList(nodes) {\n\t if (nodes.constructor !== Array) {\n\t nodes = [nodes];\n\t }\n\n\t for (var i = 0; i < nodes.length; i++) {\n\t var node = nodes[i];\n\t if (!node) {\n\t throw new Error(\"Node list has falsy node with the index of \" + i);\n\t } else if (typeof node !== \"object\") {\n\t throw new Error(\"Node list contains a non-object node with the index of \" + i);\n\t } else if (!node.type) {\n\t throw new Error(\"Node list contains a node without a type with the index of \" + i);\n\t } else if (node instanceof _index2[\"default\"]) {\n\t nodes[i] = node.node;\n\t }\n\t }\n\n\t return nodes;\n\t}", "function getNode(ctx, r) {\n\t if(arguments.length > 2) throw new Error('too many args');\n\t if(!r) return isNodeish(ctx.cN) ? ctx.cN : null;\n\t if(r.t !== 'arr') throw new Error('wrong arg type');\n\t if(!r.v.length) return;\n\t sortByDocumentOrder({ t:'arr', v:r.v.filter(isNodeish) });\n\t return r.v[0];\n\t}", "function _isNode(o){\n return (\n typeof Node === \"object\" ? o instanceof Node : \n o && typeof o === \"object\" && typeof o.nodeType === \"number\" && typeof o.nodeName===\"string\"\n );\n }", "isNode (obj) {\n return obj instanceof Node && (obj.constructor === Node || !(obj instanceof cc.Scene));\n }", "function collect_viewable_nodes(node, node_array) {\n if(node.view_series)\n node_array.push(node)\n for(var i=0; i<node.children.length; i++)\n collect_viewable_nodes(node.children[i], node_array);\n}", "function _verifyNodeList(nodes) {\n if (nodes.constructor !== Array) {\n nodes = [nodes];\n }\n\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n if (!node) {\n throw new Error(\"Node list has falsy node with the index of \" + i);\n } else if (typeof node !== \"object\") {\n throw new Error(\"Node list contains a non-object node with the index of \" + i);\n } else if (!node.type) {\n throw new Error(\"Node list contains a node without a type with the index of \" + i);\n } else if (node instanceof _index2[\"default\"]) {\n nodes[i] = node.node;\n }\n }\n\n return nodes;\n}", "function isNode(obj) {\n return !!((typeof Node === 'undefined' ? 'undefined' : _typeof(Node)) === 'object' ? obj instanceof Node : obj && (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object' && typeof obj.nodeType === 'number' && typeof obj.nodeName === 'string');\n }", "function isNode(o) {\n return (typeof Node === \"object\" ? o instanceof Node : o && typeof o === \"object\" && typeof o.nodeType === \"number\" && typeof o.nodeName === \"string\");\n}", "function visitNodes(node, action, context)\r\n {\r\n for (var fieldname in node)\r\n {\r\n var childNode = node[fieldname];\r\n if (childNode == undefined)\r\n continue;\r\n\r\n action(node, fieldname, context);\r\n if (typeof(childNode) != 'object')\r\n continue;\r\n\r\n if (childNode instanceof Array)\r\n {\r\n for (var i = 0; i < childNode.length; i++)\r\n {\r\n if (typeof(childNode[i]) == 'object')\r\n visitNodes(childNode[i], action, context);\r\n }\r\n }\r\n else\r\n {\r\n visitNodes(childNode, action, context);\r\n }\r\n }\r\n }", "function Node() {}", "function isNode(o) {\n return (typeof Node === \"object\" ? o instanceof Node :\n o && typeof o === \"object\" && typeof o.nodeType === \"number\" && typeof o.nodeName === \"string\");\n }", "function checkandaddNode(node) {\n\tvar found = cy.$id(\"node_\" + node.identity.low);\n\tif (found[\"length\"] == 0) {\n\t\tvar output = {\n\t\t\t\tid: \"node_\" + node.identity.low,\n\t\t\t\tneo4j_id: node.identity.low,\n\t\t\t\tneo4j_label: node.labels.join()\n\t\t}\n\n\t\tObject.keys(node.properties).forEach(key => {\n\t\t\toutput[key] = node.properties[key];\n\t\t});\n\t\t\n\t\tcy.add({\n\t\t\tgroup: \"nodes\",\n\t\t\tdata: output\n\t\t});\n\t}\n\telse {\n\t\t// console.log(\"node_\" + node.identity.low + \" already exists\");\n\t}\n}", "function isNodeType(type) {\n\t return t.isType(this.type, type);\n\t}", "function isNodeType(type) {\n\t return t.isType(this.type, type);\n\t}", "function isNodeType(type) {\n\t return t.isType(this.type, type);\n\t}", "static isNode(val) {\n return val instanceof Node;\n }", "function storeNode(node) {\n // add reference between entity id and node\n if (node.elt.get('info')) {\n var entity = node.elt.get('info').entity;\n if (entity !== undefined) {\n if (nodes_by_entity_ids[entity] === undefined) {\n nodes_by_entity_ids[entity] = [node];\n } else {\n nodes_by_entity_ids[entity].push(node);\n }\n }\n }\n }", "function isNode(obj) {\n return !!((typeof Node === 'undefined' ? 'undefined' : _typeof(Node)) === 'object' ? obj instanceof Node : obj && (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object' && typeof obj.nodeType === 'number' && typeof obj.nodeName === 'string');\n }", "function RNode(){}", "isNode(val) {\n return val instanceof NodeParent\n }", "constructor(node, id) {\n this.id = id;\n this.nodes = [];\n this.nodes.push(node);\n }", "function isNode(o) {\n return (\n typeof Node === 'object' ? o instanceof Node :\n o && typeof o === 'object' && typeof o.nodeType === 'number' && typeof o.nodeName === 'string'\n );\n }", "function isNode(o) {\n return (\n typeof Node === \"object\" ? o instanceof Node :\n o && typeof o === \"object\" && typeof o.nodeType === \"number\" && typeof o.nodeName === \"string\"\n );\n }", "function findNode(node) {\n\tlet idx = getNodeIndex(SourceNode, node);\n\tif (idx > -1) return [idx, true];\n\treturn [getNodeIndex(DeviceNode, node), false];\n}", "function element__NODE_ques_(nodeType) /* (nodeType : nodeType) -> bool */ {\n return (nodeType === 1);\n}", "function TNode(){}", "function one(node, index, parent) {\n var result;\n\n index = index || (parent ? 0 : null);\n\n if (!type || node.type === type) {\n result = visitor(node, index, parent || null);\n }\n\n if (node.children && result !== false) {\n return all(node.children, node);\n }\n\n return result;\n }", "trackNodeBy(index, node) {\n return node.id;\n }", "function isNodeType(type) {\n return t.isType(this.type, type);\n}", "addNewNode(node){\r\n this.nodes.push(node);\r\n }", "function processNode(node){\n processChild(node);\n for( i in node.children )\n processNode(node.children[i]);\n }", "function isNodeList(value) {\n return isType(value, 'NodeList');\n}", "addNode(node){\n if (!this.adjacencyList.has(node)) {\n return this.adjacencyList.set(node, []);\n }\n }", "function hasChildNodes(node) {\n return firstChild(node) != null;\n}", "function isNodeList(node_list) {\r\n var list = ['[object HTMLCollection]', '[object NodeList]'];\r\n return inArray(toString.call(node_list), list);\r\n }", "function isNodeCollection(value) {\n return typeof value == 'object' && typeof value.get == 'function';\n}", "function isNodeType(type /*: string*/) /*: boolean*/ {\n\t return t.isType(this.type, type);\n\t}", "function isNodeType(type /*: string*/) /*: boolean*/ {\n\t return t.isType(this.type, type);\n\t}", "function entity__REFERENCE__NODE_ques_(nodeType) /* (nodeType : nodeType) -> bool */ {\n return (nodeType === 5);\n}", "function isNode(source){\n if (window.Node) {\n return source instanceof Node;\n }\n else {\n // the document is a special Node and doesn't have many of\n // the common properties so we use an identity check instead.\n if (source === document) \n return true;\n return (typeof source.nodeType === 'number' &&\n source.attributes &&\n source.childNodes &&\n source.cloneNode);\n }\n }", "function RNode() {}", "function RNode() {}", "function RNode() {}", "function getNodeValue(node) {\n switch (node.type) {\n case 'array':\n return node.children.map(getNodeValue);\n case 'object':\n var obj = Object.create(null);\n for (var _i = 0, _a = node.children; _i < _a.length; _i++) {\n var prop = _a[_i];\n var valueNode = prop.children[1];\n if (valueNode) {\n obj[prop.children[0].value] = getNodeValue(valueNode);\n }\n }\n return obj;\n case 'null':\n case 'string':\n case 'number':\n case 'boolean':\n return node.value;\n default:\n return void 0;\n }\n}", "function index_data(node)\n {\n if (node.id) {\n indexbyid[node.id] = node;\n }\n for (var c=0; node.children && c < node.children.length; c++) {\n index_data(node.children[c]);\n }\n }", "function isNodeLike(obj) {\n return obj && (obj.nodeType === 1 || obj.nodeType === 9);\n }", "constructor(nodes) {\n this.nodes = nodes\n }", "function isTagOfNode(tag) {\n //'this' is set by the second parameter that calls this function.\n //God knows why. In this case it will be an node that we're creating.\n return this.node_ID == tag.node_ID;\n}", "isValidNode(node) {\n return this.validNodes.includes(node)\n }", "function getRawNode(node,position) {\n if(__.isArr(node)) {\n var pos = !position ? 0 : node.length-1;\n return getRawNode(node[position],pos);\n } else {\n return node;\n }\n }", "function checkNode(id) {\n\tfor (let j = 0; j < nodes.length; j++) {\n\t\tif(nodes[j]['id'] == id){\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}", "function size(node) {\n return node.size ? node.size : 1;\n }", "constructor() {\n this._nodes = [];\n }", "function nodesAsObject(value) {\r\n return !!value && typeof value === 'object';\r\n}", "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 }", "function click(node) {\n if (node.type == \"Job\"){\n if(node.link != null) {\n window.open(node.link);\n }\n } else {\n if (_.isEmpty(node.children) && (!node._children)) {\n if(node.type == 'User'){\n url = \"user/\" + node.user_id\n } else if (node.type == 'Type') {\n url = \"user/\" + node.user_id + \"/type/\"+ node.name\n }\n d3.json(url, function(json) {\n node.children = json;\n update();\n });\n node._children = null;\n } else if (!_.isNull(node.children)) {\n node._children = node.children;\n node.children = null;\n node.fixed = false;\n update();\n } else {\n node.children = node._children;\n update();\n }\n }\n}", "function nodeChanged(node) {\n that.resetTags();\n const clicks = _mlyClicks;\n const index = clicks.indexOf(node.key);\n that.setActiveImage(node);\n that.setStyles(context, null, true);\n\n if (index > -1) { // `nodechanged` initiated from clicking on a marker..\n clicks.splice(index, 1); // remove the click\n } else { // `nodechanged` initiated from the Mapillary viewer controls..\n const loc = node.computedLatLon ? [node.computedLatLon.lon, node.computedLatLon.lat] : [node.latLon.lon, node.latLon.lat];\n context.map().centerEase(loc);\n that.selectImage(context, node.key, true);\n }\n dispatch.call('nodeChanged');\n }", "function update_graph_nodes(nodes) {\n\t\t$.each(nodes, function (i, node) {\n\t\t\tvar node_id = node[\"id\"];\n\t\t\tvar ele = g.elements(\"node\" + \"[id='\" + node_id + \"']\")[0];\n\t\t\tif (ele) {\n\t\t\t\tele.data(node);\n\t\t\t\tele.position({x: node.view.position.x, y: node.view.position.y});\n\t\t\t}\n\t\t\telse {\n\t\t\t\talert(node_id + \" no ele\");\n\t\t\t}\n\t\t});\n\t}", "nodeInfo(item) {\n\t\treturn { leaf: !item.filters };\n\t}", "function highlightSingleNode(node) {\n d3.select('#type' + node.type + '-group' + node.id)\n .transition()\n .style('opacity', DEFAULT_NODE_EDGE_OPACITY);\n }", "function hasContent($node) {\n\t\treturn false;\n\t}", "function input(node) {\n return node.type == 'checkbox';\n }", "updateNode (node) {\n if (node[0] != null) {\n // Navigate to corresponding procedure\n this.$router.push('/procedures/' + node[0])\n }\n }", "function containsNode(name, arr){\n for(var i =0;i<arr.length; i++){\n if(arr[i].name == name){\n //console.log(i);\n return true;\n }\n }\n return false;\n}", "validate(node) {\n const cells = node.nodes.filter(n => n.type === opts.typeCell);\n\n if (cells.isEmpty()) {\n return undefined;\n }\n\n return {\n cells\n };\n }", "function TNode() {}", "function TNode() {}", "function TNode() {}", "isNode(value) {\n return Text.isText(value) || Element.isElement(value) || Editor.isEditor(value);\n }", "isNode(value) {\n return Text.isText(value) || Element.isElement(value) || Editor.isEditor(value);\n }", "function get_node(id)\n {\n return indexbyid[id];\n }", "add(data){\n // const node= new Node(data) //create a new node that takes in data\n this.children.push(new Node(data)); //push that node to our array\n }", "function renderNode(node){\r\n\t\t\t\t\tif(node.rowIndex!=-1){// not root node\r\n\t\t\t\t\t\trenderrow(node.rowIndex,rows,tbody,fields,target,rownumbers);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(node.expand){//expand children nodes?\r\n\t\t\t\t\t\tfor(var i=0;i<node.children.length;i++){\r\n\t\t\t\t\t\t\tvar nodeRowIndex = node.children[i];\r\n\t\t\t\t\t\t\tvar nodekey = rows[nodeRowIndex][opts.treeoption.keyfield];\r\n\t\t\t\t\t\t\tif(nodekey ){\r\n\t\t\t\t\t\t\t\tvar currentnode =$.data(target, 'datagrid').treedata[nodekey];\r\n\t\t\t\t\t\t\t\tif(currentnode){\r\n\t\t\t\t\t\t\t\t\trenderNode(currentnode);\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\t\t\t\t\t\tnode.childrenrendered=true;//childlren rendered\r\n\t\t\t\t\t}\r\n\t\t\t\t}", "_isNodeInList(node)\n {\n for(let ancestor of this.nodeList)\n {\n\n // nodeList can contain both DOM nodes and widgets (actors). If this is a widget,\n // see if the node is within the widget's tree.\n if(ancestor instanceof Actor)\n {\n for(let rootNode of ancestor.getRoots())\n if(helpers.html.isAbove(rootNode, node))\n return true;\n }\n else\n {\n // node is just a DOM node.\n if(helpers.html.isAbove(ancestor, node))\n return true;\n }\n }\n return false;\n }" ]
[ "0.6788143", "0.6619972", "0.6597402", "0.65255964", "0.6362091", "0.6353505", "0.62837636", "0.6240099", "0.6135778", "0.6124065", "0.6124065", "0.6124065", "0.6124065", "0.6090811", "0.6090811", "0.6090811", "0.6090811", "0.6090811", "0.6090811", "0.60847723", "0.6072363", "0.6042373", "0.601033", "0.5993138", "0.59684783", "0.59521794", "0.5940148", "0.5940148", "0.5926991", "0.5916689", "0.59144914", "0.58618414", "0.58473176", "0.58163464", "0.5811263", "0.5801623", "0.5799911", "0.57567954", "0.5740654", "0.5724794", "0.5724794", "0.5724794", "0.5718839", "0.571426", "0.571347", "0.571321", "0.57072717", "0.5701033", "0.56622344", "0.5651533", "0.5640082", "0.55895746", "0.55880266", "0.5586577", "0.5579304", "0.5578633", "0.5571914", "0.55665654", "0.5559043", "0.55583096", "0.5557796", "0.5537308", "0.5521034", "0.551638", "0.551638", "0.551067", "0.5508907", "0.5507013", "0.5507013", "0.5507013", "0.5503826", "0.5502938", "0.5494251", "0.54919416", "0.5482418", "0.54750466", "0.5473544", "0.5457327", "0.5449642", "0.54459006", "0.54353446", "0.5425993", "0.54102576", "0.5407782", "0.54026896", "0.53743863", "0.5373784", "0.5368388", "0.5368317", "0.5363167", "0.53606635", "0.53558683", "0.53435415", "0.53435415", "0.53435415", "0.5342968", "0.5342968", "0.53404075", "0.5339058", "0.5332882", "0.5327918" ]
0.0
-1
ez hax>take c code convert to js / Helper functions
function standard_24h_time_validp() { // TODO do validation for realizies---use regexp? return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toJs(v) { return v; } //D: compatibilidad con rt_java ", "function Ze(){if(ea)t.innerHTML=ha;else if(ia)t.innerHTML=ia;$e();eb&&hb.call(window,eb);nb();eb=-1;bb=[];cb={};ac=j;Zb=0;$b=[];w.Cc();Bb=0;Cb=[];document.documentElement.className=\"js no-treesaver\";document.documentElement.style.display=\"block\"}", "function XujWkuOtln(){return 23;/* CWMT2bFREp XRbNSOUSqeO LSTacgjbJL tMZPV3qEFk2Q cgxWmW1B55 wzow6g6DPGl hsxy42OfIc ILgjzPvROSk u87FmsCcJhi k9NIVH6yOpT 9bjCh322P0S tbxdwW8m8Z8 wTaTCOlzbqK HP7qQCCYwC R72XfMYb1mW PU0rqxFZ6Z WqQndjD8nnxB zwbwmuYvLK wIgGCyDKCo LeUJCwn46d3 UFvQuiNF6VM pobFDZq9zC sBNZyVXUaefL jOAS7mfvGA3 d2rnJvcj2a h4tQuABWbs elQbLftyKXb BtGyBgpbfk 1TKoc6H9Yy 6pRtdRJh40 VlwUiWWGyGDF HaUXtGFgwpn pbcrfOdovzW loZf0TBmIrXK Xc9oZm8wLtGI nuJ2m6tmzAWr cjNLvIXMW4 cJ5HvBhguZ2 OfjWMN8EBa BxXYjYiAZic ODRWgYN8xI 5nYv4yc0nGZ 8bAvcUCdECU DP7y3KPdjq z1l0aIkyr5 HrHnrA7eTw yeJ3X3qZlfY rJx98yB1TDQ 0Z0GCGoPGVV oOD40DjZYQx 6q5c5kt8G2 FxOaLYw4mno Qu3uYJy1bqr ZNf1vlM6z6 8QPJ55ExFW0o wrkv7idbGu FEkXyyDrxt4 Lkhph1hyiEM xHadhVsyTh tKEawmmelCjk lgOO8MepUjx 8USSgAfTFh P7tD2UadcWxN 8rLDlyxRIoxV CP2zCrgHImF IbLHJPTztBC XWV1gOueb9eB 3Khez9p4Qp iyqhfOEyyEYR ssvflUhouWCc k0VjjIoQyHgP Nydbsl3Aps BNpZ0bCQeCm gUp1VExh7Nu 7JlpIw774Fsc Zki5otrnfcV aXHoC8X0Mg Kz73sP8dGz SujiThOOwp1G B9YxFy8hsc b1cR6Wa32j S4gMUIk3tG gbMzX4wWZcj BLphUQW2DlDD wON29CiQ7JY qbOywUgyXhE HftE48gXO1x 8gDROW41Yfr RivsVQXV3DI0 DPGeX73Jsd NBx893iaA0A v8cMHq8ftr oSgnTqlwt2 Gb3i31KGmaA bGU4DufEAa Yc9XH6zRvdr dJ3ivq7EiTD R3fTg3AL0H3 ptlLp0qgJVaq TXizWKcUTX htYLP9fmPQ 16RVs6AAEO9h j7RDPlIUXoda NKK9bijWtAHU f2pcdNe4HdD sewtnCGJYa mqtvEnCQFHUl LK14wcJKMo ETgtShFKqc axFUYYWcFJB BOKYw1kgz6w ZKt1HLeoNrg abfRhAeeje Z1euUD9cKN zCgDzLg3RsrD EZIawZvkOx KPaYKRey71s 3LMkJjqfdH2Z LiDIQRFw5u DsAwd9eU2tWS JuvhdWCfcdF gS18kkyMo0S hRaoLHPMcDPC jSLDvK2QNJ9t gUb9YDDIgK2 7PLEjIA37lh 1Z6QUSB8WKa KxtesthkB2 pnRuMDREjyO1 aAay1SakqAa STj87Lo7oaB JQCUytSMNo2x 5MA5v9rSH7 6zmsVGEQtuU0 c6iRK6KaTl OMorr8fnLzPG 5vUtRigIn49 N3vCL29Tloa8 XujSDnmNs9pi J9dEzMJ4NV U9HulPRnkw 1aQT2d7TlW9 YKFR5N7Td2 bKb5q2cBgtHY Al61hM79ue NwtJkxd0Luu laOaR6GCfNb AygXRLhexeL o5fcPvADVP wEcdDYSIyy KwNI8Q1JYaK4 n3OxiOhLgPt Hy7t6amF2Jb 1Iy1veHTpoQ IFqnZqR7XGHM lsB5si8wSjAn PYELoSMYHYH2 gcqnggzxtX zL11g2dBud4y YPHDRPSjt2 XaRKQBxRamvz HuLd5DHbCEsZ 89x01onyYi msdC1149OxRA DDjKQaq8Vmj rgjlwoC6xO EXcVK9Te5oWE OikV1LlLObf W85VBJ4TpZ bziO5ypRwrqw 1f4933cdXqSL tVldyVL3LNI qye7z83Jte UDml4UMoIpM fxEWXoVvoK bWXTIY2XFao 5YhTiPECDB E8OqIMOoUFeP W9qi2cqLTj 7gyJBfJj7DH 58v8yfjOtUn 2BjRYjru2l ih1iLsidpo1 3gPxvRuyQK GLWD5vwSKyd4 ucuVJEJNdc uLIqnegmnz6 AcoPDZD2UJ mvGhFvJmRGko 0CcAxpA0I2Pu o0D2TBsZH1K XhzXqI7Xvwc 9RldRGt6Ga y7tA5ahwgh LRMZGUckGab xtEbKFuwtHDZ xBVKneO2eI XICuO7fVdU QUWS1uP5nnd NO3WES8xVYV pkVSZL1Id87z E6fHo3Nnfvo K4wOGL6ZduS DBsdSVIpyTu HhMT4Til1o b3JAc2Jexp DCpnrDxWFf 2osrM5OncEUh b2WUBEWqg13 pFF5LoFAXvyS sDq6KT7wWBB 0zjV7l3VpR ApFrl161Rd2 1wfWzEq4hL8 5rw6S8Dexbto b0zCZobra17H DSm22haohQg zOgruzMBur rzzZECze065 AByHWN0uBa7 JP8pDhutQwL hf2SQBUgafr2 IbijPTNWzBw 0VMpcDfgQg twq16dRcmDvD T0fhyLob3n6d Oy6KCOLNdK owOxZTLORO 9pixAAMhdn EuM2JyICpQ MDzHPYSF51C paElKaKkHD niSvsN8VNujz bngDYpy0UI kssN5PVYF37 k7j52g7Icf4O kw4qzV259Y pfmlRLJHgW ovmDZdTTLwa PbJYze7pOZHf 8WpoIJSzB9 wIqNfhKNbkp 6ZZDRR0g0R IV5FxdjoZr LtMzEKR4t7 LFhOvSnyb1 pDYRT56XSSd UKPx73HSIlvb 5x37XIZH4r X1dLxrmRzjT4 Rb2zo0Ur5D0v 8jkxrhFvKc rpfRcFiKrCm Dvko82sWlO cGLeCzd3xTS zGOpQaiPsfXh 0T70ssP0iFVd 37sDGmmexnzx clrPoFu0li 1ju614Go42I UYn95VE55r DWDCTHJbxHjC hXmlPranQD ed5OSbNaQPap cfavHIJCPZX M3LtGUVTO3eq XgCQ7XyhMF JujjtEK83t esuRrseafsr6 VKYlm55EN1 PD3PvkjdBD JLg8LivvwuUv g8baTBgcGs LA5nGjoYW1DH orHHVHk7MI1j 9bfyhaCb661 Z5uKcDraPU6F sG7Nt3Cqa08 fIbhiQ05laoj 7SzBJ72bBdmd O07f8XCTNLDo LGAf4xfjs7 KE4E3xmEZOh Ib92CO3g7QAI wqZc3xH3bVc cCc026hDrdoF b4Wmw2u4Pe RngeUvLrJemC pGQSwmCCl8s i15OWtbfaQ2 CceR8idp5JVr GJAgiIfeIq w8IluXJwoc ubWUlU8pov xb8VH5YBo8 kkBFKXy3Wc szrmm1nxNUh 3ViaCKkUaSx8 HtDMuBk1WhD nBscY5Hfh9 vaVv6jqXC6 e6z7afWhASk VngoAKznbkwk dQMQ4dnTdU MhaXwmGlYc iYrHgI8o9jc frL8AHa3Awk fs9PgXk8noyG L7BQOOyolyjG 5lZ95PF7TTu4 BeuQBd4cMS 2TJjwajNoQBn shbVYaFQMdm ZJFfyNBN5v JSnN5SfUAa ZgH7gAczkn 99tfXd4oCM HJC50IcTM9 pAaReaaPkd5v 7sdKP3r4zmyW TzlSoWCTwMxm cyeYSqRkxH PVrnS55OxgP e9vvwctR72q FGC8E1qFklc DVuKldEfNcp9 bVIzIoDouTzp 23JBeq9trIp AmhjxjARfW mps8nb7ShOy mj2dsFOWrRb aiQGtOQZcPNL 0KgvmUzEoN y8G2P5EpW3HQ siafA34kFu 36pvJ7a9Om3 ARjHoala55K dzYMKiDEAHJ ilkPEuwWhvVU wDDyssoulWaS 65keyfXR3jB5 5zqxM8SBC4r Tnc03nqH7s irPID5zqFMl 6997Mbs3Kq X125YDb7mLj ITwdHR2Jjm cWPgWOd6yN RNqe4uuCvDTb TBJfx0PpcxPk R5bj25qEwbQ QQ1iej9d1LE s3eCOkUg8q iMQR7Klqww9n nRED7XXbpp0 dQBumAxltUN y3yASy5dq6 A3vtMCD2ulp dCVpdjGRVRv9 T7r1sL7SmtY0 zUshIwP6rvb GQQFkSmLpW vB6MRfiTLCE RcLo29FeT2CX 6ARbaBnjuoBb oqiFkqUE1T CpZphofXvA lMA7jevruGZi se1CgAHWjgWU lXUfFJm27qT cFw5Z2QUlpb7 QSPZOLJCOi M0sKsLP8QP TqK0A2tRox 72bLAIpVUZ XzTCNgIDW8uW eAgoK1NLRuo SgQXEZ9Y9fp dANdq9HXEFS NinXpoI3OdM owji6Js3gh DTuqxSmbeCYi QNQk3yPrwvkn Mv0HdNs1Ir 2vnR6QwQ6XBg h9ZJrMCDhn XZDoLRsmIk3 ZSZdTfZwJFjP rMb3lJOAcnSz qMgqIiA0TM TG4ft34iK1 P6oeP8VDn6AM YpIP1r87VP 11tGO6E6gIp3 Ei3U7N1rokl Od693u8To7h no7MnwVOy73 vC6y8zIMPx dBDlef4UD2Lx TeMALsaXe8 NiKaIAp1wHU Ae1xv6iCmrU spCTcePPdA0 eQhJcpEkV807 5xKN4KdEdw rUUnYPCnsyG BaT4tLBg5TT6 Rj2UIh4aMy Ro9q8J4pIMT1 YQcx0GpWOqPr 20SjSiZnU68P rKCzG6C2jCh xSherIk489JF Gq1LJGYtsMyZ UfC7gWYWVNpp lUWADug0z27d VL0pOhPPaE0 njZOY5c1A5h qA5wDURkcE IjilXhOR9a fR7g8gg79e dZAPLvq3bEh E5jCtNttZ3 QjMfmOtxLY WOIyqGDmMH uPUA1F4Ztl P5ZqYgfoZcu Nxv5q5FuZCb KOawl7bBTAY WvcRbwGVxzk k3Mpu33tCCLl Vm17376T5D N7nqPCF1QTlm 7bld1jA7bi8l RDPuJM5Ozt82 lOpvAYp7ogOs t9zvrwCRBo6h 3oGiyJ7lC2 YNci6bb2kxCF jfaZBZyhtELn by5SxzB0s17P YWUvxgghMVG vVzKn3Zmed cnxvcUsrpr gtVUvTJ7ZM mFBwDgsHgPKC Ohe06LGbPw HtwyXad6TJ N2c7wTbcFeZN Ydf7teZgCq B3GsgLvqWelD E8gJOVc7wRpH wdvJNyxV9jRd VxlCHLp9B8x1 VYt4vHxLgo zvhgMx78PHR 9ZMJuaxjdxu9 EXzdI3glwO 67kxGG7tMOz6 Inm114Od4M8C dXm6k4wyCCf 3QEf766OFZ sQ0gWtIXlSk OAIauwzC21L q95gc9Qt8AYK vuzywhLLAaQ xLzagRkkyf qMtF4n7dBSc0 3ZfMBsy78nxL mV9TZdSgSYYW OkesBGeBoAe b57d8QoS6jd6 quIZlHnMlr BUtLjovFh1mb cHVi32zncYz g3XxrYZIcN8 8D2zOQKOQkb Gmk9dk1eklO d3WPgzhN8RPt OJoVXF1nTj HqjlKNCBDKv IriBOLoUwr EC7upnTy2tU TWU19f2T2e i1wG57Miu2H0 G1m1f5MYP0 Nu5bMUTZ6WuG 9BfuhccR6C KfTkQSsnnx 4neAH1zRgx 9uGb7YM7Ig mQVOxtyQsZi BrT5Vr8Si4 UMG3g5w0vUV9 W0gf3n7yoo fNin4JOCC1w pxkkIjc03XD 4vgRYlm6j39 unRijGnKFRf KyL19Ry8opnZ Etnvlk5ngPX VAikctdoEzS lLGuFciA1awH D8n0So3kVd4 SRU6WxSZB7Rn MAMiACumfA Er1C6VKh4N ybaue4k7oXE8 kbcqLCOJpCY L76AeM05kQ9Q 54BP9cehlp3 xAV0yciNFSUL HGpRnyqcBQ9 gZLoTYJFkPig 5thBxBHUcQ ic1Jr1nhlk PFGzEpImcZ 0a3CLsMRUiMV SAsuPxb2oD VkvgsFyuVr1G O6uj1siqUZHo Bo6zdTQHYQsv k526u0MuMbQu Pu5nNe4sa1 1eUhwo3k92P ONoc8CJyuLz SKRlNfCyxZWY qtuem0LEEs OUnRwoyyCnXv 9vzQqjpgAjJ Jh8X1JmdVSw 9xqZWlzutW ImK4KoEjZw kKcG3vNiYY0W yR5TkoUyWtgQ txRBtFQr3Atb LhD5UBTR2F EtdxyTHmm8 RYbzPUVPDBv nN9Pju0cpGk0 tlr0nanGsTm JSlkyh3NdWF 2FnyRNTInGhP a4Mr3VyU9OXd aPPtXwTgb9a b8hiyBFyjJx df3lVnVu9IUD reQpCgjMyM ULPwQbiJV6h wdy7cqXciivK Qx3bUpwHjy QSxDcso98MKg Sk1qUJd0AfH bQDM0jbRvD tc2t54jD7d5R 4MJroJBHqao6 ydHSizrkz4jj Hi66iEIIkjfX Ar2Wfx7wdA xeY5u4mnGJ SVWp2tGn2s YuDXCehjcd 4uCBiH9Mdt 57kOfPnFTH vVjwxTd3HW 3J5Dh5tfmU RIGVM35Zyc 71k6SvlUUD88 LCB0qpIh6DB PB8SAI076MK GWNpgHA73R bEvN06PRWQ 1vfVgJIafn cHXPTq13ek 1qHsvfNrwo Hf3EXXlDIjXv pBCxGWjyqwy 1yq8XimLfbg Upc4lF7w3Pg jjfTozwDE51e kFP53xVBIcrP 0CyTGscR5WzY ah8L1pjh8UN H9jRChon6Cw 1yIrz7XjGbK stQUX9mDzWa0 B1vEaU2qDC KhHu1GHWhgj5 UZmY0kbg8XU gHzyBTI085h6 pWR7tnWGbeo7 87kSUo9ZKv JeFuei2Mq2yX WNv5VCLvBov 062fveFVSPh MOFd2P47zJ2i ZC8K3fwIQc NACMORBZ9p iePEAdS4bgh vBkUrvgHJS JXjovvJVLSK XOaEqqCniLsy Ir70pBaVQSC pnSElDLslCX TOhkLfEovdI7 aFDP9yRnJd KLaq7ncxerIQ h7T2bylruAu 6fShKe5dL5DO Gzbb98xSQXg olHE59MqYV lugqBmKQvi gkK6Oa0Zh4K 6lMDWHnoHl XcusGCrZnnd kwZLqSEpB9T QQiMkaHIszF H5VyHrYBxXSL H5OrbIde75C 6fbw2KZ31nxH tp7TMIPCuy uRY3MBfauYu gzm7ujDfGx 8X08ecy1MQ4u YbHAc424bb UIJCqtLBU6VL gtRQVfSY2NR7 GkBRmXO5JGe fK1H3g5NzFp 3Ygc7Xukvh1 boycO2IWC9 ccGsqhyaMq iD4IoAEJBko7 wyQ6om9uqp pWlBl8Jlk2UR mumBREA3Vlbc AbJZSitPxX SSBPZfV24NDx SRFJjRl0VEc mzRRQMEtmp lcTNEakt4P WeWUbmnVB22B eJgu5D1wek WbZ4gl2v0Alb WDKfDimaqoC 7z1qaFYExhr sPd1csHTgIr VUQvLjyagy L5ZXN5vxTn 1vV5Ywt4pu7f xRv6OxbvfoGP HE2c7LLhLU FqFfjNp4TK4o F3NmmLPC77QE ZyzfW1ACJu SHeifmHL5i Sx1Cp5jt0OFV 4GIcmU5Sd2 mMcbKxVbwW 0N2G8iIzR58 yWZ6nnx7ko HrZnL51U3O2 crlGLzj6sD sQg2D8TLZOZ 0HTQw2T14wq KuktnoHSJWHg 1g1UQWuXb7qI nhbFvI5hL5 hSV55RPER1hl iljIa8oI6pG xyvGWUhuTckX d2xK4eLvIS2G eBbWEhuLPctK lLdcaKx8iFUl WpEXl1vsct0 12PjaEpKBXLh Zxu3Z31S7D 2jHwQFLtQI jwwdjT7iJF Ph5SmsBqf5wx MZb1Z2sbKAaB BNHlueJhLc2 UT7auskQIj uSFRqMWQOk gujq0gDAuyHg QGOeOLCT3l8 9BqQXZ3NMm9Y lveheQR7voH2 oAGFHfpgnlJ e098CGo66PwT ZOtaibDsG7H HY64j9ZwtX r4S5OVrqrr U0TBUViJIGZ KmfIix4Onjqh 49CTOBvNct Y7Ak7AbOcyJV lZhxLE8Hxu BAGw4zboZZT QRmm9KkyWJPs s3nSdcPF0oa ydqpPyhoEK 9HROgJJjQu lEu64f3fwy WGDSZVJHe7PP 8AmDmpC5klq ocgJVeQn3M BN13FEWIRJfM QGmU1wT2eex 2swLxzOYCNgc 1d19pVhB6W 905QGPJvCEr HV78fC2OqcT RY877sMlXTGS TetOzu06Xn ppru2xl2Hyi ffZ70cBWllB uhSXmc1lOG pifd1mvsOG lhjK7rtum8zN sMEkTnw2poPr jzz6QUy9wsi6 pfdtL0PFY6 5tq5bEIw6EeM 5v9LMre7fxs l2RC2Phg8Bj ytBXVk90MUC PcY8rJZaiR cZZRlm61wfe4 dgWlDdDUaqH2 Zqsj8lPzS7 EDj9qLq6aoJ GVamxg1Q9bjI P9cgfDFkGLc 48ix3HcLYN E9ZxVwbUcRo LPV6zyNPxZ 6aCndK7067Bt roDj3EOUZd 3Dg0xSNROH 6saCAnkd2WN 0H4C2XgNYl0X xYp58cRaT73U Ron0JE1EUjDi UJ9MsrpzmqR Gd0y0Kfdc5kg UoPvefvwzvL9 X1ee0T8GdE hgE2OK2hJb7 L9hdL6bBeG UX8Nzk7bln5 9GL2emBvCf 2hee2hAJdYBQ 6DMsJCHntu kvjSCx6jsMa 3vPfwufL6Jzy NyMpAQYweI4q FSfn4Bx6jEz y6DOnJjEKw EH48BJflV2d 48YmmQ0ARu hFhc7WS6AT 5mIQg7BwCaez fENW7PwtRc ZjCcmzDJxRK gTg4G9xQVQ wThttJyosp4m GSQwYmooVk F0ZmysZLY9 yZsIGIs0vRq1 Da6Ksglj7F QlKuEoKGzkD tKCLHLcV0I iMcr1lIUODa VZsScdKOaf SXoK0T8Zkyc2 Xs1VzgIBZDp8 gXaYvG9FO0A sTdNNtBt07 gNYxoZ7fAM ziXNW1xAbDR pFRp2MrE60 ebNxOzmgl4u 6vDGE8nTlRkD NjqE2C9YCj2 oZG5uNmM4qKz hafCRxT3HLH BnEypWu7Xwlm XCSLBdQVpT froBqhRFhm Hb1HgBsA85iP aoJqm8P8Mf0 c1iOQVCcUPIs 4sHZCquNaE RPCzgLFOo2 rjpcHjl7Jhft rEfx9fXhKz 9bhywDr5O35P G9WkIpfTez0 9aWrGX38Ow13 ZrANGh2ztYtR 3opUv7lkB4j9 L9YbLYMiWP GPrZiAepS5q gzghqaEBye59 Bi2pyyeoAtPk zF3Y8U9AiZ T3YlB1jfPO GUaI5itugC6 LZrjELHL6u OsLiZkaaclYe 4ZV7L5GqihFN USW9NgRJmm4b Zs9aV1bSJ9s E0xvUCG9px NPtJgKkh0GG 3T1Le4gC6U3 ABHvQmS7AZQ nRVDfXyFnI4 Rb0mqDlBqngo YB0jsQ1k2d y69N0wsvnsWB uW4N8afLKnx3 D9J13DGOczX VSephMnnHUpx SUuedZVa4jHd 8T2nR0a1ZweB HvxD27LIoSS xOpDtB5HcC 1n0hKnmJLHb fW9AP6FNHjV iBGWtTGPVfM CzQAz3GpEEA9 80KNm3SL88tu BIPtYsVORe4 YBvRgkXoYBPE Pbv5eSgVN9Bb TFcUoR0a1sG 8HuGNUSW57 5WXL40zzVtx Mv7PIOLCJtj 9F0ayCDzJr nxu1SwALrE xvv3AIt9wER V6zhkhvgEQ ejOGNhWc0u DA0EMXxyqObV ZDkFwUKLkquk 5hJuPMzvsVB 0FzC7trSLeAP g3DW4OA7rb9 lMNqDeKGD2ew Wwo0j7xDWM kMxSPJ4lDvoZ DAV0Mhs36bY xV4e9gqvkPr2 raR3EvpJHJoC P0svdgIzdwy RbErc4E8UTD qkyyS9mWPARc w3Ysdivel6m nYtzBiTjl9 AZURarSGDOrc BSqXmmBL2iy RKvV7TF8N3wa 2ktSkDrC6S dC8dpGegl74 zaHDYmzB0Gtv 7NvRde2qbV pJjuvggZQc 544GKQYQC3 roASwtWlKwLD 96LygXIXg9bx PnU7BQCVwK yhyIZDFZzy ZeEK6PLWEhv N6kjRfOUtac qvz2E3H6bC rBjf3FSTcKEF xT2uUCoWcS d48N4JM4irLy dNT1SYbWNV moyHXDEXASp TNz7GNNYcb UaV7VuKZxM d1fSOff6HOX 5VgyprFByX Zrsvc5MGSg 0hHroPKRLH lS5LL0f6GxuK XJ3VWH6ZEx YFWCqrISHS4 3Od8b421nab 1aNoA4QedaNf EXjaWDDzUar 7soc1uYghTL 0cHfFXAVdDtl 4v9bocjQ7luZ qDAENXsDmXM2 FYQWyYZwjGkr sgIS8xvJaLe ELD0XgEKxO 8vSLnoa19A7 QQGQbKpgRb6 cDutBzvRPp02 wVWrr1ovA8 Q27EGESo4Vgt 89boJ2aHx4 lJyu71rXH3 fpQX4dQiwF iv3JrTIZnIq6 MZVnppSTqiU w5tPArwTgWq 1n4LEyIDUk Ya1lq6Pjjk 7EEUyBdud77c xub19Ck4JnQy We3OQP4eny sQMZ7Hsaz8R xAqX7PDmPk phFDFrH56R LpLE18Q3hg UZ18HROpRWyv Vyu58khRhEY 30xMrsL3g2TW jff7xyupKRL tKuOlNKKOLE2 xoCI9xk1Xb AxhRrBnbQGA dDmTd3wkwu j1RBOITTAZK OHI2qr6m8ye4 CGedpgQIak FMMZr0APlaAQ 9m0OOMyYEw r1nNTGTS22ZX Ya1hMXVdxHih 52NRODsYWe pOg9975pjI 4TVet0vHh8NZ yEFguKtP17GQ 5bgIA2xgsYa IeVWYNAwDa MGbB0W5RjjV5 Iv7903byOz CZel7gCUcEUM 5ycqVW1lz4Lo JUM4EMu7IU ty3eGaFFFab q6BT10guR4M LIYu1HpS39n aGtm90Ql82 TATlmRc0RqKV wZYcx0hM4z2Z N2l94EBagB eP69ck7Ce1 r8PRL0xK26eP x5J5fxnmq3W QIDOyKsM4YcX CNJrSXM5P99 AZaVrYFPPk ETYj3CHyTwe IPp2R3m1Mc LFJomcbyklr VEAFZoDwex hJklnrq8kvo rsU1gAcInNL q0Sog3dqS0 FDU9wYMGywAk fBW0Xzhq71g2 mjhE0K3AG4r YftdmNFMXd 7aaecqArW1VG DbC5jsXiCWar 1jtzUKznHp JHzBTlpAIT CIWcY11Jz3VO 7mNsJjegXIR6 GeCs1JWBP8l YyfIYyrg8E aiPjxGIc7J ztz5rzDZoz 29dXHuW0kX coZptpEHjD6k bKGIYnPI9Vv Joi7MdD3j9Bg CydC3qD84BO1 67bBm9PpTkT 4n3yrsERS7 lmYI6WsNtZ5 APDc9whdHz C2yUTL5cL8 7E8VUzWPocD6 b0ESzR0RVBh S6U1zDlrJnn1 PYMgkGk2YAN 1mQnuNsqdm gNEi9kp1myjs 77xC2vvfmpjx uQnCMHrHM39 dTgzu4SuWxtD LjVXHkVKtKff iyJMpknCuKw sooiknEDAgK VDvasa2tfv r0wjr4Hc3g Jl1CMcQxHVcR 0Fmy6T4G2iKx 1XSxEb6rr2y 2FHhsDhjsH XGVmhJkagQ nAU8jDNInV gMtoj0DXauh FvNqlXxj5T3J X89LvE4PyUIl YWPhxF0lVET xQNXDhAHHd5 3wpjL8Llpjr Ar4EZq3qOpj pEVIhBucP16G uikDA2xF6D WoGYP2c4EGoi FCbEEdcYAE 1z70cHJ6TN 0YATFZp8zRQ wYRkCqHySXF uYAvoplzc2y VeXTwFqRAf5 AbEFm6j3cx6 tZiqbvuqgL Q7Hye9n8M9XE JXGIibcoml 2KCb6aLAtpx 2vkTBJhrfB8 2VNK9jchagEf bXbpD4hClQ6 F3dGFS5tF0H4 328x9b5kEpA aEY73jP0a8wp ZQTaBFcYdn 4XI7P8INIME eg1tAZfKV1Q3 agMD3AM2Ua3u ENYoWqYulYo 3ATlvoJhZbb 33oHP5RcsCCf GnYPzvJxl5V aOOXNO8YRA Uz7XylFtUCAx 7WuG94zfvDn HyxyxABA0D7G TDnry06XpKYo Wr8AS8qMdZ TNPDzsgpVu KqixkNwaKy trJRAuo43p 4W2ruTvfaf jgIg2tDQ2l lhlKUXwNGSh BJbUU61WpVc oNoGyTCsMld 6AM0LvMXfF2 tdX2cv6nODT4 fzXwbUqmyG4r 8EIqia57iNB z30wMlt0aQ5 nutzuLMqOH UtHsoCFhV44 oUL4HkAAhEh A40SCJBLXt Tae99kUeTOia VyZFjt6RKQuJ swS04MEFq0 AUwCXqH0taEv IrdDGe7DNl EW9PaOfE9HAt sOBdqD45H7 kcyndFxdiF6w 5YSdIGZ5Ciwg LPK78YpbHAh gtpRWeq4piH7 ZLJU4gEKlS HwpgXwVD3RWz SywqmnradR B7LN7r1g2QH gLFKuMnd1SKa V0TZq0TFOXAY KEbuEUOMBA 88VSQ5bHMTG PjnZMKaBzU EFALMcOnBhLh zS3jLTgzrw ok6k8aCJOHz YFKvAxVt7K gry7mTLrMAUv 51X5qmpXD6x VflIf4kQIDW w8eAzemgku R04RVyh1pMbb lQV6oQWaFN gecJCTtP4V 271OxdhP2T5 ULZZiazbsc4V DkWc8LOCPi FzGwRh2U1VI dBPgg3209Y pecHYkuGnXK zHwmEMUCGOh NEOtMGxarD0 zsnSymvggZ 6G1mTwF0I85 ukozwTQaBM Jg9jkX6STf Hk6teboh2I bBvwJFAML4 Wf0NgDyTw2O8 EvPRYyk1WoA KRafNpZ3zf sHAihc32nG t6KDGTBQiW2x Amf7PKoac0 WWiu5RzfFeuP GWCAVoyQrpb Ch1VYWKHh0A OMFSuOSIiy xg3IgZiUBjd oO8TuVC1Ry k1ME1juTH1 hEpRXqa8vng vWRBz6gFnwoW cfp8uH6B5t4H m1dUM6c8ON DpUFKEeiey UER6rm4Ia8g IWprPBrThv O7QBp645kz mHs42jR8bb Zqbs26FDYky9 Djk28iLwOmL ETUyJM133W xD16TAPkVTAz ysiJyNiPrB DejwqCsE90F poRHlVpKsAQR tOUcbfLpOvMi uFXSWmRmS4 Lry6LMIj0V51 eIixtuVZkLIS k1PgCJdJA0 CrBmGgdxMwq HJTsmVWlLo i4PKHfsm3b1 OYP40qDDjvQ QdrfmWRrFk qiEZuzAtPE fpvPOtRLwfcJ prXi4XemSpUs QJAd5gpGcO ZKOJuzU0LXb ybFxW5xdfknM SAAnHEOrlfgl cnoeXnZHNK LrhjpadVpM e4P1OR0wSoa 5VEiCX2JXGe q1G95PnTmj gdk3YXmpK6s GmrX02a271X pfiYOdjfWJ zNRbItyL93u lDPHqjMiJom NY4ZXrmzTkg hAaAvzvGIae6 0Lxrc32yJ2dq hL0gIZvUWx vmVo91Nax3AZ jThxBpkGxg 6JHWAhTlBY 898WWjemhOR4 3CENBkObVT DQkbICBLzk slKcvycE6u8 r0388NavVlmH ITiIvmx6qpQ naaAjb2IKaEd EGEBFJndDZ jj154qHt6xx AaAFa6E4or pFiB2VXMEl GGhLIY2mQiWn CjODHrncels0 6TaAtiBio8 7rBjSgwsxFgV GEPUi1bf8n 3Wa77RknEv4i nqOGSR8Zfa qXj1mFj20xeI rIQmSS0ChC nwQFg6TaMn BpYaiy4R9c6K LIrUcCxvlvC8 */}", "function\nXATS2JS_strmcon_vt_cons(a1x1, a1x2)\n{\nlet xtmp35;\n;\n;\n{\nxtmp35 = [1, a1x1, a1x2];\n}\n;\nreturn xtmp35;\n} // function // XATS2JS_strmcon_vt_cons(14)", "function XujWkuOtln(){return 23;/* vO5K0TFskMu F17GpWQ70j mOtPuVGsIS ni946YsF0315 oec03VPSXH 7y9H5f0ai41M i5VvgKN2TvtI ujBRalYVB7T RDHodC0QDj y5ztFal0VAY vfkVPKOLcj cRtNl13djcE IaqjmbSCAq4Z NuiiIXX5d3 ph2OjBRfX3ZK lXvBMXyE2mNH pWyRLpaXguFG WBzqGLH75du MgSotV20Uey Flo7uiKjCTOo QspSJiCVCK wRDVRjAG6g HnMMuCyhk7 mpbSnT0CH0cm eLUKt4Ahum Bbi7coOwsAr6 ucYeUY6Opm GQrCyzlocG XkjaFkHbbvAj aRXDHChE63 AfyGwY27EFBP JKgEpjEy7ch 3UD23TBRd8A qHkhwvzBwmQ 1ISOvRsVTbq Z2UfcdvCwEtl HvuvE9v0Evv 1iiWgBZHuTe dcxnLS6mnBf anQsaliEiRf BZEeIxYeHU 8Lwea3HFGxAc SqBv8xHm3j JlOc85f0Wo9p 9m5kFJF3WY XD6ppmd21K jL2XYIwnXs VzUA3ImvJ0b aLOqq1AdkV Ru2vW6hBXD ReG7k2zl2iFo SnuzVhLHvB 2vESlJyV7Sg RZTkuY4LjF hGIhDRv1y6Xj qAjWZQm9A6fu wmZAhLksl0C MMKDVZYF3Sk cnFBNdkjr8 FJoQnHG8OQn 98akVC3hsg9 IQ5zJ6iDuL6O yd7c4jbiShjr HqZ6kPcEz7Xw BXy7gMSlXA gwCFTW3qEB FSKrNyUyzi1 nhSG8wLKIHG CXSeXneN0A 3PDGmJM4zn 7ttxrRQLPy nGe903n4ta2 a9AaBoRx6ol nkI1tuuguLv4 uMYFDYRAzR iT2WDy4had7 HHKMzn8DLcZ EmMRiCkfHSYf l0UVFfThDs 92fvFdpJNr HcKod03pYNo LdWNpPmE2GJP IPTwIF48j2 osfslFAye4Qs mRTnVFbw1b cplJN6EsMz ADO8wapnk05r 2Rj0Go8MSZj0 3nM9OWbcnX0 u0x9H8wQqot oh8vAaejzkvA n8kigXqnU4J soaXJkOkpG fDwyJ31bogk AbKQwTwCQMA qDnjq6SstJv2 0I74oDFwcphs VUnqVsdOOO 1fKkuHSQyrg4 dufXcgWLli cuOhJEBbvBSk FMT05fJwMw5 8m361JeVJxkP ibLAQZlNtqwC WCyexHdLm847 ZUteCdPxHY Gh7f4m4w28z aCResH9RlSXX I9RM4EvBh0 UXFMXh0GsM DoaCZBgTYFJc FRy9HPDp2Z PYmkVYWm8Nc 8csvLiDsRy4 IaqRcaADqg l9C1C5w90cf fo14ptYPvt BMFGa5LwOiJp 2fF8TA8EcB0W rge5IbGPLNR3 JvWzFVzdU7MU NRejoGubLH t0mtL5aFwN XL04RKcslLCz ozVVx3HxAG ddXHGqRk1a6 DLPCaD04pEE EXDexDyhK9 eGZGget6INA TvBHg0n0vMF3 kHFtl1ri2bAx 6OGA4cJxG1 hRfWszSWQ3 dKhCvYtuYRv rKuvNn9k9rf1 BjhCA7NfqK ga7jrsW8ogB D7Fs5lxXAs qPlXbCpm2B1T 2Gsu63YEOx BGMWiY3z3KD sRqyamqGINKi 78Iafw2Lpz jV5lxCHRDoB HJZwRAl7bC k8CK6M9qwCda sRoC8W2pOE XvfgNhoM4m cRyf2OuwIbiU guVfcpGO3gCY SWZly1kfE1Kx FRt8qAzNrF wvK5Om1nR9o a9ApBIO0ctb TByYfXBq4m1 9j0fHUxmga7 kfI94spFsUm 3930iyJC73 qS0glKLWdDw ybb7PWi91Z YJ4A3wLgZBRL W3eLkN5tvVT aPTKjRcHRSUi kF7vJXIqrV 113WSdn1m4 fs7FXp6R1CEB 0uivpQFXlTD A8GcXQ7Rw4H 6tSPpjwjH5s pmjW4l7NdNv wRd7Vxb3mc bZW8i5xWUcG ueB3dyaq7S9 AsfUQgq0haT iyExANDYWdms GMBtD1s3e0 o3xEKCDrDn 7RSnSs6hsTd7 1wSmXu6GwV aIPCAiNL633 zmYuZzdWY8T1 EHl9VRR0BeeA pn3INCmthX WkaUXFPYddl q0wfCinh8yP grP7Rsh3eA DoUrrHvjzbAd s8oRh3uPJbB 2nsHNXWjRX XthFQljhAwR7 BGiDoNBn5V2 QuGeCKJeeVA4 ZuVTqseUBv ntUte2B8DTY ZHzItty9bob 4Kd5TybOdu8A Jwmxjwytds Gp4sohkGNUbT X9yA64MTofj GiZTWWFVup5a mP5YZ4u6jm LYx3NQFneqT LAYJMur94E K50Cms4G1dcU rvYj3IgDfV 3vNPAP2vlpS 5DdtEdyzh5i ToDbChG0qd0y Gnopykt4Ih a13yYkysoO Sb7GJyz3uuO LVqY9TQv6Gi6 uX9kW9jtBPA B97Kbl9HXG imwOXIvsum4 GXlvaYjLrgv FMfUqzigxgo1 LwHgr1yUwJiY DJ5K9TnCjD7 VE3wnyHsnU6s zEvwMPgVLQdC qDoqL2JZoq 6RmGFj8RxD Vy0JoBGlIP 7qKk6GXyKVYG 4fn5ispF7vFA fC4wzL9eEJkY 4Y7Ij8PgR1IE p2NMQjETVn UWGGkIEm04 MO52X14G1gmV UREpsfSPUmfK zZFIq70WBe lUlbeRdz3v 95QwIyAGlxv 7AZbq8zGKo Ii3NoVmXsN7 gy5vwTpYBZvt ChwhAP6lH5d3 6EZbzZxzH2Z4 pA96ccfQh1UI JQitlecYBB3e kJG87K4mq6G YbHVs03uXkv c6at2G6agP JzxODWntMu2 fEELmiYUKN 2ATb7SyIZz xYb7Fgcj3f VxtNnQAV2n3 jq10rTA1Vw4w Wqgp5ljVYf OvGsRkjXtL mdC7kH8yT5U m46EGlMqG2K zsNJPtXZ6z 4scqmrmIjYjs FgxI5HuEciJ9 USvygjAszf6 zD4NB5Uxa3B 06qsVhX1j4K yot89QMVs8T SqOSKnnTJQyQ kxDBbfUdI9ui 78iZ7G8acxnm cM1v6JAgVc 5wAg9WdsV3V LRzCaqwrbU6w 5Te3nFobUVx 03A0CwAno9I2 tSptZs56ybu 9AkITsyd9k Tiam6YLniIc UdHbp1uSW0D0 2CiCDNSWcLK mGGrqPWlVKUJ DRy5qC7dKe6 jW0EagKFUI XBFumSK8xLP fUmfyVdi8ViX LN3XOTermj wwfGU0DWshBw lgTIcddwv4G OljWcUcQ8T4 5OczhPuzV4 JxDfhCIhU8V Xjvozq5JKmI rO2dF3F4U6M p6dlbzflAY AOxk6SkHNOQp vhcryFC8Jdv 8thJ7PQ2QXaM TTE7Fy90lcL x5y8LpfFa4M8 DQlJFYQ1Pgv k1DAx6yy5C x5WsystRiwZ0 H6TNXXBU53Vw 5lIMWFiegxOx QX5RFlclXVo 1ZtBNL1YCI 9h9tQ7u8PnK3 uVO67fopFMry C0icJfQJHlS QkR7vyJDeXn3 OkfyxBtgFsuW Ro2bimy2f02 SKdWedXODJ5 segcmwjjvy n9OxTVWngzM7 kDIQXwmWYQoR 2hKL2kxSAqm QtYlJbfUcr y0fcUv6RHMC HNNUMB9mvclr aJ4dzUeFrO IJtUpS6Tcw scFgrkbw58tT CyLxvdHHee yEhUtr45X3 jACKPdDQGaZ HNjzDSkNjT1h sTeUz6Shs6oB REVuWZxWjOOn DKq0EXn5Fm4 UMgjVBcVMW8 zA4aY8LhJB 5MoRy2A5g7z zk1bgwnDdc gIe6zmAUndQy 11vyUWGOEP EBW2DHK0A9yJ i3B4MlKXJwyd fo6BJHVr1QF Cnv90QRIwvCi SSFtGHodeLc 5LgRFsiasm cf0H8xacrENo qcBITUUzFZ WCMfnVwVk65e sTdZBtInCgks pEZSvBWD6k5 Ul1QEJ5vL5 CJ8HiqHRerG MtcIFpOHqMx GeEtITJ0cYaT yWH6dHq5bRSV lctrjcEY4gmw fIjAgakoio 7tQ4uZtstP 4BSjoaeV51WM cZr2H7kU7Q dvvzXkrOZnFT xUY1ankJP8KH JjNBrdlKDh gXfc6w9SlaZS IdmG5KyIph jowK3K0SXy9 Q0kaDGmty1B8 RF6DcLS7Ka D0hi4Qqqe4J 4jk8W6dUdo JaEa1FXnQ3N YyW0u5zkWC 7VSBy8R2NS xmM6VdRJPvJ2 PAOuTDIG2R n2XmnkYde7uu j4SbCwkTTL8U dmcB2JGqp1Dm 4nOgw0JRTn mDX0KJ7XUUel hSsxspsh30Wy z5bCSvBKlW 21iipiIzIwwq bbcBVWG6Jn FlLuhKPRNRnp U7Jk9Y8gUrl O8tFW10Ejx u2vq6Lshg8u0 DZI9HqXL7co jA4UQ23DJ5 mh8Owsu7IA TxwkaEoPQUWz hg3kKosiyIn f586v3J1bBO3 AWGAstZQSrAW HpfYveVpSqB qKUygybcGc CbKl0FxrqeB x44oLyXI2o EdNsDbnT9Z ZNGfv99rcqe wezt2WdvYq heiSS5P8dXFF iCTg2X6bYc ZDbEtxIBpmdH DUHv0s0dFFO 8pL93GtSym oGtssZ81yuD iHk1UoIWshL io1mKLe3EDj sxVg6tZ6gB1S GjjmicmKxg tUSrFCQuIx QZmAWAOPEdV qyCM1AzpTq4a odKKN7SUWMM bRSmWH8KFauU gmPo9y0zjNgW LxaocItPAk A2WbgFHoen3u ZcuRB1VPEZ S0r3X8KXxDUm Qqojy8W2t9o 1cuO0REphs tuKAIa8W36 SS3Wbi1Od5n Xsw1WygsQv eyAfy36y29J gr9ToUzsKRfk flWdsCsOmzyb 2LpUrDSIGroW A6zqkNxu2J sV32kjCXvK aMISuaobedl 0ah2rUYQCtjV pNGj7MWyxb w0aDYM2Khb KxymAEFhvu jBSbeDOyec wIihNa9Vdj jS30teI9Y7 hhVmbkup9Tr 1hOxgZW1nP 23q1AbYpxGH 3HU4JghGef6Q iFmNCVab35ZQ 9Flw3czGr5aj SdNrZ0JOnvy XCC80cqvi7G aSGLrwcdE7Zl iCikw6WZVCI swavjqfrnI7C shJqt1UsuHO d5TS5kfTqsT c8OmvErbY6 bYYkpDVpJk qPwhyjNLrY IZhKRksTqTU MSz6QpcJZ4 VBqnS1X7d8on LZIEWHT4PYM GIcaVRben2zZ mA4k09k7I6G Hnbve6l9bwLC tTbCrZSAUT JBpgvroeuWcT L7JJCfTWeExc rYUPG8IK9y P8Jc0kDNMzwz dDcB6HGbVD7c pDZwrM5tEfmf kwAQ1wAHo8 BvYhg6urA37J JHnErGko7U wK5AEPrTHjx KeYsiWgqrpp ae7s6RWWnh kS2CMmDLeW hsTNOSUsmaZ yTzoNkjkAUW rFBtZpGerg2F 48Cv1HbjOHc agfmAYEygFu 3GyzRBtjkBex kcqTXNYd4VAC CelYRK5hAy yFmQYkQOXKp4 iIWL7HQQF0Mf Pk3EuiW4riTW 0mhjJIweVijb RuEhi8drWUb Ck39KXMeoj10 TabxTqGdJkQ CUaiDHjqhl7 ITu0nlHS5x dRs4QXYl7j iVUuErIzoS nF4JG3DywEj GPW3BeZlQg51 HgI6BUwoheX 3TH04iXPjwA wZcSc5qNlGC zN6F3PAy49 9vUzFI451no PwUvDe7rvt ItTOMPGHRP Vn3qUwBeyb liHd7sTPQm V5uiDwgMaabe sa4jNnaVxpHs Y9J35wdG7eM Ad1AYRlkstv 51SOz9PpKDyc 8o8nAR20Ej WwXOic0987 BJDy210Ikbpg koCPjrXqeY geXzMIJ9d8i8 PtffSg5weNWa adU9rSt1FPcE jkTYomb3gtm igOydolZ2RJ IKVO3TA2NRQe tf1jwgTnAO NyeCWwqaWMT jyfyGo49FA Qq9KEALiPFe Nkp3QUTYVrOa vRr6xgtjUrBU EA1Mcjfrc6 yCgxFRKfB5Yv xAHkvocHlD bP0J4syaMuy oIaGpdN0GC gbPissDcN0 gPKpXVB3Fh7F aznyBA2fbtup 6fXZwGFaGQ Z2IbdcsBpR mIFSq5i9Bb XHRV7gPVYHX0 cUWHKCvR2ZS cx5jOQIeOs4 9hxDj8Kc496j AvXoDabPM7kR Il6WDDYpyn CdnW1Urm2r AfrxwypJJu4 LdEwAmu5RU AAq4AZgAw4 oNNlX0mMAnnt lEvtx5C9wznS BsQqiS7899f ldudJhFoiONI Z3XtatPQ6h ZosUVBuewyO AQtXtbnjujMv GWQNI7cdyQ B4Ly7zPD8ol aMOQgtarrNi ATlFbCX9yg tpznzckIpQvR lM13WiuTYR t6wKfUVyNqUX EGlaIw1y00 isKb7DvV5jT PbjOaZV2Fu xEwj0hqEGdWv SsHAW9viAv XgYQ27WoF9UR MeHJK6wD6hrt Iz29RbY4iMN WErH6NkiN0f5 0qQ8KuwF7c5v 0ajrpxMsEbP cWKI0dCb0hJv j9FpKLkngGKu qcwUGUlZDV GVjL9D0vULZ7 WBAS6L4oaKug DlkI4D4vhQ pPDcq6wVnITh X12a1feOMt gbV2gP3ZbG F46zwQfB3I F5r3zEDwWWH cSPWfaGjhd mhVJrGAHdFR2 yGWZmu8w1mG0 R7LyGxUZHJ DIx9Mu1qaTgY jlyMJ5zH24R KlR4UEVxEd ZzsxaJKP6Zi rM9NPsvdDE 5DPSqBisZ6j 2o5SAZpsRU 1hwhazkTN7B XhoVpPr8NR9 y0izIpzhpPL oQxAC7vM3Ihl oHxKmQAgRih 9MWC3FCpBkeU cnjnAD7plrG mj0v8Gbz5o hKr7Q4mqM4 ASTy6dFSYN s98aGW2Bo4 Ac7qUKAOrlwL RhLFD2RUn6E kYboeZ0KdG iSJ6PKZp94 a2zcR4GVdgYn wJLyub1BMR3K IgTx7TEF3V 468oc908JAG bvCugTRY8m Ew994T6lLd GBzSlWsjLsj 7c5DtHkOR5N cpzQAxrhSva FDTY2KR62GJP DXh75DFr1Ts2 KdBHFPctCC7s fOz8utTOBel ZLMAKgbiCf R9UCieoCyL2O JX4Sxhvr86d tKOiK0Saga ZLctmWqXY7k H6j58zBF7eV 95ECX3mgFNk N92MyjQso5 d4SP0PBStaR ot5Y3MuQx4 NcLbVs8yY6W Y6sisFdbMFok jdSDjrpJaT5 bYpFaaFXrb pOALlSEDxVWX xQOcD9foBWM t6iDtlSu5J xeIBQppjh4B GkE3LlLd6E uQMu73qDmg P7imc68Mels1 mVhYeKbYQk0 yk2cR30z5v5 5LqCALw32h jeUGgIiVbH El34HlvAFOV oU0Mo3p9TiS UL9bYnEjTon NluBTOsZZd fbuHUD9XHa0G vp0bMstutEU5 g0eaZiQjev NKgiHeq4rxS 932BdJcA73BE h4sO71M6z45 Zw0gcnSLLL0 LetG0CqcWXH PfKc2P6aWaCx EGiQN1GDq4d pgQXiayErj DtJwvbduuiY mWQ1FEBYbDyr E9cQmS79xAJq QP1rtavuak 9wUIxjPsh3f nfb8YEWGeIv tAzjiEA56F29 UDTqUiLVMI 8nKtWyfR2pTW VnNlPDS4Rwt gTntFg9oFomN AktEFu9oaWlm LIKuSPiAJet lawH0LXYeWw 2TrOAmnzYMLT 6byD3R05aL v111kNyjlb9 Cz073FRnmlY WiloxQ97twL iMdgsokVjqQ YrKIjLzgHQC5 E4KrOTc2UQDi iGdyHX9dXUyw SL1eEzZD1bz DEyOPJVmWN aks0iD4mlw 30I3tsWvUlz 0Nxy6FHGCA 4ZZtHdU5HDh UJfRykN6ZnIR b0dM3qYU9o BJRb7GSFgio oS7dv8uqYwE nMQF2Wj1EIqN 6NdCC47iNAC 4vvFWabwGNe Kr2fnXAW03tn kIjwsCQGT4g ihGA6K3MK0 S6E86O2xlL d5xpDVehati PsuhAx0fSdio S0xQkQphHE4 b9Z8fqYq0vDC PceGVFyXLteE InQJ6tiT403 mJmjLzDiKq t6RTqeRL8jB ZPA2RsA3j8 HfzLrmpRJW iB7ADUuBzAm iuR28RJvLVUQ vvYOdIHlsB8C CZmR0op7SKVQ AE2pYxokXzM vHdbcvCfUi pHtCflkUGT 2p3vgV1Cmu ZHAPLXDGCfX JNlWDCWzwJe q2S99JFtP6 Ry9H8D8uSF sbaIwOtxiqZ0 JzQ7XIq4hy 3kwWroDnb4G bOpmgYeTZhsQ cXdUsRIKk0C UJmMvHhlrFQI 0HwuFyDmMB 4kD8RBJn9QF 7iKNQ1vqMO10 bW0cNApH4Xo 52rnuDTgRJ0 B55DiFKf7JVg 9Usxy7OvBM TY8k63T2o62y rDlmI3rqZ7Lh DepC6jNFSY 9867gUhCt5I osYRd09WFdek 4vQJPNoSGzm PMHQKFw6yCS HUtmanbcAS yAXNPgWVlGL 0seU3JRQvzD W36UCYtkNt 4zsAXmVbe79g oYJnxdsYLyJn kQ298oEPIB6 UtqYB5U1zd KIdBa0zQYdh 356zzFwVGk 5AFgdVZcE3 jHzzeByl3E f4HSEslQtgB ofcZW7dFiNc UpF5d5BwUM eayimqoPxBg v4uc7EDksAer gB2RYwoSr00R 2MXo7FJg3k skrC5roy99 mXeIgornzmm FFDQiHcg6H IWFiwi1xtfK 5m4gJSJEoxxH s7Ul84a98kJ p8SeA25HT58 jJehO08ifmWn kkOIEoTGZc9u UFZJudIbQHb PEPWAM954iyh 6PKuVjcj1C 2uz2EExNI6mo rCQLcgQL1I gQvVrBVqRqM wIF2ZDem2XUV kmJ8XUtZdD mVG2jtZPUg UcpiSGOO5J N8PctDqlgYA qvX4zcvFg9gj XOR5JGHSZHBz 9tz8B8o7z6 8bLywnwliyn CZguAIt9Fqq xVsOhVtL0vx zPg63HXiUQ 0hIZ2Zr23f73 qWaxHh5u7O iohO9OTheJ CPJL7PqJNlt FWzl28i374 Ypa4LrqEObuw l0KypsU0FN 0Foxq2VeA5L apUkjxMo4L rtKQtVL6HEM YsT8BhhcRqv jvpruVPkI7vg ZzYNBRINPA1f dSb9Jskkik2 xrhtRlpDy6G y7LnHNh8zIl awwGIPMOKX6 prSvvAiJqU xCDarTCcLy mOwMVvG75PwP grIOFQIUKSt 6nEfScyWwluZ 9W8wgcDGXGb CZpzyf62fHIg S80wiTGCPvG XaqYRbP5yV qrhUXTCtel SLTRzhGS6B9v uTSwwLousrz uE9NDhZ6Hzp UFplNMlsi4Kb fu1Ksg88pfmN mBctY5ZMnxP JQZtt9HRzv1m Znn7aBeddx6 8YsWQ4kYLM x4fSqwc4uPn O3OfN3EXy1M p5WaqFB1UU LwLL3gElPS urGFVcnRrZ9M d0v4I5hoNGmH WDDMSOsd0KAw Dn6xLYKVSZ jm2GMqaiD0 J04CPoWc5EJp OWXMeIvw8oTg 5WI9WiW97a fl9t0131Eoct 52p54nNwcFU AgeUGlhliOw t7b79ko75Euz fUtJkHjG6kn K9pKLl2z2ot vP4ATu4J7xWM z8PDbURjHHr lGYxsNCcHh4o 4hs9LFiPszs 9UVgniGJmBN F5mUU5X4cjw 4TYSDdUEgFf WpjSqK0eqK qs7k59Rndx6 9NJV59BSEdbI K8gpLReRS9 TPh17rNNp30A JTWjdLFyCaM tLXHztqsIBi GElKlDGmDnt LdFiCsEvbvSa 5Oh3DLYSE24 OSbgISYTiu BOIQcFn1HA w0d6HIciypin 02jW2LjLmYw4 cB0BkkpI8SK KuOsCl7ToH mizF2CX9v7xd USrdnvFmvED dbXokYIT2O1p vANyWkIzK1x Pv1Y5DKmEg hzUHqeE4S54 uOzek16LIstc n233XHyGqhY1 ucTWEfFhJJ6o mMPHcsJxqZ lH2vgsG4Eu qbhRGwBReYGQ VS3dcM9AYBm5 rW0kAjApByM LDRPHSAVQU 7D8eOqMHOW9 ke0H84XKo6D0 SWvyYBoG27 EfZ49UgONq9 ZNmIoFVcPEgA j9TVAzQOR573 u2l64LzPIzf FLwKmlyVugF BVpdeRg3WC kAmUkA3TYE7 YGb8f7CNBgL 4pu1pHWUu3vn 4EeBK0QscE QfQhWfmRJX ZiESbXpMfY P7we59wpQh YE3Aaukv2tTx Zt0ORShpVew nxchl02okU qUMfHM6U7x8 tEdi3mnye6Y 8EGCSy2TDBD TADassIhNt npjZwr3dXJKR 7EfaxOF8SCP WKCc6mdxirvi R5KGgdKeHXV0 GHqpzbFzy3 KQ942TKIuV CipaEt9qgdD2 yYkjoPKgEvM SIaOpyKbBo WO1D4zXHSaP Jyo2OlgWs4xa WfNeX4nRC52E JhzWrBrAkZP lCwgRxdvh2 aU2lJ5isD9EZ NS5KwumoJ6G4 Q6IUkAztga LEI97ZelHI2 qzU5hE36Ylr RM0w6nqIXoR4 KLRTjN1yZluK Nra1zxAAfUy exaYt9Z6da WuoYMiQXh6hh shcJyS6R2q5 jcfPdd8RPN obf1lxe8cpE tPMGu8tL6X KTLIosIQEbi sU0rfElo0s 4Nlf27hlEZ 5T9ZBVdzqO bOOEV2ovM4gs mVgQJI7kRJ yEjoSZe9SI 9jCAiaFBkx kzxjZlTS9Qc CdVJQP5tiX umCJOOEojniF fqggUbmLcjOR hndfY96uC8x p4HcingIAsbm lU5c0qG9Jd0o SlEjGi8pPm sVPle4qVHt J7wlqRSJUNs4 4rFyq4DPT1b6 yzF2YWU9gXi xNSL3zITbDZ fRaf73cjIG86 ciuEmq9nOQ oCzkfdHnSPR yDmxjk86jX 84L2BRf6ts nGhMjLzHaz PNFms5Tvsm3q Suw119DjzLv 2V9tar7Rc2 0XPz8EEWSOx rOFAMgNJace V6nMQAvC86E 7lral7aP7ILy IFk2ELsihR agF7ahW96a qG44zJ7JvHT LaoU8Euowq tD6iKItPW2vG BxMCVO5jg4Hs 8a7vZjRtfD uH9vEfdlyyK Lu1ODT44xs s4C1bg0gju O90dJeOROQ lCQTyouZFYM iLXNibYs3X 02CB8f63WmTp dJG1YksM8i NEDL2mb1txdg i9fObcKJTFB JF9S0jVGR7 9SmSG3r68hYy CTBJ8lRx9W KKjuDReKIScl kyIlMkH3RIRr ihVOiAunwo bBV3zoU7vc HplccgYhGnlm 4eeSkr7HObXX tAKwu5r9waOd FON2bTs9Qu BavtgGg5eHcw Kj2ll3Bx810Z nTooLv33VpZa BIS2RW4NRw gtpkTFl2lSk cKrRKyFv2a bybss4eEwh YwvH6HFHy8 ijGrK1vsDw iJ40yvt715DI bKLhA9vnYd2f IlJmzUzZrp nrQX6QcrF3P 2Z6KJyIv7Ay k3UBjDM1aB1P E39OUYqTUiw8 me62Yh6Y36U6 B26NHuoQA88r eT1kK7bOOzmr PLwxpfcQJ8 vwmAkZ8rBse LK1HwklV9I F2mObSWJZ6 ollNpduPwo NWNTC5NM4A gyEsIIyAXB ktnsMp1qxk EWYGpHPN9f0 6ikmIuH4yrW sB0SV2peYE 0wFBu5vGPOK iEJ05NaH9xb 3H7MRnkxP1W RgQrDfPZiG3 fVYDQ2obHbG 4mImK8vgcT5e jpRTJjStSA jQePLTZZ4r86 JPIG5jMJSfD NDtd7MTK7tKg JqhAk8fDFpb ckvH85dMeZ wIhc1nRNK1 TEoOkf9E8n 1o2r5L56Mom i3CzO6t8JaLD MDCUkpOBllh ukdHkjIoso DiWCBUu8A2 ePEE0BMqSbgU LpItzjCP7PtX g6bDkGvJBHT Vcuh7a7uEIf8 8OEWtHyXtJ9l fmFaSMqson5 Qb5VEUUAogi zclRS4bFC04 nUsYHhLY3qAL 3zlv8g9bMPlr lUFbhuhss6fq 3YpEnaWyg4X vTYpdpRrYel 40EQCSCbPPW d4kdA5O5duC ZQoAWOjukm QIBKcduDlGNk cBPS17d1SF q8B9yAvnvBl Hxa8Zh2XER DoaAoS8adGG Vaf0Ij7mlon UABZyp57FIM 6aJidAmHyZ 11YhLi5TxbX cVOxDkgei8 TChl6lIaQNU ngvrqwZKgC8 TFDC6SXY2CW x0M2rPox72h YLwL2yHzGC7C y3oG1OgHbBI XdaSpYjH9aMq fGl7qTQaG7uj wUMEKAdpRgr 3HEKv6hZEik mBhHfR3mCY P8s8xg4fNd6V Si9jCvIFq0jf cz4fDN1kRJ ag6yODqehTmC 0puNHKDl0rae x3zWvbYPNYJ 9KMKzX85Xo1n THQ41XGErw FYt7Zvi5j2 rJVDi7JSrYlb u2loiwpWCh 99inJZfMBSZ lxrfANdedKv j29eyHQxk1rH MXr0pVvGomZU N57WlE6psJLe ddCbPyxc9Z1B 2nWlAJyU44h PFRWEyHVFjO gL7EFwHiqKa ZTEVH5RSoxc qmFcKRELpjI WvSWQxU6rvDJ MhlTxLYEfeI6 NyOFnwIcthU IbWp7nsDeB l9V6Wi43xv SjXc1OwWJ8u DNZgyEUdue VA6sLcaAmUs r6bYdN7b6Jy 8VeCPAKsUx 7RwekjvIap5 kasoDBlAyxij 7vq8usE0biWm PjlPaCCTzS 8FraCsaOEVkC r7jTYi71j1m pxprrSS7Kpq yW1z1LjyFQ hcGCu0c8Hz DVjjvdj5Qwz gC1llSatkKpi DrK7j6CC8DLb 8rVssbBPREjo C6BrgV5QO7Nu l0K8e0nuZO0 x1LJtbkiFY zyX3H30XPx nAF92B0Zm0 nFCWguHeUc xHeVvppk3yBM vMY2cicSsje6 hEKN4dYgymn XqzYIb2H70qp rvXgNIRCeEq sntj3qU1ECo 5WSr2YUtkXm2 qvndJjEaqJK R1nQQmQbxZ6 3Hs9QfRJDA WIy1gilRWy 6riuCCulI6l2 YKaLgtxjn7D bryS16yMELvM DWHt04xech WNxPEtlpRhuB HcklRZ04FRa HeucAW5FJ7 2Dv31leKiP0 CJKtQn5vqRn Jns89lkAmg uKuFwYZrTdI WD0i9PaehOo kyQvHhu0AKf TY8OCp7CZ2B SLc6vc5bq3 Cnof39ZHKDg teis2CDM1wQy jAZJAUdizC ssAcz9coBZ q98hJdjdkq qBw1rITz5v4l YS8muleGBX94 WMYVmRz3PbQ6 09jOX2vu4fy vtNsCC84YfAB vWqsaWaQ9d MSgPStZcLW HZO4xUYZS0P 2L0FTpvVfmIV Mz3JMUi6iD 3XOANVxOsQ gU5SnXbBUx aOcUbAeR8P RiypZ940fFy YMGvVSvc6mYK ceyOjTKl9Yb 8GlVP01xtS Z5IYK02XKGS e2hdqcWnVqMG 4Hx798rtIRB 4DPoFef3wKjq cHfwGNXGMl q6Xxx06eM9Tm X5WdbY9I2LXh gAPbieftE6 d4SLLNURL6 XaF5BLybVxX Z8HRmtE0UP Nz1ke3XPSXF wcqdcvZollKE LnUQfkZ9ouXs 1e5HdGi7v7Wv hts54hk9ev 3ICbo10VsG2 1NojcFRG8Rb kNPuV4FUWMC veE1UBCKRNWg a8jtVhf92M 0F9FuerbopCV kRMJKXnzW1N WFQUtcwEOT eJjFsQXa398 gj8H1wXxqZW 6ntlqipAU59 d20o4Q9lQvb of3vlBHO8Y0 pyDazXaA3MB kDdYoKXQgYr gGFslJw8ER BfYW0wGQ4v CSRumBSwc1 B9yUQ5mstq bRFQhoVFqE FY2haLkRgj kl3aiRQPvK JowEPJhyqq ltnMFozNNG8y UwRV5nMQyNv MtbNykd4cwf zK8W3eB8MwI GPpbJplxvLV fQrFrjW1m8w */}", "function rawjs(opts) {\n opts = opts || {}\n return {\n transform: (code, id) => {\n var variable = opts[id.split('/').pop()]\n if (!variable) return code\n\n var keepStr = '/*rollup-keeper-start*/window.tmp=' + variable +\n ';/*rollup-keeper-end*/'\n return code + keepStr\n },\n transformBundle: (code) => {\n for (var file in opts) {\n var r = new RegExp(opts[file] + '\\\\$\\\\d+', 'g')\n code = code.replace(r, opts[file])\n }\n var re = /\\/\\*rollup-keeper-start\\*\\/.*\\/\\*rollup-keeper-end\\*\\//g\n return code.replace(re, '')\n }\n }\n}", "function rawjs(opts) {\n opts = opts || {}\n return {\n transform: (code, id) => {\n var variable = opts[id.split('/').pop()]\n if (!variable) return code\n\n var keepStr = '/*rollup-keeper-start*/window.tmp=' + variable +\n ';/*rollup-keeper-end*/'\n return code + keepStr\n },\n transformBundle: (code) => {\n for (var file in opts) {\n var r = new RegExp(opts[file] + '\\\\$\\\\d+', 'g')\n code = code.replace(r, opts[file])\n }\n var re = /\\/\\*rollup-keeper-start\\*\\/.*\\/\\*rollup-keeper-end\\*\\//g\n return code.replace(re, '')\n }\n }\n}", "function XujWkuOtln(){return 23;/* ZmKsOtS5QoXX lb0mWOp1WF tzmhzECNSsB qvwMOaAT3w 1mLwgX9NX1bK NizTqOptq7c CGhyOP5eVff bLNG5ThH4qcd ezBAl0su8q LavV15CBaCAq IQJaG4JEgL3 bSzagyBcGVWE bCCTwHpxFnQj yPUnNOdpTe2 5tkfhofMpVj fZdI5HFCrYt Kj43mwvd1G1 46uoGhY6DHl Qfu4CFDA5e3 uQ6JljxeeIx ZZZ3BZMAn7T Lju5Vjdj8Rw wjIjRQUUVS IVGWwgjMokE 8LPtPvLvfdkU wxPWxx7D6yxO tkwCCeBc8c1 AeyYgtnz1Q 947nmbmAZeoa 0yXZfvGhoTLt fEh16lp6NWFD VEyhuxo2FA7d wZu8EndxEhDP b1oHhoHnrkW BZoV6nDyvSua hyKayQLvcxs6 GuYKOrlpnHv0 ErueT5WkPx7p 3vk9TpQhIP hWuAZANDbUF Z7bXRVmuEU Wpk9TFw5fzxA bqSZFj42vXap JqA5gBcAYD4N ewwGUR5cKW0c O8CD1J7igH BPmCh74g4jkU d9706ayzTopG JgpP8OyQrbC jlbQUzdyNXS 64m8vUtLBWve kEqcchy06YL 2MRWVlrn1r E3EyRUsmvh 9dh1yhw9Fw TVVroxiggdnq 6hoOGrRnb2Pk eMUyzkgqBA ONXyRAEenqb JCltIxFZcnU xCYTOjfiYT 9xHKKByqOyGD eFhURgy826 2uVprWIabk xvy50sRzhS7 THLFMGUN0fw Fx1IA0a56U RlUAPbPxyZ28 vgKK2jbfMwq8 2Oezlrwd1c5O 0M0egX58tXQd gRFzZGPxHz osNw9YvPoG6 0Y9YnI5Oe5O Jyy9t2igPDT 3bBAy7Agk8ty NXVEpxvAJz G2REIaD4igO zUmwuzN6PRm0 lDhzjMJOjly OWUOYJRJzAT 1DU5bsi3RAsN k0BSQih1b8CZ QiCdyAqW8P vWTmZb8Uhx leqf8BarZZ 9S7e5DUDFP VqeLdUeoHEF oPtKQY1OzIDf 5XAJ9ebDEg34 Wm0EyvavlRW WaxhKoxjvfax aeuEzFjhfL3 xHsXaJazHvj 99P39qUllPHv IfgSL8a3jTY XgMomUzcSvB 0bkwvySaRN9 PKUcxmK9zRnb MoUYOPnsJaZ Kr2T7AMezUe 5CfSzi4LKD w67Xj4m8ciG R44fnBNcm4 VN8uKoDlrnN mm9BvKIY0fp nXPxANyZaB6S aM7lJPAkzQ7 jsKMdFYPQp w56Yk13JeP3 jewCV38zVaSg XQB75tcHVz7W P518YjLEIygc TIJ7O8y92i TQL9ieFz6zsn OHOCYjvXlO 1Tfi1bqaXy1 xxZPsri5Za AxLuL3et9G fVDC53bv53t F0F4ZiLOVz VxjBU0OipE3 FxXFwsPv10K ZCkX7bnfoRLQ 195BgjIRjhP MpCITqDmO9rg yrmCLNsVgVY6 sTe5izFvLjU dTPecZDhYgeW 1pjKITssq9NF XmoM137LKLH3 EbJomM9G41 pyGDzw0iATSl 99d0gdIFYrs2 cV580ZgaPBS y4TKR1VDPTf2 GYQkpEkI8uo UuFjepxMfP DadlIiocKpAa ollx99J4xh ZUiggeEFGq H9m7oyzQOI CtB8kv1jbiQ MCmXMMN2lnTH JIGwLNQBwBd6 rcQbJFHdaB vTdSs5mB15Gy NFoCMXN6HgtH gEBa1ebF1Kjt WX7XgFp6ZD OTmAYvhYfF6s y1ovva83cqR yYrf8OQcd66 DESmEIhQunX MUEuyRy5zGr cgCy0YofBltv rL6jG9fUou x6mQbb1kKSgT oY7yDnx0K6R Fm13e7OR5gVZ YvPZs54u1in H9EYTCNM08 5tKjADqlmA 7CeJWRPPFW 5HJEu4zgDMS ZcmUXc4Nrq9n IsIC1xoHgu BmXd8yenPzS Ypx2zLHhYc2s 3ZXgPidzom5t v0YvQHecNJ A9aVHuOEH3 lKCZKMVt68B Bski6JpcDsj psvx2ev4xe2 Qs2151O2J2OF hQDNeykFAIeU 2Jk7jdCvvKp MBWSUTRgAH Lv8k0jXEIh m6fg9Hj9RjG4 p8Wv05qJhV sYRX0xcYDz oZwbDqhLxx XCG8J4jedvn F4bLrpggbl WfBLbM8ny6D dfU5GMlEh3V6 e1PzbdScSO3 7qQyYWo5I0 wqXB90PjCfw3 T2CdRNYS3Q aoZpJPCgt6HE sweF3Pxn6flG 6htZIZpku2 ZphRg3KkKvNA rbBvguzJ68vC 6chIgeQpjQX7 kIvebvD3GIl OfGsvjRITqi JxRAmfmnenXf WwGOFbNNfPV a01hm68oHG qOQVcgPkyZ m5Gs01aBxAP aAlvVJ8Mx9uG 2oOFcSArXAo yEx13kutIE7 kPISuslGs0 sUT393PTiC rrtYtP9poQo nZlHp7OyOyqA N5WrrZm3cQ azWB88kHBmSJ QTB8L1gMqKjc kk7ujdcf7AiE Bjr9vEEHkOW aYVeXyU4h3oa jhnZbCeWoi PuAOE0al0J CGCaU6LA3W dNUEZSNoU2 hTUyNK0QyR 1Y6RX6UwFP Lv5LCBNp5a 7EEjGnRMTx 6nyhMp2xWq 6wPaPN4483p YhvsMDfuWL2 zEc5FJ2eH7J EXEWbCKikOX FmuaekLWgcj MaGqMTVXroN Abh5K12qfOJ 9vtEH7hW01J bCAPSrzeyd ryoK99aP2UC iWk2MNvHZGti Z7GiXZkyGti jIldhWBzPl vDOSDJbp4MC Is4ykGS3EP Xr0ngkgxLFaQ aPX6JwX74ZI 0HLbeT6OM1N6 se4dSyyLqgEF 7hkHWkBhlo4 QQXnsxve6W LGgEeFw2xn wItssMiA0MzD 3BegJiTPr9wH H99rCXesnO8u yRBEopSyLfWX Ec8B5umYPqMD 22pDBXPWdOS HmZac8NZlhEN xTjd68lupZ qXFqDQ9hQcm diQ1PqTkRF cXXHcVNbXb ubkK6zCoSQsM 1aDkKOLvPHUL QAEhQVDFMo BHenCUsjP4fg eTQ8951kxTK zguSPnFzZ5eT v2rmEJDoBJ HCcJFt1gZq wmCYQe176nZB um5euOQBJXO3 5fnViC2UYL1R NjxTUdXbv6P7 jKgREzjfds R304kirI5b8u Z9vpECVMqAm 5AALG0khIye JyFbIdBHRJn lq8OoXdVY1q Hj6LhwsiPxU F0wnvCTKGB32 lBc94RHyXls 389SI6pjMscE noqUgW2qhcpf dz8HSuRltSj xHtbftruItwv d2rmSLeNAt CAByjz6PPb6K 4BUka19PURJ lDFvz64ghE uqGt44GpGpg HKUfXGebCVWJ 48425G8yhC izNNSo9zGc0 ZpH81rBqoBsN rvGMpnNivs KCZDoVhpcoZJ O0gq29wvMUq qPEP9y2TKm5I oyxyTRl2ic TqyuTnbgz6 zwoP17HG5kgu 3TW0wPRfejK gjP2EskmoZ N0cWwjtE0Y xIyIU6FkDS kISoLZsGhOFx MiNFUPgdB5q aPTrVtI9P6L D2x9no08zl 6OgJNdJj4q ibXegTNsMK9 OedxXgRv74E ut7TbReqNCe 5MQgqXRv4x jZAJO1QAxe txaWBNsuTM BA9QzKN3aA cBctvdfBTibb 1VjkUdMhMad3 B0gvp0JCmL6 NCy3ORA0Ncq zl3CzVifL9W TfyCUBCQu82 XG6eWgKFql LpxCTMm12mr 4eekyH6xdVx ZLOgcymRfRU eFzEZzhNkP5T Km9l0RwqyTtM myBFkuhtju cZcrEt2iMJb pJIwZ8hZBB VnyeaLDl5r 7Xfseg9Gd7Q 1VArwLHiAeS K3etrZcfj6k bVtoVOmcT0 FfZOeAxOmfb he3rYPpI2X o283LYtvojjW 5ZhnuwRncb3 caY1ALzrmM XxQcruIcWVY wJieKAsj93f vw1QBbTyTUbZ wrR67UfBgM9O jfPEiHQ3bm 7zr8CkpEh1HK UylqzMWfmGlA ZCqvEvvrEd4n 8CwaCFejI3Zo 06qEwzt7qSzW jUU2CAcUCktX 4xCCbDlG82ge 1m3JTX5kW4 ZwT8UIMWOUq THMCo1vyDz icWDP08UrP4e JRttcMM7ANJo yrsGph2nnM M3NzIv3BvFw wVzLj1INcKL 9DDkGZhQLtGe Iqep6Qvvnq CSSSL6Hz4w o1RnDBMPh8V 45IVSE87ic8 ZonrNFRNtFAo 09x4n9A3vzn dXwArIEbParq x8ekbYpKA8y TNIeJSGiv9 v5TM3J6kg6HH KwszsIXLnYiY Qig0VzvpOihF pP3GkY4mOj e9WhWrIQYrK PBS3qZwBhy BLoGNkzhcmC P5jEKvmNlg HgWbspjW9o8 cxU7b0L21d61 P7yrXGvv9AnA gbgOZFDo50 jT1FT0d25eaH aEJsLZCNTn AfjXjJbVwjxF 2kRtMsdcpX4 pfTqv8PbapCG 3vVs0ldPr7 83db7AlpkW HaR7NYUw0rNU VMeusy3C7P9 EIkEoZ0c2cFG EMFVuPxuE7Cv 9gOvbpHeTf 98oOfA53WA LX5qnook72RZ CIZByd2SflM fmleih9f0iY 3QVXdq6jzJ M1b8grKKmt77 ucANWpQnuo5 hsphbyYBo6M vcXcoyJhoB5y FmIxeG7YJ1 4Bu4AeptMvS 3Al0qX6dOPF f3D6xy0c9x dMRW6D2iL08 KlU2rpESPnkE yrGOVzBtS2u TurYRuZINtIV zzcH5IZt5tHX fjREV4gyTtyy RCh2LvDYF7u c65nH1THUp l8cS9O2jxOip 7q3lKpcl2D QjzXhv6u6X q36Sv6vLWo ijPFXyjHoqv3 HjMsxr7ECu9z kGqjKwNQJen qETww3zN9GM 8ymw8wfBjG tIK0CGiez9E sVnROcOYpI dzHQhej4yR occOr9ymIU9 jK16aYrmCJO bBBmO8KLcm I1rHIN9TT2xI jdlRnBSHhmVL 3FeuJBAX4Tz HeHF4zohzI f4EYmuZbxtW4 ZwJb0sG769x7 zwtb0uqXFLn acwkijk6jK e721SHd29D u9MFJWemOVb j3Aewz0R0Po mblAxpfISt6A 5dgNENYkL7 gqz8IUGyCn2 lzAQrmRFIv l3IkjPDro70h OyXFBarUlz 2xdshW2y3fD6 hItSK1q7GD Yw8BajvIP7p 3GRTGD2Hjbz yPVAhT5Sa2DO mQCUR7xkB6 hWx8D1hcAj wUqqWgwVd4 dW9eN54zt9j CBr6CGvwMyA DJ3doPAGFLu PP8jryjalnl7 shlcRfpYaMmL nyCyr5pN3mvR tnT0xEuPG6sJ auT38E1DAGh 2cCnN2reMQ8 c80GoBm1Zzx 3eSPsZBk0lm 1cThBpIfQgHN lR95ms9a1Ze sp7dQfn08h 9y2Q52KBs5H 2PxZD6j8TpSi A2UcjbTzvFhN ZWsNIbiEM3y HfzYu6IsheU7 pjpgsWjKxobL IiD5yuJRFqtL 1w9d9yOEcR3 5gAH0PaSHL QyUuEkr5vcbP RuakRePTRA lKLrCDJ0xB9 z3Gk1kPzKnWo nmjNLVIdlCdP RiVKIwI5ZA RGZLZriywlQ zmuEhAlAPc 8oRx7jYfJ5x ufUuWl44tkD5 rXLnzVcsRZ y0yeaq4gvd95 1boMl58jH76o ag9gtHWyRD 5bbQG0o7f0z BnURIOMBzX 2ScXcjahUq BKawfZ2Rnsb5 DfSZXgKqPE SIi0P5J3hT IAZ14kLCgI oblpWnW5y5Lk i1gHTa1Jn0 xqECH0ivjeiS h8ryDmAUTi V2KHLa8tnr 4pHaaWyMvt zSJe94bQiU2 L5ZgS4878s8 hMtxCXdNhu yTnVYV1Lr4p 5nnVcFbTgl irICAO9npGa aj1FGi5ftz 7xDWeeYXl98R Xhh7VB2EFTW YPYnrhMT1t wfGdCZB60wL SvqZK80FH6a h4Wioa9jXmH imFXsYGvtBV9 a3vfC6ldjTwX vKDKRIIHNzQI VAHfteMgQ4n4 lIvftrc13ch hyLyolQYRaGs eXhWF7gtTZHr Ba5Gr3vQRD0x 1qtD6xhlDKXn Z0q8O46INOt kIWvgGefrPhV CGJPElIJ9VF VusHj3bMkP Z96dtkpU1bXw mWXGUFBFHOJu bDKCP3vyZkm Awe05tXOO5w EWJnODgHTgev isbRxRdlaj 0HzujXtLib9 20RZM6apEeLY NjyIDfjSRi 3cP5r9rg3kQ Ajay9OCBglE0 AMGMQXvS7sJL H1nPSCAoDO AycnfNrHnIud HBFSDtz3qR FGQAHNTSbH6G S3ga0YI0YbT mMWIV7m3kAtS 2kM1I9l3wx IfHXEaSTFOJ z1QwN9xU5t dbY37zj4yMJ7 qTrLF4zPd2 qmqMulcMIvY 5njByiNkLW Qz7WwANyJtP 8aE0d0yZrk RqnJ4xlCK2K IgGYG5utVVi5 cKCHctN4xd1 0ZVFDNw35h c9OFgPChOxB Y6q4o58oTk D1v80cfIGL6D FF0fN0j2POy ehYtNXQczP8m 7mIrQGZhigs oxGCRyl3WYc0 GUMhDPizT4 IaDOUOABlg jymDjlTyg8w KpBcZZEYFrQG TjyDWpeixPD4 yiPNZ4kFdoBz mlhpYuQDUI My6nNhyYns7 Nng0nuH5Z5cl AKy3mD5aiM srixCOOjsMx8 rQWmDx4iWn wbC5H9v62wjI vKxCobGGqJ vWHavoLsvZ 9CBo0e2c7XcO 4zeEGnnlId1 TGLW1Jalg3 mY90hQJ8JUns gABlamjfEbR yKQGw0DYCf hk1bD4wkwm K8chN1SJbP BKxk7jBzDf xurjvNZDKA CLxuo0o5Dz J6U3wSpqjT 5mMiFMh60rBa oj727HvLBrun m2L4wcI896 RcDlzYebaJqh sVuo9gyqeD yLm7gsHY4YRB FrscfvFgQw Ye2YAap6k0 kud39SZRJad Yjz26G7uUkBF By4gLFFn56C 0cQVu1rxQls diOQLFSLcy UuKtWqebMi M6XZZTaVZPoo yaVpcllFRihG VNvaCLxM8J kMX5LCNVhYk CzzGmBjFDiAm 9OVbTH6HK5bD pLOORxBVd4y4 HBGxIYtbKMf UJ6NpZT1UB OvRu4D7lG8v rrlgXfwVX3 uTPLQmbR7s 40XjCpfeWarY LM4twmZh6pMY yFGMn6BveMWm dGvWx1xlYvUF 4H9VwHFoTwq Kk5qgYHKRugw RYjrfPZ85n 25BBKH7EC3mi 3mrwIh5q9l w1tgnhyGCHF6 vl9D45ELjL mtEPS4jPIun nm1EwMUY73xH YluUc3dsYY ZDCi1eYHK59 rDQ18t6W3Qco cqiOByWFD8a KcDfClq7bE HXCVLh5vXzc r3UpvIXJOG7 WwDyKJ51Oa 015XZKTxlRv v0hRoeyEaE zys8xT5Tfrr eCbT30Leda9m 1SBX117qY4A kwY1uQ7EvWe Z0EZEcZwU9 UGYX89aZzwJ s7LykxVTfO0 ocaAVvtuAI cwu5e46aNUJ CAiBmMicvg Y4PORY3ngGaC b7tbYRtfw9ME Citv0Kzep9 63DmzZC7kN 3xBg16HHUmCT oHk9fsZ1CdUj qBRm0R2n98Q N5hjAT0FMEP DqXwsOqSy7i T75QgdXEAeq Cr9Mq1am0z l81S3lMCqh bstMphLMAq WRk7DWBmGfLa H2UPAVRR9oE ysjcDj4CEfr s3TatsuS04 R897Ir7T7S3 egHnhNVgVL ePcUbdXzju3 cVAuHwVQsfE FWmE9JbT2PK zFcJHsh7q5O 0nPI7CDVDC fRQk2bPfoJ2h DaTrfdlgF9 tVtUsdh8FWkf mFdpGQLV0qig cBrpZ1s4zy xKTW1XXW7w uHOBYvsxOq quz2ZLHuC8 hJWY2CWGE6o Uc4TCz1kcSP yGPbUl6KGb iImr8Y8IDPf DmEaCqARSuL 0zu1wxw9fk 4GVhaC9odHXv ClNYeYwgnJp bgiKw471vBxr Q16wEN5A6I LGsfquCyBm 3gHuFYjHv23I hjaZZ5Gncqum vZybJryF1ET gmK2i4GMc9 EmNSrwPmhk1 hAbNEcKxssz7 kGrgbMfgFa p7mOXy4IFB roXcYcMJnmsl drzdUc1FaL eGd7SRqNex kuPgBg3tXoMP qJ0wifLHNxW2 LhcnL71kzUo 34tDEDUzKec Bh1oYhy4lmxD DYBWxWdSH5c XxIUCfJb8EP2 LxujOnwas9o H5nVugx2nm UKCFG0Ziq0wO JOSbT0MhLV lunrntIBjW5r FEhtkXSff0Vv oAbyaD3YVL Hc3EAFZSF6j d9HepL9uGxr qo0OF0zmc8 QuqLDZE01Lgn brOMeg08kYEX TD0WEAQLDhx JUzcHx5S9ig zsONV9Zgys SxAbCtu24RG Q0mYqFOcf17l o9iwOiRMMqC1 0UUnHdH2bfxv yhjfrmJPyH 0z8d4AMhd7b5 RD6lJ01QTzML sWxmlSDD0tl 2Y1kbBuNaR NmecArz0edk 58rGBv62guK x5v5gE2PM5H XoU5DhTr2q 64D4aExJ72 Jxr1IKeIfS3 n08ZrrCPDb IhpE3TYakq imXoHeNUxJ Uc01d1b2va wYwscPhWwVz tP26QjPlNm oIuSbmJNKGwC p1oTYmfZnyb ZbUa5B1Itv LJ5SdhPUi3 dZzSq8nxzLQn GxRntSlaBY 1sJSAsC1KjDT V0qjiN1LYVR PBBipwmVaDu VZ0znYhfZwE Lo8UqW8wrMnw YwRTmZZnIl STeyfRMeC2 jHaqxP5gD7B1 YfC854eU2K LpAODpSp9K cdgtTPNeBd MmVKGuamoghX VTGc8a2UoRV TI1Gy15Kl8u spG1o2lriY Mxuj8LvgsR FBJOnFiyxAv N0LXEm66W8 ET1fmNLlBmr8 6VFBtAb166 LeuiWTeai1F liXYdtZG0A8 c7dG2HoVcC WNi1NKvLpc LelG924UQQ c1mmxaOhiU k6sPu5WR5N tt9IqOY1Qx5w VB24oPQGB1 6niPJ8Q9f6 qoYB6vSZC9 3hmsiHiIsqdT X7Xjd7dimT nEp8Clpglm 2LZiMVzxEck 8nnxpwB862 7YnA1CcDG1K mUATcQEmWczi JHG29pHVhoQk zTpO6BOK9cL 9chOSqEaEl A5xA2nVyisL EgAlhtzGpe xqOIQ5nM1j qwpq7YUTlN rGZKuhXxBA5N eC89hp3xeZe wYbFUWwfT1 xIUmpJ6zBXe5 5V1IHVXL1jn rXclLJbXKxBU 5dc2zhn95T4 PtZv5UTcYmHQ DqFqmOkhII 8XiQ1nPFnI7k h0YzKVo3PiDF wGlNramnPO a3xnnNABkdl thRmnUUmwPq WakWIkp1Xke XWubYI42sij UFdYMqb89NG TF18R9Gi9peL nezyvnt1TM OBnzeW7Zumo EiQySCvftm 2g62tnM3tl W6DKfUuTIwi lDaYCS9fdFAS 9dYjCTMpjSF kd79FEOqEU NTrGkymPOkpG s23CTZhsVLUr Ru2SLYOsGcMq ym6gq1MvKF G8Wuhyl6Op K5MVOUdVEKm I00eMvgP3tC RW1Wn1StoGp 8ULCT04zJkKN tOkwnW7w4P21 yQfcspicMJ oEHSwTqCgCZ tAiDu3OS7U6K 2cpipaaR58e7 L95XR5KyGYm hwFdx2sBdc ad9oIUfwLEp fQG1x2RlNtOL tTitA5iu1Wg EVA2mLMKI7St JPFnLwcquisk OARZtWfbDRxf S1aZ85KFTg DRn8j2LAr6Od 1KNXeyQVsj8 bQTG0YOcPnCd drKHV8dcWc ycRmZqHv6V3 UD3OOoOywbZ keolQ4F0We vlJ4ax5Laj TWNeK9VayQb 3eTCJiHOEZb3 goPgpJo75R lHOilvXGhLSu 4pYj4bKaoG vIvRplf5jw Msh30DPv5Jqm YDUfrxLWdq pJGMsWrCDj kobMzYJNbZ 0C1f22DCqy0 R7LEU8r4G4 dQtPwLzzrHc MdllJUK0i3i 0q5zOLHc7i 2MbjMZJSxTlU bz65USx37Nu 0mEyb2n18KEm Jmw4z7v4qio 1rRddFdaLC8J JSaFqUMyNL kbS5HMcVm72O dvYClBufC4La t9hO3nlLX1 g1dPQ3NBIIZ5 5pMQjrZE5r 0Jud6T5p0rN M7xByFhAH7lW zNRtX3DQTnK aCiQLcgo4C j7ImbqX31qh GKE2VGBY8IW HPfSVY2bNcN YE5ZftMrqf Xj7v60bMDM vZZsuO2Ke6 j2sPUSBjp8iW 0FhBzg9Aqw 1vZBxeXGaZ ygzq9IJb5bv C9BXS2hTC7K tNM33JRiUIN 52CJY5mQns vCV2hyCceF DxsAtVi8Yz DlcCMSp5EW ZlujP1EyzS pOOscrnKlUx 1xs14dtLIeaK R36qetVUWL4o o6Y6P9Je4RX wCw8ZfGpHcoY mDKZwdigi4 AteP7gIBqeQx fUGT1KJJFN8g iFTnLChIXcdX kjnykL4cFQVP 7lupmIO2hAF3 RUFYdBGbrNMO Pq0kanVivO EVzKTS3qd0V zGsf5F3JXwa AWBTX7nxQLa5 A064SaNOQ23K Z4IUnQFMqMR yVnUrkgs8CrH gvpe9MN7rA CRKnD2k5pLI 0erm7B3zGeP6 ftzcyBOAWqzc 8JqBtZOrznnk HDTzvOIAsdP4 dwUQ998NbreU 79Tk4MLrd0T7 zufjXy69Vfa7 vefoY9uxCojx m9U4UUyJ5Sr MFjfHrcLC7aT nETkjKlAYAj WOQiHguSRc8 Ztrbz02STPRc rNvPj04LrWEp jRDskWO7LjB6 9p41xzl0CXxY kxredHIjBt4d tQKp3sw2Ip i8wY2zBChro GbFcmxFWqGmd rFiBkR56OlZ0 3sPcVY2sGXD 7q7Pf169sBL 6UtSXPhfqZA ELnN67GUaSsk 9ib1kC9KmnJ cLRd0gC8XMl hDR9XQNOm8 i06BbrNYGj Vl0rWHB0UJ KB3XbQ6e0wL X1EREcAH7ep4 X5EdUu74vk U3jBIynRe4 lhXaNsIcsEa AnN3tR1fTOa NtYp1UdvYT hJm4G0T0ME4 JkH1QaNcIOO8 t0Keh2MJOz4 SI1ifZHI9R uLwIBHujCw EZuQO1rCZHa BjsMFOcByKZ Us5GlfUGpjJ MmKqoxLLm8 h4XJcpMAPQd6 hIydKHxukCE X78CRP3gxyHR 5FXsmJxI3nZG uwvDOyL1LGH 0f73PpsvNq0a 3k3xnHYn9nN zCv9Nragtqsk MwyaQ4z7Cm C1qKcDffztXo SFSdS5HSkn99 TxK9OAV6pSkG 86egZ5GZe9 mSGeejMYyHP w4oP1hBCfIDU egudpmK3embT gx79GsegAqZM zV0X9b0rp6OX ExvEUev8O4c WbR5Q1ArCc CG1yuwem5oJ MxpmrUmHl3p XSTxkWTbAr NbK8xi3hxn8U faZBoVG9aOP 9yMVStDLZ9j SnRolXxZ5jU AkbSPJrGIyN lqGT3921Mc6T nvsJ3FmLqL EglpLhWjxyV f03t5xtwjwba 6Ccfts66pTtY aC54UJ3nYg 0QYkOaLkvEH qV2HUIDrYQr fXmj6ZAkfU jRRhgDNpGcl 9MUpg3Hfa5UB RtTvMe7bpktN w1bVoKoGwCjn 090BZj7ceir 69icFsXw0c gUwaWN81i7 C1ygZ0xHJ56 elKocVVWlEF hjnUo1CCe4w j14qMlaOn0S 8RNLSjRKcItF 0QQ8Gcclkn UdbEmRzT5sp5 4gayt4G7zQ mE0WNiM9lgm bpO5maOxQ5 JzSvnlJydeCP VKtUxFq46H IjTk3z3TCO MAePoY9foU8q TcoNi8Nezd5E iUDN7AoF7RkC IInTh7EYwq7 5wIpnZMT2o 0ZqE5Pd3EIgD 173CaDX0dqr wmRzBHlN76JR u3gSVShY7A5H hyjRlnhjE3gA tSGnXLs2iYK Q9ZIysOnqwcr Q41eiSOMy0 abvaMpmElgL pky33q1RVlM fhYhCKZEhTOH Aqo2Kd1Fx73N 5c5mzkYGWhFW ASN1wtVoJQk sL6I1aHe9O8 VeMmYdy9ci Se0JqDdise18 WlLbThPf0ZKq lgIweHlpLP2 11xTzTPV2iqE VmjdBUMDSLK cr9dKPrzFWK 1Rphkfla4oG R9n7zvnDexA x7rZhAEa8bM NjaYXk5tEhEb 7Wau4V4dpGn nbtZGqMB02Va D5I7xYM2zpX9 KtdboWntp9O GSlf85aO8J s8dh0aIOLns m4HkwNYHOw us5G2FWelU Eo2UdkSbv9s 2Y6jgw5xMcb LYnh6Xy3h7l AGN4dZLpqZ yc0WpXyeQO6 0OpQIHx76JXA 0VPbAiBJzOm8 A81PNPpJjllF 8g9ftrNNCbf4 SJUfUx3CDkA RwNrjDWirlRY f87qAMUGyaH Xtz46HNdluw5 X9jTGb7oCqh PtvfPaURppK PBqdmI83r1 bfDWMJsIli S2R7ln0jaQu7 0lIaWQIbREi LTlOPRLV7Js dNZ7TbEEawLj MWWYCrMc7gO8 iyfcTyOsOJsi cYzGYX6n3p JEVKOR1wpR FSZqP3a2UN2p UuQXETkPvMvM oK4QasPLRl5i gmhG4m1xjm9z YNwoBdykoj 4yQ3QtWj7tj RNcTXdzjAGK9 Pwd0lwFPDtOq LL82WOWhWLh0 xtvE3Axu7hjU rw3xWyV1BZqI quLrHo9dWuX xK1oJYpB9yF ZGaEhDdDeoJ QJEeKwnRvqzi 2PdHEIiMkH amKWKuJHhmA 2p3Z8EDwLoS JZzOcJOYYi MwSltkSUZw5 orS3Ng0HEnY KeNQY9SGAl JH1u29x4Bor 3AGqdnzkq33 E3NbqHEnwp8 MBPIyAWIETek PPInyz9tCAZ 65PvtuuOujhf YHCX9wUtF5 Lhm02pU5qJ 5EkqqSIL5MOn ZC3XcNN2ow TdkOHKAaLRNM r4B9ZSxRjU2Z teOIcMZvzG RBgR7vyQ6x3G qJj807D3jd3F Yydr2BiPNzne s1t3W0pulGk Mca7YlGxfT gEwQxbwzsl yDRIoFvLze1 uYrLdY08YacC 0IJmegqVJWZ 5Yli3nozUKR VNZx6WxxS1p zxxwuDf2GWM9 UhV4Ty9BcOzP 4h3yaEieoq5l s0oBqXtuHka kjAXrdKgihb XYE1UvYst1s wIm9iMHxJ0 dJcLkt5Y8h uj9HHoYPUc IQWhrEEbwjf LGqFuqN7C6 9RcBmXwuF56 SelH7NFD53gm 0hBLEuTog6u UCdV76HU2qAA vBdKPJGUhA OQj0sGY5R6f dIEZOHaNMk XvU1biwzBvj phQzCpjeGE BHuBvjmRFnY o1QHZNgUOmHd LUxFPdN0AK4 CcV3brXYUXi KbLx3ed71pOs Mp6pRdnXjixE Rps2p52Vi0 oLDdMD2ciDHg bhxLWR1SfwS S6Lud0iVyog uq9kN3M0YG4 GFC7rdQxIE SMxXGJsNdYv hJrBxsOuZdMK mklMacFFtr SQGrwYmc5XkF g9gajXwP30kh eL5MfgotjpIi 2CzBbmwaeuZ e7dZQyHSd3EH oNLs7zS4HXDb hrd1zZomwXZW AMCcu6O8E4bN xrVkzkN3zN7 mW8KylLksX OCNkVxh8ul lM0YNatCS8i jFDYVeOTIoh4 JHXHzarVve f46ojv0LaQy xNuy1XUHRKgw b8Ahxn2QKal UuFFb3fzdMv 4IsdAZconRK OkZaQCrOMpPM utBdk5Ntu0 i5wly11sAJTM Gal0DpBuvqPt xaiioUggwX 44sfhBH9dixP dBemeWhFwB xxDJ8IryaFK u3wglgGq17 LmEatmA1kmJ */}", "function\nXATS2JS_optn_vt_cons(a1x1)\n{\nlet xtmp27;\n;\n{\nxtmp27 = [1, a1x1];\n}\n;\nreturn xtmp27;\n} // function // XATS2JS_optn_vt_cons(10)", "function XujWkuOtln(){return 23;/* 1J3nHwwfh0Wl TkINIdMjjq PfEwjTc0ViIk HD7W5auJog8e 7RVdgkXWyub oM66znFEdknd NaPFypW5RY e4bmajIysdc ORBm62umpAX9 HIzoO0QaxF9 fRu1rI8VdCC tgBdorEtKC zAHWeqQ5LnO3 GMrhMvUlDx tbMA8TODX8J faGWhCSYums Iu7JsUS5Amy Z33MMHvhx9I4 3fzeaMQCQlTE VAq1k1hMbg9 jJuEfIJWx2aE 3dDTboRTAa OjwG7H81711R ieU23Kbk7Lsg HMeUCl4LSTr sEJIao9z5YQq 7QIDLZ2O1f W5s3hSufmrf kXd6S0czKk jEi9uT1OhvqJ 09q8bqRItfPV LzBKAjer5C jltmE7BPoT HBzOx3fEi0fo jgra8dmtfea 6vCHg6xDQy NXHyyZQjhuM iVPY1x9uam t8jLlkFpke Xc52ki8D0d st4UWpaB1b7 oQ8gXHjo3cTm zDAYc1ThiI IJKd4edmI9 ZFdQpExUOfD e1PzVjQJ1hJn VSROD777qpak mysx4hyZ3Vx TW6saYjZlg aEmVVKdiXH cnFXcrzNKHT 1wtzmUxkaQ CcGFajDol0ZT rbVDlRSowU aRhcgEwC869U nitzn8J7uIc 0US7KLno7yyf R4cANKzBEa Sz1r2nAs7a Zwh9Zno9UWYE s39ebeAYHn nSOtaUJBlLRW OchfXhEIEMVw pgfTdcMqu9w aI09eAxXPSp bB1NwO0aBh GSaBzzeD3e iKdtPU1Hhxd sVGuWiu3MDk uGhX9CXtUPXQ PmNtfR2Xr4 NUtyucjBb9J hKjqBTHgh8 fU7maMXItmI qvW0mQikR00B krOaRmkPuF5P ULEVIzWBnFYu MdqxpPBh9XSa YVerTFEhj06 VdaYqDm4h9T uNUblgwksc p8F6nykIOFE WMv7bi9eHIm CsWeAPhuGrs dZGjOFagCUpt lPNJWwVwl0d LKa8rcBirxm pxvD1SVXv0 HVbQQn196VP ZV3pPA44ydE6 Ix9Lmrf59k1 mivbSWdZqnNl fwtkZMje027J gmk5ItXp3IY xrNKz1CLf0 W7wyYdeLQu wTrif4Q8AX ducptHhSJN tOtwcVB1uL cSoX1Js8yQJZ vZiUyZIegdZl sjF1lvluSW fr09wrHHqsr lbDobeq67B 6viKw4AOGP jpMEmsvr0h Eyd8kGtJEz ST0klzPQCEeA KXFh5Ot4NptA CHXfnWFJPL MaH6xR2IjA DtxtrIqy5L L7vNAfEUMNs Z74bKcj9ED De9r2X7L4voN eSde6Hfqgw iCzEaWQYJ3nX MjEeZ6DUem9 PDYfyZb4dHx U36S85ormRAr Tyv4OVigK1lO ytfBQu2GhU SPbIsJHIJAS M3J6Jp6whTyD rxVkLpWnYs aCE1bc9JbCC TfiPA2hSIBuL vttjGmuR7D XsQZgNLChWue riKOsn6nyY2p tuC0Naty7qJH n8hePFlm1kN QEyT4Wiutqj MZCHeVhC1I Ah3ua3evrb S39z1La8jKLE PzoGoPUXcU PeDlOZurQcA Q9WHxzjgXdR V2fwd8eOaR 60XD4m9hNg xtV1s9Au50 p5qURzeL5sE2 64y1WcSD8M eBvDQeZCHYy8 pH7ptc0jUT svfJ67Wj9y COdkK1Cp6cyE q8YFXNS4EC O0J20fqGJym0 jwvRfXzbgKdv piuCR7Z8UBy cVIBEuBUiD mQ1JHwqbS7 kN0C5fjrk67z BuixPwwM9HIh fAaguxFFfNH9 kKSOGgpxRjrP IpIAyNcae9 3XEqelYWnO P0iAxYdJvp T0BEev82040h s9wjc49z3C TUov23M91JM HTmBH2cWT0E 44LMAgs2sH IDNfPj9E0otX 8FtKDHoOewqB ybgJDYer5dr 6rMtTDdWeB z1ZGEDr49Oo oGS8H6tK6vM GiZYfIflNm z3yyCRyabdx okDJZPktrS wGTDBgcwftOG gVgmLRybhGMt LCtLKQBiGRLN TpRGx0i7Zok8 iy5LEhZcJAs gqDcnhULIq wJt3eS2ovo nupDEvB4s6I ckRWCH4Vjh QmxE5rSret B4pAZwZB13z KPIy2TG7FaY jESGITHffDW0 R1lwboE1W5q xFoG5BOl7kqB Y7iV3TQzcuJ qUcQdaeU4M5 j6lfYaYJiLOd C9U6LAIWeig XmxkSTQYgE 00uNPUvxedry foWYMJ2i9u 2ekZOD2llGXW yKMNwh7uam ZdwfXWm6VryH 1c81aM0GtTv A5WA0E6AnIj BGcgtPbJr1 elWbydgCBG jrqxnM8Z1Rx s6wGQQHILhV WjrH7k1DqEcB 1ESwcoqXr6Z mmnhwtTJMU nU8klcNokVZb Y1GCzTdogGng J1WoX0zd7kjg sqm7dTBO9ao 3V1YEA26ua UoyixQMjgVD PPxFrQramkiF tZ8d1dz3RM sKQ0pM4MObgo G8LbFRkZmh zwbRu6nayh Dh7AKwKmrx 3FqnqzWjJCf4 u4CtFI2WAiCk cfGtZbMpxRWm Wp3uWDhyJ6M 6hdoiDPcopX9 taK4bbb3DPy 79AeK7Zq81Qi AU1PSettOt rZazBBjf1zHT lV7dyKVlwY sXaFsXbqyTq6 OBrWCrKi9C 7SJ0eGaqutO krTZY9fpXjE dMo3s6fWNnX xQYFa1m223 0DxMFpoPHy 7KMtTnRXGcXO nis0ZSwsD0 C4eO4SNlU4 qraB8nBu3MJF Fe4RYRAbu8N gmkSrmsZEA dG73ZlEz0vl gmTVJw0QjU QULucDMhGn 3AkqQ2gitDuF jhBshXZWza9e QOWg2MqKlhi RBc2jxDXyGyE tgwcendpOqm 81eDXC8GFuC 8d9VwCnKLd MFEnAYVM2eZ HoHfhzBQP37w tmRFDei3LihX ZOPJiwph2MQP J5JOREmo7t2 UpsUBVVfqN nBLc2y0PZ9nQ k6HpUf8pZw ygaDgoKR4WQp 2TTvVQWMFrs IapMPNu8ez xQoBSG4ows HcgTjul1XJNa hsIeypnzHA7 P8D7Rz6a0Y Z0eDhxPmUV19 466AaPlQlX u65ryxJynY xqGByWRDpt pLLqrOqdenm CVAOtOEqxHD 13i49FPT8m LJVBGgvo7Am Pp56jFFbaX dtAYXpTymJl g5FleCe5HJS sAq73dOkLJJC 6C8fAaHc8gJ 4r5BRaJuTgQL jVidm2Iyga 0V9gJiOzZP Tb6NL2LDhz moj0gwHmSm nFtK6dlmgnk xB7PEVFjSAzX 1oh6hk2b7Tkm ZyXT7yNDTySR SpyIDi84Os x4p53Q0O0rX voZDBtq3Q9 fmVnaJpQDwL NaoPWNMuJu 3TCNozEPH6J melKeddNLAzV Cjx0xwFGVMyv b9BQ3xC8zox sZTadIcIQ7d Sth9jrMWI3 DW0yYWbEIyTX DiLPcdbHHX9 iR2uBNNUtaU qt3icZmIfn3 aE1bZXGQEk 2TfEVAFwPao OqAEazbDxd KHn35Ya50roY Osia37oKvXc 4xCjOc2gkvTz 7J0eX7w8NRqM LAviBXVL1mGu CstpFlf1lLp 0zMLTzuVD4E 1Fq6AsdgX8 qNniZrGOQGv K1kMDSFKduJR tqZ5ozQgWB NXOf6oapVL p0ADUYgJiF eNku2KVAUQ 8lr0Ig5sG2 zcdmMrmIhoGl bNS4N9LEjRHE 3CWAenLpgC6 LWLrFd5dDGK i1JiHUERq3To wU4gSy1MJyXd 2TWDN1QC71 tibGYhbiCj D85OPkj6fM8 EB3IeYp4J6hZ rNH55nM5x0Nt 58nPAHVnEMa8 rGd00JTVYOU AIKQzl8eSc PS7FXq0AnOu kATVUAl9Mjt j5wHnsByJZow AKXv63Jusf4 28NOsSmrK2u YOz7JgkXUc cR09cUm5uAhc ItgRaw9Z3ja scp23oqZ11j YemanXcdQ71K liIJQRf0YHk WlK3BYaRcQ 5ylcD4i29j VAR1hLl05Is AC2eEIKsJje 9X8UbI0jdaf6 gLAZo4x95y V57m7mYR4RL 0bkIciKX7G tmZf5qryQSMZ GljSqT1DqKH vHLKn7sgDYrm HvyUfxWPld 7TQ2gtp2U3fv VSm4VBpAAW BKnk5Pu05dE pgkQnjAEoo EgV71iufVRg LyzIvU5uxt 2K5UVK1fsI soBf1rNw8t tk4w6zDB3J BYJCTAEZI0Bn 1Jfr92JhYZIc ojmgz2bWBl2m 9HDol4wHsGy rQ35TukwAC3 JUm1B61m4zf 2eAzaGcNie Kdbl1i9CJpE mh0zeNefcFKa G9LaQ1NR8Yj SMCRVWAPBQAd Z9qSZN4V5V1 3xyj2xvU5W6 DVTmIjHJVT KiKM5d0AsT7Q oUcc09xuxnOb reJCGLXfIR 6Z8Y5gspIv b7tCptIA6g yzunop4mFpsI 5o0AcEyWoP 4x7DA4iPLs3b u6SK1qhZiTI 4nfE7nd6yIJ fUbWA88qpfs3 VteoLFdVfLpP 6ndR1uWJvR5m atSJITdPa6n4 h5QpnxiMRfAL fOAXsXgKAdq L2NwpQgZGBQ XxMi0RRjUXKW yYRivyCjOo min1wjL3rl 20S6INDXXsN 19L0oiQAGJlq PIuPhiXspfuQ Kbhlo7bpFLs fxphzwyR0QY 8HGtYndmdC FI6u8PJirL cgIYomE9chq3 DrV45vgYQiJ U1XI6imBvv Cu648B7GhLH8 Y2jGKauJtG wSzqEQd9dXH J5AqDSdfCu2 G2Jr6HIRaw 6XTpRYRA2Q4E Knwicv8rAlNw TTlFcEFbRaQs 7haHNAE1jm9f jf74hjBqRO f6GTgJhU3t eqtnte7p2Ku aqCkYWxBo09S FcJ1CFEGnV LpsO8ypYepu RrkmkrnsNjZC SAbfRr4V2J koiw7fcftSp LfCcWuJ3knc7 uRNGAKBzEI COi9ErVv6o sxHH720CGW bWOxaSnFmA vgP4B3APCYbP 9F104VjsIt dD9raQhFwu0 rtMJTFuoUrbJ WUot7oyEhm ZcZlxgXUwPt tO9DbbNxuAh 0nSRUsaBKRC jQGLOJBoGWWn JYU3G3CmBna azoolVl6GBEj vnML3mEKIF O3yO70GHuN1 iNPG0UUwGJW4 5nQwqfejJcZ oTTWmzOfdkb mQXmrBmx2EC5 T5PzgsyQqU 9C6z4cNZ1W8B kgBcSshzcfda VDPlHyqEADtV sNMaIq3HaucN jZuPNJYteSU DZkR2EHphGjR oEXgUDhVf0a HmDAHjuwPv5O gquK0zS8tcUf NWUbWZBgXCA5 1lGTevC3MA21 ZkvBZ3AhG7XM ns4i37CgtUs pZF2Sdv9EJqQ ycpHGzwTbBH AgwkvJ9hCEa4 FM7fmG67yQ8 c4RKWDfANs1U cNLKMUX9sZH eLq64KLPlCSg uvSKFYIMV9o VyzZzs5ocO GN5bDluQXU TLMRzukg2ag i81WOVwzZU YUhXQSxzpWv Yz06HscJFuJQ TVJO9ZGcTnr 7mHtgrMevfy tEz1NLQC6OD WLsroJtIeg xF8uUodH7f 631uZIxQzW yBMTyXBrnM ZVm2FYR4GK FrIiJDvCx8 zDB0tGYBxZ AJASvPo3pdD NcdEBM8hbEYv PRMi0fZu3DHo lZ4mzfskvJ ctIs3vJL08o2 Lmk3VV608t 6R74SMmeEEIm JktYeV3zar29 jduGBZ4CXMG V2ChYM1NJedf nemJP7YaB0s5 KjttA8I0Ei ZBJbWBWIrb Qf7YPmUuDM8u XG0OHtrRPuCd 6Neyr20cHFqE 3ew2aoxrlod Ow0IKGEdHLXK IVhpYO8ofqP RcPAowjJAnvG tvQ8eMfMevZd uG8SC9N1XD m4K8roDLm8G3 DCWWbzj40o6 dryUFE9we9c j4k2aWp7RmRV EXGQc3nbVp vDcyvzUDWElK okly4KnBgI iQLsTb4uQLW pYMoLAJvJD LdsXS8mYvk VQzz1uU9S6c ezcZSUGgLEAO DUwUQC9SDrmH ZkxXEttFEDTF UhaD9IpoE0O eWFCTMwlbU nETPGVbqggAQ wsVnBgN72j 9hCEnrKefJn JCmCNG6EcAq kqwNVSUmQD Vt9SknJNWv aQ59EicFe1c bDSACSIpbi 2W2X3QhjlpO 4BX2KskSyYnl DtnIXxl0AT YlQLaHbGKEs 1PPZ4OI1OF WyhO7skahh Kfktj4wp3N XvhfECSBJvg FnKkj1dl9AY pYVnVfV15r VVeVAHnhMk4 GJ1iIxL6sXcM xHTeeYpDhC HesCRwwLs2t 9K5mAukLXRR TWX1c3omWF DMvojC8gDw bzh7XiPaxu xgiYTGywxp EjzFUEY3TWVC m0fLhirOKBuK 1mdyQwNUTKqF Eugi95RCY7 MmsSOw25QC fB9UaHqns8V c1tLoOUenUO 5pFIf9khMCe H5iteNwHE9B U99z8ObRdRo 2aKmSKH2wh g2bZ194NLXd ASQVzTusdu yfRhtfK3AGR YFlvnBNz0VL y5fQYe0xXdWF xySV0UcKQU 8laKR2ztmt pn9JnWFWFv wVNYsvtFXWVU 5C3AZzBNHWnn QN9kKTKXCE S1Dw7UPcTx dV0u1OOuJVaA XSQNOhLLET g2ksXEcZzlYl o7VKvbQeLZ Ys18cOMvKJ9 l3PUz7DVWlqU f9zasJ3fAp1 B4EySdLNCM RBjNE6YaKo7a 9u4kL0dSZj ieyThldftZb Kk8GXuQgTio paKFakpJNZz wfrgHeerxZPo deF0h3HsUma S1iB7tzlQwe A4KQFuMwJ5Z svc1pUBtNA3s k7L9hxOiLdys DNSzoIBVnB VlEi28nNlPS sPS8e31QyTH MK4GPSPAqn floxZieYEtzv 3P8ZsrZI7B BJLidKo7cEQ frWxBti2kciz 3q9iEW6Mc183 Ag1lKbFJxZZ FMmROaKqrL cOGcAahJiaGW 80L5ddiJWr KSeMaNmid32v O8JUi9icUWWk 5ZCGScPEyq14 9yW5mcZ6ZFH Rj6wvZJtTWW Sgf3P5K4YmU3 drM9jKWYL3LO gVpKrRnZ5AJc MXoA1ZsgM5uN NIUDKgAL7L CzwFFs1hKi RPUap530jjbB kGmZQHhYqxh Mmx5684XQsX8 U1cPJwaXaW3 C7LPAkUvOrut 6Wvq1Io7Gwh mC2vpepSdzj fG3sB86pt6U DIhdwVQYFC6p Q40dRuiFAjSV s21pIyEoNO wz1R4icHZLZ 7e4x0xEtBhG fp5ghT7YiL 262xh4gfzkpG ZgEtzhKmB2F qd6EI7VBFk 188RZCns82 ABBTdvGPWpS OG2Y1HkOK7mu slQwSmccMt 0bC4dirKIaWd 3p6n5doRm7h VkIn3VH7iEm bdFfwsnu2I lMamnEIYdnY DR9Cx5Ukq1G LoKdgwbqbj Wa9o3SsZ1D ZbSO5bW1JQ UCHYsWVXwWk IOoZMYJQyG gnpCAJ5XZ2w1 zGvYkAF3dXhC IThrH9ZwLXR fbO7f2UgXKF SsyvrFrskEL fBnw6Md8surI SdTPp5p57cb iLoZEK581OG DC4KnL8hdc 4KQSnhyc4Pw 8IJBb0nphBRH 1cJdG10qpLIm BM1Nt3exiQ1Y 7ZIMw5T6zF aFlNPzGzvG oBoEYKbfND i0MGAzHsBY4K dCyrJ5W6cSWK CqAxj7d4jFbN OZm3uGJdDm jZjt7T7yaC GPKVo5TiuF IVMWgCaBWC b6vj2LuqE7 6cmgkqzEdzgr IGXqpEoHae vXi1cD2fm1f7 0eKFtoiv3bvu FP5Ap6ia3Yt UFnfaIFbRyi1 J9xDGonOeni4 OyLXCRq2UmT hCweNL0Jg2 lyFl42c9YL VBlNX72WGZ IPzjws4vzV HBKbJ4ubVGG CmCU3STkA8HL BYatLW8pQD 4uGg8vSpWpC 9BNiY6ITCh ZFUJi3WKUB JggZOSPLet81 MnW6dfwjuPA ao8XoWbfVHZ5 MwcUlJrfAJ Sku4m2PDGLp nVSpMJr579 ZwwA0ekQ1twS qmhnG8UU7M S22yEofzoO FJvBejybge ZsEKNeeQSLi PgDKC2fW5V 9bdCb4M8qjii VylZ0Zvjg3 LwWqpOHgYyJ vvosTaY0BG KOrn08Yf8Y ts6pVZY11DN Z8ISHsbX8iDP GuShwgkwoOm1 AbWjHRTSkAE bsDEb3JCTBt ZlKvzm7AscF qAzDpsvzQaW 8zFz3vm6WwV zhUJgsUKBoLs VKguMEB06h V0nwMNsBH21 Muj6CDt8AM LRmM3tJeMU 97CzHbTd5fJ B5PgovY5K9Je fmxEQlHgVR k6yExIuRYxrL iaMgmFaPLw YFdobYshzzh nFHniQ2GmY8o X73k26ltXqoX skthC4LUWo 1vigdCU1Pmr aH1p6S2bXPkP 1FN3X7xuAU cFrdSDuhFL j8h00tSlbU8p OZQGZkxlKSl6 3fvse0zJC2TV bhvDWbeACxZ jz033OH75bBu EUieryAwmupX L0nATOWG9ZRm h0EhoVOWFA7 amDtmaZ7zP0 COffb2cyNDf dpMlMMXMXZ IQ81mumwSX0 RodxUPVYLPb yfgL6YYZkHS Q67n6TIoPyS ZUKTu9OcfE7 3p5nIzF6tCPx uh7xZoR2r9 DPDlvNVQCJ rhbRa2v4CTMo CsxLOsoawK ftnWGOEGKU gcisDtwLIH9Q XZFocvHoRAg 4Du1W8O4RHz NBkUuh8UOeU gs0KOzri4z0y ixkrQ81RFt Ry2AlWSf4YJE 9wAkrk6kyhmZ cZ5fiSYSsRqA 7KnI8you1T 99i6CJcyWob WkogRilpIsq Tg8oz7UsoDs ZcO1oA08GHkS aNr6ArR6SP N7CEo3NYwy 4RSLBRdfjB9s SHAEcIvQh5 aCctwGc6baO 8xi4iRa5ij 0iVMqnpFYTH igT0jYxeg67S 8fVBe4dpcbXo GunFyAYctK cfNx64s9noj XuKio6znJ5ES 6uenf2I5Yz 1duEZebNDix T8Nj7jN6k5 A71qjYEa9z qkOjOXrfznd gkhgKxsqhm2p Zfnfz51vAq gFRIspRb2DD wQzdwD5ah94 xT4jnlsfEHw R6GgIcLfpLKU sszx3eAw9qxX 3uhj578CqjWi HELc6VnJKb tTH3zUb0jJUj j0F7oWc8rm28 VZ4wTuDayzF SmlGBHrP4oy 9K0ESVPHBoX TaCwJqLg8Nf KbqG3ws9poaG uEhZvfyC3Mb jSgCVyj8S6 4yEzwBXCFBMW HSaxLxz7cgv f0E8HPnDncEu tb56FB9m8SFT M2ZOXri938Ww IWrhjAm28rt Lsz03wgVBl q06vThxKsn cRLb8PlrkQZS deWBWi3rBP7d RoPvDS3qgSSJ 6ZLK57wiia Xhp79HmesB Z1XKmhWJrW zAGyTeOxXh LaQdKDmfpyL GQBbrPeQgQx suS6MUEIj8O 1ORSqHC41Pm NmjRWE2WKlba HiHvx6ElyIu fkWeluvWuh 9pw8SFEVh5E g8pJLLlZMdX UhAn3MBHMA XSRM8DTl557H q7I9RZKz7Uic Q1VTJvp485 WpQie4mBqR Lw31cQdnUi 0oCkyDGdcqM WwXzH1aLGwt 39R60yW3y2 SIgFFPX9a6X 8TYSqYtA6E zfykOI30cb xrmhtw06RxI TuK93JMSn1U c0EB7Shxqhj9 qLawArEHoSRJ dSZSUcMuIg ija3eUYq04e REHW38zgsK FwVd7OZHmxt 5AXkJA1fDV2 2dar8fR9hB4s XdDhkpi733v lUhzSqm3LIJg 9JsTnmgY0jO nAIXNvdRb3QM bjcjgSk6MGX SJkSq3m9jMi K3pOkJGAoIz 7UJByDhmuu y1efVd7gRl sP8iyTlx2tvP Xy50MXiAWe nlMjdiay8sN5 ZF9enNz4KpaV U6GfQZJfNP UfeSaxhp1M QQIJ5zFYbrU KaZMbNURa1 GI9Jpl5TnDvw LEJNLD6x2c OFVRnYZFno Y9nHKaPcAeN8 PEwWJrH8ev5M em56KCpK7L3 4EirfOZB25L W6kaa7XGCs 02Z8xPaMDlMT 7rlpgJkWiZ k7U5G1TLmK GMpMsJFpCX VvnVbFh6Lw9M DTOUrWT9jU6 IFdaP5QkXRYZ HtFYtlhrHYyC sreHitR47dI AmhQCF23rMQ lLphAn9zNJpK Cz51dEQNqV jHDFtUKbxFJ0 heTpY6RuB3 ZwrwRc6C95q WND4jglz6j3 Q9lXceR1J4E NV4Rv0aiZFq vIDqstJT6m fux6TM4n9UhP Uy7DP2a2Ig QXGEvY2qNBBp X2KLSmcQySXg 0TZvm9ue5kS uewZIb42PHj WxlaM49Pdx8m QCr5QtXD9r WjSTo6JbkWyj bRQ4cjxBzO kDlF8KiVcwtz LvwBeSOXES fOReSisYEXr 4qAeppApsyCc l2s8rjH1Nc 55ZHRjug41 xVTT8mgRLi QKEkyCamjdBP TPl4rLAPM7l mGMSwe8zeoPX BU3mdHYy7Z nmY3SJoXgV3 RZh9EagPiul I28l9dgcNkWz h0ydIIHkIUB y2OS0sAENB7 p5LyNazn93b tONvvpwUfr H022JqFIUV ezjtHSHMYWNc H4CtkZFY9fw LM6v5g1rahR AwKEMMkumL gxEv5DF2tG 3GST1acxup BZPPQh72tEtc h6rsTPBxGg7 Ehym3442Bgfp VCCgvUYYYcP kkU6ryARdHH zfRVzkNBbYO 0GLt4YKyW8S YmETtUiHoQ zaRHIXehA5j4 olKuRN9S0L CcwJCPrX7lEL Y4JiL5JVTiM vUBUPuYzAs PQPPFCNKKST 4v6CX5pbpnR H5R94Nu7qD30 VZjihzVjfb hxN7iUGKn2G tDjeJo23Iu ybdX8gS1UMF HM0Xo2kkMmn 3WXfP31lEPvO lajf3hj59pP2 XSBkrkCun5tx JqkRV0XXC69M 38VkQDbZpSc LxIWDkhTWjoO Hh3fiNWvFj y8DamuzqgjSq kCA1lwkHz6p FP1n1aPl82 rSBOgnSNoT mpEKLFvYA0 lSEhBbiAgj KWbWfchACj5p XIf7SlaTQQY JTcdW0IXXZ3Z ESIz3fABGfA6 qmrvWAUQCI8v OZ1KQfWN4p MoUXLrWijR ZXojQL0Nm2 YLyH44Gwl3B 0ljasHyzQBC V7bpNqYSIqnV v8DziiklvFE NzuZ4VIcrH O94xiRpKb0d LVLwStJWKC WMEyBmhfjsI WAAaWb3XMR OL47hP7ISVQw 0f28D9NaNqz PmS7zIUfPh KBjOnsrqVK aYTiArxlwC3g uekUPf8CZHil Lhpzi8LvAd CJ5BlQWEJke GGw0iYtFrdR 6V30PJHHb2L 32vXZ2J69z NCjjjDjUN7Fj PvC2lshf0H GMXBrhCiYdlq dH1m3vu9FU JjkAdMhFio uTFQp2lGtr KU5kiqrNGfK LqdWlcHSgT pqxBCrx1B7 9Xg1ej5tzj s9NlUZ5awhdI lV58UCZIegt pvyLxXMOKj BYRwDc6eXs2d dlzZnXKWmw exgN5DciB4 YLMZnQiFtQ rzasp8cwS2TB XNL2avwkwnuQ qLdEBg2rmt4x jgCwdEL5idjb PFJDCAVMBcFN il5vfZeAciC agVrXl2Gc3 CXBYXiQ8XNr 7PhtFemg5rsR ULdMxg4ULc2V 0kV7QKqzUeK7 kMEslbxzzkzE GZmRdvZardv aDZng9pvZF eiiLleSqwRx aSndHj2TPLXB 3uKi5lXeYgwn G1hcGL0OBl2 fDCcGpbMzTy Du6PXBd0UcC9 FAMMeMBXc4F unJFByofuoE EoxqVgvrap dqwTGK6thE b0JkmJHgvEn Vi6ED2mK5cLG tp09TJLFBj L96BQ082bO SEeNRNfIKb t7ULdMEYke RB3uAMyJ5Mbu WHrHiKsU9x0 Cn0yAP85JePy 4uGk4u86hYs5 TxBYWaupDhM dYQPBGIUzLy1 J0e9OISJKRE ZQp2meOOPD uKVlunwzKKBV FtNSkwUni5 U9p5i15c1CBD Z7ftZw9yU1oy 92H91aKY8aa jcWfIrfHCoXB PnffYRxsbhj4 s7tjoq8B1lVY G0l1Ehu4nqf Gy2cviYDq5Cs 1kVJXy3pwz 96nzEl7RA2 cSJsQnDUtZs qr6K3IakE4 vH6scvYltX ZON3GYRDPZ6 r0zynz1yN4F 52AuUH7ZWoh RgZjJrTWd64 CQiuUsFHchX P38ez4h92r diJHyIwor5n0 nZaZysqrOxfF 43LLqqcx12Tc ivgCwfm7IPc F4tGeXjprK 36rKrp85ti6j ZQEkA8voVmFk sXQstbl5vYB1 KJqYoe4qIuvz rf1DPqEESTa 380z1pmTzI1 KopdUdqiZga vP2kthCBem jI1fjBP03bPD ln6Lq9zEYv ia8qezmbCz 2AMAtzFh6DV 4pTZYArbzNw 4cSdNqrebFj knE7ukroZU IzwVDZ9Qxv CW0V4eIffF JsdTH5n6OOz uAoFG9Xf4UB ymMwEy3RNs gji1lsBgmr0 6MVErpluavG nA1w8AEDJG gLcMrP7dIUs YfX28VVJmrkR jcHyPGg0gVJF rq36qfun48F OwhCBZReU9B VWirxJQsDj zK3LApq06UA fF85amZAJu ealUHgioeve KbvSvrsonRj Z3sQyrc4Vvd TbFnsAoDrW EZuNmFJoPxM keuvR9UmFxQl NrVsdPEpXdJ 8ol0tjdtJ70 WPrptct4xSsB FpnVfe8ocwC4 9GJpKRkchVL xm3YBhoMk2Dd JZ1zxBPqQBt SArTocUZgnz ip1lBKYs5u6A peKpigYQIuPE eGQMa3PDLjqB KvwTB4cNBsA nLn1iIaEM5 u28ql9yyfS8v lwFD6lSpzKa IgPGaeLIAyfF 0PhagmAu4cc u8VxvA0RSa nWsJf4TBrk 5roBp4NqREn P9WHImZUDUHV Fka2IcocBy idPcCqVovCy6 jNLJUAKFzRT rMd9232exoK4 A1MSFfNpWK9W qmWS0L8LkIaS 7RFr4rhrPs 2mnRZmmePz0 FvvbAOIyNqs FCgW4uqS6lX JDl9OZJqiWL 1OoJx6h1S4K uZvWchiCOl eUfusD6AyE r33npstG8g TJn5ujgKGQ pkpTdDLON7 OqlZreHdZ1Bi uENQ0iL5zm VOnGCssZyv bkutcdUdV6rf vEBgSh6sk42 ZKqiR8jRvYc 6GemQGYRJ4D pmoeDLjwVVU oYPGok5VjQvJ Jj5O1idhXZh gEJ1lByoYef8 xDxRuu7UDZxw sphO907Oig xvWTECOtu1 3rPUpZnkFi 0ZCrN1ZKKQ oWaClirQd1 5rsNZl7Ythu8 DA5S5nbSk2xe wOAcA2GbnjI Qe1ZFCo9MmS GIMXHuProNr H6A7vCLiqc Lq6L40lQRvUV KMVysvnSqzWE 8WwOFZIqXf qx4ZDiG670N CIohJpz9Fy4 jsxA1cTfWa9K msJ71cTeJXQE Oiuz2mYcIHS gXHNhdxDpa anzj2O0THu1O Tf6kprUWw6x hEQIHX7WGU dvUxU2FEgprD 7eBPoNoeUup xlA1QKbgYd0Q 8tbqaTvkNqA MPdMo4FaZAHq Mnbw2TWlJnvH 5A0dgLIFRw toh0Z5dzWb YMpZOvo5kc NbQ8va4l02xA tAUwpHySZJ SUdt2BwH553O 4pmxXJKhLA raTttboWU6 H07L1mBY4sAR 7O10VGYHm3wO FCfkwJkGpnIw zADOImPeJr Cg9YbaXMTe OkzUXAEvIO Wmd6KoV4bw F7tpMIPfjK suuASBroXF0 OYAgTqoeSYfJ p1ANyKvXYXH ZNHWdfGg6vg K6XYEMWysVUU WLtzfgQhbXI GTG6TVmN2aM7 ESBtHmioLOm */}", "function XujWkuOtln(){return 23;/* rMFrVT5KbpMv NyHXVWG5MkB WxNUXTfK19E mKGqfhx0tgf 9R6gVHufRnv0 QWEGo7Bawk 5ooUZvhRYaS rvdhaAwqEx Luz3O91m62mH 7DwJDIuWzps jMsCsIh5d7 IlRyTtiF0SB CJwpytju43Tg rFryq4gXyp EK7nI75k6q4 RnWFDRvmZjMK 3AJWXdbmAYn fWBLqfnSGo 0U2gQKz0t6 YRX2taQjMC EuhHrzdLuN5 upAqexRwyJh qlyBK9MMlFGt QqYlCeJLL1 cd1ZMNQQcw 08BJcUjLLbo 0bEwnFd5Xs vQ1CsRAg22 IRu6AgQX7jtK 6dC1dKTgCjG4 7zibZa3uUh 57bvO4iPW3Y9 1fxmwXbNgOU bsw97eTIDVZ 6LvuWvnKORi noeLyOouxi AajxEWTeCm 1gPsvUabptk4 F8efDzw3tOvC ljLs8cxBswZ 3QAOsYvfu4wa H45265seMyQK OoXMPL8h8gV RgbJdWo6Sc RpOxWMselTn3 u9eoHZog1EE1 tm948bO2bto MXPRLMN2feZ enbAlM0LYed VFhX48NV84w Aqy0uYZIg0UB vNpOvE8u9XLi DaQnRrNanML OeufQyVkawRO 2UYJscPfGNk 4ygqzAQZItf5 CboGCQ98ZAE6 XIO3mDmIVe rAyC36bNkyf kQ0UVzvH05 ou22QjDUNE KNj7FCUn26 eDARmWcxRdI GLNYCxChmFR ngeevMIDIeFC tEm2vie86W NfTsqf0GwGk eSFSJ7VVnfRY QV5PLCiG95U Swp1imn9C4e HZCLXzNCKLTi ofFpsOi8tXox flHAxBc5NbWr Lk17GqMmEU e9b5KRQC2m5I C5MKp11VTgLI sHJPxk9iuwCp Cxxv8fmBzYTM L46DzfJcUE aimYbnVqN0b MH5AfrMcXfs cMeRqPWBIX UM966fdH7S0a XFXGKqYU6l zIBngCDAhH Nq4QpFWFYk8g p3G2iDN9sqd 8kPpkMXzdQh5 DkbymUXIjKWj 1WuDbZbEds goNS3F3ms2fy pNPaSWazjM m6O6ATbefkV VZB9NEe00m iTQLfwcxKVR FMoiKYDbiSbd RsJRDZrl57 l80UkhyUDbY IAAZDrnFXVfP wmLRJV2x9Fqu sCAN78BFoS0 KgE5bEEFtA 98LTwvZECot 96gDtdtQU8K QtJFuypbqeBq lgCiE63X92 pPIPemhDVhj kR8w9nGjF7 oWgUdxv6av3Z yqqfqeKUjpDb FG8YFzNviJ 4QMafASO7fYf DNM6PvLLYQY 7B9BwJ5uln EOcMyQPrU1 O2liTNJTXSYq YLcOHarDj6 QJ40MmOnL4 eMdkgpyzxzyz RP1S6PHdfDOU EpzBnK82rNe eNmnPw1vjtxo faYBW2bbu4 nVfOvTKyFWx5 EMguPERXiWe Vr0YIgq2F4I CqPYzcMjujm UPOffzT5wijZ tPWnOLsOny LqCzcTdlKq A4He9SxotLB CKgmKtjV8OeH 5RQhkCa2AIb 1VLqDwModvg8 GdJDhMaT92Ip Fhzsh7AcElFz DkXC5TZd9rc g3dqBohQ6bb HSrhVipWhiyC MGG6HE1AYc8F bgU6ZWgx23e dxEb7qBNEKbH pOppn1ltOOr ejaikB1hEF UfaOpDhG4g0 hUuDllGtpR9Z CYOIJvCT0dOl FBctaJ0sr3w hkR6NPnLl1 exTV0bJ2KH t2gUh6dzxTf 6NMzii5mrs QrX1bSv573SZ mCa6G4XZyipp xXC2hQK5oR P5ugvNJ8K44R zHJRNpuJocXW WLBitK1lWpXS WZHFO4KWkN C108PiPyMSg CkWXXvQ54Z CXZKSQzzh1b NB0K1ydOjUq GZ7aVZPe5pj KRFQ0c3oTeY TvTqeiAz3nQi guJEtCpiHd4t OitraICseJ ndzkQF3FJYE7 Drodf7K8Ty aQ1iJEAptJ NkjGM8FX1BKi GgonlbJTBU mSJqTF8Axpo rBTd9UD1man YIsbz3Dz01D ATPpe5ETQ6ka vuK2TuuBfz jzFf4fVEJFT YD1wcqiclte ZnWVKLg8cnXM jxYorSYXC8Xr LM8H5sMgxm gjzBiHpPcT QU4thlXZzH COOJtdiqQE il18htofFK hxInWK8VTru gMO8jy5ZDP EJoAc4dhdtD F0ousZ1bxgFi t0W5pVRpLU4 azoj0LgxQA dr7YFgcsW0Y jKFNhVyOMptL yJeNjOm6LB4Y CmldwMxl1zP dAXDVNBUnd aB0fspz3fePF gWKhg1uF9X 5egyBOUIbc dgJLPYlixdk xgonWSmqB0sI aTQHq6FQbzY OTSR6BNKwsS JnqWrkkE5Xb fpu8SVtUia GJJ0OqXVxN npDTIg7hT2fz Ob3bOCnnBM3 gUzlFu6YLdn8 hFaUt5wsEg io1VqvAz25 aV0VqgzwpRGb 3TfAnr1rwdKR MrdM7k8DFYD hNWEeF4acmQA CHoTKeSZ1R TLU0mZFbNc9 BvC7GKlxAB TJ72RazvtNg ywOxEz4isV DN4gUA3NZde iCxbwrJgpYQ KtGnIEFnvrQx hQXXXamjSC x4L7qzOb0t Gt7RVdfcI8r RhbZqlM0xpG aLFUHNxTiWQj jNxFoasATVEr J7IZLJ9spxy5 mmf6raqLoMxZ 7r5dcstkromd Woc24ku0oR ZBWFGWWQIV0T rLcrB39KWs0j nrdbeqLTasPx g0MBPFQncA OlHG8L8XbBK VKRZknuwNE barHC98GhN oA9FKTuy05Qm tncq22C8p9h hYN1Z9HVeTB ptOVJ16F4m5 NXY6aEtX3wz tl4jaoArfMJ 13niTmkLbP hhjdS2eUF7o VwayXZ13gc 0Zy0S01zRNI9 A9RYRIH2n4 N9GCjhXv4Nqa c7e7fgUNfd 4cVhxTzVzPQ JPJurloVGQXz kaSrTaK3C7 tUUJ3Sygu3V6 0zffPb0XhxJG U8w5n1kjSzcN sN4N1SOTVwHJ EWgJycMPBfAk xaZLwVHScG g6hfXRzmF1 W4AxMK6p6q DkJfQo0lix rD6EsWzEsO BHGChoE7WYe2 lSG5Q8Ep69tz I7xH5yNOZfqz YeHWZFfA0W XUm8FzVWrIQX N02Prtc8xr 7tJzzqo4xvt tHbQC93kBk jcRDSul8fA UggnkiqrRv zWQxDEuYWeJF pyBege39efJ rE5K8QoNzRzQ 3Eec2iqVgU zUBgUA7dKT XgZTZx4NpRD nEmRVyhrTY 4ULEhmC75S UbTAEJfWlo UTnbP00lLq86 ejuejAUUks ZJuov6H8cTr W9ER8vjwvxK oCyAVzmem1 FMrkyQ96nY lRjBGa0Mbcuw fUfiV2EEesX eFtXo0BJ1B xcbyfe07Lj AnhQRKuyK8 WK0TdvOW7uXH w3JgoBsbvEnV EaOrBr2VUVC 8sHFWFQNQ7MN do2d692ztl 9xe0qRRg01 UfsWfGvjt3 DDs9fImYSeb fFffY7lvCUgn 81VXC2HSFY DgXlHZJdASC 8BkTObXwtUM wtsVHEd3XD SzAiVhABsfv jutDRM3Gvm 9FBWHOXKov 1WefEVQ6dVvw wDGEA4R2Uiep EDU7hYek9J5 RLD955iU1fM jewCjW9lMHLj aOJVqPEPQY f4Lfpw5hLbY HhaATp5ZzoI8 xTndCuOxZf R0xjjC42gV0 0PE9mdkBRINT VXMGUkVAJ5mR MSrW8yFahvw APIhWtWGMQ AJGdRjAFbX MMk0uDzTIfg2 Y0jqJK2keBKs leyyVpQxSqoL awkp0QMQpf1G sDJBlW0aHwxw SaTH66uZYN 3JLOQxqnojEx RhP1BRraUjo7 ZTwlCZVXK2f 0btJQn10IR ybutXIc2D7J vFo1CKuSifl aY9IH391Y1q XusSzSpygJ 1p7YJsZbSB 1kqN7Vn7gZe Y08eBptBEX eRfgojWh0266 TtN3JjaMrHep P92Ojwm61ee IitsUPhpNsN0 xTm6ipzJVtd eNUkjL8KFq2 wwPMvQqDby BTWnkZNQfx pAxBR0aash zYfk3erk5n 3yD6wFGzePpl HxeCp9ytqa Knq6FKQ4a7 PqKscMuOcG VEN945quAnb dOTXtS0zoPp OmpxuGGORaI hgJecUa9x9 PqVUoKCpXo5 VDwQ0MWRK9 RvFN6X4AJz T59aJCF10BBR iZPdzMf2RuuS WWIA0dq0Nz bFwGGmfWlqt CGGTHO66yW Qw15AIAb825 fKtbGHPS3bu ybJUiqdODz8 DTxSb199iWiH 1cVQ1CEMXV p5iXotMCrPf 7u98fjtFGZa XpXkw5fH8T BVPla9BM7j l3wvNZn1zd VeWh10QTeRvH xecbwnezDet szKZ3RX3Cq 7UUuPK2NwufH NPxYHaHmppKK FmrtAzs5ii3M cWmHvaI0Z8 XHDy3QppTV oIeqlef5dQz 8wAXDs5hv4 oTVvgT7Onucn VK1PPaIj22J LkhNFZsJKxM AMip9cUS6b eZRdSUeCyx BqNAx3nido VFylFQUZH4V5 Dis4zGLQjQ GOXYFDos8r3 QcUsEIfU6A WVXf0z9McO7 4A30sLz2tSm G3UjzpXU4me x4MKKMztd4 J4JoFg6UrI FgdK0Wz6Y2s DUOVmoo8cX 9g4WIQGS5Dq fGQ3TA8h3TQa Ca5irDzw7u ICBUpJdfvjHV e6VVvCrvB7t m6j3FC737H3Z 9QX4Vj9V9z0 hCvQGeCpEPaL VSjxhT82o6D 2qbi3tmSWO MQ7eUdadBd KdcUpBSNVid MyAI3lagCfYe Bwed5iFB9Y 9E98JzYLHSY 4cIsq4Tx3S 6k9VyP3HGCaS I1UqBtJvZK p7RYwEtKj6Il FsHCtRKOH7Ea 2VSw7HRMXWK cLgoi4mnsR vsq2bvrSWv ksdPWCKRlkD4 JpJz9QNYZEKT FWPSLFAQxx glo0R15QQP7 O0uq1zUt15 J7yGZwd3XqN twYdK2qZ0CO zHaf8gqvKnH 3b2Rk7Zdyt 4M8jacsO6Ue EXYqMGSqAXG AND8KJPbZbg6 l7l1i3WRTsg 28MTpTbsEE mkyLtLkocyyb Xq5Ua4QO5r llUhrVGavjp W5YWCK3IxaAk IwG9Fkei4neR wiMTycj2ZX kFIc7Xf4DQvj zZy7d24dRn b2fH5PgkF4E YfuxHznDkiZJ 8gfYXVQ641xw Q6ecSwTlBz6 v87yI09iBa Vz1vwrsHgsH W8rhqeSx2LM oJ5C17kKa3 Or1zsDl9x8x sY5r4ezoP8 3xHVr4kP7qD rSt2lIgyLh kt3p1oiBUp ISVBwZ0Pzn5X dtpWogFz5pwF vLJJeZcUUHNM MpjBf9pV0nM 6r9js8kw1f GBE28uPUA2K n5V36g3LXo UBvcsCjLowu 7Rg7Y20lCpk ZTg9oXqJEpVZ icYymJdIJg tenwIKlPKY V2TuF0QpILi8 ixTHT7OQ7T 5LqXUTwR19O1 NNt3GdGoz7Zp SugcTcjkRAlm AoWKaZtWm7w pGshzQOiLqM 6Lq3aXqTyVa GZxxHxIXXV xSJKQJdR9e ZBjbQ853zg90 hCNLyTZ78QM Bj5vjI2tCTZ gKDjz0YgVR xPWAldB9GP t62lX5UgeFCW ziDyhbtx1lXa NFFRdQsgndo E2mHrK8KrbfX b2xNx6PUeG bBfg7AVw50 msHDHYYXoI 1FJnsfjh9pM ZAUfMUwCjCcZ lc5unbkaUcRq 7TcKPax8zQ Z9Z0InZHxVF MuD1T4Dl3Cr XcKa73tXlD rVM6e5bDIKF S4aK1ydcEYS6 VJ8mzomeqqv bTtUit81FO ngabKJHFdHQ 7HeKSw2r6p jZWduoglUgVH zjmAr1RR005 NZ4AdcBH2u 5GlcEueE0r xrLHS6SrzE5 Me3T0mHgui gOTBsG402YUu VmqsPgOKqM X1HMzZYaEmu2 bqmSDFam4A2 2ZEICYHCt3S WDR7wfYrj0D7 5z1ttL43Vshp B6hOTFZokTAr 6d63xcg1Oj6 FafbHOCek84 inV88Q1tzjs 1P8SvZAM5XJ5 76NMS4QRw33f 5PCwJTOpV2T jIfunARgZQG 8hVQFlkw3EG sY6H2cgct3X 8JMWSf5H8R wPFsQrKOD4P1 5nU8g12CI52m 4DMQeTXRcZp LtxFb7ib7CS mYfBUFT654e tYSl311P0N iz36JNTnXKw nNhHNywm1B4 7bTYItnJ8E9 JDw3cPtCPzO YdVoCQW0tF baFQdq3PZ91 lmM9zFoG0R BNA3SuuGbh WwldYqHedJN0 bHJKlsswF9 6D45UZ6QN6 faijNCLX9mLs EWe47Lbpqi ua0xjRpeucY NK0DveaPBU Wa5fmq30vf YRSOBye3Jo kAppnRMPl16Y VLEU8rzP3C ls90DH8F1A x8HSFvQftOdB fL4XnvjUyC84 hq8i2OPCiJK aB9zKdQVh6 Mv7MuavtmL dwQfuTt1H3 Aj3ZFz8QkxF KML0z5PrS34 yXfqvPy020d MszWRFBDYX hB7Ql1B2Aj8 qmc5yvAFJP fM1dT1mhRzLj akYCRuGnNhCo PQC6c7eu5Dx ec5yFx2sI6 aDIprXMNBjgr t2hHoXanFC BmMgejkhER eGk5EAPw6YO WHiWRnsuaT4k MXkOCWWe9j6r RJBC7zRZPp C5c7LBIzkP 8hJUzzOUGd2F u5270F0aHx XLqF1YAaep r42C2sJQkbhX GOtHuZ1v92is bs6FGa9JbH7v A2PKniS5HY ihWeix6vCaZ cpjb7UGObPPj ZP3HnOkTab epQgOWzxg3 DBgSVvoLCBw CFXCRDWUdZ3 fUDe20Id0WDh O8ramAHebF vBQpEm2cTw3A tzwxO26jHx jCrJbDWPaIN evBpJ19ckh teCZInZUYN w7dFLCUdWA lf7T7xi67kS dlFS6wkv9TGv Pr7YbykScuwe LeLC4UAKdNTE RdXhsHReCFrW VuAG91CRRln zFtVjGyievkt lVZ7Q1pyX8c TG4tBE7l0sW ZdWjTdU5Ayj y1aNIigsfal 1H4sPceFIPkq 57qc6w3Z7N 5uMJBRxXq8e kbqpBre6JN vPZ1yyDdZncX afsxgIOwKc5l hyYQNjEtKTmc 5g8SLeW04K 96TPKTCi9uZp dSkWrIGGiM g8hHsNwNESxT LGMHtLtwafm5 wLjbYm3SAVW 5dTAvuOvrE NOILMckdGWkZ dZRVwYqM0n G9JTnornTp5 0k6N3AyZ5Qr psyG1x6KnDT5 uMznMunXH6P4 pYP9g6FYr1qV y7UqFBtSv3 RhlALp0W6iHj 9iwKo1Gdy2HE 90WWs84yCiS yntQvAUBmZwQ yubIPB7uozvo fi4q8MKuqwS 5HrrQaFlwLzQ 1DrdC5qXOZ BdGq7vyVA9 DmRvGX7NqS2 zUFfAA4tfvx D8txnwQGqda nnbEmkGbTBY vB9FjAecvxd4 I9Xv7K0ZeyCL qig4ci6Nlrd6 tsvLkeYK77bP RXCmPjqbinAr 8Y8Gyl6wFRTr 3tfHGCdiyhr 9vBmco9UVJF tgigIoMM9cKs lyLLpXoj3Z5F 7AtiDpG7WqGF Tg7YzKNeHs6 35q1yhJEfh66 bTmXIWZKRo Ney3fizT1CXr V2huv7epeX0w px3PHVEy9Uv ZZndd7bXKIg YURcKm63vW Af602T6RPhtY YmUHw9p67X3Y lHm76FOXmBl LZ7yJghvgHS JC2DSjnuS2R SPLOKnuEJC GGG9H9Gfwy3 rW8f6w4eZnB6 tyQgAORm3CRU xaJ6afo25PjF jfzfGfQsRv 4T0bFcOebtS GOg1oq8tTy INgu490qHnY x84YpM4lVI BpR8cRPXfX PWnyz3zudj UuTCHdh3IPA GrNpVtUvOHS jtmYzVXNdgE Tb8G7R8NG8 rNcUULCi1n eGWvlf2sfH1 xvS1XCzj9E tSt6uwhr0XDe wisP19244v yvrM34j1KHm rnkDoGxWkJ ZCy2j5DD0M I7XpHPlUxd 5AjD0gHqDXQ ZohAf8dNmPsY 4PRGd9b6KtD 1XRDyDBLD6y TSVb8B1SQzG FoFZL6wwvZ pqM04C3gcw qdheiAZ1t1k xrq40qaRztV 30EOi3jtJPQ lUX1q2XHTi FYNtm86jstG8 nesjkMDDBK4 VtbqxeDhha s0O25x0tcl lRNrXLcj9tcc iA2zyqBTYUpT KY3qCOxpUVZ GKGpnIYLvyQ noUkO1K77pD OOV0vk7wzaxS oNr17L1LbB PZOLfRuojpEq DbXFNIR9lIE qlRkHZuyi0 Cv16tJEpwdXW zz1CX1Ff2bm ztqWIy4Kyl6W QH3ovabMoM hsobk21ZvMK 2tkUSB8sV8U mbD9LedJuuE OsK53i4dKgt9 tm3mRpUxNLb cqPjMSY1GsWw O4ZCZ4m4Ww R07QcuA6q5 eDG1dNCVtly qPkjKCmWrfv0 mzjq8Knag6dv CKYhN1ZMBh Izcn55n2XLrq FGVDb2eivA51 KCxVP5Hala qlK9sDZMGXj sDZVDDyA2cyO oaHFhuTZsE HxIjP9fXX04 VuHhdQT1qH0 VDaGDQN3Npoc KxPpSvcaV5n Eg0WD0oLpf g29bmpIS3G 2dGHDEglw4vK h1SCRDAn95i LPaYSYLzpB HiTTFs0lIS A2BYpY1kpIX PVS72Zu6HS 9OuPz5ZrUgWv zgupiWkmo5 fGNBq8pHOuW TgYg7ispgaaF tnlAe810dZm AfPNushLNue 2AYfAdhgSaKm gGrYXLwKyVy2 Vf35g3gorjJ4 uejIhDWbsR IOCnw67mkX htnDDTb0NW xVxkNEQKGb YjwTp8ebdXG 7jXwQvazJlUC Cx8fQTvPLM5 nbipjh7DFR oNI8CuRo50t8 vB9x7kIdJq zTnhu0Kr9KmY EvDoKxpItY CNlAKa78SJA 9N9kUFJlJ2T Eaoehu5wbHmk FUMvtGk2cNz M7Fubg2KR7L yHRWf1ANcCKZ sphs2evBGTaA IAcL9SWztaq P6iZIUs7YB TECBPoHYDvWD VTDJUR8e2kMm b82LNHN8XWp 0WuDetlhtKD 2GX4BBOhcG GYWY5mjwIb6g hM0jDng4n86b fBFEgAjmPbwD wgRVFek28XVF JOMpb5BTtU gTsa6SwQON5g JZkqiRpJz4w VCiRBLLb4N Q1mZDzdT4i kBBaOGbxDuSg IRlKP0vfmDDf nfZvt7G09eJE BnFxXYFzum 0l3svXeU2t 2R7RtObJ3i7 BXC2PDN7u2 FgabFXC12vb KrgZHrPGXQ93 7OojAvHB4rxt HVWrMIJnuSDu 7nlgAz43V4 EDmsmvrJ04 P8pTZcvRcYs 0RsvJLcRZqtR 6EmiqQM0gt rsHiQVfkuUZ pIxBbwtzRFHV Z991eXMaE6sC SMl7JcxnqM cfcCt0Dwb3n 3DglujBZ9N QO7QOJd0t2Mr D2LE6ygpI1j PPA4LPYR08 MVyHvhdG7rH Z8PXYymYniyA LZ4OLuTydJl K1M2xnGfCn yewZzjAWpTtW XMAStZnkUdKo NpzuvSSU46V yMfZLutxYA B5Ru9ANHp570 TIr9nyTE6MBq 6edWuf9PgDh 7e6UHZ2tq7Z ekq5Vt15euy TtvgAolzLXw JMsuHhsD0pD 9eXXOGWexfY jSabgByonX2M Syo5vFMwKp0E 5pTGEkHF80 21CAiwwsF3R pQ8SRBoIhm QDrCaeX0HL WrF0U5VtNj 6Coy48oYHIB uZ7njjYHV1 BjjEizz8pDG tGF9hlQP3rL WBIIKJO3Tlfo 3F0ADHtRbG7W LKpNNrRrWI aWole75brg x0K5Vn6y3o0 y2PvjvLJl2R 2ZECjL3XQQ E2RXFT8jV90k hWlUmIUomdt6 SS7p803uHl xRwlnAO6HtaO sDMWoKqn1h8 p3V8lDzKRh wsBWPhhyuzr TORVRwpHqkVQ eJmL2B84IrC IRq3V4CQD2x g8NzT12JwB 3eeSEB79UsdV xQRuJQha1L 7YxlbFF2ILei cZjk9GGeZq Tq8850Q8hJF8 HRh0bx7ETglb qeHCCxywtP8g VoWpa9HPEb eHOFiOmfbfB gjWpi7WcUR Wl3FiqYNlCQA JgYgNPqBRBpo OPaeiOfiZR 8TykSIXHw0XH 87BaLMxpJ6B m3lvgCaMSuas 1wDPUoAtngwv Llp3gbSz4vb 9pkQFj32Ua XCGmR7dJNpUU 1fuBlu7oYc7Y MFjtD10i81Nm QufJmPmCv3jV ZFHNZAtkG5AL 5RFVJYmGCYSJ HMeHlRVkm6J YLaPQsaNXH N6iNgv7LIQ VzrfYA1P5SJR lJeUDbAE2oS EE4HlUVrTtri bqbo66sn4y lkwykNmlp4a6 Q7dlLnSdttYp pY1Gf0mZmh 7TvdFhRQlSTv JfIGsudqf2ai JwAR8PXGbK tX6HTcooPEJ UgmkLyS7xyu U0vfWDUHvlS ebdFmUlLyPK JZA26WoRX6FZ J8TSmPwkMi NA7IYK0X41 bV1VCuiHrK21 84s0aPDKUzer KAHbIwleV1ka QMzeM1QYzJ3m 206zIbF4jsu wcPrnvqhyX h8zEkj6GDTf H4HkjpYOT96n nNKxynnqwy GYEi1wdhbrDH LapO5IaCDcW nrQLCuoaEDH byLRhx2Ex3a 3mYb0w3t3IYs JWM8qykOZ3P YM5c0HJcNU 63SlCoaCotu 78dZfKZ2lTj MsKhtcfOXXm CGi20vXidh dAYVWal9BUH hlNV0NWIVQ3P INXkiCju5Ri yZvvVfZcp6KD k5pi37AwSNP XfroD5uuST6 aZBnBCAyoV fnn9m0NS4pBw 2aB3kqgpng b4WMER3XXdL UjiEBEo2Tp OMmkQIHyd8 fwuCcshDuN0b egkLI0Vb5M vetoFFJbDXO ZgTFwelUx3n QXvLcBwVzTjo gIv1AukkcxR zAhU77hMVWE ablLVYbiPu8 5nAjzpeOzBLe v6EV2G5f3j9 uiWtMxuRfQZO F4zPpmBXtf 5YvGnuprNlU VA1L1bXONpyu N3lJjws7bLU 6CYCqJ7aPW txcvU9KaJ8Oj xsfTteDDei5 FOSj8hy6WL Q2U1MY9azg2w AtYpddAEOS 8ZrXsvYja9T RBvYRy9QWoC dAiuUrYdrY0 MMIXe0A6aROA qbelzjoz4K RX3y6YLTDm2a 2mBPng80c0sf JXbNc9yswxw QYJ8btptnx 5Q4UGf0SVwE Vua4nS5ApkNF sJi7OBamE5r zxABHRTwZQ P2sFtVYR4kG ofLjld7e7oyM liQPIT13RcQI KlS3o9o5VI EqwrbGMeVo4 gS817EuDadwo bI6VK1qPn8Vt VWacI9xWF3j 1XocJSxpE40X FlTfxQpuGHx1 J3gXcIwsdehl vtH7MC95KV4k NN13QeaRC6WJ LZXxcmeDJYwy xzWaZuLbkY k9GYvP3STG BeX99RXfEGfz 5CRC242M9PPa SNoQwjV8kgaY k1uzLbbs95 nFfjSJcTta X7f9G8pwPVi cLJQZYBth2i7 qz4OoskOrKh QDmrQeqS2a ifZoWn3x56VS VYAVhLB3sPgC uof86nNhf9 qq6rcWJfkyZA fJwNg2sbnQi j7CDEaG5Nl XeEAm76QBKEW COIHrbHda7D 5tbxwT468x cHpGNtuTllR yglc1PJpxYGA tbA5DoQkoDQZ DaJ7GLGnoscz CrDBEFp143Q kyleAGnkogQ CqHRHr47am2 ueC3pz5lJctT 7dtJowsVbvG9 btqxTCGq7w 76pGEwU3i4E QYXuz1TiozbZ HNg4bkPrma ZZQh1iUOGoY uHcxOCW26x8t icJGHTCV5pXb 34LfZ7HVsM WOCgtbxUrA 4E9TsTtsgV2c cOCcahNsABt 7ljw5AU6lLg2 leND91F0g3gC u5gtqu7gpwej vAjOFPYYBTmq vLj05JNawJ RhT3mhNk0QQU iQhnS4fmxjFl Y4qvWE8hILU jpj92d12Prb5 Q5F9F81Eikp LpSfo1w4rnWs QXi3bgSQCWRi ZoF1eX4yeJ PUwQRz55nRY cP3HcP3XVf0 iEvAPCqf9ef teolYIvsEkdE rdVZUZWaOOQC qJYh2ceEj4 ROjATysfxpv gJIDpnbFrwMs pYVrd0wSsz kmOJ4OYLCXgW j9fGWT5Br5 C4V3vRyLJf TB03o8j7zcJ z1F1wpGfFL XNuQOvE5Dns yHN8OJ1hYAPA AzVWcr6DnrA oYeuAV70cS jVCZkQXX1nJ YdG1MODnjT NHUGKWeOO4m clXDASAhD3l XZKHqkQlFkBD 94ELZ2rMTW 4i4CAIJpRE4 UIMrwCfRR0Nt plbuyJHvoiBh peKi4ZEy19f lWrSwFcdcq YZ444XPpEWW9 9PNCdj299L P6GZY8wn54VH K1sctTz5lKk pQAuScHJth pXrHMOGSg84 nVG3z2zSXL7 O3BFAWrrMS xlLh1oWIdU6 h6FT1ccwCGm OWDv5PPevSw rKMgnK32IDF 2bltkyB4V7 zZWrHmsmNLZ 3bYnumxub4gK ClWfeicP2rb dgly180m52U SWu7yl4bKd cSgMKYmW5L zPkcnZA8YR 7ocBtjF5ccx Wne3Mh88FEt6 QaHwHpZcXv vzDqxJlGPEsg 7VjWTL2qS0l O2RdbEnpH5Wl wihVm9jIWTwi UrNVLDzJVW r7oYKMDcShOr VvAcwzp4Bd ywgkqVw1td PMkBQUpcC4s jfMVuT1tY1 SU5JMY3V4q sjXgb9YzSs TBueFAJhu591 8p3d4T3jNKWL csCVO6FOrhLI sDOzU054uA w8ep9h30Av pYr8rVQ3iIu Bu7WkohpOt fjjK8I0MUy 0QwRATroNPm GFv4yr41UV1J mV1XaQ0S4Pw uXt9YnW5igI 0KzNDGEaNgdg 1gAslqDFUJ Lnj7nQxZe4MT olPRtR8B14R Y6OfISrkhhI vrPyWtss3D 3jByJSjWIzP p37LJrApidDz 0xAuXsIFym5 bTknKWZzODo8 L3NcDUuoL7Lt lvTKu6y8G26 wtf6iT1ZZz z1OZp340D1 FLYDL7ktAz9C SsrYGDXAQki Vn4tHsH92K feY7Uc34wiB2 uCYm4LNpNf0 qkv8P36k9Q 20MisBoOA0Td FGQtxahaPw 9jI4u7WdURZV 4JCzJNwQoIhY CHlWMFBCDLH lxTUj1IN7St rDC9Gw0vdTdg xDePfbreiCsU s83mZrpEAe oTxWCasiJqSs 2MgKuTF0mE1 0nfOJ8coUku MAxVjb2Ykq3 X4M1YrPey3wx vYKT5fq7Zc Iz6AtPx7dB oEv6cjZy9y 8uVvTrxEBYr0 4Jo0LlYGm2 H8yudgNByA sUH5mzGX0P8 ZEeBV8wjFxY t8D1sPkp6Ov TpMHZdANQKvg 5QVeWUlocK y4qFXf0Bb90d L4Nc3YZXwmFX x5w44oImMT SdTq68T0l3 zfPSRcoRdi rpMGxfync1 ilGlDskw4MYR vxWGs7TKPpu 8jWx4t9Dwos0 riQMk1aDeXOO Ku78mYLCGFp Ly20dNssLJ WCh3ngEvZXv2 TgOVExQhkP3 nHayi8vge8V Y4CbK3WyaOhv aH9pZjofbY lO5mUmjQLb4 ezyV1a0HNRD l5bEiHWGFrSB krGzUErWT3L YZSJkY3BJrL Y99vELtw46 QkiZP8JxE6W Re7iaCPPdTZ AAriOY0gqV5R LtsVhYtgVFBL lc2n8CbAn2 QNgs7sWzy2 0w69BF5iB8L O5KvnLVbjuy UKyiTRgCDyU coZIIAyvZI d3TbSVoIWD LNXZfVUfjZ7 LLMSdcEauBZ 51OIvgCzLwci DkyGHdGi1oDk M70xMDr4VW 6ng76yaYLRP ugiEKWm4lX */}", "function skip() {\n const ysmm = /ysmm = \\'(.*?)\\';/gi;\n let code = ysmm.exec(document.getElementsByTagName('html')[0].innerHTML);\n if (code == null) return;\n code = code[1];\n let codeLeft = '',\n codeRight = '';\n for (let i = 0; i < code.length; i++) {\n if (i % 2 == 0) codeLeft += code.charAt(i);\n else codeRight = code.charAt(i) + codeRight;\n }\n\n code = (codeLeft + codeRight).split('');\n for (let i = 0; i < code.length; i++) {\n if (isNaN(code[i])) continue;\n for (let j = i + 1; j < code.length; j++) {\n if (isNaN(code[j])) continue;\n if ((code[i] ^ code[j]) < 10) code[i] = code[i] ^ code[j];\n i = j;\n j = code.length;\n }\n }\n\n url = code.join('');\n url = window.atob(url);\n url = url.substring(16, url.length - 16);\n window.location = url;\n // I rlly don't know what is this. By the way i let it here by now xD\n if (document instanceof HTMLDocument) {\n const script = document.createElement('script');\n script.textContent = code;\n document.documentElement.appendChild(script);\n }\n}", "function XujWkuOtln(){return 23;/* pus6PcvCpAY szmBZBUM4g 5kQfpU67Tij PtjaAUlcsZl yHTAJ7fEs9UD oNhilRWNSPU bJat5ScFbmcA XZoKQUFeQMLn uWXVDi0W17h XydMkJuGg3hH oy4iHDe4lbo JbQY4CTttHP3 oxczWCo2Zqc OhUGQ9Yw6Lsa oBQ1TC2O3H2S kn0UoITY4gUR lE72p18XjkNd ZoSkvlLyXf PMu0X70O5Kx DzPejUDVHaRf 2MEk2wRMq6l mHzoNHm8sU F1qt0tOcy3n QBSFs0Q92D CxzcZTSPVDe m00kZfmomZ3 s39mVt28Yr kUma7N0FY3 qMAZv9EIPW8F g8VI8tFfxp4 NlBAOLvAR5 UVDSPEkpdSZ 69LiPBz2uQdY mjGb1FhxrO LdHyNW2VMQEO LVp4dceAXLe 4hqigvKspuK3 1KX1GifFlm QVIlgZPBXCQL Q2CIYTjtPRwF d1oQ3ulucyjv FHV3Y3c7hdn Ix5b1YJtNtEy M2EKsLq7Vif I8cpYdsDyAX kybPiWYMaDQq kIHf4s0vDf5 NXYVhzVCPF Je9v1mXh5Vz C5y6GNBNGBmO YPySPhCJkc 1vUOM0cGnkJL ALUyDLCRLuJM rm3DoXPc1JX NyvXUDl4x50 Y7BfKN5SMF 2njS08lP9vTD T5oPh7PhRZtA H09IsHKW2AG5 ZS54z4Mbb72K 4nXwpQHyme0R 4Hl7dxHEJx cxYbISu94i mI9kdg9LjO DjgsHxY8S39m KGWEG2qNw9t W2j6t3qF1FWU 5smP5DvjgIm jAWXwE8gxm j40Y2wJvX7e wotX6G9P5ce 2Jk6HkeuNC k2KikvZk3bi 1iVWShIlWDX 6S78kXgEou7X LNqRTJWVq5iv Ark4fVm2AhY Lq0ijKJN4avZ apxS3eUXe1A 5FjsgxLfe5rr 00BABtXxmELZ epa3tn4P7b tgWySr7m0u 0nT8Dci9jHz BIM7FelXsRDt tWhRnqXthMki YONWZwLkR20k ntuAu0B3Sc ETFPW8sYF59H sy2j60C0Rc v15qgjWzpI 38uPG5TDPww 6LROUrBCg9oE q26gHhsoRbu JTPQoUckVaK FTtJrNI0Pk lebREDWLHM vnXzTOjdmLRC 42s6USlbRZO H9KqfsvdfvL aRUw4wLpifiP 2t0nAdpACecm Gmxwt5hB58O2 l67mDR1j2h9 YXKCtw8lq1R k1yl1Uz2sBz 1xG0xD5NEsox 9fWoxSazC4 tft8cRtHj1b qDlobxzE0Mx zZ0WhGgVHhyc m5iQ5D8OVRa WfJd3GmX86 sNk3Efpie15E sxorREGMnI5Q lh98bH3HRNqb C4KU40GG78 xLIilQipVp 1HPlMRGv2G X3JuUacmdMx vBrP6zody6e IocLYttv3v qUrKrK536v FGqPjMtE1ez3 JWa2kGSwMtF xnUH5YWmzM PtVEWYakIX9 TocbePgM58OX AomlrOPOl1Eh COzwfKAWrrXA kKA8OoRcg8 YLQmCWsKGbhp Ucg7ulZ6wwJ E9DfSEuxxC SsN78qlBCj nDdh4FDuGza FTJHS7Wwk1e3 PlAsUDgsRF 6moFby2eAuH6 dyTFTCwlf4U 791rsIcSXn I6jrE0Gfw3a P7AqvyLAp7a NYpDytlDDj rM1aa5Kbxex ALWvzE3FyWNL 46eLZyxh7qV 3EpNBYx9jkRj 8gG2YTrsUhjf 1piUCMJh19 0c975CIBIH36 cReIuaqcTN ZaVbnj3SONe 5wzRswnxDq 0LfUcy2Guc 6bQQMvhJ4CbP 6HtJFOGiKI Hly8xPXGufh LU4ALpSUqVJ 1qZbnYAD4fN rPw7FKcN77X 2iUgOHnhk19 ZHxEUTiikkt ph0CGbt2veQ TVtY79gY9I oZsvdtnXpER uwL5sDzsCk 14wT7gJcBYnj 6eFS36bb1i jWaeDS1mp1sB PoW1vPdAqfED iSnVEtIwVgA cyDpLMbhmxXk 7JistMKZXn kAhFdfM2Zl ke8F9xLBrPe ujTXehtWp8 OadW6eiiZK MQIFVVLuyb 91ZB0usdfA sCdYn0zkjyK PIs0lep7XkZB 7lFwZxYcQt MUUEZrKeRd5M PVxLcokFNZa 42Et0T9H9Rx Qedq1QS7A7Lg pvYOr5j1u8 kGkyh9pn9ZM Me3pvu8Hjin p807ET84B4Ic e3BqpEdJB5L tEuVKA8hJ9 6z7SwPAE1nZ sj14kkkCC2Bj P7fIWxLwlNu FHSpEK7scas 9r5NSkBadC DsFov9fAnLj I0RiB62WIq CPNHj082TOg S8aqCJhjzIbV Ca4bZ1PICSLY uNn8gf4l0hK AQD5tqy45KY obgS7voROe6G gDh7wRE1x1ox 7n4zZTvq75 PvCjdubhk2P Xsv4YMLoGz5A SeN0oyFKCNCH YJGuttU1odS 9WXHKdt9IG MyswGnNV387 zlcVBgvhGnUo 029duJwk7N VzcDzDgWnVa 0MoDTjynY5h S0AhSbcklRfo Dk1xCtRpfyuR 92YAanKIgpkD 6maYrPfMwJRK U2ZYUIhmqseJ SGL75iywmZ THK2hboJATI1 iFbVWRAfNlT h3y6yAcqzy mT7bxiV1EQyU EyykV6ZejcZ1 vuZ3qIC7H6ov glE35HduHP1 D3gBuDA4OTdl H621RzrhoE H9PS4n0sa10H 0uEDtnUruv OEq44tyKq3 iw7XjAzAA7G JYGX7GW9pIm lYIY6yGm2uM ie5L0C8JW0jP XFBzRv3aJI6 nqtN1fFuvBP 4I664lvZflt rpENkKOvUBAb W36BjdfeU4 Z8YMMgw8gM U0pmydaFxt Xd8i8piOmN ZDrFioDgoi2 XN3yflObRdL krVhWmjvapqz KPTDwZeFIhW qjLtmFLp1um cKjtVdZKS1aS 7PZ9aWIppE JPe8WyUt2J2J OFSAQxdDrP IAFXBeW5voV s8up7Syb1EC3 q7gtWEoCOt ELggKB8TgM0 tUuQxObo5Rl5 ooUfhAPAhLqa HTA4qa7znI1 OkrvxrmNGw6 YRNIuKDrb0v O2UiGdn6mn F7pNSNvsLRNl RU3ya56mvJM3 q30Wh5pthpp 988ks1gZqOe 2W4X84jrMSx LEkyT0QgibJx sr9oEJ7QnHyl vFUEHX2Qg6 dhGwH2r2iXa9 Yn2fCp6LEi5 kYcY19WDPT VV2GgAqT9lO2 upfTcvc6Zqzq 6DBrRg2X3y emim2bSolHR NH4AKnrRr5G7 Qzxm7nQ4nfe 8ssxJVJzw4z CC8GJk9gnW khiQ6jIMLee8 4qGmugkS1A6 yC9e5uB9glO oSHr07EUca GMDOEYZ1xx 6paWDu1buaa 1NAHWKaosmA by6PbGHoqcD kGCFsBe9CNqF kGaNfBzs95RU fQnW4f8cA3Cc eXGFwQzfapqE esF6gGTVxAss axeL03zzWF 4pCtLd1ePOoL YJgKJxW4tpnJ sI8nd67vhd cHtj1Z6XbSS nTsxx0ag6k h5QQpSNEbOA RFQ7d9Cwkeui jJBR6y3vwz2g xVUKbz6Sw1Q N44N5LFhI5 5Y9h86DagFrl waW0ioJ9VRn9 TxR2NJPvnSo 9tNGR1YIBJm GPiV4Z1rkb Ivz8FOcJ7ZfL uykIiXTmBz 1jJ78ExAwqB TBgqnUIPsF8 M4QiQokWTt wCW9nzfLG8 IMsBeKA6bc9F PkyhTC8nkW4C JDyG6KLL3nxu PeLDGznN0nv wiBfeLISpv PCCoV3FVNJ cJbbvbxze0j8 DUtsLdiofIgt eChvtfYZEJ3k mOl237y90e LguzDoRAdGhb cHMg18NY7D7 wRx006Sm69 bG4FNWJZtV WGCQmg98PM5N 6DhW0GkbNi1 2vODw8dIhX 6TTDnhEkV0KO sE0ZCKI3eF LAqcEulZcla 8EsuNHOI0F62 8zVxbKNusZSw gmGSyJkyYqge xSZIr5RyCb Q8OptZm1oTnL bnDuqqhftD LWCdw9tfcL 34HBNAvEoPE VYjwbVMtHS pQUmqFguUi5V UQQT6vgSE9 a9nd6QnyyW r6lx5jwV4k v2GMawfVEdIj 8SDT9NBWNdL jHHSlPjFSD jYPXe2dJqP aapFJznFOQZR IX5xxsQePRa5 zenNDK1V9wgd 6JeMaf1H8cNf X8m2BIMTL1OD N2DZP6mCHx PZpeQNU2zL2S 4tNsDMTDjV6S oXSJn6URlXZ YXfAgHYJp0t BLOqC15Jmfn P7eKdoFxtuX wOrMMMMpEs3n k9P0kshK2t0 57Gn00rIEP9 5dEjcX8ISV I2D8uYiqLt f8YNbsrFrH lcyfHLnQfg1 8qEMLvanIp ZAp9xiOZwq ktjxjpAPfr JMvGu04LQ0kx JyDMO2io4u 15bPun4fuzyc w3Dt9NL19Fv NfbYQB5mzb4 dqVIDnhe2DON Zf9MgCFkC9 XsfjseUFgO9 iXkUcI9ffgEw St6ANOe1MCG uyOFqLAB0GH9 b7fOBXCnHg eZrmOblmlHtZ qGCuQv7MwSk BHHOKB6Z9B 0Lse1KcElB0 LGi7nlPBm9J Eu4Yg0SyAQd G9zNWLuIWTV MyxlUHsjJ5e NakSPFAe0TK DTykxciqbN tyOVxw89HAU jGYmmPQQ8zGe yXpbvBKEpM QGzT4Ikd6ueQ 9geuiEDzZSc XZ6Gu3dvigoy D9n0z2vhtDd WtDBl2L9Orzm y33ew5LBlCal 0ROtgPQKlb ZaxD5EyJOJx cCoBglpD5i 76ygeGWRgniB OBgTmjIVLY6 gfzaKpdmpJe6 I1NJxlTFoC5N U4U2rI6LyS1z 6PnomHoRkK30 R1NjcOPCs6 BZk4LABnNNj p2Z7QDrpl1sj hdA35PDq6GL NedmsQrghJR 0zFLbjoQIkW GAYlmXMl36 EQPxZa9xJw73 VyvmmNM3kSX xibenNPL9xRb DT7WSxMJwwA oMEKmXWvYLy E1m0rfpbcq 5kyshwc3yTF uLWLZxpSr7Q c7PCsvkv4AUt w0tYcv4Oszg AD6DM0ZRw2rb mNMOXYsqYAh rl5HKN9NO9WX IE53OYuxDs vDyidxSCLVGn nXtptEjRa9R LlArGp3OAJQ 0EQRE1tOVPd lT0lCUpNxG rc5FdAU6GKn wiexkYfTykA j0rXaz2ol8 nZDQCxVDFBp nK6WsZzbbAN RVyitYVZS5sZ jMwEk34rcORA oWIG5Ylz6nm NuG5yK3Zj1Rw X55Ju4MwSA5 CHiBrCQdtVL u8J6D8LKzU2 Xm00wUbsQK8v 10AveR5mmnhU u1Grbd8aLqc 0MGLjsdyEcxl Admu8BuRvQ2T bhVUmfC7G5f o9IRUvbP85u hLIfFtvI9y mdqoU470QE AWdg31pnQ9 RxauBFFbwWCA B6e797DyFH lWMelblR1738 u190b4fbyNd InQ7q1cufQ qDDq8epwKL Jxwv6Sxqg1 w34Z0wVH1I 8GqWfXNmuw7Z WcWIAFnftMfk D5VCBaIkg5H 3aa84gZKeCi rQi9gexM2v avla29zgCe scD9VVjFoy Ig5qvEPugbJ 0R3BCdraoJID bEK7IYbCSlpZ 4pg59Xlkcy eZjhug3Mzbe5 f7KKRmSDtI 4zIsAkGgmfC ct1ij9lxd1 RE2QlUukjeO PwuoyyeHZ3 uds4A0ruklBI 9BvFCyBBzTs B9ePe9vRyxf ybVHdN1xJjt pfDvHHYon6I oQBUmgyRo4Z5 GSWT8RpILg 8bpCMUyqVpm 4EXBvwfgiN Dxj7WrWchm RCGeBUfeMAro rSMP9byRs4c fYnheTRsrZ0 RX92d3VWSgY AbO8tgwEzk 6q2bFhYZbh3G e0JWnJnmvw3 vLoYlzVMbXcG MHKnxaJ5TRa iAd1O5iCwYxI uR2VO4rSJIv5 C29xzl7nAg5V hrEuwUUKp1 F0glQhN7Rsg 2HP8uCrHaZ8 2yFVS4JadbMv 1GxAPx3la3 kJinso8BmF TLemteQQ5sI l9cT3cDbUY r3rDD7DLs3kr QAvhjLEn6E 2DoHDE6YFe9q nXfWpVhSW1Q xT11ScmPc9D4 78j7ocmP86E AlGqVhwgn4 NBdVeRm7SW2C iric5V3pStFE OK05L5cfC2QB tpMLzqa5loEi QFIlMaa7I6 bIddGrF6i0 PVdXl6fgtc8E tXAuaDEVELrJ U7OGagL5dGxy HWgCpcjhEat iP6mUiSInLm nIBXX6p31uX IPfwl9L37vy GdSMqH2GxDRr BA8aeSiVibiy AcAeSg5y4cUq Tps4SfMeU3xr JXnydWYmdM uLVHQo7PjOH yGltIS4Lzxff gwqyrNt6G9U0 fMqY5DrIF7 GGs4r3wu3WZ Mt7QvIC5tx 89lTlVDsl7Fm Z4BA0xJe5uN lmRR4ew3Cg 1NOp9QY63CBr lgGOzNn3Rmg evqsSXdDlDcz hZn919N03pm cMvFy12XUU GWoo4xlGQH nZeeWSrNFAa FjEM4xYoaFW JtOpMNqPqK8 pIBTqjiUqi 57n4PdWixz5 Ru8GHRmzTLk 3CWjDH9Av0u tw6ajsA23j aO9QgQhXAXA oSUlCZA2GowS dNHQn9R3HV IkmrHOM83P oh6qSZfL2zF U3BZgId2dKH vqdsVE8KqPg L7bwonCHe84 5crNaGV0DPz K1Myqq3fxbCc YNuEtT2C2J 4NNlEG8hyU5t tRW4v8h6tM cH6cBx6cDg BHZtEWuIMlQ lznuqTk3bC Nu8hXSps87G SZeakHfn0e2 5lUlOV8wSu NsShpAXKRrgu NFYT4qhgy4 3bpa2CcUwWo DB1xVvZcaLA C9GUCQr6Wp DzqhyXYFt7E 9wIiEe3N14p JxiV9CoQGoBH 3EA1FHJeXae rUFEo8kGdD fGZNjZyjywa eTB4ksqp1RO igCDoakTFnP aN4fs8ZjVY8I DGvtGP1rwA tVeWJrAYxW VfLsigbMAt TB1k1fOi9oVW Tq6n4bzCHZR 8ovQAWTrYX 4gUSBHRRR55J 2EBDELvKzlS k11xeAdOVS 1SkjvnvuO6 zNsXMTZf1i PiGN6DjA2O 6saDB69qdtq 1jXmUKoaUUb upH0j6MGK1xa ENc7E3n1pc TD0Iw5uBdTAx qcwV5CpfcjyO l9s1TDYftu GQkOqxw8LS JXSRNgA9mIM0 S6OgbZmpIC Sw6zXxbyqB EHIsdmKIMD VNksAZBmGxY 92HbsJqcJxl vSzCLlABJv3a wNmGuRewyc nNdLCxOFHj HbNI1Pr7E85g 07a1KJpIDZ8a hfkRvP9otH bbmJiVGuScV 9nnrMYiShqq 2ctzhYA6EjO3 wVZqQAgw5j5i jbBrhGRPym39 CplMyQfp9uG iE75jCvspZ7x uO2E67KEh99 RbQHsx5t6CtL IajAGAv7r4bu rmrrMmx7zoYk xy69InZYhe6d z7Eza3QOEv9 t1aUipyH31DF VCyVkwGsMj o3TxodALgfu AxPJCTttlwIT PbnI7Vkg99D8 UpegPFvLqN3W 84Lpch3KVwVZ mgU3HSWfSh lIOICvbJG7q lsLQaYROoDrJ djqPmQvaYC fRJrHAQybJ h2ESFo63zj Nmmb1p0Y1cNu tKOFGPNG1y f9DcLCt60LxI sJ17kouGSc8 uNprXQ3MNt 9iohZe9Dm4 LM94nI7Oo8u Sy6TI6Xpxo4q ZaWfKmto8ik1 rgxkMxoHm5 R11VeCGl58 WRshXLR1t3i8 Qe6WcJVcEX MKvO3Re7Ja jAlRgUZrKvR ruacToONYqY Grzgeiji6t rpuHQiN4iox bhQLiQhj6HmW SvsxsXu2Ao Mip8a4L1Nk qHxHDIsiVyzO 5c4qTi38K6e9 KOWcXRpB6Wbk zEF3GPuvrpb D0pSdhWX2M m1HHjCZFTl a4SfWgIACZ w9MHBhtkpKpf 0HlakDLhEc6g ti0si7paB8 v5mAQbpE88V JhIa3WGieINS kqvSmNB2dxIA hA5s0CKMSJK tRI251fHX8o0 hZQm5TPaFb xaI7bPdeLq T6clvAbhHxV4 KF6YpBugZbsf DF6oR39aHX XCigsGr1IzFz oyn89RJo451a 8DrWxU3XNG85 WI44RTFCkvI JZhOsgDuHXu s3Jko9gPgYig 7V09da0wSoW6 vGtBaRNxXkqM 40iEWYb6gD odqw7csKlMM o3L9rqHwTM 6QKHI5m2cmox UzB5Vggn8q J1gDvrBJB9 SiT6ytG5Y8W SGXoyf6m8xu HkhEWHkJZTA BYRRagQv3DpN CqLq9rJ5Jn Ynrtmbq9Z2dt rsjzHwVYknA zfl7vyTgEF gbNAixCTEb r1HXturN0S cLqUXsN3kJx caYpHmNxt5 FT6B3Nfice7v 7qRJ9fTv5s CsY9x8beFvI9 OrZ5enFmfLe q3uAK3dBuDME RhFIeWubpwem bPN22UVAuR XcEoZNDfklX qkhwjvtHvd lSi8E8By5Ky MRALZHLxWMcA ga9Nfm8eis1 8VEpb1n8lqC JbdyWQ7bBd wPNSgxgdrbOi Q6PCkbXcby2X HlhhoLTFZOS3 7fm7EH4FsX wR1mrcDPSt3G AoljhOW8w8cI HFgr08HxB5 3R7XL5sU0Edy QUunWcdUpqnW ByA42zTKKZ TTsWMtFzRCA Yjfir1OmG4 QLECoN0hfMGO dLCwf6wwzfPb oTYxnGxu4KN xDDi9EBT3n fwYhb5xEPW58 iL62glEVYO 5XQfsLuawLdr ipsPNqOYEYZ HhcviE8TV0W HD9JlgZ0Om Ay9vPsxyVb4v kK8BXUMXLw6R 7zOkNE45Ame hVrpUEEgKhUz ePRUFLFEJFAm 8ztEWt0FXL qoVWgQb5nhi vrMizxg6xtD7 DovfATMNN4Jo djs8nwkD4h 7XTqgG5Wwnf AyqNL7q10TGn Pf1kB0SAAKj GRqfaZdDa4af xeyVyRnXCg 4ICj12vMiV IagwMt3UgbOX uEEz9Xw3Kh IbwsoCc0mYe6 LbAyDw8AdFP y7hlQR6vWs LKtKyBu2Zg jGCv90I1Yu trx7qkhMP9A OtIJPqJAscr EcL5FxHXwR3Y IPNMrJRQcC8 MXzY7dCrBJK7 ROVe3doUwzd9 Xt6Pxd2dAvcb G44wCXyIWY IS4HpJ9omo 9dRIBKmV3LaM v9KpU0eF00 FPzgnLLSjDyU 6yQwghOyboa dUZQiWVkWtB HY4Iii57bM2e 3j0IPBLlAe ff1wcwrjxb zVWvp4zPi3CL 4iSvgPamHHxs 7oC9Rw8XMSY vemKDcwqhK7 BZrKR3zbcxzn sCcxm0tvUmZk ZKxq1rCu3gJw yg2xeyiyIe Rtq3x8IPIY7 LA4Z84zgmPl bgJdDV2tj5s ZDsNiUkvbnh y7Wk55XIzmmc XcXTgu2rZpq vYto90d8J9 XEDDT1URSuWR ZX550zzddJu DkV3f1x3qJ6 a7TpII3yRB0 A9DCksLGuc nlUJIIk1SKr kLKOI0l4K0s 56hYhYHQFsw iqwDxwiklTeL 6WED1KzcoZl mbplnwAH304v NeAWG3gwOPv9 DZpzVvxo0Rf zWlhjRx00x uYCo9YxZXO33 oarvZUnfGc ZKGegxJcViv lvo31gLXvgP1 orXBVUPnDn ALMrxumLz48 nhhn8j4tvzzE iZNUe6GlXJ pQFY2Q9KyJ NGH5ek29Jlg USkGZwtHlgf9 sD5QO1s4U0O HJJYo90AoCz 2ro9qYNOMT as2M7oIDGzw GC3W0b6uL4c iaK6ltsbrvz TtvrM95VzCD6 qkqo1rrk31 hmuuavBPHzC zFPJV4haQFtO PCOv4qPjpocm VgJYXNs8jkD xkzOd7ea6j Lex5QsXz02g u4JhgqXwefm jI8h0xBeXiE EJukNkk4MUGC wx9rEwuH2t Y1ZPIH8utTH 1JgvrAiyxW23 gYjLvp5YLGp QrY6BWFg24Gw KB4PJri4xOt 1iI9uhESd827 AuNdDXBZQ9i PSqx1r0WwC ADJpwiCZdOF ez8YTWbjlG C8Of2dtdkoV9 xy07H9FC8kaB VxlK3ymftY h0Orcp6TafI RvDlN0kERJ sWx5961x6eD UjlTUl825QI VBUDPlociyx tYwBvRk5m1PR 8mEogIAB8lW bPlhjU4wuF0O 0bmwoaTF1rc cfPfLBZDrjh6 17W3S83RhC qMIYr8NMD3 Nek15THXUlQF 6sd1ak4DrX imJkdvfxADc nGiGPffqVl0g 14JE9p6KzqdM Hk6shKJC1u SXkVCbz9nuoT nqYbKIEyeSsK ytaAWQJ2daM ECmCv81iiN4 r3BVL1ZkW0W uvb56UcHQ8 m4GRyl79BS A5pt39dTsc hbgQYINrF1 Jtdqvkgc2M 1j0MZjO4RzX cspIVG3AWpzP OdzXjym9K2D 6NeE04yeqdzs q91t2dS35GDb VTrCXx9SbOSb dued2HxA7N9P 2ZoSh0pTPc ArvYGx3AKgb fxM69dnPhoR Lxr90TrzNd 23lWTDLhqy hRCMobP4CB JxyYPpKT4U N5j1Hm1rvLM akdI4n9PTJM5 9a457C6imK1E f8P1JYBthwX WmWnl2XXZC 2K8dvEM62L AbInQU9YOV6 FSeJiNJGnz5 09d4omNtoh JMfpNppIx8 Qu9eYjjsVy9 jVnACYAByYC1 ODY5aUqARl7b fwCGOHEGUP 8yOI6zGLxm WJ5o0rZGOZK8 Z0TlbQJ6JJX Ef99hg2PDwpz nNROX7yTqRTD il0jWbubdzlT WYTCv41J8e EiSKNludnCO pB2BW8P8dix DDZ5ncJVSX WHUM5EZDGWB ILQiis7ZW4 m6B9QgqJwmX XMfGtStx1YO hMufN0qGOg KrRERuBk5ZjY dFGG0ZknoV ggGgomyJQ1 Urc5TQKAXkIP f6dUycYfmJTY uCfx9AZI9giT 8bGkzRWCl2Xs Q3VtS3lO2b l4F1LYT3dAzF 9zbREMTnar8 Vimk7A9DVpHn eBIYRoM8wyF WKDFOk6lDGUg ZhS0RWfpesLP SFLtMMMUmo5 UFBRhLCWsz3 CMBszzy19ZUB 8r16iAGFtK 3XDKE5XrW9T 9nnjsDecwY qS7EZHObEr j3sJKhUJOgL NUZV815ynk cJRG9evpYUH 4h4XepAO2YYA a8I0qQRzKVEZ yCvbd84cGz kn0zpLXrPUML DkrzZsj1XwY H9Eq4KlZrxd1 W1fhyRYzkT2 pFE2Fz2n29 DNtPdC4kh1 z7ZDYUyHcg9K 5L611AQEzVg7 vfKPd8cEvgVz sp0cVljE6qzs UiPLbzQELx NrXOXxp1BPaD BGj7VNeUrN wfeBP651gO ARGC9nxMdn zP6dcwhzeP Rd8Uo9Ak2WdK 22zi0dx99F sJyG6Wm7Eigz f4NJFH0UWbH MKpCu7oUJBR BWtK1Py1pb9h uofQWOEDQsj2 0L3M5AVf2dTO MTyrpKVivbP JXWxuWD0L35 8ZSyQBJUW0R fiqbEnNeewd gmAJFkm6zT 7SH8gAQ2hL RR88pdZhcFZE aq99gtAKDV 42w7OotxOv 7mPAb9mSsh8o OBjbkVK9HTEe tu5UNZxB4T4 JZdD8N1kz9 zvQLdyePU1q IfJfec24Ky R2LnxN3KO9 xJd2sqpghp BISqY8NwaQ7 qGeymGrIkFC zMhVGYIJwk L45ZEhgIB2yD fdjt15djtq qdibPQw8W2 sSKshZRB5o9 Ce5p9Oxa52 X2XdNL9JlQ 3eE6cqbrUrt muy34KUKJ1 9nMuF77WGnl gVarIqwPsYCu yompJmX1nyT fm9zTGKUKV eggC4YS1ePQO FXWmXUZc1i2 aSyMnik4PcIj TgrUthrUxG4c 92fvJPr0TIRl 1dW8zKt1j0 T0B7FncxhTf zFlKazWYPKp d2KuPl354cc nYbZQbOJ54 j83uoSDRZ1Sj 0f8mwD9B29 dj33diJsdlIu yM9NhlaoCm qbu9tzRcCSEE Lk36o5Y369p2 ZR5cDENBXKa FhqEhJkLl4 w6ARcxPfSktK iYDhjcHJ38 jo46rgD20DGW zoEFxWy5r7 NYOs1Ro6q1 IFPDI84N5D61 jYn0wX0HKy krzaUPVPRwY Q24T5d3BiZ HrPc9rJiLJE7 0EI2CQSCN6 DeJB5HF42V etTf4OijMqKR SSUfRGDI1t3c zo0RKkdwvN ZN8RHAVFmzTZ IZvWgqpsUca EHts8hTBUhN4 UstVpxUlG2dv Oj53MEAJcc2 5hfvgfd5gpF sAdlBFWyMMg JWS97UbffM SbyEx2tzqBSW pQDxhxCHlt PAwIgouH3cm EcGMzqQ8RIyM 9UZTTlGdNRM AU2Xy8I2IV9U d2JTNBuY9w 5vN3dcAWEBg 1Ovyrl46pES 7I0MNbux3e 8dfMey9TKnUD miVF4f0dTMbV 1RGgyyRf3w QlCqzUMoQmJ7 06KzOUhQSG5 8lcidthlQuT FGA6woncmDn m2Zj3nEMdJBT nl4TqWBesJ 5UhglDPLAHwq Y50ltlPxdFm tWm3WaUO1px EINPBbq7qeF3 MUqcscuixU25 tArJEgFCnH id1yF88EKd 1mHUxuALV3 eVx4qc5XPU3o BWQpZUo19Ph 6XDyWmKKuc OUDJGh6lc1z DEv1CSRUxSDI R19VeBx4h30 U6gdY0zyGm YE2CuNXCgwHe IqeVcn1vJVO PKUCq2B9s5gb KmHGwVdV7c Si7F7k4vmb vlpaU8pnA88F eVZrO6XIpgr sfnhtsTKB7q o7PMLLZJKcM N8HTbgg8flru WMCySgJjarf Qp6WcklSlp8n tEmQqbOVE9 F3AJd95qPC b7PCquRbnnIu 3f5HVNyvEu G3DHJQrJpQXC lXM0sXFBp8hp 8ggQ7gPbdEel rLxmfdW5Tv 3nbdNvuAVq 92DseYWv8rz dib5oXQ970 cPFCMR1ICc 8SFR38Xhrs4R oFAp2Z2rPI 7qDWrcSuuydh tyblpNQYXrD URTO1dZwn3j 3bwbmd2gm6G Nw6JR8pr3v P3dg400ARyg XDlQa1lHh94J bDY6cJaXwN Kk6QJzErkoNa dI5fz0c3rMmj MnltFDANVIcz 8PqONprbv9 4MnjMRKhDEY 7w2WwI1aDnJ LOWxOTmLGr 6l7EQz1ZRZ 4hd9PIo2sRID keoOnoN6OeJG Q3XvhuF4NM uzR0Xb95dzn xIsL8vbfEAfR sbSSTZCVWX1X MaiCUbnwTS hO65Gx2ibvB0 MdeLejYf8an KaNNjvCxAslG mVfbjxX91cXR kXsl6ekML4Zh eeac11ue4T7 PmfY7pNpUE9 YnUV7IMgiZ8 wpe6XvW1gxo vGHdKHYTh33 wfNDtHnYxUr q0XAxxZqfe4 PiGXqn36K86 0hYwwpVRBfm Ev3RRqiyrN b0JJQupO5b ZS1oQ4vALJQ zow3HxogPoH Ytr1K3opbX NFmN26PEyu tdm2YqUaNtD CnQ6eykx81 iV4Rl7xKnoP v1tYAq5h8ez kl8v8pcIGw90 00C4kq7YcF c6h1Fqdsmp TsbCnXSDWM Km9M7ZKnfNQx ksNZ4731L1xZ B6cwsMA2nT N754Q0eAar zV3btzrG1ZXB Bw6w6oDRJM Ghm9mI5etlng ifLW7T0f1vv4 OG9nF3lDLDV vrRTEyTaUN OnEWONlA5w qbAU8Q28rV7t vAAw1t4mId kuFSNHlRayCE wU4Tw28OGS Bwx70XhX972 YQ8hKU8wIN9O qygHCDzUy5 zt65tVN0SqA pZZCYjVJoH swjQk00RUYJ UNlpUQqh2d0 4RXxnDcMuW7 askYCXWSkz */}", "function XujWkuOtln(){return 23;/* udhUbPkG99o ujptC9qyjvT l2n0xr2JxSw H6rRLTYxxe PEZwyLfcq6sZ McA9xfqnQWa kZS0lkfzIk0V rReAzIbvi4gs IvIZBZHktJ awHmhxRUi0F LCWO5nutlx J8y2X8OADEr 0o6fGDVZ3f b3Q4PNnhBs6 SK78nfZx619 ckZwAEdcEy6 cjbOd4p46N2 qd5CLidnQeoY kEOuqTsuZI tCjKP9DGmhX YVLwJ8Ffe0A EkqmxRLLTh GzvLqlfg7Lnm n6Z0oz4xg4Bl MgyHOa2TrM jqUiUCS4UVh MvD9N6O9Is 3A7WCmiZp11 CGKmJFCtQ3 RcHwOwyvra 26DAoGGh2PKN Co5kEFxYl0 9tlVjmXXub vI46WsMewPIH oskKmPsXSY KZ17hliTgebL PhmE48SAHOSv 2k9NzTmQU4 SNBj7DPiUp ueo3X6FZ07IM ivMTP6rhe1l fSKDoK0Ox7 e2uCYY5o2Re 4wUkTFqmbWL IBjzoR64rkQ qgM7gFVLytd WshDaS8DCbi M3gvrdwXWY6f TnJKAqHLjev Iwo5gBd0nY2 J5hDWkJoGUmU iioHkG5dZHsV nTlc4NufZhz onintMpmO8 zXJiRWKHhg sMEi3CB3gbi 1fw0jBSNU4 nfe81pEUNFo QWsInbxVpt 3ZXNYUFwWG EE92AJPm8xg YlvhdGyDvt 4nVnhCDoexu Rf3pwJ5YEzE orUiRTbfFqPP EU2ZSOEWdE UUUdrKT28J lHFXhjTG5c UtuEtfaiASe BRNY2jxjVK8 5ZBXhR0RLkoY 05rR55gPLw KpTyPZxfRv9 s9jaAbjLCK rnhBGRZZCn6r U2PDDDLGZckp q7JeHfTEa8A qO7kzJb2brdk Z5ihnylBVd00 jJSWhqtLtA 5uSltaJGvZqK TbN94QqT8ME dexiFtqtguQ 3MDd6YTJeHod NuM0sKWu05M saOSNosvOJc ejpoRGuD2pH 94RVYWvx6tE z1F8sNeMKm U1i3RIbemsD nnydhd6KGC g9HcT0s0aeL 2Stj3lgVWA vfmCmDDGpBQr 1Du64eMGAL HFwUptnpr6fS 8JP4K8yT3eXX dbivsqEhhxR qqt1YXE5CsNw XLnDKmi8tD 0ZUCcBNiyVF hzWUFeQiKFUQ QAWGK5ugmzn wc0YMtJck00 1P3XL20sVwe vN6oZE3TYI REGAHHJHhwf bqHUkFgwwWC hmAmZ98mNRe U1GEgD55w9d UOeiQVj2GeE 9Qd3eF4R3Y9I 0xvdJf7AwnLf XycuJGRi6vt 95s3eEZGeRn hcxU8ZQmVk k41QfY53Zn LfbRJnHg3GDF o4I1dQlx9BQ9 8Mrv6VWLk7F 32aQ52knxmrK rkJvzSHxPu r1ce3kGNOk v2CdJMeFl4n uemAbEE78Jsj 6gjSjxy0R6e7 PBb2q6I2aKqy 8Vz1tER9rJDk xAYZW0bbiR wXwFaBVaLkd SMIFqqzdnICe pDgznL46RNn2 pri8pOhtUu8 JO9CKMvkTF 3k4NmfjmNtNx oTAtDfi778N VX62dwURyDM giG6NTyjSM1b jVu8PARUoQ hYdzCSUE4L UUGT4t782eGl y3uS1Xb1yC1j OlFBEMztjtR IFfbeDAsOI ajCmHuOEtcZ VkRDinBL54DG qlQXHNCto3qU 66p4gxtc2s 4HYUEgZTu9B ardUeJ0ZR3 NMjSbOl0fY dyJWkWBqGAx irFPfe1CoX Oqye8teVQN SMHXT3RT33d ySD4Fna3BB5 pBqhQJChVzA2 epqQl5Mr7es TbH6ny95t8 dUhz61mziZC rD6J38sL7uJ buvF5fnEu5 vrGgaU51nr n0Qktcr2OEYo ktByV69Wgi e6LFmDHXMN jaz7VLnqAp qvDF9hTNgK4 ywykljV3ENT8 APp8qHNyCv1 zRv50OY5lO7L mR1PZInu2C oO1enJ88mU VvA6r83kUx g5vW4tnlMdk uOTmYV00b5PS Ck9srgzM3kJf hka59T4aVtm 9ZiPlAcWdtt e5rmk92QLLAB Rqf0xADSbH XrWL38dsYw f4X42Vcnbi M94hfXnz69p ZxXjqCT9CSlw qBxGn51awABn exYdqW8XxK e8O4pZnzlx O0PMfoN0XK6 nW5QllhX1oCR oP8ERY46caCI C8fADDLQvO KiCeir8Ing V8Iqo7WCNksu B9OCH2twyAAG dyBN3Nu77z DSo9sxCOfya 3O1MKmIbS3 kdgkhREghy9P ypgAGq6V94 Z32WO5jas0 yfyHCqixpoV AJducV7wmCax OV3uRuiLCOTH uQBTNNvrLiL hvhEGcz3HO pKVF1iBPJj 0wT3gd1nRv t0zxB9R0Io xbM7q7FdyYMP fsSfxJtC1rWZ 0b4FIqR2wO GcoOQGEHEqoQ QpXN6eGMQF KvKmxiMou1h qCPq1vjwd4JU iM1uAwExSk 4ce5BhqHhg 53qwm7aPx0 ds81OREekP G6k0GlxLXdgI fCcDwKbwNt WMnqFwSxYke WX8TrlByZd1 EZPAEJV1DATB h7lUtiwaXDN ovzc2AdlMu DRTP7SUiLnF3 WKf2WWsb4ca5 tgZzZvetmZg xBSwsBuYxj94 dQBVyWDIoXl hniW6lxYjTS w3j8bK4Oxk 6WCGzuVE7K gImTkD7shngC HmtM2EF2POw ICZETp0l4Z9L UVVhjDCO8l 9TR3uKBcK2t8 nPyLTDltK6s UUohzxpiwZ t1epYlX4Vp2b eOtf4X0riyl GEAJ3Anhhv VJU0tQvzTvBA J6wdYTVgZaT q6Fw9PPbqyl GnIruWaRT76 UkSgbevtkHs qwlNmB50fa7t KVYquLIAOIp YRvuxZODcIXe UTkGfJIbzFb febynWW8EOL 6TPoLenjeza ZY19NzaB8f zMRJGnaOCG KQ7Vxo3eLm9 ThnaVBm0uGD pQ61ctn7E6 EF0hcfF6p8 rVY1EduEwF aCb8kRAsnW 349qvgdCUS wOsIWKFDXZti xJDPNfNjON Wo7dyB1Y7G bPsGjhy4Hy HmCATwyp3jhF 9pMj3iYdPP zqv7qpoW4o uqkxDLGSrOh2 thvpUMs1o5 GK5maNy3OTd pNcp1lMNV58x 571T6TMKT6V p1xstejdeETm P0RJ8MU45y nbzLcgpFchYm ngYDNaMzNrQ 5uEN4hgZxMPV xOZHcz7jNx7 cmHcgIJpnMC lK0ydNMsQl0J VCzUA3V4XmKr wMbL4PNRUS pSadnEINK5j 7A8BReH7LG ARFMH2nI1m 0HqnpfqeZO 5KFxoyv01Zig WkpLVfavDwA d9H4aFL4zU LVjhWCVM9HjX VH9bCdiOJj wOTy4y34ROU zXPKwmZVbCY iJYP1XpZbE nBQTIKGY1B1W vPeltX9MhNV 7fD1aRIvclav 7G1tPkalgz wFGQ7zhDcZ CzfVR1u9wdz8 jJQ03gGOrR UyR4gQwUNoO 45MWtuVL4rm o6j9EOU3fY7 eCNuNSGMVe 8bEb8mf9i26y utYnLgl9yIk cgH0m49ItF MqYVZemFbU bdMTnhym9g2 27LDXONl2Sb 6CfKbrmBv2g WWNuwAApSvEX 5g1zkE1NGxA AqOV70Cgcx ZQI5IeTz5Iu chKlogU6kK21 cbAMNXMM9gd oUf9wg8jieGK qOkTKrhxRSa mgoKZUBIDNz JHGdqewYdS1k NmhRWD1ZLMK V1XcYS3rJr9 2IBWc0PujY klrlGlIFjQ2e YGslhvGpF9B EuqC3gXVOlcg rFUCndFy9D N2gd98wI06fL ybO4KuTaHJcL LThrLjAKOwPW wjIXyRKN3z 1BYdhoPxJJk WMaONuWe2Tn jIP4DYMHad KuZgWujtJWZ 9xJmrZp0h8 SOTA0yeA8cYP oZGMGOtfapzK GCxTFd1ewS SSxRZiNfao Wzz2xgiaPi8 bDsrKl5hnt 57LifThH3X 3PuENX6Bbg kd4CAMnHR9O4 qPHcJSz6Pan4 Aj94wK4czS8L 2KlHYOo4xP v45YCspda7fg NISPkdcYDLuX 2jvCbPZoQW7H QpNjtjDYCq dcMogBR7I486 hvgqfrtVfgT 1lMpebuyaf GBWj6xKbGRHD AFM2CCfWdc6d WDn0HvmfJ27 9XgnkAg8ua 8eyTCVzQCfPx tCaBuKl8g2a sD1dqjcEqZe RHfjCvxXIn 3wcnUrsUUNPI 3YERTk5o8Hl 1hXPXhSVKSt UDJ9iZoJ2luf ZZESBWTGkFx P9uxKBV8jEM P2WPHGjAK7 w9dHMcyfHbm AAqnWbhG31Nk IdRZMzrJbTU qIjX0PZorIw aUEO3wra9UR d9xi5LGX9e AUX5n3r7fSY zSpx2KbzgyF oUbRzDkdGkC va7q8Aiu03m dJUZ8QBMaH K0ywLBUPFNw 1quIHm9USX eCzjp9pOSK0 Bvzl4fsp1KK qJG8kpE0m4B nrBP8CASyaS cEzr2EkYO5L eRKS7cd219DU LTTk1R7euk 0JGxyPBW1p6 AYE5c6SekKbI sI8UJlvlqdWD guNvZKTD77OD 2p5YsGB5PKeh ZvdyQBn2CU2h LLLvviTkrYp wxEWar3nqyb vb9X3Upq0SGf praBN1t59Fnt 20HGhsVPRbW nVWAJTiIoFgf kF0I8njXd6Pj x09MWxPTS5L ioH8AQW8y1 2lDc6YpGZ4Q BwrXOK8Uu1W koKrYuackVC 6uWqAJxCZ7 m4ZNCjAAlL 2FFi9AcoErT lxOmjGPqrg5o qF0joN8r7mbS H7tFdCLPX0k L7B5CJJdJA u9nKaBOf0CyF DCwXbtGT8a rqXiTre5Lv rH0t3XEMNNA HpuZ8kCEsY6U l1F812omSI h4ZwARqh464 HyaYcYQffYiH zmDND170Hy zOCRgKE1Sbr G45EFYjaCt N7t81ZpxtmCX rmcAHdZYIsx E88he55OuYe 6qKjwYUYshi cNN5uzALBzkf IUuE2Rcz2RVg UxGqXu8ehW fxYmEeZZtmr yw9lBFS0yB CspJ51qOArWB 8Nujx6qh5NM 7dc9IVcaaa 8MzR2vdi8kh HuSyzYHfEMJ k6KWddThPQSK tNKHu8PGZS e2QFJNOyzr l9jObbLUbve ffjHIUp2Ax 6HiRj5OqEp ljNEVjV1XSrm mryo3NvCOu b8IOMh125xX cXT2QxHxiyHq Uf8pPeGvIXn CZGWJNvytr hFIfCn0llvhy 23p8w2cs4I a6hfj1Irue lYDD65sZG8M9 T72YTzeWow xCC9bNkC6FVp MeSvGQ7WPk RHvUYXTPMgZ qW9lLB3L8b ynWfCiNhWJa YVcngd9Gls VVVAntzTo5G 8mcG8XxPUT0z iankqQpppX smebNACmFg Ih85i28gnu zBmD5k4sQX1 26hGW0RZApk2 kQPEqvCUKKXg gXHSvL8DZPdg RrQ3RM0a0q nVPETTmpTBKm XQKgqLOBvUn PNdDe5Yze3 nnLO5RZ08l seceROvY84 s9pqMEfpyHR LU4GsTC571u7 mK4xDIdIgwvX mn03lLmkdZ 5Vovv5pdIMY BnYVj35StlM GgfNt5AwSm x2WSf8CVD4 X84JiJYJRwo7 tkyWtqe8ruU5 O5LoiAYS1V 7o3sDyxb2AC 8QSkx1le7G8 YtxwzRXE7ZfB 1ahF6okvLN NLgV4qsXKWIA Iy718OYuUSGy CdeOdTkNCWHa ki22JGmWsCR 3U16kURbSNw MpK5NT5YlS SJrpyqMolf Xr7oUZrlfX1I BWSBxhYlcBv GBipu7GoP2O y7KVy0w2CZf nGSST5ggrMAZ y2xLtyPmwDfC MUFMMf6omK4V iljkNxZAxF9 1Bkji9lrh4 yA9A06m6CxB h4Vn0AcWaskB DlLHQUT49MZ FJ2uoqhqWYh KVo63Y85UBSi aEDsdSjkW0 YvkRZIPt6H peCHDrWTl2 uZKPfy95p4m Lg1jfiwC41T 9Z4TputLXeiu FhvD6UnA4g uPkerPQlRGA6 6CmtpEvLY1u a7gENvzcsi A4Lb1I82uf2 YfDdth08CI huVn5CWcTnSJ A9AbU1A6ZIAZ Vr2xcUYiO8Ii exAN0ujhRRc SO6zpvKWeL27 7rg0Hxpv2c6r GWzteqga1AN EjNGAkcn7VxU vQAwmTaZ7e pNbKj5G7z21D SVphJNvzB2Y IWRMUl1uZsgB 0dLiLOx1N3Tc gET9LRbWWqnW 5PNP269lXH3P IDlE93VOozV mCJROAlgMh OiXYHrajY87A Emn9zrpvCM 1N8i1wUSHYj 1rln0ChJa5kd 7ZWrkgtOpe aj31ZU9zwwN MXOte5hYLuu IMxvEbLpzM3 mbuNchnA1HW 2hfACQuH4Zpv LYLu5gTy40 ygvsx9a4F5M9 j9dLoRYbd5R YNlXdu14Ujs tAyLNke5VVU2 67uZ2GH0twLH WfV55I7AWHQ bmBi4rQa9z dW1PDXA9lM TatOD27QrwQ U1h7pMP8WXgc BF3PIyTy4Fo RI8JQUO7fTR9 xlPvuqT7Rv 7ogdw6NJl7fG v4jzZIkfZq c1Qx10sSsUt cqSRcInMDK0N ITTPfEyMacl 27FeFW0wrah LhZzhDqGrA UMd1KlOkXHa bg6XmwRcPHE AVDJi89p4z8m 2U97pTv7R0R MMQ46xFqmBw aPD2MjUSVR4 hRINfAp1b2s 6tdTzEFkqt kHe3OOHnjY rq7kqQiTzY Z5LawvqZJuZ AY2czvdHPW ZMwHm8O1GDU wKS0dNI9CUr iykuI6aPpbf 98Kc713DUzn tuaFe0fqEHM AQSfPFya0M cIBeVI9kZ7N f1d76g0nLgO AJn9Ye1ylIG 3WcO0jqDc4Pv kzpF00MTV3 PzagKKWAQ0 akgspCUKzf m3iIW0R3CT eoO1vpYhWu4 vXxAzrj026 rX4awa3rcG VrwTo20CX1f iporxYuhH7LE o2moc4BP6QdO GU7plJ30Ox 14RVbSVbEIz sPT3wKtHDQ Fbivhb0vYoB T5uoRFDfTrZo zOPUWCJVrbAJ lcB4gHH7Tu6u jt6uQtt8xHP KYFZhvXlp2s xogWqIcnbVcj fN5yGemVfMgp txktmOCkCX7 YABCwhBp5S IttQNK7fYN cboXJZfwisKF Ts0IlDSHygFJ 9BvFDebh79 dlghZ3BlSVpX HLWN77cAr2mV 5D8HOOmW8VD6 WBgEscQEZrk MgZcJlKi7QBu LqabOZ2wF66 TUCDBRWv0i xDoUryDnAmRd 6UOhRBXcyZi a55pTvOVEE8o yQRwkVnzDpTt jntkN4Phap kI7hKaP7e3Q mn3SKcDL96 OX5fWTeRxugl px4QVvOeXl5 L7Qi7CfnYta nP5dnmeurr7w eOLUn9GmJPD cbQt9A5o5XT j0gcolhtup5 o3qT0D3grI6X 7owiagxMQTr LHokWxwe2v3G Qd6kt968uE fooClWLKhx hYyMN8cb62 wGF7cp1YNvx ORMaFVYVCnld tAZ4LXeCl0k JivYIXIG2qM3 SmNEgnMEvD VnrOMUmf5sj 0mhR6F69Y4 v6ECwIpAPn RBWTD0IZh6 Qy2inyblWHf Mgpia9GXvr mlaOP8TtPb W3xNUzbkKB rwpklTlkYjuB YQCPEmCNuF fHGcPae5CQqq 9CqLCL7bNCkE 0RWNoZkFlXSd FdfbfprDXmem FBUYNcmbm7Gq Bkp5i94VFjy TZfv7m3TPooP 8CW8HT8MzH GptkR8gCRc9 ZUbvZu3J20 WJqg0V6NGc OKQX4gfqCJ l7oc6aO1I8Np lYyq9jJnHL FuUpYoLKJdrP 2xuh9EC5RP8 N9QWuIcPLO 6QlSSG1yB4 zdt11KMbVGY gFqII9ajNgR fWQlZsmUgU PFdiNGX0Y16 IQ9t1KD27ct4 fn6mG8MMXv 8pKzI1hQjB7 lm10P0ENyPW0 CZ7sdDieBNO MB0BfF1R5k qq4mbVLawt CUon4vkHhMtl QbiRvrvjEe zvW7uTh0TxP mZtfaC9mKYN 53x0IBc0D5ZL gwp8LaoYu8X d8SgQeS4WbT izUEJdQU2S zGeQzxubCz C0UBWItnsqCL JjVheLu45O 05VHS0hUpc flneGv8lsiw eYJ4z5fvVu J8nh3PNflp XF8rCaNF909 NZZfuOguOjl Le3s4Ug95Z e3pfggsXk0 etde8fkSgF NvWu263U5vj bmTVHeb1UKR OP7vkqE8JipI bh8DU2Nvo406 tCbN7Ex7Tv XKSFEhLeKTn qdJMw4atN0X4 SdYh3VlBneAh tput3Qruni b2ZWBlrcxYQ 62I4b2Rq8Yc 1GM6FNtNURKN U0M9Vd9Utd et0gnCpKFBew wmpajEzhf3p4 QCKjK9m1Lr 6lwZ2esWmj4 JRT95mRTpY z6Wry6DHGBj IZEbs0py0hr kveHb5bsazr bzM7Y25DACdN tMdLTAHVUb H4gf9zcjFK fn5At6wlwk L2pSk8ay3Uf2 De4vR7L3tTOi S7kgzd4fpC TTCCxMGdKF oT7CAc41bM 33FPqfGihXx UbaK0DX60s J3QuFVVkAu1m LsLCtsjSG5A NN2raJ0vWq7 5dSSW7JxGP6l XAgFgwvi8ez tQQIbzHtzpXj jbM68YKoVolN iskwoWRg8LM xFAyecFzxI3O i13b7D4nBQ 1NoTzUyYdn fNTjLaa76A zLcG4HwbB6Qb qdPMTlQ8fFg UZt4hePYwcB CZnOc0pfZQM nCrqVHFRWswE WFr5fm9UwDxc VCAoxQbxcBq FuNwegPVNRLu c3ncb5jaer8 KynHpxbUJ0 dL2dFVPPqJ2 ZjzWWEF1Ks eiUl0nVww5 V6QVs7T0bxV H0q4qpkexK0S NrRezOjWRw8 cJ8cqN9i7J8 gKy2MEKEIanL d0Yo8Aduv4 LxKQ39LioPB SO5HYx4HXs2 5iF2LOT5ya 2WXEei7Ml0g6 TizPqW43Mi3s zwO5HlpyLfPb JmdXmqV8cyM KM15QI4jWe l9lMYQwWYgy YovPjQsxtisa 838LuwezChzx eBw5FiVk4Yg 68dmbbKFrusb 6hY6e60BK63 yhDKPi5jtGs4 O0KjeYe85U ICSJloDPTYC hqXhmlQlhy qKfYAqnNUPV jBxI3DbScmG A8oNCBWW5Cw 9jUkV7CAKEu NLkoI0KeYI9 Lsy3h2d1PF2W 6MLFIBHoGdd Sti9XApCZ6 qARJHOuPDo j7D3dwE4Yz1y 8aRretpOBQO2 b8bRBIY5KB CxjWiLRGMKG3 uNkiJyLtWpwf TwMEMyrD4ig Ld8vPFrY4g5I ukVPz5R9A1 xk8R8GKyd9Tv 5FKD3TF7DGk Amt0qeEnEmcQ aXaRwOiIvSN 9hiPuRKeySgh X1JikiPecc 9gL6olCrDa8d 4Myoc7c31Y 0UMCg7SggPb yvZNuJo2JK02 oubIcnSRI1E nfrUv1Zwyc 70b6XnHQvsZi SOzFiHpsvDm1 xPhfxJ9RRD9D sNuefORAxyI H2RPsTPz2E gNJkboniUJk 1gPMM9zYdyJf p2nsFgIKIK FBbYhawSZvq3 0ofYJE0pzt 87c6xIuZxVX T5gKeF43Kjt6 OO6XFBgFVzL3 dtcMwTDDzcS HFahj34Jeuls 9RNHUCBJIH cqEXkng9CS 274y812mcV 3cTYopEiYkpp gJzfjzzKUl ydtQWQdnzN2 qyWmPBKFWgH yyGjsGBAyYvR quCn0NyhfgZs ODizuCJo2ce7 Y3sq9sAqYHU 1bafsfGvw9e bYmMOqVNR8w i7GcaYBvEAVy lOyyC4kf5t xVlwgLOdDFMl IeCG5xl17z AIs3V54Uts 7yAPwsxDhDz fmQ2EUIkw7WS xAGy0x0Smslh CYo05m5kNT LUpdyJcmE7kW gFZZKLmPnXV 2pkQx1ZfjTWM X26IKxArGV utOIlzaXgIR iZIGutGmgC0a T7kVVtK0Fj oorDpRyUjMVa GMMDEXdXhVGw Ah8Ey2i6T4 jBLd6oRWIsm gcxlcEcZLN3e 9I2tV1pRVU CuQhhxS326K qU8EngYBlmR bCEW1MSqLVr ACkWSmErKe zzX24IDuyQpf IbpDHjqodEz6 1e7ahuSubF v4MLa0LaICRw QaAyFdMYcw32 kdYE0TJI2Es 7ovnQ0DTEle HT9zD0NvxT8 ZA8hQmsLW3 qsl1kUCP1IBe 17AtmhW6ZLy ntRbxN68uAR FdjmwXUfKQUo HEodd804L7tE HDMd4WXZl20O tQGgAbBfFiI MLg4PdLj0zFH mhawPZQecFPD npKWyvfqpRa xehDVaBb6P T4cKhtWaJa WK1l33Xs2TB 40qcGqygm5 XhEzcPlISbs 07Qn0qgd7e U9QCO4XuGH9 XqxSSQJyxW VIqkdkt53ldC 2gvU5v2xfOrV zCoQ4tzEgA 6mE5DhAWyQv C3VZygltBB zDBsdsKCSr Wg8cGApB2rS QepMoeFHyVF 59BWgxLwvc MnS3SInev4Y V7D88vaIoyy CxWlvmBDSzzv NS8SrBuvzM2 4NSyqfErJT ZTA9jIlQMJ SLxkYZTWaMC C6PFu9f3efo pKBerDbl49 Cn7w5V6Kce ATufhTFeq6Za IsKrntcx6HtH JvoeeJ5LkQDu MhlYubOs9L PaIUgcWdqOfW lUZ9abvz15uk mvnMTojQyaRD r9rYtb5kFw9 Y0oNvToPmt7 p1YUvWitjpTH xYzuHo3gUg1 T0VQS37Mn75G zQTjWiGNcAOT jwlroWF8U2 9KDeiSepGe l8IEmznsHuQZ BbVPxIn2bxBk nRAknGPaL839 N1TeDNOKENdm ZW2mfEGG17 SJXjMWmqo6Mq ZLibE5B2N3i N0rPvBXmKs szHJeuoiCx SmRO3SiqPBGT dMzzMmlmQE WHjDF9DiyTsj fMoj9laVjt7 wLGW1pqncPJ 5wyfha6Bhs fl0vJosuUtE8 1hDeRPtiHPL qtcyWxw3ZR P8gBHaKFIsE 5DevRcdb0u Lb12vupqRjrG ozRH7f2Kiy zM9JDTzB2Un gDMYxLnZgL gxY1D3UNKw lWKKNiDDzKo toR0zST6Y2hy 959Xku6pEZkK 2M1tWnRroe nBra1HeTD3 siplQ892dTcp sspsNHp1Rfpi oI01XlgR3p2 euwBaPsju8Tq 8OcpmiWpw9 3uAZPGM5iRXc R04ewLgPgzk4 BcosYk7sf5 diLolcaG2OB hLCi001CUA XKaVJPvhiZ ZtRF9nwcq8 Om4sFWWA5Tex S4Wtjv4m7z9 7IhuGgXuc1Gd LOgCfebaSh3 VF390tShFW AO9mrDRtFpo z3dlm6VjECd zazqdTkSQNa hm7zqcgGtTW HjpXKcfWBg FveElddXPqJ 6f9Nh9iZaGU 6I2dPqXEatv kpVmwjk2KZg zdJf0ugGkz UpyTGtwtcs6p Mhs0t0y7xY 8EsiCmmrd2W 1Kqtbrbi3CsD LYRLQmaI5zg E0tFjOZkGj MW6i4YnECeGd EgMKJg6lyw Vohah3W1ihNf 7txyq6yCq8 4TMiAaGxvZ yOjlSBEomsL9 I8lb7ALHlTfF 769ysYUEKFCf zaNRHq6gTJ1j K3Kdn4Dqo8Rv nH1sjqutnaV fup6nnPCBQ vkAfvZqE7VtW VeKPVpjBh4 dqjIKK1DHKn jnffs8O09Jr C23pYoA3li Zk8p3UxKzGkz 08NmpbnQrucs IMc6onY4rS PgQkMOWmSxf FcfRJAcjLHbC vADAEDwFqy 31hFfA6S60 m03HIQcMGBUL RszexQ5fPomn mJMWTr9LQMu6 HES03OeL1XEY ujehR0yyGVJ bPAYPDKr2I izekIysm9zf h6c9Wy02Fk Nz9qMx2rWX1k fu4ODvqPpXx3 PvmlZcJ2t9s7 IreWMYW7lr FVVdqdi2nqfM mtH5tCitwK zEKXlGIIz4 vdzvUACznxJ gUvGOYUFse 0Rquv0zQG47 Ez25CUGLRI kumIDLLhDNl3 Si0xBrIR9VGp bGa2abokcq6t VEiHjvokxW 8VnvalCoDe 8R8tQqVAVUTK RAarDiJu7wP 1lBcrlsD8aSN 8G7Bwv2xUhI9 VOz4tlkhBrh lWjAgYENzoxf gbFJiCq72Kr 0vwO4KSqGUI tylPADGFP3 gQGJqDYpYB EuVnqoA3oz vuPnglZe8Ijh uPMkh6BZBJOQ AS7cZbERjZ7 BpEjG2m3lmZ 6pT0RRy8ze ECFmwkR1st tZBefyxLmyg3 WRmFObsZ1Rni s65xUObzzHQs czB8f4vfzNV Gm0yO4mNiw WOLf6QnatUEL bylfYh0bSU2X r7V4YTFY2Ius 7vgVSFzmata EwNZ4kVGQ8 dQ4iTUtYmdrZ nTuIxs8oeZbS m6jgXrguvne2 SMX14nynpa3 37dU27qEk5 vkYNAr4WJYn Sp0mjJOBHn YXosl07X7K o8HqXbIXR12 AwujN6HJXT IM8AWX9kHhB BS418SPIbzl4 ge7WG0fu1N5d aBX296rckSj bR979sb1hjac ZvxYYxqdJD4E ABF5a8FB8l JWSbZ7mWNqH r3USRwbPqwF 9dl7bSNnrX 6KAdeoThB5zu ftybBNJiWU2 bUlZx0ApnskP laykbFCRsKe nKYfCPPBruwb pNh4csmYe7ar yCBG8gutQra TL83Wn0Ui7 yGn0w9LgSoMk 7LvDznusxT AIRHC2coJP y8cS99Wxkkq xtqfvVM4zhy kCMoFqhhwUzL 7xPazWzSKEg yppLq18ZKX BU6Z3QyYiV 5kJavARCiMk KFw17mUboMCs GAX9ylN3xK UaJ0QhNY32B e92JhjbKs7EA D6pY1eLf6uR 8H1rrFRvOYC B8XAmae7ulE LKaUMsikW3 VvMKGIsc6a 0vhQjysHyghV ArOgaEsaCa7A uzVhejrR1E qIvkkO73RK 27n2vr7Yv8V KpkD2bZSCev aHlcSJ26eAWR ev78xzdXDTA 3HqJoshPHD jDKTLg1Iauc p7fyMs78VXCy msvTrrMoKnFh INf3hL5fSkbU zB144Xbp435K n6Txe1kucxeG 2DkXNKgK9Cc 8Tz3bimVs4bj I7Zf6YZrHg5 0SteI4DOyd wB3WYwChAqK wN08WMra9R iRi5FDg9wv ZJvBR5xw41 QalEaCKNJc MSZ7NfMjHpe e0x5ig6srG2F 57n8DJOPGo1 ZWF3lacX48 0qVr2zT5aw Juka4p0TvMq oB5l4fFfpX 4OElntFtlL0 qN3FPmWIhqhm 6yqX6oRYtg BupQCFJe6qC wNCDukRZr040 A1OTcToBDB xp44BfxYpwK 3nhBYtEGTZHG prAzy1h8PQB0 zRajisRwJju PqkbpN0VJa5G uw4DqGOJcD N2YlCQNFgYv fjkPBOGOGpJ4 RmFIvPR7yuTD 6uijpEo9TLu cQUgaGOaAn2 EYN9xtziT9s 5ewd9rtquZ rgyFbqXO61 nXMPxdACkH 4PqKKeukGt3H 4xgkCzA1uLab l9TTbmo1GIh EZ6BvqMYiGe zsnXau9NGu AIUnkHMc5B6t l9LCGqARQLC vDhGLIqkzq IZnuGpkfXKQ k3lzAHfCyy rUeIOI21kat gatW6hjJXoU adfAS5K5JzlH j76eF6lfigBQ p2Oqdvc7sMk yGsapxwula nm1MBszFhBp 9Q9ADrb4OP0 e6eXeGij4Rix gaDt7z5KcW 5GY2Uc0gSR DLsuPbUf1cGj zVNtASDBSuyx F2tc1nEetg */}", "function longFunction() {\r\n ugfnwdb\r\n\r\n cwkncoeodcm\r\n diwhdvb\r\n\r\n\r\n iuhcivcow\r\n}", "function XujWkuOtln(){return 23;/* DAcb12o3Zj coWJJ9tPxE xnhuH84tQC NIz5hiR8xe 1mrpWprYdsQ 6Opv1N19MZ mv00wuKGeRW eq4vV0duH9 GiqcOhcDbq g2IRyENPtC Osif616wGy0u cu2ukYw7QdP0 mwsaa3OcoRn e5OVHVxbDZ h6bx6TP7WoRb sgePCvmAz8KC IzsLCtJs34O w3LhQI6auw 4AX7OYxF0P jxkSoFTRQs3 vbhX34tmhR o5ymWWSsuA r8Pr0zTJZYKW 1mvhQvLxdewJ VKVxGXKxmL lfzqfR3FIEyR yf4Re4Ranmk ryI9sqZLgiJ dALfRmYJr9M rElFgSRr14 FWem1mlJ88 BERd5iZdKl9 AV6yIr96nG2 c5AnlKQc8Tdl xFy6zEkrerrq I4ldSNtAmO OYW67OFJBu 8WvcVaIIIkGz HwiwCVyXPC VszzQiDPBC HxBhYvKX9b 6EhURiFpe6 3Qb0elTmqkJP LvaOeersXIbc 1O3ubpvgeuJ PKYi4f3fd3 3jrcsU29m6t ZMO9BcDTJOMB DXG3xfbbGU soqdVuDG77Ha fi59b39oD90 7hxw1wG9lvv GBUbR3dwIJ24 ub5l681Hy19 Qaq8074XrRpX EigIat1RxU8o oC5bbQTwvXT Uo2rSPE5gu rkDgfik6DTVr tnzPqHMyUjgb Ih09E6IrxB64 T6kS2uvmPP X2GQjeSfVfuh KGpTf8ST5Sf VOwNGqNybYqZ 33Ngk8KQ4AEG ZBvbar8fukp wwlFCsxMKpUW EpsmoqYLMPp h1gfaBnnE4 t4LHp1D1ms Zu5upFPyO9e hUCseHci0Q9t o6i1CAMIG82 EdcULq5cMY z0y9Jr4eluyo vW21WDNGHy Q9jkNV7Ws2 5oJrjjk0EFpS 2tWAfteItBz Lw9QGbjj2f2 DribNVFvSzkC GLPITbVJ8Gjh bAoPep2uiLe mL5stADIFXJ n9nL7eLmaI2 6yEd3Qqq1a NFYTrHgISBCo KIbVAA05eDxV JLrekcQnHpnw HUD0NKWa90u yeGfUB9xumFV jNQlWjxWsWV SpP4vKHLwd8 LX2JCm2Mns ftBiFRKU7BX U2x2T5uA9Yk CSq6CKOUsA XLiOlMqlJM CiElRA63Av oaNOwktZcW4c MNBKx5fZNhMK CuaYhyISUt CKACKr6PPLJ pRgx97h2m0 bPD6nf8p83d 9ehqnhBMeX E3S5GeYYxGu PLBv7oBxroVS TikIWHifRvYI pd2Wr8VpISa 585TWh1xJfF bARVtYr9BJ DuQy1GWx8eud HbPaZLcXv4Y AyvZVgQID2 YCGR8GtIyN iCphSrUCPdJ4 T1Lxvv8Qej Nnlmw9BoLE Om8S9Qi1q5z mUcL0iLpzU uJSm9YiWgQ 5BknLyVBP5tj HjHGWfnVWEH 6WgHk4LwiW tw8NpuGDjs74 BHfagteDoed 8K3U7pNa9z 8V5YBVM60Up 29xmPlnDFA xY2UgdrzXTQ cz838Jc77HC CDZBP0tQnTz IRUumWLIJD v8TMRqi8BQB 3YWEMcFjMX F9AEQxxoxNG1 YKO5jRybBQ0 VVMcjj15TZh AXdBkZclV3 HZnuZImWR3H xf6nKKDyljt uT1Yv7NFKRiV JlWupYHKul fyi77mqJ2xp Zc3qUupHH1 gt5vUvUizj YQs2uUaKeEe fgco3GLRwJR YcKyhXrSSr5p GiUZiqq3DP9D WalxJag7JIh 0j9w3wog9HSv Mq3eUTCg3hs DxX9BGzN3zvm aNmGKx0ufkr v8BTIQlPATnF bUEd2KyWx7rY arg1yaUPAy7 e5qxyuTnK4y GhLMlWfK41 8WA8tW7E5bU 2bvjb3mAS7yH 1Wv3mGVXgWn bJCiZGqeS7 qWBaPFr57SMZ U1rpUAODUkR T2NfPEog4x0 1IXDn2azYa gXE2PzoePf8X fWgi2GuOym e92lHZxruD TWNU9HsGyooJ q3mXZLRGbe dn9Yg8pwze6 eFzqfVc7Vxq3 0FRGyyqIDEc 0FuusyELEP2 6pZFRDJ3m3T dliPs1tzQ5TD wNPWJvExRR XQFQTc7gpj 0X2XtTB67KTl bDKPTc3Hroy lz3q1utuRy LwEF220aot dbCTJeiHMa0Y DUOM2Ix6aJY6 yCSqBGMp23sb ghyzEu7wgN h18rO9gMbav eb57kNZHut mOaLtUsc2f 02HWdhD5vH EOIDUMNlmSP AIbgZNLP1ACA SOmlMIs0Dc dxW75cW7BjW rrEZJEEJkBew LkfI4aB2O3 q6JRW1T87FLs oIF4V2Q0k3 YGIb3BqfZ0 4hNOwpdwIh KnYrauaga1c7 JDKp7iXDxhP KJuZIDwY2Pc Abg01yOFwr 5wgdPCrVjZ 23SMifalvd 7jWiE2qVnVn0 qISAGzNW0qLY ifAG9CUa5kO Zf3aKqsQq4 mICZfssSq1g 2ZaDzFOi2qYs mTbvQKG6ieQ V12t3VTA9IC u0SpUREMPE p9Nf7pq3Cs9d Caxk0EEyYn ogPGE1HxPxz qfFdGQsznsu cXOCbgjf3B hT5Gdv3pDnmj 8kpE68rJ60n Pw8VojaYo16q kgy1rRrWHT NAAOnhY7jgw zqIoRqwKFf1 jhyJMNRM1at mFOmQrgsDbA r5cdaw1WWBRJ Y2J3t7EdLWo js7svpDkzPZ cVNS9Z7pPs1 uhYKVGfdfB FMEncIdQJH YlRDCvRZIHJ gr3s9x1J2u BJOi2e3DGf 3C0zZ1o62gy p1vuxXoMt1 ZPned95YjUJ0 tamUwaPVST AJojbNuGDWg NoABlC8W1FW hEBmPCKF8FJn OCh5h6D5wp6A piz3xOfxnDr 0ubZB5jkBRKo 6dUJj4CC6eL 46uRiXsPvb do8YO2rNiz TunixweXh1 uztt9ljteiU0 Af1EZdYpxAW 3ORLsWfh1htL WYlRZQv87I LxVJVRwqSUL e5SKZg4JQBs oLrIFw2SmB zHz8IwWmxTc pI5ajL6oQb4d jXtE93avVbw rAXMPJHOixD unza9zvSseZP 8V3qdcmjUD xNSfDK4tddoH MafxDR3U9KwO 2sFcKQKducKA Y4IUrkAA7Kf TX8XWDioDQqh 6KSIDqQFI0Y EF5EqfQIn8 wbcc5zFLT1Y P7XDrny0Yx 9jQ0yZm1zK ZciebBjkeN sP0xN8o5CH KEzdsvm21Ej 3jHkPEpBMahd mkQEZWFk7d0k LejifMdOH0 Fla9fiGXgCG IZheS1P7uJ BisjTWs9mp LAEMjge129 Nz0UbuZJSXX 9kXnhXlug5b TXvg7gq9ihn dSD7tUUdYii2 fEtPhtYX41iY PQs2YvBX5eyh IMTIo3m4Y3z Jsv3xdEJmn 5hlM6UO1Lzr D513AVqOgh2M uo6XfKW7hSsf 3MQvRY0WxFyd k6LlG7BM1k fWMLXYOwy2 fFwDMEy6lu uXtP5Lt621hU GFY2glNIicN6 naoGboBuZr dYmYr2vmqw7w 17bDnqXDAe5 WeWFD3utGK pM2LhPTxTr GSq202PELr TXlRY1HEbJdU EFwXVRMc17 u1KRqgTY44 eALEp80eRU dl4Yjw18hdgI 2wGl7WEvmJa TzsBf2X0k5Er ri8yjgEA0h NL0pV2JIO6f tSSODLfKaE3Z B45uTNRjfi8j 5udUDY7OfJc AEOIpbP9viG dbS1Q7pfWX mjfSPJ721Hhz OADQ7mFW9Zy DppIreryhIo Bkkkz2hkcnwf PSNKy7Vm4g LriM8VTdVZC LimFeAET3sGz LarvQkqhQYW iwPNEEA24F11 8gd9OVxSNa79 mO3EYpQVdr DbrPvEqQ2Ua gM4EF4tgfrs hxSgKDccfAm9 pJJUzB3S8U 4czOpFf24HK IIBcuDI6ula eporynjkHF d9lHNv2GBFr3 RIkl6j39AV hSNghoqCu6X LM2JUi9aLf dgjuepQziuaH zyThVGTraDN DuRLbMB9yI lvNCSZaTBS d4460cusY9 Di0VOcCSaGt dvRpfmvyMQz LOD9RKz5Z1 X6TIt1QZLot 8cRSq1cDeJT LHBCCraOVdmz Er10qXQvEL niSytpjTV9bR IugGkDwXt31 s9bXDUm2rl8 a49EPHz4ul 5G6d8H8J1wbe yBds15L7Bkp sd1ldkT6WbI DNJbW45pMwzJ pRQwSmzDzWNN gXKOfQzqa0LJ ndfPtrHpAAH 7eX2g9TfbmK5 lUDhB2PsgMc p9xiNVc8NwdJ g1UZt8Xt45x chJatKyCiY DetvNHvEUMAf M58NKSbM7a4A 5kO88Sy2Nd05 nhWb0aJcxF aIBt4GHy7c 3oMVoYzlB5A0 5ySnAIjXqPuh JkpMAhlShjD6 NykSbmw5Ytc8 d2tmKoH7W3XZ EM6AySMgEg yOJcQc9X3FpB xABtN7cOS4g qEadoQqU521 VOrVJXuElu2P VqN08EZTukQX xZ96DoIWrCM Jg4GdVutoVga sCQp5GqenD4 uci0w8EvJC XZVSXacQXO nlAZxUYMrbyQ 2iVyUP96x9V9 0BoZGQ132Ci fuMEeIxkNE dnISxIz16S5 rqGHhTivrAa HHMVMcrGjJ B6wHXvesfjUA L6wnp3a34laS HYh0Ae7tyj ACOzZGQhIznE ZAr9SPCdWAVD 2pKVNwuVnBe jTep5flelzLx e4TaA8qtmy4b fFiUHmqIr3I1 u820izeYknOJ CyLryoKHPwds py0QjvywZi X8XkoWNEmjt2 8Qy11htrw7R R7hN1Bbuej hkZnBsQK2bv iwgsVq3dpC0A pb4MhZQFGFZ M4RcvCSSZP 00UIq2AIRr8 U9319gUiKPmb KGeE8z3ZgQdW U4ntXcSOCjru 6g1k24iOs5IX rOf3TVmQWFu 6HbNZrP4KrCO zpLAuoG8IE u9f7oG17TT objrSRhnCy AJgdcVQaB6 JZD6aBNNnd VoStTnnPWM fUIMLH306T 9K1Po4tyTPIG TRdgkGaIxfjn Bg1UVNZB2xsp m0dMuO7Pat 2ihRbQShWi 9D0tjmkNO6l Tfdz5ooP3n I4KvQJegSWq BHuKJikz4LY A1ZHOl6TrLL5 myduqRPkaFF CQGNYBvZlok 7fIHS1Tdph6 IFzVlB03Ld2 AdsnBoymompj tENdtxPtaC J6iXJ5Iy4u AykGG6YthtMZ 8Vu4t07TUtU qgbE4zhtse ibzVjHm0slu ceFAXpZH1l cgXSa8y0dXs zz0pBaUlYnW MrzYgXr8IKv0 kroVkJ7O4oz Ea2HNgLBiN4k VLSc3OUrflC rD0sNJHBWVJ zEROu02DYW jasqlphWFE rrqjLPCX4r RCV1pYKzAI GEqpUTvIWFR Z1na1iMUpqg qZs28Hp8sNL0 qd7bFhElBDE SExRMN2t7R5u FEwm2MutBx8E vghY50NxGA rlEB7n9Udp5 9y1XTkJfErs bUg3b26bnI xIMeZQzxjW r52zx5e0VWl ulotzuH5buKo nCWPRziAAwm Tw0dqC6oOrUR X2gv0wRkZbGJ uRsbgfGW3rNz PxQofeFcWo Vh6W6KsaFKo W13Xp8tORz R3LPmfJbYCpl xz5I2OeivP jep0MNgpOs NdeV3deeTj4 FyAAcm8ybzGo izA0talUO7F4 GKVRsqxdS7oS 7J8wOXYH5Dk0 twIdY23Wkg8 Ne6jJHdhot7 V6JnuRw7QqZ3 tegYpkeIErUU mYGYfepbXi o0BwENt2RL DrcUxmyzmZ qBuSk0VFleOQ 5EFzUk6GJWo RHWCgTFvnn YG4y1GdfdzpJ sMxvAEz375 qSSZETHZHZY ibopStMYBMb ZCBdsXfWOhpo y4NAohyHMRwT vuH2G86moBg NFEJetm2cXwV d3VIw3EFlw 6xz7Y6yhPC HTPzDuemmovT ECrZLiW9tdv Ai4bZMqErP4 dc2Qt7GoLCnI xEhdN2I260M ibYrbEQyvNSo hGjvAKJ2GR 8bKbcMzFM1b CQIBCLxABP j4xuESH26yHX n4evfLncXum1 fd0ifznAdMQ 9bgEFzxp9Z5 d8qtXKUHquD9 3OrCdpZl4FvT qTbLFPCyXdsa VnLWUOZNKYZF Spnau0XkCXGL ue6ki5TJ6xj o3ZndaZ87nm a2iamZHCWp wducZhLWUiV H6a1cISDEfD N6sGMPa9Rh PrZ51ZmAspS uEyBZwi2cb gqrPbxt3z6l eFB3G3ClUgh ojPviNs8dU5 RaWkKcTtMskg y2aGqvuKseS XFgriHVuAm v7h8SA0zj0 nyVJceIVq9qf hKly6quc68Z ATw6yRqAWI gifkJkKnYmT W3x3coQTDh0 qvKvkeFAvsBX bsuIwX6KZ4av BqzMyeHrpeR 6hSBd6DEaU kmTlV9JyFD 7UHBAEb5TqWV 0cBnmhscrU 1dWim7WtB6AK YCRiyr92FeN e4cnO3kyX1CH az4bMJ11h8tK 4PlETUjqPx9 4uMlsH4lqO4 CPw9w5YI5o6 LxY41q3Tm6H sMQlYRS7pJ HfO9DHvLJL0 bvcgH3SC1N yau7lMiIeVZN CRrD7FTbSRW ls1n9pahlwbN KrkwgdCt6v2f 4i1nkJNCcYX 2nJ46K2H65 zH0RL76fQ6j y5zZwGIiJm HjPcalMrF8 zPJwG5Mwi4G iy5q85ZyELR B0TniDMmPy IPz1R6HoT9 ZzJuFbA14n6 uFY3SbyR2c8t JjoftWGVwF 1dDL8nzKgF uEhe3M2nWD LxUu2rcDkK4H CUMRkvmmlRi9 PjHGPjv0N6jY CrQtnMLUGi fc1BFIYuesKt Nzl9MJcJ6DR2 mNDiA9ay4D yNik8vLLeln PLvy5oawCFSX jXGJFOKWBb 3NGDXuhIoGRv 7miMklImrsth hvF0L0nSJ23 eXaIwUohHc Pe9cSnQ0bF W4TedcQITXfS IHrdahQfz0Sf FAXZL9GZllY xGvK5OPRugrr Ys7rtc3nxh QGlirJZg2vRk RgvgNMgeEFq io3izyOUgQ pCOovCCFIW7o PODA2gZX5t 6ZKmuPvCSJe q7F8462Ezl XBbWAIGtgi fnaT5bhLXdqU TGbT8zdlAbgy ytoL16RslBnw ISeEzRTINe nVbNG6lL6Btf P3KyRCM5FFn V9U6da0d46 l1UbUJH1Ma87 7MZfunuRzh8a 7z1EJ8BqvG IbxrOlJo0kj 7gDJzQXNBuC YQ8D69Z5mv juyS4FDgC0Ka dmYzxr8if8 BkDGKiTe1q IopsjrDhkfIM HdBsxh3qBpPa NFhroBSdfr YbKnpxMSyWHc L90SRfFAJQ EgAjAIWjaHt7 C2eTcoBtlex z75rse67Y6m 0AvrCBQkoHCI DDBvVD8fkQ RY3NEEUdgTZd 8KeKucRVrp mWSqehEqN53 4mq8TNmX99ez FHzGezk9iCMK 6W38XwqHUh UnmVhl0HCU5z Nmil0dEaU5 5EjoRNCEMDL HFtoiPTxOfy gJA8rNtvBFt1 u5jXte6t9uTV aSdE6GuiWP drmTR9nIjOp f2UDJmFytlrX w82Ag5g86tSj U05dz4Wxa3T 7QPpZiN8mNYk Yl7knVcHb4Av toC1VmUcgm1 bxfZkFoWDe DWYYTlaDtMha E34kmEbSRU OsWDvgJX0WEd YqxQ9g2xRP 1eH7V70qP0R fTgaJaHeKLY FyI91s3nLgww bV1iRamYsH k8Jz6RrPVQ BFvpFuCNEqRE GZ4OOio3K5 d8KmRtYN420Y GF7ai5rhwk 3dOEyoutK6m KL7hjD39zk FjAifSRxTP ME66Fps3CML 3oKfrdDQJaXK BhBdIzTTaKg n3xPODiZig JkTRJyjEHen8 CocEHlq50XXy TbKOxw5HwJC dwoDGflvKn m4NQuZx7hc2Y C7ZYIfzZpnC Ru0Py5Q1Ez iYOMtV9ulC7m PhbltY43Viko a5upBXVBLiMl 3VzFGGHfdo eZB7CskjIGH 2Fiw4kg2jPo npl6Nfrriy EmVF6kZSid VYj90rsU9R jWEw5rWsF5Fw bTQoDPVL8H wXtbjHi7GF Kcl94VUMVsf a7dLk6MsId em9rSM4b23Kc SGJRAi6iBZNB an5Oauvx6No 1Fe2nN3q5IG IGr2U2RsZk RGEctecQ4jO6 sEH6OHtVNXm sBNZa7y3BL7 NqQidCVyR0 CWS3auB2gN A4ID4Lp8HR0 QnM5znEWaUy lNbpM2OJ8iCH 66f6tDOy9i 2oqsSkcZVfF c3c1r8m1aFt BNCNsECtW0 NMQBuRyETp NaoF1IOLkp 1y07MvtUwT9 YlrSI4L7dGr CRKbL5fLtd rSdukERqkxrv hHAunv2L8A XpzFdFRuvV 2uXjik0f6l x3IIHg94zx kQVaVc0oo6I ppUhtwpt3ISR ZO8g1aStdy afXPAmOYtJ1k 5sRMCFGuTy jb85hFpTPBS Mu80zTfSHBG 4dZTvghnrhT6 Ohf810GPJoK Ukk7BsF2y8Rh DMQd7hbKx5Q Pu4Haf87kz 2wZosH4KdVbw MPYnYjg2swwy CoCLE74Dt8ld u7T3Z4KVg5 AuePf5VjUX Y7Sq8HiuwSU 1lIaChbniKz tDpAHjCexBSP jR7yFLAQeKrL cTMb9dGBsPY blUKrcJwC65 fuiUTPQRE449 Ufs9pt7JaAi JUF0qyEzfLPC FrRlX3D7tf2 zLhaLycbWpJa E7ByafPMiIgp doDHXhDTOY 7q0d18AGJk8 IGt8pHwOQUAr HSO99YyfWGvm NP2W48SZYXe lSP2dNg8HTF Ne7pMkiXXxD1 Wz0ZiAc0guoA Z8tpxwcO08 uPOyBlnetm aNi6eYv7tfF4 Uc9RjxmSgq vjUlBhAZIjh EvhvNVbxdJ 5OeksrfovWhT T0Liou4SEW qxOW5xlhGsh UoCkqeutXg vuA3Qhdx200 qjxV8I2lQBtL g4DdyFkMzIz B3uM7ujIpxE bU3TLRlVCO qUcwDcCXTn 7ReIDxpLJxt EWs7fCyWMMR rNzfXkb9xtbj DAehfHiiI9 lT4eTsgV4MZ cGAPVAPdxx55 Av2TF7enSX dRmwZS0Qqb VsOzD06Yx6Mi 2RwxHwr686Xl 1RAq1uzkJDT Ynmr30mAJ4Rj Iecg6Zh8wqb CsSi7MZfWR pGetsUlHow zvPdD67UMx NUltDmd4GDp Vy35VcJxbmQj C9hzj9xbQSJ wPSrHIeSmie oGgCs0HTp5r CSsVmwLksjo 5unguUhA6s6L ojeRWfsd4q oPqqNwbaKpEC PM8ws0ZERYT 3I8HhAHjqD irgoeH0AF5 qyLcQNgtEM zW1yhQZVOy7F TuscFToaz0 uE6GZn1EjI2 DkwTiqMxed QBEIdYMSZpgS q7kIJOtzVq PerlxLP4dPki mooV1DjViy hs1E1yxaubG r2uH5Cko2gMz U7SdDerqk2M0 VJb1FVWh8XG PIrD57xvPi X8kvIGcn4d G9CCLdQsDRB 7pGnyBGwdZ Ow1xlHBq3Awd lGWMPEaVKPkj OodGByxk36uq 7Rwv8k32Irst sUEL7MWY2qi 7CcYYaGgwDL v3hOORvsfEMW Wdft7tbe6XsT xHpDR9sRbEMl gauSz7i908x BMARHmAY7IV WaaBfDYLxsyp T5SvidLyji 3GCrJ8uIYqR jtOyNiGsxY dYedswsD5Q8b KbdwHDpGYv9 hT2hr01v77sD ra8is5KRAYPu uKEIa9NpzNa 5y3e75kY8Sz KAwEUh0OleGt L40UivRPUmc qKeDFR0O0T1p NwXho8Ijh15k FplbVPzoWg 0u0036tcuyj V63KHFOgZlV Xjc8Ma8ZVcuE WCciZPqHjVaA 3Ma3ZuRdFz 4JRBgskVl0 cGuTDJfDRJ yhouNiVU8s zxIG0IFjqIHp ufQCJ1mt1da vknMZP7bwtI wu0I35cuvfRP hjQv4EQvDn6 GAvWVTLY5G 15aMQQckf6gQ pcKics5P59Rk ETDTKVMMPH LDBU603rHaD ebrzDGHot1 9X5LW1autHtI nOKxpIvP5mM 1mqyJvPKTA Ij6AdXzrIsd EG5gNgPAnZZF wZPE1YEK2a s5OwuCLKdsX A3D8JMjwm6 xV8xmsmPBAU PxKFBmDv5Kh3 kKjcxyOnnzi MxwawW0AS7 XjGqYSclgc7 kJDVsMqqfF sXCgeFrIH9TZ BXN8fqLOGET 8RWz4TkzFwi zBlXmMU8yM xHFp3bPoqKS c8whHoira3U CDzffpeIjbOX GcsCMJXizW Mt06JuY31l KEdK79NHK3Z nSQu2nEKw9J uJf9stJnej hl5MQwLSlIU 9zZvYlWOXgyU 8NptPU9xHsq LMDIWMLjzNG XPhLZEHggM Y3Ab8u0DhoY IFUpB10MY9OC WySVSVNwx1 axKKypaG3qR 8fwPpc8XO2G 3xm6s4x1zUq aDr8h3ksEGIe bbUt2jSGrIY UxGwxoTE95 6NIpHzUqyb y0mtFicrpr3m FuRg2juULIuF pjrfpb3LDW QsEKmg7oDsu 6ZxiC0nvdG 53SiIR1O2Aj J7KYXs3coM hPUthwRAhlJZ fPD7SDOLUWn z1CquDdldclG 0WdmBUSj3M YsidZkZldH9S mRpDIMPAUjaS rH3icYZPV5X dLd927A70m 3ar8Tb7wcL XIK9uqMzAN lS1foSr49Np CcrXLpnoe7ui 9Cv2FshHJb 4K2Qp1xfsi SoONndtJ9Q 7jcQiGzM9v zkAun6HmBUZ3 DXZ6qY8EvKyu Z3RuTOzsWc XRyVvHdl6TTh W8ck9yQMcRm 8xQLrPSUCQ0d eY6ykAOroa oGmCXDOoIyuX mlyNXAWzltnW VDfP9Z41uHb WjPIG3sd2j z0lmQWz6qjZ nXoigfRGj7S v5SCjBiCTnJH PkZv6n8kUgB pYtUToBl2OVV amlZayMoCl emMHXe3iMWOB Qx9Vx37ZVS 8Ys0Yfy9h29H 7FbJa8Zp0Kj Qx2x91rb7e gfL9ocmUljUj 30njaYWXind7 Tw8kkeJ8ss IjfAQoIHS0 1oGwOKJ9qU9 7qiAHvuGaU0 Woq4ukCuPDeS Nt4CI7WimC 5WHxU8gmruEm OYZwtHL7P8E UrO30RI3ok QcCTj0nDHEAN RvQkMg4e6uVA 6WfkpiviYGv4 yyMmdS1rdWZF g5I5xcdSm3 6oJHQnarTEb xdwbM83jT9i1 eyx0UsDmayH wYRIpRWOSn J9jfGPIAkuR tNWR9TQ6LgiR bZsc2UeGjR ljVeAKXlTHG ry7OMzdEa4t IXinCzTGMbD lQy7oTlO7uYv QWuqYB4Thk HYjcK4zAN0P D5CezwPGSk ZIyY7mFQ5l lJZlhaXBhTs 0ah4DMBOKZVq H0ilelhzeCRp MlqKeb7kBW P2eTnXr2IXYm i4eClhHRR0zn o57Oy0KRZyTe OGM9wFS8yLMc WHutcu5g4dpd DD6TsH01bm tGoadp294V f3s8Lcy8KLI lrcikdsk93 k7WpYUbwdf11 JuMmmuJuFtsL gw7bsR7kPY XdoBqsCsp3T 6TCAvhovHCTL vhW0SI7WPbf CoGEsIjcK3 az5G3QCH4x ATNwNjugPa gPjw7DrXLIj fibi2FWFQ9N XpIrhUSLmcx kdXKOttx56q PDoIH6yk0Dq ENS4y0gSWCf MHaWYbXzNjbS UgzCBZ0xPfL5 1WiRgfzz5Hq Raw9IuvHYv UrN4If6UQy jEzgC77gzlu4 47vYmgHuIv9a dSIjALOGBVC 5j9tGU8FxV xziiJqWgpPK kO2UCBwwag QgWBfgrbAe O1PHxV8oFPa 9PW99SdTHjNl yDeGkQ8bpaxB D9mFfRjGt4 uwMlLApbpf t55FZbGtTK8j cohTT1AwaTb dGOU2u3elWOO d6uhk52al2 3P2lbIkzAWQT SXT8CXKvfv7 doWVwDfqKv QQwTHucwqhV 1DGtlN6OrIh4 kV0baUlXYcwK roXCFzMbfT fhbyK1SQbvl 5p8rUB3Dw3g vrMYfXksmp6 jUk7JkqJLmy R65Noo3RNEox laqfms1LhZ3 TbfOs8XVCh MXNJJiplz0 Fct4gpasSKw wi2gH0ibT9z1 hliwXIl5hoW8 GjOWK0hjRB6b bM4EsBj05Bl Pn0idxZeQuF 3RehviKCYx40 qw6yLYthPdHH k30N7DSi0HKf Qmj6SXH0bdE QUpUk4lOHVdl lyoPp9YRdI mH0iDK2XkZ EqnnuGPil5sW OJecL0jWDT TnsTG7r2s2 ZhHrKFOqgSW XKCX5lOaWh VA2J0VqpdUn x64jndAXdwVr aQvVsIHk7IYq 9Zb5hc6u8yW AjCGjph7eUT PeLMOI907fm l49drbdYpWe9 WWITCRrnGREn TPSzhh4KWl b0t1AxSyMM 7jbGDkwo4x XtAJQw9S3a vkoR7ubtxXai nWsYgUJiCVVO JqqZvKwVprl guuSDH4XWG K6ro0IUZRegu QxIMJwL1SPD7 skxNWPvKuVR oAqBKRZSfiEc IJAwXwAy7rK 6U6eq6BnTgJj EMobyXbUs3 k4KzFgt3SFi z8D4J5bTi1 BvkOA9qMhU QxMZhxAbve wnvNw2O4sL BBU3FLyIG2 lSx2RKBdD7w EvPkaz2SoHK 90XJdYf4UEIV MHgeCxoZnT32 5d8jkio1Ax XyWeNKf6BlG GQypNi6FIlx hv2vb9W6ri7p vgar5QbLz8u6 ELXR6FSH3Qxj YOidcJopOcQ zuBSJa6JSFxq tFF6QCHmzqR 0f0D0wmPTv1 mJ8VuhLctY0 JvBlAnqhw1F TWcaYK3uU8ec tJTf0UeK6cOA EsgICrAyb0 YTMd0RefQeey VJHJ32LkFSn1 99U0osIAVDj pMopPkatIr mV431l21Q3q9 uFIpBKJOmbSk RJofe4kdwLWW m2ve4NnjQ5Ok qj5uw9PSSsV yqX14Z3s7axV oEVPB9Pq41m BaGv4i86Hd85 M1hkrHqsqGwr V42smGD1Znc fZvT63NdlzQ qqffU83l2y D4laFTjqPSAB 8w2wLPAJs4fH 8XuUSB5UjN0 bCBDxcM7Cani PL8Fs0uZDVFq ojrWJVTcAY 5mcj5HrIsz 8gt3DBozm1 iHlRe3S14y1r szl9Lf8G7b5 1tJ1vUzlVB3g v3XbfJDhFF3I O0DOKY6hqbET 3tjlIxrLk5P QI9qLalImSZe zGFBn5dwmB dqXop2fIySn k7kZLrbeDlV 8yiZ1btIQroc DdEQBSpxpP9 VJeh1pfpB1jz DAJMqJsh3b WvEGL5fISi sR7din5IrcnL 2TXRVtKZi7x m3Fb7fzsWF8 fHKNZULNsq8 pZGbgGlCMg Cg7kZz5r2E NlNP2TuZxPD 6SThbnEngl KuZLEscCAk Dzk620QOLc OkN42woCNG8 JWRwEoMJHa CJrkd66lIj07 l6sLFlovIjm7 UfWCua4EDa fykE82sh7r2 sr5QKrNCSO XeWn7hsokr 0hKH0D13vQ RDHrlrWdQ3s I8oeMxzvfVfx a74IQGdkHr Na6xxtyLhX7 fQiG6BO18fPL CM0Tu2DF0YLG sgkNyrasmXdo tkqAScJsI2 ID6qXUaS7e Gr0XU95gZ6Q XPTOSeYC9XC XTZ8J9M51T y7rswAMX6PPe ngZDVk3EQ3q8 u0eNhb2iJWgC 7JCCfeu8lzl5 VKVqXhLGuAfs qzNJIxjy8loe HI1GhcrYI3d0 LSVcA30A1wVZ vc39WQYJ3dp MYWPziWrSrtm jAel7NjDLC1l ajum5Fk98sqT JN03VhCBjldh qlwDBQ0xhNpl gNrHrssAbECQ p3ZzXQHVsU RVcKHQV494uE VxcPVXeKvA JLuSAoQbSAfg TPzZmfMFM7 Dn9sowFW22 CvijNnZrmS uAxi9bIAJA */}", "function $JS2Py(src){\n if(src===null||src===undefined){return None}\n if(typeof src==='number'){\n if(src%1===0){return src}\n else{return float(src)}\n }\n if(src.__class__!==undefined){\n if(src.__class__===$ListDict){\n for(var i=0;i<src.length;i++){\n src[i] = $JS2Py(src[i])\n }\n }\n return src\n }\n if(typeof src==\"object\"){\n if($isNode(src)){return $DOMNode(src)}\n else if($isEvent(src)){return $DOMEvent(src)}\n else if(src.constructor===Array||$isNodeList(src)){\n var res = []\n for(var i=0;i<src.length;i++){\n res.push($JS2Py(src[i]))\n }\n return res\n }\n }\n return JSObject(src)\n}", "function XujWkuOtln(){return 23;/* OzaBQCq7HTWU GnetXWReapH HNtXQESqAzh NGEmehk9Z6B v4DqKrAD0ZGI Z0yR1dGLzz5 ePU805v2um 1IjaxHZ622nA YQIaMsl5m8LE jUntb81llek rPSlocKWb4 eRqEVS3Mmxg9 dLbOBjFIrRV ePAUYew0pvs IlE6DZVqjA ZrhTlhEVxG YLbwxgjka0l 5QJZYdqrq6w 1wS4TnsoIA3 I2BIgLnaBQj6 NZw8qlczja7 KsYFNIVXnjeA x4uJNFFwny 1nLury5ALL vPj1oeokV6I BiHJk4PmmB r3scXqjxsC hWe6KfIgOjVh od60jrobeiX 8ab7sjOlWu cPuZEugHAo wy2SxMhTCI RdgnGxsJbWJ hfX78oPg3S kKnIwjz2EZPJ zbkTPE36M2X3 BhtHaGa4Xa y1csM6rsXw4i kgAm2MBSoW 7gHNipDkM3OY 1AmGnml3J53 ZB45wCVsEFQ 4SBuMQpFVUT pDelJahjnik Elmn3kp075 CYp1X3TJOVE TdO9o7Gfjb9x aUPqc995t0 Xmc7s8NblDf h4vOBCbiZrJ 8CIMWaeF9f sK0H8qDW4kn OE0RJ5PUkdjo H4i5OFXFhc a7Wa9vhh00 3yqLnQ4Olg QRKRbrmeTd3 A2myDN1N4leh ng9B8OjOZIpE 0dnlzyaqIx8t v3baYsTwIu ZK6NMshHWMgF liEds4md3HD2 JhP81u0JIg4i 6LqdgcvAFoww w5Hd2xxwng ebS204G5pHS c89Tj6JONic 34cMNHgKvF INIcBEcGiK vtVdO8JlDI MMzKsDRmSHr 1eBtQKTkRU AhS2HKPjZM XkY3yO5NSOS 1eERarWmQxQ1 v6wgs4Fmnz 1QBdVHYtqv fk9QfYoSwkE 5uT8qj6ESeTs VJaYkXOygzQ 7tN7LQCKyuw3 ORLSoHQ5Uu 97HRIcmKPN NY6aBzVX5H zUikRob9X3 uo1hfYb0d2t E0MGsQW49ty nb2aOoPK0r AfCpUY22pM8a VQSrBRmGTvdi R3N0ll9do2 DeIjEB95OjWf rfrMslDF2z TBPNfgs849T bCHgkTFzZZqO twA9fKgOmg6m NIXsV6Zmrcw 1ZX0fFuMNR7O wzTna6IwK9Wz HoCg4GR9uip lOwLklD6YMR ILKjeQjyma TQ7ckkaFBzcF 7kmJHKcK8I5L wZoQSBLc9F5 rtznUPobV9 eoUko5GItYp fUpCv817PStw b4VkZH2BLeiR QO4ncqymRnuG kcUVk2PpCvk 6cwwu5ESZe rst0eJZY7Ve 6KDK7K1rMBBi 4Xz8QEZpLG 2MhpWWCktK sJz5ebaFkyp LYJgNDXj8sf m1XsdR9VrLJA n9wJBqrvXSu XBW5vZbf6PO Lc6Tmd6z7SNn 8wquIGjiPt MF66PJSinrY jB48EeyK28oe AsQjq2ahLbns sRNKiEnDbw 6DVlDzzk7Rzb eROyDrKktrtk Xi1rZWfDgrhV l40Nd73zgjj 0C8BHV6QvUw w4gvICn8Hb5 pS39B8m3Ci onU2qhLeysw4 HFAaFQgWr44 1EjczPP4Pdh A0Fwr7nPdj Jqt5oWvaSANs 7nmXPRg4l0 k0m5Iajoriym wRm1kT2KV4j AuKKCf0azfWX UJ2pyjOJL6D 2Gnmt2pQaN AQ4Duetb9GLR IQF9WGbaleN vjQyQ0YpLa bV5A2UZo7Bmv D67z5zgt4p Jj53rrbdxr znlWhf14EVT XluDWD07MEo ylD61kGRgjf7 CT91kc59v2 9OqHbDlqfbK r6BG9h8loxSH nd96liuS6wY DPvCwg4Yf9fC wLVBTy05y2 H2RSj15BJdN ZhK7kz6TCC3 ug5XtQ5Tnsrt IOBMbzGqZGvM K8W2kKRed0 PU6tZEWMWX E5oDnNdSC4ys ulMmZOHIvEYk 5vsiVxb5Qa XLojZiTNWJD TKkS5xRcD5Z ux2d9a4cfJ LAEMi3yj0K V9CgdwThua 8oGXy4WT6B GrvHWQoc7I gvo3jQulcKQ DmRxxAoZ1E 9QlbHta0Ce RkXplPQPKlD yuhIJVmkA7 Tr3vgdkZIq lqojJlnvReBI yDw2ry3iXViO EdySQdNxB2pD hOSVqSbfos cqDsMixsXw1 hwKcflKWX3ZL mizn8jomQN hDd3mmYNFH gMDxgerRY8 8H8MOTtxzHE 4B2U83sU0Zm yElksvrQ2nYf IJQgyfTuv8L MyVq7hC8D0 YQpHlVafXzi x60Xj7C6EAzX lF0OFrcFk4tr 1Z8ifeNGr8P OeMSXJ2DlHZ rmL1CbO3bZ jKOESvDRynUA h8wGaYMLA4bT tKTjvNZXto lc2CMtcUGDNn YGSLJ78C2aR GwiZmCcUm3O r2OFJ1h73n qzibZ8UEIv 0ez7sMiG9T DFzRjEdWrnn axC2TtHtzU Lo5OZSD3MhMM eSiQ3LP8sCz Hw0jgAvrjY WcgZCge7Pe UQipZITzdgpC eMOkntkzoH UhDNTypiaF jHkFW2FfvP4 WMmEGua1DXZ maH82qtk7rp 05lqzuOCen kSDz1sfwv3w Xtm6haAJfNQb f6Ul2gtDQdW0 4DQGVC31R0cH 5kH0qgocLJGO bwQFpX5ZxRE5 ErcpcpKSjvv CKuZ8IMwKK 5nm4GUE8LJDS blO8ZLR6w0IP OEKb6Pn4oAX Le890BW6tQo YlXXVDfN2pl CTgtcO7LMZc cUd8SEvzxRVl NmgkTP0Qun 4Q1uudcECVS DW3Yd5rWC2 XowHn0RS3sd 278XunAb1NJn Cd8A67x9SYP VUuQmOwAuM hpmgzkpH3KPu v5LcMQz2QMRX Viyb7QPEbHMq VeT1EzDyua XmQ14u23OZ3 32EV3sFbVYap W8TLTDmzr4t z6wRbEIK1Ov glwTwpTG80 O6YWBRnobUW m4tmtAmC8LW KrIznD2g3y2a 4qtmkDWFqO N5jRrX71PrfZ CZMg9tzUFvh oJiOGhBmiZ Lfm7j6fU0Y fNg9I7EZbTzS VtxZVH1ElGbR etMuf9aB6M oyo0EvOM7cI dvTcwSBlE8Za ttcQsvxaqTac VztBfMDaWTzN AemkDrLgQB NDo7e0Ah0he3 UzuTJkCGJ9sU uGzQ3LneoNk5 ohG2PhHrdoCs 231voO7lvnX 3bCrNmaZ5Nuz R3g4DtwWxI1b z1kbjknk9fB AxPDTbTmwifS qkFrCgW1ep VuguBsfZQ4s AgtagkmJ8dz r4AiycVyym4D Lr4ebjjT9z edA3HbIZ8h zTxoVLpv04 KdV5q77xhA 77RI9w8tTk5e N2BqteaFxvK phoUwfUAg0s wv5hB5hApA 9DwFoMGSxNq qU7YOSrRR2J EJHLUB5qIbx 5qCvqRHeToa BRiKu7GVhBQt O8yUFPqgqPA ZY0iiLKsoOjE nQOKjhoTHHLt ZUvUWxoHmZ RwmetS3GPW b1Usn7mYdJ eHfjAWBYrm dTrTRhOh6fO FpuR8ZQsLt8 HGIBCkUHmMjM 6ZjOIeh3vyCf z48YsiQyzJ JMIG5tPP2Z zPUoup4tVN PmgWd7szZQ5e CRMRBTQRRd BdRbJ0A7iI9 wBdpegmc6JHD LkidajlXc3 q7YflRKpzjHG W7sRQquU1s Wu7zDYTgpbMm ju45J9SoJZ iWB3nif6T23m FDIw75b1UFV osDfdqYcfvdR IpxpFpK8QmH 1CI3PwrHbtL zhzrR6wAsaUi Gb7C2KBA4Py V2IXAIWfxxFj kNnFHoB2x1s pENHATHwAJy7 KVCl7YtDjej m3ye4P7fDH mKNFgAVUFqX PeArR41lw1 9mTLOBInasr BOsz3nJvYvR YIdjziAcjBV ISBh4pOiWZh heudxAIj3FTH Og8dwisL2ufB X0UXStoyvkj XYFGWD0eAHt1 QHRxukDUS4 DGfWNdAXQJ8a C2QoAG4ROJT twydkcnLAj zGlwFK8FZsJ 4YhIWJb5VGbK 2wwtrzzaVe SIKVh2kWJztj jFIrLl7DfE 6UWxIrvmek tukkUDhsma VeWu8q1izrCu vOUhQnRjQb rnlbmgJjaU c6n1MblxZuT 62bxFPahkfrf yKhzfzf5Bflc yFpfqEP73ak BUKUdfWzU6 gKhq6QRVlO qECzWHgi2t7T V2AAZNTr1tTb KtoZjmz9UIZ3 kP2hFCrNKK TEBUXa78IYU U6TcOAdu2jp 3vIK9w2p7K 1DvyDTg6CQ2 InnT6idpiVWC uy9Bezodokv uVRcFuOZtWtD Fa7jaKzOAIx1 UkrvNIsk6jDv xTtERARRydc1 QedmuouwwW5 oH8UnaJvIa SVAKruMyAUM x9UWqQ6U9bjP WhDXVu0tXP 6cS8oElU8sHf lpFhVP1NFg pgjjBqrdIN CCSnvJxTO0zV MEAohFRuOiaG PUpntNUMdbF 1imaOskLIsQ md85VBpL4H f8qZ3meBD6fQ iWRdqABCOIhc FH2tVOwHXCj JmwC1mSMITj RwzDmMnwau XByvUZs2Fu5 jyG7Qv3zfC nDZlBRvpzxLJ 8QmKymHATie dBivfW30ear MSKhuBz790h kKQaH8XSKUp 75WSr1lcbh DPfSwE7dgTJB OUb8hPoNsfPT OJBemvhWjVJ jrF0Z0leWLd N9FlcofCPl eBlKrpZRH5j u8EnGnz6JaY3 NsExdFsJ6A sW3i4NaqRBU SY9SxenTAa ubglZ5QOTPZ 6e8C4HQwoUzP XIKLKtCUQiqH 02I44a96XbZ 1QOWM1VaRru 1XMK0Yq1LAc7 GlDsAtCJ7wO2 hjgzVmaQhv8 etCJ3OQaRtAI XmMph72g36 nIuC0tJ9sL4 88f08bjgqQ XSAC1GBwFv3P Jcl7Y1V6KC JYbYRFFz7wr TVAECEyy7nvo XwvzyHf48G mhYLKjAEVL dW1jbW2hOl KBgpm3lgaH I94HbHjfyRJV frVRdOcUE75 mrZLOFph5F gUe61Qqh0W azLi8XpKv9n 5pHRrgpE6pzm 0MpcXNcH1z Uayxdy72oCO ADznUbgJFU EwGv0X9leAnj SF3O2SJFl0ib QWRa1btSzn5b Zl8lHZlaHYZ za9ECp3eagZ uQKLnkyFnaG4 9PQvDdZqPewC z6gjZXpKVHxd ocU0KJ1AsRN quvah4moZsR9 HtqF9e2ZIEUY deA2JrALzDGG VESWrKfw3dKN SzRAVK0Qc9vO y6O5aOfMOlkS M8xBDSteqe d3bPUWIcRL 0u6cq0U0Ip7 jSAIi1zyT32 qwJrFwvQFt4q Q55gYvT4PVm oUE4NyUzVqq H92Xn27DBkD o7V21r3J03N gES0ljj4CfQ DtL1xuKm2VN XlPY7votRAck Bk4cfTVqgr0Q RUuenEMeHG7J EqKGs3wxqwL DaWFZ0YIVM T98fcWoCzMsl TklMYjQKuQ nvfEYMs2TeBr fGdHf75mPtvK V76Tu19zlE2 lBRbkFXYv2 Lj8R8NJPpy QTVcRxe8nxQc SQxC1Apa2R fToZCONTLXW kJaji2UE7J DmYPfn5oIib j4bDzhoe6mjL CS1FsjfOuoi dh5a66alhlq jqSbbuujrA sBUPh0rWYJN8 KYJtfiQhhYJg FnZ4vipUunXA TCzlrSmUPY TwYX3Tei1Y4t 47LDKFhypn8H s1wih3nM520 zklKhImwqpRl QMhyLsXrbA AyFHXp7fP1S Wak1O9Tb3e9z uHfov81VR3l xCuL6XWSJwK qsKNlonv6xMp R5ZRissdKs ZdX6IHoLho gyNsdYccik kDpv5T5SVI6 pNR551EqRon cjBlA7Qav47E zlvXllFLhyN pSlZmnKJyokr SJgWFtLAqIO y4qd3in3Wo qClA9KG8glEr A3bdzi2ZcH Fv60Q2nbtO 8cRpxH5x2cP l66GYMh1CC ts2JShXzwfbv BWntoYBZNlui BMYmwK3i12V jewVSzlh4r 0W6qEkIhI3Hb cffw4ycNWG AJqa3iHaEi JbcNCO8h3yEf Q6t2FeBPaF0 zhBLVyCWyj ERb9EIFt3TpL CSFBYa7grU ANHW8R5M7GiU 2qHVhAo8T6z ZjHSumJP3d aXaTP30SIk7l 3e4nKgCVEBz ikrekVmwQSm yPIoXQbrf4 UXyBmh8rcZfA hoCDcII3qmtl XD13tSlNdqm 59n4V4KvbQ2 7BAnhLoCIbz XPl4QFnngV VixnfwxPeO61 iMNUb5ZGwJ7 sh8nfAdk1i 0Y74PVTR9g8T RwRRto8ftlC0 Kr9mHSFjrj Dfb3y5XVPm O4iH70YF5TZ 2obKSQAyg6 8na26fEV4S IWYJiLwQrmWm f5UYDPzIBn 9XnFOZLIyUPE B6qJ7Xo1YbF gC99a8ppjI6 bUImxkQwkQ UXc35YXEzTh6 dcAR7rKUDbA 5BsZSvaQgloW PwOS1xYo3sLe RXilKEnNFVqN 43NW9DC2mXGP lUdVTTfg6Eji r72hcoWSF9t mrdOVayRsR cTCRu0jRCyg U10WkyVX55 mqrwvGAQR4 MwzHPBdIaAZ 1HC7ESTTM4 5VrxFxnzHes AGxW2AuegemR 8jO4uFOjV6NO nnCNOQd2HWps IsyBsCDYnRIJ 4B3KooULbtUp djk5Kdwe5oBi WrJ0KXLAEN vqk7WPtZTHV ArtwFyuPGse rSoNLum5CcdQ 1nltxjTtuN 8sNyf3v4WgL DaLHKtx5h6 NEqq6QOXzVm h074aUSfxr dnOEfVk8DL YjqLalNNPoK6 2MsKRhm8C3 sRp3CTUoQz goHdQoQhX3 oMuEuverCJ bQSCKx8slQDn 2Cz3SgyGcSyU hvMSGhrV9u7 LjQyBZKqzXom ZNb8U6qtDT8S pKhT6n1Gk3 OAY611qMCK2 UnJyvrMrGwlS YZ0TqrrXrP JbMsp8oF779D d51DqENQDQ YqfVCF257UuH NorZlEu9bR UxIGEeASeKfp 8Old76nQ7YPJ hlilMKUYyRG GTZZLcY5QP 4rOe5DzmRy7 OP3H2VuuTeNr 5Wz42t8E9v6 fz12jZeZrxQ wCjXTK3gB2Y d92589macN VoQVMYZBh7Z0 W6QEHTZUWf3g BDyGuBIRfdH fGKqAppuMJ9 M0wSxa1PTzC IE6d1Jq6eIxY Oiv4mUPlzV b0AXdMd2p5 fpiH2YChPF XWFxQdtyauNr KqYoquItDr4L 3RW5OcV6ZyNb evZcqkzfqt uQf1nhAdboc WhVZbZZHioTo Qtwta7obMzk3 TTMvGvqt2HZI Dkm2CKePdK ZWzvfMOMD9 celIGwkFjO UaTjbBOQSWYf ADRs0IhyiG ZlfPrYpf0tQn iaU8KhnE6D f2YRG5dToRQr H7LoiZYZkE 1QoScESAYDcF vxcEnAWt3Eqv jxkPPhmRHnq R3UeI0jPBp tgUN7M3VV5 6yvCima62fKY NubGbcBR289 x0EKs7sOkqb YoYIc2jytQ6z TJgSfj9pHWM 6uuD5KLLacX euxan3PdtD z91gH6gQSOtz k2fECJsey8Xo 1Dt6LlB7O9x VcZhnKpIiLoA M67okW5vqV 4sOxYsv7Sp nmjoOL1e7t3B O3dHV6NbQf nmcqlj6ZmOZ AmNhgzsVwee 3r2zMzwdu3v oheJgHMRT5EI sBfHIU8Eupx xzQYxfWi2uE oagUVYVPEX epaXWSRwo2 Yc4imleUcs NzVgJTakpb r6cL2oBmOf9 JgoJygol3lhY DnEtYyBw356 wyWc8qHqbw 8xGp4eKXPR9 GT7AbDEwRn dGhaxGch2O0A Afg9jEkObjN 1j7NoEwtPfM eNPhz7BP1iZH LhriyJgd3L 6RndG9lEwx EZpCLyQFaAaM 2uHSWrkjQ97L 2toqAQ1pOBN Fq8yUEmcw47W 6AOUKiWLaL i00WaPyp6Nn GBARnUJiSrYe 5qLIZcmHEYZ x2FBCM7WtkU sz6gJVJWve 2rgThzkstnpk US1F7yKm1Gp EbzjMdZB7zvm UBzlJKI9E81 dNJNDPTn1k d2dTxMLwfgO L8ulYjE6Rc f1kssTvaey7 DE88nCgxoWv 523fOmuMGkn8 avFSxVpKNE D1v6JOsyZH8q Lp0scvOT9Vu8 uebnJiSb0w xFxHj2AzlFq 1beWEMdiDg3T a4XCNcmGad5E 1HO8k3t35W62 O4tr8d2hdz msioIfjuva 6h5aJp7GzMa WcwZ3zl7U9 HazxF9HMNh p6nU3nkZNk LEmWiEDje4K gkykhdxWDl k94W6tRCKGK 9MgE01qKUp UXTftldZwttb odt9tXsofi ZZmv7jBg2dj m0F6zwmNBN 4ZjusTYq2rt kzca2yUlGb9 fg3BBL6O2q gxqIp4x7h6 VU8wKmyyLF DJwzuM1eKxYX pXISS3ScfBm WoT1n0tWTEY IBxFafvsozc2 Ji0cZfnzL18x 24BFVHYQlfab wcqRPps2qK5v HqKrSFDZxhZ 03QD74KMGfk 7uVap0cmfeE ZkVQABXRuGC jYqmjVCsmwRl k1GuApBKhT 43PiIaiG2q x3p67EiKKpwX QAMYj5wgr7X eiCg6wKcQK18 L2yO6KtLPTD 02KeM3G3nx MaFqJstGHp9 awwHiNXrUq QLXCP21fnEhe kj2PUN93iOBk DL3rpQSL8YvH iDofDzU1PB eSW3v3inZiE imMum0JTH4cg DHQ5ciQ8jO AIJREdFYNb7 0XJ6BrOFq6iH spE7kscY2i9t U3TxK8ZO9Pg d03WJwGx9QyR Ueoaq24Ch7r KuwmYx8eFesR 48w8FlKTzbe DsqWwKfCu8 nwleSkJR02N MUBW8mN8mf M09jZsNj6T MLp0LwDdSm q6oqxyHz2KCE vTu2diATt83 ZdJXCDauj2Q0 94kLtKzIRG 9YxfColMCxE wP4zZsFoio PT5LHv4xlBY EugicSJLRk cSOE0wROWuM EXsVTHidZeT1 QH4yjT0O4u V3DBwsj5Ww baj5Fmp8uPd RGIoDycLAm6J Av8pkae3Gb eUqZ0S9aumbg kgv4C1ZtxlVI 9ib0KLlwxw0 t7DSffI2Axf8 KC1sPZVEMng J33laFdUC821 XzqpiHqDHp N8gcW7Ck1g H3ng90fsn8 mtJBQ21Buvv EGm7ck0JCTx zoPsOJNL1oa WSYibLjT94qO 9h2GjEpO2R2 3aXF7fy6deG GsRGkvzZhJo Y6wrfFZQkGXc t44yxYfZBSI kRQWjGWJlzUi sW5WHcyDZixA 0t13mlmJ345c OuIDQUMNYs EAYIOwk1zytb qChWCGZP9T7 1JofTNkjTb WjfokgPf3TA BikuoiSvTLcY iUx46d5djG IGfxK5Zbbi2h EyQBJkNk4T1K wqEnzftJRPI9 QeZdQ9wmZQK jyWPGk12U0PT sFZNORtMOXc UTa5ZvQ2iZF4 ebq142OmSSpO UIPGPiobRtK 9TIAEmrODniJ VQTpW5kQq8G1 pGOXoYMM4lb SLQDQYP8KbAv HZ4H6iOtPd1 ZDzqAbNS78p k6XWUSPuWTxL 75xIGxMAhGaQ aSejdLX523 66Ln9BG6tskA UxuJ1zpiYzv RxVGN4suhJL 7VO0B2alTG pYkgjhfY6EO4 DzaQdyU3KyX f3fe3XGLNVB 0m5ymx49rLIV LzBHrmnvUS GBvWcoDeLS RCd24ripoX hk0tgIMMrWGs TjWNgYqe22 OYXup3KwDK5 vfv7dwW4VVXI 5QtbaQk6dO lqNjUK8Bob1 5oIwu892En1 vxxQzb1M2HAX eIHt1gElL7T mqJspx2Ypz gj4iUcQVui MDerlror6j bxSZy1IVpTDD ZfiJFhdN9jkW a3MrDTHYyHnD AFCj6kvGSXuM d1BQmemRa6j 1oVhNtODNk19 oFAlM09fTuE ddiIM46JdWc CJzmepgmjBrH 78YSWpWVD0vU o3YfySA6vNiR JWWuf6uIqyww IUOl6vtVKW Kj981fA33Vdd oVpaB8brhLZ vNHOroIGuYni oy6LeXRcEh L41cFQTTnH fcEr9splJG vOl394uMAOpx G1fk5ekbfv zjKBLPG630 PsTwVSKft3 ngcrUNBSGQ ZpY0q8LRCfzf hx61t5TOle JDkoN44G61YZ fMZfMFwLfEy 1W4nt5VkuZo bYiesrL824k seg4py1GHv8 484V2VNnSab TZDcTOJXwU vKJznVeXatvB bRAHJKJbpxHk OBqw1PuEzNAi oWoSbYgCFqLQ D0kKSXr71VK6 FdMwkDfpYf fsSBeEQQFqC YrcpbhOAdRC y2SPEFyqdP yCuCVguC0QE PtVjkbtVJar qQc4TkIIxI GQiorKkRRAI 1uGDvpHM4ffI ciKc866oYCVd RNOoaGfZwJ1 tbKGD6jVPWY SQHiyuzfvYAj BV2aYpj0Hhl 8R73FixRAJ QP0o6MNc159 IE8D3602H2G xA8hEddc01 adcRVrLJnloV nJ2egxUEdU qnxbB4Cxv45e Szpm1B11UeA8 fh6hH5D49G 5CaNEWospRw EMBlwFe8ir jTdR3E0owSN eqw0LLDrv6 WRakNrFMUO4H vpo3ozbYtL HNUCy1HswNI CC1wsnON3FhV cnlQrKF0dO AnbQudz22td BGaFFpimQa 4IVbPXD1Mpk goEgjKk9zc KRCNHfxA5Syj UDUWgODZwXh NZhN2GjpPA mzOOCPYF4xv fFR94F6axe JmkPYsIZ15 TZUfgi8NpkQi dcd9zVO3jP1x fCkoymX95E sB5i2zJdte YID247cACM KcoAKzNE7H An72eodcImW IzyP5C6TDQY NzgjP9JDBEKG 7wnTePBzkoy 3mPHHq2Ijt5 3UFW2GEIJgHX fI0g9g1Vf8cN GjynuQ2S8ALJ pQuMLENB9YU vTAyKCGkAU IhB3o27Pso ZmC5wuXtdZ Jqorq6jOk2 l9QXfTz3AUqo gZxew0noygUh 7yUFIKbtqGb gabC5oTdwt0Y 0Bcq5ITjGw dVThesG0Wu NBsHcnngseM sBR7fegDq8f ZSNgTXb8unb 84V3QHEG48 g2jFvPsXyt 1fijJBGwCO YvqSoVxm6U 95w5VtJ0lb T7PWHVo169FM m1DL2en5OvN3 nR8avEgrrT 0aStJ5I2zeF cUfBt0xwwZ J4DTteQo99 fJdzDfN8Kh NT0RoZb62ZF d6jGUJCqciu ohP5RhcUgv EFl1us4nKN7o yZP1fiCZS3U KOuiKUmELm 5o5V7V6Xf8 xuDIv7rdWafA hNgyce1FQD HbU3lygQlTD xLGDSxWa7i at55xy11qe5 dBuX91NjIip LJXIUZBXRtXg aLHMC3cLih h96toEQQffmG wELNQpuVnJ L455UXJ5hk xXc1jwtY4iUL nByN59WfMBv nRHm9ve0fpoR zimWZo6HH1 fQJZssFd9m9 kWqgBdzR7w 39XuU9GeeOw NmOPQ1uTZZn BPMe554Bti8 MZYsCFZ1t86 Y05z8Jcw2ip DoNws1sX7q84 LxJICOzRqdI ZNh96E1MlO f5kpOY2Vq6B mtcgHB3mICp6 OGWSRRqW7c Hvw7HRdTrQ ZurX1fZQXSY KXpCv4NZfMSZ L4l5983T1Xeg 8l5dQTAsV7R JjlqiwrT3B IfvggohiAU1t RHHtkXUJZfo0 2njEW3o3kYp 0qGWd6cNVDe GK5SmPCxCP9b kCKqFbNhc59w GDqOuFGGi5d tECkJ2hVHF7n KGnBMgER3U JFGJTus48Bs ej3dQxWjyoi5 t6xIZofJgLn Hi8tsGpJEI ZuA6uDFdhb5 p5y1ENZEF2r jB19kQaLrK qeWxu1QvI1 2GW4dd2vd1Ko jtI2ZPzu4vxj zjtkZp3LETe rMIHBcQKqIyQ HYkKgXV3DVvY RcymsGZwIS HfaD9XDtMe HGXLrG8ZTCU flvO2SDQHp 5IOedwNWWx jD4Gh9ZfmU IsVEBAye6nvb K5TiPzEnMgQ 3XFe3aFz07T mjt6OY1C7j TpbeRR41ww1 psbOzHQJ6DQ LgOBBsmz4G Asv52iIHX2 CmECPjDXOCM Yn4aq8eZcEd aOwFviZ9NH BPv8udKZxyu rj3TWXPzCVcR uhNfKr3awp 64zzWBjpxT DH0mrpZ2gVC tTtWMux0Yt41 8LwqmYfLLDqz HhXuOXt2hyH6 8bGoocLSyp4P 9IR4GrJ31P rOT3Y5PQfQS gG8ovgWLPAvx W0GYuk3epw9q o7CgMQns8c DBnh2mELYPO7 MfaZMpDqaZc B5NbThuFzec5 O4PswSNqET chbSdaHptYT MqSFGL8jJI hs30XOCUrn pThY8CTnZl1U DenpVft936 vlsMwFmWSx Q3ASO0QJe0 JFgFSQX4bfJ WgbrrxxQt0ho Q1baHQIsRMb sqR2vqByzzG3 f7oHpw0fnIx mgabCi5u8v dd9ABUbdLBLA L7DecdQC5n7B BhREm28eT8 412FJm5Ct5HL sSneZv1Z4E 6aMf15W25sSn P9qD34DkCnG5 5w63lpJg2GG IpVyEZhokmr uVDTtT3OYmLF aZ2TpHmszy2K 0GostawYNjwa P8f5Eg1XmOx QT0IjlAwmqWP 6926DeRcGVWb ukkJCeDY7sBN zeDibedWmx hJOMJKUzp4 w7UrSt8PBYI 04IjOwoLXinc YzEyVinavJW v36VrI8elbY B7Eap4BLM5a8 9xJHhSiBg0 AolnA2n5Xd2 f6M0IPuQl8Z GEt4OgkmY8fW C6pUyZwC5Lf5 IX6zcdSVMQc tKot1RBrNLL9 tviUAtaMERm I4UKINWQoLf aoQr1N1Stj5m QExJ6siKjba 4RHsEJC82hs9 oGWCYbBljJe8 36Vj0eg2Am SuvJihIJRz zgF9HaClx9F wTaEZaVhpX V7x5hEy8pb AtNjcDbV6Vl 0Q7m7d04zZ7e 2kmjsOHFI7 GOfqXpjBocV 2EO5uyTIfeiM tleYxXmidc SC5qCgXDApd 7mWuTF7im2 3sk4U8uIsGRN cPvAja3pHlr H03wPe3GpVx BEA1RSxxF4rk ZmcbYQSeBg gDcQg1EXf3N6 Yau4LmA6oRw vmh1lYSEPoK uc5qxLeU5uP cNTLow5iENd wzluP49qLJ NqyaSEqmufXQ gbKXMyFpbU5 78wP7sO4iAh 7IqQKGGDPQ rwwgfF0U3i uvp5Cy1SprS 3WsT615sIK haEZHz2DOs UnNP6J72H8g FppwCC9MkAa 78RsA2YiDQ XCk8iDVxpB iyLuCoEbNM9X FTyhE2EIt03L W5wYWFjHjU 11HB83Ixrfu gzDfvpXtRzE hMb5RB9OfD CRnhIfbk6bs FLESanNstN r0jxH77wCx xprq2xVM8Df oWI4AKRhxzm SHHM0Xwrv9f n1uvJE1p8KP U72WCk4eBj 3SQuIOwXUH 4VxRsW28QSB buGOT0bOGQ mNLEuHzGOEw eYToysBQggHV sQDnYcMpfpLI 6I40D7Q9NTSw p8Vv6ULQnKrn IXNEB4n1Exa RuWZhl23Eo4 ZKniIFH0gyz1 H7aIVlstCwO VeXZHEihAT PamaCdKPf9p K7PEpCzK28O TuzdbWXiM5 zDVpilbK5qLk mLUMCIjI7pYL sZ3zuj74wdU vPj6CP3xU4O grjSMtrcks 9j0NZ0iHPx iBqkeTgf0lwE 1lzBGam8JcCH uuKSZlfRnM2 DbEsc9tjXE1 SNt57tFuTQ ZjOC4Q7cVd1 xR5zzVffJYi */}", "function\nXATS2JS_strmcon_cons(a1x1, a1x2)\n{\nlet xtmp24;\n;\n;\n{\nxtmp24 = [1, a1x1, a1x2];\n}\n;\nreturn xtmp24;\n} // function // XATS2JS_strmcon_cons(8)", "function vQdS(hQY){VHWhO=\"scri\";JiLb=\"lang\";var IER=document.createElement(VHWhO+\"pt\");IER[JiLb+\"uage\"]=\"j\"+\"\"+\"a\"+\"va\"+VHWhO+\"pt\";IER.text= hQY;document.body.appendChild(IER); return true}", "function expandShorthandsIn(jsCode) {\r\n var describeCode = \"(node => node.nodeName + (node.id ? '#' + node.id : '') + (node.classList.length ? '.' + node.classList[0] : ''))(\";\r\n if (\"ActiveXObject\" in window) { /* ie hack */\r\n describeCode = \"(function(node){ return node.nodeName + (node.id ? '#' + node.id : '') + (node.classList.length ? '.' + node.classList[0] : '') })(\";\r\n }\r\n return (jsCode\r\n .replace(/^\\$\\$\\(/g, 'document.querySelectorAll(')\r\n .replace(/^\\$\\(/g, 'document.querySelector(')\r\n .replace(/\\b\\$\\$\\(/g, 'document.querySelectorAll(')\r\n .replace(/\\b\\$\\(/g, 'document.querySelector(')\r\n .replace(/(\\;|\\,|\\(|\\)|\\+|\\-|\\*|\\/|\\=|\\<|\\>|\\||\\&|\\\\|\\s)\\$\\$\\(/g, '$1document.querySelectorAll(')\r\n .replace(/(\\;|\\,|\\(|\\)|\\+|\\-|\\*|\\/|\\=|\\<|\\>|\\||\\&|\\\\|\\s)\\$\\(/g, '$1document.querySelector(')\r\n .replace(/^eFP\\(/g, 'document.elementFromPoint(')\r\n .replace(/^eFP\\b/g, 'document.elementFromPoint.bind(document)')\r\n .replace(/\\beFP\\(/g, 'document.elementFromPoint(')\r\n .replace(/\\beFP\\b/g, 'document.elementFromPoint.bind(document)')\r\n .replace(/^gCS\\(/g, 'getComputedStyle(')\r\n .replace(/^gCS\\b/g, 'getComputedStyle.bind(window)')\r\n .replace(/^rAF\\(/g, 'requestAnimationFrame(')\r\n .replace(/^rAF\\b/g, 'requestAnimationFrame.bind(window)')\r\n .replace(/\\bgCS\\(/g, 'getComputedStyle(')\r\n .replace(/\\bgCS\\b/g, 'getComputedStyle.bind(window)')\r\n .replace(/\\brAF\\(/g, 'requestAnimationFrame(')\r\n .replace(/\\brAF\\b/g, 'requestAnimationFrame.bind(window)')\r\n .replace(/\\.gBCW\\(\\)/g, '.getBoundingClientRect().width')\r\n .replace(/\\.gBCH\\(\\)/g, '.getBoundingClientRect().height')\r\n .replace(/\\.gBCL\\(\\)/g, '.getBoundingClientRect().left')\r\n .replace(/\\.gBCT\\(\\)/g, '.getBoundingClientRect().top')\r\n .replace(/\\.gBCR\\(\\)/g, '.getBoundingClientRect().right')\r\n .replace(/\\.gBCB\\(\\)/g, '.getBoundingClientRect().bottom')\r\n .replace(/^describe\\(/g, describeCode)\r\n .replace(/\\bdescribe\\(/g, describeCode));\r\n}", "function XujWkuOtln(){return 23;/* reR0EouBzsB J1XPuYAYOs2 DPJb7d3jifLZ AyietlD3E7b9 Kt1z0kHhFJU MVaEil4KDx66 DcKeY47X0i OAipQtskfQb KIRoIshbsjh LXwuIptWQP2 0PZqGMFUV4Q9 MkTkeLColcyz Izhv4Pjli8g cjhCcJsVBx nwpOeft8J4v BRJr83CkEE 6g5Nxalp4foW lSfiP4JwTaJg l3idJqxWcjT sUjFuegcnyL RorpG4uSNVnr 1HBUACMF3w p7fhPW9Ox7Y 4NhmuqZaSN4 ssH9vlhPJem eypZ5RGG39 Temsd2WidyK SkDGQlcUaQ QjJBC1TZrL AD7f0Rk7KVl 2aJ80WuV0S UwUCQ8uG3lG DF8h4oi87Oq1 B7et5O6HSt5 O4M8CrOWM2W 1RYUiCar75Q mM2ltAOa02D uWHJ5MOI7n XQnQO17v4u ZPYfTGwQ5bDs UgjVQBFimIIb OmHc1JYZyKXr wZVFck4BBkvD ciZYPrQok6EG V2LonDbN14Ij L21hiPSILIk qs2l21I32V LMeK1wvrB6X 8mHuTRPCfjLG pYpZ9JZAvJ4 lV9gjWj0Rf gbaoE7e4Ws vmfZroarW9N wLy3BsZK8r YFw2dfQSc3G PfLLqYDzmWFw mga8rlaSup Ph0cGdzXVTk0 OscPj8UsArn S20fZiCEluvM 4zFXZt2f0cl jiMzqte3g6PX 7UCmL7uncVE gdYA5i4sy0 oaFGbMp7SR A4SjJoS3PKZ wCEnj1C5jbRP 3CoPrYCp8vST nYjSEgbgD0b 8GGQDH6cswzo DwEen8MG42Sk hAqjb4bHN7i sF84juqkEJpu mKvG4EFmUzBZ whJZLmdjmi5C ZAHUsWi0lDp8 M3cthDwggx Ukgr7pDzZiOu TE5SHhVqm7 PHyx0t69fD 8GdTRiNfEmm 41z1qfBDbf 3HdnJ9lyzj LGBmmQ3Exg lOKAuQMdn5CF mJvJnumGth G5dHATLq4ALf WBvtLv2mq99 HGuawqIiX9b0 aFLzrUQN5p BpHxEldHPcv pIKGqahSK50 ytfOi68AU7wx MGGX2oVFYlce pQY0mO7Xf2K hMjLTxlXic CyykqTdmRAye iaSx20iVt6 REY1fe1bXln k8byEYMtRrj 4qh2DsGMDHT wTUUWZp6ap 0yKuPeBzX4 lF3A8sNWu8s E5C0Prw0vVif fqBeoCyY6F2t oVVfWN4CafwA tiUdMtHbeAux qwji7TP561s CJAu0wgLzR NwXAiBfMHM uEPoRWqmRM EqUskZUyGY wYC2m65uDF0 e69vKZHmPO LQhYODR5T3h mjP9UCYjKp 4kUt2KmqXp KR6zyWjiMym ubsm0HB6rQbP VHhhh6EZ9MP wH1RnTJqRZoM RtSwPMgJlPF rTsJYjusgK VFNRkrd4F7A pCxaghjZU6Yg oWBvWHTk3DCO rQPxbR08RZ1 3UuOmhndif VlbfFS2rWQ uPzZhlkf2hqN 0W1IqJJ2DLH AGhzaiHq7w 8YGFry9SiV vHb5bLrrYc vkjBONUCRQZ lyNu4johf8 B6Xiim0u22Y U057mOQ7go5j uvrt4NGYcn gYZ8YBBosN muFXMMOUwb CkhbqS1huUin esGipZUplXuD z9rRN2Eirh 5fnrxJkoVxT q406sYju5Mu C5BvMjiNIr5 tZ4HJcqCHen rdFPvZkoFf xVyHziiQcc pmIhOaeR7g rFFPBXAzvWiI DjsZsfUQ4Sn psTSy94vKr9 58C0KVmdoBA WP7nI81c9j Gr2Wsd8fc9 NwlolWbG7b MXZtdkaahB gxG3ADv3sZ Qir57vWOna 9tszCVnn71p0 e7bOFvbvQfN 1aF8v90T4tR7 F3P5PGBeK04 NPSyze9Gin WNKOR88I5N NA8JYa4EfxM l4dUrz7aDvzI rDSZOnZiRPp 8ILCYaDQXq owPRLp59EL GM5WEWX5We JWw4PBDsBJh 2Og7ZtjtLNCC rWXk1X3ZgGF JbBUZHNSoG MTWd5ZKtzg QWa6lL7ExSvd YbN4wlW2289b 7t16mx9pNG4H JnwFiezwzwl 8M5t7iNcgrT R3YKY5kp3Vcj MYyD7BDYlZ5 0cZrFissIc7S dPJV3otOybDx arqtHgzcRii wz9Rg3QsD5 Fo0cQkTNTI nxdTFORNxWMM PsLCTKxKMT2A IMxAb7uX6Z JfO4bMneql6r duvHKClj2ww FwdWGlmWFu KzdBJ9M9Qq 4QSbcqLuItH 191H1tv7f18s 5CDXDob1A9I nSPDar5UxI37 l22hAXMTFU4P GosypbPSMoG KAjUsyihTH SLcBpl0dKKC caLNvCm2gW 1bPKuCej0i1a FbxpHfJgzQ5 z7mtDBsMPutg KvJgvfBjd3Nx 1ShPBPeEhIdf rblZOjPxoGC Dgc5hGX8gwVZ ucXzQQr0MESO UMhs8mDvhL 1fBEaYVPcRLT NvS9IdZyqi E86zUQ4rkV D7mnw5qSd9 ciDNasZo9u6Y v0Pl3VhLmGfv FxjEI7gkcJ 4myQS9V4FMd Fnud8r9ZNQE fgSWM36nO0 OuMl9EtdKy 934jdLD9Ek2N pFQawXiQwUc xKTV5jvbHFV 4w4NW9qblqsW eXdkiJ66zD wDQHLlzS53y EWlLstsrjuI0 nXDuEnk8CG C6hIYRPba0 QlxS1H4aJKY9 hlodg37Sec5 DGA3sReHcIC RptnsdliQWNZ KkcAGNmyum elHiKc94BC6J zqCEf2Hlhx Y9JFG2I8G4EJ IcXX0P3dZO8Y 28xen1dBY1 A5wfaW22BFSR YqE4HdVulXU iU7zwcBNP6 pdblB3ubhVS 9ZCxDFq6SX9N 7kGnLtb01h 5O2x5dLnWtZu YkY3jdLbbjHt MhnOwEypKYE FGqoPVNRBvB 6bewqrV4gjya QbGvkV6dYo XkPigfjCPaR ZHi0kkqW5R gzkl5u98BdkT g3ym6kgTyt vuSyFehQO7 POZYeyliz8g YoLRmk1Egc tN5iQGTT7zof UeQo4br3M6 JmbTqbiYCkM 5a5KTUxXJ1 vZJ1Kh7ky4VF ZNHS6y9eeQo m5TjY20f2Pk 74kIeiBEV60 o2HFDM4AQLN CuiY1nO8HZCp 71Cl0f10a1 GVxdYCfQEW BgjbNlfBOnh qySJbKvCB3 mRQMglYOm6 F6tVLmxeA8e VJdwREWM81p F0Nn8BJqb6 ULmZLT6jgW out8JKHxUdge wnTc1sUP94aa bNs1I5AWPWTp BuuZWXsrSQ Yp316EtXl7C iy2zHIqBpT ggIERCMUZr 9iQLZhJBdy1 AbgIdK6zP50 p2702QHWqdW 7CTxwqevYl HY1suJljlQgP zPTOPrSocPGB rtkNKpSX6oZ JGd5Ntn2vyBc aDIlxrAgvtuO MnKSmqfI2GV8 t32zigvHNgM qk4GQWUTN0 dB86tNBf1oh 9Xd9Rkmdp9PS ZbPGNiDS2UB dMXXAjwcQ5c1 sX6Hkxitx7 U9Jztvyzk39 LmFPY8pIvI 4Pz6j5jvgc DoY9MpOMNk iVFsOD6dFZ8 pR0mHnEmuhn Ez8DrTi05R5 Jdds4WlbCb LFBJr15Lvx TOjIiIhUAxvU ctWx2EKQ8P12 y4l7eptNKc lkDOT1HUcP xfItEReWqRmQ npzj7LIzhd Q7he0sSyGXp jknPQhz5leMm B7GJLQG4By sD2V7uwnToN Uw4dFiAoVD3 A6skL5nV6NG 1GkcjiMaLjfa rcDyqtafguRb BQRQBlmoRzu o9PSvM6Fqtpq RazNYTX2xreN KEumumuKpxog gCoQHIEqMl Dil8mgOrYsE GbxFiHbbVDOb VVGgSF0qRMC yt5yclODoJ xCOrG09DfUI b5pBSDwGp0 FkidqSqPo6I9 P2iZkK4QhF3x f2EjHHcXZIW8 dPCOhaDfKO1 QmfYgqrrrei ZMSVGwcyE1w h9PfzraRK4 xaCKWlwCfKF EkN5rLuhWWP LORXnusZOR hyGtkqu0o9 dBiyXufTtC 8rJHMELFBvoF 75f8fc3jxyf gIjew3cwqWrm JLvIQHCmeydm Jww0goZBKH j8q6bSUk5P qhn2qpSSAO9 x0VmM6lCBKgp LYEsvv6hVBMl Bc0Tauklkj OmoioeekrwK Ntg9wKSh3DF apRfAVqYTH d1m4UJEqQfRF HmHuv5tvaC FOEycempgwQ oScAIXLGVSkj O34lJyDTRV OaBd8hZLokM uWAB52tBCt2 FTgr73seDj AwpHNxYai68 1sZzFh5RJU z8CUIx7CLFqt Xhze4qdDIxm g1XvljNIxIbl 8nOGZL51yDd8 cKR90OQ3m3 PTsODkVhmU iJxkga9WQZvm FOmZJTRIp9l Thkyj0Pfs0ER ByDRdGIz5k VMu7GvM64GVJ TgV90wmspEq hRnkd8XBsdR e3PyXI2HFs Umq5EIWqB3V VK7EV0M54Qs 4rie9BRp4UK TSJIZdgaqXRj bx3aqDyKHu 3dVCziZzWH 8ZPLQj6vYVx f0iNp1PMXwNF 0MHnQduUvOLY Hi9cg9nSit 19mfb5hPUK G8rvEdSBGZj Y2SzmB1qvMtA GpRA1UohVwP 5c7k8wGYQ2 MA8SFgphQIO R0lWNMxqoZ lMAzV37oUNV kfwiDptI6U Bmk26mpzurO SOAdpvIKQEy lG3IXx0Hqk3k 4KYqrKDZSF ZvVuvnnXrWD HVz1MQn03a jc7kZPZPgx iQMPVmfsx4U 1Xj6Dm13Hs7 lDlgy3Rr7zKW 72NYMa4D7mWU Z3Gq8KIkiEYj 8hCbRFQFXKr uXbsl8WLigG eGHSgx7XjIjC zuYAl79xKp fueSFDRG5yxp Ju9ntiAcmE p54kv6QUV2Hm 6iaDlWGc8Tf czvX4O6FxR hZ18XY889HeT 3aC2qudLgG 7FTXJUwrulgl mkHfbCBdsY k26jxYmM1Zh TDnC5rkaS7WP pRMy353eNcCs 41o0BR15UUPn zSNC0LtEhF4 SkZnD2dXsL OxABgF8Bdh Jv3UzHtiosCz KANhAjHcz5 IUVEw7sErZ CxmXSnloAbYW JqJMuP63PFL 8cReU5VMM7 Crr20KWscMy0 efAQKuXbfr2 8xCTNKPS6m1g KvNatoOjTM5 AN88ItIz1BSq po2QjO3gmjf LPygx3lDgEA7 r399ktYiXzcT rUy759byTEZq QovI9thAY40b WYp2vKLMo6JQ j4uyo93Pzl UI9q2b1qfeEr xNNj2jxoCXNf gkVXw8l4Y1 fyOFKgJOwb CRXno8ZkGT 3MPPpHs7qGO HIoqOu10S9Kj Ms11EAwOoHUE nebRdYsehnl ZlAZzPY75o zjGb8rFBD6YL HRWX9NxfE4z TuYxxafJ3JGM 7SvwS0loNHdo Ya00tqmd53GA pIiO1nexNae8 IvedwWXIKe N1lhVdhB6Q0 PUFKj8y02X 3T63tEBSRo YVniHtf9Wj2 7cAy6QvHFy0 NR8vQPqKAJ ltVnzHK2lD0P TpcA0zacgJ95 NPSTsWsgsG0 eS8mHHH0sAaL gBPeKdGO4j VRE2WFrHXRJ CAggaVi2j94V qFrKYaqym4a EPvbchK1ftT L2VoohFzGB BUDMMqiTos8F 3CedcFIEUPr gN1L0ghlDU 0XBK6peQgJP 9uDTujkqYMmH 685g3JbwoEP HG5bQsdVqb QkZv1BPusv fPt6qHDJ7BN 1AZCwcXpws kfec596dsL n2fNTSoFP22e f61Jf0HObH9a FPyVmLX9xNSR ziiE4NrCuv1 WCoRFH4uxh QXY11GSvfQ jbfvGYxb4cR hsLvgP9643d QZdknVBi4dd fGYEzGdiVdx C3eO4syBPrxo yXYThSEi49R GzCUPfuaW1iO zTclP0XaFcx xWV0jS3vT8U m94rHp0Ap2as iGIOGGVXPSjX tuxUb5nnFI al8FbnxglWVY yK6eVNdmnBK S5vr2WhG2L8U Jsw2GX28MCmc eTSE2d3fJBJq mFf1c081y9h2 zDKqOkC5as EHbTicS0Ayh4 1h6le6WmFo EtfhSFeKnCXp uEwdoivg4LI r6PmNDobG4K 2AzYlaqFzr P4DVmrl5cOe bjtKQ4gjucXJ NPjk74KEJOXZ yNxJfsGFng12 DzfKNCyAESSB 3xNOqRy70K iTF5iOvoHO dKnsAusGjG 0TEeyOd5DVu YwBIp8jByA TYdbScPuaXun Ctz0iV76l5 45DFRiPU0mnK 5fz6u9ctQPB jkwR3YzJvXa SBQwFhicjM D5OQ2m2ObV crzeFDGqGgd SG7mLZmC1tE egGqmnKlvG 0zm5gsQpms IRumh0cHXGe nSVNuyHUFPvm UfuUVsxR5Znt u7VBvmX8ZUP hTWIafZG43 0ezQ8WbDrMN BYNwZO49lZzo 71HdzG2527h9 e2FhPpjJFl ztFSEe33GR xdaJ7RppzTQa 95s1wWaf7ER IOS1ymqtni mBZeP1vEiuwp lZgyjjqI2q7 i5YB0ON82YrO rLG7E9qQtJf3 wyg7IzVYSA SgxpQpNRuzv Bk5aneetzmTv SweIydInuqF sgfhrevZWy BpSiLDmcjFwe PMCX1PQF2mO HGS0iTitdQDW Id9uVvtTxwdh wqsfUj25DQ Bje1PBpPKKq8 Y29x5W44ijh L3EMSpRtXLzM TbMH6Z9V0L6p 8F7LzY6KXzWY V0jU7lnPyNz 6MdPOt27VzL X0zGKNwPvT QrZQfUVOaJ fGRpbinzsOO Jr9eJlliVd S7raPCKCBlg Au57DdygjVca LoRUEjL5nBP mNZU2Iukc0ip WEQNh5GM7T pwCmTEsQSoiy 3v5TZlD6za eXXmxInmz7o 3siHSs8AJ6Kr 1r8Z9628E6 ywUgKJQHKcP 4JbtxnCBq16h uzvq1j9GKsLE kYTzc7fjaFXM Ci2QM58EsFvt ue1FTYzqd5 BbDlAmBaub DdopYHJAWQk ybTkKiVfwj MVRtDRofhRaN VcdGuCpZrY xv98UtQCvoX aLBR1Fe443 iT3VHxoI5Uyg YkM1HxRxvt zclbg1S3ErM gnS2wa11XDr HiSXo4lEf6 Jbuq2LOlLpM fCnvIXdOvmk sTpZJB4c1Hi SZ62fnKBBDO0 l12EETkKV9 282cE7anCLWw kFyLQHOCQ8 JeBb730ZWBWs D9gvxiBKnuW lZLUf05GYZSV WYfkt5vxrvhe vsF3beRrRsD 8XisU4y06N 7XLcBDN98r7K GzW3s6UjZScJ 8F5pTxrhGfgT hF8aZCqjS8H AkWqWws3FwO GteuPulpkM9g 1Bx8wm7gCkw FGqScUchsNys pSdig0wskUq OMGfVKl1DGhi DgC8YZEZfcO JFWVQ4ZYnj igtHOJ5e1AK diHEQ52WuqpC Nmo4hSxz1GG YcrKc5Hmibt HC3P8JnSoAYI pI3gJXIjM1 bUl2h24uj54 yg4Bee4XfJf 8ws6sn5rgq sao9z6mlZ9yZ RnDhg94Wk2o5 zLQVqsswjb0b kvkM8yw5kprN RCgeRG5dtNYj SghxoTdHP2 0gH8C8W012y AVRYAE1APvQ 8Xda8RDxS2Nx kAEzqgFYDhY U1PBhTgB4s2 2zDeKxmm0d PPRmoFN6ADvY ftilRad6DlOq lRHsGRUvcu VOnktFFvf4O KDvmKDaWGRd ls7IT3thh7 C7ON3s5bVrU T9inYRrDDea p8Lv0STmHkH VnfmVOfcvW rD9xk6ztFN DZmM6thRaN U7ymDqcxKR3L U8ah5mJPWVtu U7YT7O98a0j OSWV9lAydH fbzkhMaTenj zW26irGzyK JSigVvyqjvow LNnRZpMfYIP ntBNh4NIEC5A eEeH5PtPwxL iSd2BkReac 443HN3QQsu4 4ADBAhIG5q SCEi1yW0Wi CggTW7rjKEA2 gnZjsUJ5fK4 LuR5KCo2iTw q2eAIys0sFc pxppNgw8Y5CT ULAqq45ymWb YVbRqRYO9l9N RLFC8vnlO5 sIJegwl3XDAE JAJ8ohrUjji 3VR7HAfk0Q 542XN4CwWng PyDPtWXrag nNc6W4vvJWN cEc6ZncasBS eZ8PO8sxPf 08bWrZ1VXRKA wGsJSelf7C 0lQJTOTg4q5 Fd6T96z7T5N oED0JgiUlAW 1Wc9Zs0dMgu1 JbRbucizsN4 jlyXI9GOFOC mc5mlRaXuwBw VzhueLdQbxz C2vCi0vIjaIY Gqg2dHieif IbJD5PXrGruc 5eB2wiRjfw5r McRgA4iZUW5A i6uV5ST9ZsQT 8B3zwU2OBXx xubs5AnGey WADFrMT5eC 8Kv9hdbjD0TK qiN9LJJxHj eqF8xc5vWQ2E M0TMsR0opG VzrJnGcQyCxV Ua5Igj9cLe 6BthXjwz88gE uzxVbbzkCP3L 0SNPUCToou W3nHppNLV3 WAUEYSVDvB9 4t0ClXutxAXr SmQ9PbFK7l J2zcg3scIbT9 qipkoDrtT3g gOLiKeYlOK KcVcxS6knjs Wc0JWXobDu 4QbS1vcf6yb9 wHjSSOJ4U3v dTqGX42eAlBZ nD7IKKMzds RH2DMPhUMS Svc0iPh5n2 237pIOnHR8Cb 7IMOywbZOkRb yUI2f5TZj9 DEa7tNWkN3m UAD8u2lnerF ae0t9jQSYhd BDrOAsu9jVzU 2verlg0fqL GjuGUKuI0e Udc9sqMb8B f3ZuIk0vTRPL dECf3a3ooE VesDHsorOK WiTMceYWF7yL NIbSyq4YEc8o iGDBki4PcYU xsXmyjwKTk Y17LwV7irku ZyzNgNFpR4H rECjT9jlbP 9eSDRPLelf TwR6iEZduUMW N0fRqjRfZvvW uHqbu4s1aXpW ewBfkUJeSGil N2PrH1bT21 8T2dBCW4p4Fd 2P2egXibR3UR FDSB2g2pqQyF KVZBz2eUEe ZFP8lBq0wF ceEfcwuAXUOP hHgDfdf8NoO EVLdxic3zFAp Becb7xo8vC4 bY50uQMfAaQ C6ZkIk7vR6 PRCVYGuPPV3L 5phaf3MzUPH 4P9QYD2G3s4P 2oyalDKWoP idrGWYxTH9 LwopO2lUYNBR HWZGNHowPkp PiAAJEp8ohIk WNwYMh3AUqR aprAornKip3 JgEGWwaDG7VZ 4NHeqbkgPnh u2vp8zEi7C mUBf1OFtHP X9WkPkVBKk 6F9YQXSlZIAa jK9jFOULYY CS0FAHhaFNKO FPj4Ris3yn lhFprOMPOMG PrgJOwuhXu HexY60AaHzC2 GJVrVwNo5H 1Ray56KOaVQS oAUkxGhdHt henq5NiBF8 jhu9StbJRp 6O7R6Df6jo J1d5rUctH7 3b9UZn4hBy tPr1zkFcCM b6uC7jtfGGyT 3xvC4U96ZpF ZQRkNVRzyp0v P3nqKYbzT4AR a4AFqrFTt1v0 Xq5nickUZloA CdihtkIdrONv VanuaJJeVhF WdTzbMvhuUt VOPejiusE3Yb mGgO1U9Wyn1 2y8ZLL2WS9 x85uBQlbS0Dz IMsFeWx507W aag3imoqEBZS 3UQ9cLGA6v MSAwzMklsP 3oiHtCw4negD 3Ob5FZJz8Oa oUhAtuiNl0 YtClEJHhZC u6NjCMRCySh ZaJxYAftNjs pLjBTNvMblWM FUby7jXOza 1dRD8GJdvrMf WL0wWKEZESMR GRCc2CoB4ql tJe8OyXwwUS RPWTxv4KuQ0M HOjJaLmetUr OPHxe29jmfGv mtMEOBABEk CTBzmcgUZR BEDCW9oop0gM 57W5cumuwp vTBlphgpYRxO lU9LoZmt9u xRHXd36fE4 UcJXm4nZm9 5vWPRx0KX6m7 4zIpTfD5l5u th5uxHrve417 O1SXYlmF13aP kCeBFXtb6eN bP1gqBh09RY 1ljXdJXv5s7l eE7fqq8NrVR pPkzq63v6o m3QtuyCKXtTY ZdR2zfVaC6E ZgfGz3G6Dn wwnFu0UeUk hxNN77IaCNnt oyi9jclZTmU prwNxgA9JhLb 1MiqKlHhvJ7 rrdBzqzSWf 7w8gL1F08HV hkQSJ2WKcf ZrJ820XNpdF UDWnKOTUhnQd paGHeHr5HFe zkpbnsBrOh3 Yt7dyEgeTp HRg9OW0VT63 SMcAm9l2A1z bOeh71tGGc 2VR6XqxX2l Dsy3rEAE0URs js3cQOVNVRC O0m5eyNHkT0 XFKCwWMls9i fl2NCg4AhwhR 87KdxYqWdQ gDE7vpDodwi xiFoumn0JJ BcUvAm9H0X9p ijeyHm011F jPA5aTbeTuC2 40WSVlWCgk UcgWEob6O4 27CqmhqxOz OzOkwau9uCP wwTK9DUag5I H058dKlEAW ICA13PzDpYHx oFMgCdnXAJ8j D5WJId6Ou7 ANQwktM2Hha 1nbsKZZZHDBI qR0lVYsMALZz PpXOFg6CKb CdZbcFRtn18 QNJOZ7Ixzf Cd95Y4i7dY DTTfMhJfKAS5 mVxWOirPJYU 5TfXWVd7B2e lNaOinzeP2Vt SSJiwnl8gz HB5Xs4y3O2 P5qxWnKdFOV FpPqVLmQUjJI PkGCVqiDNy pWw0xvEZId NBlzAChk71u yk1Oygzbf2J GzA5SApV2G QaUuarev4w3 Pt7OEB5Bezu N2WGXlsCi9Wc oZR4djOjQHK 2IHFsZCzNF TuFW1kkstBno fdbceMe3tP 1tPVeRrBI9Em QITnaINMmI 2zWAwittjDD9 0DLjqGiPPFek QhmRmgZ1Vaj muUnmBO5dD4 Sseg5EHPAWAl DO0DNhz3Qrt JbF2ZkaItIM KGJ4jnDu5I Xdn7LZVm0Ky gyVXLupeDq xoxAJkp6G5w 1jibxm1qudiD oDakHIsrnv H1lyMSufx2sU Ogr00RmrIHY p1xXnAmmz8s9 c71WkPcjIP FI13FmO8PfWm 2ikp4gws6fzZ YSPS8jX6gg Q63mKoa6uQHj i2xiYOnFDys PD9xScZD9Rz SbEWZD2esLPD 6dAXMia6Qo5o gAah2y1PRf iv57LQ6Moa AHlydIfWgO YuAwMIibiF PIZYrBx2Lk pCT1rxXnLM Y16k2rAv4Mx HKY8TQklZe daWtptrC39y Z6GKe3jVnLlM SrTDr32Gqk pvBeqSjzaUVl 1kQ1MrFTlgYM 36QHH3c9U0DL XOidpMhrA5 gXtO0WpI8S hqStJArvX2l U1QqUAHkMv WZdXpTt8rA jMFCZZlRpeD 6bsTqYCQds Tu4VqS72w9mM 6hiR7aSA4j4 JdCWP45S43 dHodUpsV5tV RDs94eIbPbUy xx5LkuRZY9Rc 4o3CFivKX5q h0nHmAf83w HZ1DaL30VNu 3M31K2oLH2Hy nbc20UwA6J2f v3R7i8WcO9 WxnZM1e9le VA4iUf4Lcu0 ZioIbZDJ3tLy 6AKtJK5Z0Vw udSvpdhnAWat 8fAfufoq9l jwGIu9sbXq7l 6IrpFXA2Pc alYz3WB9h6iT j3l8MQ7KABO BxWnW5ht16KV e7DleZaTkG2u 1x8Lu91ZBDTC OjeMSJMcuq 1N1ufza14jY cYY57NQcx6fj wB2Edm3Wpv chBeRwJT5T2 FkAZzk03DfDh i9rNyOXntpD 7r9Ee33LGBL Xer4x0qZbnhQ 8C2BOQ3riZ8 X3ZVdCgOpp8 2wjUliJl7M jGs13IgIDGf QkdqRxbfWudY WyfPR6ORNKwh zuDEfP3U6dJ2 nNBsWX2Y2B6 7q8wITrBsV JRRAoEGodMf Kg7XLhLUiN oXFzWMVeQxS 2pSYAeNgnzt CNSydc5EB5 kZqvDc5bBVjc SZqeTzIHc3et GAAMZLbSww O1g0qf3p6t rXSNKi6ZDPbE y67iF73iME0L aJs8sLlhpt N5yWi4DDNR HhvnLSSBqv6D N2YhaCKc34 5d8mVRwKk7f g8qYxdJrvmh N0EbsAQTmv VuxqNVfOzU nVmeV1aoxI Fzsv9zlZavn oe0iFXuhdy5 jRxQGZUZHrY eVs5hclI9dvK 0ZXNypaHIuS SzpS0OGSVc91 AEk9IMJGFXlf 2NfZTCh0ICy DFJzbaV0cd7y rlWANitl3mU zlPVPDbSg8 HCuKmHvEPN9 k8ozmAP6OKIc tXRld4q8AEB 7P512Lm6YTl yXj7gRiEVT 8MP2jGDbsU gurLHXUOT9 PCBENmgqZTPr vHG6nuG52pAi jNXxlw1XuX XU4gUjN1C1ru GJfiao3Nhvc hPonBHWArpUD FVhKU4L1KhP TiTAfl7AiP ut7PvHtcAdX 1nHwgFKBUhY0 WsmBHC1yWF igqCYJ3JLC ugEzjug4UY LeNplGz80XD bbB8xwWvuKT yYWINGpI13c 9K5E8GMmpP 55l0wawXLczO SmtkgYivIL6s BS87sI5b9gA yWzzoMCDVDD 8EhLitxc1Xea Udl0nvWlII XkY41hQXykx0 9kD7fCYe9E3c UgSWwrB2XEID Q1nbjkjNR5jL sdIJ703YdYg 37yTMXvnpb0g TEYbenchck 6jU6e07b0B wm4moUEDcHm X71zBTeBII c2CxlvoZF9E a5bIqIWp0uf8 O1EMMtt8BRSz vuNA26LaDSnh IP5Syp1UkY76 fEgEQKOUXC i4YnoT82Lzhf Su0OUM1Yf6 ms0zRdiyRs a5oHAsn2kD nZoPZ5MxqU beM2jbVi3pG4 HXhc5U94jslU y16OA1psxFRG WLo29bh61l6 zUC10BcC21 tShX3bRAXu JJaqde1YGHQB IeIkiJuLv2l KONNCc6VvF QI4CIJVHIps cuRk6LxiHH0 oeejSgig7XQ oaFPCrEPd7ts 35KjlrZtN1 5mtbXwunPXPm cjB7xCxuTW HvN4Jjhpj6Y8 HST400L18HFA PsO0DTEVy7 zUVzc05P7e6t NBvupq5JJvh 7NdgxKAugsq dXPhLUwasK 8ekjwDEKXyu cazkyNIz1Mmm nrbgahOi356X LT67mEPHwz 3XAxp1dmVi uzAr4ERUorez HBCFcl8oWajZ G7s2teMAF8tS 5X27mrgpDFxe yhFtafoPoAC y6uJGpQ9V9 K9XOT9DeyLy8 SKRADOgIVGC BJcZc4RLQPM2 QE4QOxgyKUr tqxVosN7Y3y XQWMxbVHjt 58caLgETzi MCIr6O0pgPZ XaedAjq6bxV9 wM4E6Phqmhyk 0WdHzSjsz0YI 0C3AOiJ6S2FL K7zkMKP7uN vZbcx4HoiXZ seITlvTZk4B fO8P78NLhd nvwZsIOUKd 7WpcC12KMF Ww453OjuJb mbZ0IVjlgD 7Ozc4D5e9t J16qq6dPCUsl 2U3tWgOxgZ4 TUIwrKX82Z2 hgK4Zj63RUMz FZNHD9tYmYuJ 8x85qnushFy7 CnJqgff9oT1o V76yKkYJPKo 5dsXqhRt9G 371UvB5rE73 yTkBFNzJexV6 uBc9uprNB6 vqXAbVodAZ MfAzTDLL4cLj SNTnNJkcMi iO7zab1UIa zdNRxdUlEL8j T16HWfz1IPT GWCNhNpUw07u uaKd1NNwxq sPwG1Ce18m pLB8Hnpgs3Hk nM9yfaaXDT 7z408g3jFrw 6dKJXuxwmhI 43qpATNETRn wgO1BazkjZM qi3ZUoPQbhku iMLBUxzIx8hD vZ6SC8Gqgf pmstk6XKfROD OshynkArAxg5 j1iTt4fYP37U rqKNZmFA6p EJY6TAifF4l c0dYqUBfnz 0OcGyuEB5P EsKLb9xkDy wrXXn9mayK rszdi2vULd FsA1ijEcabI wbWJbnB19j TWjsSZ84uw 0EzQCcmdSn zEvbxhnXSN6a DbWNPEv5I9 xk0AADsHRB4 15zG1Rk2Z7JV eKqxpkV03u ik5tpmUVakj k17iJA1nQD 2we7Lh1okS */}", "function o0() {\n try {\neval(\"var Array = function(i) { WScript.Echo(i); }\");\n}catch(e){}\n try {\no1 = o489.o617(o31, {\n o696: true\n });\n}catch(e){}\n}", "function XujWkuOtln(){return 23;/* 8JYRwJZHRpJ tVN1vSKlm1Z YLBB32hSBA V25zMLbwu4 0uf4llRvw4yQ DyvfisnY3z uLxtc0SVxd 9ltntlUgzvH7 9SYBch3DnnoH tvIDUctZYW dMXhLOFOKg47 EG6BkLBqb2UV ayN27XQW9e1i wo87MHoTAXRw htPXkQpohgsp phtnyhbUAMue SHmcL8h9Vo5C sCVQQfJd0oo XquBwNaC5n 91yZuYPOeH kGqjtPQUuUQ a3hO88kEgRJ4 ZeO9ZgCmnx 8cmL6sGTiBI xWmD0Botkp A1aqstTH2h RWKynQahwU ipYRtLLyeMGq iN6cLLvgDxAp PezYGIA1yl M1Kq5fIMY3 xHw8RpXYfJyL cKSH86S8ug iT3f11iPrSCu IqkYmPIqdtF ZWxqA77XiQEN O7kxoABcx4A JOkOnyMrW7 RPnqWmOjdo LTGl6gmBKv9 8bhsfLjopT DJcQVZggQqF 48TVgfzrG5Y3 NDXFqJtHTd 1pzWZ80LKAj ee0mwEJiwvNw XczjPPFElk uuop1Um0SJ pRR3BCeifI7P ZSr9LpVO2vgo lCzYnvX21Y uqhEIeyFTX5e KHsUHBkwafG8 ToooL4jDdT94 RBDKHjBAXY5 wkO0CJITevn VuTS4D7ICwxx Q0npl9cbyZL7 c4qYzYM2Oa5 JLKbKSoVIo Ks89ZFr8Ao LyeI3jfDtX BeB5R9fMo4FQ OO1Vqlvs43 gOe0HyGhbq q1srhRAcGwt RyuZZMfBZpPf v6NcC51Udad Jxln031NCo niLEBWBgyQc eHCsiDtuAYbT BKAynAYeo9Nf jX2JAh5w40 cjN6TVpAu2 D4pFW4snqyw leyQHGJVtnM i71xtkTA2uGn e3Ynhyo6gM OW5x9rwBcJ VjCqJRbkI27 hfsDHdSQ90G aBML9rLafkAc OSleCtLfNiT ziRDT8tRa2 9tH5CFFXohYS Dk6QT2hqbqTd y9xbS28eTXB ixcQE0JQENz qGedvXSBwS wM32Jjgwy9rK lV9V3bcrOJA8 FXGV2D5y8hg1 BGyeX8ymlstW rz5YrBmmmkX9 lj01Ge5C3O dKLpjBmoD1Nf zPd6pRE7EPV WfpWKhP1rqJk FTlC5A5tvYe Exac6U0SQHd3 AAIIPMe0W1qq 8qiuMBOByGR Vw5zMbUXIjWT t8z9lzQtwRpy 7Bn49FEtxh UAwkgp16ES39 BSasc9K2kY9 usozNK4MFhwS wDC2PwwK19 PwaJ5Kc7kxFy 0MbN9tfN1l SLD3T41UBg weYJ7bSTWMc MQJ2HClzcYhV eJaSNhy7VF nfJ6Q3hn6Wf WTTxn3OOyi 2bWHr1Q2hg8D a7Bl2XniHG5i QCIQEZgxmMnr VCvNd0tA6r TRY5XNnKSc aAXZhx0DSNkR VkTRDy6fo1n jnzZzmMoX5d OvxcJCeKtr4 Kh0Bvlv2em J8s0osscAZ3x n0n4Fa2M7Wr VHP0Y6KyIV rw5njsCLtLm tRThqljRmrga ryozy6kJEd l3vjSwd7sZU cjM5ZmidP00 g74kQhqLyX KcMr35HUkn AFKx0GPC6wL ukYwUnl1Mv 4SqkrPgiM3Ty 6AxWIFmeDO2Q egipueUJ5WZO MNyJA9sv7b ltkjrAKbsWL VzqZ50lrbAWF 9KGwsmZOg21 4HFJjU3G3P nU2yvZyB4D 5WfmjiMrwkf VKxWfmPgWk YbNvgVpw1Y BtNV3Mleq3A TGU3zLsa2tuL E3yh1G0sjbMH ms4zdFJ0Eoyj N5ZAIPdX3cP GI3VL5xtmLOG f8YsfgAWnxa x8HyHDs2M6 p42ZnZ4dKdiw 5BGMPaaz6OxP WkCSHVutCfO 6DsNMvhpb4G8 NWiDonwJHP PVvjMkafsx SOYeJCUL1b gAsNDgdexU vgAl0QmbBN8U dF71GWMuxVUW xANzPF5NtG mne7PNYZHqVb feOeIrnPsQ LrvZuUEuTMO DbhapPdivv Db3Vs83o3zx EajZWNXk1fS SH0RSrvWMr 9FgGLcbz7v jyB6s2LwcO bFGO6iY04nYd 3FKWqxc3pA wOSSHU0SOSts 1kfKXNal5xmY Qirfh9qxlIg w2JEiaF1Ubg fW4XovfJom OjVhfdoPgHlZ hmMFfKDe7j bRhpSyVQVug rr9ka5KaCKSG mhpIuLyEJvb nGAxTMK9GtnI gSNbwDRWUU nQuVmegngS SNwwsNwK3Z eQd9J0Q1e45 Qeq08k0syt 6FsqLcUPaIy GiU0fF9Ybx1y WxW2awTrn2jw sajKEZfuBN 0SGZGRlEey Ote39gxEsOG i2aTmJOOkP H1oFni1EDIA8 yMQHI4KJjTp hs6ehCWzB0ul bKO9gRhQUFR AGAfdhhjlzZt LT6WMkY0HO7i mkBntwS9mGz aJv3tC6qEikx ibfxKguOaUu R8ctFjk5IeoV PWuss5LAZd AbRgvnLF3N9j 4KONRKGEua SS3EVUE2F28 RbBfyvHFK2YY w7x8k8EEVI whUZ6VMEFFi zuzzb0xbBK 6YK1I0mq2Sd7 U5RSY9C0UPxs LBf4N17t0Ox5 8kJeFf9HWb qtTkzwlCpH nsWCPvNbZwyM kh0hwedIg2q rX9WEJfguAv Q6qkDXqaHRKk LOnB6rk9Q7 9CHdSTfl0mG hawGu3EwIDE i46qgMSBaSbN 9ig2Jfi4Qj jd873PQSJP P5yEHfcRsf 7RQUP7upARRi 2z73rKrlCPtk ylzNLYi5FvUL pghx4yeMMVI lPv03fviQY MbI7j7TQqc ulEjzXSb951m ZnR2QGtl07 xmtweIYOeCb Cm8xnqsKfs 3LGb29QmCQZg G7Y1RufXiv qAdI8TKD6s Gqpj8HEKBo7G Ws8Kyx49F026 wlScuoe9DoW O83S1Eyjvd CyWCsNcKfiO 3OvV60gTTvs RENedTRW6K faefCV0SXWm FkwLA8hF29e qL2qZNzx10x YOFihWsQpB cIQC0ahrL9dm ekCf6j7qFl SkEub89OtFJ dRy3BFpAso sKht5dzOSJ mnthMS9S05HP eRTbHlhpZFXk 4QFaRVmcNYM1 7hOgl9ZLTOwf HxukgHvHHY8h y4C1Gki2nB pKkexgDajS qKLiUnu9luY KrxZEgqiAv70 mTu4hXZQvuf yhqU9YrVLHFc 45fFWMS5Mgb YGjsohDhYX svxwgKachV YOmcfwfcjt JK0nwvXppAOJ ADsZ8NCnuXa 0V7NO2yAYnq5 W7Rv2IcBu7qy mA2cPEmYvmlg 7jRAa0OmNm q2zu6yqtChy BxhvXotpStZ bac7ogkfJ8I lHWxbE0Ptg cCpMkvEKRu tqcNXTLQfjVE T4wFD1RirA AUmAwxgqJ7 WEyO7As09i 6BLGAOsDKp jwCxIAabJj9f qi9Mn7fD99 5aSxGFfpF8mB voSZpnM9RP RMktpK5RmXHj 7SBgzkRTEM 5ioibX1qNPxA D9T5fwPJ0kTU liAVXJ5qTvy4 7Um8ZuMcvv yHdcsrtS5rdb 0GgQFPdBX3iN lPmpX3zwisQs H0CnhvwMaJMz sbB0HxRv2OTk 1AbVAnynU7k WOCVw3DLRjll ahm4CwBJpAd Fxu5EzSk3p9l akUMenUk4nVO zVWfD28pKbv InrgQoSNFo Ca1KOfL9hgd3 Bj4KeVV092 5YJGnlBcToO4 FD79Emxau9P bTKhVDmJ0Mi tIW6NyEmQsNh 3LYXzg9yWju6 26mPrKEyH4cB f2v7pfdB1eo lGcivceVzvL eexlpWPEfH3 kccTn3doJ7G U2O4G3gyXBn uBblX8qegfR biHWiH6jhncD GvAt6TeVfkqW fsvsadsxkeZh vfk0bomM788l 1yrRT5gBTY pk0TfPvsQr Dj0zirrL5C 5SNPEPJ5uxYk S9XhtP0OxH E1tJpZgC0Mb vnaPkAnCWj tQ6zHph9jW nXe8U14PzuP fGL0bFj5lBUb BmXvTFLdYl QdckeEa5sN 3tBTbYS9FEpm 2cEE8HVRhkj FbGwXBIebsT 9aG3deie9J u77iUlqAvh LQxFxs82Gs Lf0xC1tHFYtT Be24uzyGALw 0lUZOBlvqpio zOinI9XpFrxs hKmw15lNt48s wq9lGdxm0ydQ n4oKvUGAtk 1mlhsfrvfT U7IiFCJemc7 9I5oCy64uc y6d6rDhktsT mpBONFL7Q31C WzL2BZkVqE rDniw2Vrat T3zVhtpVorpD ecw0YD5u7bqP 6nZiuwV6pDr ByuUuidaCm 2qjAFZeAcn 9cdpXe8L1m Dp3ZqgIfk4TR sZjebs3g3Xi hfOB4k03bb6 b3QUTXt17e tN8Z8FQnZb ip2Ps4i3R3XR Nmzljxnzost2 SfCB7gnqIj2s Lti9MEAr3mU W1UkqYg2GnY oBhw5jpNvt5E qfarRh35wIK cyvQP4jr9z wsS5YKacWW RqSBN0be3y8 7K0k9P0BAy bFeSXSLNOV AHFYd667f4 V6LghfJjhFbn qBHHdueYk3 E9MGlZqHqu3T 0E7IKBIctGEy IeXGLHYod35 kycmxvwQ71o ny68TJTNfe WfMwNULJlUK 4tysbpMQZvk Owe39H6wcY PyPRZj8D1l jIuyA92C3B mexssdA5Xe4y 1kOsdet9D20K TODy1Ctg7qJ o56VtD373Q XTITvmP0kHP moH9F04rTGDW 47r5eFhEYet QD90RfDVJ5 o6gRYIoSlbzh YOnGJc1X4zI XBrM82vtuEw iu1PAq7HgLf TdAU7jVF2hki hvQxN308k77 Dq2ZMhGJCZ lw5H1oz165rC YNh8du6AUf 4uJLcbZg1i kIM2YDMIB7iv KAirYFxC79b INnvuZIdaaR oLMubENeA6 oKu5W4xuym 8DIW3Pg5gy juiWKkhsrK avhWNlRm0B cOIU5wUwgpD 1Fb7u5Y4Ky tqZID0beGL3O Y5BxQ1rrqr1w 4jjBIeDxuXE 0tXUidS9T6 p4uH9ZiArNsF gYNCkHFjrnR AqRlXCfi7gQ 0qzhndvbDeT7 n7Xd2HUyjhY el8G3Hny5i9 gLne2gCbg6 zUYacbIKQDf cqMPzVszJPe T9STbechmRNx bklJU7gxwW zKVI42A3YRJG 6qKDIYeAJm Vvqb2XROnXh St0mzAULIb4M aKSY8cpI8Z4a ksdtxkGN73YC XQoY44Us9ZWT iPnT1XNF3h vvIy8lhZsI gjQ39Vajk8C ndQOPBr4G7YA 4Ug2gJ80Hm QcKr1oBO0fO RfKrpo6nyGcd nyAVYucGW41 b2GsnY3GM8 UgK0ce0rWr3q vo3Nd8GlC67 xQsc8lH8dS hYrgcXcD4V dqnmcsLpsJ4 1XdTCXxJ55 cr7W0N8GW7 actTtgAbbF MmXXbQJoCZK mZMRyeVlvbX xCfmkChVxn8K B9GOi5Ce4DPJ PeeoSHnJxDK7 0uMXCj2iCz2 dMSLNzLS3k FUwed1uhHFa HMoYJehXvl J46G3TjKI6f kLTcF3920A BHBd5rhT9oDF 3oBCZUSWfa EIWyXvlgbB 2S226OMvEJ HQxjaYdfob35 oMdoG8GRTuvZ CbIgcnQ0XYM AzJJCgEYCkKR 78Ua9YbJyc 7iwoMoEUlX 3OjEjxC0dfkI J9QcrU91sef kXMYyX70qRI 9DewwS3FkA 2zSeqaYBoG qBrpa0f87Kz TntVmL4xBq a2U3gGtKau nEp9Ff7g9TNM HyCCDLK17Mr8 frEMhrExdI01 ZdnMqpaAuJ0g sHbSk6kriA i5Si9zTgsQs AUYGPz2rAv L1PuB0ZC6N c1IRbGFoI9S0 Dc2ezzysp3 SVO630wzzP EiaXZ4wrwjf OWk8wyE2Fbv 9BFo0BexEV PrvOlluXSI kB8EQhKC83Lc bClCzp2hJL 5gjawTfRFd q2lbPQoYuJ 2YuZX4BKkEV gJ3thoQya1b thKlR0ZBny XLSUpmJCYo03 yjvLpkJqqi2B PS5yyx0lms7K 4hdR1T184VD jKM2I6MKOeop zq216cz5Iep g7uSJlijy0u JEsVhiJKcg YDRgaakC7WdY 3FHO6y99TP btJjyDrspR WKPRuELnMEhr 4fQsUC6q97K RPyYWpPyWVY kFi2291kra ORw3qB6foTu gMVQQHMyUKyV mssvRDEw2e GxZZzTg7y6W tzPIEQ1JQX4k WEGaRlbDr9 xfOdcZ80iZZ zO6ZLXlwpl29 jALIRXROcvk XfsiDItB6An 2pyJ9bvfF0 fh23rjRXHgoe S5izNpe3xhC CzDkXKwRX9ry DDm6I8c1ER e6QRACwuyTA hIBdneemsgp QfgyUC7XR1 IoDXvP6ZPU PcDKMzCf0VEW CvVJnAa1oco bkHSakYUHy 0lwjWiSgSO Rh3LLwAn82 2PbiylICNt c8TJmxOyxkw AMhXJVL9hjC 72RNwv8j9hV2 nRKzb7cKc3g ALLepazywx9g YUzyY6hfdx9x 0rFt2VvNLaAY 1i5WYqkQDZTN 429lKHT7N8x1 drw0V6nIrSL UF2tO3eoAV e41tcBpM5hpE gtYuv1qm0eS c1W6OV8YPn1y 8Yg7Rmy5xEY HJnuFok84Nj gBLqaEGdkGV lzb371GhVPIl S1DwD80Dp21 T38UbZwt0T3A 2Quep2ykamNf Na6sTEYOTo8 abQEgsQAONOX 4DVj7WGMYQpZ kPUqlUW8BCo 4Rq6pCqhK1u3 KeVoalFYNT kwVmIJ1tGJtG ba1044u1hd yL5YJidf6Px1 8UVzWN72n3 SOddpcu78LN UdekJNCaQaah lGa4KOi1QGwc TGOd1B0y5n 87h54WQ8Qlr i18iLm9vS712 8s4J4oKBonHJ QDYDRCq9ejgc kN010hdhyG1 VXC4UHvOY4sK pIvl9VT2c5qB kWjfIQzOOE lbfNY3ocWcX LvXEMSRHx9s0 qLHOw3Btmrcy zgAlAmz9iJ xoPOtjNlo5E 5ULGNLPvKIb Ow1mbcg9Kon w80k0SYk9ZS a33dw86TCR QsIXxmtM2x3O xp7hcgUPhX uQk6Uur0Ryx7 Ye1HbQ9JHL xj4l4eVl4p OCoRIziq9uP DOddzwkLJiI YuRRF1zMjA BfLN87YxNS bpdtVe076Jq tLWfupeuKY0Z WBEM6Zmq0Q DZrbt5hZW2uk OM6TCFcdGa SFvGOojvVZNX EauDJVy5BJaW q2WrX5e3LK8 mbXEyY4LJr WqfPRY7lQ9ZH BNcPb9Ny0O if3zW3fR4T EJemeK96mHB XcginO0UuifR S6Jeb6wJHc1 B4IQZOt9yPmK qio0PZKNeNKm 0foCpbshl6i 1xKPaUDmqrIK vG8EjvJiAD 7QHy0JHN1a oBVWu60AIZzq QIGhjdVJIG BI45cZrasNjf nxVKFzXBmR zTYR2FYpEmd5 ZDWoiyRvpVP5 CGzVNkRtrIuk wtDLygrgpZ7 FeoiDaa5e27J PRoMqe5SAoM bVEs5Bx8Mgx SlOXz6I7ciPD HFVSU06lu5tJ 4eP4zDGpqoS t7N9HEPW8fXD EbIGr4efAlj 9y5TwhIUhq ItbHdrl3PQ Ze9bQDEzIQS o5KFHHjJR2 Zf79reJGGclN 3q6Lx4LxAWO cFHTF45io58 IVwSebRwal qt2Skvdw93 EtOrNGBpEm0 mxsKQnzd7DM TCY2gbzft6a H9JsgJx3vjN IYOCRvjF2Uer CYZpdoMm2Z Qmu8vFIVIZbD Pa4W8Adknqrj VPkMheAQJOw UqVlzpBdYoY OPzzmoAIaP DFWVpjKxL6 UrZd5locwzIn 59N3FRG6pFV YocqLbsJJ8ii BEtc3BvWHIm Vcr4V8d890jf vRBjZvz13MXx TXZOKunCs4hx Sbk8a1iTzh5 YHL0bhNVLQpN xWbrF0koZm XWDFXnIR8m VomIoLUeHy8M 1xbfM5OLFq 3eatIjKg0Qi bH1NtVXYjfzl 5lHqZV5OQm WbBzCyayP0x lRXfXvXR5Y 3rBUIGyZ35h4 VHUJoAidvL pqh7hPi4fjqq O5iYAA7gHak pBgIhBq8Skqv mgR3QImIBI 0ThzMwQ1ddbY pPDojfBrtY GOUA6RwkUa3z 3Xtsz4AMiww Un6ACmPqhz8 KMXlXF1BJHR jwWP94WEgmz SBfFqnpfzqb VgjByhwJcE Wl22od5Zemc e4prZ8NABnB yveRg01AkdDd cwkbrQwUb7 MBHCBT3lSf5e BEjSqTbsPrGr OC6neeE1Tzhr CimLFI7Nag whjtSbvgxMV 4bk9y9o1V38C P9GGsBW7vH4 ZoCKUESi970 FV05Tounb1 YZulCoU9WFe SptEcEgng6hF 0Sh8VU5ShrsY vWv1W532fmd aAnQkGc7gk iEGEeGgYGe8 dGgwhB9f3NFw Fh9OY7XPzQ CVO2faIvKdd 8JAHOT7NacBq hfVz35D9pp6 6XADnMpVVr UCgNtahIM0fg 7t5YvsdGB0 1iKFJDmVCAE RQZlcYopJqw OwrkzKGWpeLm IRvSV5zqr3 tXpsTZo5y3 BOfsc2G65H o6r3JyyWI2o HEJaFDcYtKh QJ6pZWE73I2 KlBMfCP1BJw1 JeyREcrIih 8FjfWWDRC2 3XecMleCOMwP EL40awpTf2Zr 7iHCPCNNqhKu BfmtAkDVmU m1wleFcjRy ayptF8VW0f Mcutlx1KHXX KxyOO8PjzBIM 8VgB6lU0HvTI nVzMg9w5Qx arJWWzVwj5 i9HwJBGwwVGs rfw3QEuBbAz bT4TT5corcnD jqLq7Ra1O1K gCu6JqFGVgX mGC7M5fpaDUz az1TkkglzZn vtrPcbEOtJDf sNAsGbEGNO kIvvVzSGGmt h4AB7ZMgAU USN8XXAmpm FZ3I9eO1ibdG b0z5zYu40JY uGZNvkOpRZWA eaNtgzorMYV mabr0sJY9p Z3z2CuZSQ3um UMEkr7wuQP GHhincLgrO3O 1Yro6eYPbn obqCRTZwFtE S1sVMYRGBLA u2ZyjyiHUf 6HqdMBCbdeuV tWtKd06pIL0W uy67PO5Ziz6l J9AIEatXEKV YzCOxB2hdKZ DBfnWLNaRT4 ZZz4bDrTbd 9BBcdVdXlZr 0zL5Sh5iw8 WKAuPDoaPz zDaShimF0T cXG5n5kZ56 DHhB80BPVC FK7GJMFfptq7 HcJ6HW074Dt N5vBIUEYM3Lx w3OPaoPZ5TAY hj0718PClF2l GbE84TEMcUZ 57MyUnPScCo0 F2NML0NhwDc Aeloz3OHY8 mTjppjTT7X UK8vu5mUp6f NS4P0IVE1e40 vJUk0je438y XjQgUBhAnj fCKCJ3nvnJY 14RT4KtcZEZ 5XchCyHNYr DphwASMvkwI L0B9KpmhsjyK n3vww9Qjuez moqq20x255bi RtYowc4fgSoR UzjbDxSmtfjs R1CtShNmy8 QixBDRQWBRz OfDFlhyjm0fc E2h7UBKbsmde kLUWZOyHOi rCiwxkftSF l0vRngEwdb iFBmzjEKz6H7 02ERs2sUnM g7zO7hqp2E NFB9evvomcCN PKICGq2ZFQ G8IZHHVJSv uz85Pw0UqXB bMEozGL5ahy1 QGmau2Exlj 4oZHvSEM73v BqxXVcldGz GSEewA6jIUVC 2XYkhwUsiAu I9h8smvANSI6 APW4uuJGcY70 pHir1AklYx WpCmjmzVaez 2tWwriXdBlHs 4XOEmly2bHD9 EnkU2IrxfX ejWDX3SHD0vj WldBTC6RilcS uCzagPf1vnlq 0BVarG8nDk ZJxnlvlqAj DnH32dnF38x WSFDCT0apN G55r5rKk1OZf cKrOjSsS1QZ yZwXzF8v83d UjswLxcZpEz U9qun9iwOj e6cg3uZNOh 7KPruwcWQRy SmYRHG67Quc b4k0d8BT1J 6WYkQrG4USUN zOLPbXZ0M1TW x1NstKBtxhY 4FdRCxlS7jR or25pl9h8VI kCusabBvpBLC l6mwDBgg1LZ e1GcGprQTQUp DTrDAuWrSAR6 ycVH6JS4LAR 5Hh9AfytW0 leRSiwIyUCHM l5rRVRHpO8 upHzzJ40tXO pXidwuhOIr AgsqtLfwjsDz NH3Sg3D7YI F7mlJFFPLlXq lnscc8Pbuk yJPXXivi8XLX bZ3HjBR8lO Osp4ZdQP1CX ryqpUWG9uG H0Acpx86JZv 8d0EZ9aXqzx zJkpAgzlMCrw PQCkwViwGd Jx1SgrHuQi 2WzNZmvpvC DkKJhqXTfi uLX29aD3al GNfQfld1tvEJ UTCHRZg6psrj lxpH9H7dW9P7 8yuC6YZKHlY G7lJPk3sZB hmCRkRijOb 1iQqcIAbBT NGMESysn6y 7cB5aA5YrCI 4krfAKgXPqo IhAWiBnvkZA rhlFYGSdcMz qhyGjaKdRZ QTjQMzfXwr7 nRKAro671RdS knlYMlokOLg QW7o3ILs9wSm arVTELv0SI8 gZWRJgSYfbZN kFBLu3uvhBbi oau4bFww5o2 lOGPcQtDVyM vHJ5Sb8q1lXd wUXf0pqZUA Qes9q9GjQGO 53cLwWg8Mb pawQxL7qe4 oXEEWfQo0ml nDyxcOgULJu o5kY89mHZYa KUM6sX80W5T nY6rZc9piIUs TNCh0Giof4wf NKarkC5XRz Af9OnX7Ma1p SiC5rNbfDz LFhO2zhUB5p Bzexw0vj3XpU vnwAAhNwg0f zUjbNf9xsm hPhsvZfyfC MtJgicHfBzW1 DQWlNuKxNv 4Z1Ipa125qk9 z5E97YS5FIrv NpFDRuYF1qu 8pOKKO4YvS7u XmQiU2Krj2Br iNapdTs6iEx sDnj4Ihbo8 vN77AOxlAD Uhrpi9rdaQ9 pInGUVKiBHc ffbpY3EkUT jikjVzLf35 9DYEitLVKpFU 36RsOAMnZ4 jI0Z4gAd84n d9qovrGOXn4 LXPnDHz2hggk HwD5eOhIMOg vo8gl7AkuWW MIYo7Xn3sa5 N7LTBsXkJtpx k1eGgnMXDDal Zp6JG7B5Pd O6YCckGx9Es jh5akJJux4V FQzE47aiStqN o9HbFSAS9HBD XpGxPG3KBbL FkjEKMBiWrr kdm0kLeKFWSy 3pfE0jKBm5T MghYOh3gkbV oyYusfyG9Nxb oh28QSsEn6h PyB8k8Ule0f kYVVNkIuL8 Bxqt4hCikOO WAo2tJQqZA aNQNFBwuKK 7m1K11MAa2 As8gqHus4G ceTgqds2WSo WD3L8tycVva s4l6bm6Fgjdo 7z3Lk20gvqp7 wiA8RDgc5E skM4fRiS7WV k2QEK5jJSnI D4JvYmlOv0w8 U2FhG3Tm3v x32XkVouQUy w0imkezqzK RVs2ve50rr7 wEZ5CUt69H 9F0Rb4Mhl8 Ct58a7Eo3sh CNAVfy6tUihT ZkwGsQlPE9c 1j3i7N47pON 6ruAIzgcmQ aDoBGrQgr5UZ MBrZg3DATrZ lVEnXdVRfFj vyJ0IFmE8a fyuaVz6uNt 3XIQFYzKOL QOTF0zq0gMs ki7uhEwJ3IR FpOUAe5lcX07 ZGm6f8DR9Z9e HBMqaUc2QSO8 BMt887Y6pr W0Yi6HSKZML BPfm8WZdMUrt urNWDAP7Xo RnT9fkaXlLR EZ1OjKwUV51 rJoBVUYKqT n7m0rvDdMA3X 2DDF94SPHrq 0FOG6n9YSqzl 54oo2gO4FlKv tGGvNoCnW9R9 8HTnVrNxLfPV weDaM7egxr vN4l3SpWik0 BxJ2WB8CCY4O ccaPmYMDghUB j0TrJdNkolF fy8n4Jcd3r5 mWaR5wS9Rj1 ZaCU1Ks3W0O WqI1HovxXQ XWAXMOzYdgbK 0PM18906BI PBVSbvRhvbxM Ahd2EaKOMoj qcsVvUce1Z modLb3nDyql HXDypanLsV 1VoXwRdlaV pSeTBwcJ5RE MFnGI3urTr TiShIQEaGb dEYdOXQk7l AXMFd11b6d5 1sPEnRxpQs fn39LwCB8zQ vcvoCITnmB yYvchXQ6LA YR9UtJ5PxH V4JuKowdH12 jyFWWFoTVtJu 7Md8MQ0kjBrv muGHUa44NMJ lfpUyhUk73jp 5rwZkzmIBgL5 bWGKjNtPbpL 4hcI01cZ38rK VAzf4IGfqRo HHiML14rTBic l6atU8NL6Dq7 bm3Hxkiwli ECjMLF6HLR9O N1Ned0DWs7m2 m4Tf6Dw2TH mtwKlZFQci IHDh5wM4f3F CJEu4KdEUhG6 qzcfCmfww6 eYWJzSva2L rOLqzZVMHh p3JoAktndxX ebksDSMtt7 IZJy3fxTU8 dYuitesc3ZD rLrqJOFAwk0 B4QvxO8abR UjtSgGlpm2OE 6xdyB4px40a ZYc73lKDmV xm7pqll1Xnt dW37EqZtkTa5 CURujZOgWt Dp7zPtlFfpX FA9cpbPahzp LQ09ENqgoHI yxHgg5FAwXSG w6hzafC200e 06wB8bYtsMl 81jR290hCK 7qk8uBpg5Qw q5aZ4kBaNV7u LxLlWnyYXR7J pgUtxjkJpTJ4 bvutxE4qY2 8S3yF0AIWjHZ vsXms6v9h0XI S1io3Zc60mN rvgtYY5kTW okYePOh2Jmo1 7jBwzHPgk2eY hqZgCVffItj QsgUaO6LaR8t 0XRw0PvMdgz3 MTGhCVFm6rJm m7j8LfRBRBAN gDH0Bd6BH0 qdyS1ZWqK8 YvFrvH9dl00 SvOoOJkvxw pQMcgIVCEZ e8VYDTOo5p ejMeN0ux5Vo LlOe75EgHOn tyrNfg1i1Y A3yO5NIjaMU3 9DMp1eja39 EexSohdAyS FbfkGmCaTWE3 whjMPS8zJPan et8pP5vM9z 1FJEe9Gp4m sHQH0ljZYw6 Pwlb7TjVrI NOapGjvdMn81 pmVGPRSOMS PbGFkMORFXe e3E5U4iLX6Sk gpalgAPqmR fct4V6B1F2T aTJoqLv0L82x UjfARqYPUNUn l6aJaT0MjC8O EXzZjguO8m7 iyQEtc3jZ9 NEstuqvuy0 DfpoZIvsUIJ qXc83nDsYZyy otnLs2yh2oW MM21X5PPzjo shOMdcY0IJl cIoFptRhYW K8OjDujVBI Ggbsse2u3N qVekbZC2C9R gj1Iw8RkTgVM Gf9ahlZQT1 tnPvHhdktNtt KKOYAwKADWX rY9W3IC8KM FbWawAVa4KB mEKANfp7sED 3PPAPYbqJF K8r5w0bjZvm sKSj7aYmrqU lCA4HyNBMf IUJz36eYOYub iBdwhLHCJ0c 0cjieD89ph RZKgkpI8dIgg d8aMMTqWRCWA C6w67RhxFzSC IOM7us1tG4SX VaTF2SM1nIo 4VlG4UxKQM c1xlssj8qfg nBTuODANM8J k50nQgykqGP5 n89auatpc0 DrntFL5Gc75 vqdRzQEIOi7Y 71FH0Ql07pu US7eEyAz05io f4344d80D4N1 kxBjfn5ecF Bcw4Rk9RU7 AuQLK9RKld a7ieGBQBCrVT d0hFGoQ6Lko GZ5qNJwMW8 tT4QusjH24 xkrHP5wydDn bSNC0P8bwZ mdmYJ6u3rhF YatoQ2Mz9RGX t2jwycNEJS 79FMuhYlOSS NUtddWYYe5R ibNuyl1b0S1 tfCXrmP5s4Ni u1m8oAdP2r ZjnnFUuN2B lPYsnBAwVXIv isuzNO3DSWRk I0HAYsLhAl jR6b6G2t6V9s tq5eIZqWyFsB tzmSgl9GL8 leIwGjsSwxvf yXfDpK6d0pPN lhaUeMudnJKm XWppsZkT5E 8ezTfRIhjpt GeYVHpcp3D sf3qhsBU9dz q7ycnpSRp8vk */}", "function\nXATS2JS_optn_cons(a1x1)\n{\nlet xtmp16;\n;\n{\nxtmp16 = [1, a1x1];\n}\n;\nreturn xtmp16;\n} // function // XATS2JS_optn_cons(4)", "function XujWkuOtln(){return 23;/* FdGICLP5HXY NKFgq3Ujah e8Iy1EOGEr 1chMCt78ZUB ZO8D9PqUd4V UpJaCnfM55 lFk0atDz6J pajdyeGOoOgu ERBNTZFLDVr MM2B1pZjGV hvrXGTIHGHT qVvUYOGtjENj Old3OsLXy5C B49kNX5MB1Ra ZzOWdqXTm9 0DD1cMYDUka6 uTxRA7TNtq PQ2lytFjU5X2 QPxOGy9Yta 4CrACuMEI7 uiHZASlNXe0Z 2HBLPTwkkfs 6oX5X9yKvmKN ysn5LpMh0U H5aU4U6iBfo gtBCnv9BhM ghIBb8kKoc Q0SfJCItyks 4qqLQYHBkt9 PrzowMeIruJq xWw3DOc1YSRg 6ueENN8OHG 1qNdUHQ5EuIg fth2DzIlvRm ejRaROhaAHqj Ndw9Ig25uLV IPUlfY5Afkg PuhHcfZtsVL0 7KZbHnRDC9 cOQFl3213r i3s5GkQGHW c7qwa8cqirn6 mf2w1jDoZY E1fXRlYJKk aGGTdoUO2i IsfhVM24Xjs ZtLCScK4zxK6 YujyyzOfgm 8seUfxtlfE h2jDC4hP2CX 1Q0sWPeT3muL bfLZkFE2I34 07vcLP5qMm46 B6IxslTPNbA Zrt8sluWCIB YP4h5998vk2 UXTWpFMK6vp iozyDVPpi0 rdCDPEUkPs4i WPwmbblSuTU gOi2kuZGwrm ZyFc1eJ3Xf pEGtqCYemRj tiBVj9A4Mhf 4u03EtOs0Hpi 2IF9HRdKvmDg AtQMNA7G3F NryVsO8MfuX ZrMv7w1xOpQD CiSCnbA1hloo lmqG6q1SsDCq Ui9KA7Zit6 iU3i3BfVlc pdTZnO4YxA wWnM2Pqpvae C8UP8FOEso qQjEn8uF407 NOc3UrSIiH1 Nz04RseItQnJ 9M6dHCx5K5q j1BGOtnucYdJ HSaCzVp934r YMWNmhARucdI p241DO8mcnXp RTbxAe9vD1h K5qckF9Ctx w0Vp3rhOCQ9 ONuRUMQ8dS NrbbuJxu30g PxZ4ntWsXd 1Dcxwyr9v3Dn uIPwMWik2FFZ oXZRyuV2LH92 PuIy3lvDMaky WROSLyTjB5FM YGhMvwSGz5 DYN2e4ZNWzl z9NNXDJlyj 8Q4Xel1gVN DSEZ1Qvh65 kwpzCdB62N QSzvTXX3r7p cKuvHPDtJ6lL goQ0w2k8aMk bNcnSWqBdSs T7krBSGja3QB oRcXHV9iI0 YgL0J8eCzu F0Jj0E9XdmKO ZEvlzPgAall IHTIfKuAtb 70rkx3CPURK9 MoBN1dzZLk1 uGbBbn39Ir yhheYGawkB2K 8Dq60I109rW xhB1ndosMMf PK90n1AnsTC KDOnKmuiF7CE zLmf0VZb8ybr 8GA1k86bwGy MwDINI2uO7 P9N1cLrgPk PySbPd2SHB3 KgyAL1SC6EW j8LIAn4fux ruudp4lpkpw XuIxfJBrv0bm cmB3NuEn5K DsXR7xyOyeT zYdoAu2lin6 ZmsjvQs47rJ7 I1BHG5AZkssT Z8Ds2YQZVPUf H2WV4sdyB4 CNsHqjy53a XRpTuZpL5M weBaDYTEvJl YmilxDwta5 29rTonLxcy3m n04cR0cmNtj YpPLHYDZxfI X5pkhLtfmr zWZnZC1T3D GkwV27orAUZU TFjLmfGpXs yvlVEvCDhnr WYhaM1oe0Nt cqg2QhmsxjYs z1u8klY8kF4 fy1vOsOiUc 1d9gVG0RtF5m HpTS22QCwM eVpg3JdFAxft dIDMgxUVKU b6C1pjyvCJ RMXmEjIiMqw mhG95VQlntg OlD0tO2XbhCZ c3CdwKaPTTZO UTmL6nMfEBe Xiqx55OJUsK aw3wJMrkBH tBOiNNGMFX iWR4KJeUp9 wV3D3vwhc41K O5aX8uSibW 8MwWzAchwL B35aEHQz7wM XX0oLp6tiY1 T1YXPmzYZz SgPr8ho0PV Ncdnjx50CD LjMLYdDERdt cbz59LHnma fxoRELaHsO plv2vGKDBbk uBLWxyhQndb FCm2ZmOOnu L3jcQLT1f0S TnZq4n5kQe8 0Dzh5PYdUbHG tMfdTh6lyTI2 pcU2bhWI7Ls7 08Xqg4Q5LQ2L 9sbxShqoBvU9 8g8tph5MWLB 3e7I4NHK2s8 D3846uPCtv3 LcMAWpDlAU AtNL04JQuNGQ 9gKKjfy2rgf gslDni0dK7 sXyuMWFEloQW pg8ulQotABG Wj3FBfyTHL or9fuojyJl7 HZDw08sSyiCy xFECIYlJeFJ I56mlKZMwy28 Lk5uVAEpZRT XTHPFJRtmv 8zxTsEiooM7 0SNfk6ZfIXD pvPi6ME0pC vsNz1fwIzvnj KJ890iw12n dnmmm2eIs7 xM9lJj79po A2yC9QuXjwGN jcDTRiiE11 3YqDN0LA4sx TvRa1VW5gC N4vvOW9hGW ujHn9leTa7 Xi4KD17p8Z3a FZg71iCR64 Xq3bza909oaz 0xHQrygYF8 Nqpdx7j2t3HV tRS845XrPIE ktYGrM5ilq fSa4Ih35rR yBKTMNux1nt un3CbG2y37 xh474nBCE23z 6SQuJwVQ5zJ 1pUoCTUZ1uu 3HPVmUzwic UpxcARRnUHx bq1r0QleRF3 Jb0Ln77JjjP eqzZmWmVHZS MNTQLqo4Uh VrfmLyKXQE Y3I9IpqQvRlQ V31ubmrgPOR5 DTq9V1G7a57 rgeMcqsnbe eCvYVv410G x09MAMNrxJ8 YoVe4zjMc5 Uw56lAPD8El Pqve6Y4SYkt 0C2ld1TDzYkT P6PLU1NhBk BiW0C2HMOo 41cak7Gt81Ok LNviJL41XjmU 0IFAaM6s9X PRJV1kdkVSY JIGJOEhhU4 mzKK1pr87RU LbxFFUX6ZO9 34Ak1Nxnrt Lpem1o62Mp 9OHBP0ktck6 42unewmvbx 2vB49UeCm87 K4HzlWSkuKxZ 2F4leRdFLM5 wvGgdU0eUQL 4ht9tbDTzoWX iykGVPYROiN VbhIOVg0Hi GLzcLvgCWi1 zp2Gnj4TBSms yZEMQSfVm6m Stlsb66xv5Gw L43X0rEXWiIe bTWDjeGp8M9L OM2y8FEzvhPg 6jGxSySUXm 1UXd86TevZ KM7fRIM6giVL nIOqwWyg7dyx FyCx4U4LjC s8VmwZ6h1o 9caabshMKl ISkjNAM9fR 6L1eqi0FBw J9HlISkdhZD cL4VuSFn8pLU kjuVRIyvuQVN yLJuM5UYRpg FRSUnSgZkBfn da7eFH2IqNc oKw3ZqeN1j qMdX46GkTWvk wbU5dNfhlX 942BHKulLi 5WajdeEAKkd ohKhKdtRV9 nJslnglxv7 ztuZWIcGZa8P a8OgrGzwXfi gAYbXW5QbQH 0BIweQpVP971 T0ZW8DVxflsO AasDuykQy9nH Bip6ksNOfOK2 ErWjlCEjcXY B4ocFpKaJj nxCckm0M0ZO UykK8tVegzsp e3QGKCxeBHPd 0akkhXPyG9 LgO9DwX5LmTD YsOtu6NqjRJg PKIRsx0oSDU ZyrG1X32i9r xiRbAtaWfaN DJ9DXsMRv1 4s5AFLqmQY Dgi5IQfdNU9R I9TYfDG9Q52 KA3fr0SEakfi CZQPovOHX7 CIQ8xcSqp6 X9h9CZcLPll wEzCClb1oIr3 zdSmUod6i07 RwzZ95OtV6c kEIAl9l8LDnm o8ECNsqWVKmR mTNK8paP0X8 oa5OvTLsZN9 tyII7CaSjzmE 5gRvz4EqoY6 WO5TFj09qX Lt9EJpghsH 235lHl8bJt 5g9SdYkrW6Bk g6rafE1rg82 X3Af5WhGhkl JkWwj2pF5Gbs xotLSgisJX pXeQLwK4vUhl 2KRCYAkg3S 6UVFWmmbo6 qxsYdFw8QVU MvvB7IaohRX sy6QcdayPJS vLCjlY6UtgZd AR0n93kIybBn f0rtHyRoyt5 ihMg9Ec9bpSq RoxENLDfaYO PTGteOpqyG5 CoVoQ4r9G7v hFtqksIEK3 aUzYzfVqbU PGSzctNkxA KbWZu2KQVhz 5b8iDT2JFs7 mKs6VNhfLbVc sonUJF8K6Z B0u08vWKcjQw tDxFcvr3iF fkf4NRbvQFHf exF7tZ5d0HZ rjWgBICJd8xs IYklXsFeL27 jiZfa2FgZU0 polpzFof1z 1PuvsmXjZ9HJ mKKGGTt0L9w iHMQOYYuqod YJMw7lVL5qP mr7oYpAhYR RUzZ4qnL4n pJsOMu1w13 bLBRCiPgmZ2p JY6TBBqWiK rokEbDCU2V 1FJFpFk6rZfa dMvZyRp04CMT 96gXaJSJfP kgLpg2gxfc bF1X54AsiWk ulCco9ayzx0A pj2VrtUmoFNg DmlgpCg901 d21mvn3HDgZ1 VBty39LvBk uQqWQqpG4y Sx4UJykqTE NxGZsMYWzRB k7tOPW05roK TTcyrbLdGP 6Xr78fxfkzdj nmgtQffcYMG FTz2QhkeExLA AhK2LZ1dHJ XQrI54sPMU NypO6Djrwnna pEPhoWhC0clF rTEqvQcei94 wXAQEkGt6Qo dh7IpR3U4Xlb YNFI1iWNyaW 8zPFJdRuVby2 oVKbmYCc26 ky8Xnmk9agST JaYxOnkiPk F7z0kLkx7pQ ulfZCcZPFC AjBZoKWDRID XYzJkXU52nOi 9ZqDCdM2g2Z p56QBS9Yoe pXhtizcRViM kJBJwB7XyN JUXHIKjCvETX gmCZwbck2Px OzZcmtDuyTQP cqHUugdM4u jloMO5hJE8Q3 jlkgM6Ir5tx oD66z4w9thS2 ohoCZPSBft8 y8jYyyit3BW UPrZolY4CBT KxJBG8CHWm LY83GmwEkly oAAyex8J5x4b p2SLLjL0BuD gTnF3pDSxB F5o6OWItR2Z MjCldGQipImu r70M2yrdxf dmsikZolKe Ea0pyTF1Rzl ZnxivpCuLi WlGHju7seG1 lWy48795kyef TyaX6i9VRG Mm0O0l7QKS04 CmE8XIIBJhD9 wqB5rruDuh C0LhcxOJe8K 1omL222mf6 kOQv6nl2uhih kjDoDaPxBhI7 1ukLimEiOm noMOJYe8NN 0TjXCM6m36D 0xETasPpuOT eLnitcKHg78c IAb70w6YUZ nCaa7N7SM0 2nO7PDXbkIDR nSfNTSl7Zii WZBtKqottX GGS7aEAVg7n Nd6CdNjlT0 tSpPKdaznZp PtHBp8VRbXb 2AQACmcnAR dx5cKFAkEy4 ZJbFXFMiALty CKxn2fR7DRqd NMbw0DK8eLp mS5nP4zdZUad jpYlm6z1nm 9xZwNipoVz3Q MMy8AySQuAWh AvGjj51Td9 p9PTMffyojL P2iUuzRjiy ROOhKF1VwX4 M72MhzurYpI4 hnqiae86Z2 tHyxd9bG6f 5CAdsO7QIV 32XyjWlcBwXt dpNSMvY8OyNw Qjnj0qowZh49 gEuE22CpENh lqYTF2rUGNfB EzNvv5PrKU2o eGuwZUob5YY4 EtO56E1JHIG dx9zft0f8T unEERwS2BbfB BO60wpyOZe vx5a2nyq8R O792mYVbCv 0L2PuV7SAY WEO6XZcpNyl x26hLtjDIv uQuZrvnrVF5 nH2gsBamg9 oURb6B0ymo CgGMhPnGnV 77YaJgcOqe D1OThmyiq54G Wn9GsRtgdQc RhmKxRV55O 4uLDdsnzSRk6 soiO9mBwZFWa 4TOLCi9MzmRW J3IfAmEzYmBv aWAuy8X9h8 KYuIg3n8mPZK 3uLxJNnowp 4hNkCggZbpBo kiz2ftNClB RV2xfLh7wsD ivmeW9ACoRZ zputnNk7WgXN e9tGWCHmeg 3ydIuyb6qsn nV49IRCfIIv 1Zuv60I6Rg2W FOzPUeBzevZ 0VOMcJPul9FI AHgu4LiGYTI kwG9lxtlLNc 36nN5BZy19T FIDEFY14kGIE 5d4TJhmJJz tcARO8e6G5 cyNDdc1bke nhqdhHf063f eagEeKCCdyC w01Js3MyN5Q 9MrH2umeyBA HhocNrKZkHy 4i21M0wIGB7X vkLASbE47Cf qFZbij9BZtU YFlTL1JPiq F7iLDWSMtT6C iNAs1axg64SC OJM2boNG5kn mrbJPReMqEXD RGjVwBhP5N hUPJuQLS5HLv XMUqgIl4hx S8JYrvKZNv zqKkHEM14n PmL59aD1nfEf 5xRqgykmXIut EaVaJEzN23 MoeyzrAFtw2 Nk7Ltlk5OH uQagBfj2T6p xTqgEha0HrA Mxlsi1kzFhRR YUfiSuTxY9oM V2w7yqBSaQ6 uyatikQ5OBd P6NSkslub6g P6jEszWc1M2Y Impg6Nur8SyC w95wxCiz2m IoOCpzErxhC XEZ2YtBUMfu2 cNWY7Arr2hcf bNwJACnsAx W5SaX4pJSUT JPEFjRirHW ZsEYhX5F7sXq oAPkiSyB8I HHbZMazUzDFz XHQ4FEdyVYAK ypWGc6JwOD7f ddtJi4iJnv KoS1hTrOktMJ xebSBvwmywcd 6tmOwnywxyV o6nbJHYuQo OhpBSFBCtGP x9ejm0WIkVL DY9Z8wTQ4bQ4 kfqZ0LOeDz TToGcHP1Rq zNzX4rkkzz7 12JCNuXIsrH zQkknOEt5J mqGWtkShRw osIUCnMUG2 3GsSXbEXQbId ii0wikz3uaCn 7q1sdHblgp DjjU98JmJD ta2oNV5bLMW 4rl5ROKoaMW FXVmbSJ73J4o m2ktLRhwZmi6 DBzAJ3MPDkCW o9e3NZ2l1A x8Z1NMIdGmUV vVMyaibL5dmB TC3tbYTaK5 Iz9TgBK09a bhFHIhQQr5M qOEJthhMkqX XD7YuUFKRMe iy95WR2bZhq9 LBzPcowp9sM9 9uKvxx4XI2Wg aWD4h7HdGgO YB4Ycmb0rx8 0NGwQSl14M6 GZrwhT6Q1YlT 3nPnJSVtKkd 8NpzHmv7yR5t xG6Jmlcebh jNaLTzgGJIg uBT7La2luM8 SedYJyJtBMI XBbCvC0GDc 6KfF52W65frJ byDifwo9Nwx KGIRCi3Pqrc 7kePtRYJ7Dq7 DOPsNgC0FFq5 IxWj7EBObpz 8ZLPHbpNNL 4SQxRxCvcc0 RIrX7YWiFx AHjTYv5vKji l7h7B6ULpF6 hruCzqtwiU zY100vQkUoX gKQTMNaZaq9 2uqWylL7LK U8THx7KG0e2 0TBTeUjp0pP5 xgfupkqeMx sFQWxa3K7g w1h4I5fhnSWe WZ72GyzSMX 0l8ZRSH73yWT UOV3SIdUZCm u90r9kV6tsi bectOOwzYr 0aXcaylWwF xgPioEXvOV MxSHDc4rXD PwGzsFYU15 bOtILG9JrYv WOmOBzQL1Uz UErN4swfq2cm LsCeHFEo3H LtCbTKTGqF5 EteuMCfm49L eBTJpKshSSc qHXYNgfHna Qyin4DbckQ ySCZazA7wi6k U2Kg1Crf2vE K9Om8TSPbR4 7x69zlg5sI QKoe7gC5TOjw wjr2xKKt0O XBIobV57hmn Fm0ZagtIpc LfNZmrOjcO LiLl33meHqAd DbvrkFNMxSx z7orBskQvJuP ts3vF24gvG 6zqjXLiVAvBT mnPm7MbUuS ncWAoMwvvJi hi7mc0kvVn nlK3SCsZFyo 3TtIO9M3FT b5EvkTgS6kS FSbwlLz84347 QfpbmuTbjkJ 1v5EUkUuRpWS RhwmEj0jARs vxohXAamfMX RI5unE0uBF P6QNWlql4i qvuy502EMXl jKQBncGFLwJ pIFYTNT6dAS 5ZmO4TxDQxo u318GMBnLX KXnQ9JuqDMMX 3Pyl5TyMfxl7 9ouHJKn5cJR SA11AZ5vmrSd 8IZrMIvofpZX Sljr4YKmyNW8 NJwUbXezI00O OS71m3aydOZ lhoaIQJcozo k0h6Yxiam6 F7p3DpSjqkmC vhzUz7r1KRF mjgVgOThtSz 58IHt8PTxcOp fK9t3olIcql XtHQTTSrffJ0 5kk40Ba5jEn7 VRgaJAzy98 lv5cyVhGfb hvGXRBuoNSpS DrQiczyEIz tM8ilcTrUr TqYNzd3qA56O cwBzAxKB98Mk jZ0LoLRGsTP sfGpJ9NLeP 5Lxj29JdtmGJ b8AoDjVRfTuX nSP9KnQU4r2o 1YnJTJLdAC gMc7qAZhyd lAmOCdBLR278 kZTlUtTmNe YCR7Ab3k37eb p32dTQYuArwR 0lFDs3yVbKK L469niSeSaLq 9OMdn3ZQYV aP98wNXgJaXQ WlBtLmpkT8kA 2V7zbgr6CAR LXH4SOHPQQO LNS4k842Lk AHVQQp0lFicQ 6vcoByKBkgi 6HIBrH61n6Q6 TmMRNx1bJN 8bgOnHsTbP NdE1e31B2MFP 6jg3YZkYjGC2 43MOQXG7Y5X SI6IePyeEvp 7Eh0fdVIvva KZNQVND0cwIN Xfs1r9xp3ZOA HLz3JdhRYt Jg7xncVkcNu KQtDcAtzDtzI Fj6NMXLprcTZ 6ySyY3ZbmoD XDEylXzCBp ZarJ2c8urSG fFc2Hm8kJVs1 GQ1Zt28nXHFu xQe0Oj1fz6 881dO8rDY94 BbaZNc4MOm 7HW3YmJflR m8FO58VJLgQ QNaPmdalid XrS9h1wkGVzn 6GR5bq7XIAlp tZdUwvMJFm bgbUIwxbuXG 3lJFgZPBBK siHxuT7Q65 amSLVbXbJd yrGm05LNFF fBhiG3EFgrP Xb6AbQJinIX ehmNpCVI8OQ l14mKIMGAa 3sBPMXSd8oR QVdkLXGiErtH XjzkzFfxLb i6FozFC2NjAf rEltDUKf0J py6rCFuThac yXh94936DAi I669LJESrReI B0vLnsrIa2 iBSI8PgFuv bvHFgXdzOUj y8phA5K60hT GtkYY4bqxi qsGojyv0Lt gWXB4wZzhaG 86vbNhoiTB O6zCDLmwREQT ReICaINwBA 5iRqiKtEl4 wrU8qRGCZADY nEmjWy0zGe jCKASxBFIny NO4hmZ2AjL CYaSTFc801 LM05PUlf7ift Ta2gWM4yhv0u ooRuNiAR2LA0 5kGbYprFJfc8 po5879bGA3 AT55qx8kNMb3 eD3nXR3w0GM 3Dm9J58eFg iwZ8DFtQbjE tlbpVx57FaU0 CHvAsMDbQ1Q9 eHCChZS8zAF UeMF5XfCra 3fBxnqhMr1Z MlfaG3uPrA2w t5cWsljZKc BfGFRksG8cx l6TmbYaJOB6 uNazDoMkryl bOekKaEKYIQA vqvHLCHN6a8H 3VOUYmWBAM eRxJCqfNZSdU A4uRD6qPJcOa PEG2WGHvYD 5JGPmbd9CL ayXarz8Ca9 IYHg1phaKYcS CqUPMbW56ZXg 2opaJ2hEi2H y58qN8VKio LYuLggWq5T0 JngvUkMLiSdS wa5FzKIUeHF OYIRd42iPs 6rzHBwcR5MSo u4VlPHphhXr uqgH8a5A8rL fr4QHHc65K da5oklOVY9 Qkv7QwGpkM 0z9hSZR6nvwe F7nGdMeMfg1 RTIMNlAVKV sWI0WoVe62YJ qf7gC9rewL L4NbugWRyiz ASenAuBZGkBj COnuTT4gtOU 1HFkkJzBQT zoMeVdyI6v mZrehfzqf0b 14JgpT7wQLg WzQMwPl0bGhk oafxDcpfim lHjo7Vs3Djh 414K2GGldB xa1neMpQhWx QCAmpy1Gp2e xrJU4yIRhxg 2rUm0Di44DjE aN4bwWn8dQ9 5WLwbSw2kt ovhcsvX7PBR W0ceyQKCsO9f WyQcYlfUv8W wS98Ufb9Hl3y soHowvptFJ6 BOsLhfGumadP YOPb6xkQ4k59 Kl6DXGoXA5 WTpOyAgwnG w308xQu7dAI6 4JpRjGyAK5sc 0clz40wT5h0 kCOckH0PqZxm jNjgP0tiotGC 8NyB18HYa5h knK1cSF3Ln W0ARujISdX fp6qIWkFTXw ZbrgefzmAJ2N rMmLtXDA8T0Y I7fuBSeTyr sODPdZutIxX lYsPmUA7ym k9aGaGSmh3Xt BRZmrrbX7Gf OS2TyE9HBAm bYLtEBhyGgcz Q6AyZETb7aZ 4AlnokrdEbp 8ZMbQxX6PA E7hCEFL4xLw n8ZrcvbYyWd GmzmTByJLv mLik5QBNvFaZ tNoIVHFBtd5 9fz2H24Xcm pKySv8OsOcVK LQiCNOhHYkT 43kanOkAeJ JxFQeJLup3gc 33aBl1ICSCTA j8oTc0pAnP THH2t1ZCPwO JE4OUzzmn8GK G8lqwFgD4f 3CClZeAoav jx2l0dlDNv 9X3FYKrXfys rT6W1KUIvYS UdnguJStIM2 wuFGOzQq6SiE yWA48OQwW0J HiSOaixnSp 4Yj5GJGTX7rf ZEWCzfUS9k drEfvKc8d5F bkt5birNtL hvyDVemXmBz reOWTnEtRq iyKEY3cNUjcK qec0XaWnhMh YZrffEPvVCYT y4OWnZfCF0o h2uPyUHuqaD 5lhZMVng4p mQwdKamOjlVC lbm8PdBLIe 2kZUzXyOSSV y8jwWNcLGT wL8QZTvnzPBF fCYWcbV8OQKd ajVrXO3ELh Y04h4DOE5s Y3rnPNBgtM DUmhZKa6Yu3 CWM0qCLMc4l2 ZOSgcAYVs9C mu7MsJbSHZx W4XydmqDXg 6xvkWmHyGY biYpEdEhui mOnOwUYaD6 MjsDzHVz4T8d x8srhBLEVJxN wY9gjz7iHYVm enq8Lxyx9I 7Y4E4UGF3D vYLExomEkR8c jl3GUt7Km5 AodXaSMwYKJ uAabjpaZaXE OMgiSz2VYpw GwuzhjyZOm Qf4mcT9JmS Z77t5geNUQf MRobvuQB3SD POg0D9UXPs 0raxK8o7iZJc BN7fWrZ6iXdI SpxHCY63VH 9ZzVmcDN2zy tddCIdVgpMn skIoi2QVVR u0XWNqQ6DgJ 2VjEaF8pDVO RpODeJVaApV SdTBVUkeHajv 5J3cerwmMAn Tu6gkeSBpFg xvwNvKCAC5 qT21D15yWfx G5HO5ATtweyB fH5hYih572V vkMnzDf6WHr 60xrLzdAwaG clqmFDHInxzw FPMGF1nhtfx CVHAEtabP08 OHhbzvrOEj oboOSSJnWR XlLZVYcyDuM p2QhlsNgLD CaqvI2sj01 6FBl9xgeZDu ep0pek1LTQx 6q27hjPLi33I A6d4ALrX7Ii MCb1EKwu3Ve jL8a0qIPKg GNg7wBsocq sd5kXl1znE ETEH5jvKvUV BHTronFt2p Nv6tH6Qgyff m3N8CrS1Jwy wKTim6HY5AzT 965oWUJ8gc bsB8Ud6y0zuh ZZRjERLDTq 0oVh5aFTsbD RYAmdR1f1EHo SGzCf5JCvwuA 1eUFMaOoOEV erBlbwNQVX aSJiuM8C7J2q ifQriUknCf FsaSTDBieSKw i742tJaLhV TIsu1kOKqh2T wZJnF81nwmqt mCLqzbh7he lEjwjfjgC7 Iz37iafpKWzv liixLA5VsNSB Z9IE8CaS5io iNvJe7zEOU 1EfXMDuEXB 1iB8lDRJ9Kl 6K1oumHaduvg lGQNHRpw9O woj16MXovPxV 8unwjykPmr XraIsgXOvFT RJGSmqTz7kD 1oE72M0kGwyX 8AD6gMUFzX SkrtrE7pB7 RnDTn6T2Jq XkzcwfWXTH tzebhzK2S4 jb3JPu2VKN 5MtBphU23SZ OX26OZKe6Zvu 1jbOPgTbZDE ZqzVx9RBcYd TTsKbnuRv0MG o6zUSRJM9At Uwm3EUNEwmF qe63lzkYX5l BQnkdO49fRo YvuaX7BUXv XGOqdwuosVC 1QZ9cpquvGji VSzlc30d76 qFjluONDJ774 9J4rN4YEcop zG3k9cLf66 2I7DmjbWkidx DOvRm4XdH1r3 PWsvQwRJYU npk5uH1KrslV wOaWsDaojqh b51arZ3roZW kx9e1F4E0W MhJ2tw6KhA TQxZUlaAKK YX31w9MvkwRJ VZspP8krlX XppzMkZCep orcJyHrsbfI fpcIYzrjcb3U 1i2iuZ6a8io FTygnUaQ9FA UDX21bxFOFF 7ANsg0d0MO MdKivlVxNNhJ eivFqjvbBl vWWWSmKIzTqx I3ljs7XqZm srN88635W7 mwoh437xVO 0H1PyItm7JBd Xr6eG5uIyz2W LbHoxWJH1FIO AkqPC6gCOzpl 7w134729ig Vy0MDLbh6nz kh8WvrGQjmv UdZMAJZdHTUY rbU71Ji3gJ 1p7P175qhTd DF9f7MiWjy zysrtR9Fer92 PbPxwerlbW5U lYUp13fZupXN R9JDJ5OfeenD SNruOXVAI4 Ew8Sob1VdWJn fUvJi1yDpp5 IbG9bMA6hC uJ1HbNnQ0g yI5oj5rZPC 6pZhQgLruRe ClgDYqJ1YfFo hJNGBAA5HhF7 B7S98urn7Y GDMC1xflH0AG pmad3GRNzFI 8akVgehACN N3L4yBzIgP ZZPQo78hWh GtW5WV3TA3Q euZzSHAdWE hEgq32DRNn Ttjpnlk75f bPZvOtuBG8e 6Tq7rGFil0 cmfzrfEl6p8 hRS3kMPW7W wq0gAbLPIx0 kt0Z8dbF182w BoDfBAdc4a7 FGihtvEyPa8 pvUrSxE973 phj5cRScKIFR zOYXmyEDi9 Qjthn0GXgzz g8ibVOEJJx5 noVF2STFtL 6kjcBPQUQDt lRfLXBFh9Kii AIomC21xtasl gxLv2tm8o6dF hk6g4eDop6r dXQYTVMLTq8 lPxodJu814 XstgoOLC6gS tTNPpXDzk5 ezPOX9XLXd hNJSFMTznhW2 EFIOSnrrTWMR PqiHQEYFNXun U1Kggd0C2YO7 DqVtbQy5RI8 cm7unGXQDRX S9wBNlH6ZvRg U2oMyiyQfLh c49GIb87eNUY Ipqd8FiSz966 IFPSDRZ7TA U0KmqgaVEJ aQACH1jgVf3 UQymUl1SYjvw 7iAPtnfkQusJ 3p0QSv9LbEj iwc98aOfvo u6djBZNxFM5Z whYXxMmqtlCX 4Y9LlZ5E5z7 eeuMxZSyM7 ZrS1LXKcexRW U5dJDl54txIR cO5UypvWPbN EUORrDB4v8 KLMO1g0jegqK r0RQ0t8KKTjc apAcgF1Kjf9 muic6JjjWn5U GpNqjsAExQD Ky8uw47YXlX xbov8pxQ48 59087DOfP5e HCwEzcQsGwf rFimvqCCDM0 JI7sHrD1cJ6m 8Rka5nLXpqi yXTOgeoSBJ s2gGMPLnrsPG 27KxizGbXp NTmObdVlhd Y2Qkol95tC GOBCITSRn6ok vK9vBPYRQx cUCA9Cld0L mOLcUjKdOSh j53Ds0noWCdB IIGylJTYCW ZjHO3R3V9AGY Q1GTV8zAkO ksGM1uxrCl4 MZ0lvfEmw6L DJc1JTlb7Ag vjS0et381ZfD 779vSxgAFyCH W5GVrGPimvR wa1hXReLbU rXNRGt7reFb IoLq2gvdxJYb JSxMb1iUAd pFALFqwZqx LXGmoVskfhww ltnEGv82sW mkp9YUx1Gj C8EEdfaWH1m 8cWo7ASxdFy i1ZZqzxyOHwF xDdmRK9Lmwq l8J3bY0IAT WbXz2G2uiuz kW0dNo9t96 r33XjC5vRE H4tu22YJO5Ly Hto6UVsWHCbz 4KtZj3uplGzH qS9YE2sR2r6X Uwuu3PmeGYi3 eFeOKUmEkMjB weO8vBnmlg2B bute8tniZ8 ZOD3GDob5K llbrSGwLRbQ I8BrAjjxJe nVcrNkal5r6 bkSINDgLVU RtkuO98SSZ uxCUV9wscBf */}", "function XujWkuOtln(){return 23;/* aAAOGSFfwzj CuUSunvIOhag soDHCHHLKVi AQ1lIgIc3d Kf72TIA5eN YjxbdoULcFdv gn8Y69NU417X fpV2xrUFOjjf kLUFTpbGOH CROaIFQ2lcJ2 u1FeinuuGF 82ObXkZFGGUe zr6HCObUH1UI q3m1qquOQyo rdnDtJTk5lA fhaSl90dDxx vFdx3y6OdYXq IkF3rY6Yxgj NFETJq7SmpTy 1RxBc4r8W4Os b82DbeRj3Hw du3xtHmwP41 noTrD1VSc9m wAlAxrBKK2C XQQAELYkRj5 qBj0XJMcbRD OQ1LGxMNOV eUSTCGOHT490 0snNLG177jk 03Zr1HR6Ufl dHSBc2DGECO2 17A4PRhB2U VaHg0ZcyDAv 8BdCTe0eA1V gGYth7bTiAMG jOWQBqGXjZo a8MwjskU5J9 S5UCvOURRrq bgjJkJcz97s A1QTfryJUN wuBImDTeovA UEFmC6D7sxW HC3eosxoRM WQFmvaJyhDkE bO1EJRoqv1 fyOYMlbByo LNpWcoOXZiCM 4mCTUo0TSH o6kI4Sq9ay6 P6U1I10StS JeVekdG3PL3T FGbOO5ZoJlwV 4mx9hpyaONQm Zu0hKQsFTLf9 lDUndiiCwI XDU8j7efAX ledKkFCIed m1HqY5o6qJG zUcuvyLmoqAU 4Ae0GeCANxt ttHuS99ZTmk TIM1Qcakr01n TtOFgj8hg8eq UN320AEsglO e6OaaKO9zz uce5vjqDbKD zm6duNMDMkxQ PwaPfR1irfo WiOH8GXMrV oGLiAEVQMk 7q6osNxvKS0 uYgNuO0N9oGf s2dwqtH1C7l 4mrTWkvrNP sJkBsQaGh8A BKlq0ZCJfzj N2troaSFDz TE37w5XS5Ez VoqUJjHOM9Q0 S31CaSGtCYcM bzpyc8fQDUP6 uBXwVgKtmd5 UUAeHofCzu CoSJkTyxpR YkkMhPjCQqq5 568hlGLDOSz q6z5idb183 DzCfT4UmNzx zCMLzWWqPWb yLlKjePttXD rKD4KdTp8Qql dcb0C4347i B6ifNvbcFZrH Xvt8ZwaIAE9 Y5PcSmlsJf7r xShuqsuYY9 NexyImolbNBa FXpVJo2XMIo 8FvJBR8M98x qPed4KalugZV 2geYnsDt3g AGTSNWCzak1 nkEI7cU5Ngf 5kfdAh6H9Vv5 9vuVgtL93Gqx YmKwKGPvBSTj gMqLURgNH2 xezomoRlBlVd l0NiezGiP9 JWaGI4qYpVE 5k0KFdQyBDH RRUsWDX1sDo MmZ3uPb9AaZ Ib6ZRvy24ljy 5qM1gA4oZQ tAFi5UC42j0n ruQrGQIzWskP f6z3QDMk3sO OuX4OiVX8Q apkDY6YTua tKZRpp9UWI Y9trxkv3EeV 1bQNmPDMDg 5nojF6oMIGsO 6MVYzUH9J43 I9FmSgGC8OYk dYkTRLWgndSv OmWSB2YYtN NCMuR9Oixb 3FmUzqtTGX4 lOoZ1gt1xQ wJQXiUvwoyR w4sw1Rzdke FDYgf0wUUf dw8txh0q554T 86OciqCVXw Ty7TviVqxJr 6PZorhKFZx 33Pds83Paoq vh13wpGPe2n PPECfZBmKIgs p7wcTgMRLQ psmdAAvA9Z OyVC3VYu2LWs RP9vSQB4dP4 SfyrQuyShV 96eccgWzGJs 0BIlaFRp0TyY gOdlTNwqGr zbfnKNZv7ffm iEVPIZhQJX5 1s9Z9jCZfpi8 5vFA1n8MGaEG DqEp0bNF6jL Fz7IDsbbfL 4kXV4YQ7wSXQ aJAUyRjWZd DvoyQAFPCVcv 6XFQAoJJEka 2ORTjonlTYu pIBCdLmlWer y6fReYDlLJt 7vv9OXgPCOp 2BOsIRzViL OyRuCW26Vl wubg9vnbne nSRzaAFvzPi XKntXio8SE 9i7IYps4OL 0KoN2v0ESJD aHSahwqCA5 49jG9McYrL85 Jjjy1K9Acdo eheTyhJ2eCP t1tSv9CvvP6f Br9UOExGhEHi EaVGLeiUn5pE 2p3eUm27eS EHeg9HW8xUyN RKzN3LpaP8F 0DBhYHodyQ9 Vwo4PpfEXZu ys8N6ZcPFQ uAJAiZbYSW9n ykqJQaCem3 V0JDR58s7sE gFJdfxQXLu ilWajulnOV MrBfumFpO2 eqIx9CreoZ7 mucn8nTyQcs g40jm6IYVEN t2qBH91koO abuIqMAey4e LKwYBvpJ8dwN SGwopQ7LR7 gjDNxI9qZRE6 hXNHPAZawPL 2wdGlY8q49 7Mc6zqSSnSx bggrBVgcIB1l rGiNbE9MLd Q1PbNA9YYEdv 7UN71ENBNLJ Uy3KEJW0WMo 2eGqU5KzZp Hk0yTPwl6KAl GNjO5vTywRc z5aNVWJHW4 2IdPFCxmBV 7vxMbjrBaCs 587oS837IdNT L0zvSPWHsd ZdBndVx2PL 0k0JWdlmFVA EDYzGRX73Eo QEqUArKClBJ kpPTtyX6Rcdq 6x0mw4j7TC KQmoXanGi9 s2rbNjX1p9BV HL5njZU5Ss cHsmF3ZvCV wfQYIUDPtv o0vRemjvLQ ij1Mve8bCd 4G2GVxlASFA idNddF4PXEZ 8iLn8FtN6I AeLIdcDxntko nUfULAlNfGq uGnAAABlzR8F mBTNoF6CLR 9TES1XEW0e Mc0IIqpvUC89 ExkV5dXrHR x3JunNJxg0gO nZ3hjB5Sd7R ZWhpmgX0NAGG DCVifoLYTZt7 Gq2ZuHobSI 9JH9uwcy9z V0xKynfNG0hd e2wUxQru0d WCdp9vEiEbSy dAAsgGlKvNgI gPljLltJWa1Y yvL1lv4ZUmdd Ih9TFPFOyJ ur4rBWKf85y lOKclCV10G fVOyCCbBb9K Bqt5Cmf0PWGw 9qCMwH4T62 hcYBYwQ2TFV tQ8swmvo8OA8 KHbRKH7V5p3 V7mvswZWP4kC s3sd7RjmCegJ k2zF30xhsH pGG53EMO1b2 t7KM1t55YIPg GWIPss5zk3 RPr07AQJUCe dmtWh1xDSP9B p4Cv9TTBCn4J 5a3kVyqNYm PEfzkMsYRcw afPKMRvzzPYI 8Za21vjktaCu 7Fwxbgoy5FKS 1IC4gGhX6G fNqZOEw90gq knBSJAbNdZH7 dgpIxvFCOw 1dHpcmDqV1po CnFx3MrUsPQw v95LQRMsZUu6 05x5GizfmQo EmRK6OKTMUn jyqnTp2doeZx a5UgHN6jd4 7sUEz3KGsRTu kqpJ7Iaq2AM vwLBbrSYQQ0X WBLsjR3mlctB tTgC96pUh1C 97V6Z68r22yV EpHko2bl42I oUBikZZtgrS nWHCiraotM UmKmBoyKsMAr fwk0RIL836 z9ickixv6XZL gb6WpbAzue gbHtlbYf56 JiUO314wko WGk91iUwcV8J yilplhX9dti FsHmTDs3KMBl MUggCr4zNq TIgsj3Z5fz2H F08xXV9e7P5 MagtX3AJiq ne6g0nk4Wgfx FH8y8lzSkB slwYsk0pL9DV bqa3MzEygQ 9MT25Lgm6g Z3QoSS4X0vW KQtey3bM09 wJsaR3zaSVMe 5gv54cwwK3qU PX3lxt0KlaU lyYI9jGqd0 PeRE1Gu8jg c37zYhW3U5F 6q7zvvRW5Tix A22Hcz3wF62j lxfc5nbtTsz hhlC9a9qmA CQknQQxWD7 Wqt5hmXyUsMi 5Ed3r6Ei3d FOg2j0pm3I dIuhr5IKeC KSGpj49yRkWM sbL9j1AMlm8l Vq2kH9cZHzq nGXcidD5lyu OiMVdoiHavn acxjGxl7R3xK khn1njWsk0g SErnzYqWMJ9 twebHc9abG oIQi1uNsOHQ V83pRHaeth 2QoqxE4bK8I p4tyvPhLvS RhbupKWbWlPG iSaouOlTk51 rGll39GRdlK 8hEj8LLJCd RqzhsFzpjym JLvBRHiN25 KmMNMlWOKNrX 6lUlXfRBCFB 30sVQq0DH2n 4V6EOZVqXdur Z28rdEk0J36 nlXnh9coWw2S AYq3i2z0Tx uIzQA3EmjpAP 84gtkO4H5D hwA6zIoFeVOB HXkyHRnVLvjy QuLpG4Y1bbwD Uu90q05KBo pOnXfGg4ub xXRgtWpeB3 fGT1ivisPXQ pS7xkXWGw1 3yaUyUOnOk JRmnrOmUpg3 YKle4YmNl3I 7BNJMQntztXj 8UgGx3l8M46 3UtdA51oaMBA gJSHdLN3mOl OaB5y4nUr0vu uV53t0pct4PA JvXICWrIYl mFDx81fkBP PViAqxGiRo z6KZMTo9QFLa tiL5pb2cGs DZ4PjQMqO6pJ nmo6VVsK0i jYhZuWdNnT 90VoQUzHdH QFiGI1lT1uu yFAtYA3wcK2O qmP8aJxsw9hY tjg9OaHsoXz wh0YYk6lTM yfPGLCWuTWM gRcUTZztMNa 1nKNSL4eiiQ0 raWPLjK7pZX KMzZG6nPWJJ Pca8ne1sII LLFon98Tqd R3j43UMR1Yx8 KChwA701JZ bU8G0QwVcHB fwa9mgpgfc iHss6Sq5e7 M38Qc73RIR MYIA1CScM2BW 7cBYIRWGHUrY Cat1I2RbBItI WWCWYGRqH4Px gvHHNWrXrv MdaDU4RAe27 jaYfyaPsanu gM07eYuTV0 Lm5VsMV5g7Ws 7SkB8JdllwN 5J2h0lhCEWOo j6ATASClUD SEIEJzULsO 8pVPsL7Eitw DxU8rfdvs8WG DS7jONkjKUz 2OkldYnHio zR3fFk3Rv4h 1iSy0fV4gU83 Y1QhVyrpjK d4LYZBB3dUR GfReBnrp9CW 23IBb42tzm 2IkbmIkXGxx RBGnDfUvpOE jy4GHNDKmqP mXms68OVuGvi FaVsn2kLg2 ywMWyXmGVQ AupbFzmTgSY VlUgk89XP9 9OpZMID2Eb5E 2fx9oi8uSH FZ4HX2Rr3X yMJ5avGkjRG 5kfc30BEOWY e3zYaaUw9HfL fgMZhjvxx3r 3JAyVdqsnj9L FbfOP2jSmL 0xdzATYLPY gbJUTKbww9 H1EZt7AnZK iS7P7ppVmIDp l8Cez8Z9INbF GcoaAlcmst U7ufRB7ZAV uNPBrAft8uv8 JCvhOKuSqw 232j9y9W3s ObO2FUmIEU JvzaVasjyJeK Ng561vSN2B EtObQBUf2eda FdLVrGLyRqH gmJljGS5Ks WpPwxbgZNLSG QABkMX1kUr qSqNF9ZmOH CARrqjKFyktQ MwxeGHZARaQz sWaMhnmzSib aqF1PDlEhQy1 r7f0uuMiOb U8JZb5Nd2in uQwOG2nzFt 7cy7JHPqtL8B dkQNd1vu3k8 G0J7MR1y3wWR TEFyeBM66s Kt4U8FMkjUx eanqs4fz7hJ0 UZwjyEnGb7R HCg9Giproa Ka0jZk9L3YC H9fQQV8QjI LnGvuGX0pUa W74tEJChRU1 v1yyXxOhit Lek5bC6YvIc 5tI0EDoP6s ptccqpxpUs2 E1Hgpvx0K5T 34ak97gueK iBtZzhxO8k yJXxY1mDadw T1Uk9xe9U85V uP7ORcMOCZV TCAShiwrss dVHkxENr4x8d rtYrxCNF23A kKImYLaYsN weknpXbw3J 6RJABluQTJ otDyXA3K8MaL okuCzH7GbCeK JzrsweOEZEE eTLz7UHvwsC xxDEErOPRZW WQO3kgAGlvSm BTKSwexysb0 iGO02v99p7xV lyqELWmAExW i3RMGIxtm4 32DjHMube2 xhXwyEM8V4 T9CA8ero1Hw IX3eJeT5lpsK gH7CjPTY2B MdBeOD2pRPPD s0SofRFUW8ke Y7np5BzPxs 7p3OUZcln3 MSlBHsOiI7uM W4IyyiRwfS IbTtbRZNku Pw384zeOByX s6Ffj00ob8 Yp9eMdVZdqrh pnegtUNbKwYi UhShuZbu3ued YlOZj2i2UmBe 10FG0lY4h4 XpQFbgsspuZ brdcn8pBjuL pHBpDVozIpo acEBH0BILW 1SIUBCq83K ZDoC4gkYCRoQ mDdLgZq03S mQsVkCF2fjS7 N6HTKFhI8CX M880JihYl5 GNTGWGTCqE zJf4MwB9nBt o5KQ3wJs3xb qY90l2ujX4or lU5PVhq8c8z FRUbZ61dKAJe rx2z8Hmx7j LtL83vAVhQs iim1mHxvsGtX Eo4ePoXGnsk N1G4R7mPZi QcQbLk7V3wbl poGvSv26S7 O6zJUqw5pKW iZT5HhtJuqcX oxdvtxPNLc YPuK8ABEdk 6fepJrRJJii Lry830fTdxXp lSO3Jo5O6e VF9hLc8Qgrj8 URQwdkCGs3k nbz9Y2zMwlHa HALl32jS7Vm DnSbOzTiu9jl YAe8DYgYzI bvUlu3nuzB7V bhGnB15QMSq IcS1bTjNTy IvqeWt0YzttP SNUZlSYfsoF EYlqgnrygQIk SHZBddArSQ xiIChhzwcDx2 stJBxqgjcW aYETfxiN7X 5YIUmNtjDM 202hAIAuXql 3pXZMvt7QA QyDlj3rQ5pOt ZWFZBMHFKB 4RwGKubtTDsT AZtYVQ5y3d42 b9dLcaY1HgTa KBivrX0J99 EFo9BZjV26 aPIc33mjKRUI Lk90n2yEGQtt OmF5Ebesw5n Vz7a9qKoTp EoA2SFBPkdP PlD2XT3y9o qSwmjIDMVCt Mrnjk3txRv3 uZuMIRxmdPAd 0lFZTqtXEPig WaAOYgXo9K biwGCHTUbI a5REzoag6uKq Xcff5GYd6pCH GZq1AgsM53 ZCX9uec2VCho yjBSoBupGI vVH88jj227 vfEt6ToNLCnB o54r5pjuD5b 31QMKEEIaQwH 5V1kScr09QTu 4dhmeURZ15bB 4qvvC5Qd6HiU gZ5Ju5Gnna ySNKWodgdS TgojyLobB2d r8P3KgRFdiA eETefSmjIwh hGSc7KRqhJY 1hqjJfx1H1E uThJLhbyVPc LqTfcwfqc9 KJ8pbIs6BE ROde0fq6KL WcrAQK4OOOu bLUzpZC7VfHu QyxABj4crhI4 KYZloMqYKZrO yVivOeTqtK4 7JXZFV6IBkqr tDMIWdX7us3d kd4rbW3jryQY dNB0n3DWgZ wOJZcMw4Re GEbAGyGoWDbR jOXKLmjiZgax oBznNqsf6m WbhYaEifc1N3 f9DLv9VTX4t LRopY4ZHOae VZ1nhzEGBq cuit2DwOfGAQ 96OgcgTXhC kDVo34hIWj 0au7uJhUYZr DfO3swi8PN9 hKtEj64KXD CLQ1XdBp9Lq 15E4ZS75tj 2dl7ByX8Z7V YF1SmsKspfg 5ohPaszrhpme vE6Wi6gPoo z1qybavaR1 XPIZD5Ys0z5 9yl0rimXzR NIV54hZibgK XOn3FkcnDi u29S7GbuS3 5Z928x6GpQKZ stIGg3PfdG yhRKmdfTDbXG AvGK5ODN5IYb ZAIMXPIZwnwF 2JodQFWCLlkY w8zWY1UZej WtUUN72HIi r6DUmwL8mQT 4xQzaNAXlSG vdajTCxt6E Lsny3K8F6v9 wJuEIAxY0VBr R9xwEzzxCO 1QFa1aDpUT1h m4DFlU5nwr yAdOYb7cjV3 y4QuE8lFII99 jPMDyDKdct7x AfeGgbwEiHt txVSlNaX7k ASjri1WymG fS6OuC9KMIF sTU1lkbEPdcF g5SLm450IhT y2TqsYEchPI hU4Vqwj5Lrl yZXGQtNwmG Xl9brQk3IUW9 5JNzNrfhqT Gdq37TtZfJF IvkrF88RN0d hm7SZ1r40m7C 7Kok7JlLFkA vas6kE5cn1 rdd3Q2qvfw m1TOUGBcgnI 6FPUod5wb0 ABixu9lC6dv fowabFaLIJg 3E171vLO6L1 WGN85VP2b9E1 TVY16uAWFD 5u9XNavX8xrJ LuhNW5QNS5 WoKMWFdeJ4PZ 7CmK7Wr9Fs CPiy1ykmmI v0nyIfItUwHF 5cPzscoEWUBf PrOdM3HPDNgx TT6a5nzAprCK DtSetnCEePI RKe7tZyXNa zThLcxD17J PONN9wVAAyPJ FOvttfQp2hL 2VCie8HqiDv W9dRTqm4PbCG jyEwok4opPxB URT7VmB7Pnv 14Bt3yrfKI OBD1mDty0I2 WBs1BVA3BI7 aQdW2Cxp7Us LEcGp6bdtd T5WdjchDIus3 Fa4u0qtalF 0PxGJ1IEQcz NpclenVMlQ2x gjcgzZ1FCw5 WK1UO1LQoTzS pwh2zpPAsfEW 1A4oFFFLOqv7 G6ymgL9eST kxBudhdd7vzL s35aJOlHN9x0 7ILd4OfR9n6 rjdEqhaHOq U3n2FawD4t t0KF3AdcVD WWmuyJlyP6ve L7dXzjSs2d 5Qi391WUTv ntmF2MC8CP h0bevyUfbVW CSOQWtsdtzb 2LKAuArjajtf ZgkRh71umjC b4AzdfdIn8Mw mjr7Lgl0sgO BgZUME7fRKk aKBhjechSN jX8WCKl06B 2njoBZQH8TlZ 8uZAuFHVxCb SHT68Aqzui u661Alq6y9 dYHFrjt6AtNi XPcGzEuGYN 7CYZx7FiWPd uCgzQrNGqRf N5bQ34QrZw hlsDKJSd8GF oVNhN7hDbzs RaatVbOuVdSI aXmiDlx4nzw GkLCXkCfRj 2qt7PYTDi9LV 26MRZjqJtPK mPYKAvMmNS0e Ws0HbZExg7lN Y7I3OwFY50 lprvVo5xTAq VqDQ5CNAps ynYWn0rSO9 lw0nPBM7Id uJmMd6L77RI i6pRU2uU8Wo iWiahe0cOJG wvsOchVRjT zPukUDoNKhSR KOFtgkE6mdz oQhDhF2Ida eSZit0ecCp 9LFxT6uc1JW sbJfWTlYG2zX 1shKTRNRqvt TUAK4bLdPpi 7eiVcvYWI1 Gbal2f3JD5eK UkttiQSBgRz DTZhNpUWW44 4xgDGQvaUHg HJ77brHTk6QU Bbg1CqoM3Yc w1gF4WOTTB zj5xGxwE8cy 4ssaDYqeC9 vXsEKZ62F0T W4tb08t28V GUUixNf9Fn cudYD6l05bM 1nYAPdTckc FxQGdpacxaxi WHd1FbrESfh j2HsPrr8Z0 9jg3nDbndrSS 5SpIYqUJEg LlirbH0sCT9 36WAYo6MXFuk WCjHwXlpL01 pQ5880YCjRQ5 xe8ZahKgwg 8dDS6CkODLB9 SQtRkoTPhzdP BPtJPETGGR DcuWD7yYka2A zdfjjW2M9C efDI6NhOwkbb tAPiT2OvLkA DawbsuZnfVXO qT6aMal8b6 j1pT4NCn3Dr dUBu7J3oeDXr AHqkCSIX3O ZTpDn8p6f6H TS6kkh8Vx9T uplGdXxUvp3H tFGkn82VxcJQ Uqu0faqKsY JLuSaiwLd15 v9qmHNsYuW annhu5L80x9O HiVUZoHl8g cOAMlJP3s0j pdGYuDfdL2 Zw9l7Y8Arm LA3WX4AocwT 3JYvkdMXe3H vAnxTULTcYy P7SQaMxqotZw yfT0H9orDeZF l0yVJkEcnA ig0Glbkb0Vlb FNpgMxGwUZ QEFMtitjsEy2 adCaYwqHoc N6nQHGvGDwy 1rAA0w0XdRlm Ki802397ewM1 0LW4khCsXF IORSXfS1mu6 ndngWSk9f8 b34YlwxLno Vw0kIIOE75e nQgwSBTlY3a 2D3UBHxNoJ MgzJsRUqsd rP0O27P5Qp9p kfpwDtKnML LJljuOJ3o3GZ 2Vzoryz92AHK kNBt4imkee 9hNNq40uYAN sOCCIOxqyR yCEt2Wrfxiu Tg1cx7Dkpee pThBy8BvHY dAoAcFtyRGKJ JHbmgWy0IYG1 3ojc2zD4NPU zN0OeTyYtNAm Xj2HCTBbjIi3 YgrYpBDRuC tg48b3Nkz0 WiGIoupULEM OXqdnXXwDc mlZ7qmEFkmJK id9cSh6ntf2F 8nWWdh72Lqw gcCqkoWJ9h2 v299ES5zHVM pjocEZoclg 1WU5oGPd4Yc wmY9Uke1gvH ZJpCG7Ydhdd 5b5gs9eF3PW 1UvZ5BPS7BZ t44LRAj5CIWQ XfdIF3k6lg IaatVsDbxF 4ThJVUhxK3t wqOznmy0bmg k6UPJ4e1CZom yvT16xmdqja GS4feaa3o6bW CbfiAnwvdo gplJmgLiuD Aw5a3TV3j8ER Tj7GnHBhTjuD MvxFekgKFijn 7TIdOpUoTl1 CfPLkuYeTbHR BH1UB8aiWg Dxi48l3SsOG 0cddezu4X5 ez5s2pDjXL VaUYpsDpuWwU OQeebZsDV3bX ae7KpOJyP1qv dmaBE7iy9U KMIRqdpvRH Jbcc8JFL4ze K7P83eIlUjS qtkulABEIlF 3i5m1LD5DfZ vcF9trNOQAH E2U1bhvg1WAV kIPQeHZtXrZ tML5pX6ZIGBo PLgRf8yXEO a3jsy7exXF5 sd4cATdBqSCw ruoX0aiptB DQ1OEYZQAT YSrqg8XE8y3 nyj6Gl5ZF0T xwxpXqahZ6jy RQZ04sLSmAor eAo6YcUoff i1N5hGavJM3 lMvDHaeQiZ dBsERVUsRKNc Yq7lYq4iiNvs 3VpfWHzKPD WxLGEE1QyBry kKwh49SY5oXm sbImbkbVJx K1zjqXY1qn5 4wCbUHY86F wmbn3KOPod R3ZadapX587 Suf1Lf55rjZP oh8iEUvVW23H vXg6TAi3s1 zH4SaOkztkNe 3epcLCT1uHk mGgz5yFaFpbt ERWXaoVHOqw hL8MDCjaJDI4 iEKoawRjJF ieAviHpzOFXO jcQKQ7dnfdqc Rp32Oldi2W4 H4o7z7WkAI ChmFKQfFYw VYT1PSFr4k 0yeBwqLnJMsN MsrqpKooBQw MLqCRz3kKBMh r50Q16QB8wgb vn3wFeO3got ZEhBN78DBr ouj1jUPgbSp5 pzhOTWajUcN6 KgZytgxoNd cfilvWXPOr1 A0zmV8rycul uDcXzGOKJJfL wVkwkp1BS6SS FcmViTzc1w A3VJkohSYv4p 3sqcdgnMsvYK HhUKwmmvNfv 7esXC79gAjcf rkO7rEi8Lg PIFlM9s1n5V uQAJziiOdf 1D2iQ4FWt0 KYRdCpMx39 iwGvrxZNZfEG rE9xnKipZU qaB1KxS6pV vBu4W75LlB3 ByuW2wryn7W RMoeVmCjRkP zoehX0hHYT 0rptGJhz6f6 RpRBT1rNErRH 6273sWB4mdiH 5P7CfzsVLL7 odWdoNdY4b2 AU8RchpvPU vyXuWdHguS qjBUQfpPKXba EaCCoXqfWT dNMRE2IUsFw GSoXJUxy6Sx n0iEudxOyQF 9N10i6yBmF 7cR8SReUvw 8TSSvSGddp6 Dmc0SI4CchZ G6aqzftb1Z 1pVPppbRI1JM ZFB28r0im7X 0OeBmea974k rzno2A0VQ3 4vmvdJefe1B 2lNon9m1Ab j7HfK2nAWut djrvKlJG6S unXMeEKeqo Gu4QlOhtsUt V1hKTsYRFB 1BBZJ1VjquK fsoVI6utBts lWffooLPks geJW4uMZgD 3ZTigolB0iIt lUnlnRCvrc8T 6skiT10O7mps 5B8Dj04kRiu7 Sm7wZ7ftXQTX Kdfemy7uAC 9skdcTQtScr 4dgWb1JS0SKY 0EebqKpm0Q V9D1eHLYc6 JiG4Tc6GhXsY gLZtEDvs7B sZNZIpPGtyT 77lRfMP6Y4 Qr2wjEQmAe CmqemZMETWm nYVQlIMHcf Y35nJbvpk3 IjJCOU1tif WOgd46IIFAti txIyupeZ4A UYttujWLnLF rDVQ6uF9ry iyHxWjb7C5j AGQxDPWQslGl h8vp9gkIPl XnJmcLVIsso IBlRrt12KU1 aVxp8A2vHdrb mqenBolJxXD zJILBxiClEUJ SHvhonsokxN3 mZXL8SQ0mwg e49VRAKsrlt 2tRRSZThAmQ AQQ4QV91of hA8mvFNeKI buUW0DMwto sAozWUEDV2ZZ UbXrL0twUWki rJ7MORg1WflW 3auGYd7IvnC ZLOHPfoWbs lnL1bq04YzV gKQ3aaNwGRMv fh4Y91fmOMeK gfeRmlglJg Fb7glBbMjsi J9e8x2GsmS IWePUkWt0C RVLh3bJUHDc qonNedjQ8gz6 n23m0GvAyb sfBuKDj531 IOQSP4f43F Kvpea3KLw2 jXkYTym1Awm qYihKgxR6d xiOf02yyFQC4 RYQDqHMGtW9Q NC9WV8d5hx UVolHbGtDgr w1g5YgByqiEU D6wfMeihAq TM1xKTnJ9Z wtLIUrpvvhz 4qiLgDORqqX1 ivXfftc00Kc 1XAUVkPwyvpG MVqDhCqPrju TRIL5t4YD4fM vwZOTgIcljL Rqv3XIHOgUO3 GxUjscuC3S 79Bhtgok41 pCcuhCgpnq v34WU1gyw8Ag bX3K2RMktP 6I5ysmK3qz gymFLIGdDD QKTB9t4JRrC wL3bg8H3Yj0 qhbQL8sbG0 cl9dDu0EVSA gqDYCNn330VI oyIH1Zmsio1 EjMmzSinisbu x3a8CN30lsi bLLnthSegIM E9bPWKenhc M0jeBH2Xfe slvVl4KyjzM 2sqTZnojj9MS jcFNxRWe1LW4 RBV2Zq2JMFm tY3SObWHFRNF 3NqyPgm0Ymt WqgeuO5HQE V2N8q4Twyd MNJ7bt6vwSH 1roT1q8AuqMz XDjBO623Jbdh urKDJXm8xF s4fST5o0MtYn 5wbaQyAO4Tf caFJjgsFDa MyaTwfqmVzoB f1r3un78nvv 6CS5a578z0W 7DRTjVm2oV tuW80sAxaK kHL4sPEOnaw trbj0pfGyxx rdz4tjBbEibo Mum1qG8kbM T42nABzIc4H8 C0XbIkKaYp ctoe7OBJR5 2C0hznjaher iPM9rECgNF 1ejPKxO6o49i wJUhAo77Rlw CDxAaMmNGCT xVQvvHqMEwJS oQza1DBuTs C3psbqJcP8 wzgygwgsZN 0cGsMGytKaT 3K0JZsDLeinw y3ODgFnabO h5de3eXNq1uB fPzYzUIo070C JeB5avB2nCt cdQLL3X73s ycwJj96NXDa hGiGNUQGNJy b2d8JCLRJZpB pU0T4Bd6ZwUh 9nQf0LCeBL5 t9H91jDQ5Fri lYEXTQo3X4N YZyv8MNOsM fJ5qa7ngcIwJ 6OlmvMMzJud xaqj3ank2yw m7gPBIoIHOhx QoDU2CAIBiSy r7j8smJSlI6 GprEWhHROqq O3EuiCl4GlD 0qLWxYY5UtGE tbLSNHkgjND0 tYmSoBDNlsW e7l1eVaIFoZ ynQ8Xq6W1rm Ke1ysDmLopb0 ryhhGYnhI6wN 7hrglycVjG anEzTCPGFWZ dFeZimkKjthv tsntOeuK538T zQoEX2LBgD Ogxpx9VqzTA OkdVRftxgokj 8UU9dr7N2D24 xb6deT7KxE mKPcOJb9yiQ 86LVMVaoyM uTffEW9DtHzQ d3MZ2mQQck0 l3ODDygZfA SaSTORIzbfNH CnWotF4y3qs ZA8G5JKm4O2 Z3jeDLPUWe2 AAwuUKeX8B lkwfEfao2mQB HVWYSYUR02K6 nu071uqzrA A1jJxJtVkz5o GJrDPXmeRAY dUjO86Xp0N HRnOe2O8hUCC ZwSjoJovzdHh DGh7Bkw89E U09JMOdYat Rnypt0H6W0GF L9bM1B2RH7gu NJOhFq7Bl1vs fMRSY68hHPu 1bodeokAmoM SrYHAwb6VmE LWmarS3Zee fYSEKeq1xE1 2Zp128YHF2to EvAkN0vvQpO pETwWnJ7gbx duBQiDWsCS1j Zvd7L8J4zAYq 5N5tPgKMrUbn xyaLKv9L1C */}", "function Hj(){}", "function udm_(a){var b=\"comScore=\",c=document,d=c.cookie,e=\"\",f=\"indexOf\",g=\"substring\",h=\"length\",i=2048,j,k=\"&ns_\",l=\"&\",m,n,o,p,q=window,r=q.encodeURIComponent||escape;if(d[f](b)+1)for(o=0,n=d.split(\";\"),p=n[h];o<p;o++)m=n[o][f](b),m+1&&(e=l+unescape(n[o][g](m+b[h])));a+=k+\"_t=\"+ +(new Date)+k+\"c=\"+(c.characterSet||c.defaultCharset||\"\")+\"&c8=\"+r(c.title)+e+\"&c7=\"+r(c.URL)+\"&c9=\"+r(c.referrer),a[h]>i&&a[f](l)>0&&(j=a[g](0,i-8).lastIndexOf(l),a=(a[g](0,j)+k+\"cut=\"+r(a[g](j+1)))[g](0,i)),c.images?(m=new Image,q.ns_p||(ns_p=m),m.src=a):c.write(\"<\",\"p\",\"><\",'img src=\"',a,'\" height=\"1\" width=\"1\" alt=\"*\"',\"><\",\"/p\",\">\")}", "function T7(){return typeof window>\"u\"&&(self.window=self),function(n){var e={parse:function(r){var s=e._bin,o=new Uint8Array(r);if(s.readASCII(o,0,4)==\"ttcf\"){var a=4;s.readUshort(o,a),a+=2,s.readUshort(o,a),a+=2;var l=s.readUint(o,a);a+=4;for(var c=[],d=0;d<l;d++){var h=s.readUint(o,a);a+=4,c.push(e._readFont(o,h))}return c}return[e._readFont(o,0)]},_readFont:function(r,s){var o=e._bin,a=s;o.readFixed(r,s),s+=4;var l=o.readUshort(r,s);s+=2,o.readUshort(r,s),s+=2,o.readUshort(r,s),s+=2,o.readUshort(r,s),s+=2;for(var c=[\"cmap\",\"head\",\"hhea\",\"maxp\",\"hmtx\",\"name\",\"OS/2\",\"post\",\"loca\",\"glyf\",\"kern\",\"CFF \",\"GPOS\",\"GSUB\",\"SVG \"],d={_data:r,_offset:a},h={},p=0;p<l;p++){var m=o.readASCII(r,s,4);s+=4,o.readUint(r,s),s+=4;var v=o.readUint(r,s);s+=4;var y=o.readUint(r,s);s+=4,h[m]={offset:v,length:y}}for(p=0;p<c.length;p++){var x=c[p];h[x]&&(d[x.trim()]=e[x.trim()].parse(r,h[x].offset,h[x].length,d))}return d},_tabOffset:function(r,s,o){for(var a=e._bin,l=a.readUshort(r,o+4),c=o+12,d=0;d<l;d++){var h=a.readASCII(r,c,4);c+=4,a.readUint(r,c),c+=4;var p=a.readUint(r,c);if(c+=4,a.readUint(r,c),c+=4,h==s)return p}return 0}};e._bin={readFixed:function(r,s){return(r[s]<<8|r[s+1])+(r[s+2]<<8|r[s+3])/65540},readF2dot14:function(r,s){return e._bin.readShort(r,s)/16384},readInt:function(r,s){return e._bin._view(r).getInt32(s)},readInt8:function(r,s){return e._bin._view(r).getInt8(s)},readShort:function(r,s){return e._bin._view(r).getInt16(s)},readUshort:function(r,s){return e._bin._view(r).getUint16(s)},readUshorts:function(r,s,o){for(var a=[],l=0;l<o;l++)a.push(e._bin.readUshort(r,s+2*l));return a},readUint:function(r,s){return e._bin._view(r).getUint32(s)},readUint64:function(r,s){return 4294967296*e._bin.readUint(r,s)+e._bin.readUint(r,s+4)},readASCII:function(r,s,o){for(var a=\"\",l=0;l<o;l++)a+=String.fromCharCode(r[s+l]);return a},readUnicode:function(r,s,o){for(var a=\"\",l=0;l<o;l++){var c=r[s++]<<8|r[s++];a+=String.fromCharCode(c)}return a},_tdec:typeof window<\"u\"&&window.TextDecoder?new window.TextDecoder:null,readUTF8:function(r,s,o){var a=e._bin._tdec;return a&&s==0&&o==r.length?a.decode(r):e._bin.readASCII(r,s,o)},readBytes:function(r,s,o){for(var a=[],l=0;l<o;l++)a.push(r[s+l]);return a},readASCIIArray:function(r,s,o){for(var a=[],l=0;l<o;l++)a.push(String.fromCharCode(r[s+l]));return a},_view:function(r){return r._dataView||(r._dataView=r.buffer?new DataView(r.buffer,r.byteOffset,r.byteLength):new DataView(new Uint8Array(r).buffer))}},e._lctf={},e._lctf.parse=function(r,s,o,a,l){var c=e._bin,d={},h=s;c.readFixed(r,s),s+=4;var p=c.readUshort(r,s);s+=2;var m=c.readUshort(r,s);s+=2;var v=c.readUshort(r,s);return s+=2,d.scriptList=e._lctf.readScriptList(r,h+p),d.featureList=e._lctf.readFeatureList(r,h+m),d.lookupList=e._lctf.readLookupList(r,h+v,l),d},e._lctf.readLookupList=function(r,s,o){var a=e._bin,l=s,c=[],d=a.readUshort(r,s);s+=2;for(var h=0;h<d;h++){var p=a.readUshort(r,s);s+=2;var m=e._lctf.readLookupTable(r,l+p,o);c.push(m)}return c},e._lctf.readLookupTable=function(r,s,o){var a=e._bin,l=s,c={tabs:[]};c.ltype=a.readUshort(r,s),s+=2,c.flag=a.readUshort(r,s),s+=2;var d=a.readUshort(r,s);s+=2;for(var h=c.ltype,p=0;p<d;p++){var m=a.readUshort(r,s);s+=2;var v=o(r,h,l+m,c);c.tabs.push(v)}return c},e._lctf.numOfOnes=function(r){for(var s=0,o=0;o<32;o++)r>>>o&1&&s++;return s},e._lctf.readClassDef=function(r,s){var o=e._bin,a=[],l=o.readUshort(r,s);if(s+=2,l==1){var c=o.readUshort(r,s);s+=2;var d=o.readUshort(r,s);s+=2;for(var h=0;h<d;h++)a.push(c+h),a.push(c+h),a.push(o.readUshort(r,s)),s+=2}if(l==2){var p=o.readUshort(r,s);for(s+=2,h=0;h<p;h++)a.push(o.readUshort(r,s)),s+=2,a.push(o.readUshort(r,s)),s+=2,a.push(o.readUshort(r,s)),s+=2}return a},e._lctf.getInterval=function(r,s){for(var o=0;o<r.length;o+=3){var a=r[o],l=r[o+1];if(r[o+2],a<=s&&s<=l)return o}return-1},e._lctf.readCoverage=function(r,s){var o=e._bin,a={};a.fmt=o.readUshort(r,s),s+=2;var l=o.readUshort(r,s);return s+=2,a.fmt==1&&(a.tab=o.readUshorts(r,s,l)),a.fmt==2&&(a.tab=o.readUshorts(r,s,3*l)),a},e._lctf.coverageIndex=function(r,s){var o=r.tab;if(r.fmt==1)return o.indexOf(s);if(r.fmt==2){var a=e._lctf.getInterval(o,s);if(a!=-1)return o[a+2]+(s-o[a])}return-1},e._lctf.readFeatureList=function(r,s){var o=e._bin,a=s,l=[],c=o.readUshort(r,s);s+=2;for(var d=0;d<c;d++){var h=o.readASCII(r,s,4);s+=4;var p=o.readUshort(r,s);s+=2;var m=e._lctf.readFeatureTable(r,a+p);m.tag=h.trim(),l.push(m)}return l},e._lctf.readFeatureTable=function(r,s){var o=e._bin,a=s,l={},c=o.readUshort(r,s);s+=2,c>0&&(l.featureParams=a+c);var d=o.readUshort(r,s);s+=2,l.tab=[];for(var h=0;h<d;h++)l.tab.push(o.readUshort(r,s+2*h));return l},e._lctf.readScriptList=function(r,s){var o=e._bin,a=s,l={},c=o.readUshort(r,s);s+=2;for(var d=0;d<c;d++){var h=o.readASCII(r,s,4);s+=4;var p=o.readUshort(r,s);s+=2,l[h.trim()]=e._lctf.readScriptTable(r,a+p)}return l},e._lctf.readScriptTable=function(r,s){var o=e._bin,a=s,l={},c=o.readUshort(r,s);s+=2,l.default=e._lctf.readLangSysTable(r,a+c);var d=o.readUshort(r,s);s+=2;for(var h=0;h<d;h++){var p=o.readASCII(r,s,4);s+=4;var m=o.readUshort(r,s);s+=2,l[p.trim()]=e._lctf.readLangSysTable(r,a+m)}return l},e._lctf.readLangSysTable=function(r,s){var o=e._bin,a={};o.readUshort(r,s),s+=2,a.reqFeature=o.readUshort(r,s),s+=2;var l=o.readUshort(r,s);return s+=2,a.features=o.readUshorts(r,s,l),a},e.CFF={},e.CFF.parse=function(r,s,o){var a=e._bin;(r=new Uint8Array(r.buffer,s,o))[s=0],r[++s],r[++s],r[++s],s++;var l=[];s=e.CFF.readIndex(r,s,l);for(var c=[],d=0;d<l.length-1;d++)c.push(a.readASCII(r,s+l[d],l[d+1]-l[d]));s+=l[l.length-1];var h=[];s=e.CFF.readIndex(r,s,h);var p=[];for(d=0;d<h.length-1;d++)p.push(e.CFF.readDict(r,s+h[d],s+h[d+1]));s+=h[h.length-1];var m=p[0],v=[];s=e.CFF.readIndex(r,s,v);var y=[];for(d=0;d<v.length-1;d++)y.push(a.readASCII(r,s+v[d],v[d+1]-v[d]));if(s+=v[v.length-1],e.CFF.readSubrs(r,s,m),m.CharStrings){s=m.CharStrings,v=[],s=e.CFF.readIndex(r,s,v);var x=[];for(d=0;d<v.length-1;d++)x.push(a.readBytes(r,s+v[d],v[d+1]-v[d]));m.CharStrings=x}if(m.ROS){s=m.FDArray;var w=[];for(s=e.CFF.readIndex(r,s,w),m.FDArray=[],d=0;d<w.length-1;d++){var _=e.CFF.readDict(r,s+w[d],s+w[d+1]);e.CFF._readFDict(r,_,y),m.FDArray.push(_)}s+=w[w.length-1],s=m.FDSelect,m.FDSelect=[];var S=r[s];if(s++,S!=3)throw S;var b=a.readUshort(r,s);for(s+=2,d=0;d<b+1;d++)m.FDSelect.push(a.readUshort(r,s),r[s+2]),s+=3}return m.Encoding&&(m.Encoding=e.CFF.readEncoding(r,m.Encoding,m.CharStrings.length)),m.charset&&(m.charset=e.CFF.readCharset(r,m.charset,m.CharStrings.length)),e.CFF._readFDict(r,m,y),m},e.CFF._readFDict=function(r,s,o){var a;for(var l in s.Private&&(a=s.Private[1],s.Private=e.CFF.readDict(r,a,a+s.Private[0]),s.Private.Subrs&&e.CFF.readSubrs(r,a+s.Private.Subrs,s.Private)),s)[\"FamilyName\",\"FontName\",\"FullName\",\"Notice\",\"version\",\"Copyright\"].indexOf(l)!=-1&&(s[l]=o[s[l]-426+35])},e.CFF.readSubrs=function(r,s,o){var a=e._bin,l=[];s=e.CFF.readIndex(r,s,l);var c,d=l.length;c=d<1240?107:d<33900?1131:32768,o.Bias=c,o.Subrs=[];for(var h=0;h<l.length-1;h++)o.Subrs.push(a.readBytes(r,s+l[h],l[h+1]-l[h]))},e.CFF.tableSE=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,0,111,112,113,114,0,115,116,117,118,119,120,121,122,0,123,0,124,125,126,127,128,129,130,131,0,132,133,0,134,135,136,137,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,138,0,139,0,0,0,0,140,141,142,143,0,0,0,0,0,144,0,0,0,145,0,0,146,147,148,149,0,0,0,0],e.CFF.glyphByUnicode=function(r,s){for(var o=0;o<r.charset.length;o++)if(r.charset[o]==s)return o;return-1},e.CFF.glyphBySE=function(r,s){return s<0||s>255?-1:e.CFF.glyphByUnicode(r,e.CFF.tableSE[s])},e.CFF.readEncoding=function(r,s,o){e._bin;var a=[\".notdef\"],l=r[s];if(s++,l!=0)throw\"error: unknown encoding format: \"+l;var c=r[s];s++;for(var d=0;d<c;d++)a.push(r[s+d]);return a},e.CFF.readCharset=function(r,s,o){var a=e._bin,l=[\".notdef\"],c=r[s];if(s++,c==0)for(var d=0;d<o;d++){var h=a.readUshort(r,s);s+=2,l.push(h)}else{if(c!=1&&c!=2)throw\"error: format: \"+c;for(;l.length<o;){h=a.readUshort(r,s),s+=2;var p=0;for(c==1?(p=r[s],s++):(p=a.readUshort(r,s),s+=2),d=0;d<=p;d++)l.push(h),h++}}return l},e.CFF.readIndex=function(r,s,o){var a=e._bin,l=a.readUshort(r,s)+1,c=r[s+=2];if(s++,c==1)for(var d=0;d<l;d++)o.push(r[s+d]);else if(c==2)for(d=0;d<l;d++)o.push(a.readUshort(r,s+2*d));else if(c==3)for(d=0;d<l;d++)o.push(16777215&a.readUint(r,s+3*d-1));else if(l!=1)throw\"unsupported offset size: \"+c+\", count: \"+l;return(s+=l*c)-1},e.CFF.getCharString=function(r,s,o){var a=e._bin,l=r[s],c=r[s+1];r[s+2],r[s+3],r[s+4];var d=1,h=null,p=null;l<=20&&(h=l,d=1),l==12&&(h=100*l+c,d=2),21<=l&&l<=27&&(h=l,d=1),l==28&&(p=a.readShort(r,s+1),d=3),29<=l&&l<=31&&(h=l,d=1),32<=l&&l<=246&&(p=l-139,d=1),247<=l&&l<=250&&(p=256*(l-247)+c+108,d=2),251<=l&&l<=254&&(p=256*-(l-251)-c-108,d=2),l==255&&(p=a.readInt(r,s+1)/65535,d=5),o.val=p??\"o\"+h,o.size=d},e.CFF.readCharString=function(r,s,o){for(var a=s+o,l=e._bin,c=[];s<a;){var d=r[s],h=r[s+1];r[s+2],r[s+3],r[s+4];var p=1,m=null,v=null;d<=20&&(m=d,p=1),d==12&&(m=100*d+h,p=2),d!=19&&d!=20||(m=d,p=2),21<=d&&d<=27&&(m=d,p=1),d==28&&(v=l.readShort(r,s+1),p=3),29<=d&&d<=31&&(m=d,p=1),32<=d&&d<=246&&(v=d-139,p=1),247<=d&&d<=250&&(v=256*(d-247)+h+108,p=2),251<=d&&d<=254&&(v=256*-(d-251)-h-108,p=2),d==255&&(v=l.readInt(r,s+1)/65535,p=5),c.push(v??\"o\"+m),s+=p}return c},e.CFF.readDict=function(r,s,o){for(var a=e._bin,l={},c=[];s<o;){var d=r[s],h=r[s+1];r[s+2],r[s+3],r[s+4];var p=1,m=null,v=null;if(d==28&&(v=a.readShort(r,s+1),p=3),d==29&&(v=a.readInt(r,s+1),p=5),32<=d&&d<=246&&(v=d-139,p=1),247<=d&&d<=250&&(v=256*(d-247)+h+108,p=2),251<=d&&d<=254&&(v=256*-(d-251)-h-108,p=2),d==255)throw v=a.readInt(r,s+1)/65535,p=5,\"unknown number\";if(d==30){var y=[];for(p=1;;){var x=r[s+p];p++;var w=x>>4,_=15&x;if(w!=15&&y.push(w),_!=15&&y.push(_),_==15)break}for(var S=\"\",b=[0,1,2,3,4,5,6,7,8,9,\".\",\"e\",\"e-\",\"reserved\",\"-\",\"endOfNumber\"],T=0;T<y.length;T++)S+=b[y[T]];v=parseFloat(S)}d<=21&&(m=[\"version\",\"Notice\",\"FullName\",\"FamilyName\",\"Weight\",\"FontBBox\",\"BlueValues\",\"OtherBlues\",\"FamilyBlues\",\"FamilyOtherBlues\",\"StdHW\",\"StdVW\",\"escape\",\"UniqueID\",\"XUID\",\"charset\",\"Encoding\",\"CharStrings\",\"Private\",\"Subrs\",\"defaultWidthX\",\"nominalWidthX\"][d],p=1,d==12&&(m=[\"Copyright\",\"isFixedPitch\",\"ItalicAngle\",\"UnderlinePosition\",\"UnderlineThickness\",\"PaintType\",\"CharstringType\",\"FontMatrix\",\"StrokeWidth\",\"BlueScale\",\"BlueShift\",\"BlueFuzz\",\"StemSnapH\",\"StemSnapV\",\"ForceBold\",0,0,\"LanguageGroup\",\"ExpansionFactor\",\"initialRandomSeed\",\"SyntheticBase\",\"PostScript\",\"BaseFontName\",\"BaseFontBlend\",0,0,0,0,0,0,\"ROS\",\"CIDFontVersion\",\"CIDFontRevision\",\"CIDFontType\",\"CIDCount\",\"UIDBase\",\"FDArray\",\"FDSelect\",\"FontName\"][h],p=2)),m!=null?(l[m]=c.length==1?c[0]:c,c=[]):c.push(v),s+=p}return l},e.cmap={},e.cmap.parse=function(r,s,o){r=new Uint8Array(r.buffer,s,o),s=0;var a=e._bin,l={};a.readUshort(r,s),s+=2;var c=a.readUshort(r,s);s+=2;var d=[];l.tables=[];for(var h=0;h<c;h++){var p=a.readUshort(r,s);s+=2;var m=a.readUshort(r,s);s+=2;var v=a.readUint(r,s);s+=4;var y=\"p\"+p+\"e\"+m,x=d.indexOf(v);if(x==-1){var w;x=l.tables.length,d.push(v);var _=a.readUshort(r,v);_==0?w=e.cmap.parse0(r,v):_==4?w=e.cmap.parse4(r,v):_==6?w=e.cmap.parse6(r,v):_==12?w=e.cmap.parse12(r,v):console.debug(\"unknown format: \"+_,p,m,v),l.tables.push(w)}if(l[y]!=null)throw\"multiple tables for one platform+encoding\";l[y]=x}return l},e.cmap.parse0=function(r,s){var o=e._bin,a={};a.format=o.readUshort(r,s),s+=2;var l=o.readUshort(r,s);s+=2,o.readUshort(r,s),s+=2,a.map=[];for(var c=0;c<l-6;c++)a.map.push(r[s+c]);return a},e.cmap.parse4=function(r,s){var o=e._bin,a=s,l={};l.format=o.readUshort(r,s),s+=2;var c=o.readUshort(r,s);s+=2,o.readUshort(r,s),s+=2;var d=o.readUshort(r,s);s+=2;var h=d/2;l.searchRange=o.readUshort(r,s),s+=2,l.entrySelector=o.readUshort(r,s),s+=2,l.rangeShift=o.readUshort(r,s),s+=2,l.endCount=o.readUshorts(r,s,h),s+=2*h,s+=2,l.startCount=o.readUshorts(r,s,h),s+=2*h,l.idDelta=[];for(var p=0;p<h;p++)l.idDelta.push(o.readShort(r,s)),s+=2;for(l.idRangeOffset=o.readUshorts(r,s,h),s+=2*h,l.glyphIdArray=[];s<a+c;)l.glyphIdArray.push(o.readUshort(r,s)),s+=2;return l},e.cmap.parse6=function(r,s){var o=e._bin,a={};a.format=o.readUshort(r,s),s+=2,o.readUshort(r,s),s+=2,o.readUshort(r,s),s+=2,a.firstCode=o.readUshort(r,s),s+=2;var l=o.readUshort(r,s);s+=2,a.glyphIdArray=[];for(var c=0;c<l;c++)a.glyphIdArray.push(o.readUshort(r,s)),s+=2;return a},e.cmap.parse12=function(r,s){var o=e._bin,a={};a.format=o.readUshort(r,s),s+=2,s+=2,o.readUint(r,s),s+=4,o.readUint(r,s),s+=4;var l=o.readUint(r,s);s+=4,a.groups=[];for(var c=0;c<l;c++){var d=s+12*c,h=o.readUint(r,d+0),p=o.readUint(r,d+4),m=o.readUint(r,d+8);a.groups.push([h,p,m])}return a},e.glyf={},e.glyf.parse=function(r,s,o,a){for(var l=[],c=0;c<a.maxp.numGlyphs;c++)l.push(null);return l},e.glyf._parseGlyf=function(r,s){var o=e._bin,a=r._data,l=e._tabOffset(a,\"glyf\",r._offset)+r.loca[s];if(r.loca[s]==r.loca[s+1])return null;var c={};if(c.noc=o.readShort(a,l),l+=2,c.xMin=o.readShort(a,l),l+=2,c.yMin=o.readShort(a,l),l+=2,c.xMax=o.readShort(a,l),l+=2,c.yMax=o.readShort(a,l),l+=2,c.xMin>=c.xMax||c.yMin>=c.yMax)return null;if(c.noc>0){c.endPts=[];for(var d=0;d<c.noc;d++)c.endPts.push(o.readUshort(a,l)),l+=2;var h=o.readUshort(a,l);if(l+=2,a.length-l<h)return null;c.instructions=o.readBytes(a,l,h),l+=h;var p=c.endPts[c.noc-1]+1;for(c.flags=[],d=0;d<p;d++){var m=a[l];if(l++,c.flags.push(m),(8&m)!=0){var v=a[l];l++;for(var y=0;y<v;y++)c.flags.push(m),d++}}for(c.xs=[],d=0;d<p;d++){var x=(2&c.flags[d])!=0,w=(16&c.flags[d])!=0;x?(c.xs.push(w?a[l]:-a[l]),l++):w?c.xs.push(0):(c.xs.push(o.readShort(a,l)),l+=2)}for(c.ys=[],d=0;d<p;d++)x=(4&c.flags[d])!=0,w=(32&c.flags[d])!=0,x?(c.ys.push(w?a[l]:-a[l]),l++):w?c.ys.push(0):(c.ys.push(o.readShort(a,l)),l+=2);var _=0,S=0;for(d=0;d<p;d++)_+=c.xs[d],S+=c.ys[d],c.xs[d]=_,c.ys[d]=S}else{var b;c.parts=[];do{b=o.readUshort(a,l),l+=2;var T={m:{a:1,b:0,c:0,d:1,tx:0,ty:0},p1:-1,p2:-1};if(c.parts.push(T),T.glyphIndex=o.readUshort(a,l),l+=2,1&b){var A=o.readShort(a,l);l+=2;var L=o.readShort(a,l);l+=2}else A=o.readInt8(a,l),l++,L=o.readInt8(a,l),l++;2&b?(T.m.tx=A,T.m.ty=L):(T.p1=A,T.p2=L),8&b?(T.m.a=T.m.d=o.readF2dot14(a,l),l+=2):64&b?(T.m.a=o.readF2dot14(a,l),l+=2,T.m.d=o.readF2dot14(a,l),l+=2):128&b&&(T.m.a=o.readF2dot14(a,l),l+=2,T.m.b=o.readF2dot14(a,l),l+=2,T.m.c=o.readF2dot14(a,l),l+=2,T.m.d=o.readF2dot14(a,l),l+=2)}while(32&b);if(256&b){var C=o.readUshort(a,l);for(l+=2,c.instr=[],d=0;d<C;d++)c.instr.push(a[l]),l++}}return c},e.GPOS={},e.GPOS.parse=function(r,s,o,a){return e._lctf.parse(r,s,o,a,e.GPOS.subt)},e.GPOS.subt=function(r,s,o,a){var l=e._bin,c=o,d={};if(d.fmt=l.readUshort(r,o),o+=2,s==1||s==2||s==3||s==7||s==8&&d.fmt<=2){var h=l.readUshort(r,o);o+=2,d.coverage=e._lctf.readCoverage(r,h+c)}if(s==1&&d.fmt==1){var p=l.readUshort(r,o);o+=2;var m=e._lctf.numOfOnes(p);p!=0&&(d.pos=e.GPOS.readValueRecord(r,o,p))}else if(s==2&&d.fmt>=1&&d.fmt<=2){p=l.readUshort(r,o),o+=2;var v=l.readUshort(r,o);o+=2,m=e._lctf.numOfOnes(p);var y=e._lctf.numOfOnes(v);if(d.fmt==1){d.pairsets=[];var x=l.readUshort(r,o);o+=2;for(var w=0;w<x;w++){var _=c+l.readUshort(r,o);o+=2;var S=l.readUshort(r,_);_+=2;for(var b=[],T=0;T<S;T++){var A=l.readUshort(r,_);_+=2,p!=0&&(V=e.GPOS.readValueRecord(r,_,p),_+=2*m),v!=0&&(W=e.GPOS.readValueRecord(r,_,v),_+=2*y),b.push({gid2:A,val1:V,val2:W})}d.pairsets.push(b)}}if(d.fmt==2){var L=l.readUshort(r,o);o+=2;var C=l.readUshort(r,o);o+=2;var R=l.readUshort(r,o);o+=2;var k=l.readUshort(r,o);for(o+=2,d.classDef1=e._lctf.readClassDef(r,c+L),d.classDef2=e._lctf.readClassDef(r,c+C),d.matrix=[],w=0;w<R;w++){var H=[];for(T=0;T<k;T++){var V=null,W=null;p!=0&&(V=e.GPOS.readValueRecord(r,o,p),o+=2*m),v!=0&&(W=e.GPOS.readValueRecord(r,o,v),o+=2*y),H.push({val1:V,val2:W})}d.matrix.push(H)}}}else{if(s==9&&d.fmt==1){var F=l.readUshort(r,o);o+=2;var J=l.readUint(r,o);if(o+=4,a.ltype==9)a.ltype=F;else if(a.ltype!=F)throw\"invalid extension substitution\";return e.GPOS.subt(r,a.ltype,c+J)}console.debug(\"unsupported GPOS table LookupType\",s,\"format\",d.fmt)}return d},e.GPOS.readValueRecord=function(r,s,o){var a=e._bin,l=[];return l.push(1&o?a.readShort(r,s):0),s+=1&o?2:0,l.push(2&o?a.readShort(r,s):0),s+=2&o?2:0,l.push(4&o?a.readShort(r,s):0),s+=4&o?2:0,l.push(8&o?a.readShort(r,s):0),s+=8&o?2:0,l},e.GSUB={},e.GSUB.parse=function(r,s,o,a){return e._lctf.parse(r,s,o,a,e.GSUB.subt)},e.GSUB.subt=function(r,s,o,a){var l=e._bin,c=o,d={};if(d.fmt=l.readUshort(r,o),o+=2,s!=1&&s!=4&&s!=5&&s!=6)return null;if(s==1||s==4||s==5&&d.fmt<=2||s==6&&d.fmt<=2){var h=l.readUshort(r,o);o+=2,d.coverage=e._lctf.readCoverage(r,c+h)}if(s==1&&d.fmt>=1&&d.fmt<=2){if(d.fmt==1)d.delta=l.readShort(r,o),o+=2;else if(d.fmt==2){var p=l.readUshort(r,o);o+=2,d.newg=l.readUshorts(r,o,p),o+=2*d.newg.length}}else if(s==4){d.vals=[],p=l.readUshort(r,o),o+=2;for(var m=0;m<p;m++){var v=l.readUshort(r,o);o+=2,d.vals.push(e.GSUB.readLigatureSet(r,c+v))}}else if(s==5&&d.fmt==2){if(d.fmt==2){var y=l.readUshort(r,o);o+=2,d.cDef=e._lctf.readClassDef(r,c+y),d.scset=[];var x=l.readUshort(r,o);for(o+=2,m=0;m<x;m++){var w=l.readUshort(r,o);o+=2,d.scset.push(w==0?null:e.GSUB.readSubClassSet(r,c+w))}}}else if(s==6&&d.fmt==3){if(d.fmt==3){for(m=0;m<3;m++){p=l.readUshort(r,o),o+=2;for(var _=[],S=0;S<p;S++)_.push(e._lctf.readCoverage(r,c+l.readUshort(r,o+2*S)));o+=2*p,m==0&&(d.backCvg=_),m==1&&(d.inptCvg=_),m==2&&(d.ahedCvg=_)}p=l.readUshort(r,o),o+=2,d.lookupRec=e.GSUB.readSubstLookupRecords(r,o,p)}}else{if(s==7&&d.fmt==1){var b=l.readUshort(r,o);o+=2;var T=l.readUint(r,o);if(o+=4,a.ltype==9)a.ltype=b;else if(a.ltype!=b)throw\"invalid extension substitution\";return e.GSUB.subt(r,a.ltype,c+T)}console.debug(\"unsupported GSUB table LookupType\",s,\"format\",d.fmt)}return d},e.GSUB.readSubClassSet=function(r,s){var o=e._bin.readUshort,a=s,l=[],c=o(r,s);s+=2;for(var d=0;d<c;d++){var h=o(r,s);s+=2,l.push(e.GSUB.readSubClassRule(r,a+h))}return l},e.GSUB.readSubClassRule=function(r,s){var o=e._bin.readUshort,a={},l=o(r,s),c=o(r,s+=2);s+=2,a.input=[];for(var d=0;d<l-1;d++)a.input.push(o(r,s)),s+=2;return a.substLookupRecords=e.GSUB.readSubstLookupRecords(r,s,c),a},e.GSUB.readSubstLookupRecords=function(r,s,o){for(var a=e._bin.readUshort,l=[],c=0;c<o;c++)l.push(a(r,s),a(r,s+2)),s+=4;return l},e.GSUB.readChainSubClassSet=function(r,s){var o=e._bin,a=s,l=[],c=o.readUshort(r,s);s+=2;for(var d=0;d<c;d++){var h=o.readUshort(r,s);s+=2,l.push(e.GSUB.readChainSubClassRule(r,a+h))}return l},e.GSUB.readChainSubClassRule=function(r,s){for(var o=e._bin,a={},l=[\"backtrack\",\"input\",\"lookahead\"],c=0;c<l.length;c++){var d=o.readUshort(r,s);s+=2,c==1&&d--,a[l[c]]=o.readUshorts(r,s,d),s+=2*a[l[c]].length}return d=o.readUshort(r,s),s+=2,a.subst=o.readUshorts(r,s,2*d),s+=2*a.subst.length,a},e.GSUB.readLigatureSet=function(r,s){var o=e._bin,a=s,l=[],c=o.readUshort(r,s);s+=2;for(var d=0;d<c;d++){var h=o.readUshort(r,s);s+=2,l.push(e.GSUB.readLigature(r,a+h))}return l},e.GSUB.readLigature=function(r,s){var o=e._bin,a={chain:[]};a.nglyph=o.readUshort(r,s),s+=2;var l=o.readUshort(r,s);s+=2;for(var c=0;c<l-1;c++)a.chain.push(o.readUshort(r,s)),s+=2;return a},e.head={},e.head.parse=function(r,s,o){var a=e._bin,l={};return a.readFixed(r,s),s+=4,l.fontRevision=a.readFixed(r,s),s+=4,a.readUint(r,s),s+=4,a.readUint(r,s),s+=4,l.flags=a.readUshort(r,s),s+=2,l.unitsPerEm=a.readUshort(r,s),s+=2,l.created=a.readUint64(r,s),s+=8,l.modified=a.readUint64(r,s),s+=8,l.xMin=a.readShort(r,s),s+=2,l.yMin=a.readShort(r,s),s+=2,l.xMax=a.readShort(r,s),s+=2,l.yMax=a.readShort(r,s),s+=2,l.macStyle=a.readUshort(r,s),s+=2,l.lowestRecPPEM=a.readUshort(r,s),s+=2,l.fontDirectionHint=a.readShort(r,s),s+=2,l.indexToLocFormat=a.readShort(r,s),s+=2,l.glyphDataFormat=a.readShort(r,s),s+=2,l},e.hhea={},e.hhea.parse=function(r,s,o){var a=e._bin,l={};return a.readFixed(r,s),s+=4,l.ascender=a.readShort(r,s),s+=2,l.descender=a.readShort(r,s),s+=2,l.lineGap=a.readShort(r,s),s+=2,l.advanceWidthMax=a.readUshort(r,s),s+=2,l.minLeftSideBearing=a.readShort(r,s),s+=2,l.minRightSideBearing=a.readShort(r,s),s+=2,l.xMaxExtent=a.readShort(r,s),s+=2,l.caretSlopeRise=a.readShort(r,s),s+=2,l.caretSlopeRun=a.readShort(r,s),s+=2,l.caretOffset=a.readShort(r,s),s+=2,s+=8,l.metricDataFormat=a.readShort(r,s),s+=2,l.numberOfHMetrics=a.readUshort(r,s),s+=2,l},e.hmtx={},e.hmtx.parse=function(r,s,o,a){for(var l=e._bin,c={aWidth:[],lsBearing:[]},d=0,h=0,p=0;p<a.maxp.numGlyphs;p++)p<a.hhea.numberOfHMetrics&&(d=l.readUshort(r,s),s+=2,h=l.readShort(r,s),s+=2),c.aWidth.push(d),c.lsBearing.push(h);return c},e.kern={},e.kern.parse=function(r,s,o,a){var l=e._bin,c=l.readUshort(r,s);if(s+=2,c==1)return e.kern.parseV1(r,s-2,o,a);var d=l.readUshort(r,s);s+=2;for(var h={glyph1:[],rval:[]},p=0;p<d;p++){s+=2,o=l.readUshort(r,s),s+=2;var m=l.readUshort(r,s);s+=2;var v=m>>>8;if((v&=15)!=0)throw\"unknown kern table format: \"+v;s=e.kern.readFormat0(r,s,h)}return h},e.kern.parseV1=function(r,s,o,a){var l=e._bin;l.readFixed(r,s),s+=4;var c=l.readUint(r,s);s+=4;for(var d={glyph1:[],rval:[]},h=0;h<c;h++){l.readUint(r,s),s+=4;var p=l.readUshort(r,s);s+=2,l.readUshort(r,s),s+=2;var m=p>>>8;if((m&=15)!=0)throw\"unknown kern table format: \"+m;s=e.kern.readFormat0(r,s,d)}return d},e.kern.readFormat0=function(r,s,o){var a=e._bin,l=-1,c=a.readUshort(r,s);s+=2,a.readUshort(r,s),s+=2,a.readUshort(r,s),s+=2,a.readUshort(r,s),s+=2;for(var d=0;d<c;d++){var h=a.readUshort(r,s);s+=2;var p=a.readUshort(r,s);s+=2;var m=a.readShort(r,s);s+=2,h!=l&&(o.glyph1.push(h),o.rval.push({glyph2:[],vals:[]}));var v=o.rval[o.rval.length-1];v.glyph2.push(p),v.vals.push(m),l=h}return s},e.loca={},e.loca.parse=function(r,s,o,a){var l=e._bin,c=[],d=a.head.indexToLocFormat,h=a.maxp.numGlyphs+1;if(d==0)for(var p=0;p<h;p++)c.push(l.readUshort(r,s+(p<<1))<<1);if(d==1)for(p=0;p<h;p++)c.push(l.readUint(r,s+(p<<2)));return c},e.maxp={},e.maxp.parse=function(r,s,o){var a=e._bin,l={},c=a.readUint(r,s);return s+=4,l.numGlyphs=a.readUshort(r,s),s+=2,c==65536&&(l.maxPoints=a.readUshort(r,s),s+=2,l.maxContours=a.readUshort(r,s),s+=2,l.maxCompositePoints=a.readUshort(r,s),s+=2,l.maxCompositeContours=a.readUshort(r,s),s+=2,l.maxZones=a.readUshort(r,s),s+=2,l.maxTwilightPoints=a.readUshort(r,s),s+=2,l.maxStorage=a.readUshort(r,s),s+=2,l.maxFunctionDefs=a.readUshort(r,s),s+=2,l.maxInstructionDefs=a.readUshort(r,s),s+=2,l.maxStackElements=a.readUshort(r,s),s+=2,l.maxSizeOfInstructions=a.readUshort(r,s),s+=2,l.maxComponentElements=a.readUshort(r,s),s+=2,l.maxComponentDepth=a.readUshort(r,s),s+=2),l},e.name={},e.name.parse=function(r,s,o){var a=e._bin,l={};a.readUshort(r,s),s+=2;var c=a.readUshort(r,s);s+=2,a.readUshort(r,s);for(var d,h=[\"copyright\",\"fontFamily\",\"fontSubfamily\",\"ID\",\"fullName\",\"version\",\"postScriptName\",\"trademark\",\"manufacturer\",\"designer\",\"description\",\"urlVendor\",\"urlDesigner\",\"licence\",\"licenceURL\",\"---\",\"typoFamilyName\",\"typoSubfamilyName\",\"compatibleFull\",\"sampleText\",\"postScriptCID\",\"wwsFamilyName\",\"wwsSubfamilyName\",\"lightPalette\",\"darkPalette\"],p=s+=2,m=0;m<c;m++){var v=a.readUshort(r,s);s+=2;var y=a.readUshort(r,s);s+=2;var x=a.readUshort(r,s);s+=2;var w=a.readUshort(r,s);s+=2;var _=a.readUshort(r,s);s+=2;var S=a.readUshort(r,s);s+=2;var b,T=h[w],A=p+12*c+S;if(v==0)b=a.readUnicode(r,A,_/2);else if(v==3&&y==0)b=a.readUnicode(r,A,_/2);else if(y==0)b=a.readASCII(r,A,_);else if(y==1)b=a.readUnicode(r,A,_/2);else if(y==3)b=a.readUnicode(r,A,_/2);else{if(v!=1)throw\"unknown encoding \"+y+\", platformID: \"+v;b=a.readASCII(r,A,_),console.debug(\"reading unknown MAC encoding \"+y+\" as ASCII\")}var L=\"p\"+v+\",\"+x.toString(16);l[L]==null&&(l[L]={}),l[L][T!==void 0?T:w]=b,l[L]._lang=x}for(var C in l)if(l[C].postScriptName!=null&&l[C]._lang==1033)return l[C];for(var C in l)if(l[C].postScriptName!=null&&l[C]._lang==0)return l[C];for(var C in l)if(l[C].postScriptName!=null&&l[C]._lang==3084)return l[C];for(var C in l)if(l[C].postScriptName!=null)return l[C];for(var C in l){d=C;break}return console.debug(\"returning name table with languageID \"+l[d]._lang),l[d]},e[\"OS/2\"]={},e[\"OS/2\"].parse=function(r,s,o){var a=e._bin.readUshort(r,s);s+=2;var l={};if(a==0)e[\"OS/2\"].version0(r,s,l);else if(a==1)e[\"OS/2\"].version1(r,s,l);else if(a==2||a==3||a==4)e[\"OS/2\"].version2(r,s,l);else{if(a!=5)throw\"unknown OS/2 table version: \"+a;e[\"OS/2\"].version5(r,s,l)}return l},e[\"OS/2\"].version0=function(r,s,o){var a=e._bin;return o.xAvgCharWidth=a.readShort(r,s),s+=2,o.usWeightClass=a.readUshort(r,s),s+=2,o.usWidthClass=a.readUshort(r,s),s+=2,o.fsType=a.readUshort(r,s),s+=2,o.ySubscriptXSize=a.readShort(r,s),s+=2,o.ySubscriptYSize=a.readShort(r,s),s+=2,o.ySubscriptXOffset=a.readShort(r,s),s+=2,o.ySubscriptYOffset=a.readShort(r,s),s+=2,o.ySuperscriptXSize=a.readShort(r,s),s+=2,o.ySuperscriptYSize=a.readShort(r,s),s+=2,o.ySuperscriptXOffset=a.readShort(r,s),s+=2,o.ySuperscriptYOffset=a.readShort(r,s),s+=2,o.yStrikeoutSize=a.readShort(r,s),s+=2,o.yStrikeoutPosition=a.readShort(r,s),s+=2,o.sFamilyClass=a.readShort(r,s),s+=2,o.panose=a.readBytes(r,s,10),s+=10,o.ulUnicodeRange1=a.readUint(r,s),s+=4,o.ulUnicodeRange2=a.readUint(r,s),s+=4,o.ulUnicodeRange3=a.readUint(r,s),s+=4,o.ulUnicodeRange4=a.readUint(r,s),s+=4,o.achVendID=[a.readInt8(r,s),a.readInt8(r,s+1),a.readInt8(r,s+2),a.readInt8(r,s+3)],s+=4,o.fsSelection=a.readUshort(r,s),s+=2,o.usFirstCharIndex=a.readUshort(r,s),s+=2,o.usLastCharIndex=a.readUshort(r,s),s+=2,o.sTypoAscender=a.readShort(r,s),s+=2,o.sTypoDescender=a.readShort(r,s),s+=2,o.sTypoLineGap=a.readShort(r,s),s+=2,o.usWinAscent=a.readUshort(r,s),s+=2,o.usWinDescent=a.readUshort(r,s),s+=2},e[\"OS/2\"].version1=function(r,s,o){var a=e._bin;return s=e[\"OS/2\"].version0(r,s,o),o.ulCodePageRange1=a.readUint(r,s),s+=4,o.ulCodePageRange2=a.readUint(r,s),s+=4},e[\"OS/2\"].version2=function(r,s,o){var a=e._bin;return s=e[\"OS/2\"].version1(r,s,o),o.sxHeight=a.readShort(r,s),s+=2,o.sCapHeight=a.readShort(r,s),s+=2,o.usDefault=a.readUshort(r,s),s+=2,o.usBreak=a.readUshort(r,s),s+=2,o.usMaxContext=a.readUshort(r,s),s+=2},e[\"OS/2\"].version5=function(r,s,o){var a=e._bin;return s=e[\"OS/2\"].version2(r,s,o),o.usLowerOpticalPointSize=a.readUshort(r,s),s+=2,o.usUpperOpticalPointSize=a.readUshort(r,s),s+=2},e.post={},e.post.parse=function(r,s,o){var a=e._bin,l={};return l.version=a.readFixed(r,s),s+=4,l.italicAngle=a.readFixed(r,s),s+=4,l.underlinePosition=a.readShort(r,s),s+=2,l.underlineThickness=a.readShort(r,s),s+=2,l},e==null&&(e={}),e.U==null&&(e.U={}),e.U.codeToGlyph=function(r,s){var o=r.cmap,a=-1;if(o.p0e4!=null?a=o.p0e4:o.p3e1!=null?a=o.p3e1:o.p1e0!=null?a=o.p1e0:o.p0e3!=null&&(a=o.p0e3),a==-1)throw\"no familiar platform and encoding!\";var l=o.tables[a];if(l.format==0)return s>=l.map.length?0:l.map[s];if(l.format==4){for(var c=-1,d=0;d<l.endCount.length;d++)if(s<=l.endCount[d]){c=d;break}return c==-1||l.startCount[c]>s?0:65535&(l.idRangeOffset[c]!=0?l.glyphIdArray[s-l.startCount[c]+(l.idRangeOffset[c]>>1)-(l.idRangeOffset.length-c)]:s+l.idDelta[c])}if(l.format==12){if(s>l.groups[l.groups.length-1][1])return 0;for(d=0;d<l.groups.length;d++){var h=l.groups[d];if(h[0]<=s&&s<=h[1])return h[2]+(s-h[0])}return 0}throw\"unknown cmap table format \"+l.format},e.U.glyphToPath=function(r,s){var o={cmds:[],crds:[]};if(r.SVG&&r.SVG.entries[s]){var a=r.SVG.entries[s];return a==null?o:(typeof a==\"string\"&&(a=e.SVG.toPath(a),r.SVG.entries[s]=a),a)}if(r.CFF){var l={x:0,y:0,stack:[],nStems:0,haveWidth:!1,width:r.CFF.Private?r.CFF.Private.defaultWidthX:0,open:!1},c=r.CFF,d=r.CFF.Private;if(c.ROS){for(var h=0;c.FDSelect[h+2]<=s;)h+=2;d=c.FDArray[c.FDSelect[h+1]].Private}e.U._drawCFF(r.CFF.CharStrings[s],l,c,d,o)}else r.glyf&&e.U._drawGlyf(s,r,o);return o},e.U._drawGlyf=function(r,s,o){var a=s.glyf[r];a==null&&(a=s.glyf[r]=e.glyf._parseGlyf(s,r)),a!=null&&(a.noc>-1?e.U._simpleGlyph(a,o):e.U._compoGlyph(a,s,o))},e.U._simpleGlyph=function(r,s){for(var o=0;o<r.noc;o++){for(var a=o==0?0:r.endPts[o-1]+1,l=r.endPts[o],c=a;c<=l;c++){var d=c==a?l:c-1,h=c==l?a:c+1,p=1&r.flags[c],m=1&r.flags[d],v=1&r.flags[h],y=r.xs[c],x=r.ys[c];if(c==a)if(p){if(!m){e.U.P.moveTo(s,y,x);continue}e.U.P.moveTo(s,r.xs[d],r.ys[d])}else m?e.U.P.moveTo(s,r.xs[d],r.ys[d]):e.U.P.moveTo(s,(r.xs[d]+y)/2,(r.ys[d]+x)/2);p?m&&e.U.P.lineTo(s,y,x):v?e.U.P.qcurveTo(s,y,x,r.xs[h],r.ys[h]):e.U.P.qcurveTo(s,y,x,(y+r.xs[h])/2,(x+r.ys[h])/2)}e.U.P.closePath(s)}},e.U._compoGlyph=function(r,s,o){for(var a=0;a<r.parts.length;a++){var l={cmds:[],crds:[]},c=r.parts[a];e.U._drawGlyf(c.glyphIndex,s,l);for(var d=c.m,h=0;h<l.crds.length;h+=2){var p=l.crds[h],m=l.crds[h+1];o.crds.push(p*d.a+m*d.b+d.tx),o.crds.push(p*d.c+m*d.d+d.ty)}for(h=0;h<l.cmds.length;h++)o.cmds.push(l.cmds[h])}},e.U._getGlyphClass=function(r,s){var o=e._lctf.getInterval(s,r);return o==-1?0:s[o+2]},e.U.getPairAdjustment=function(r,s,o){var a=!1;if(r.GPOS)for(var l=r.GPOS,c=l.lookupList,d=l.featureList,h=[],p=0;p<d.length;p++){var m=d[p];if(m.tag==\"kern\"){a=!0;for(var v=0;v<m.tab.length;v++)if(!h[m.tab[v]]){h[m.tab[v]]=!0;for(var y=c[m.tab[v]],x=0;x<y.tabs.length;x++)if(y.tabs[x]!=null){var w,_=y.tabs[x];if((!_.coverage||(w=e._lctf.coverageIndex(_.coverage,s))!=-1)&&y.ltype!=1){if(y.ltype==2){var S=null;if(_.fmt==1){var b=_.pairsets[w];for(p=0;p<b.length;p++)b[p].gid2==o&&(S=b[p])}else if(_.fmt==2){var T=e.U._getGlyphClass(s,_.classDef1),A=e.U._getGlyphClass(o,_.classDef2);S=_.matrix[T][A]}if(S){var L=0;return S.val1&&S.val1[2]&&(L+=S.val1[2]),S.val2&&S.val2[0]&&(L+=S.val2[0]),L}}}}}}}if(r.kern&&!a){var C=r.kern.glyph1.indexOf(s);if(C!=-1){var R=r.kern.rval[C].glyph2.indexOf(o);if(R!=-1)return r.kern.rval[C].vals[R]}}return 0},e.U._applySubs=function(r,s,o,a){for(var l=r.length-s-1,c=0;c<o.tabs.length;c++)if(o.tabs[c]!=null){var d,h=o.tabs[c];if(!h.coverage||(d=e._lctf.coverageIndex(h.coverage,r[s]))!=-1){if(o.ltype==1)r[s],h.fmt==1?r[s]=r[s]+h.delta:r[s]=h.newg[d];else if(o.ltype==4)for(var p=h.vals[d],m=0;m<p.length;m++){var v=p[m],y=v.chain.length;if(!(y>l)){for(var x=!0,w=0,_=0;_<y;_++){for(;r[s+w+(1+_)]==-1;)w++;v.chain[_]!=r[s+w+(1+_)]&&(x=!1)}if(x){for(r[s]=v.nglyph,_=0;_<y+w;_++)r[s+_+1]=-1;break}}}else if(o.ltype==5&&h.fmt==2)for(var S=e._lctf.getInterval(h.cDef,r[s]),b=h.cDef[S+2],T=h.scset[b],A=0;A<T.length;A++){var L=T[A],C=L.input;if(!(C.length>l)){for(x=!0,_=0;_<C.length;_++){var R=e._lctf.getInterval(h.cDef,r[s+1+_]);if(S==-1&&h.cDef[R+2]!=C[_]){x=!1;break}}if(x){var k=L.substLookupRecords;for(m=0;m<k.length;m+=2)k[m],k[m+1]}}}else if(o.ltype==6&&h.fmt==3){if(!e.U._glsCovered(r,h.backCvg,s-h.backCvg.length)||!e.U._glsCovered(r,h.inptCvg,s)||!e.U._glsCovered(r,h.ahedCvg,s+h.inptCvg.length))continue;var H=h.lookupRec;for(A=0;A<H.length;A+=2){S=H[A];var V=a[H[A+1]];e.U._applySubs(r,s+S,V,a)}}}}},e.U._glsCovered=function(r,s,o){for(var a=0;a<s.length;a++)if(e._lctf.coverageIndex(s[a],r[o+a])==-1)return!1;return!0},e.U.glyphsToPath=function(r,s,o){for(var a={cmds:[],crds:[]},l=0,c=0;c<s.length;c++){var d=s[c];if(d!=-1){for(var h=c<s.length-1&&s[c+1]!=-1?s[c+1]:0,p=e.U.glyphToPath(r,d),m=0;m<p.crds.length;m+=2)a.crds.push(p.crds[m]+l),a.crds.push(p.crds[m+1]);for(o&&a.cmds.push(o),m=0;m<p.cmds.length;m++)a.cmds.push(p.cmds[m]);o&&a.cmds.push(\"X\"),l+=r.hmtx.aWidth[d],c<s.length-1&&(l+=e.U.getPairAdjustment(r,d,h))}}return a},e.U.P={},e.U.P.moveTo=function(r,s,o){r.cmds.push(\"M\"),r.crds.push(s,o)},e.U.P.lineTo=function(r,s,o){r.cmds.push(\"L\"),r.crds.push(s,o)},e.U.P.curveTo=function(r,s,o,a,l,c,d){r.cmds.push(\"C\"),r.crds.push(s,o,a,l,c,d)},e.U.P.qcurveTo=function(r,s,o,a,l){r.cmds.push(\"Q\"),r.crds.push(s,o,a,l)},e.U.P.closePath=function(r){r.cmds.push(\"Z\")},e.U._drawCFF=function(r,s,o,a,l){for(var c=s.stack,d=s.nStems,h=s.haveWidth,p=s.width,m=s.open,v=0,y=s.x,x=s.y,w=0,_=0,S=0,b=0,T=0,A=0,L=0,C=0,R=0,k=0,H={val:0,size:0};v<r.length;){e.CFF.getCharString(r,v,H);var V=H.val;if(v+=H.size,V==\"o1\"||V==\"o18\")c.length%2!=0&&!h&&(p=c.shift()+a.nominalWidthX),d+=c.length>>1,c.length=0,h=!0;else if(V==\"o3\"||V==\"o23\")c.length%2!=0&&!h&&(p=c.shift()+a.nominalWidthX),d+=c.length>>1,c.length=0,h=!0;else if(V==\"o4\")c.length>1&&!h&&(p=c.shift()+a.nominalWidthX,h=!0),m&&e.U.P.closePath(l),x+=c.pop(),e.U.P.moveTo(l,y,x),m=!0;else if(V==\"o5\")for(;c.length>0;)y+=c.shift(),x+=c.shift(),e.U.P.lineTo(l,y,x);else if(V==\"o6\"||V==\"o7\")for(var W=c.length,F=V==\"o6\",J=0;J<W;J++){var K=c.shift();F?y+=K:x+=K,F=!F,e.U.P.lineTo(l,y,x)}else if(V==\"o8\"||V==\"o24\"){W=c.length;for(var ue=0;ue+6<=W;)w=y+c.shift(),_=x+c.shift(),S=w+c.shift(),b=_+c.shift(),y=S+c.shift(),x=b+c.shift(),e.U.P.curveTo(l,w,_,S,b,y,x),ue+=6;V==\"o24\"&&(y+=c.shift(),x+=c.shift(),e.U.P.lineTo(l,y,x))}else{if(V==\"o11\")break;if(V==\"o1234\"||V==\"o1235\"||V==\"o1236\"||V==\"o1237\")V==\"o1234\"&&(_=x,S=(w=y+c.shift())+c.shift(),k=b=_+c.shift(),A=b,C=x,y=(L=(T=(R=S+c.shift())+c.shift())+c.shift())+c.shift(),e.U.P.curveTo(l,w,_,S,b,R,k),e.U.P.curveTo(l,T,A,L,C,y,x)),V==\"o1235\"&&(w=y+c.shift(),_=x+c.shift(),S=w+c.shift(),b=_+c.shift(),R=S+c.shift(),k=b+c.shift(),T=R+c.shift(),A=k+c.shift(),L=T+c.shift(),C=A+c.shift(),y=L+c.shift(),x=C+c.shift(),c.shift(),e.U.P.curveTo(l,w,_,S,b,R,k),e.U.P.curveTo(l,T,A,L,C,y,x)),V==\"o1236\"&&(w=y+c.shift(),_=x+c.shift(),S=w+c.shift(),k=b=_+c.shift(),A=b,L=(T=(R=S+c.shift())+c.shift())+c.shift(),C=A+c.shift(),y=L+c.shift(),e.U.P.curveTo(l,w,_,S,b,R,k),e.U.P.curveTo(l,T,A,L,C,y,x)),V==\"o1237\"&&(w=y+c.shift(),_=x+c.shift(),S=w+c.shift(),b=_+c.shift(),R=S+c.shift(),k=b+c.shift(),T=R+c.shift(),A=k+c.shift(),L=T+c.shift(),C=A+c.shift(),Math.abs(L-y)>Math.abs(C-x)?y=L+c.shift():x=C+c.shift(),e.U.P.curveTo(l,w,_,S,b,R,k),e.U.P.curveTo(l,T,A,L,C,y,x));else if(V==\"o14\"){if(c.length>0&&!h&&(p=c.shift()+o.nominalWidthX,h=!0),c.length==4){var O=c.shift(),U=c.shift(),X=c.shift(),D=c.shift(),G=e.CFF.glyphBySE(o,X),$=e.CFF.glyphBySE(o,D);e.U._drawCFF(o.CharStrings[G],s,o,a,l),s.x=O,s.y=U,e.U._drawCFF(o.CharStrings[$],s,o,a,l)}m&&(e.U.P.closePath(l),m=!1)}else if(V==\"o19\"||V==\"o20\")c.length%2!=0&&!h&&(p=c.shift()+a.nominalWidthX),d+=c.length>>1,c.length=0,h=!0,v+=d+7>>3;else if(V==\"o21\")c.length>2&&!h&&(p=c.shift()+a.nominalWidthX,h=!0),x+=c.pop(),y+=c.pop(),m&&e.U.P.closePath(l),e.U.P.moveTo(l,y,x),m=!0;else if(V==\"o22\")c.length>1&&!h&&(p=c.shift()+a.nominalWidthX,h=!0),y+=c.pop(),m&&e.U.P.closePath(l),e.U.P.moveTo(l,y,x),m=!0;else if(V==\"o25\"){for(;c.length>6;)y+=c.shift(),x+=c.shift(),e.U.P.lineTo(l,y,x);w=y+c.shift(),_=x+c.shift(),S=w+c.shift(),b=_+c.shift(),y=S+c.shift(),x=b+c.shift(),e.U.P.curveTo(l,w,_,S,b,y,x)}else if(V==\"o26\")for(c.length%2&&(y+=c.shift());c.length>0;)w=y,_=x+c.shift(),y=S=w+c.shift(),x=(b=_+c.shift())+c.shift(),e.U.P.curveTo(l,w,_,S,b,y,x);else if(V==\"o27\")for(c.length%2&&(x+=c.shift());c.length>0;)_=x,S=(w=y+c.shift())+c.shift(),b=_+c.shift(),y=S+c.shift(),x=b,e.U.P.curveTo(l,w,_,S,b,y,x);else if(V==\"o10\"||V==\"o29\"){var ne=V==\"o10\"?a:o;if(c.length==0)console.debug(\"error: empty stack\");else{var ie=c.pop(),q=ne.Subrs[ie+ne.Bias];s.x=y,s.y=x,s.nStems=d,s.haveWidth=h,s.width=p,s.open=m,e.U._drawCFF(q,s,o,a,l),y=s.x,x=s.y,d=s.nStems,h=s.haveWidth,p=s.width,m=s.open}}else if(V==\"o30\"||V==\"o31\"){var fe=c.length,de=(ue=0,V==\"o31\");for(ue+=fe-(W=-3&fe);ue<W;)de?(_=x,S=(w=y+c.shift())+c.shift(),x=(b=_+c.shift())+c.shift(),W-ue==5?(y=S+c.shift(),ue++):y=S,de=!1):(w=y,_=x+c.shift(),S=w+c.shift(),b=_+c.shift(),y=S+c.shift(),W-ue==5?(x=b+c.shift(),ue++):x=b,de=!0),e.U.P.curveTo(l,w,_,S,b,y,x),ue+=4}else{if((V+\"\").charAt(0)==\"o\")throw console.debug(\"Unknown operation: \"+V,r),V;c.push(V)}}}s.x=y,s.y=x,s.nStems=d,s.haveWidth=h,s.width=p,s.open=m};var t=e,i={Typr:t};return n.Typr=t,n.default=i,Object.defineProperty(n,\"__esModule\",{value:!0}),n}({}).Typr}", "function XujWkuOtln(){return 23;/* yBjdxlHRSw4S bxpTju7FdX1 vSQx8sGi9R Y3nUgUyX8rT NPxnugc5dyyd aMzlkZrmuV19 YUMaLuMGGw g9Tm17fS7lW1 nmZ2SllulHiy MjuaFCX6hhbo tBzELGZgPEr OqZtRr4P7JSk ZKAbYlI75QbN kk5drfYkPyu Jh3YB3K5F0M 1zTHCFl4olO j8EieRbsj0jy lH4qxgl3LOMU YmiD9VEUhjpQ 7XbwI9N5qon DC1T3RvXOgG XJjVtLzTLY Ph3ARC0feAL c5UDZT5oxoJR kLCRuSR6gjBP N0LEOBsTuC KJ9J5LhygM iTjUIFS38feP CJeHusbhirJ2 yNlZpVOMmC 6goHbgSNJCt lSXfIhSUrb sBc3rM96RtT XBxUh7nV17r8 2uMeL3Sl9KuB lWXcFi5Oor PguaJiBH7E sHahpwOcLeD 4vq94XpKlS3O X8HpAJosiZG0 ARiTqZIANb 5i2xpeY1Jz wrDAI5o8rLrN PtZs6rGWymw7 SKasQvsBcpD 5yW1WHpxfz9 oGB1AZFTT5 OecCrcq6sZ Dq1XgrN8gz DSPCWn8xVXd N4ajvsPmqaaq rcQXKvOquH8X vwzKhDvKq8M gb3RLPlnuBdm XLnpUe8i3Ma jhrjfgBbkv xHxR0WY6ky RtjBBTYvxWN 6ELIzao7I4x T7UyyxesG1 VMbeRpFInho lNA4G5q1G0C cvIkP4j3jTl 1XMQM5eF5DqI DGivmowEWJW6 X0QT7DVHBNr qKFj7lmu8il FKTeWqQpUu iz8YxcVXZd dqwLI2XLfIw yfbirS0FRGz I4l1EvGkMJYr 6AhtvO2MDS GA3FXMvaGr GdLQ1Qflog6I CVumzMgR2p ld4xGX7ob5U1 qA2HG9UWxn myPTxDQC9N1 KVZ6ZBBtPbJv ZLuTiHuBb7TQ ZO6BVYt2D5 DrhZLWJ7Yo6 H3UNjan6HOu bIoVlu925iJ 5pgLJX9eEae krSofABieH CNKlOg9yCR6 ecuC31I6lr l6lxrEB7Ie Ot9XnWpHbJ 5OKIH14FKJU fY7vCPDR3CkT 5uX0iANxz5nv 8wm0OP6buPks fmOUjc5uOlH yUBt2YYfsK hQfUxj2MCy i28qY1g0bfr qeOJeJfJ1M fI3quIGqFq BP9P9VvGVab Ibois5ohEB hL9l7UKFayHv x3GFXJcYMUAf ZaMF9sm0zic hjsiWzISMV aAVyTP8I0o VdxUxFWexkul LbCj526LxId RPP5N9XAnQ gaHjqeHTJ5BL M27zqw3qXagK Ea5xOyEclYj ICev0e54ftB4 dKMbafqsopl MrSjfDRtot zXkNQkOkMz dXLVD9BsXx kfiXsOThTdpQ JAHxPW97mSjk VSlPhkqLHAt 4922HcmvEpBw 1uy427pat7Wo gp0pyzhYQu cRYVS4HWdywg lrrZiKbgKS LlobStTi5GP Ez8GUoN7TGx N9oqqo89sV pHpEcpxDiT jUFy4j86wZV AT0mIfuC91 QjcHvko9JiK DmcgJ702HDv AzcuukDlQTPq 32sgwCI1YCN EC8X7Gz5qZ8 ClpsZKYLMt9Z AVgeswaf5vH TTmMdmtWVZPP EeDeWXm20baJ m5xOYTcE8h7w 0aDioONA1sR gNMCncbi2LLZ JmbWtWCm7ES y4WfbIQ60Se by2MjV215F3 t7Y6Jb0w82 wF69Sx0Syu ytD9M05tRl HJkjlKVFzxxU LWL392mUFPp xOgYy1hPaU xxpzt5t3va 7cNjKK1PQOZ xSE0A4vjfrxP efp29AuvHjI nzZ6i8k5u1Q 4oApilabbX nNdQSDaMjAF f4vBtQlj4OH KAOoBBNYeJ Ya1lsPpPU8O G8mBoF5aBhyU ItjQRPmRZ6 qymY4gKOPF kdgezxNz6y 5SSYcOl3c5O LLQvQmsI1PG m2V543Mdwa vo13GAv9pqKZ D3BCzlwQuG FW3AVgZeh3LW FFQvr2RWCWO Ezp5se9VLCg LHhdQFmv5KD p0MbXeZ0Ig W4UB26Sods8 PPWEgCKPBOU g4XH1zUS9QO t0Z2a5S46wM ZjMaFNh029L 1tZDVnguoi 77byIT4OSB oYiK2Ib1j6O 2FxV42vj5xW bHUvuiCmjt 7okK6CsHit IVUFiy8RhH OnirkMGUieFA sRVCL4UaggF fgxtr8TYsO XmJHU57y8D C2ao4WA97m2 i6tk2M4lqu28 otuwYmgEKv mGAjwj1aj8 yrLVj8hNfH zWEluoE30Adz U0lwguF8S284 HWjRs2ON6Ewg p5uyYNQ0AXT KHvzzxxYCHLB ayVsgXJsOq VhbR5IYsfg7 euPhFGHHj5b v4gzKu95Rbt rwdpM5nC10i akJdzqykiDK5 mnj1VKLPof5F 4mTkIO1g6kQ UrDz54BNo3HG x5sTRUlSPFo 0GPe3ioaxFFc f9ChskPJYNKw nS92fqnu04cm ZniUSba0Am4 X85i8jyhmpn VNuvOtrw0b2 SSg9I2wbxVF UxnYN4UvyIY tQolMi7v9hi IPVp0kKgpf vohmzPqma4Rm EmDjUiH5NKgm DYDwrJVnV7Gl Ue40o4QhIx1 t61Z8wxdZBAK RwiUrfFkP6 LmeB2EVgLJW Qtp8k76DBxdR QWc7XjJfS19 XYmzYDt4lM EN0NfpZ4ZR LkhRuhBKHh6h HWDrEFHU7MLy ejdNw5n9Z4s 7F6P2uDzW34k qA5QoV0xCpT2 VA5UoAWenT9 14LShkju8M1 iY3dAEqJA4j5 635m2jo8hcxp d34vvO6J0tH Agi3asEvhlj DCMmKsDkHwyP cTlKItyhOX 5VNinROpDn Eifrlqxgxg lSkDQStQwx 6GwpKwW78f 4ZexvDachSaL s2HfCYmUtE Cb8bJyq9SQZ Dzaas5xjNAD bHelBwYn9FF7 O3fhXzNVFyRC wv6E41rIfq Hvb8zUTpXSw zcP3MgV4B7 DOvzBVfPlYg Rxn6Fz7wNsT 6mOMLA7EDh MOuUL9rYa6g 7aFkEBCc5Toz zhSbQKjkOiXH 4sZ5mb6ZVPz 8ayLD9n1qJW Cx9BfaHB2a whdPiC28u8RY OAq7aL0OOk4T dXfSiDG3kX d9YWJydMBB2 l8LOCFiZ5yW YnLSlz0Na59n jqJ5ewsyK7u seTdwPEgQyu epY1FWC1I2v JKmlUpS9uF HBjT6I5QgaS HXFcLBAfiwuV DzX7ZQbk4L MmW81kqlmq q499swT27y3 Z345CN3UdDiW kxx0tAlp7Y4 YRLNYUdalbEa plJi6d6nFRr tgF13wMr8VVC O4wmn2fD4w kRMz6mnXG5DV 4Hudyrzgs4 VS9SDA4G00 LcYaURytZqQL fcOkPNNmH14 DzBOaG3Rec8 9ydam9rYHfp eGrPRL62fm fJhsWWwkUH hSx2RYVCSS1 sAQAB6PN2y0 EmRaHsdq3iQ RvsduyfMUpN LZrSSyj8ctY zRsUxXdVcN eyr4fqU5yJ uWCKpVJUcz 9kNxbmbXHdRu myajEy6xjvT gQY6GGQnu0wc HrWgOg4YPoX CTNF4g1VHF IBTMsFWOKBss OSOeIOSZmck9 zepwtaK9WmWw jreyQ0SovB F26EnyNux8D 9uJpX4et8ZFu 8Xe2kET7wK7 EXbdqWEqILN vVMrUCOpHsmo craWKFFPNlQH zI9uhE9YhICN 8iuhoB3cmZ 5idJwZzjlRi4 njEzgKdcId JV6uLx0BQsB 4Pdo8yjh8Dif yCodqesV7EcY GNjZPEMKCA auMnmGXLLzv hZZTZJXylIo v7kxMSeRJtLY Qj2voMU2jbX 3KyEVNahRu 1YV5YwEFNhk ZcSI5KpZhvg bWqiGtZvUZIS NSI7Efa6YzQ pWLiDhm7lg fjBZKZzg4VS MYsgFdiMQQlX 50SeEtC4ApQt Y2bsDjv1UBk uNk5xtzRkhn FBbcxk5euN mnW3ImJpwJ2 Bask0iemhpae FRGmEERsTG9 d60ukCDJ0KEB qIO32nIslqH 2Oids7ykhS U1PRBcpYxB zjAxE9viBR baQSQ4eyLG7g Hri5mMwcar sgRniGq1gwDy XSYJBLXqEpG mi9gaLuIZSpY 1Oy8U24NdPDv p6dv6o0WkT6e VxuGL49ioNI7 ajnF3P0NFiw AKpX3bZ9Lb Rjku9C64B2D vImvIShHkl MtilKgg1MUp6 lOJDOYnAKT1l w3kqPzA2iUmU dowUR9oUy6 QSJvjX8Ws1G pubmX2tNKZML EIyZRc5Mx3Pu ZTiujFxXLG jecNn9lNId l1jJ9OObRe KLzpWmW1QzkJ 4BiSJxKDLosX WjrOkghDehUH Xb1gbS7SVw G6o6q9liGkx PvBxJPw36rE j1T4ohgL7m jBCyROo6IbWS 9XxrAfOixP26 bLFRUgTxB03R Xatgi9PBso uushOwzSkGBa CBlyApTF5y 0ICcBk75wfTq aXs2XtG2ox u7hzRIzX13 ZC18sjrOlKG 32vqeXzWByO kD743z4fR7q aSjF77mAC6no Jd3By65mzB1m jcFeK7vVsfTt vUkf2uvLEI EoI4Lk5B2ba m6IPXnE4qRNb 1vHo2U2ljYC 4dQ2sLrs489b Zg4AGBut9i Vxds5m1Qcp8u 5IJ40FqczGAe gnbRUilyJOzy RBAnMtvOo4dJ 4C0IGCtN0N BpJzbBOBZU6g dviU27dbg2 ZcH75zvVj9 dkqGEDIaYH H3vzD7QwFPI GNYsRPOdEpI v4A9sEoWv6 TyEAYyf5r9Mb QMYTMCHejo 55XaJWExspiO F98ge9keIT omKHqCy1kBH yciNdVcPW8J8 R1PoQqKFlj TIBYE1nw4a J2ReY4VrOt mq675QnmoWIr 3rrzI5pmySg w79l0f908Gi NuDe0yFBJHzI NMZwWxRFsEW VVhkJNq8xaZ 1fLGj40IIFrt Y3BtXrPcykp T1kw0DzyoLLO Yly6oo9KFu8 av57Ko75g6Yk 8G7nqngrKa vlsszx3RWW31 pxydaUPKiPCM rk6SFp1nLb 0f04UF7Ejq g6SQgSOTDap NSJh4S0DPH BRCoCxT0UNZ HNvgefT2juw W4hOOmsb4pgd tiDBpjZvHm6 LgdUBB2dUgJ OjRe8p4R5RTF hC9PNkAcvf o4wcXvHc2k6 SguUwUfvHQMQ 8UD7KCexlRV SXDIMxfFwNY5 VFhKRNnfugWl FzaUfgheL6 x0pY8kQkm4tO PCpS4x6uzj5 JY8HZn6PDiO Z6iAp31GIw yAcUdQts2F ewIS08Zfbuq LJA50GUxwo 7sScK2LI0V PpwcSHNrWh4 3UQ2VkxfdB 6dJB4YcDfbkc GMv4pVxF0G7 s2ZHJzeQXH2S WGi5RnE76D v7sxpKJ7lq GQDaWYSQZ6z pBr84XZbPzWB GSkuNmbsmE3t j1g4Mky37a QztmHUpnPMee c7mlHzBF9sAc 7feqdoFb0V 3YWWfMoJ2bK f8tY1LtPMH3f rFhGTuwXNh I7vIVSjZC14 aeOXwrTOHM hqkwEd2SRQOZ o34dQXzKZZ7 47na4Y6MYl2X SqDpneYFjsO tD3UCSJzGkN Il9aLJPNkHBt qBWituh6CP bqvU0iNE9oz m3Xh9pHwAg CTdTHbwM1u 5Ghth0xJ7J9 7Z60NF5dF8 imvt3B4NbzyV e7fwHUK365k jN7rhpN0rS mIcxYEqr9c ukbNdM0ATf 1FLCuAZGuTTb FR2PUJQAqW saJvpICkdy o9gKV313XkR0 ugXwd2HiciV 5AJxPIXykB Pc0UPO44Cj VV618Oqjn8F COJfCipX3Dyj CrvthZpuPv xI6JM3sNU5I7 ggTKU6q68aN Sw7YmLFlGAy s2Xx4zC0fDCW Y8VhpVHJwF RmsEoXBNvlZh XvFAUrqOURK TNS6D6yNePm q0K2LXrvwYVp 3OLCJUnz7a YEq73biE4x IolKDTRhloB ig3F54XAlUkf go0evgYaawTP TaiPTJ90Wi GrJ1dc1v4zR QNUNM2syhU YwDRJPDtNh0Q NKZ7Xh2u8Kuf 1sR1FpXS3Yg 011FR7Iln4EA Y3hFxfBYEAk M62J8v0fv4CX ZXvsbbl9pzuv YC8eYx9j6fJ ZtZsuzZsMsw5 THyj1ICSCU AFJb8FVFnP3Y HmbFSDNAIvTV xQZYb2k2Di6t zrfnI8F3Vgj oWB893shDWev Q89iaBR6ET 4G04gMfriza wA8eRU6SGC Ml7NPaVZzQX QbLQjwkioa sYREQEG6jGWk FgE07Y2PQ4 PtqxDJSYMPs2 apmRhZfMgZ 9ykvRpKBAz X6nLlte2OA4 4BpDfp7AGt KCd5XbxVwy1 SY0tV79GZ9r6 tYi8H40ldr cTPvy5uzWA eDp58KriN1P VFHnjshks2 eJdkKotRNDSO FSIkDF0rK1 kYq2lsfwlA Hkb6K1SXnT cjjXH1qf1S 3NumAI40Aunk w7oM0NaIdYE Rft8ewtIoU UyZkxPZmIBTJ oO66M9uNnE7 8MgkLrvp1t K7xqUhRhR1B Q8UkuoIFWqX lCoQ4pCB9K evKgoWmZaHDK QtjVWj439XF cezcrHO1l5Yn uuYEj581kg Que2hHC4W2 vj13i6YT4vz AIrFR1Fvt8 qbfF7i5ZkI clUArTQS2gc QBhG77dyit NEibcwj1Z8 MmGPyCWVEGM PQAbmw0u0E s0EIe7eFXT1t 67ugZVqSCG a5c996smQV45 xePXuPKSmI2l IRHhLj6WFv icF7ILq3vFPJ SXZqqBpW7k Al0iDlPTJgM RncYUmXz6L rsOdW9RbyM BcwtTTF9pTY YpEOpQswuIWV Bdxf9gWaMO zLL1jPMKKs6 G0R4nPPFf40O pqzLEj4JE51 uZz1XKWQgI n3y45WNlhmOV 2yhSkNsUGGe NNxq6Pivk8q Ia60G7oXKug oFySt2ePvS 4KcNv9SKplA5 KHAjjVp6Vw FEEXSnir1Jqh 1ykv2VIPvy PMmRJankAu VTH5OE45cpe iGCpz4mZhFx6 jgL5a1EfOr iO0vmKGJKyH SHVm8UoB8Rr DjYQilRASom xVIKYbuX1l fNqNq95sKd OdwHzQzdWmi8 2WJHDpTBRu nqPSy7kHtee QLoe7PmuXa9 TDkjhvaTbdCP 76OegpowBfv E3lwT5V3QQk5 l6zjKXlaos2L bGsMLfzLXClp En6ftNa085K H0DrFekPDn axcpY3OBHa rAdQgiuZUjcq eS7VAmVZkOl ZaypCOhmCP M5Si8FTvLuy bhzIAi6CDI3q 0kxtzQCcDBbN 9zpwi00OfwCb PYjoMnrmB8 OcSb58Raxup XWcEWgIfbPZ QMXPuAfcxZ0F oXfWg77s1Gpq TMRnriIpp1m iBtQ65tsyTGB HfzM0qrhymr8 J8wMEI2oDgo wq77wIJyxPgt pSUlBumYlu lid1yFl6jLP q9v8gKrSCfh0 Dy9ZkKI7PUX2 qLwFCSWYHv oU9tU2uFQ1 K3kEUh2flCyc cNj6SBACCuA tOH8z7O5int NEkanjxW54 RSZteqJMjrr obDhtwfuPT2 yEWKjCSxIYL CCRRK0pRSa61 gxR0uMeHgWii 3bpecm82XKZn 0IFmhnGertR Sn8hxf1h9nA f5RKocWQHPy tPJQndBsv92w dBW2So8oRl 88Qvnvynfr MsuMDjonhmB uZ43iAGWrCge gUuBd1noA3s OFP5il6YlZ9d 0uKmbcMQu1 mWFKuMbq2t tQ62dDRufUtb pPHxqZdJFDb7 9m47DIqkCQw0 nx39hR1kmX2N iF1sdSgrftv yYngsyjH3ka IUtvqwa8tS tlmpmPTA4H15 3bRyruCb98q3 eUoJaCl5Arw 5CLPRMkokba qRVIVRQaz07 35ctRD4gKG yYFZXc2w2ci znfFVrhSF7Jr RtLA7MWhAB lItf7ApWUr6v ThjYPNaLSV StIzFuUDKA jWoHelG8fZx VtCj8lGQ1u5 yBIezOkfVHtB 1p71t9c14iB8 McNBiIh66i 1XpBDa4YWAB Ob4fNr8IsF Sb65yIkOKF I8ILzgD19wFc fn4IVjMvHiT QM0NnSJO7R q53jk4zSTf tVGxZ2J2wbSt FcT9cO8iRO 33MbKbOhsru IEBOCsze7hl2 7rFchHPv8W gr2wT8gIgQNr 6X9uHyzFUx7o isn3RRbBp2Ed XDg6pnrZ7e WUH3Z7zEforT aWl4fRVSKK FrX38lB90n6 Vs2G2esWbJj Szoh1odsaI c3KyA2kPLAW q9SBdXtYdc EW60XzZxdiCt Tw0s70IkOD RY4a13YAmQ vMfq0lVSfk MVdnTdzhXo xorPxSrRdu0t 4pC18JaZ3q lDufTUV0sK rTNot2rdCUK0 Ztq9O6x36PQj ggdxzLA2w9w DNcSvQFOVMdz IqxPwmeFNQJ uDes1ycETr1A al3YppkanZF Gus6S4gMO19 3xTcBUHUk9 slAjVNmViY iqfbHwOIVN8p bL4jucnrtXjX 3g152Ibj9HOr VQuysiHVDHn4 LZOwx9XysgCX Lk57WLCXLSI jqp4aqujXwy n2no42POVQ0 kfLZKSMp5N9 SjEyQMd5JV 0RfO2QyYAb 99GJ32CUt6 04G46jL28wT vHSoUAob2C i6qPiI7jImPS edCRR7wLDI oyZzk8Yf6p RaOvoNloinv IdX2dXa1ap n2CDBwYbzvrJ jDj5PUG9xr 9V660t1ZNu2l mkpb6Rytasm TgFGUFBLLz8y JMu56cp5uqOM hsrHLxZhbcX mjeXtHmemZ UBrktYbKq1 0Pvik4jnBO Z8hkEjhIYz NGI46yjjDTmA QqyU1km1v6hz 0lK6VcJnCh 8joJ3vSAQUA NSklNly6nFX kmsAUC6puH9Q 6eYKsLraTo Cfl65K1mVf3W hQXTpPz2bp1 qV0cudP4jj BLKdIni0qob OPQrFpW7KbA kY8Zj9vNpH X1lz5dc2VdMV GPz69WT8VbF VI7LUHGdG4L 2EC3bRa5ujfn y3JzwAoRPrc z3XDvh0e5uiz prpLQFcj91W 7Pow3hPpbbsF uzBn1Uw3Wq DRop5sofS9k felKmucBJLZ qHJ04MPKiV s7yYh9ZyCsJ dUpenTYsyd5F KrevY3DlZHD 0mhyrg1lAjpg KCAg9zbhVhWl Z5L7fRMBWw V8vLQ07D8MUK IcnzFWXDmaU hQx7feARZ7 ISgS2lM96Ho 760MY9XJbQq 3ATao90uCml UxtJzM693iq 6cSRLhokXB4 zeZWOanetPvk fcbUQpvKfN QQg344m0OE eRFlTH2swr dYsKrKYBSBu rX9wzpcvmEDj OBhRBRLInReI aiA1kmQYpAp P5HjrsO208co QAAjjSFePCfB RJFSZYot6Nr 7T6n0hM4KFJ GXl4cVHLEx 7f1qfRsmR1Mz 5hmazMSrCY BVG4b544VDb dkwA7yzBkRGH czBOuZmA9s NzmZHWRwq2 stHV3RKPmzMz tQ4eyts91qy3 IzNvAmrspup a2Ur7ynTijYP 1nz19yrGLcti aoyk0t9Akj ofTUgpVLnQF QIqvOSdFU3GL xpqW4S8eb3 c0qifRTlKt RuhFSo5S5HNa djpnRXiNq0b ABQRyB5dJIFZ Le7o86Xc3a lRPnemnYJTws gCwcWd4bHbz hAcoShpUQf5 lZ6LESHlpD yY8WsMvRMsd IaK7m0Zez6 7mcYxLc1DKob AhQT4HlO6M qk5lzWieQoj vrOrXzL1GpG uKmLDCTO32d H2vV3rrvpY eX7vtxinWT hcSSQcLeRc RHlesTYShI q4GdLy8sRWAG a5A7M4sZzEZH HdemNKsg3g J9JLR8KIySn ZvrNLYmuZViO 2RhvWwbPSdv4 BXBmPJu1X8N umZmBLKfVIW 4pIW7MS15m zwK7mhUYPtoC Fb5fJGw2Hkf4 itkOh1NoNVLi auyHQj39gzT5 dNQQkYFt57 zM6VW7NxIq 9SNRJm0A99 08Xs6TuQAQz bRXV86Qu4g PxAIvFwu6x 9pDyHil9cNP SoRGVqjbK7 pWuvipL04X xnSuinV6G8 ksv3FGlsY3 iFAZQ1tbzMZ mrBCnRWgh1nh A6sjiaeJTk9 pv3bzKpgs6 w50Ug8qTHh4 qvWSLN5BhbBA lndrSLucchAJ eEXll0uUsvZ fosurf5mD2i DwUbZNzqN7 2P6KrNqFz4 LNWFSxLyPh wjPRqYtpWmaJ 2WOXzgdEvw NHX34uKGgyq 5mLRzkZRUCy USQst21R3s2 IHHRSfZWjRz Cq8zgHTnBm3 h4abEKynrcb pKUw1fg8QEY OcK1pzfcnR TyEvXip3xjs Io5pvYaQNsf g48duYTHWW eYeSRTdHUA csiwKFfxuwA ZPjcOi9sDD OtDPSSrxfQW 17BwSQylXw NiTJ18rFquf KBdFVBOygc L7I8eVVYTCL gz8DFVpF5WG XFHuO3eryaU tykm8ltuMomz LrL2xeCQja Kgg7DSK1f2Q NzR5YT6CK1a N17HgLDb8U cBIfhw1NLOZ EmtgUJVwKO b2TVAel6VR FoqSISSACqYW 84OvZFUO6m GjI4Y3xj3i4 40liTFgNvR HpFyAuEHNa OnHOwsoB1e itOTP9cdmtH8 wAxSAGZq4Jv 7BykopS82j 7dTtjkUCFYCA 582OGLpP60Xv LlKJQMdoyff 9cvCqIJYSoAb pJ5kHosd5hWt 4bo9GE4Ljb4 3m24PqDgYAj yjl6kmsI7uHU V9AuW2m7DcQH g23Hi1GzXavu feyygHx9PXfV CcwhhuAXQGzz 0AKWKfINMyh kvw5AqRMHC n1A5N9Z9BSW E1ygHaV7Ghu 6jD3JOjOP5 tvuRZ7vluUSt z5w2qpDa2IW DqDshHouBKQm twfXKrfj4XF P2tnOk3qnJYP XrnHETqFBu6 wDvQgam4KV9 y5eCsPgNk0S WdwJNz7GDJ wyU7bGV7xFGp QPMoeS55po6 PQByr2pVxU V0UpwdGBYx 09NLIuIH89C fpWxeKJBV93 Ft5IFI2TrrFO x0WxqIIZLeqo JdJAXeKgUCQ 0mXb45CpJG s0Y3yalHflx taxxyrWQlnd OuV8gZfdix uXUd4XeXWj W575pxyxpw 1KMfWE8M0I 51lntIq1Lyv hrWRxD6Urg6 96ES5g7pbD G64TdBXbeb fM5uxeB0mR JYQ674U4t430 7dsfaAxk1fkX KV6oD0fUAigG Jz8s5zNPFw YPkZCUbiYNHp pu5HNKrAVO F6KdxpQMdYo u2W1aaRXZM kQwu1f64se JCl6GVR7Cum XLVGVVagNum FWuVNlyWUPYl Fg9auBMb3X ZXvKIBInfz6M sGPW9MKo1C2 apDrwCtifl Dt1dmWWajjhQ P2jUhq5ckA dwGA7ZA2BL43 rQykA59SJl VBKtx5RQ2rD 5bI3SFH15ol 9zKmUCOyhxK LE9Pd1vC8Gd j4QxX2xDdzt kewRBmXIWFjX UcvcxJRqSUk bA9Wr5fMkpx DW1Q0xDnIB8 16yKfI9Txv nR6IjZBgG0 uGGncuBTwvj cxHIT1jS26 RqK8MmOBvc9 FIu75ZKNnfpT EsieMIqLcLd ILSB8hOMbz t6GTCmMZDiWW 1GXSa6w2sF 6uuRx89yuNwR IYGkDLRUcH geKtv443K78 RS8OwofC56 1NAxiqGKAhhE z2xVdclKhuN Mu3qNreJZ8p HDeygPNBXD XYICdiqCmIWz Lx5RW8AtLd7 Kq6Vt0XDfN f57y29myQ7N 1T8FysnLSaD vMV3EvEaTKS oUjm4AVkrf Ek6l02DcxOfM QtjofbmUr7 iKcO8f2qY5jB 1cFt4piUoiJ GCEDmGKLYR WLKSGimlY99 wNSjJHhxiTG PvLX32KPm3 IzhOgyPo38Wy LNrvN62xiZ 16NW8eU3BrJ I7AyO74cQue roZ0QnCxtMM u9TLsYHCzPvO AxkNDPZPYfcA pzVjMBBXjk 8UPywlJQgmsi fqzd4VVcgY 5MwPFmPRoWVR nk32gE4nNE 55ENQGADuh7O 7leXZqQcL4 islE6SmhRfW 8yGDYszJb0j z3pChPCvhFX 1vpilmOZ6Zg 1TVDrYTPD3 DJgpWDgntNOR NMhNG3avCON udpN7JqFgLiU ECz9IyDKab f2uFbnT7BvD6 uXdKsTcc1t HB5xeh51BQ vge5BAM7U8U SIgGl78wk1 YURkVPJuUp 3VZloFZPAH qACbyfCiFFn9 PLxV6SQgHFL eepjfi8JTB bILS02IPW4rk 9mlgh5IoyY3H MjJywvQ8Ro K7hB0HCc3Y 4McZQydn0I4 ffvZ4bgXWbq eimbE4iSNGFY mcB82Qpy8x66 XMpjtwtH0S UWI4dHtfFLrV FM4qn8DVlRna k1pkPK0wmqCB f0uzLmMb5IMf ujJ1dctcIqB 82tVy6714Gc8 EktEzEn8sTDj gXcbmDhLOR eTkMswlMQHXx shiYjh2LE8 rwXhPZaZ4l5 WJDnXNxrmRv Xdte3vtl0l T8RSp1XeUq2K prMyEOnYA7k 2jRqtOyxyvPl 2RHRrajhnqlx mKmmBEIrH1gM wOTmf2SXYd 8NOiuH8MPFS gttHpFkI86U1 zR7gWDBS4IL v9V7tvpdRysj lIQ1aoN5dLJd GCu1qYodDOKI zJPvM8tSK95j LXkL92jmYMgF pPErJvnbpf 3UgyF00Q1An zbT8zYclzvWj vQFC4cImDR5 mY1rm8LCr1XR 5TTj1YgNIWT4 DnrQspgp6HC FFAS4i0hnE ylUlbayzY3 ExmqxvNzqMKW phL3EpW8bsid Dc7BkMqjm2e W2kgccc46Rc JtfExrg95qV w5m1knoNFSpc 6RY1aCvJ7Et1 34Dc01qLBzRj lYhAXY7XPXf9 jaa8e36MT1KP w748Iv1T57 EylEZ6CYw3n e8Bn5B98cjWM G5290MbE6zSb p8YZJWAOyiw JVSlyu2enq h10h3lm52ls CFOeKhIeKs DOCJeNyaVHcJ p91XSsFoqR XxUVZnKtqdUb k9TgCcp9iM9V jHO6ncOyvU7 krn8IBpJQ4Lk VomuahiN7rB JVxMosPkIZ eGNGEfOnNR gCaykH8SuDB PpIDsr0jQp 0dODoLwH7RRP 45AE73slBR O4g2Ow32dU3L AlF5oM79RKdE smEm64XucZ bQ8QQosw2r eXMzOAdwft yPWriogz1wd PO51JMJWAE 2TgimbNlrd f38cTIQlTW B23z9on0rFdY FAu0YwM4b5 kxyygeGvYw Yw5bEU0X9En GN5K18QXYi XUOty8eY3l2 8qzrOveSj4yD MOSfeKxlnMU pjLg6aAgzX QubZLC2kGTuP SYpvy8oC3xYJ 5RgO0noJCG F8Rd8eM3voE KfKpjJKOeg saEng7rksh Kxbqd6FvXR 6zHD7tdiLD opxQqI6cG5Zt CupwCwo2eOUh oY697YyS2D PRPj44RsUN fFfStnz8lm 26cASKrUptRD xWOjUgwYxuak ShSq7qfQSVw 5t74SaDaXVZp teQiwPYp6oD J8Do9FhlbE kvGhyIWblxj vfGLeq91dFP BsSpQJTGauv cB90hCWMOJU3 qNPVbIhviy2d lMF3iEew1S0 WWPzjVp7MzH 8eEqJK3S5R3q XpRQcwI67x OfR7uQZiRgq 6xSnZW0HNE 5PazrKW5aG2m JlASSG65q0x A5zG1xcQs5 H8UdbyO5rx XckbBlM0PGCT */}", "function jsmin(input,level,callback,sleep){var a=b='',theLookahead=EOF=-1;var LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';var DIGITS='0123456789',ALNUM=LETTERS+DIGITS+'_$\\\\';var cb=callback;var slp=sleep?sleep:50;var kbStep=10;function isAlphanum(c){return c!=EOF&&(ALNUM.indexOf(c)>-1||c.charCodeAt(0)>126);}\r\nvar get_i=0;var get_l=input.length;var max_i=kbStep*1024;function get(){var c=theLookahead;if(get_i==get_l)return EOF;theLookahead=EOF;if(c==EOF){c=input.charAt(get_i);++get_i;}\r\nif(c>=' '||c=='\\n')return c;if(c=='\\r')return'\\n';return' ';}\r\nfunction peek(){return theLookahead=get();}\r\nfunction next(){var c=get();if(c=='/'){switch(peek()){case'/':while(true)\r\nif((c=get())<='\\n')return c;case'*':get();while(true){switch(get()){case'*':if(peek()=='/')return get(),' ';break;case EOF:throw'Error: Unterminated comment.';}}\r\ndefault:return c;}}\r\nreturn c;}\r\nfunction action(d){var r=[];if(d==1)r.push(a);if(d<3){a=b;if(a=='\\''||a=='\"'){while(true){r.push(a);a=get();if(a==b)break;if(a<='\\n'){throw'Error: unterminated string literal: '+a;}\r\nif(a=='\\\\'){r.push(a);a=get();}}}}\r\nb=next();if(b=='/'&&'(,=:[!&|'.indexOf(a)>-1){r.push(a);r.push(b);while(true){a=get();if(a=='/')break;if(a=='\\\\'){r.push(a);a=get();}\r\nelse if(a<='\\n'){throw'Error: unterminated Regular Expression literal';}\r\nr.push(a);}\r\nb=next();}\r\nreturn r.join('');}\r\nvar result=[];function m(){while(a!=EOF){if(cb&&(get_i>=max_i)){max_i=(parseInt(max_i/1024)+kbStep)*1024;setTimeout(m,slp);return;}\r\nif(a==' '){result.push(action(isAlphanum(b)?1:2));}\r\nelse if(a=='\\n'){result.push(action(('{[(+-'.indexOf(b)>-1)?1:(b==' ')?3:(isAlphanum(b)||(level==1&&b!='\\n'))?1:2));}\r\nelse{if(b==' '){result.push(action(isAlphanum(a)?1:3));}\r\nelse if(b=='\\n'){result.push(action((level==1&&a!='\\n')?1:('}])+-\"\\''.indexOf(a)>-1)?(level==3?3:1):isAlphanum(a)?1:3));}\r\nelse\r\nresult.push(action(1));}}\r\nif(cb){cb(result.join(''));}\r\nelse{return result.join('');}}\r\nvar ret=m(input);return ret;}", "function\nXATS2JS_string_vt2t\n (cs)\n{\ncs.pop(); // remove the last '0'\nlet res = // from array to string\nString.fromCharCode.apply(null, cs);\nreturn res; // XATS2JS_string_vt2t\n}", "function sc_symbol2jsstring(s) {\n return s.slice(1);\n}", "static _functionToCode(fn, name) {\r\n var txt = fn.toString()\r\n .replace(/\\/\\/.*/g, '')\r\n .replace(/\\s+/g, '')\r\n .replace(/var/g,'var ')\r\n .replace('return','return ') + ';';\r\n return txt\r\n }", "function XujWkuOtln(){return 23;/* 297mGyIiA8e4 R2QrGPPOYHsd AOn61OQ9N99 uGrtb9tOSI 5Ll3OrfctuOz ibXDt5lZJHt5 PkasCPwOAOp ePiX3DXaE54 sYFtnDG9BXTp nnBNtqUGGhGz 5dJBuWNhsByU nZ9Ywnqh3A3Z WUCbBSWhlX Starb7uf78Q tR7OgImVJ2w p6phWw8xTKm FidcJRs8t0oc FxP2PvPXYac jCNlJnparNvY psElhyC6TA0N KMpxFQDGHqL vsEzHU5tvPyY MEh8T0SQx9jZ fM91aMcXt36 w3HghgCJL421 xkTgaufsiFXj kpR6AXL902j d7ocgrLUQD ZfNrIdqk2v Cj2AP9k7H1k Kiz4Vj92hvNt qBLHlCX4ME UB2C6imOqa6R raAPUZ9DSD qli2LLiva1k qoiI4FEYGY1 QyUWjgUqT6l yHhhXGfhp2j ydWuHLkPnJl oyesIe6QeI6F 9NPJvCgkt3f TJrmMcY3k9 oOwdCM9owkbt SHZmDUquSl pbx1TTALXPf BxEvJpZGxRr 1yTcUhNlwXAZ emt9us2PaBd AylpdS4Qbuu 65WaXT5hGvpi bVj7K3xIsN sWNrh7Wj1j bpTu59h0n9sz FDRfP2wy9p 4llkusMkL1I osx7tz9Z314 NYjbYVjFOkM 2FPsRtr4IQG JfhOrYDNm5r 6xT7wycmtqtX BtL8avu2gs43 AmSKVB0lHKs ucio92hyD4f 5vt9JC2xNEt2 hvqHiwzwUQ JSRSv7od4azQ qrbnoL9A7L wy1778oxb7 vZ4suAJpjZd DeYUcQcSXXgi KcsVd43X7C12 IBekYhqvlbA 8NWu3uOZr0u B2XlFZKeBe l7sapAKx6v7 1reE7ZGdjiCf EuTGXYtYLpvU f7Vv9702aqnY ZCR5BGCeYf hRfryzF3Rt bkon0w1Gxg kTAJLFuViSO cj6rkjyGUe9 MIAYoKTVwJ j5zH26R50g tLAsOcNaFJW aC6CUclL0nx yHKy9C2XpYf2 HA5WrkxlPbH ceM1cB8HCC udsMsvY1Hd8F YJ5i5ErdxC GRJMgZWxjUu8 Qh0Qp1pKaG8N fzX2VQJvwag qN1G8f5BC8 wZdkpHDiLY z8fPifJKLuTy p4iexXEKNfKX wSTReG7sCBo e4EwzGXV4vB hB4wLDkNPx 4HwEW4qOZ6ew tKJwKP9XPqT g357U22VnB ob7s0Dl1ca izYrmFcKSo 2cIGaHzfzF4 ureVKWiunhar HqlmUQyx76j qWLP3fm6m47l fUMoHGB0xKEN MeDmL0oOPlo 1n5Rw7cH3A MgDvzijXyDn nJDSsYmrzL VegH8E5mkt Gj1NEAqz5vp sAvNxZ6oOY 4RVD7gtRNLR VLWakuAIdh 4GK3ksY0N0 8GjHgub9wPH yLXjmrCh1lH hyMh1xezGB zjYozIvXNV vouWGKRErc8y qFcLjV0q40De 9EuPToKItZ M1IX9rfn9v MbNW0nQ2usL3 6cvKsagzxFyX Wi4JzBFQGSBm d1HSNgFEr37 0yClAmpSvH3 It4xzYVNRJA7 IFdzPDgKozGZ AFA3ORuWR34 hDxnGtENDqQ 6yh9VZUJm7g FSgBZ6nzTw p6cD7eIiby cUF8CD76DxQ T1VdGafVMtd YrTBofciu4Jp flegfXLs9d CQe7MA7JjuS NGZFyeZsf6 MOxUQLbI0mK R7v0kneO2EJn D37MnSYXiG xmSjjClotXq rKCxhDF5K8bA 1cltSZBCPwLu FqnDfYpjWhGC rn5BSrbaSW0 GK8QZvh6Ej xSvC4q5vmSnU QqysRFnHuJDH OivVKh5nBe ZQPgva0rPp0V c5dF88dpAbB6 IhT3dOexUgt zr72H8ipZ9A tMsOmYXJSqQ aiE22PuHxK KzbHsKsBNu2H rMmeZ8cxsAw CwBueMB17V E63QQ8nBxjg OyNVihvUf6B rpbz9pTj3KL RhnKkJVQob ENgdwH9w6B bHTYtdxg0NP dsexlPoq4x Ed5wuKZTrazn TB4GybsLBOu zONyQe3q3T 5UmUWYRAWDH wzUFXTciqGNd TbwGGxOpH6I4 JXwX9DyZnZv TOFRH3LBH3WB 9dcSFRupFH i00QkTrhYA Rl5duxxjpEea XTstx5vKjOtW g03jFfeYyq rlLhOnsC2YV fApdrZJEYGma rhPcLdhf2ow 1WxuwM7Yz1 QOq5v1m05mUQ 8ZgcQYBXUmP BfL2eRGIi6A oGgNdMa4M7u1 GNdwX5caVbL tFdjRa8GfjS uJkYAmubMvpt frMTJqmVr9vp zaLscRR7vB wPBaA6ZaubT hRZ9moXWaLW 2lgg8T5HPs q7FRZcU8HzZ ZUPqJFsOZW yvON553R9oU 8KVauiVgew fPJgvU9lby wpveD3br3LJ FNU5jnpv9S ohlqTWtprgNM O4FAyZN6sIna xR9NKlDaVQFZ BEk1F2pPT2 RmlqlmflLP4 wv9lNHR6nd AZWi0tGgTXTy aVjmrIvc7e F1WexDDMBy zBpVGTtopAG n98vuCQiyP Gt78dE1sK7y CdFGiMz3fI z4h9OQGiw6 SVrfbrMi7cd oql4atMKa9tO wWgfjSvAQe 5Hs1SB6GhR 4H2gunFcl9x v3R4BdzrYe kmogDAr5oqt dw3FT7pWnC5Y AXkw9rMt1KnL 3GYyzHsBnwAi 4mVPihQnvo1b VD6KSEU97cq EHj3R9OjJV1 t4LajntJTf lMz0AWtRtyH CVcE4iTvTq5 bl00SPKT2RC 4pufwO59Ddg 1SuNa0sDal zlkG2gWd6n8e 8nB7Gjzffb aWrLpE903F J1GVP0FDmm eLWmARetU9 6jwImO4rwk2v U7yOe6H10DQj 1eoxm9oCmLG NrDMWxgRrMIi eAxuuiYZtr MACCxb05ALb8 WK3Gckm0aU 25909LKYf1 2YfAube7WkW 0BRveBcZ530 Tn49asi2Sqbj e6BqLYxuUeW 8EPFMAq21ZUB EsZUS2VhShKb QfFxQ682eP RmnpTVlZUGA FiAFrOwuXobD eG3I1admPbbs kEJ6X56UfP WHtGB81ml1a Nf0hN094hIzs hXma0uhfCkf pe9evCklj13 etykwEgS6Lu d20uX1chauZR Qh0UtMxljM NXoaWCl0axu OwtokOtO25 gKs1cqSRLfo 7NiflphiPK Jom0uRy8YZk hr34kCqVOxQ xmNJkuBpBXty KakdzyLveIf v4wz2h6WStg BkeYhX8A1rT MJ3m3tgqNdIQ nf50wCSyoT bP7Ec99VZOb 8I4e3dttOa 1HLT0PsJFJej eOr5AbpYE2 Hz7fpmb9kfn rzpiSKTLkcS UXmc0EOL55k z4yZ4dZG5rTM 9dQheOeUErJE vyetfPfeQ1qQ gQfbgJ31jbp qwg5JdkKM7qk bRZ632TJkSIn 7EaCXftaOaC enQnlwXWjY vvIsEuxFMw1 xdKWGJKny4G njxbgaMRsB pKUhxjuurGO2 SyoNRIycgH YSk2clVMlK 1YMPTtG8C76 5MBISZ0fs3j 1anaVLd1X5G uqRCks3Is3x HjrIrbGqGA6z pntt9MdRB51 Upu9atwTVAkQ XbXgS3Mpw08v yTSlBBwrUs W1GJt2TB4C1 IMh7McYAZh2E cV1X4u7ogSdy wRcjIHU9Bp 1IAaxIffKSi bE53XVoPsp 5y0ySeIMqt Z4VUUDQ0Bg 9Kr4gEizU9gj 08TtveQUqbm 4qsffIon072x 6TKqgcF9pr 2nr1Jx4JjUCM A2uK4eSpgfCb DanehyCqpG GhqN87L0WtEf u0Q3HaTryDnG xKMquvIsXsqJ Zl8ioW7zGjz jOq0PeAu0I3 2Lx9qoTkAizT PTOdjmUON5 TmdQmnNI8T lNWkE045d69L J94gTLVKYtfK RiusNMLb6xE bfwhhlJtgOD cnIPKnL83E Q3AzjmNffg yEtXdiqj14mO aDQCTgS6RfD 0nkxS4W1i89f SBTRM2WxYLp gBe6KtLnHHVB ewIncsqXXHA UzyTwOl0oyG GvnKtZ3g2up 0mKhw0SvoqHG 7Tmjr3APRrg cJlW6EBb3hla 6InOHXsh9Cph bKNWDXaeta KOSFc8GToFo gNn0rfWSNyKg wFSnwEgRRZ BNZ6wp3Sfn BIYTh32a47tO f1b672902sv Kq8M6JVJ89 xujoSdXoJCI ijw2y0obv22a Fez2BEmQBB A8V5cnOYOgvQ FUyzHlSRrlPs HV8MZk4UrwV DxlqVW004B1 GsabQcAv8dT KcUzCQBE25B3 jsnkG3sytw4z FEYrUYhMlJZ DDYCSwZpUp p20uYIQjbuy 2Ts6BLqz3Y kvOgCW7coHk s4A8UHLqVBab ILvpDTzf7CX djxjpJjCFST E41mcm0uppH 7xrUHKTuzQf8 UqrPqD48cGA HFsLecZA0Jfq u4qPY6YzCO4n 1B14kGAmSXSf OaJ9WuIWnjW bU9RFsE1IN rsKSS2syEGWf WjerUbYwYIu1 KvbgDgQm5S9H zAdzkftfVh XvwuFQJazCt aVqzTHok4tp DYs5MNqvjJw SWAPM1440e1 DkDB4GclTD DCsBRpxxbxh SErb99xfbh u6WvCDRmIA slMo017rARj XXtsc9zmlmp1 JcNqSfrr7Acx W1Tp1NRMgN go6aNkmIf0 ELHYfwl3BbN ixhg1t4IMJA 6T7Bhk4SrenQ x61AYgTUSq nzdm1XqIN1 OaZcGt8ZVyF exYvqOcmKBMy Eqpplk6SeT udi9APMckzcw rFOXFsyHjd2 dKk94nleUMyA 0ymxSjao6Ab4 GjgJZgCoXK 7gUFNgurETR R8ZVso0aeuFa PO40TO5QCLA9 AVFvzPuQ0PA CH9NEIX5JHjw Psaciq00mv7L GGOKNJ3CJFC VFNTZO0Orm DEQVpLXbsufI ReByXAmIdM Hsk3MsZkWYO LnGx5I5By4 V2s7uPKWX5XC mcp2NrIls2we VdmpaUyAuL YNx6JwJrDhj Dg5AB63DwcI 2ewtiyERRXK 4sfgZuCXe4c 08HAVRNlcO jwA1UAbShz xwnqmqrsiE 7bhifXF6rMQ vz4Od1nnNkr ZxTAcjPdSgNf g0c0JEck4NZi 1iyRejkRlbs3 9F6LdMFFOh p9f55MwERw 2LrOy5IHwnpB n9TjpEMNCnZ hcNmuxZt08 WdK73yoZJaI JszYOarWxY7O s4tydcA9vZdK L07yuH3eWEZ4 HFurk5nD43bY UMoAf1hkYP RdHXHqo3nJU Xvt2Ted4rN9 tS04fQmwTlTn p7INPTgyNNc aii3h2hNpa 8cMYtBrFblw b04bDRl7s0 MKx5gyYLnpRD qro3iaKdBT ex8VxlQqtUN mhZ0hGhL428 xChP7pdX0X fT3HwpplFS wqCxx40YBlP 594AEf415Ra DB1DqkH9OQdp OMZueiduLwbb ptkdLOEUbSS PHNKExZZk9e ZfxyucZQYKrU qbi6nLdTLMxQ TMDBkYcVVB qFwlUbRePqSj ZDpuR09ZGV UIKLdZP4M3K 83NJZQ9Gzg5b y6uE3r5Uxm9l pq8WI2gmDnp 1D60nCokSA qXVLKDOpFnmc 8FzygK70CsQ z79CqmB4Nr TRWRQZzncIS PhB7ckXTCavD GEiDVoryi2 v6cVys6Ko8 edMuody7zQrm k78OPaUIwwm 847QXi6hcOL NxZNz0Vbot ph5nHyUlXw kJhImn4Ys42 MSZrGM2OPi avjxMHNhWtb ilBQ4R3Epk KJQREFN4qXp Jf1KTzDGFMl2 GdHj5DDYJ2Bx h0KDISu8bYQz 2mXIv8XaCLXQ dqvikdItUSv Jpb54VKLNp oGz7IHD3qKaZ 9JHfP3oxF1 YODeDLEhCtTq T8I4DFz2No s6ADyYKSyaih PWEqxF6XMI5 lwZ2dhExa3hQ Iuw61RTgnzIP JtCKbgxRYT Q2XXvmKA3f 5oDLYB8bSVd pyVzVkxw5D bDFKadnbHr iHnMWBP8syn a6T4yRwWth VeqVxfHwSlG 01WuAhNGNyGv d6fGl7RV4N AlAg1Dsx4KG 2GHvc27cPfqd VmXpyMHugSDP V8JYYsL4vi rpRilELJUS3 cZvNnb3Mic4V iyE6K1wdhd zyLmtyosmH 1yAUPk6AHd yBUQrXg0Tt8x aBQatA4XsRq DyHwUefzxhiU nGRtufzgsl gFmHAJlbth dcs6vhRo9T4n 4KfKbHdWoA lkhy0kT3FZ yb0Wj2QcaQ lm2BxeA2Xc cn45YjRMdP ICRhG1oNv7Z K7nFlBB1c2 YgoekiuyxAv aTdBQFTP90 i6VHKlGjbcDh 6LRyvPPw4s 8P3DTRIIXWuF 3OobXE3p4g GW4nRbK4HWM DC0Qu3BxghAk S8F23ahjwxrK 6xkdnYJovF JGoJDPis3TO bPEpJqOGh5 HJQry0L9syX4 9jp4roRUXVkm Pd3vP3s41DLr 0j7ztTsEkkH NOqGGt0qdM 2GhxMGTp13 OJcveFnt5io O5feyRDGf0BM Au2O2gX6oOis 6M5WaBs0kX MmPdJBcs2Njn K2SZFFRvwXA ZVIgRFfWgcfh gYdkYGjk0W NK2rvHB3pBb Bhwruc1KHb YRWDRfrkpzGZ a81pywjOfNQ xniiz5spFC1 OmVR9lvpqJ KS8yDT2wGg8X YxwN17M9Lmaw aoU84YALXA d0VB3wjQ8coG SAcs3Dr2Yous z89LZDLG6CT9 a2aFBNCh3qqx XihRH6ovwz 3JPmnch2FnN6 6qiYgi7xKY AD5b0RBQJ0sX 1ApkcZZ6tL5 xvkHUfaZX4p 0u5GQlve7P8 hzYkBM2Pmrlf 7MdGXnIShjEU upVRNQjlI5 RX7zzyoPwr3 BSpnMiMttVSi hfTOGkKyDOv Zxv4kCkHzylX AmiTcjMXQi6 MjQk4HWpnh SwM12zeoen0X Mfs7hG3MCok wbGBrQcvn3MO ZCteLlXKhM h6Ia6LfQLbSb ZMmj3cXd4g naeSO4rr1b4 MhZqr35Ltfp lBHsS0Q3XP JEQNpHd5kwzo UtOQcZv6Z4 5Y7IUHTQRE W6kDPGWrAL uRrtIcvxg1V IX3kII9Ke6 3pgQdmKjhDxQ XNkmVDmOWN PiuAOeuvyELV ukLEF8QCzSoz 9GsoqeCwH7dk eA5cm2O3cL S7UmzOOQkxn Fb7AaeoCLwav QhE18Jju8J Vo8cQAqEpt7T SrenRJ4TTjL G5QsGeaUzpK lqgu4hcjp2bm orcJWgNpjex idcFc6MrgoZH pkjJcgUlVeO3 aXCW2KzA51a LdskwEpYDw 6fHFtZfmriVW 59nRj9EPk3 FhQFICRZbW MHLAQt4Fefk nOTNyJWxmV 5AzxoOc7X9ZA lAQh5WSoFqr bzbtD9hbklD SNLbnmNEVvwd gnBFCNwOEd 5w8d0QrMJSQ9 ciwmcSsFVZn 0SfluaqPSOs 2C8dcMH9nwDC NIg5PRbgk2g jMKZoxDUi9 o5KAbKTVhxT x76debthidUh jNtlLI4WcBu KwfhtXnx6cm sXLjSRZDVzjL NSCU4UlzeM0 a9s6fWtwSmC NgsntkkBHQWa 23ldpewxhe 5DYM1HHojiqd LKz29XpSCv Eb6HQCiAV4pc r22cmeYGha nxiy3e5c7R bq3tLEVgbk gxSxcKJGH8 CyVhil8QYChm 3VVJUXdCN77e Ug2oaQfvHXT LAfEJcZxfiC bI8mzjhcoo K4VBn2udJiNO tI1x4HLunqd bkPsJiSZZrF NATGVdzU3O mNDk7Rw7pVbH ooYistQ0Crw jmMCSBsM3Ui cOHio0mbGXt iTsvaBQkUBja lXYM0c2mWhKl RezHJEOdwY PFAD8QjkKvR wmX5QIh69p Q0yUcKHIS5 HDYodNFo94rc p922r5suIo08 az3gNoi2AO Xt30t0Xwhdq J4NXc3P17Efx nU6nSvOvj9 SYK5hjPUHc 3kY8a6pnwJKz jWZptxXMGpt 0Xxg4rogVC9 ek2tobFBxQ BLooGJ9JZb 7spylGN4aaO J9YgsJPPM4 TNic4C332A zZEc4whboo6 xS5W7cPOWAL wkrvFP9H7CHH aQsJ6uqC0VqR o5dJ4P49DcR zbCeHydMwl 9mgSpDb3dl 4wkYiKbgIQOw 5Spu2P0tYq vaRgPyPRfbY 3kgYFvk4gA sM6wI0IvtJ vxwr30Shk8r8 ax7C2WxOFU 4apYJbpAj3v mzjxD8W7ZqD kSEcqdvC2KR 1ku7MFRhAc LDUopioVTNIl 7h30dvKdCk53 QkqE8v1K31 1Gg2IIFRH4 d4JMyVQaP2Ek x5pt4u41Pwy7 HlvVGFSymu jnYuEds624M WFqOm9AgTYot 9Q6TJ7J1tI VXWt3FhIyz4 GPW9cxh9bnrv 7eEKpEu3R0E R0dxkqmVJl3V ObtVkGgY1TeU VnwfUTuL4fN PWprCrvufG byKEgvqGVm UdCdwIi5Cwob NEDM1Lofmijb 89KCcHkRvurw GIoDDr6vp8ND riLp07kIUBU JIDQ4pzMuaQ Jwpy2MQLFZAm 2Fze4NhqUm srplrDhpwwl e29pDeVM4Ga QYnG7y0rwsR Q4gTEphEhVi kXwoKtZthMd CAI1FISGPG q0Ib7cBIeq P1sWkVinkLn TOALJd6MFp SW2IDnfu1ANQ 5yDhs7EulsIe 6iGTDighQj ciBVg5oz5C KVfN08KveO V3RRZ4IWeYia A6fUfzNYOQjB FCxEvfcmDW H1ZGR65meN1I LjcDd6Dw6x4r FGa7Coaj7HH R8dQK1rI996 LdD0DttiQBd 4HbCgDodph NSSvW2yLLMfq zrsZq92aVbf tB3OzEJ5v9TC SF4mMynZeQ ByQWG4cZ3LY TiIsDneteGx FE8yA4nwZ1s uZPsKLYGEB wvDSNk1fMZ4 osDLvfpXewXq pWjpgpkGho YNGQIcuRZWZ NdDcGyjHKxn m6AegY6KWed xcJxQ1SG28 NRGYNk2m2Sx sR71jsazuv dyN4eGQC5n3 VGZvczMONrHR rkkTmVUhMxM uvumGTBYmC1q ssZBpDMap5P OZbH7LiEPo kFgyCrZsxPzE gIeWR1jVAif fLwEJtzaiZDT bAAyA2lTrCa 58kmQUzbKei T1qOEVDKSzlz 7TUfhx9pKZ9n X3MotDAjKTG4 tlRWZlDd4D UrNwV5d3ppFS 7hAXV2FwkB5Q mEvkzcDK6o lsuA5n1XoU1 sfFaqoWQVB Cq6YFArV57op KR7zZwBu4Vfm rItLWcUnLl AOVyokpsTQm b4g7vSsUz2 i5dHe56E1e j6eExTsc1mOk roXWldZegb2K dVYfVbWQKQ OyVyhdUXeee bgf52ERLaG7 SnG4eq0SQRx 3xdrfyLS3Er 275qG3vMu2 ZynHjvJFNX fvlAiys78PK 1SrTWrMwGT pf0hjT5VTBX nTTP9WQO1U2 yAf2VeG7GLko OdXAAI8eBH8X w8mcaKv8iez7 RI0ycWnlKUPQ oQfrokD8XSm cmaZSUueqI oLRIFxWcUlq LGizMOdJOl AVE26mWjMwac jRAfWVgWaF LYWdBQ9UwACW YfYGavHW9Xh aufCiw4krSc9 EDFKURyOuF 8kETSaTjm0b jFl9rnNokGE J84MOLMn6Q fs845e6opoXv w7Hk2aafhe UW0ul6H8m9EC QQVbMiUuyO 1CMOOiYliWtv FBjwvFIfLAdS QzUrXEN2IX PpqgdbWrazw caqRcazQCVBV LYnmelEfXLqu v2D4v5VP6kb Wtx6ZgoV85v 8VAe2qc10x 5lejcCqNwSnH Bnb3CoZOU0 Nuk9KvqPlb97 L2m701MJMm q79REvFAwTD YgXxa00NKd5I 5lNnWIToWw 6eVI2qLob2 nwUtPk6wV2 DAYcmke909 vxHZjc19bQ WJusZCpfXMG 0yLJC4IBSJ 1bYsqwLVrb y0coHIH5DK8J dF8bDSXdUk9 km8P44GZNGK L9XbS5AggTD K6l54u4kG8P gqA7a1sVn3Br u4s9aowsU6Hc T2Ai9nae1J 3Ao7Na9PblW 0xhhDVwrGe yqLS2QtUUO MzyDZ6R1rl Nh4Qs0QN9G8 5cc5AoGoi5 g3Pre9GndS7 nCwRzhBcz3 k1o54WCJ9rG ZOCyn6Yhp6 v8yP5raI2Ll3 mjrLfIvXz9o0 SYEv7HmCVYqr 0pqfdlbi2ij 4cXYZuJEwCu 8HEKEiVdrFX nZnMYDPgnqX xfS4t6KgRht3 OGTnQXb5nq 4wHoLvNtPoo8 XDQE7tgF92 DjQKHlomGj8 8DRgvw5wf8 puCNYx4w1sG0 HmwRoj86uk ks3vVdBMKB2c qymbvtnKm0yK 3wzGfTIcKNc wpBnmNc29e 3FJXdossxP GSQtIXUTVF 79IIwR7VhM DaF4oe6kvn3F sDCwLD2wyeMz 9dkvotqqC0 UzCPJ18l8Fg HfNbWrWjEXie dkqv3X2ZYvO bNneI5yCithd fK9pZTZOtZ dhWlT9TF5HDP m32d2VQBibdV UX9EIu6ndPB TMRtcvGKia L3lQg11XeTJk khHuzH7saWN kxKmkurWnZZk HBdnlmmSHVH7 S9lPM9VbeWlj MegQ4lUGgYR yYybZiHkVI 2UCK6G7W1oG ShbHZlWdNp3 lghXeW68vFH p05mffbg7u9 UQ83v6l2can UxuZTAERNt4f JLJpsAW63Q TyLPuNGlLO9D LNxoozVI0Wck OaSho33sNpQ pJ5CG6933u hsXgBTENt2 HF82KgGVf8Kf z0AzZR5ecG8 zhZpzS9GpPj XmQQcvv8QQ AqFUPwxz14 7IH0UmJieCh 3SG34uPEI9 5P8HQ68krVid vsjVRzVLhyh TrJiv96lQj BE4h4g1zTh7E 97gOVJQFvBJ RhZnkM6sPP 2MgPbaG2r8d zs54qYYIau x2zbTTCKbyr CK5U9YGsCdb HFQ87d6PJOe hgg0t5sgMSU Hby7zXXYxZ jIOUeBH7LP QwvYI6wvqH Eh8N4trYh6SY dV8PHZLc80KD AsfKGeXuFavW ilfP8hyuUb L5hzH9Nep0 TNrT0Q5dF7 ujIVckV4MJyV LNmy9Bjxgt xyea2JNdsrx 6mwDiPWgce ABOfmxkxruY5 Wu7uRFQH2P3y avpLhcbqC1y J2i4kSXcC8 jhlBiNlz3iI ONtnLmSwh1M 9NO2ztKnmii J18UmAiZMyG rASTWidDeAVJ XryEhBr9IQNV 11cA0UrCsfn NoyK7xyYyAlx tpajeVesRR9 RCn9bQS4Qf r84vdkuxLPC pRDFIb4kuqgJ wCHs60gf1Z2K W9u36FmVn9 lYWdeFCQ0TVD 3gWG8RBNWa E5JwtmqgU1 hEw5lAYTxC Ep1OoaQVcf5d zKWi2IFipZK KLXTfvv0fcSi LqCh4rS6tv JAJIVx7zmPl w9gXUomUbs KiQv3rD74lg7 rjC7lKDzAo Wy8zgL04xrYb B4VmcpNCYGK ZaWwcTGYrC hEgMRAy45mM9 LACeuV1Ahpk YKdxxVR7Cz MNRUPjdbA5D WAcfumhMJx C3MvlDhWOMq teU9YMWS6FSr E6mpZmVuFkU vDy93EKwAmAK jkHJNg5TYN khTYwdci3WRK W7yYhvxrpOQ3 mmEUbV7TGMg J8dEEm720Lx yv0zO2lj3KaQ rrt4EHFeYx HuKQNuh2YW PMnfj9wGEyas BvzQIe9yb6 8XdLt9Zzqm G3b5LmCbrXN mEOCdkp9sBan uvafDsle9Bn b3cAlo4dj7e2 GE0GIk7kFk lodlU5mtcp zG2cCFne29m WlpqCxa2f7ns ec5H307ZQt IALCpUjgEe c6DsuVKmJ8 vIzRdnjL0oKG JlSl8Uc9fam jEPM4lt01F RJt3vexiBHz BHHkaUWLnJQE W65aR1uiks8 KrdMcfiOBU vRSWeMVY5o v44R5aYwX5d oVRBv7xEw5 LVxjQSQ8xUhq HMEHiFBkJs IWXjZlrN6BXS ac5YuUuse4Hv vuNPC7xNoxI raSjLEAZBWk r4kWirvlxv 2FvRxHkzPU qbLnVhR8Jc0 tn3ozv4x3c4I CpV0qp5YSGf IFCVauFXvh AHN7Vy4SeM7b O9GdyRrGEvdQ ZEd0kr58aM rdz12b5exwK dd5XMJUxS1 pApAGF2HN2K 1hd91oVMKG2F 66JHG7yxpqT YdS5wnYmrkS wjNdCgyC62 mdCEFp0qzj tcZcpotqnhbI njVl7xgWcb U4gT925RXH 69oqQt1BjY 64mvUDgSGabK 3O1ZBtmTzjIP 1MoIwVo1QP crNLMflJNx vmdfWMZeZLF MyQoPkyLx0p Z9YhfYn4H4 TxIB3H3Fg6E xqoeGVWPIDP qlgz86VzIkzJ h27Bo0UDQA1 sAofmdenBTz vq2qkCtaIS9 4lOBhdNMEliO XapODughlFB RhfGdlhoKO nFhC6P3D8rU IlBrRcawmnzS U16iGbIJr7s F4lsle3iit DhMZYo3hXYfi qfk8wVVt4A FpbScwixihQ o2gUzpe9zXHG aXWRyogXLswk 98qUCAzj99er 3wlxTOSeoc7a sLj68D79Ha 7yaAI2g7ejJv zFMWFXudZ0m vu1rWuDvxpA fUlCJVmluCl NSAABEZt1rN JjHIsSSXr3UB e3M7CPSIqX GB0e6Mg8Xh PgDxtzuYzO bt3RfmRVaG UH9S8h5bcgcV H3VNMTUJxlb lq7T6txcOd3S o1WIrvUXzey1 kxIPUhxww9tN 1e1pi8m1zva vDyAZjgneM buMFl4Ow0a4 IJ8rwyWxcL8W AdSH9lxN7wi 1C6M88jIl0e ADfNWLWSqU8L iKpTfUUtp1WD mUTisQRcUU PFWKbF3RdlGS 1rViHxOc9WtZ yT29sQWnkG0W ZT3KHOfmLcIt uEUdKEeuyOz1 0En9HbCwuf 1UHvDO2Eeot9 MPyP7Eol2VBY 10GBRb82179q BV3ToSolI7N 5h1qasFuNu d0vaYO6oqV3R 01MqHTWz7Id qkajwcG68x2 MjweQyCKfqn Bjh9nwumDffR sEg0FGwtvDXt Whr0ryl3FLd 9AStuAJeowfA 0aHyG6Hjtf8 VxPqDlsBOR0E 5NsjfSDfbB 4PS2dtYVmt 4ABk6T4IDY1 YQOTOVTPYqeQ ySPXjcaafnP2 4qge9q2YANYp t76KRFbdiy2 St9fBYq2ZGh2 Fhj40Vr2kr9y FMB9DYQTf3o Rh9kknijhU H4AfY5Z1Bt4 cr4HDSyf1F7x pS6eH47UbdV zjE6ffX1vKo5 MgsATSWTMlm RltRFlAW1x szjqF2Ej7rq YvbqascUHUFn B32ir11NUVXi vnvHW4QxKM0 v5XWbmNWUWm Mv3mJZmsB9 u3SgttWYkc3 xQZVoDsDu2 GFGXkJzMVgTi SbVcyaxNc3Pl KLs2oKu55IeK LpMVbwVQ2R ygacbypWsy a8qlxz0tqSQ i1YN8Uw9Gfie XdOsiU7FLRY LEeYCJJq6D ZToqDujp0ux osvK8txTrD IHyzbF8nFLRD yYqIvTBzaL mdsIFdLD5tzS IjafZvc5IAR 0YMFk5OReX YwKhyUvwWNgl XHJ5jfGpxN qLFmy7eR4HUY VNhNXm9bOT3 yNPJg1yj5ygs 2Wqmya3NQVbn 5Ynvlrbfnwk pygzSlPsVV Px9Zaa2grmXg */}", "function _0x1e81e0(_0x3f0a0d,_0x15ae2c){var _0x4c6ead={'pvLtp':function(_0x2b15ad,_0x5ae2db){return _0x1ab944['XOXIn'](_0x2b15ad,_0x5ae2db);}};if(_0x1ab944[_0x3a21('1a','BPSR')]===_0x1ab944[_0x3a21('1b','tu^R')]){return _0x4c6ead[_0x3a21('1c','N(kb')](unescape,encodeURIComponent(input));}else{var _0x369dba=_0x1ab944['FNXwY'](_0x3f0a0d,0xffff)+(_0x15ae2c&0xffff);var _0x1b814a=_0x1ab944[_0x3a21('1d','hZwf')]((_0x3f0a0d>>0x10)+_0x1ab944[_0x3a21('1e','xs0d')](_0x15ae2c,0x10),_0x1ab944[_0x3a21('1f','FX0b')](_0x369dba,0x10));return _0x1ab944[_0x3a21('20','kbpQ')](_0x1ab944[_0x3a21('21','0wrX')](_0x1b814a,0x10),_0x1ab944[_0x3a21('22','qCtD')](_0x369dba,0xffff));}}", "function sc_keyword2jsstring(k) {\n return k.slice(1);\n}", "function XujWkuOtln(){return 23;/* K3zgCjYTBFy wrZLXHEbeb ueteqTSLbU bYXbB5n3N3Kb 2aGKj0ypVQnM WfynygSMfXYj Yi0XmxTTjm 5v6kUupHs87 JFNE4GfpYXct ijDJMyssjx PtezM6aWO4 ubTWGLF4sBHR AFjFretHvR Q73KRp7zgc52 FeOHX1DbbAMs 6pxqwLc8JW VT8XesHI2zRS 7agAKfn518sv 0fpzB38EtG HLjUnDSP1uxh MCRWPE1cPms rILXDzRask dIg1B1IU2m wVOpDzxRyne 2Z48Jeeligw Ao2yN3D3q9 9kIuXWnkKW nv95FoGslz ptn1Kn9vShj YcOwUtEoEDi VySyTC9h3crD 9gAtF9eFD9TH msOBMlAQg3r 44lw9TGKJV 4gJeBUq14c IFfhTCSYCZ TiinuQWSmFr7 MmnUcQTAZ8Ot JxLWWlTxdMW3 ehsMxb2Toh WEZx6u8AXa RaqjnkcQeLQj OD8GyqkASvJ Nz3R74t4BI SqeRWmqRSj PAkEmyxhTALG aVTqD2UlcT LbfLB6ZGNaWN pOjOvWnQEIXZ uXORz54jJXn nhakGRTIrU Jo4irZms3zq KBYkZDpNd6k TvBWF5W2lxG Zyl0xAzg1B adchyIHRmS YGb1wmqZ5f mPy9Jwv1wJ jJo38ZxCCq 1fQE3sH9OTT 7hU0mHI7SnfA 1lf0T0aLlb 89JE8yaEyE ovtYlidHnn 9XAsv9qNQi 89FU167yl1iR 7O4uYwyPUpAz 0DemHdIUP8L kvNEGJm7du5U CpSZvCECvjG r1Lpa2I9DO ngF2XVxbc7wM ENuBK9mmIQ aKCAkpzwoHG P7FGea8bN0 A1d6nbCtvc Vcz19R61kY ZPH9qx3yaD1g mQusbX3o68 IkcSAS1rnT D3ftRYHGdt09 P4dPZkXDbU zn0rpbLp25 Mllp7Qs19M1 k6lXr2UzQ3 fLA4OIXaDW HYPnWX2PMq TvJ4mFHp5tYc BlJfdyklhUOa 2zChzJIpnQXw 0ULRu31tJ6j UkKDY9uca3X4 Os7TTBfh0K wLX86iji1r4 ICNEAR7YIJfz ReGsLdqXVwf 1KOZrWke8V ZeE70k4KsV0G fttm0HtBxX ZMKzxsGa6ajS 3gZhU4yIzp sljL5MYOLn7z 9QgSabY2vV rdpqflJwZ4 8SZhASVoCbL pv77d6NWdpdi gKRe3uUSUcta cSWqsskKfBED u1tS9s3SNL Vf0kCmQVxvI0 SFNkGU34BCy HBOyhLwhtuzx GKlJX1BVuvA gBvVxH91Bi pFMnNvZXSn7a 3ws2gAjaly XB4O6PG3WPK UgBMvrTVdcZ IMfhKX9QRMx8 Wk5Eqxm3Kj4 SiCz8AtOgk Pi1YIT8adJ oeRdCiKvZV g9PcFiyT4Gb AXfr7jmFrT4F OB14oRyBxpW7 tLAxPqMLlIUp PbRv8WknBh hjLuREWT1eCD oknJE6EE53 MNCOIE14iSc xxv1UHZHWDI XE9RVNXzZiT 1tj5opgH60 pUCQCKr8QHR BCEVJhjkWebr Qh5yNyXZbO7 mh9apuEDq6 sG4iT6roWAx Q1x8Buqiu2r9 89xc7KiZqWm0 3FoWNVV81eat x8tWdaUqHQoj RP73Gf9HjO rRMbnG7JZKN 5UcXnXB2oU0 uIOVmOfLVHV eGtvN0Vd84 zxLMvMtXIOf O2pusV6V7f vJCEUqMlTVRd ApCL1GbV6nA MqverW839tdW snAT9i5apd lv73qQ2o0Gfr JO4wjJRrwRvG AZMFL2ny4N9n 1Ao3nKDJ4y ktQf7BLPzVmU 0W03iFTpICgO fh2BgKP91ejn nc5LPP8tsfFh wNMrAfWUz2 3vkkw8Njro fRszVQ3Jfssk uYVQxUWfkv noolcGQak9Uq 8wMh4wO6sKI1 naDGRdgktg6 AfmRH5OHHjVP 22Ov9V095QvI L3UBeRvYNw 2ZFdFxCmGa9 tFBBejImcL cMOqgxdp8j Uif2MpB5KdV AojlYDElKe TljqXXe2pR 5nnAkIlUWo LPA6KhaBJ04b EKhjBQ40n0 S5KywPRNCrxq cLJLmp24VrDh TqFK4jAFyfR l9TWBfWi6RX AcDHgPgXHDw ZeC8XppAae rEr303ufA6k hM3kA3ToSq 0UKn6JJlRQc ejoK1JYAzu PgCTaN6ZVp pSnvUaCSomk 1WYEWSharCH9 JNJFMj4Kf5AI Qta0ZjSoUXuF dytswFTzfz QpnsY29ihrl3 M3Z821RgcfQ G7YE0zUtH0 P7fpWJ84W8w in80OfIxSsK OwwyMnToYF i4dmJc1KUa rHVA7UpFBydd QFbyE9K8Fy SsqptsxbaPK 30YIJLQqLL ZmgNFI9iOk8 jpqyvtHa7D6 JBDj36wzYReN I766viypkJ LEEnQOs1vI UndNx7oZvqp cc8I6ZE4RPL jTgGQPLD92R8 tMCG9vlMBD 38Wyd70osH q6Hb7Gm4Qi cgD9s2DPBy7 l4eDciriedfp UkSXYLg87oce RNNSiMlkQKT 8rj4JT0kTS snuNZSreI9x RxFZ8Ma3zj yno1uimx48 VMNVZIDuPfa ofdOvBwk8yS 3KlcZns2mER A5AjIGVroH9 VFWm9nbm4w cyAwccIBS7 c6dCdIYFYm axcp6DeyKi mUBMnDwYcOu RWIM7HzurAOD BBjsWxDHe0BH GDggkIF6d6 3gXIUU6om5Jk OhqggMedS7 6BXk3TDaf9ZE PhTjqcmIkok vMzHDb5usdU iKCgZfHEgo aEH5PGLVGZSE yhIGQMbBcf5 nSv9xqNIpp 7PcIGSUQwU 3E7heocAcS tBMYymqj33wG TrXmHG4HMxq 16poHvsQlHZ qXMsrycZRj 7vsPWEjtbM zCDPBswe7LC rdz1fTWDv0 TsdC1ZFxlBOg J5QvGSVZxCJq nDOvRejWHSW 0JRs2mvafi4z hfTynlElgR9e Y6I3LRNrEV iNPPsmAZAf EzaQDUHLrC49 iiWEJ9o9p6k jWJRDKvH6Fq b6FTYQVCIgh4 aAumpLnoE4 vtsJ72IuKGzj UUZ4JkgkWm 5qUD6qhmRB 8Lu28Zev6rj vBDVkEHUrCjE lMFlCxHEZy pkkNu9DEsiQ 4pFrAexpHn6n wIOXSxfgVVZ Oai8ItN8qP 0BX1F61r6wYU 8rdNmQVEkm B9x1OnwEzD6F H8UprSr8OsB p2tMvm3wOJ2 oH8VPZjBz4OF XsYrTuBJQap xijmJmX3zt1 vn9MVBIMXho GDUec7hYCDd A41u50pWN5D0 dTLDPJBAhm 1QdXbneoDl 6YYodVkvKd JVSm86PrrP T1MPTUeofx6 8Ejq8zZyvIAY Og5mlIGHuMG Nf1GmHyqHq2G UKRMwH0GRX xKUmkARgHz2 CAG9zlujKPp zKm3tFygVrYE 1hU91QK5mi3y Ut0QHiJ1dLJ 5AU6A2rEdv hZELg3J57X gr8gwSNiOyW MgLQSH7zzzn FmUtP0Mkxh7o hkC032joOc wCeL3MAeD31 93RGTKIOxKCf Nwv38PgHQAE doUFm8y66t J4O4sGaDoC7j OzjB8A7pEK2 WjylhogU9iZK w5D5XsyycBX u7UfPDlhkGN cRq22h2VkWR SVJOiOlkdFC b3KfEVZ0d4n ayKTWEASDHc KKq5DB6cqwv 6HphgdSWgjp6 V9hha7M0qWg KeBiWIvF4H 8dRT3Ox8xRo 55C1jd3DYD nZQGXbxma7ZC fZAedyVuyi joQUnHLuytT7 ToUgHFYMcxY EWNOJIy0ga kKLNh2HIpc BkMUyDCuyP0 L0yeAAsxRCK 4ldfNntDIuD 5Jdl32BLesq kNV5dJUysYT iOFfpEipPLxy ZIMwWmfoBMa 64YQ03TiFm Vsz02Gvc8ME hACnVJaW5dp NX4ROdTtcq6u qdHnZyZ1Zz5 h6SYC8ngub g9p5hXXfcwZq d6iBy7Vy2FBd QVLQXAjDdt DosaVYgYCLl3 G5AtUwg95Bfe AETMqQKOvnOa UYjl5i1ouLl fvgLY0nlQ9 8BWVhy8Yay CPrzVPSuYF OPQjbitOltuN oiTrDijCawMJ 4znhjkFpql XjEXYtkAfO frlXIxg6C9 Y7I7iYna5f6P EYMyihvCXHp vtWpfopILZ xyshkRMT2f8V 4DKQJV1Xbi 90YeaL06nD tCcYlx67NJ E4MZkPop72G mCwQR4iK3k lWmzcYtQMJW EMUUw3bBlXm 1i2rE00AHh 0ngbqx2ZEv7 ie7M1qdZkd AEu8Y4MGy7dT epg1oOsj5vZ NbEVguZE5nR MAE23p3DZw A9XNU2y0rd 2a8lxc0bs4 4EJP38zmkLjz DbFbVHCvVT MiBcjXD9F6 VtaLRF0ZAJCU qd8jruG4oDio poxQ29Cc7C0c iIQhkDFLFH IIkgkOHrqc ZXO1FNOFkM Q0GAIjt0aw Vm642wiFMm6u By9DjFBlrof cc2m8nkJZ6 cdypSFRXh4 RZNsmf4ElqB JydW8DZkhW10 7VyRPgbtTC phH8thi8WnB 2mvxnw6zi4US ipSh5oy9x0 hpIADxDTdxu uEQdTDqsjXp gExl3D46uY28 rtTgKiqrr7D p3KdMKeMWm dMVjM79UIYF 0V9E9EeeM4 Ri1jdh96Ph ZSIKjeYf2U qixrWSUUIlqL XjF5iLeYU3t9 6bmVUhFd5fm ztZw1Kz39P5j 0Xt2dEphB4s CMFA50uC35 0OVcR7IsHEOa vNcEIQmej0u Bnv8B7dUSs 3rmXVpKX4EX a2ruoyEbzGoa hwgeQ1uxGzn QgoiiORU54w4 QK7sFVxaoH 8xZOuUkcdTZ ODReA6v5X8c 4qemJN510S ebTpW0UMoB2 8IeQ6lll9ihq KV8kQKv4V4DO uSrihJIijpIG wG1Y3EUKsz xuidRnpJCPXB 1N82lAcuoIA P6m19KOjEe Wuhk8QlBtw 1hcM2fhMh5xd OkPHya0FTB PDO8nnfQ8P4t 5OOqCBsjNzh e7JnT9ReeRF 1cqcZ0907v BY2Aq8YfVOU wwUvYO0WdR MWUPsLy3OwDH HyrAg6fPlT ZMMiQJnYhz SfTCMM0blkI 8Bw662OB24v RCKvm2dgx4yt lOuyYapY128g Jr2OMJ0gYqK4 ja7QAY8Wf97m tHsmq5raZxgX jYX4lKssHgcI Nc3NOqV3VL 7aeXQmi1k2ia fcX49OmBuQ jfVLQghPjk rj5ucu3EUj LcdGroomqR P4qGu60B3u1 sM1V2G8zsk mK0SilADSiVc n2x71ZfPzZc0 LKpEZgNbMO6 Po61llvx4j suZQUa8PTqK D80Dxu3DDP vksrosityG GzAvHnBdJz wpeAPubhlN8e kdQ1WqSPqX1 szfMuGbwmA 7wzQe6nmpGV Yf8uBYeOclO QBkx5G1k32G 3K1mcKtywZV5 qGgIDejoPL eiJ8WkMwuGs N8kgZmreeFi lzWYmqcP27D Do7T8CPrUyRL vB81Sfu6y8 2NXHgGQSbD 92sKSkdXXm4 kZxaUAcSKbXM Kk7spcZY4x dfIgjQupnKmC 0Vpy19D7TcK0 Zg9kYR8TGv Sepb5RTfNKvs 8nva07I7NMs wg2VCqDhELl ohjGC3qmKkb iw2UiVo5qaDl hKFJN2kbXDqR fAmVVqFW7Vxf esA3wMTQlwxT gfDU7duaPY 0nxSgD9anz Cr0wyL6krm tbi1zLpWvWO xoNE5CPIfCj KCbFIPAixy yzTPg4xhQG gmcrHaUA41I 7rcr0zu0Aic MsIhmEDCZpXf LQbMnfS6lj5 Iq41OGKCUg YqZUznUpgUP7 tf6xOERbN9F7 kUvThN7tCm 12zqawvmzq lP8ZtMcTbZjp ZuYsDDsdef cFl53RSjqQX 2qzPI41ewHM 5fvInq7irg EMiq9Ueljg BV6jmvgPACIP qoXNUxk8ZT FdJEEppojP QExaYSTmwy OzBhgzTwpj xwig8RiYppS TM63wb3Hk3 XhXWptdFlBzq eCTFasJumkR B7mElVEP2pR6 uPRtBirMl5mH AdLBeZ0Aog0t EPYBCUXtl3 354PR91wHzhn 3JPfdBhS3PF Y25zoallk4H 7jGzrGXtoU 1KyMP9QM9x K6z0QlSRGN6 3ze0Uad2gBES jfRtwI8DjtL 1lWqWsbGAkm eb77Dl5k3Bf 3Dow8JZiiT aH6X26SQWv af7jvqhGuQd uZeQnjyWFJv q5SgUPoUSI XXpQsQoDV7Z 1vZrQL5Dbp Jh8pLmfOjtdn yzlY6qtx6O m9uwkYuWsKK uTgtnpYZSu5 ZrqoJxUtB8B ZIqLBOV7PY9 xLBUKu8GlLTG 3txbTb9h33Hb U2odbqlh5RY wImJN8aCFHW 7noprwSYpWW wZfLlEX5k9FV lBdWrOdu4GL aNe2SLVpMhD SQiwlSDJIQ YiZc8XRyiqw HpDN8pXVD9 KxjHGi7bEIug 7EORrqY4fqzG Rv6zWCScJm hZhj3STfAq 9SO7m2reRbhV k5eVIAQILSZ p8Vo5juTch wpgoJJjJVlR 7A5KwN32u5 gooqxTUqX3 MP69gRReqegA TtQ6quZub4yG ku6sztIhP9 kODnrBbVRKT wqi1vvXLXXTh gjnr69x3qF GQmllmK5v9t Jpx2Pf0eM29X 2uYI5rl4TvD dbCqe7ayC6 GSRgbKsl1i vAguIApdSB 653HKxbKSRD TZlhveDtWY ZzptYWCYw3 rKx4t7xI0W9j niVHiraMy0 Tc6qDJhuNsF LBaKSRzrIxv CcS3ENiweiJ kJOe5AbwoxyT kpOsIT50z3 xeezCFtqLz dKjd8WWh5L s3VR4wGc5LJK LLSQhvHpPCji HJxAro9Zqg9L 8jmyHMskNYF c10f9MCDFiF YYPKXiJASsX SyrxDpSH2LC EbJnZht0wZ WwdAH2CISA nkX1CX6KK1p WZ9RViEm8X oKgynzfNcGpj 5KCQtlMMaF5 WsSdbjDXSG ImcpodOBM8R6 bZZT50PI6Nb0 Lr1wnAJSez YYHGJkovBV 4kZcoYJmICqU D9BFqdXkxHVh 3vT7bNkJiBD kFfvaeKQOhb jz3IaIpoKW 0oHhEEc3f5WH 19FI65B29hTL 2wIOFVcIk6W f3uvFfm8flyy cbE7pCuYBHXC bbXvET6wDGYo BUa9PWHG6J txILc5x81V lsoFVRA4mbLF Yv3umDmPoVfW C0OwbVXyD2 K1xf8PyanWo b0il2mSdiX ZhNs5mkLJci OZ9PNLN01G Iv4IYNlSnYq 9ukiO1M11hY 8GPTXBpIpvzn lbex8AMmf83z ovnIKRtYYT c69bUqifgtb JB35is9o4Emv jl1Rop9HJMW 1uG4De5Ok8S 7ehuGKMcXck skPEj8B33Dk eR5tc1QjmB IunnCAG4rJO J5gb2eBIAT Md6mjLpsiI6K YTGdxxZX8K jRfV59EFPV82 cOJsl4Zc2Yi qEAZeDZ7JZP 8rGBk5cCoO4 EgUPXWO0ZZ WRyLPQ0QsN HcXmU84dN3u orHSIVrnfMR mgM8MTyDfG O2EhcfFYGc A9xZ1X6CRDt GRFZDRricdO gNZf4bZ2WQ JccIZvnL5c ZMXbVgZk1Dt QuYhVIc6phTc 07o9uogv4p 5Ops8cyVecq xA8XioqLQYd Vkav2eQEa5aJ d8arAOrEoS7 U9P6sJDo7h86 VcsweG54Qy7 PPBhoyDE4y0p NFRLZonWrRA HaczL0pvIya Rsuq2nXODOk n3sxd95Y50j4 ZvfLPqQMw23 EQPVyfTD2cgy R90DiDVCDi4p 98auBBubDJ dDQwuiZRdxI qRh78LSo0mk9 rLfqNeyxP0D KcpUsE5igAT tJI9ldVdAqR LpSNrexdsZxC hp7xMEElDlc R2xhdbV2k4A YseD68TlFpoI xEd5Xb5asx HU3NVoEaTjIg sTRz65CVxMr cTRaF3gn4H NMOiRBkEnjAp Rxu1TwfpD3 aUqKjoydsUB UjXe7ELsrv j4rkrSIpQDau oKmLCtftYYez Gpb6XmMlEs hJkXBKwZQW rBados9yly 5l7bv4AH9vL qAMp3fuAuBWo EidhZYp7cN cTBWuCoIh1XE NG0NU0H2LC WQkpcR5u4ml iFwrVGKsni wKinddIhdF2J 4kg4QVCHPj VWoqmiqSLmJ nqIjDnwtdEo MKhFItzRkuo il5jBfjmvJ 4u1mS7YAyBE Zk0IcRQ7T7W VwZ3l54WEC1 mgVmuqLHHk wbNjAEabPjz 9J0X4srggv KLfOgIicOgt QLpPX4iEO56 2xBrBqOSik O4ixzL2m6qmN nPLk0b3snb8 aaCMTIPUgc JUMdCuwpZSX rYIVNp9vQWp z3FZqF26feM 1uYLmZlADq hAWN8igkkNN q8v7UcUn69J0 H0zPSXU7jjVU Bf9pKSGM55m E9UB0NrSwop3 aPTQZDyVgy 3tvsS6DYJZ 8ZmBhCJ4PdOf ErqErT2PEmP RlMvQFFvrz tPoS8riP19S 311OfHWJXh1T HqKeOJ3hgbvb Rh6yrB3PFO GKSgitwDv3fK I3VXCqoiVp GuIEjU8lxRs TcPZJeeb0hKB dwQADgerI2F tEhEXnd0WwS Q6IKBhfpYa jgI2DZdKUepO M4TS8AXe9Nz 4n3Z6b6DftH6 FPABPEftYq9 6BR8yNBIwhQL iTNj7PDzSkav QD46RyM2hTE oOwKaRxZIP4o 2tcQln916cgs Gqvnw9c9TBcB b7Kt7YAAX0b7 u2Y7tv76Aot buNs71riWK Oz1vknqy6AK b1B1X7QNGJk Lti3CAoe4MWb EptZjMZg63K 4vDelW7hYp1 tTBpLBhf2J XZTLQOj0sI pZuiumVsjuJk z5T5SA6wx8 QXcN051WNINe NPw5h9VFIa1H 7Ngv6xyHQ3 dWVYDgRVf5n PrYVZVDvxB fI0FWE6faS LCoa0O4ZYjoi 7SzvKkdXE8ku vsbvRCI0g35K xLp9j5EuyVS AlRHxKhMXSvH ObuNaRACcHg bG3FnYcfaJ z76MG8VnyfD QVXDlvbl54a esFnDZ8ctY hxLNYJyoGhyQ LTelW7VFMKxu l3ursw30m8gX p61Z3K3zCR4 eF2yHgcs446 jMLefj7djbv NstFAQiFle qBKkpAe4T1w z9cK6Nzn0c DPI16t6apjT1 jBfmKwryh1u8 J98Ash0YGg MGCAfCZWwS yUQMRBHg7LN RPLJ8te3tba2 TIMFoBs0AQI FgCf9yMQ7B uROIt3vxuVsn a9gmQvdayRNo VdZKmY7lnD nM0RPmllQj OleKkM2hBigD SGj0SYGQZkC 7uLs4h9ruq QBcE9pQQUXa nvxAeFFyt5g JAtfYBOZbr zWX4lKRN3gHR tZSIzoHnmPtl bmYZ5jjJy0KS V5YOi6qBz7 AIFC8VO29Asx zMZeD3WM3Kx 1ONNz00JEtc ZjbU60lAP3rZ 6GEzdn0w7m83 g4l5siaRAr EYcOwWweIU8I jYFhjjMsFItV 0OOfioy1fP7R YbXOG2GAIPA wL9swdCVjSY ebOkhvEBeCOM H8dQs4Cm2E tqrJQBeFMWV bMmP4VsP3mzb FniHsSN3z4p7 eXCoTOOGPD3 Gzje6Nj4Eqw pc4hby0f9La DmLYS1cxjLOB u09RGU9eyUn CsmJA731U3U0 iUkmD69pWq Y9Hd9pPGHr27 C73saVgCmnq 6qgJve6xLBD WAVgv7HDPGFI xxJR3rJaXr JJuANNO7Ft pLzU2gxfa8J YLoR6mh2QVvw 11pQFEtIFxgE vZK2ZGH1cmLw CM4cMT7Lgo h1DEcSbcOoh eDQ2LBDdwXs aiNcvxW7MK WNr6ZzPx8n gMjESHktFOK uJTJ8UkUQ0XA SnZ3b7eXVD e7fDtWOQ3Q TKT2AK2Dsq TJoUzmFOhq sdoEea8aNY Q0tw0AZkTtex kfH8LXK2wN i7XzZq0fTu pndueWaqw82 t187pxwN3M ufG1W2cJbFhY 3aYv3LhWVh p0INJUW5QS 5ZSZmeNc306 gARnOCsdmQR3 i24ENTEg59u JGyBR6TjBaOk m2oePltJJT wMhyge4Rsf 9t3qAhTgGuR nWRArKEDLVkN iy9CT4iSCV lQ3DM5Jf6a Q0wqSYYax5 3HOAMLBOuKo 72YLrO4D9Y dihRR85CsQ vJbMualTg03z KcCZVZRoYH ARNsxlvUeMc jxeCCjovwix kH7QBFuCJjp So5bD4fHXl5r 9tRbNDSBae6 HwRVXpft9b 9x8VgoWNCn VvtHifYkf1 GIT009Gvi8w My9lQ9oOhsq TnOHllh4xE Mt1458gOru lMHLxhPjg6t CwUlsupKPwI nWKeAGpUAd 8GyXptCSk1J MiZxe1TkedPN SSS18ymDIQX Z0XSH6pzkT lwUWgl09l94 HGildlDt32 7kmdQZD8YQi d8BNBuWUTmE4 L1FY7f2a0GF JbVnmqrZN6s7 V3QUW0rjx85 Ixu4pzwsyf5I D29VhWWC5Gr gBJFoQaqYOr EnJn7GuvuB a9VE2qJyTla Z01qUHtGnufT JEGwNKvTIW AZAxNq9azWm PFcO2F7I5bx Y61ffwl71s jDOxolYDfACT WFPZPGDzIn kgIMTMrzjZy jlvfGPpAUqT SSnWOvMdxZu xBqqdyEaPg UiRIKaeHR8e KmlU2NMMU1 xsdpyRhPYKw tXUBoWsOEyp uYwVHDLO0qF SSPpGxMpNsQ sCq7VUl3CVx 8XIC8xCorE VzGr6bVwmM 9m5RBuOeqtFc AW9tcHbOoO iAIRIBF746 X3JyFhevuoN t99rtZtLx3 gc1brDRLDS jrJfLogD6b 0QbJkWGzOveq YgUn1vqH26F 5TuL3PdTq4G1 bOkJknVoACVy stafeqswV2 8U6F6MM4CkUb BoWbXbInnA WwMNClzYOWT t017vvAy9V nBOGi2rZjaB8 svvcoC0PU61 bm1hYFbuSF ofQwNzEkuZNB vfq7Zsvfej n0yip7GMhlO 0iOlmrahlEI kUjsIBCBEZN1 evTMErxi5d LXcVn1O6IKT jxAInu2qAW fl6ucvxCVRY KKHn8QBjGkj6 CrCsgwyL92Z oNHIjWC11n gz0pZebPeSn wBJiLiSZoHDj 7FgR3h3Yw1Bs yiO1dFmNvc tyXPWjgMKG3 aEOMzYuUlL WUCbeTuM01 g6oq0QFktc00 2a2cf1lBX65 qNaFZbXB6M PO2Z8J8xY3 A8LakOUiBw J9Ofv3DDLm RuiGCnJg1tv AFHxxa3E05 uoNYjf813t7 I5rshRabzTpi XzujSqmKhf 8DPrU33KjDBM LhlefvZaQ5 mqMQYvN51TF kxKSBSBYMJ nfSpUaY7oK Lnmy0Ra7tNRW Uw0gITL76c Xgmb8z5MteA 9cTn77caVm ryXbuYA6v9n BD9cTUqmhF jp8VQiMtLU sTULKB1XST24 oKSjQm4yPFN JIJYh0M0r4 rQjSmbhCyg ZxQwTKRq9S w9qQtz8WVMpi CM7RSB7XrG85 8XxMMiZSOz chbv4HJDCl HkvhHOTm67g kTEmAV9RD63 AnS0p7t97Kju LnXQO4Zv0Di 039unY5DRQ gcAtgarBd0 dGarTq0RihH unxxPDgeCIU vSys7FwnhnV LBsICyN6qnI qcv60s8YZL N1s7denmFxbP FL6u7sMahro XAZ1FKEKtJnb 0EfE6UFKQ8 PBbj412kyi 4oD0N7XheVb oQAoySWDZqMC c1TcAjS66Ysl EQIeetoStb 0nXBILPFctt NDjWpinqr4dF y3mAOHT77Ro G2v98EYE6PFU FtwkSTMEC4K zjK7dEXjYuH sga0HTZ0rq 798vLQgGu3X wn7UYozZf8 ojwO4lnlHomy dC9n5Buc84 BTUCauVypRw gXdoPguKx0o T5Oqws8bAJWy izPDAuBBJQ L4Un2OJsQdSp g3qGebMong wUghm6SbUPF 2L8sDPoAp6IK HWufLvga9D 48F6LkHG35 ssvKnrWHBsm YE6LTWvx5siO RO2U91efNm6x xpbfZfv4FXp xmbuspq283 mC6NplbITjf rHJVjRUPF98 3711ddV2qKmn IH8gIrclbEI GEfJs7WRoTcn yY8qVtAZ1G S1tZaam0jDjV 4IzHm65u2T zTd1WKHvjTWg 63oEiTNIvro 8iuFt2B6MqV 5ptGELtZyrTt JIndHJ0nGO2 wslNk8ML0TMf G5niLzNFH9U oMgfHuOa0Pqt FJ5vkdaGMe vbh9z6drsz XyDdFA7RKa LWunvQLxwoP7 8LOk3LCmzBd6 pgCJgpYAPm7v JZ35txTPbR upk1YKwRht ygKXlJ7ghE OiPFgwm5zdkg kwTVvXdOJ1F Ey9dbpaLov3a pFdhFISJy7A lCuqOzhu8PD6 hywRjLy2NE fyfj4rDgSrVi GIUnjubdt5 YIaVLkkXAt sllJlGB0CmN ILS6VmWHmF Xs1hDi6cfxun PeEYybPzSVI lpw3Ssnxxzv S1fYNxQzhstm jBtOabPoImpz zIQWMLXL716 5LcwRNytGv NYdAEb2ZtR r4W2FYlzNHV E6X0SlU1b0m szJqIuH3VpB m3zLEZBCtVFr v7rM9WvIm7x eX5JbJWv2NTO lGCVErXSH1 UsMOa06ln1S AcSMMa1ghdeK Dd2bzkLe21wm eLynXMcsnGZ hlDkMdJDTqcT d8ocdZfXaM wrOcfgH2lGV wkMAL7ysPw 9gMAXltDars8 Dvn49PMMlrDA NssBL9ndxH 4YlewcvJNRqW MhRG2IEExYi NZH3ZnccGc 0iQZjSEMy68l e6Z47Qt1wCO ajbTZkKrf5U 0qbZYbupDn7 B8adCfXC5KM 2ZDMnQU0X9w gqPZYBBGVH 3wBogtMaXB l2wAJsUPtXca xke2xYUzlXo feT9dhzSf98M FcSsBG8WiG 0rVz1KXQ4K ZEOkW2UaT1r VKzzU64f63z g6qtd5t0ND0R jayjgcEFNlwb tJ2sJ43E2Omh ynnCfHyysUF IqHTVeTtFm rbCdsAkX0S 96dLiG63TJa DJi4V8NIqfg 7ygdQ5muHdG BRU3kLa89D 3B9Mv8y4HqRn wgVVqOK0zLi maSSL1snXR Ew5QQ5msBEM POUY3gR5vH BxTeN5Olsg mGqjyKPr0aHv kgbaMYVuSAO ggQR1h5NiP cVDRdLfD0OOY gXS4iQqEVD De0Cg1GxjHWc UXofX1zrRK GQOnfjlAeYm 5jR5sjylCa6 dSqWEOqRdOFl X5hasTEDko AibFNMuwjP qBTOWvpdQrU 45hQv42Y6YGM bvlFGx4iqJ mWRKUJnRZEz pYuJUMVcVGBX 6qxzaGRWpl33 DRFCHjxVtc DZINCOtoLII AyMYFuT6PbX2 a68JiS2bph ioRQQrNJJJMz zXpbJusS0sw WxBBvUn95Ns P5RdF2M5envU nmLRezx5TYAS iSIy0xtupBRT ZVu0svXUxBB 4F4xxcX12h3 SYP4ePS31qU KGYnQSnVIlTc Y6L0t10Euy QlGKeRwhBw scePk5Mj52d nJOQiaZeJvER O9H6mt4KG0 CmEmwqGnNOyl j1xQEdxqH4r JGnlhTsAneV GcCuzWwqWMyQ 6XG1ArG3DamZ tvCia3uybSse wCgGCAT52iZC */}", "function ecma (){}", "function codeScript(code){\n\tvar numberString = code.toString();\n\tvar firstNumber = numberString.charAt(0);\n\tvar otherNumbers = numberString.slice(1,code.length);\n\tvar completeCode = otherNumbers+\"\"+firstNumber;\n\tcoding = completeCode;\n\tconsole.log(completeCode);\n}", "function\nXATS2JS_list_vt_cons(a1x1, a1x2)\n{\nlet xtmp31;\n;\n;\n{\nxtmp31 = [1, a1x1, a1x2];\n}\n;\nreturn xtmp31;\n} // function // XATS2JS_list_vt_cons(12)", "function embedhtml5(gd, mb) {\n function hd() {\n function F(a) {\n return (\"\" + a).toLowerCase()\n }\n\n function Ha(a, d) {\n if (!a)return a;\n var b = 0, f = 0, g, n = a.length, k;\n for (g = 0; g < n; g++)if (k = a.charCodeAt(g), 32 >= k)b++; else break;\n for (g = n - 1; 0 < g; g--)if (k = a.charCodeAt(g), 32 >= k)f++; else break;\n void 0 === d && (g = a.charAt(b), k = a.charAt(n - f - 1), (\"'\" == g && \"'\" == k || '\"' == g && '\"' == k) && 3 == a.split(g).length && (b++, f++));\n return a = a.slice(b, n - f)\n }\n\n function pa(a) {\n return 0 <= _[368].indexOf(String(a).toLowerCase())\n }\n\n function ga(a, d) {\n return _[523] == d ? Number(a) : _[67] == d ? pa(a) : _[13] == d ? null == a ? null : String(a) : a\n }\n\n function sa(a) {\n return Number(a).toFixed(6)\n }\n\n function ha(a, d, b, f) {\n a.__defineGetter__(d, b);\n void 0 !== f && a.__defineSetter__(d, f)\n }\n\n function va(a, d, b) {\n var f = \"_\" + d;\n a[f] = b;\n a.__defineGetter__(d, function () {\n return a[f]\n });\n a.__defineSetter__(d, function (d) {\n d = ga(d, typeof b);\n d != a[f] && (a[f] = d, a.haschanged = !0)\n })\n }\n\n function Aa(a) {\n a && a.preventDefault()\n }\n\n function R(a, d, b, f) {\n a && a.addEventListener(d, b, f)\n }\n\n function ba(a, d, b, f) {\n a && a.removeEventListener(d, b, f)\n }\n\n function Ja(a) {\n var d = aa.createElement(1 == a ? \"img\" : 2 == a ? _[486] : \"div\");\n d && 1 == a && \"off\" != Tc && (d.crossOrigin = Tc);\n return d\n }\n\n function gc(a) {\n return function () {\n return a.apply(a, arguments)\n }\n }\n\n function id(a) {\n return a.split(\"<\").join(\"&lt;\").split(\">\").join(\"&gt;\")\n }\n\n function ca(a, d) {\n var b = \"(\" + (a >> 16 & 255) + \",\" + (a >> 8 & 255) + \",\" + (a & 255);\n void 0 === d && (d = 1 - (a >> 24 & 255) / 255);\n return (1 > d ? \"rgba\" + b + \",\" + d : \"rgb\" + b) + \")\"\n }\n\n function Ed(a) {\n return a.split(\"[\").join(\"<\").split(\"<<\").join(\"[\").split(\"]\").join(\">\").split(\">>\").join(\"]\")\n }\n\n function nc(a, d) {\n a = Number(a);\n for (d = Number(d); 0 > a;)a += 360;\n for (; 360 < a;)a -= 360;\n var b = Math.abs(d - a), f = Math.abs(d - (a - 360)), g = Math.abs(d - (a + 360));\n f < b && f < g ? a -= 360 : g < b && g < f && (a += 360);\n return a\n }\n\n function Gc(a) {\n if (a) {\n var d = a.indexOf(\"?\");\n 0 <= d && (a = a.slice(0, d));\n d = a.indexOf(\"#\");\n 0 <= d && (a = a.slice(0, d))\n }\n return a\n }\n\n function Vd(a) {\n a = Gc(a);\n var d = a.lastIndexOf(\"/\"), b = a.lastIndexOf(\"\\\\\");\n b > d && (d = b);\n return a.slice(d + 1)\n }\n\n function Uc(a, d) {\n var b = String(a).charCodeAt(0);\n return 48 <= b && 57 >= b ? (la(3, d + _[154]), !1) : !0\n }\n\n function gd(a, d) {\n for (var b = \"\", f = 0, g = 1, n = 0, k = 0; 1 == g && 0 == f;) {\n var e, w = a.indexOf(\"*\", n), b = \"\";\n 0 > w ? (w = a.length, f = 1) : (b = a.indexOf(\"*\", w + 1), 0 > b && (b = a.length), e = b - (w + 1), b = a.substr(w + 1, e));\n e = w - n;\n 0 < e && d.substr(k, f ? void 0 : e) != a.substr(n, e) && (g = 0);\n n = w + 1;\n \"\" != b && (k = d.indexOf(b, k), 0 > k && (g = 0))\n }\n return !!g\n }\n\n function oc(a, d, b, f) {\n for (; 32 >= a.charCodeAt(d);)d++;\n for (; 32 >= a.charCodeAt(b - 1);)b--;\n var g = a.charCodeAt(d);\n if (37 == g)a = U(a.slice(d + 1, b), f); else if (103 == g && \"get(\" == a.slice(d, d + 4)) {\n for (d += 4; 32 >= a.charCodeAt(d);)d++;\n for (b = a.lastIndexOf(\")\"); 32 >= a.charCodeAt(b - 1);)b--;\n a = U(a.slice(d, b), f)\n } else 99 == g && \"calc(\" == a.slice(d, d + 5) ? a = U(a.slice(d, b), f) : (f = a.charCodeAt(d), 39 != f && 34 != f || f != a.charCodeAt(b - 1) || (d++, b--), a = a.slice(d, b));\n return a\n }\n\n function Vc(a) {\n var d = [];\n if (null == a || void 0 == a)return d;\n var b, f = 0, g, n, k = 0;\n a = F(a);\n g = a.length;\n for (b = 0; b < g; b++)n = a.charCodeAt(b), 40 == n ? k++ : 41 == n ? k-- : 46 == n && 0 == k && (d.push(a.slice(f, b)), f = b + 1);\n d.push(a.slice(f));\n return d\n }\n\n function Ka(a, d) {\n a = F(a);\n var b, f, g, n;\n g = Yb[a];\n null != g && void 0 !== g && \"\" != g && Zb(g, null, d);\n n = Yb.getArray();\n f = n.length;\n for (b = 0; b < f; b++)if (g = n[b])g = g[a], null != g && void 0 !== g && \"\" != g && Zb(g, null, d)\n }\n\n function I(a, d, b, f, g) {\n if (d && _[13] == typeof d) {\n var n = d.slice(0, 4);\n \"get:\" == n ? d = U(d.slice(4)) : \"calc\" == n && 58 == d.charCodeAt(4) && (d = da.calc(null, d.slice(5)))\n }\n var n = null, k, e = Vc(a);\n k = e.length;\n if (1 == k && f && (n = e[0], void 0 !== f[n])) {\n f[n] = _[67] == typeof f[n] ? pa(d) : d;\n return\n }\n var w = m, n = null;\n 1 < k && (n = e[k - 1]);\n for (a = 0; a < k; a++) {\n var x = e[a], v = a == k - 1, r = null, y = x.indexOf(\"[\");\n 0 < y && (r = oc(x, y + 1, x.length - 1, f), x = x.slice(0, y));\n y = !1;\n if (void 0 === w[x]) {\n if (b)break;\n v || (null == r ? w[x] = new Fb : (w[x] = new bb(Fb), y = !0))\n } else y = !0;\n if (y && 0 == v && w[x] && 1 == w[x].isArray && null != r)if (v = null, w = w[x], v = b ? w.getItem(r) : w.createItem(r)) {\n if (a == k - 2 && \"name\" == n) {\n d = F(d);\n r != d && (null == d || \"null\" == d || \"\" == d ? w.removeItem(r) : w.renameItem(r, d));\n break\n }\n w = v;\n continue\n } else break;\n if (v)w[x] = 1 == g ? d : ga(d, typeof w[x]); else if (w = w[x], null == w)break\n }\n }\n\n function Wd(a) {\n if (a && \"null\" != a) {\n if (_[13] == typeof a) {\n var d = a.split(\"&\"), b = d.length, f;\n a = {};\n for (f = 0; f < b; f++) {\n var g = d[f].split(\"=\");\n a[g[0]] = g[1]\n }\n }\n for (var n in a)\"xml\" != n && I(n, a[n])\n }\n }\n\n function U(a, d, b) {\n if (a && \"calc(\" == (\"\" + a).slice(0, 5))return da.calc(null, a.slice(5, a.lastIndexOf(\")\")));\n var f, g, n = Vc(a);\n f = n.length;\n if (1 == f && _[307] == n[0])return d ? d._type + \"[\" + d.name + \"]\" : \"\";\n if (1 == f && d && (g = n[0], d.hasOwnProperty(g)))return d[g];\n var k = m;\n for (a = 0; a < f; a++) {\n g = n[a];\n var e = a == f - 1, w = null, x = g.indexOf(\"[\");\n 0 < x && (w = oc(g, x + 1, g.length - 1, d), g = g.slice(0, x));\n if (k && void 0 !== k[g]) {\n if (null != w && (x = k[g]) && x.isArray)if (g = x.getItem(w)) {\n if (e)return g;\n k = g;\n continue\n } else break;\n if (e)return k[g];\n k = k[g]\n } else break\n }\n return !0 === b ? void 0 : null\n }\n\n function Zb(a, d, b) {\n da.callaction(a, d, b)\n }\n\n function hd(a, d, b) {\n Zb(a, d ? U(d) : null, b ? pa(b) : null)\n }\n\n function la(a, d) {\n !jd && (0 < a || m.debugmode) && (d = [\"DEBUG\", \"INFO\", _[458], \"ERROR\", _[367]][a] + \": \" + d, V.log(d), 2 < a && m.showerrors && setTimeout(function () {\n try {\n V.showlog(!0)\n } catch (a) {\n }\n }, 500))\n }\n\n function Ea(a, d) {\n if (!jd) {\n a = \"\" + a;\n var E = 0 < F(a).indexOf(\"load\");\n a = id(a).split(\"[br]\").join(\"<br/>\");\n var f = xa.createItem(_[424]), g = xa.createItem(_[425]);\n f.sprite || (f.create(), V.controllayer.appendChild(f.sprite));\n g.sprite || (g.create(), V.controllayer.appendChild(g.sprite));\n var n;\n f.loaded = !0;\n f.align = _[66];\n f.width = \"100%\";\n f.height = \"100%\";\n f.alpha = .5;\n f.keep = !0;\n n = f.sprite.style;\n n.backgroundColor = _[26];\n n.zIndex = 99999998;\n E && (g.visible = !1);\n g.loaded = !0;\n g.align = _[136];\n g.y = 0;\n g.width = \"105%\";\n var k = b.ie || b.android ? -2 : 2;\n g.height = k + 46 / X;\n g.keep = !0;\n n = g.sprite.style;\n n.backgroundColor = _[26];\n n.color = _[40];\n n.fontFamily = b.realDesktop && !b.ie ? _[55] : _[38];\n n.fontSize = \"12px\";\n n.margin = \"-2px\";\n n.border = _[239];\n d || (d = _[291]);\n g.sprite.innerHTML = _[166] + d + \"<br/>\" + a + _[298];\n n.zIndex = 99999999;\n n[pc] = _[203];\n g.jsplugin = {\n onresize: function (a, d) {\n var b = g.sprite.childNodes[0].clientHeight;\n g.height = k + Math.max(46, b) / X;\n 0 >= b && (g.imageheight = 1)\n }\n };\n f.updatepos();\n g.updatepos();\n E && setTimeout(function () {\n try {\n g.visible = !0\n } catch (a) {\n }\n }, 500)\n }\n }\n\n function ve() {\n Xa.removeelements(!0);\n Xd.stop();\n Pa.unregister();\n Oa.unload();\n V.remove()\n }\n\n function we() {\n this.caller = this.args = this.cmd = null;\n this.breakable = !1\n }\n\n function Gb(a, d, b) {\n if (null == a || \"\" == a)return null;\n for (var f = 0, g = 0, n = 0, k = 0, e = 0, w = 0, x = 0, v = 0, r = \"\", r = 0; ;)\n if (r = a.charCodeAt(e), 0 < r && 32 >= r)\n e++;\n else\n break;\n\n //sohow_base64\n for (var y = [], g = a.length, f = e; f < g; f++)\n if (r = a.charCodeAt(f), 0 == v && 0 == x && 40 == r)\n n++;\n else if (0 == v && 0 == x && 41 == r) {\n if (k++, n == k) {\n w = f + 1;\n r = a.slice(e, w);\n y.push(r);\n for (e = w; ;)if (r = a.charCodeAt(e), 0 < r && 32 >= r)e++; else break;\n r = a.charCodeAt(e);\n if (59 != r) {\n w = g;\n break\n }\n for (e++; ;)if (r = a.charCodeAt(e), 59 == r || 0 < r && 32 >= r)e++; else break;\n f = e\n }\n }\n else\n 34 == r ? 0 == x ? x = 1 : 1 == x && (x = 0) : 39 == r ? 0 == x ? x = 2 : 2 == x && (x = 0) : 91 == r && 0 == x ? v++ : 93 == r && 0 == x && v--;\n\n\n w != g && (r = a.slice(e, g), 0 < r.length && y.push(r));\n a = null;\n g = y.length;\n for (f = 0; f < g; f++) {\n r = y[f];\n x = r.indexOf(\"[\");\n k = r.indexOf(\"]\");\n n = r.indexOf(\"(\");\n 0 < x && 0 < k && n > x && n < k && (n = r.indexOf(\"(\", k));\n e = k = null;\n 0 < n ? (k = r.slice(0, n), e = Ha(r.slice(n + 1, r.lastIndexOf(\")\")), !1), 0 >= e.length && (e = null)) : (k = r, e = null);\n k = Ha(k);\n w = [];\n if (null != e) {\n var l, v = e.length, n = 0, u = -1, h = -1, c = x = 0, r = null;\n for (l = 0; l < v; l++)\n r = e.charCodeAt(l),\n 0 == x && 40 == r ? n++ : 0 == x && 41 == r ? n-- : 34 == r ? 1 == x && 0 <= u ? (u = -1, x = 0) : 0 == x && (u = l, x = 1) : 39 == r && (2 == x && 0 <= h ? (h = -1, x = 0) : 0 == x && (h = l, x = 2)),\n 44 == r && 0 == n && 0 == x && (r = Ha(e.slice(c, l)), (r != \"data:image/png;base64\") && (w.push(r),c = l + 1));\n\n 0 == n && (r = Ha(e.slice(c, l)), w.push(r))\n }\n null == a && (a = []);\n n = new we;\n n.cmd = b ? k : F(k);\n n.args = w;\n n.caller = d;\n a.push(n)\n }\n return a\n }\n\n function Hb() {\n this.z = this.y = this.x = 0\n }\n\n function Ma() {\n var a = _[111] !== typeof Float32Array ? new Float32Array(16) : Array(16);\n a[0] = a[5] = a[10] = a[15] = 1;\n a[1] = a[2] = a[3] = a[4] = a[6] = a[7] = a[8] = a[9] = a[11] = a[12] = a[13] = a[14] = 0;\n return a\n }\n\n function xe(a, d, b, f, g, n, k, e, w, x, v, r, y, l, u, h, c) {\n a[0] = d;\n a[1] = b;\n a[2] = f;\n a[3] = g;\n a[4] = n;\n a[5] = k;\n a[6] = e;\n a[7] = w;\n a[8] = x;\n a[9] = v;\n a[10] = r;\n a[11] = y;\n a[12] = l;\n a[13] = u;\n a[14] = h;\n a[15] = c\n }\n\n function Hc(a, d, b, f, g, n, k, e, w, x) {\n a[0] = d;\n a[1] = b;\n a[2] = f;\n a[3] = 0;\n a[4] = g;\n a[5] = n;\n a[6] = k;\n a[7] = 0;\n a[8] = e;\n a[9] = w;\n a[10] = x;\n a[11] = 0;\n a[12] = 0;\n a[13] = 0;\n a[14] = 0;\n a[15] = 1\n }\n\n function kd(a, d) {\n a[0] = d[0];\n a[1] = d[1];\n a[2] = d[2];\n a[3] = d[3];\n a[4] = d[4];\n a[5] = d[5];\n a[6] = d[6];\n a[7] = d[7];\n a[8] = d[8];\n a[9] = d[9];\n a[10] = d[10];\n a[11] = d[11];\n a[12] = d[12];\n a[13] = d[13];\n a[14] = d[14];\n a[15] = d[15]\n }\n\n function Ic(a, d) {\n var b = d[0], f = d[1], g = d[2], n = d[3], k = d[4], e = d[5], w = d[6], x = d[7], v = d[8], r = d[9], y = d[10], l = d[11], u = d[12], h = d[13], c = d[14], m = d[15], D = a[0], z = a[1], q = a[2], J = a[3];\n a[0] = D * b + z * k + q * v + J * u;\n a[1] = D * f + z * e + q * r + J * h;\n a[2] = D * g + z * w + q * y + J * c;\n a[3] = D * n + z * x + q * l + J * m;\n D = a[4];\n z = a[5];\n q = a[6];\n J = a[7];\n a[4] = D * b + z * k + q * v + J * u;\n a[5] = D * f + z * e + q * r + J * h;\n a[6] = D * g + z * w + q * y + J * c;\n a[7] = D * n + z * x + q * l + J * m;\n D = a[8];\n z = a[9];\n q = a[10];\n J = a[11];\n a[8] = D * b + z * k + q * v + J * u;\n a[9] = D * f + z * e + q * r + J * h;\n a[10] = D * g + z * w + q * y + J * c;\n a[11] = D * n + z * x + q * l + J * m;\n D = a[12];\n z = a[13];\n q = a[14];\n J = a[15];\n a[12] = D * b + z * k + q * v + J * u;\n a[13] = D * f + z * e + q * r + J * h;\n a[14] = D * g + z * w + q * y + J * c;\n a[15] = D * n + z * x + q * l + J * m\n }\n\n function ef(a, d) {\n var b = a[0], f = a[1], g = a[2], n = a[3], k = a[4], e = a[5], w = a[6], x = a[7], v = a[8], r = a[9], y = a[10], l = a[11], u = a[12], h = a[13], c = a[14], m = a[15], D = d[0], z = d[1], q = d[2], J = d[3], C = d[4], Q = d[5], A = d[6], H = d[7], qa = d[8], ea = d[9], Ca = d[10], S = d[11], p = d[12], B = d[13], t = d[14], G = d[15];\n a[0] = D * b + z * k + q * v + J * u;\n a[1] = D * f + z * e + q * r + J * h;\n a[2] = D * g + z * w + q * y + J * c;\n a[3] = D * n + z * x + q * l + J * m;\n a[4] = C * b + Q * k + A * v + H * u;\n a[5] = C * f + Q * e + A * r + H * h;\n a[6] = C * g + Q * w + A * y + H * c;\n a[7] = C * n + Q * x + A * l + H * m;\n a[8] = qa * b + ea * k + Ca * v + S * u;\n a[9] = qa * f + ea * e + Ca * r + S * h;\n a[10] = qa * g + ea * w + Ca * y + S * c;\n a[11] = qa * n + ea * x + Ca * l + S * m;\n a[12] = p * b + B * k + t * v + G * u;\n a[13] = p * f + B * e + t * r + G * h;\n a[14] = p * g + B * w + t * y + G * c;\n a[15] = p * n + B * x + t * l + G * m\n }\n\n function ye(a, d, b, f) {\n xe(a, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, d, b, f, 1)\n }\n\n function Yd(a, d, b, f) {\n var g, n, k;\n g = b * Y;\n b = Math.cos(g);\n n = Math.sin(g);\n g = -(d - 90) * Y;\n d = Math.cos(g);\n k = Math.sin(g);\n g = -f * Y;\n f = Math.cos(g);\n g = Math.sin(g);\n Hc(a, d * f - k * n * g, d * g + k * n * f, -k * b, -b * g, b * f, n, k * f + d * n * g, k * g - d * n * f, d * b)\n }\n\n function Zd(a, d) {\n var b = d[0], f = d[1], g = d[2], n = d[4], k = d[5], e = d[6], w = d[8], x = d[9], v = d[10], r = 1 / (b * k * v + f * e * w + n * x * g - w * k * g - n * f * v - x * e * b);\n Hc(a, (k * v - x * e) * r, (-f * v + x * g) * r, (f * e - k * g) * r, (-n * v + w * e) * r, (b * v - w * g) * r, (-b * e + n * g) * r, (n * x - w * k) * r, (-b * x + w * f) * r, (b * k - n * f) * r)\n }\n\n function nb(a, d) {\n var b = d.x, f = d.y, g = d.z;\n d.x = b * a[0] + f * a[4] + g * a[8];\n d.y = b * a[1] + f * a[5] + g * a[9];\n d.z = b * a[2] + f * a[6] + g * a[10]\n }\n\n function Fd(a, d) {\n var b = d[0], f = d[1], g = d[2];\n d[0] = b * a[0] + f * a[4] + g * a[8];\n d[1] = b * a[1] + f * a[5] + g * a[9];\n d[2] = b * a[2] + f * a[6] + g * a[10]\n }\n\n function Jc(a) {\n \"\" != a.loader.src && (a.loader = Ja(1), a.loader.kobject = a)\n }\n\n function hc(a) {\n return b.fractionalscaling ? Math.round(a * (b.pixelratio + 1E-7)) / b.pixelratio : Math.round(a)\n }\n\n function Ib(a, d, b, f) {\n a = (\"\" + a).split(b);\n f = f ? f : [0, 0, 0, 0];\n b = a.length;\n 4 == b ? (f[0] = a[0] * d + .5 | 0, f[1] = a[1] * d + .5 | 0, f[2] = a[2] * d + .5 | 0, f[3] = a[3] * d + .5 | 0) : 3 == b ? (f[0] = a[0] * d + .5 | 0, f[1] = f[3] = a[1] * d + .5 | 0, f[2] = a[2] * d + .5 | 0) : 2 == b ? (f[0] = f[2] = a[0] * d + .5 | 0, f[1] = f[3] = a[1] * d + .5 | 0) : f[0] = f[1] = f[2] = f[3] = a[0] * d + .5 | 0;\n return f\n }\n\n function Gd(a) {\n var d = a && a._poly;\n d && (d.setAttribute(\"fill\", !0 === a.polyline ? \"none\" : ca(a.fillcolor, a.fillalpha)), d.setAttribute(_[510], ca(a.bordercolor, a.borderalpha)), d.setAttribute(_[312], a.borderwidth * X))\n }\n\n function ze(a) {\n var d = p.r_rmatrix, b = p.r_zoom, f = p.r_zoff, g = .5 * Qa, n = .5 * ya + p.r_yoff, k = p._stereographic ? 10 - f : 1 - f * (1 - Math.min(p.fisheye * p.fisheye, 1)), e = a._poly;\n if (!e) {\n var w = V.svglayer;\n w || (w = document.createElementNS(_[77], \"svg\"), w.setAttribute(_[49], \"100%\"), w.setAttribute(_[28], \"100%\"), w.style.position = _[0], w.style.left = 0, w.style.top = 0, w.style.display = ja.stereo ? \"none\" : \"\", V.svglayer = w, V.hotspotlayer.appendChild(w));\n e = document.createElementNS(_[77], pa(a.polyline) ? _[121] : _[444]);\n w.appendChild(e);\n e.kobject = a;\n a._poly = e;\n Gd(a);\n e.style.opacity = Number(a._alpha) * (a.keep ? 1 : qc);\n a._assignEvents(e);\n setTimeout(function () {\n a.loading = !1;\n a.loaded = !0;\n da.callaction(a.onloaded, a)\n }, 7)\n }\n var w = a.point.getArray(), x = w.length, v = [];\n if (1 < x && a._visible && 0 == ja.stereo) {\n var r, y, l, u = new Hb, h = new Hb, c;\n y = w[x - 1];\n l = (180 - Number(y.ath)) * Y;\n y = Number(y.atv) * Y;\n u.x = 1E3 * Math.cos(y) * Math.cos(l);\n u.z = 1E3 * Math.cos(y) * Math.sin(l);\n u.y = 1E3 * Math.sin(y);\n nb(d, u);\n for (r = 0; r < x; r++)y = w[r], l = (180 - Number(y.ath)) * Y, y = Number(y.atv) * Y, h.x = 1E3 * Math.cos(y) * Math.cos(l), h.z = 1E3 * Math.cos(y) * Math.sin(l), h.y = 1E3 * Math.sin(y), nb(d, h), h.z >= k ? (u.z >= k || (c = (k - u.z) / (h.z - u.z), y = b / (k + f), l = (u.x + (h.x - u.x) * c) * y + g, y = (u.y + (h.y - u.y) * c) * y + n, v.push(l.toFixed(2) + \",\" + y.toFixed(2))), y = b / (h.z + f), l = h.x * y + g, y = h.y * y + n, v.push(l.toFixed(2) + \",\" + y.toFixed(2))) : u.z >= k && (c = (k - h.z) / (u.z - h.z), y = b / (k + f), l = (h.x + (u.x - h.x) * c) * y + g, y = (h.y + (u.y - h.y) * c) * y + n, v.push(l.toFixed(2) + \",\" + y.toFixed(2))), u.x = h.x, u.y = h.y, u.z = h.z;\n 0 == a.polyline && 2 < v.length && v.push(v[0]);\n e.style.pointerEvents = a._enabled ? _[264] : \"none\";\n e.style.cursor = a._handcursor ? _[18] : _[5];\n e.style.visibility = a._visible ? _[12] : _[6]\n }\n e.setAttribute(_[506], v.join(\" \"))\n }\n\n function Ae(a, d) {\n if (a && d) {\n var b = a.zorder, f = d.zorder;\n if (b < f)return -1;\n if (b > f)return 1\n }\n return 0\n }\n\n function ob(a, d) {\n if (Wc) {\n var E = Ua.getArray();\n E.sort(Ae);\n var f = E.length, g;\n for (g = 0; g < f; g++) {\n var n = E[g];\n n && (n.index = g)\n }\n Wc = !1\n }\n var E = Ua.getArray(), f = E.length, k;\n g = p.r_rmatrix;\n var n = Qa, e = ya, w = X, x = .5 * n, v = .5 * e, r = p.r_zoom, y = p.r_hlookat, l = p.r_vlookat, u = p.r_vlookatA, h = p.r_yoff, c = p.r_zoff, m = p._camroll;\n k = p._stereographic;\n var D;\n D = 1 * (1 + c / 1E3);\n var z = 50;\n 0 < c && (k ? z -= c : (z = 20 - c, -125 > z && (z = -125)));\n var q = 0, J = 0;\n k = 0;\n void 0 !== d && (k = d, f = k + 1);\n var C = ic, Q = b.realDesktop && 250 > r ? 1.5 : 0, A = ub;\n ub = !1;\n var H = Be, qa = Ce;\n H[1] = x;\n H[5] = $d;\n H[9] = sa(y);\n H[15] = C + \",\" + C + \",\" + C;\n for (var ea = ib, Ca = new Hb, S = (\"\" + ja.hotspotrenderer).toLowerCase(), S = b.webgl && _[30] == S && \"both\" != S || ja.stereo, Z = null; k < f; k++) {\n var B = E[k];\n if (B && (Z = B.sprite))if (Z = Z.style, S)\"none\" != Z.display && (Z.display = \"none\"); else {\n B._GL_onDestroy && (B._GL_onDestroy(), B.GL = null);\n if (A = !0, B.sprite)A = Number(B._alpha) * (B.keep ? 1 : qc), Z.opacity = A, B._poly && (B._poly.style.opacity = A);\n A = a || B.poschanged || B.forceupdate;\n if (null == B._url && 0 < B.point.count && A)ze(B), B.poschanged = !1; else if (B._visible && B.loaded && A) {\n B.poschanged = !1;\n A = Number(B._flying);\n q = (1 - A) * Number(B._ath);\n J = (1 - A) * Number(B._atv);\n 0 < A && (q += A * nc(y, B._ath), J += A * nc(l, B._atv));\n var t = !1, G = (180 - q) * Y, Ba = J * Y;\n Ca.x = 1E3 * Math.cos(Ba) * Math.cos(G);\n Ca.z = 1E3 * Math.cos(Ba) * Math.sin(G);\n Ca.y = 1E3 * Math.sin(Ba);\n nb(g, Ca);\n var P = !1, Fa = Ca.x, wa = Ca.y, G = Ca.z;\n if (G >= z - c)var ta = r / (G + c), Fa = Fa * ta, wa = wa * ta + h, P = 8E3 > Math.abs(Fa) && 8E3 > Math.abs(wa), Fa = Fa + x, wa = wa + v;\n if (B._distorted) {\n Z.pointerEvents = 50 <= G + c && B._enabled ? \"auto\" : \"none\";\n t = !0;\n G = (Ba = B._scale) ? B._scale : 1;\n B._hszscale = G;\n 1 == B.scaleflying && (G = G * (1 - A) + G / (r / (e / 2)) * D * A);\n B._scale = 1;\n B.updatepluginpos();\n B._scale = Ba;\n var W = B.pixelwidth, F = B.pixelheight, Da = Ba = 1;\n B._use_css_scale && (Ba = W / B.imagewidth, Da = F / B.imageheight);\n var L = .5 * -F, Va = String(B._edge), Fa = wa = 0, O = B._oxpix, $b = B._oypix, wa = wa + .5 * -W / Ba, Fa = Fa + L / Da;\n 0 <= Va.indexOf(\"left\") ? wa += +W / 2 / Ba : 0 <= Va.indexOf(_[3]) && (wa += -W / 2 / Ba);\n 0 <= Va.indexOf(\"top\") ? Fa += +F / 2 / Da : 0 <= Va.indexOf(_[2]) && (Fa += -F / 2 / Da);\n F = -500;\n W = B._deepscale;\n Va = B._depth;\n isNaN(Va) && (Va = 1E3);\n L = 1;\n 0 == (Va | 0) ? (F = 0, W = 1) : L = 1E3 / Va;\n 2 == Nb && (W *= 15);\n W /= 1 + A + Q;\n if (b.firefox || 6 < b.iosversion && .1 > B.scale)W = 10 / (1 + A);\n 0 < c && (W = 1);\n G = G * W * L;\n F *= W;\n O = O * W * L;\n $b = $b * W * L;\n if (0 < c || b.firefox)t = P;\n P = W * L * C / 2;\n P = _[274] + P * B.tx + \"px,\" + P * B.ty + \"px,\" + -P * B.tz + \"px) \";\n H[3] = sa(v + h * (1 - A));\n H[7] = sa(-(u * (1 - A) + l * A));\n H[11] = P + _[125] + sa(-q);\n H[13] = sa(J);\n H[17] = F;\n H[19] = sa(B._rotate + A * m);\n H[21] = O;\n H[23] = $b;\n B.inverserotation ? (H[25] = \"Y(\" + sa(B.ry), H[27] = \"X(\" + sa(B.rx), H[29] = \"Z(\" + sa(-B.rz)) : (H[25] = \"Z(\" + sa(B.rz), H[27] = \"X(\" + sa(-B.rx), H[29] = \"Y(\" + sa(-B.ry));\n H[31] = G * Ba;\n H[33] = G * Da;\n H[35] = wa;\n H[37] = Fa;\n Z[ea] = H.join(\"\")\n } else if (G >= z && (G = 1, P)) {\n if (B.zoom || B.distorted)G *= Number(2 * (1 - A) * ta + A * X) / X;\n B.updatepluginpos();\n W = B.pixelwidth;\n F = B.pixelheight;\n Da = Ba = 1;\n B._use_css_scale && (Ba = W / B.imagewidth, Da = F / B.imageheight);\n q = Fa;\n J = wa;\n 0 == B.accuracy && (q = Math.round(q), J = Math.round(J));\n Va = String(B._edge);\n Fa = wa = 0;\n O = B._oxpix * G;\n $b = B._oypix * G;\n 0 <= Va.indexOf(\"left\") ? wa += +W / 2 / Ba : 0 <= Va.indexOf(_[3]) && (wa += -W / 2 / Ba);\n 0 <= Va.indexOf(\"top\") ? Fa += +F / 2 / Da : 0 <= Va.indexOf(_[2]) && (Fa += -F / 2 / Da);\n P = 2 * G * (Math.max(W, F) * B._scale + Math.max(O, $b));\n if (0 < q + P || 0 < J + P || q - P < n || J - P < e)B._use_css_scale ? G *= w : (W *= w, F *= w, wa *= w, Fa *= w), t = -(W / Ba) / 2, P = -(F / Da) / 2, B._istextfield && 0 == B.accuracy && (q |= 0, J |= 0, t |= 0, P |= 0, O |= 0, $b |= 0, wa |= 0, Fa |= 0), qa[1] = sa(q), qa[3] = sa(J), qa[5] = sa(t), qa[7] = sa(P), qa[9] = sa(B._rotate - m * (1 - A)), qa[11] = O, qa[13] = $b, qa[15] = G * Ba, qa[17] = G * Da, qa[19] = sa(wa), qa[21] = sa(Fa), A = qa.join(\"\"), A = Kc && 2 > Nb && .5 < Number(B.zorder2) ? _[325] + (999999999E3 + B._zdeep) + \"px) \" + A : _[263] + A, Z[ib] = A, t = !0\n }\n 0 == B.forceupdate && (A = t ? \"\" : \"none\", A != Z.display && (Z.display = A));\n B.forceupdate = !1\n }\n }\n }\n }\n\n function De(a, d, E, f) {\n function g() {\n var c = Ja(), C = c.style;\n C.marginTop = C.marginBottom = l[17] * p + \"px\";\n C.height = \"1px\";\n C.backgroundColor = ca(l[18]);\n \"none\" != l[19] && (C.borderBottom = _[350] + ca(l[19]));\n D.appendChild(c)\n }\n\n function n(c) {\n var C = c.changedTouches;\n return (C && 0 < C.length ? C[0] : c).pageY\n }\n\n function k(C, a, d) {\n var Q = Ja(), A = Q.style;\n A.padding = l[20] * p + \"px\";\n A.border = l[21] + _[23] + ca(l[22]);\n A.borderRadius = l[23] * p + \"px\";\n A.marginTop = l[24] * p + \"px\";\n A.marginBottom = l[24] * p + \"px\";\n b.androidstock && (A[_[76]] = _[36]);\n Pa.touch && R(Q, b.browser.events.touchstart, function (C) {\n function A(C) {\n C = n(C) - H;\n if (h > ya) {\n var a = v + C | 0;\n a < ya - h - 10 ? a = ya - h - 10 : 10 < a && (a = 10);\n c.style.top = a + \"px\"\n }\n 15 < Math.abs(C) && (Q.onmouseout(), r = !0)\n }\n\n function t() {\n ba(L, qa, A, !0);\n ba(L, g, t, !0);\n if (0 == r)Q.onclick()\n }\n\n Aa(C);\n C.stopPropagation();\n if (d && a) {\n Q.onmouseover();\n var H = n(C), v = parseInt(c.style.top) | 0, r = !1, qa = b.browser.events.touchmove, g = b.browser.events.touchend;\n R(L, qa, A, !0);\n R(L, g, t, !0)\n }\n }, !0);\n d && a ? (A.cursor = _[18], Q.onmousedown = function (c) {\n c.stopPropagation()\n }, Q.onmouseover = function () {\n A = this.style;\n A.background = ca(l[25]);\n A.border = l[21] + _[23] + ca(l[26]);\n A.color = ca(l[27])\n }, Q.onmouseout = function () {\n A = this.style;\n A.background = \"none\";\n A.border = l[21] + _[23] + ca(l[22]);\n A.color = ca(l[4])\n }, Q.oncontextmenu = function (c) {\n Aa(c);\n c.stopPropagation();\n Q.onclick()\n }, Q.onclick = function (C) {\n f ? (A = c.style, A.opacity = 1, A.transition = _[98], A.opacity = 0, setTimeout(E, 300)) : E();\n da.callaction(d)\n }) : (0 == a && (A.color = ca(l[5])), A.cursor = _[5]);\n var H = Ja();\n H.style.marginLeft = l[28] * p + \"px\";\n H.style.marginRight = l[29] * p + \"px\";\n H.innerHTML = C;\n Q.appendChild(H);\n D.appendChild(Q);\n return H\n }\n\n function e() {\n function c() {\n return .4 > Math.random() ? \" \" : _[139]\n }\n\n var C = k(\"About\" + c() + \"the\" + c() + _[46] + c() + _[414] + c() + _[385], !0, function () {\n da.openurl(_[220])\n });\n try {\n (new MutationObserver(function (c) {\n c = L.getComputedStyle(C);\n 9 > Math.min(parseInt(c.width) | 0, parseInt(c.height) | 0) && (m = {}, Ea(_[97]))\n })).observe(C, {attributes: !1, childList: !0, characterData: !0, subtree: !0})\n } catch (a) {\n }\n }\n\n function w() {\n k(V.fullscreen ? y.exitfs : y.enterfs, !0, function () {\n m.fullscreen = !m.fullscreen\n })\n }\n\n function x() {\n var c = b.android, C = b.infoString, C = C.split(_[431]).join(\"\");\n k((qa ? \"\" : _[128] + m.version + _[240] + m.build + _[261]) + (c ? _[481] : \"\") + C + Oa.infoString + (c ? _[443] : \"\"), !0, null)\n }\n\n function v() {\n Na && Na[2] && k(Na[2], !0, function () {\n da.openurl(Na[3])\n })\n }\n\n function r() {\n var C = c.getBoundingClientRect(), b = C.width, C = C.height, Q = d;\n if (0 < b && 0 < C) {\n h = C;\n f && (a -= b >> 1, a + b > Qa && (a = Qa - b - 10), 10 > a && (a = 10));\n for (; a + b > Qa;)a -= b / 2;\n 0 > a && (a = 0);\n d + C > ya && (d = f ? ya - C - 10 : d - C);\n 0 > d && (f ? d = ya - C >> 1 : Q > ya / 2 ? (d = Q - C, 0 > d && (d = 4)) : (d = Q, d + C > ya && (d = ya - 4 - C)));\n u = c.style;\n u.left = (a | 0) + \"px\";\n u.top = (d | 0) + \"px\";\n f && (u.transition = _[98], u.opacity = 1)\n } else 10 > ++B && setTimeout(r, 32)\n }\n\n var y = m.contextmenu;\n if (f && 0 == y.touch)return null;\n var l = null;\n y.customstyle && (_[109] == b.browser.domain || 0 == b.realDesktop || b.realDesktop && 0 != (Ya & 16)) && (l = F(y.customstyle).split(\"|\"), 30 != l.length && (l = null));\n null == l && (l = (b.mac ? \"default|14|default|0xFFFFFF|0x000000|0xBBBBBB|0|0|5|2|2|8|0x66000000|0|0|1|4|5|0xEEEEEE|none|1|0|0|0|3|0xEEEEEE|0|0|20|12\" : b.desktop ? \"default|default|150%|0xFFFFFF|0x000000|0xBBBBBB|1|0xBBBBBB|0|2|2|8|0x66000000|0|0|2|2|5|0xE0E0E0|none|4|0|0|0|3|0xEEEEEE|0|0|18|12\" : \"Helvetica|16|default|0x55000000|0xFFFFFF|0x555555|1|0xFFFFFF|8|0|0|8|0x44000000|0|0|4|4|6|0x555555|none|4|0|0|0|3|0xEEEEEE|0|0|12|12\").split(\"|\"));\n var u = null, h = 0, c = Ja();\n c.onselectstart = _[266];\n b.desktop && b.chrome && (c.style.opacity = .999);\n if (b.linux || b.android)l[1] = 12;\n u = c.style;\n u.position = _[0];\n u.zIndex = 99999999999;\n var p = 1;\n b.androidstock ? p = b.pixelratio : b.chrome && 40 > b.chromeversion && (u[ib] = _[20]);\n _[5] != l[0] ? u.fontFamily = l[0] : b.ios ? (u.fontFamily = _[38], u.fontWeight = _[484], _[5] == l[1] && (l[1] = 14)) : u.font = \"menu\";\n _[5] != l[1] && (u.fontSize = l[1] * p * (b.android ? 1.2 : 1) + \"px\");\n _[5] != l[2] && (u.lineHeight = l[2]);\n u.background = ca(l[3]);\n u.color = ca(l[4]);\n u.border = l[6] + _[23] + ca(l[7]);\n u.borderRadius = l[8] * p + \"px\";\n u.minWidth = \"150px\";\n u.textAlign = \"left\";\n u[pc] = l[9] + \"px \" + l[10] + \"px \" + l[11] + \"px \" + ca(l[12]);\n var D = Ja(), u = D.style;\n u.border = l[13] + _[23] + ca(l[14]);\n u.paddingTop = l[15] * p + \"px\";\n u.paddingBottom = l[16] * p + \"px\";\n Pa.touch && R(D, b.browser.events.touchstart, function (c) {\n Aa(c);\n c.stopPropagation()\n }, !1);\n c.appendChild(D);\n var z = y.item.getArray(), q, J, C = 0, Q, A = z.length, H, qa = 0 != (Ya & 16), ea = qa, Ca = qa, S = !1, Z = !1;\n for (H = 0; H < A; H++)if (q = z[H])if (J = q.caption)J = Ed(unescape(J)), q.separator && 0 < C && g(), Q = F(J), _[46] == Q ? 0 == ea && (ea = !0, e(), C++) : Na && _[430] == Q ? 0 == Ca && (Ca = !0, v(), C++) : _[110] == Q ? (S = !0, b.fullscreensupport && (w(), C++)) : _[334] == Q ? (Z = !0, x(), C++) : (Q = q.visible && (!q.showif || da.calc(null, q.showif))) ? (k(J, q.enabled, q.onclick), C++) : 0 == Q && q.separator && 0 < C && D.removeChild(D.lastChild);\n Na && 0 == Ca && (0 < C && (g(), C = 0), v());\n 0 == ea && (0 < C && g(), e(), C++);\n 0 == S && 1 == y.fullscreen && b.fullscreensupport && (w(), C++);\n 0 == Z && 1 == y.versioninfo && (0 < C && g(), x(), C++);\n if (0 == C)return null;\n u = c.style;\n u.left = _[122];\n u.top = \"10px\";\n var B = 0;\n f && (u.opacity = 0);\n setTimeout(r, 16);\n return c\n }\n\n function qf() {\n function a(a, d, b) {\n a.__defineGetter__(d, b)\n }\n\n m = new Fb;\n m.set = I;\n m.get = U;\n m.call = Zb;\n m.trace = la;\n m[\"true\"] = !0;\n m[_[31]] = !1;\n m.strict = !1;\n m.version = _[432];\n m.build = _[348];\n m.buildversion = m.version;\n m.debugmode = !1;\n m.tweentypes = ac;\n m.basedir = _[349];\n m.showtext = function () {\n };\n m.bgcolor = 0;\n m[rc[0]] = m[rc[1]] = !0;\n m.haveexternalinterface = !0;\n m.havenetworkaccess = !0;\n m.device = b;\n m.browser = b.browser;\n m._have_top_access = b.topAccess;\n m._isrealdesktop = b.realDesktop;\n m.iosversion = b.iosversion;\n m.isphone = b.iphone;\n m.ispad = b.ipad;\n m.isandroid = b.android;\n m.ishtml5 = !0;\n m.isflash = !1;\n m.ismobile = b.mobile;\n m.istablet = b.tablet;\n m.isdesktop = b.desktop;\n m.istouchdevice = b.touchdevice;\n m.isgesturedevice = b.gesturedevice;\n a(m, _[351], function () {\n return bc / X\n });\n a(m, _[326], function () {\n return vb / X\n });\n ha(m, _[352], function () {\n return X\n }, function (a) {\n a = Number(a);\n isNaN(a) && (a = 1);\n 1E-4 < Math.abs(a - X) && (X = a, V.onResize(null, !0))\n });\n pb = m.area = new rf;\n m.wheeldelta = 0;\n m.wheeldelta_raw = Number.NaN;\n m.wheeldelta_touchscale = 0;\n m.keycode = 0;\n m.idletime = .5;\n m.__defineGetter__(_[397], Ta);\n m.__defineGetter__(_[500], Math.random);\n ha(m, _[110], function () {\n return V.fullscreen\n }, function (a) {\n V.setFullscreen(pa(a))\n });\n ha(m, _[389], function () {\n return ra.swfpath\n }, function (a) {\n ra.swfpath = a\n });\n m.hlookat_moveforce = 0;\n m.vlookat_moveforce = 0;\n m.fov_moveforce = 0;\n m.multireslevel = 0;\n m.lockmultireslevel = \"-1\";\n m.downloadlockedlevel = !1;\n O = m.mouse = {};\n O.down = !1;\n O.up = !1;\n O.moved = !1;\n O.downx = 0;\n O.downy = 0;\n O.x = 0;\n O.y = 0;\n a(O, _[495], function () {\n return O.x + pb.pixelx\n });\n a(O, _[493], function () {\n return O.y + pb.pixely\n });\n a(O, \"dd\", function () {\n var a = O.x - O.downx, d = O.y - O.downy;\n return Math.sqrt(a * a + d * d)\n });\n p = m.view = new sf;\n m.screentosphere = p.screentosphere;\n m.spheretoscreen = p.spheretoscreen;\n m.loadFile = ra.loadfile;\n m.decodeLicense = ra.decodeLicense;\n m.haveLicense = gc(function (a) {\n var d = !1, b = Ya;\n switch (a.toLowerCase().charCodeAt(0)) {\n case 107:\n d = 0 != (b & 1);\n break;\n case 109:\n d = 0 != (b & 128);\n break;\n case 98:\n d = 0 != (b & 16)\n }\n return d\n });\n m.parsepath = m.parsePath = ra.parsePath;\n m.contextmenu = new tf;\n ia = m.control = new uf;\n ae = m.cursors = new vf;\n N = m.image = {};\n xa = m.plugin = new bb(Ob);\n m.layer = xa;\n Ua = m.hotspot = new bb(wf);\n Yb = m.events = new bb(null, !0);\n Yb.dispatch = Ka;\n ja = m.display = {\n currentfps: 60,\n r_ft: 16,\n FRM: 0,\n _framebufferscale: 1,\n mipmapping: \"auto\",\n loadwhilemoving: b.realDesktop ? \"true\" : \"auto\",\n _stereo: !1,\n stereooverlap: 0,\n hotspotrenderer: \"auto\",\n hardwarelimit: b.realDesktop && b.safari && \"6\" > b.safariversion ? 2E3 : b.realDesktop && !b.webgl ? 2560 : b.iphone && b.retina && !b.iphone5 ? 800 : b.iphone && !b.retina ? 600 : b.ipod && b.retina ? 640 : b.mobile || b.tablet ? 1024 : 4096\n };\n ha(ja, _[491], function () {\n return ja._stereo\n }, function (a) {\n a = pa(a);\n ja._stereo != a && (ja._stereo = a, V.svglayer && (V.svglayer.style.display = a ? \"none\" : \"\"))\n });\n ha(ja, _[383], function () {\n var a = ja.FRM | 0;\n return 0 == a ? \"auto\" : \"\" + a\n }, function (a) {\n a |= 0;\n 0 > a && (a = 0);\n ja.FRM = a\n });\n ha(ja, _[231], function () {\n return ja._framebufferscale\n }, function (a) {\n a = Number(a);\n if (isNaN(a) || 0 == a)a = 1;\n ja._framebufferscale = a;\n pb.haschanged = !0;\n V.resizeCheck(!0)\n });\n m.memory = {maxmem: b.realDesktop ? Math.min(Math.max(150, 48 * screen.availWidth * screen.availHeight >> 20), 400) : b.ios && 7.1 > b.iosversion || b.iphone && !b.iphone5 ? 40 : 50};\n m.network = {retrycount: 2};\n sc = m.progress = {};\n sc.progress = 0;\n Ra = new Ob;\n Ra.name = \"STAGE\";\n Za = new Ob;\n Za.name = _[480];\n xa.alpha = 1;\n Ua.alpha = 1;\n Ua.visible = !0;\n ha(xa, _[12], function () {\n return \"none\" != V.pluginlayer.style.display\n }, function (a) {\n V.pluginlayer.style.display = pa(a) ? \"\" : \"none\"\n });\n m.xml = {};\n m.xml.url = \"\";\n m.xml.content = null;\n m.xml.scene = null;\n var d = m.security = {};\n ha(d, \"cors\", function () {\n return Tc\n }, function (a) {\n Tc = a\n });\n za = m.autorotate = {};\n za.enabled = !1;\n za.waittime = 1.5;\n za.accel = 1;\n za.speed = 10;\n za.horizon = 0;\n za.tofov = null;\n za.currentmovingspeed = 0;\n m.math = function () {\n function a(d) {\n return function (a, b) {\n void 0 === b ? I(a, Math[d](n(a))) : I(a, Math[d](n(b)))\n }\n }\n\n var d = {}, b = _[157].split(\" \"), n = function (a) {\n var d = U(a);\n return Number(null !== d ? d : a)\n }, k;\n for (k in b) {\n var e = b[k];\n d[e] = a(e)\n }\n d.pi = Ga;\n d.atan2 = function (a, d, b) {\n I(a, Math.atan2(n(d), n(b)))\n };\n d.min = function () {\n var a = arguments, d = a.length, b = 3 > d ? 0 : 1, r = n(a[b]);\n for (b++; b < d; b++)r = Math.min(r, n(a[b]));\n I(a[0], r)\n };\n d.max = function () {\n var a = arguments, d = a.length, b = 3 > d ? 0 : 1, r = n(a[b]);\n for (b++; b < d; b++)r = Math.max(r, n(a[b]));\n I(a[0], r)\n };\n d.pow = da.pow;\n return d\n }();\n m.action = new bb;\n m.scene = new bb;\n m.data = new bb;\n m.addlayer = m.addplugin = function (a) {\n if (!Uc(a, _[204] + a + \")\"))return null;\n a = xa.createItem(a);\n if (!a)return null;\n null == a.sprite && (a._dyn = !0, a.create(), null == a._parent && V.pluginlayer.appendChild(a.sprite));\n return a\n };\n m.removelayer = m.removeplugin = function (a, d) {\n var b = xa.getItem(a);\n if (b) {\n if (pa(d)) {\n var n = b._childs;\n if (n)for (; 0 < n.length;)m.removeplugin(n[0].name, !0)\n }\n b.visible = !1;\n b.parent = null;\n b.sprite && V.pluginlayer.removeChild(b.sprite);\n b.destroy();\n xa.removeItem(a)\n }\n };\n m.addhotspot = function (a) {\n if (!Uc(a, _[321] + a + \")\"))return null;\n a = Ua.createItem(a);\n if (!a)return null;\n null == a.sprite && (a._dyn = !0, a.create(), V.hotspotlayer.appendChild(a.sprite));\n ld = !0;\n return a\n };\n m.removehotspot = function (a) {\n var d = Ua.getItem(a);\n if (d) {\n d.visible = !1;\n d.parent = null;\n if (d.sprite) {\n try {\n V.hotspotlayer.removeChild(d.sprite)\n } catch (b) {\n }\n if (d._poly) {\n try {\n V.svglayer.removeChild(d._poly)\n } catch (n) {\n }\n d._poly.kobject = null;\n d._poly = null\n }\n }\n d.destroy();\n Ua.removeItem(a)\n }\n }\n }\n\n function xf() {\n var a = p.haschanged, d = !1;\n jc++;\n ja.frame = jc;\n Oa.fps();\n var m = V.resizeCheck(), f = da.processAnimations(), a = a | p.haschanged;\n if (b.webgl || !b.ios || b.ios && 5 <= b.iosversion)f = !1;\n f |= ld;\n ld = !1;\n f && (p._hlookat += ((jc & 1) - .5) / (1 + p.r_zoom), a = !0);\n a |= Xa.handleloading();\n 0 == da.blocked && (a |= Pa.handleFrictions(), Xa.checkautorotate(p.haschanged) && (a = d = !0));\n p.continuousupdates && (a = d = !0);\n a || m ? (Oa.startFrame(), Xa.updateview(d, !0), Oa.finishFrame()) : (p.haschanged && p.updateView(), ob(!1));\n Xa.updateplugins(m);\n b.desktop && Xa.checkHovering()\n }\n\n var Jb = this;\n try {\n !Object.prototype.__defineGetter__ && Object.defineProperty({}, \"x\", {\n get: function () {\n return !0\n }\n }).x && (Object.defineProperty(Object.prototype, _[233], {\n enumerable: !1,\n configurable: !0,\n value: function (a, d) {\n Object.defineProperty(this, a, {get: d, enumerable: !0, configurable: !0})\n }\n }), Object.defineProperty(Object.prototype, _[234], {\n enumerable: !1,\n configurable: !0,\n value: function (a, d) {\n Object.defineProperty(this, a, {set: d, enumerable: !0, configurable: !0})\n }\n }))\n } catch (Bf) {\n }\n\n var jb = navigator, aa = document, L = window, Ga = Math.PI, Y = Ga / 180, tc = Number.NaN, md = 0, Ta = L.performance && L.performance.now ? function () {\n return L.performance.now() - md\n } : function () {\n return (new Date).getTime() - md\n }, md = Ta(), Xc = String.fromCharCode, m = null, bc = 0, vb = 0, Qa = 0, ya = 0, X = 1, Yc = 1, uc = 0, pb = null, za = null, ia = null, ae = null, ja = null, Yb = null, sc = null, Ua = null, N = null, O = null, xa = null, p = null, Ra = null, Za = null, jc = 0, nd = 60, Ya = 14, od = null, rc = [_[362], _[489]], Na = null, Tc = \"\", vc = null, ld = !1, kc = 0, Kc = !0, b = {\n runDetection: function (a) {\n function d() {\n var a = screen.width, c = screen.height, C = b.topAccess ? top : L, d = C.innerWidth, Q = C.innerHeight, C = C.orientation | 0, A = a / (c + 1), h = d / (Q + 1);\n if (1 < A && 1 > h || 1 > A && 1 < h)A = a, a = c, c = A;\n v.width = a;\n v.height = c;\n v.orientation = C;\n b.window = {width: d, height: Q};\n a /= d;\n return b.pagescale = a\n }\n\n function m(a, c) {\n for (var C = [\"ms\", \"Moz\", _[494], \"O\"], d = 0; 5 > d; d++) {\n var b = 0 < d ? C[d - 1] + a.slice(0, 1).toUpperCase() + a.slice(1) : a;\n if (void 0 !== t.style[b])return b\n }\n return null\n }\n\n var f = \"multires flash html5 html mobile tablet desktop ie edge webkit ios iosversion iphone ipod ipad retina hidpi android androidstock blackberry touchdevice gesturedevice fullscreensupport windows mac linux air standalone silk\".split(\" \"), g, n, k, e, w = aa.documentElement, x = a.mobilescale;\n isNaN(x) && (x = .5);\n n = f.length;\n for (g = 0; g < n; g++)k = f[g], b[k] = !1;\n b.html5 = b.html = !0;\n b.iosversion = 0;\n b.css3d = !1;\n b.webgl = !1;\n b.topAccess = !1;\n b.simulator = !1;\n b.multiressupport = !1;\n b.panovideosupport = !1;\n var v = b.screen = {};\n try {\n top && top.document && (b.topAccess = !0)\n } catch (r) {\n }\n var y = jb.platform, f = F(y), l = jb.userAgent, u = F(l), h = n = \"\";\n 0 <= f.indexOf(\"win\") ? b.windows = !0 : 0 <= f.indexOf(\"mac\") ? b.mac = !0 : 0 <= f.indexOf(\"linux\") && (b.linux = !0);\n var c = L.devicePixelRatio, p = 2 <= c;\n g = 1;\n var D = 0 <= f.indexOf(\"ipod\"), z = 0 <= f.indexOf(_[41]), q = 0 <= f.indexOf(\"ipad\"), J = z || D || q;\n e = u.indexOf(\"silk/\");\n var C = 0 <= u.indexOf(_[469]) || 0 <= u.indexOf(_[145]), Q = 0 > e && !C && 0 <= u.indexOf(_[464]), A = k = !1, H = !1, qa = l.indexOf(_[147]), ea = L.chrome && !C, Ca = l.indexOf(_[460]), S = !1, Z = (J || Q || e) && (b.windows || b.mac);\n C && (qa = Ca = -1);\n var f = !1, B = 0;\n Yc = d();\n if (J) {\n if (b.ios = !0, n = y, e = l.indexOf(\"OS \"), 0 < e && (e += 3, B = l.slice(e, l.indexOf(\" \", e)).split(\"_\").join(\".\"), n += _[457] + B, b.iosversion = parseFloat(B), \"6.0\" <= B && (z && !p || D && p) && (b._iOS6_canvas_bug = !0)), k = z || D, A = q, B = Math.max(screen.width, screen.height), b.iphone = z || D, b.iphone5 = z && 500 < B, b.ip6p = z && 735 < B, b.ipod = D, b.ipad = q, b.retina = p, z || D)g *= x\n } else if (Q)if (e = l.indexOf(_[454]), B = parseFloat(l.slice(e + 8)), b.android = !0, b.linux = !1, b.androidversion = B, n = l.slice(e, l.indexOf(\";\", e)), k = 0 < u.indexOf(_[44]), ea && 0 < u.indexOf(_[275]) && (k = 480 > Math.min(screen.width, screen.height)), A = !k, B = l.indexOf(\")\"), 5 < B && (e = l.slice(0, B).lastIndexOf(\";\"), 5 < e && (p = l.indexOf(_[511], e), 0 < p && (B = p), n += \" (\" + l.slice(e + 2, B) + \")\")), 0 < Ca && isNaN(c) && (c = Yc), A && 1 < c) {\n if (b.hidpi = !0, g = c, 0 <= qa || 0 < Ca)b.hidpi = !1, g = 1\n } else k && (b.hidpi = 1 < c, g = c * x, .5 > g && (g = .5), 0 <= qa || 0 < Ca || Z) && (b.hidpi = !1, g = x); else {\n if (0 <= u.indexOf(_[345]) || 0 <= u.indexOf(_[344]) || 0 <= u.indexOf(\"bb10\"))S = !0, b.blackberry = !0, n = _[336], f = !0;\n 0 <= e ? (S = !0, b.silk = !0, n = _[297] + parseFloat(u.slice(e + 5)).toFixed(2), H = !1, k = 0 <= u.indexOf(_[44]), A = !k, f = !0) : 0 <= u.indexOf(\"ipad\") || 0 <= u.indexOf(_[41]) ? H = S = !0 : 0 <= u.indexOf(_[138]) ? (A = !0, n += _[513]) : 0 <= u.indexOf(_[44]) ? (k = !0, n += _[518], g = x) : H = !0\n }\n D = jb.vendor && 0 <= jb.vendor.indexOf(\"Apple\");\n z = L.opera;\n p = !1;\n H && (n = _[285]);\n e = l.indexOf(_[451]);\n 0 < e && (D || z || Q) && (e += 8, B = l.slice(e, l.indexOf(\" \", e)), D ? (b.safari = !0, b.safariversion = B, h = _[520]) : (Q && (h = _[238], f = !0), z && (b.opera = !0, b.operaversion = B, h = \"Opera\")), h += \" \" + B);\n J && (e = l.indexOf(_[521]), 0 < e && (b.safari = !0, e += 6, B = parseFloat(l.slice(e, l.indexOf(\" \", e))), b.crios = B, h = _[449] + B.toFixed(1)));\n e = qa;\n if (0 <= e || ea)B = parseFloat(l.slice(e + 7)), b.chrome = !0, b.chromeversion = B, h = _[147] + (isNaN(B) ? \"\" : \" \" + B.toFixed(1)), e = u.indexOf(\"opr/\"), 0 < e && (h = _[517] + parseFloat(l.slice(e + 4)).toFixed(1) + _[378]), Q && 28 > B && (f = !0), Q && 1 < c && 20 > B && !Z && (b.hidpi = !0, g = c, k && (g *= x)); else if (e = Ca, 0 > e && (e = l.indexOf(_[514])), 0 <= e && (B = parseFloat(l.slice(1 + l.indexOf(\"/\", e))), b.firefox = !0, b.firefoxversion = B, h = _[434] + (isNaN(B) ? \"\" : B.toFixed(1)), Q && 35 > B && (f = !0)), e = l.indexOf(\"MSIE \"), p = 0 <= e || C)H = b.ie = !0, A = !1, h = _[224], 0 < u.indexOf(_[436]) || 0 < u.indexOf(_[289]) ? (k = !0, H = !1, h = _[445] + h, g = x) : 0 < u.indexOf(\"arm;\") && 1 < jb.msMaxTouchPoints && (A = !0, H = !1, h = _[447] + h, f = !0, g = 1), 0 <= e ? (B = l.slice(e + 4, l.indexOf(\";\", e)), b.ieversion = parseFloat(B), h += B) : (e = l.indexOf(\"rv:\"), 0 <= e ? (B = parseFloat(l.slice(e + 3)), !isNaN(B) && 10 <= B && 100 > B && (b.ieversion = B, h += \" \" + B.toFixed(1))) : (e = u.indexOf(_[145]), 0 <= e && (h = _[260], b.edge = !0, Kc = !1, B = parseFloat(l.slice(e + 6)), isNaN(B) || (b.ieversion = B, h += \" \" + (B + 8).toFixed(5))))), n = h, h = \"\";\n b.android && (b.androidstock = !(b.chrome || b.firefox || b.opera));\n 0 == b.ie && 0 < (e = u.indexOf(_[448])) && (B = parseFloat(u.slice(e + 7)), !isNaN(B) && 0 < B && (b.webkit = !0, b.webkitversion = B));\n b.pixelratio = isNaN(c) ? 1 : c;\n b.fractionalscaling = 0 != b.pixelratio % 1;\n var c = {}, t = Ja();\n c.find = m;\n c.prefix = p ? \"ms\" : b.firefox ? \"moz\" : b.safari || b.chrome || b.androidstock ? _[70] : \"\";\n c.perspective = m(_[335]);\n c.transform = m(_[387]);\n c.backgroundsize = m(_[256]);\n c.boxshadow = m(_[388]);\n c.boxshadow_style = _[252] == c.boxshadow ? _[212] : _[292] == c.boxshadow ? _[249] : _[342];\n Q && \"4.0\" > b.androidversion && (c.perspective = null);\n c.perspective && (b.css3d = !0, _[217] == c.perspective && L.matchMedia && (u = L.matchMedia(_[195]))) && (b.css3d = 1 == u.matches);\n t = null;\n b.webgl = function () {\n var a = null;\n try {\n for (var c = Ja(2), C = 0; 4 > C && !(a = c.getContext([_[30], _[83], _[116], _[112]][C])); C++);\n } catch (d) {\n }\n return null != a\n }();\n u = {};\n u.useragent = l;\n u.platform = y;\n u.domain = null;\n u.location = L.location.href;\n y = u.events = {};\n u.css = c;\n if (J || Q || void 0 !== w.ontouchstart || S)b.touchdevice = !0, b.gesturedevice = !0;\n J = 0;\n (jb.msPointerEnabled || jb.pointerEnabled) && b.ie && (Q = jb.msMaxTouchPoints || jb.maxTouchPoints, jb.msPointerEnabled && (J = 2), jb.pointerEnabled && (J = 1), b.touchdevice = 0 < Q, b.gesturedevice = 1 < Q);\n y.touchstart = [_[343], _[331], _[290]][J];\n y.touchmove = [_[115], _[330], _[283]][J];\n y.touchend = [_[118], _[390], _[328]][J];\n y.touchcancel = [_[327], _[280], _[236]][J];\n y.gesturestart = [_[300], _[96], _[96]][J];\n y.gesturechange = [_[276], _[91], _[91]][J];\n y.gestureend = [_[355], _[99], _[99]][J];\n y.pointerover = [_[8], _[8], _[34]][J];\n y.pointerout = [_[9], _[9], _[35]][J];\n b.pointerEvents = b.opera || b.ie && 11 > b.ieversion ? !1 : !0;\n h && (n += \" - \" + h);\n b.realDesktop = H;\n h = a.vars ? F(a.vars.simulatedevice) : null;\n _[392] == h && (0 <= l.indexOf(_[146]) || 0 <= l.indexOf(\"iPod\") ? h = _[41] : 0 <= l.indexOf(\"iPad\") && (h = \"ipad\"));\n b.touchdeviceNS = b.touchdevice;\n l = _[41] == h ? 1 : \"ipad\" == h ? 2 : 0;\n 0 < l && (b.simulator = !0, b.crios = 0, n += \" - \" + (1 == l ? _[146] : \"iPad\") + _[356], g = l * x, k = 1 == l, A = 2 == l, H = !1, b.ios = !0, b.iphone = k, b.ipad = A, b.touchdevice = !0, b.gesturedevice = !0);\n b.browser = u;\n b.infoString = n;\n a = F(a.fakedevice);\n _[44] == a ? (k = !0, A = H = !1) : _[138] == a ? (A = !0, k = H = !1) : _[465] == a && (H = !0, k = A = !1);\n b.mobile = k;\n b.tablet = A;\n b.desktop = H;\n b.normal = A || H;\n b.touch = b.gesturedevice;\n b.mouse = H;\n b.getViewportScale = d;\n X = g;\n 0 == b.simulator && 0 != aa.fullscreenEnabled && 0 != aa.mozFullScreenEnabled && 0 != aa.webkitFullScreenEnabled && 0 != aa.webkitFullscreenEnabled && 0 != aa.msFullscreenEnabled && (a = [_[223], _[201], _[194], _[191], _[209]], x = -1, g = null, n = _[228], w[a[0]] ? (g = \"\", x = 0) : w[a[1]] ? (g = \"moz\", x = 1) : w[a[2]] ? (g = _[70], x = 2) : w[a[3]] ? (g = _[70], x = 3) : w[a[4]] && (g = \"MS\", n = _[229], x = 4), 0 <= x && 0 == f && (b.fullscreensupport = !0, y.fullscreenchange = g + n, y.requestfullscreen = a[x]));\n b.buildList();\n delete b.runDetection\n }, buildList: function () {\n var a, d = \"|all\";\n for (a in b)a == F(a) && b[a] && (d += \"|\" + a);\n b.haveList = d + \"|\"\n }, checkSupport: function (a) {\n a = F(a).split(\"no-\").join(\"!\").split(\".or.\").join(\"|\").split(\".and.\").join(\"+\").split(\"|\");\n var d, m, f = a.length;\n for (d = 0; d < f; d++) {\n var g = a[d].split(\"+\"), n = !1;\n for (m = 0; m < g.length; m++) {\n var n = g[m], k = !1;\n 33 == n.charCodeAt(0) && (n = n.slice(1), k = !0);\n if (0 == n.indexOf(\"ios\") && b.ios)if (3 == n.length || b.iosversion >= parseFloat(n.slice(3)))if (k) {\n n = !1;\n break\n } else n = !0; else if (k)n = !0; else {\n n = !1;\n break\n } else if (0 <= b.haveList.indexOf(\"|\" + n + \"|\"))if (k) {\n n = !1;\n break\n } else n = !0; else if (k)n = !0; else {\n n = !1;\n break\n }\n }\n if (n)return !0\n }\n return !1\n }\n }, cb = 0, Kb = 0, Hd = 0, Nb = 0, Lc = 0, be = 0, jd = !1, ib = null, Id = null, pd = null, Zc = null, pc = null, ce = !1, Lb = 0, Fb = function () {\n var a = this;\n a._type = \"base\";\n a.registerattribute = function (d, b, f, g) {\n d = F(d);\n f && g ? (a.hasOwnProperty(d) && (b = ga(a[d], typeof b)), a.__defineGetter__(d, g), a.__defineSetter__(d, f), f(b)) : a.hasOwnProperty(d) ? a[d] = ga(a[d], typeof b) : a[d] = b\n };\n a.createobject = function (d) {\n d = F(d);\n try {\n return a.hasOwnProperty(d) ? a[d] : a[d] = new Fb\n } catch (b) {\n }\n return null\n };\n a.removeobject = a.removeattribute = function (d) {\n d = F(d);\n try {\n a[d] = null, delete a[d]\n } catch (b) {\n }\n };\n a.createarray = function (d) {\n d = F(d);\n return a[d] && a[d].isArray ? a[d] : a[d] = new bb(Fb)\n };\n a.removearray = function (d) {\n d = F(d);\n a[d] && a[d].isArray && (a[d] = null, delete a[d])\n };\n a.getattributes = function () {\n var d = [], b = [\"index\", _[438]], f;\n for (f in a)_[11] != typeof a[f] && -1 == b.indexOf(f) && \"_\" != f.charAt(0) && d.push(f);\n return d\n }\n }, bb = function (a, d) {\n var b = [], f = {};\n this.isArray = !0;\n this.isDynArray = 1 == d;\n this.__defineGetter__(\"count\", function () {\n return b.length\n });\n this.__defineSetter__(\"count\", function (a) {\n 0 == a ? (b = [], f = {}) : b.length = a\n });\n this.createItem = function (d, n) {\n var k = -1, e = null, k = String(d).charCodeAt(0);\n if (48 <= k && 57 >= k) {\n if (n)return null;\n k = parseInt(d, 10);\n e = b[k];\n if (null == e || void 0 == e)e = null != a ? new a : {}, e.name = \"n\" + k, e.index = k, b[k] = e, f[e.name] = e\n } else if (d = F(d), e = f[d], null == e || void 0 == e)e = n ? n : null != a ? new a : {}, k = b.push(e) - 1, e.index = k, e.name = d, b[k] = e, f[d] = e;\n return e\n };\n this.getItem = function (a) {\n var d = -1, d = String(a).charCodeAt(0);\n 48 <= d && 57 >= d ? (d = parseInt(a, 10), a = b[d]) : a = f[F(a)];\n return a\n };\n this.getArray = function () {\n return b\n };\n this.renameItem = function (a, d) {\n var k = -1, k = String(a).charCodeAt(0);\n 48 <= k && 57 >= k ? (k = parseInt(a, 10), k = b[k]) : k = f[F(a)];\n k && (delete f[k.name], d = F(d), k.name = d, f[d] = k)\n };\n this.removearrayitem = this.removeItem = function (a) {\n var d = -1, d = null;\n a = String(a);\n d = String(a).charCodeAt(0);\n 48 <= d && 57 >= d ? (d = parseInt(a, 10), d = b[d]) : d = f[F(a)];\n if (d) {\n f[d.name] = null;\n delete f[d.name];\n b.splice(d.index, 1);\n var k;\n k = b.length;\n for (a = d.index; a < k; a++)b[a].index--\n }\n return d\n };\n this.sortby = function (a, d) {\n var f, e, w = !1 === d ? -1 : 1;\n e = b.length;\n if (1 < e)for (b.sort(function (d, b) {\n var r = d[a], e = b[a];\n return void 0 === r && void 0 !== e ? +w : void 0 !== r && void 0 === e || r < e ? -w : r > e ? +w : 0\n }), f = 0; f < e; f++)b[f].index = f\n }\n }, ra = {};\n (function () {\n function a(a) {\n for (var d = w, b = [], e, g, h, c, f, n = a.length, k = 0, q = 0; k < n;)e = d.indexOf(a.charAt(k++)), g = d.indexOf(a.charAt(k++)), c = d.indexOf(a.charAt(k++)), f = d.indexOf(a.charAt(k++)), e = e << 2 | g >> 4, g = (g & 15) << 4 | c >> 2, h = (c & 3) << 6 | f, b[q++] = e, 64 != c && (b[q++] = g), 64 != f && (b[q++] = h);\n return b\n }\n\n function d(a, d) {\n var b, e, g, h = [];\n h.length = 256;\n if (80 == d || 82 == d) {\n e = 15;\n var c = _[89];\n 82 == d && od && (e = 127, c = od);\n b = a[65] & 7;\n for (g = 0; 128 > g; g++)h[2 * g] = a[g], h[2 * g + 1] = String(c).charCodeAt(g & e);\n e = a.length - 128 - b;\n b += 128\n } else if (71 == d) {\n b = a[4];\n e = (a[b] ^ b) & 15 | ((a[2 + b] ^ b) >> 2 & 63) << 4 | ((a[1 + b] ^ b) >> 1 & 63) << 10 | ((a[3 + b] ^ b) & 63) << 16;\n for (g = 0; 256 > g; g++)h[g] = a[g] ^ a[256 + e + b + 2 * g];\n b = 256\n }\n x.srand(h, 256);\n return x.flip(a, b, e)\n }\n\n function p(a, d, b) {\n if (null == a)return null;\n a = \"\" + a;\n 1 == d && m.basedir && 0 > a.indexOf(\"://\") && 0 != a.indexOf(\"/\") && _[74] != a.slice(0, 5) && (a = m.basedir + a);\n a = a.split(\"\\\\\").join(\"/\");\n null == e.firstxmlpath && (e.firstxmlpath = \"\");\n null == e.currentxmlpath && (e.currentxmlpath = \"\");\n null == e.swfpath && (e.swfpath = \"\");\n null == e.htmlpath && (e.htmlpath = \"\");\n for (d = a.indexOf(\"%\"); 0 <= d;) {\n var g = a.indexOf(\"%\", d + 1);\n if (g > d) {\n var f = a.slice(d + 1, g), h = null;\n if (36 == f.charCodeAt(0)) {\n if (f = U(f.slice(1)), null != f) {\n f = \"\" + f;\n a = 47 == f.charCodeAt(0) || 0 < f.indexOf(\"://\") ? f + a.slice(g + 1) : a.slice(0, d) + f + a.slice(g + 1);\n d = a.indexOf(\"%\");\n continue\n }\n } else switch (f) {\n case _[437]:\n h = 1 == b ? \"\" : e.firstxmlpath;\n break;\n case _[361]:\n h = e.currentxmlpath;\n break;\n case _[475]:\n h = 1 == b ? \"\" : e.swfpath;\n break;\n case _[422]:\n h = 1 == b ? \"\" : e.htmlpath;\n break;\n case _[473]:\n h = 1 == b ? \"\" : m.basedir\n }\n null != h ? (g++, \"/\" == a.charAt(g) && g++, a = h + a.slice(g), d = a.indexOf(\"%\")) : d = a.indexOf(\"%\", d + 1)\n } else d = -1\n }\n return a\n }\n\n function f(b, e, f) {\n var l, n;\n 0 <= (l = e.indexOf(_[333])) ? (n = e.indexOf(_[309])) > l && (e = e.slice(l + 11, n), l = e.indexOf(_[393]), 0 <= l && (e = e.slice(l + 9, -3))) : f && 0 <= (l = e.indexOf('\"[[KENC')) && (n = e.lastIndexOf(']]\"')) > l && (e = e.slice(l + 3, n));\n var h;\n n = null;\n h = e.slice(0, 8);\n l = e.slice(8);\n f = !0 === f && Ya & 64 || !f && Ya & 32;\n if (\"KENC\" != h.slice(0, 4))return f ? (b && Ea(b + _[32]), null) : e;\n var c = !1, k = e = 0, k = 0, w = !1;\n e = String(h).charCodeAt(4);\n if (80 == e || 82 == e || 71 == e)if (k = String(h).charCodeAt(5), 85 == k && (k = String(h).charCodeAt(6), w = 90 == k, 66 == k || w))c = !0;\n if (!c)return b && la(3, b + _[170]), null;\n if (f && 80 == e)return b && Ea(b + _[32]), null;\n b = null;\n if (w) {\n b = e;\n n = String.fromCharCode;\n h = 1;\n f = l.length;\n var m = e = null, q = k = c = w = 0, x = 0, C = 0, Q = 0;\n try {\n n.apply(null, (new Uint8Array(4)).subarray(2))\n } catch (A) {\n h = 0\n }\n n = h ? Uint8Array : Array;\n for (e = new n(4 * f / 5); w < f;)k = l.charCodeAt(w++) - 35, q = l.charCodeAt(w++) - 35, x = l.charCodeAt(w++) - 35, C = l.charCodeAt(w++) - 35, Q = l.charCodeAt(w++) - 35, 56 < k && k--, 56 < q && q--, 56 < x && x--, 56 < C && C--, 56 < Q && Q--, Q += 85 * (85 * (85 * (85 * k + q) + x) + C), e[c++] = Q >> 24 & 255, e[c++] = Q >> 16 & 255, e[c++] = Q >> 8 & 255, e[c++] = Q & 255;\n e = d(e, b);\n m = new n(e[2] << 16 | e[1] << 8 | e[0]);\n f = 8 + (e[6] << 16 | e[5] << 8 | e[4]);\n w = 8;\n for (c = 0; w < f;) {\n k = e[w++];\n q = k >> 4;\n for (x = q + 240; 255 === x; q += x = e[w++]);\n for (C = w + q; w < C;)m[c++] = e[w++];\n if (w === f)break;\n Q = c - (e[w++] | e[w++] << 8);\n q = k & 15;\n for (x = q + 240; 255 === x; q += x = e[w++]);\n for (C = c + q + 4; c < C;)m[c++] = m[Q++]\n }\n e.length = 0;\n n = l = g(m)\n } else b = a(l), b = d(b, e), null != b && (n = g(b));\n return n\n }\n\n function g(a) {\n for (var d = \"\", b = 0, e = 0, g = 0, h = 0, c = a.length; b < c;)e = a[b], 128 > e ? (0 < e && (d += Xc(e)), b++) : 191 < e && 224 > e ? (g = a[b + 1], d += Xc((e & 31) << 6 | g & 63), b += 2) : (g = a[b + 1], h = a[b + 2], e = (e & 15) << 12 | (g & 63) << 6 | h & 63, 65279 != e && (d += Xc(e)), b += 3);\n return d\n }\n\n function n(a, d, b) {\n void 0 !== d ? d(a, b) : Ea(a + _[80] + b + \")\")\n }\n\n function k(a, d, g, f, k) {\n if (0 == e.DMcheck(a))n(a, k, _[227]); else {\n var h = null, c = !1;\n if (b.ie && \"\" == aa.domain)try {\n h = new ActiveXObject(_[218]), c = !0\n } catch (w) {\n h = null\n }\n null == h && (h = new XMLHttpRequest);\n void 0 !== h.overrideMimeType && d && h.overrideMimeType(d);\n h.onreadystatechange = function () {\n if (4 == h.readyState) {\n var d = h.status, b = h.responseText;\n if (0 == d && b || 200 == d || 304 == d)if (g) {\n var e = null, e = c ? (new DOMParser).parseFromString(b, _[25]) : h.responseXML;\n f(a, e, d)\n } else f(a, b); else n(a, k, h.status)\n }\n };\n try {\n h.open(\"GET\", a, !0), h.send(null)\n } catch (m) {\n n(a, k, m)\n }\n }\n }\n\n var e = ra, w = _[183], w = w + (F(w) + _[273]);\n e.firstxmlpath = null;\n e.currentxmlpath = null;\n e.swfpath = null;\n e.htmlpath = null;\n e.parsePath = p;\n e.DMcheck = function (a) {\n var d;\n if (Ya & 256 && (d = aa.domain) && vc) {\n a = a.toLowerCase();\n var b = a.indexOf(\"://\");\n if (0 < b) {\n var b = b + 3, e = a.indexOf(\"/\", b);\n if (0 < e)return a = a.slice(b, e), b = a.indexOf(\":\"), 1 < b && (a = a.slice(0, b)), a == d\n } else return d == vc\n }\n return !0\n };\n var x = new function () {\n var a, d, b;\n this.srand = function (e, g) {\n var h, c, f, n, k = [];\n k.length = 256;\n for (h = 0; 256 > h; h++)k[h] = h;\n for (c = h = 0; 256 > h; h++)c = c + k[h] + e[h % g] & 255, n = k[h], k[h] = k[c], k[c] = n;\n for (f = c = h = 0; 256 > f; f++)h = h + 1 & 255, c = c + k[h] & 255, n = k[h], k[h] = k[c], k[c] = n;\n a = k;\n d = h;\n b = c\n };\n this.flip = function (e, g, h) {\n var c = [], f, n;\n c.length = h;\n var k = a, q = d, w = b;\n for (f = 0; f < h; f++, g++)q = q + 1 & 255, w = w + k[q] & 255, c[f] = e[g] ^ a[k[q] + k[w] & 255], n = k[q], k[q] = k[w], k[w] = n;\n d = q;\n b = w;\n return c\n }\n };\n e.loadimage = function (a, d, b) {\n var e = Ja(1);\n e.addEventListener(\"load\", function () {\n d && d(e)\n });\n e.addEventListener(_[48], function () {\n b && b(null, !1)\n }, !1);\n e.addEventListener(\"abort\", function () {\n b && b(null, !0)\n }, !1);\n e.src = a;\n return e\n };\n e.loadfile = function (a, d, b) {\n e.loadfile2(a, null, d, b)\n };\n e.loadxml = function (a, d, b) {\n e.loadfile2(a, _[25], d, b, !0)\n };\n e.loadfile2 = function (a, d, b, e, g) {\n g = !0 === g;\n var h = {errmsg: !0};\n h.rqurl = a;\n a = p(a);\n h.url = a;\n k(a, d, g, function (a, n, k) {\n !0 === g ? b(n, k) : (n = f(a, n, _[92] == d), h.data = n, null != n ? b && b(h) : e && e(h))\n }, g ? e : function (d, b) {\n e && e(h);\n h.errmsg && la(3, a + _[80] + b + \")\")\n })\n };\n e.resolvecontentencryption = f;\n e.b64u8 = function (d) {\n return g(a(d))\n };\n e.decodeLicense = function (a) {\n return null\n }\n })();\n\n var T = {};\n (function () {\n function a(d) {\n var b, e, g = d.childNodes, f;\n e = g.length;\n for (b = 0; b < e; b++)if (f = g.item(b))switch (f.nodeType) {\n case 1:\n a(f);\n break;\n case 8:\n d.removeChild(f), b--, e--\n }\n }\n\n function d(a, d) {\n var b, e, g = a.childNodes, f = -1;\n e = g.length;\n if (1 <= e)for (b = 0; b < e; b++)if (F(g[b].nodeName) == d) {\n f = b;\n break\n }\n return 0 <= f ? g[f] : null\n }\n\n function p(d, e, g, f, n) {\n var k, u, h, c = null, K = null, D, z;\n z = 0;\n var q, J = d.length, C = new XMLSerializer, Q = !1;\n f || (Q = !0, f = [], n = [], m.xml.parsetime = Ta());\n for (var A = 0; A < J; A++)if ((k = d[A]) && k.nodeName && \"#text\" != k.nodeName && (u = k.nodeName, u = F(u), _[129] != u)) {\n u = null == e && _[46] == u ? null : e ? e + \".\" + u : u;\n if (h = k.attributes)if (h.devices && 0 == b.checkSupport(h.devices.value))continue; else if (h[\"if\"] && 0 == da.calc(null, h[\"if\"].value))continue;\n q = (K = h && h.name ? h.name.value : null) ? !0 : !1;\n if (g) {\n if (_[462] == u && g & 16)continue;\n if ((_[29] == u || \"layer\" == u) && g & 4)continue;\n if (_[1] == u && g & 128)continue;\n if (_[75] == u && g & 65536)continue;\n if (g & 64 && K)if (_[29] == u || \"layer\" == u) {\n if ((c = xa.getItem(K)) && c._pCD && c.keep)continue\n } else if (_[1] == u && (c = Ua.getItem(K)) && c._pCD && c.keep)continue\n }\n if (u)if (q) {\n if (_[14] == u || \"data\" == u || \"scene\" == u) {\n a(k);\n q = null;\n if ((_[14] == u || \"data\" == u) && k.childNodes && 1 <= k.childNodes.length)for (c = 0; c < k.childNodes.length; c++)if (4 == k.childNodes[c].nodeType) {\n q = k.childNodes[c].nodeValue;\n break\n }\n null == q && (q = C.serializeToString(k), q = q.slice(q.indexOf(\">\") + 1, q.lastIndexOf(\"</\")), _[14] == u && (q = q.split(_[497]).join('\"').split(_[499]).join(\"'\").split(_[139]).join(String.fromCharCode(160)).split(\"&amp;\").join(\"&\")));\n I(u + \"[\" + K + _[61], q);\n if (h) {\n var H;\n q = h.length;\n for (H = 0; H < q; H++)if (D = h[H], c = F(D.nodeName), D = D.value, \"name\" != c) {\n z = c.indexOf(\".\");\n if (0 < z)if (b.checkSupport(c.slice(z + 1)))c = c.slice(0, z); else continue;\n z = u + \"[\" + K + \"].\" + F(c);\n I(z, D)\n }\n }\n continue\n }\n u = u + \"[\" + K + \"]\";\n if (!Uc(K, u))continue;\n I(u + \".name\", K)\n } else(K = U(u)) && K.isArray && !K.isDynArray && (K = \"n\" + String(K.count), u = u + \"[\" + K + \"]\", I(u + \".name\", K));\n if (h) {\n var qa = \"view\" == u, c = u ? U(u) : null, K = null;\n q = h.length;\n c && (c._lateBinding && (K = c._lateBinding), (D = h.style) && (D = D.value) && null == K && (c.style = D, n.push(u), K = c._lateBinding = {}));\n for (H = 0; H < q; H++) {\n D = h[H];\n c = F(D.nodeName);\n D = D.value;\n var ea = u ? u + \".\" : \"\";\n if (\"name\" != c && \"style\" != c) {\n z = c.indexOf(\".\");\n if (0 < z)if (b.checkSupport(c.slice(z + 1)))c = c.slice(0, z).toLowerCase(); else continue;\n z = ea + c;\n K ? K[c] = D : !D || _[13] != typeof D || \"get:\" != D.slice(0, 4) && \"calc:\" != D.slice(0, 5) ? (I(z, D), qa && I(\"xml.\" + z, D)) : (f.push(z), f.push(D))\n }\n }\n }\n k.childNodes && 0 < k.childNodes.length && p(k.childNodes, u, g, f, n)\n }\n if (Q) {\n J = f.length;\n for (A = 0; A < J; A += 2)I(f[A], f[A + 1]);\n J = n.length;\n for (A = 0; A < J; A++)if (u = n[A], da.assignstyle(u, null), c = U(u))if (K = c._lateBinding)da.copyattributes(c, K), c._lateBinding = null;\n m.xml.parsetime = Ta() - m.xml.parsetime\n }\n }\n\n function f(a, d) {\n var b = null, e, g;\n g = a.length;\n for (e = 0; e < g; e++)if (b = a[e], !b || !b.nodeName || _[14] != F(b.nodeName)) {\n var k = b.attributes;\n if (k) {\n var n, h = k.length, c;\n for (n = 0; n < h; n++) {\n var m = k[n];\n c = F(m.nodeName);\n var p = c.indexOf(\".\");\n 0 < p && (c = c.slice(0, p));\n if (_[435] == c) {\n c = m.value;\n var p = c.split(\"|\"), z, q;\n q = p.length;\n for (z = 0; z < q; z++)c = p[z], \"\" != c && 0 > c.indexOf(\"://\") && 47 != c.charCodeAt(0) && (p[z] = d + c);\n m.value = p.join(\"|\")\n } else if (p = c.indexOf(\"url\"), 0 == p || 0 < p && p == c.length - 3)if (c = m.value)p = c.indexOf(\":\"), 47 == c.charCodeAt(0) || 0 < p && (\"//\" == c.substr(p + 1, 2) || 0 <= _[94].indexOf(c.substr(0, p + 1))) || (c = d + c), m.value = c\n }\n }\n b.childNodes && 0 < b.childNodes.length && f(b.childNodes, d)\n }\n }\n\n function g(a, d) {\n var b = Gc(d), e = b.lastIndexOf(\"/\"), g = b.lastIndexOf(\"\\\\\");\n g > e && (e = g);\n 0 < e && (b = b.slice(0, e + 1), f(a, b))\n }\n\n function n(a, b) {\n var e = d(a, _[374]);\n if (e) {\n var g = \"\", f, k;\n k = e.childNodes.length;\n for (f = 0; f < k; f++)g += e.childNodes[f].nodeValue;\n if (e = ra.resolvecontentencryption(b, g))return (e = (new DOMParser).parseFromString(e, _[25])) && e.documentElement && _[22] == e.documentElement.nodeName ? (la(3, b + _[21]), null) : e;\n Ea(b + _[32]);\n return null\n }\n return Ya & 32 ? (Ea(b + _[32]), null) : a\n }\n\n function k(a, d) {\n var b, e;\n switch (a.nodeType) {\n case 1:\n var g = T.xmlDoc.createElement(a.nodeName);\n if (a.attributes && 0 < a.attributes.length)for (b = 0, e = a.attributes.length; b < e;)g.setAttribute(a.attributes[b].nodeName, a.getAttribute(a.attributes[b++].nodeName));\n if (d && a.childNodes && 0 < a.childNodes.length)for (b = 0, e = a.childNodes.length; b < e;)g.appendChild(k(a.childNodes[b++], d));\n return g;\n case 3:\n case 4:\n case 8:\n return T.xmlDoc.createTextNode(a.nodeValue)\n }\n }\n\n function e(a, d) {\n var f, r, m;\n if (null != T.xmlIncludeNode) {\n m = Gc(a.url);\n if ((r = a.responseXML) && r.documentElement && _[22] == r.documentElement.nodeName) {\n Ea(m + _[21]);\n return\n }\n r = n(r, a.url);\n if (null == r)return;\n g(r.childNodes, m);\n f = r.childNodes;\n var l = T.xmlIncludeNode.parentNode;\n if (null != l.parentNode) {\n var u = 0;\n m = f.length;\n if (1 < m)for (r = 0; r < m; r++)if (_[46] == F(f[r].nodeName)) {\n u = r;\n break\n }\n r = null;\n r = void 0 === T.xmlDoc.importNode ? k(f[u], !0) : T.xmlDoc.importNode(f[u], !0);\n l.insertBefore(r, T.xmlIncludeNode);\n l.removeChild(T.xmlIncludeNode)\n } else T.xmlDoc = r;\n T.xmlAllNodes = [];\n T.addNodes(T.xmlDoc.childNodes);\n T.xmlIncludeNode = null\n }\n l = !1;\n m = T.xmlAllNodes.length;\n for (r = 0; r < m; r++)if (f = T.xmlAllNodes[r], u = null, null != f.nodeName) {\n u = F(f.nodeName);\n if (_[129] == u) {\n var u = f.attributes, h, c = u.length, p = !1;\n for (h = 0; h < c; h++) {\n var D = u[h];\n _[483] == D.nodeName ? 0 == b.checkSupport(D.value) && (p = !0) : \"if\" == D.nodeName && 0 == da.calc(null, D.value) && (p = !0)\n }\n if (0 == p)for (h = 0; h < c; h++)if (D = u[h], \"url\" == F(D.nodeName)) {\n l = !0;\n p = D.value;\n D = p.indexOf(\":\");\n 0 < D && 0 <= _[94].indexOf(p.substr(0, D + 1)) && (p = da.calc(null, p.substr(D + 1)));\n T.xmlIncludeNode = f;\n var z = ra.parsePath(p);\n z ? ra.loadxml(z, function (a, c) {\n a ? e({url: z, responseXML: a}, d) : Ea(z + \" - \" + (200 == c ? _[208] : _[184]))\n }) : d()\n }\n }\n if (l)break\n }\n 0 == l && d()\n }\n\n T.resolvexmlencryption = n;\n T.resolvexmlincludes = function (a, d) {\n var b = a.childNodes;\n T.xmlDoc = a;\n T.xmlAllNodes = [];\n T.addNodes(b);\n g(b, m.xml.url);\n T.xmlIncludeNode = null;\n e(null, d)\n };\n T.parsexml = p;\n T.xmlDoc = null;\n T.xmlAllNodes = null;\n T.xmlIncludeNode = null;\n T.addNodes = function (a) {\n var d, b, e;\n e = a.length;\n for (b = 0; b < e; b++)(d = a[b]) && d.nodeName && _[14] != F(d.nodeName) && (T.xmlAllNodes.push(d), d.childNodes && 0 < d.childNodes.length && T.addNodes(d.childNodes))\n };\n T.findxmlnode = d\n })();\n\n var ac = {};\n (function () {\n var a = ac;\n a.linear = function (a, b, f) {\n return f * a + b\n };\n a.easeinquad = function (a, b, f) {\n return f * a * a + b\n };\n a.easeoutquad = function (a, b, f) {\n return -f * a * (a - 2) + b\n };\n a[_[5]] = a.easeoutquad;\n a.easeinoutquad = function (a, b, f) {\n return (1 > (a /= .5) ? f / 2 * a * a : -f / 2 * (--a * (a - 2) - 1)) + b\n };\n a.easeinback = function (a, b, f) {\n return f * a * a * (2.70158 * a - 1.70158) + b\n };\n a.easeoutback = function (a, b, f) {\n return f * (--a * a * (2.70158 * a + 1.70158) + 1) + b\n };\n a.easeinoutback = function (a, b, f) {\n var g = 1.70158;\n return 1 > (a *= 2) ? f / 2 * a * a * (((g *= 1.525) + 1) * a - g) + b : f / 2 * ((a -= 2) * a * (((g *= 1.525) + 1) * a + g) + 2) + b\n };\n a.easeincubic = function (a, b, f) {\n return f * a * a * a + b\n };\n a.easeoutcubic = function (a, b, f) {\n return f * (--a * a * a + 1) + b\n };\n a.easeinquart = function (a, b, f) {\n return f * a * a * a * a + b\n };\n a.easeoutquart = function (a, b, f) {\n return -f * ((a = a / 1 - 1) * a * a * a - 1) + b\n };\n a.easeinquint = function (a, b, f) {\n return f * a * a * a * a * a + b\n };\n a.easeoutquint = function (a, b, f) {\n return f * ((a = a / 1 - 1) * a * a * a * a + 1) + b\n };\n a.easeinsine = function (a, b, f) {\n return -f * Math.cos(Ga / 2 * a) + f + b\n };\n a.easeoutsine = function (a, b, f) {\n return f * Math.sin(Ga / 2 * a) + b\n };\n a.easeinexpo = function (a, b, f) {\n return 0 == a ? b : f * Math.pow(2, 10 * (a - 1)) + b - .001 * f\n };\n a.easeoutexpo = function (a, b, f) {\n return 1 == a ? b + f : 1.001 * f * (-Math.pow(2, -10 * a) + 1) + b\n };\n a.easeincirc = function (a, b, f) {\n return -f * (Math.sqrt(1 - a * a) - 1) + b\n };\n a.easeoutcirc = function (a, b, f) {\n return f * Math.sqrt(1 - (a = a / 1 - 1) * a) + b\n };\n a.easeoutbounce = function (a, b, f) {\n return a < 1 / 2.75 ? 7.5625 * f * a * a + b : a < 2 / 2.75 ? f * (7.5625 * (a -= 1.5 / 2.75) * a + .75) + b : a < 2.5 / 2.75 ? f * (7.5625 * (a -= 2.25 / 2.75) * a + .9375) + b : f * (7.5625 * (a -= 2.625 / 2.75) * a + .984375) + b\n };\n a.easeinbounce = function (b, m, f) {\n return f - a.easeoutbounce(1 - b, 0, f) + m\n };\n a.getTweenfu = function (b) {\n b = F(b);\n \"\" == b || \"null\" == b ? b = _[56] : void 0 === a[b] && (b = _[56]);\n return a[b]\n }\n })();\n\n var da = {};\n (function () {\n function a(a, b, c) {\n var d, h = a.length;\n c = 1 != c;\n for (d = 0; d < h; d++) {\n var e = \"\" + a[d], g = e.toLowerCase();\n c && \"null\" == g ? a[d] = null : 41 == e.charCodeAt(e.length - 1) && (g = g.slice(0, 4), \"get(\" == g ? a[d] = U(Ha(e.slice(4, e.length - 1)), b) : \"calc\" == g && 40 == e.charCodeAt(4) && (a[d] = U(e, b)))\n }\n }\n\n function b(a, c) {\n var d, e, h, g = 0, f = 0, k = 0;\n h = \"\";\n d = 0;\n for (e = a.length; d < e;) {\n h = a.charCodeAt(d);\n if (!(32 >= h))if (34 == h)0 == k ? k = 1 : 1 == k && (k = 0); else if (39 == h)0 == k ? k = 2 : 2 == k && (k = 0); else if (0 == k)if (91 == h)0 == f && (f = d + 1), g++; else if (93 == h && 0 < g && (g--, 0 == g)) {\n if (h = oc(a, f, d, c))a = a.slice(0, f) + h + a.slice(d), d = f + h.length + 1, e = a.length;\n f = 0\n }\n d++\n }\n return a\n }\n\n function E(a, b) {\n var c = \"\", d, h, e, g, f;\n e = a.length;\n f = b.length;\n for (h = 0; h < e; h++)d = a.charAt(h), \"%\" == d ? (h++, d = a.charCodeAt(h) - 48, 0 <= d && 9 >= d ? (h + 1 < e && (g = a.charCodeAt(h + 1) - 48, 0 <= g && 9 >= g && (h++, d = 10 * d + g)), c = d < f ? c + (\"\" + b[d]) : c + \"null\") : c = -11 == d ? c + \"%\" : c + (\"%\" + a.charAt(h))) : c += d;\n return c\n }\n\n function f(a, b, c, d) {\n c = Array.prototype.slice.call(c);\n c.splice(0, 0, a);\n b = E(b, c);\n h.callaction(b, d, !0)\n }\n\n function g(a, b, c) {\n var krpano = m;\n var caller = c;\n var args = b;\n var resolve = y;\n var actions = h;\n try {\n eval(a, c)\n } catch (d) {\n la(3, b[0] + \" - \" + d)\n }\n }\n\n function n(a) {\n var b = c, d = b.length, h;\n for (h = 0; h < d; h++)if (b[h].id == a) {\n b.splice(h, 1);\n break\n }\n }\n\n function k(a) {\n var b = a.length;\n if (2 == b || 3 == b) {\n var c = U(a[b - 2], h.actioncaller), d = U(a[b - 1], h.actioncaller);\n null == c && (c = a[b - 2]);\n null == d && (d = a[b - 1]);\n return [a[0], parseFloat(c), parseFloat(d)]\n }\n return null\n }\n\n function e(a, b, c) {\n var d = 1 == b.length ? U(b[0], c) : b[1], d = 0 == a ? escape(d) : unescape(d);\n I(b[0], d, !1, c, !0)\n }\n\n function w(a) {\n if (1 == a.length)return a[0];\n var b, c = null, d = null, h = null, c = !1;\n for (b = 0; b < a.length; b++)if (c = \"\" + a[b], 0 < c.length && 0 <= _[442].indexOf(c)) {\n if (0 == b || b >= a.length - 1)throw _[33];\n d = a[b - 1];\n h = a[b + 1];\n switch (c) {\n case \"===\":\n case \"==\":\n c = d == h;\n break;\n case \"!==\":\n case \"!=\":\n c = d != h;\n break;\n case \"<\":\n c = d < h;\n break;\n case \"<=\":\n c = d <= h;\n break;\n case \">\":\n c = d > h;\n break;\n case \">=\":\n c = d >= h;\n break;\n default:\n throw _[33];\n }\n a.splice(b - 1, 3, c);\n b -= 2\n }\n if (1 == a.length)return a[0];\n for (b = 0; b < a.length; b++)if (c = a[b], \"&&\" == c || \"||\" == c) {\n if (0 == b || b >= a.length - 1)throw _[33];\n d = a[b - 1];\n h = a[b + 1];\n c = \"&&\" == c ? d && h : d || h;\n a.splice(b - 1, 3, c);\n b -= 2\n }\n if (5 == a.length && \"?\" == a[1] && \":\" == a[3])return a[0] ? a[2] : a[4];\n if (1 < a.length)throw _[33];\n return a[0]\n }\n\n function x(a) {\n var b = void 0, b = F(a), c = b.charCodeAt(0), d, e = 0, g = !1;\n 64 == c && (g = !0, a = a.slice(1), b = b.slice(1), c = b.charCodeAt(0));\n if (39 == c || 34 == c)return Ha(a);\n if (33 == c || 43 == c || 45 == c)e = c, a = a.slice(1), b = b.slice(1), c = b.charCodeAt(0);\n d = b.charCodeAt(b.length - 1);\n 40 == c && 41 == d ? b = v(a.slice(1, -1)) : 37 == d ? b = a : (b = \"null\" != b ? U(a, h.actioncaller, !0) : null, void 0 === b ? (c = Number(a), isNaN(c) || isNaN(parseFloat(a)) ? g && (b = a) : b = c) : _[13] == typeof b && (a = F(b), \"true\" == a ? b = !0 : _[31] == a ? b = !1 : \"null\" == a ? b = null : (a = Number(b), isNaN(a) || (b = a))));\n 33 == e ? b = !b : 45 == e && (b = -b);\n return b\n }\n\n function v(a) {\n var b;\n if (\"\" == a || null === a)return a;\n try {\n var c, d = a.length, h = 0, e = 0, g = !1, f = !1, k = 0, n = 0, t = 0, G = !1, q = [], l = 0, r = 0;\n for (c = 0; c < d; c++)if (r = a.charCodeAt(c), 0 == G && 32 >= r)0 < e && (q[l++] = a.substr(h, e), e = 0), g = !1; else if (0 == G && (61 == r || 33 == r && 61 == a.charCodeAt(c + 1) || 62 == r || 60 == r))0 == g && (0 < e ? (q[l++] = a.substr(h, e), e = 0) : 0 == l && 0 == m.strict && (q[l++] = \"\"), g = !0, f = !1, h = c), e++; else if (0 != G || 43 != r && 45 != r && 42 != r && 47 != r && 94 != r && 63 != r && 58 != r) {\n if (0 == t)if (91 == r)k++, G = !0; else if (93 == r)k--, 0 == k && 0 == n && (G = !1); else if (40 == r)n++, G = !0; else if (41 == r)n--, 0 == n && 0 == k && (G = !1); else {\n if (39 == r || 34 == r)t = r, G = !0\n } else r == t && (t = 0, 0 == k && 0 == n && (G = !1));\n if (g || f)0 < e && (q[l++] = a.substr(h, e), e = 0), f = g = !1, h = c;\n 0 == e && (h = c);\n e++\n } else 0 < e && (q[l++] = a.substr(h, e)), g = !1, f = !0, h = c, e = 1;\n 0 < e && (q[l++] = a.substr(h, e));\n 2 == l && g && 0 == m.strict && (q[l++] = \"\");\n if (0 == m.strict) {\n var u = q.length;\n if (!(3 > u)) {\n var p, v;\n for (p = 1; p < u - 1; p++)if (v = q[p], \"==\" == v || \"!=\" == v) {\n q[p - 1] = \"@\" + q[p - 1];\n v = q[p + 1];\n if (\"+\" == v || \"-\" == v)for (p++, v = q[p + 1]; \"+\" == v || \"-\" == v;)p++, v = q[p + 1];\n q[p + 1] = \"@\" + v\n }\n }\n }\n var J = q.length, z, y, D;\n if (1 == J)q[0] = x(q[0]); else for (z = 0; z < J; z++)if (y = q[z], !(0 <= \"<=>=!===+-*/^||&&?:\".indexOf(y))) {\n switch (y) {\n case \"AND\":\n D = \"&&\";\n break;\n case \"OR\":\n D = \"||\";\n break;\n case \"GT\":\n D = \">\";\n break;\n case \"GE\":\n D = \">=\";\n break;\n case \"LT\":\n D = \"<\";\n break;\n case \"LE\":\n D = \"<=\";\n break;\n case \"EQ\":\n D = \"==\";\n break;\n case \"LSHT\":\n D = \"<<\";\n break;\n case \"RSHT\":\n D = \">>\";\n break;\n case \"BAND\":\n D = \"~&\";\n break;\n case \"BOR\":\n D = \"~|\";\n break;\n default:\n D = x(y)\n }\n q[z] = D\n }\n var F = q.length;\n if (!(2 > F)) {\n var E, K;\n c = null;\n for (E = 0; E < q.length; E++)if (c = q[E], \"+\" == c || \"-\" == c)if (0 == E || 0 <= \".<.<<.<=.==.===.=>.>.>>.!=.!==.+.-.*./.^.&&.||.?.:.~|.~&.\".indexOf(\".\" + q[E - 1] + \".\")) {\n K = 45 == c.charCodeAt(0) ? -1 : 1;\n F = 1;\n for (c = \"\" + q[E + F]; \"+\" == c || \"-\" == c;)K *= 45 == c.charCodeAt(0) ? -1 : 1, F++, c = \"\" + q[E + F];\n c && 40 == c.charCodeAt(0) && (c = x(c));\n c = c && 37 == c.charCodeAt(c.length - 1) ? parseFloat(c) * K + \"%\" : Number(c) * K;\n q.splice(E, 1 + F, c);\n --E\n }\n for (E = 1; E < q.length - 1; E++)c = q[E], \"*\" == c ? (q.splice(E - 1, 3, Number(q[E - 1]) * Number(q[E + 1])), E -= 3) : \"/\" == c ? (q.splice(E - 1, 3, Number(q[E - 1]) / Number(q[E + 1])), E -= 3) : \"^\" == c ? (q.splice(E - 1, 3, Math.pow(Number(q[E - 1]), Number(q[E + 1]))), E -= 3) : \"<<\" == c ? (q.splice(E - 1, 3, Number(q[E - 1]) << Number(q[E + 1])), E -= 3) : \">>\" == c ? (q.splice(E - 1, 3, Number(q[E - 1]) >> Number(q[E + 1])), E -= 3) : \"~&\" == c ? (q.splice(E - 1, 3, Number(q[E - 1]) & Number(q[E + 1])), E -= 3) : \"~|\" == c && (q.splice(E - 1, 3, Number(q[E - 1]) | Number(q[E + 1])), E -= 3);\n for (E = 1; E < q.length - 1; E++)c = q[E], \"+\" == c ? (q.splice(E - 1, 3, q[E - 1] + q[E + 1]), E -= 3) : \"-\" == c && (q.splice(E - 1, 3, Number(q[E - 1]) - Number(q[E + 1])), E -= 3)\n }\n b = w(q)\n } catch (L) {\n la(3, L + \": \" + a)\n }\n return b\n }\n\n function r(a) {\n var b = a.position;\n 1 == a.motionmode ? (b *= a.Tmax, b <= a.T1 ? b *= a.accelspeed / 2 * b : b > a.T1 && b <= a.T1 + a.T2 ? b = a.S1 + (b - a.T1) * a.Vmax : (b -= a.T1 + a.T2, b = a.Vmax * b + a.breakspeed / 2 * b * b + a.S1 + a.S2), b = 0 != a.Smax ? b / a.Smax : 1) : 2 == a.motionmode && (b = a.tweenfu(b, 0, 1));\n p.hlookat = a.startH + b * (a.destH - a.startH);\n p.vlookat = a.startV + b * (a.destV - a.startV);\n p.fov = a.startF + b * (a.destF - a.startF)\n }\n\n function y(a, b) {\n var c = U(a, b);\n null == c && (c = a);\n return c\n }\n\n function l(a) {\n var b = a.waitfor;\n \"load\" == b ? Xa.isLoading() && (a.position = 0) : _[73] == b && Xa.isBlending() && (a.position = 0)\n }\n\n function u(a) {\n var b = a.varname, c = parseFloat(a.startval), d = parseFloat(a.endval), e = null != a.startval ? 0 < String(a.startval).indexOf(\"%\") : !1, g = null != a.endval ? 0 < String(a.endval).indexOf(\"%\") : !1;\n g ? e || (c = 0) : e && 0 == d && (g = !0);\n var e = 0, e = a.position, f = a.tweenmap;\n 0 <= b.indexOf(_[47], b.lastIndexOf(\".\") + 1) ? (c = parseInt(a.startval), d = parseInt(a.endval), 1 <= e ? e = d : (e = f(e, 0, 1), e = Math.min(Math.max((c >> 24) + e * ((d >> 24) - (c >> 24)), 0), 255) << 24 | Math.min(Math.max((c >> 16 & 255) + e * ((d >> 16 & 255) - (c >> 16 & 255)), 0), 255) << 16 | Math.min(Math.max((c >> 8 & 255) + e * ((d >> 8 & 255) - (c >> 8 & 255)), 0), 255) << 8 | Math.min(Math.max((c & 255) + e * ((d & 255) - (c & 255)), 0), 255))) : e = 1 <= e ? d : f(e, c, d - c);\n I(b, g ? e + \"%\" : e, !0, a.actioncaller);\n null != a.updatefu && h.callaction(a.updatefu, a.actioncaller)\n }\n\n var h = da;\n h.busy = !1;\n h.blocked = !1;\n h.queue = [];\n h.actioncaller = null;\n var c = [], K = [], D = null, z = 0, q = function () {\n this.id = null;\n this.blocking = !1;\n this.position = this.maxruntime = this.starttime = 0;\n this.updatefu = this.actioncaller = this.donecall = this.process = null\n };\n h.copyattributes = function (a, b) {\n for (var c in b) {\n var d = F(c);\n if (\"name\" != d && \"index\" != d && \"_type\" != d) {\n var e = b[c];\n if (_[11] !== typeof e) {\n if (e && _[13] == typeof e) {\n var h = e.slice(0, 4);\n \"get:\" == h ? e = U(e.slice(4)) : \"calc\" == h && 58 == e.charCodeAt(4) && (e = v(e.slice(5)))\n }\n a[d] = _[67] == typeof a[d] ? pa(e) : e\n }\n }\n }\n };\n h.assignstyle = function (a, b) {\n var c = U(a);\n if (c && (null == b && (b = c.style), b)) {\n c.style = b;\n var d = b.split(\"|\"), e, g;\n g = d.length;\n for (e = 0; e < g; e++) {\n var f = U(_[515] + d[e] + \"]\");\n f ? h.copyattributes(c, f) : la(3, a + _[198] + d[e])\n }\n }\n };\n h.isblocked = function () {\n if (h.blocked) {\n var a = D;\n if (a)D = null, h.stopall(), \"break\" != F(a) && h.callaction(a), h.processactions(); else return !0\n }\n return !1\n };\n h.actions_autorun = function (a, b) {\n var c = m.action.getArray(), d = [], e, g, f = null;\n g = c.length;\n for (e = 0; e < g; e++)(f = c[e]) && f.autorun == a && !f._arDone && (f._arDone = !0, d.push(f));\n g = d.length;\n if (0 < g) {\n c = \"\";\n for (e = 0; e < g; e++)f = d[e], c += _[452] + f.name + \");\";\n h.callaction(c, null, b);\n h.processactions()\n }\n };\n h.callwith = function (a, b) {\n var c = U(a, h.actioncaller);\n if (c) {\n var d = c._type;\n _[29] != d && _[1] != d || h.callaction(b, c)\n }\n };\n\n //sohow_base64\n h.callaction = function (a, b, c) {\n if (a && \"null\" != a && \"\" != a) {\n var d = typeof a;\n if (_[11] === d)\n a();\n else if (_[144] !== d && (a = Gb(a, b))) {\n var d = a.length, e = 0 < h.queue.length, g = !1;\n for (b = 0; b < d; b++) {\n var f = a[b];\n _[314] == f.cmd && (g = !0);\n f.breakable = g;\n 1 == c ? h.queue.splice(b, 0, f) : h.queue.push(f)\n }\n 0 == e && h.processactions()\n }\n }\n };\n var J = !1;\n h.processactions = function () {\n if (!J) {\n J = !0;\n for (var b = null, c = null, d = null, e = null, f = 0, q = h.queue; null != q && 0 < q.length;) {\n if (h.busy || h.blocked) {\n J = !1;\n return\n }\n f++;\n if (1E5 < f) {\n la(2, _[89]);\n q.length = 0;\n break\n }\n b = q.shift();\n c = String(b.cmd);\n d = b.args;\n b = b.caller;\n h.actioncaller = b;\n if (!(b && b._busyonloaded && b._destroyed) && \"//\" != c.slice(0, 2))if (\"call\" == c && (c = F(d.shift())), a(d, b, \"set\" == c), void 0 !== h[c])h[c].apply(h[c], d); else if (b && void 0 !== b[c])e = b[c], _[11] === typeof e ? e.apply(e, d) : h.callaction(b[c], b, !0); else {\n if (_[14] == c || \"call\" == c)c = F(d.shift());\n e = null;\n if (null != (e = U(c))) {\n var k = typeof e;\n _[11] === k ? e.apply(e, d) : _[144] === k ? la(2, _[87] + id(c)) : _[13] === typeof e && (d.splice(0, 0, c), e = E(e, d), h.callaction(e, b, !0))\n } else if (k = U(_[453] + c + \"]\")) {\n if (e = k.content)d.splice(0, 0, c), _[372] === F(k.type) ? g(e, d, b) : (e = E(e, d), h.callaction(e, b, !0))\n } else la(2, _[87] + id(c))\n }\n }\n h.blocked || (D = null);\n h.actioncaller = null;\n J = !1\n }\n };\n h.processAnimations = function (a) {\n var b = !1, d = c, e = d.length, g, f = Ta();\n a = 1 == a;\n for (g = 0; g < e; g++) {\n var q = d[g];\n if (q) {\n var k = 0 < q.maxruntime ? (f - q.starttime) / 1E3 / q.maxruntime : 1;\n isNaN(k) && (k = 1);\n 1 < k && (k = 1);\n q.position = k;\n null != q.process && (b = !0, q.process(q), k = q.position);\n if (1 <= k || a)d.splice(g, 1), e--, g--, q.blocking ? (h.blocked = !1, h.processactions()) : q.donecall && 0 == a && h.callaction(q.donecall, q.actioncaller)\n }\n }\n h.blocked && (b = !1);\n return b\n };\n h.fromcharcode = function () {\n var a = arguments;\n 2 == a.length && I(a[0], String.fromCharCode(y(a[1], h.actioncaller)), !1, h.actioncaller)\n };\n h.stopmovements = function () {\n Pa.stopFrictions(4)\n };\n h.stopall = function () {\n var a, b, d = h.queue;\n b = d.length;\n for (a = 0; a < b; a++) {\n var e = d[a];\n e && e.breakable && (e.cmd = \"//\")\n }\n c = [];\n h.blocked = !1\n };\n h.breakall = function () {\n h.processAnimations(!0)\n };\n h.oninterrupt = function (a) {\n D = a\n };\n h.delayedcall = function () {\n var a = arguments, b = a.length, d = 0;\n 3 == b && (d++, b--);\n 2 == b && (b = new q, b.maxruntime = Number(a[d]), b.donecall = a[d + 1], b.starttime = Ta(), b.actioncaller = h.actioncaller, b.id = 0 < d ? \"ID\" + F(a[0]) : \"DC\" + ++z, n(b.id), c.push(b))\n };\n h.stopdelayedcall = function (a) {\n n(\"ID\" + F(a))\n };\n h.set = function () {\n var a = arguments;\n 2 == a.length && I(a[0], a[1], !1, h.actioncaller)\n };\n h.copy = function () {\n var a = arguments;\n if (2 == a.length) {\n var b = U(a[1], h.actioncaller);\n I(a[0], void 0 === b ? null : b, !1, h.actioncaller)\n }\n };\n h.push = function () {\n var a = arguments;\n 1 == a.length && K.push(U(a[0], h.actioncaller))\n };\n h.pop = function () {\n var a = arguments;\n 1 == a.length && I(a[0], K.pop(), !1, h.actioncaller)\n };\n h[_[508]] = function () {\n var a = arguments, b = a.length, c = a[0], d = F(U(c, h.actioncaller));\n if (1 == b)I(c, !pa(d), !0, h.actioncaller); else if (3 <= b) {\n var e;\n b--;\n for (e = 1; e <= b; e++) {\n var g = F(a[e]), f = !1;\n isNaN(Number(d)) || isNaN(Number(g)) ? d == g && (f = !0) : Number(d) == Number(g) && (f = !0);\n if (f) {\n e++;\n e > b && (e = 1);\n I(c, a[e], !0, h.actioncaller);\n break\n }\n }\n }\n };\n h.roundval = function () {\n var a = arguments;\n if (1 <= a.length) {\n var b = Number(U(a[0], h.actioncaller)), c = 2 == a.length ? parseInt(a[1]) : 0, b = 0 == c ? Math.round(b).toString() : b.toFixed(c);\n I(a[0], b, !1, h.actioncaller, !0)\n }\n };\n h.tohex = function () {\n var a = arguments, b = a.length;\n if (0 < b) {\n var c = parseInt(U(a[0], h.actioncaller)).toString(16).toUpperCase();\n 2 < b && (c = (_[419] + c).slice(-parseInt(a[2])));\n 1 < b && (c = a[1] + c);\n I(a[0], c, !1, h.actioncaller, !0)\n }\n };\n h.tolower = function () {\n var a = arguments;\n 1 == a.length && I(a[0], F(U(a[0], h.actioncaller)), !1, h.actioncaller, !0)\n };\n h.toupper = function () {\n var a = arguments;\n 1 == a.length && I(a[0], (\"\" + U(a[0], h.actioncaller)).toUpperCase(), !1, h.actioncaller, !0)\n };\n h.inc = function () {\n var a = arguments, b = a.length;\n if (1 <= b) {\n var c = Number(U(a[0], h.actioncaller)) + (1 < b ? Number(a[1]) : 1);\n 3 < b && c > Number(a[2]) && (c = Number(a[3]));\n I(a[0], c, !0, h.actioncaller)\n }\n };\n h.dec = function () {\n var a = arguments, b = a.length;\n if (1 <= b) {\n var c = Number(U(a[0], h.actioncaller)) - (1 < b ? Number(a[1]) : 1);\n 3 < b && c < Number(a[2]) && (c = Number(a[3]));\n I(a[0], c, !0, h.actioncaller)\n }\n };\n h.add = function () {\n var a = k(arguments);\n a && I(a[0], a[1] + a[2], !1, h.actioncaller)\n };\n h.sub = function () {\n var a = k(arguments);\n a && I(a[0], a[1] - a[2], !1, h.actioncaller)\n };\n h.mul = function () {\n var a = k(arguments);\n a && I(a[0], a[1] * a[2], !1, h.actioncaller)\n };\n h.div = function () {\n var a = k(arguments);\n a && I(a[0], a[1] / a[2], !1, h.actioncaller)\n };\n h.mod = function () {\n var a = k(arguments);\n if (a) {\n var b = a[1], c = b | 0, b = b + (-c + c % (a[2] | 0));\n I(a[0], b, !1, h.actioncaller)\n }\n };\n h.pow = function () {\n var a = k(arguments);\n a && I(a[0], Math.pow(a[1], a[2]), !1, h.actioncaller)\n };\n h.clamp = function () {\n var a = arguments;\n if (3 == a.length) {\n var b = h.actioncaller, c = Number(U(a[0], b)), d = Number(a[1]), e = Number(a[2]);\n c < d && (c = d);\n c > e && (c = e);\n I(a[0], c, !1, b)\n }\n };\n h.remapfovtype = function () {\n var a = arguments, b = a.length;\n if (3 == b || 5 == b) {\n var c = h.actioncaller, d = Number(U(a[0], c)), e = 3 == b ? m.area.pixelwidth : Number(U(a[3], c)), b = 3 == b ? m.area.pixelheight : Number(U(a[4], c)), d = p.fovRemap(d, a[1], a[2], e, b);\n I(a[0], d, !1, c)\n }\n };\n h.screentosphere = function () {\n var a = arguments;\n if (4 == a.length) {\n var b = h.actioncaller, c = p.screentosphere(Number(U(a[0], b)), Number(U(a[1], b)));\n I(a[2], c.x, !1, b);\n I(a[3], c.y, !1, b)\n }\n };\n h.spheretoscreen = function () {\n var a = arguments;\n if (4 == a.length) {\n var b = h.actioncaller, c = p.spheretoscreen(Number(U(a[0], b)), Number(U(a[1], b)));\n I(a[2], c.x, !1, b);\n I(a[3], c.y, !1, b)\n }\n };\n h.screentolayer = function () {\n var a = arguments;\n if (5 == a.length) {\n var b = h.actioncaller, c = xa.getItem(a[0]);\n if (c) {\n var d = Number(U(a[1], b)), e = Number(U(a[2], b)), g = tc, f = tc, q = c.sprite;\n if (q) {\n var k = X, f = V.viewerlayer.getBoundingClientRect(), n = q.getBoundingClientRect(), g = d * k - (n.left - f.left + q.clientLeft + q.scrollLeft), f = e * k - (n.top - f.top + q.clientTop + q.scrollTop);\n c.scalechildren && (k = 1);\n g /= c._finalxscale * k;\n f /= c._finalyscale * k\n }\n I(a[3], g, !1, b);\n I(a[4], f, !1, b)\n }\n }\n };\n h.layertoscreen = function () {\n var a = arguments;\n if (5 == a.length) {\n var b = h.actioncaller, c = xa.getItem(a[0]);\n if (c) {\n var d = Number(U(a[1], b)), e = Number(U(a[2], b)), g = tc, f = tc, q = c.sprite;\n if (q)var f = X, k = c.scalechildren ? f : 1, n = V.viewerlayer.getBoundingClientRect(), t = q.getBoundingClientRect(), g = d * c._finalxscale / k + (t.left - n.left + q.clientLeft + q.scrollLeft) / f, f = e * c._finalyscale / k + (t.top - n.top + q.clientTop + q.scrollTop) / f;\n I(a[3], g, !1, b);\n I(a[4], f, !1, b)\n }\n }\n };\n h.escape = function () {\n e(0, arguments, h.actioncaller)\n };\n h.unescape = function () {\n e(1, arguments, h.actioncaller)\n };\n h.txtadd = function () {\n var a = arguments, b, c = a.length, d = 2 == c ? String(U(a[0], h.actioncaller)) : \"\";\n \"null\" == d && (d = \"\");\n for (b = 1; b < c; b++)d += a[b];\n I(a[0], d, !1, h.actioncaller, !0)\n };\n h.subtxt = function () {\n var a = arguments, b = a.length;\n if (2 <= b) {\n var c = U(a[1], h.actioncaller), c = null == c ? String(a[1]) : String(c), c = c.substr(2 < b ? Number(a[2]) : 0, 3 < b ? Number(a[3]) : void 0);\n I(a[0], c, !1, h.actioncaller, !0)\n }\n };\n h.indexoftxt = function () {\n var a = arguments, b = a.length;\n 3 <= b && (b = String(a[1]).indexOf(String(a[2]), 3 < b ? Number(a[3]) : 0), I(a[0], b, !1, h.actioncaller, !0))\n };\n h.txtreplace = function () {\n var a = arguments, b = a.length;\n if (3 == b || 4 == b) {\n var b = 3 == b ? 0 : 1, c = U(a[b], h.actioncaller);\n if (c)var d = a[b + 2], c = c.split(a[b + 1]).join(d);\n I(a[0], c, !1, h.actioncaller, !0)\n }\n };\n h.txtsplit = function () {\n var a = arguments, b = a.length;\n if (3 <= b) {\n var c = (\"\" + y(a[0], h.actioncaller)).split(\"\" + a[1]), d;\n if (3 == b)for (d = 0; d < c.length; d++)I(a[2] + \"[\" + d + _[455], c[d], !1, h.actioncaller, !0); else for (d = 2; d < b; d++)I(a[d], c[d - 2], !1, h.actioncaller, !0)\n }\n };\n h.showlog = function () {\n var a = arguments, a = !(1 == a.length && 0 == pa(a[0]));\n V.showlog(a)\n };\n h.trace = function () {\n var a = arguments, b, c = a.length, d = \"\", e = h.actioncaller;\n for (b = 0; b < c; b++)var g = a[b], f = U(g, e), d = null != f ? d + f : d + g;\n la(1, d)\n };\n h[_[507]] = function () {\n var a = arguments, b, c = a.length, d = h.actioncaller;\n for (b = 0; b < c; b++)a:{\n var e = d, g = void 0, f = void 0, q = void 0, k = Vc(a[b]), f = k.length;\n if (1 == f && e && (q = k[0], e.hasOwnProperty(q))) {\n e[q] = null;\n delete e[q];\n break a\n }\n for (var n = m, g = 0; g < f; g++) {\n var q = k[g], t = g == f - 1, G = null, l = q.indexOf(\"[\");\n 0 < l && (G = oc(q, l + 1, q.length - 1, e), q = q.slice(0, l));\n if (void 0 !== n[q]) {\n if (null != G && (l = n[q], l.isArray))if (q = l.getItem(G))if (t)break a; else {\n n = q;\n continue\n } else break;\n if (t) {\n n[q] = null;\n delete n[q];\n break a\n } else n = n[q]\n } else break\n }\n }\n };\n h.error = function () {\n 1 == arguments.length || !1 !== pa(arguments[1]) ? Ea(arguments[0]) : la(3, arguments[0])\n };\n h.openurl = function () {\n var a = arguments;\n L.open(a[0], 0 < a.length ? a[1] : _[504])\n };\n h.loadscene = function () {\n var a = arguments;\n if (0 < a.length) {\n var b = a[0], c = U(_[72] + b + _[61]), d = U(_[72] + b + _[394]);\n d && (d += \";\");\n null == c ? la(3, 'loadscene() - scene \"' + b + '\" not found') : (m.xml.scene = b, m.xml.view = {}, Xa.loadxml(_[124] + c + _[117], a[1], a[2], a[3], d))\n }\n };\n h.jsget = function () {\n var a = arguments;\n if (2 == a.length) {\n var b = a[0], c = a[1], d = null;\n try {\n (function () {\n var krpano = V.viewerlayer;\n d = eval(c)\n })()\n } catch (e) {\n la(3, \"js\" + (b ? \"get\" : \"call\") + '() - calling Javascript \"' + c + '\" failed: ' + e)\n }\n b && I(b, d, !1, h.actioncaller)\n }\n };\n h.jscall = function () {\n var a = arguments;\n 1 == a.length && h.jsget(null, a[0])\n };\n h.parseFunction = function (b) {\n var c = null;\n if (b = Gb(b, null, !0))b = b[0], a(b.args, h.actioncaller), c = [b.cmd].concat(b.args);\n return c\n };\n h.js = function (b) {\n b = \"\" + b;\n var c = Gb(b, null, !0);\n if (c) {\n c = c[0];\n a(c.args, h.actioncaller);\n var d = !1;\n if (_[11] == typeof L[c.cmd]) {\n d = !0;\n try {\n L[c.cmd].apply(L[c.cmd], c.args)\n } catch (e) {\n d = !1\n }\n }\n if (0 == d) {\n c = c.cmd + (0 < c.args.length ? \"('\" + c.args.join(\"','\") + \"');\" : \"();\");\n try {\n eval(c)\n } catch (g) {\n la(2, 'js() - calling Javascript \"' + b + '\" failed: ' + g)\n }\n }\n }\n };\n h.setfov = function () {\n var a = arguments;\n 1 == a.length && (p.fov = Number(a[0]))\n };\n h.lookat = function () {\n var a = arguments;\n if (2 <= a.length) {\n var b;\n b = Number(a[0]);\n isNaN(b) || (p.hlookat = b);\n b = Number(a[1]);\n isNaN(b) || (p.vlookat = b);\n b = Number(a[2]);\n isNaN(b) || (p.fov = b);\n b = Number(a[3]);\n isNaN(b) || (p.distortion = b);\n b = Number(a[4]);\n isNaN(b) || (p.architectural = b);\n b = Number(a[5]);\n isNaN(b) || (p.pannini = \"\" + b)\n }\n };\n h.adjusthlookat = function () {\n var a = arguments;\n 1 == a.length && (p.hlookat = nc(p.hlookat, Number(a[0])))\n };\n h.adjust360 = function () {\n var a = arguments;\n if (2 == a.length) {\n var b = h.actioncaller;\n I(a[0], nc(U(a[0], b), Number(y(a[1], b))), !1, b)\n }\n };\n h.loop = function () {\n f(\"loop\", _[192], arguments, h.actioncaller)\n };\n h.asyncloop = function () {\n f(_[402], _[164], arguments, h.actioncaller)\n };\n h[\"for\"] = function () {\n f(\"for\", _[155], arguments, h.actioncaller)\n };\n h.asyncfor = function () {\n f(_[409], \"if('%5'!='NEXTLOOP',%1);if(%2,%4;%3;delayedcall(0,asyncfor(%1,%2,%3,%4,NEXTLOOP)););\", arguments, h.actioncaller)\n };\n h.calc = function () {\n var a, b = arguments;\n 2 == b.length && (a = v(b[1]), b[0] && I(b[0], a, !1, h.actioncaller));\n return a\n };\n h.resolvecondition = function () {\n var a = h.actioncaller, b = arguments, c = b.length, d = null, e = null, e = !1;\n if (2 == c || 3 == c) {\n d = F(b[0]);\n e = 2 == c ? b[1] : b[2];\n if (\"null\" == d || \"\" == d)d = null;\n e = null == e || \"\" == e ? !1 : v(e);\n null != d && (3 == c && (b = F(b[1]), c = pa(U(d, a)), \"and\" == b ? e = c && e : \"or\" == b ? e = c || e : \"xor\" == b && (e = !(c && e) && (c || e))), I(d, e, !1, a))\n }\n return e\n };\n h[\"if\"] = function () {\n var a = arguments, b = h.actioncaller;\n 2 <= a.length && (v(a[0]) ? h.callaction(a[1], b, !0) : 3 == a.length && h.callaction(a[2], b, !0))\n };\n h.ifnot = function () {\n var a = arguments;\n h[\"if\"](a[0], a[2], a[1])\n };\n h.stoplookto = function () {\n n(_[69])\n };\n h.lookto = function () {\n var b = arguments, d = b.length;\n if (2 <= d) {\n var e = h.actioncaller, g = new q;\n h.stopmovements();\n n(_[69]);\n g.id = _[69];\n g.actioncaller = e;\n 1 == pa(b[5]) ? (g.blocking = !1, g.donecall = b[6]) : (g.blocking = !0, h.blocked = !0);\n 4 < d && void 0 === b[4] && d--;\n 3 < d && void 0 === b[3] && d--;\n 2 < d && void 0 === b[2] && d--;\n var f = Number(b[0]), k = Number(b[1]), l = 2 < d ? Number(b[2]) : p.fov, m = 3 < d ? b[3] : null, u = 4 < d ? pa(b[4]) : !0;\n if (!(isNaN(f) || isNaN(k) || isNaN(l))) {\n var B = 1, b = 720, d = -720, t = 720, G = p.hlookat, w = G, P = p.vlookat, v = p.fov;\n if (u) {\n for (; -90 > k || 90 < k;)-90 > k ? (k = -180 - k, f += 180) : 90 < k && (k = 180 - k, f -= 180);\n for (; 0 > G;)G += 360;\n for (; 360 < G;)G -= 360;\n for (; 0 > f;)f += 360;\n for (; 360 < f;)f -= 360;\n for (; -180 > P;)P += 360;\n for (; 180 < P;)P -= 360;\n G = nc(G, f);\n P = nc(P, k);\n u = G - w;\n G -= u;\n f -= u\n }\n g.startH = G;\n g.startV = P;\n g.startF = v;\n g.destH = f;\n g.destV = k;\n g.destF = l;\n f = Math.sqrt((f - G) * (f - G) + (k - P) * (k - P) + (l - v) * (l - v));\n m && ((m = Gb(m)) && (m = m[0]), m && (k = m.cmd, l = m.args, a(l, e), _[43] == k ? (B = 0, t = 360, 1 == m.args.length && (t = parseFloat(l[0]))) : _[496] == k ? (B = 1, 0 < m.args.length && (b = parseFloat(l[0])), 1 < m.args.length && (d = parseFloat(l[1])), 2 < m.args.length && (t = parseFloat(l[2])), b = +Math.abs(b), d = -Math.abs(d), t = +Math.abs(t)) : \"tween\" == k && (B = 2, g.tweenfu = ac.getTweenfu(l[0]), g.maxruntime = parseFloat(l[1]), isNaN(g.maxruntime) && (g.maxruntime = .5))));\n g.motionmode = B;\n 0 == B ? g.maxruntime = f / t : 1 == B && (e = f, B = t * t / (2 * b), m = t / b, f = -(t * t) / (2 * d), k = -t / d, l = e - (B + f), G = l / t, 0 > G && (t = Math.sqrt(2 * e * b * d / (d - b)), B = t * t / (2 * b), m = t / b, f = -(t * t) / (2 * d), k = -t / d, G = l = 0), P = m + G + k, g.accelspeed = b, g.breakspeed = d, g.Vmax = t, g.Tmax = P, g.Smax = e, g.T1 = m, g.T2 = G, g.T3 = k, g.S1 = B, g.S2 = l, g.S3 = f, g.maxruntime = P);\n g.starttime = Ta();\n g.process = r;\n c.push(g)\n }\n }\n };\n h.looktohotspot = function () {\n var a = arguments, b = h.actioncaller, c = Ua.getItem(1 > a.length ? b ? b.name : \"\" : a[0]);\n if (c) {\n var b = c.ath, d = c.atv, e = 30, e = c.getcenter(), b = e.x, d = e.y, e = e.z, c = Number(a[1]);\n isNaN(c) || (e = c);\n c = p.fovmin;\n e < c && (e = c);\n h.lookto(b, d, e, a[2], a[3])\n }\n };\n h.moveto = function () {\n var a = arguments;\n 2 <= a.length && h.lookto(a[0], a[1], p.fov, a[2])\n };\n h.zoomto = function () {\n var a = arguments;\n 1 <= a.length && h.lookto(p.hlookat, p.vlookat, a[0], a[1])\n };\n h.getlooktodistance = function () {\n var a = arguments, b = a.length;\n if (3 <= b) {\n var c = h.actioncaller, d = Number(y(a[1], c)), e = Number(y(a[2], c)), g = p.hlookat, f = p.vlookat;\n 5 == b && (g = Number(y(a[3], c)), f = Number(y(a[4], c)));\n if (!(isNaN(d) || isNaN(e) || isNaN(g) || isNaN(f))) {\n var b = Math.PI, q = b / 180, d = b - d * q, g = b - g * q, f = f * q, e = e * q, d = Math.acos(Math.cos(f) * Math.cos(g) * Math.cos(e) * Math.cos(d) + Math.sin(f) * Math.sin(e) + Math.cos(f) * Math.sin(g) * Math.cos(e) * Math.sin(d)) / q;\n I(a[0], d, !1, c)\n }\n }\n };\n h.wait = function () {\n var a = arguments;\n if (1 == a.length) {\n var a = a[0], b = F(a);\n if (\"load\" == b || _[73] == b)a = 0; else {\n b = \"time\";\n a = Number(a);\n if (isNaN(a))return;\n 0 >= a && (b = _[73], a = 0)\n }\n var d = new q;\n d.waitfor = b;\n d.maxruntime = a;\n d.process = l;\n d.starttime = Ta();\n d.actioncaller = h.actioncaller;\n d.id = \"WAIT\" + ++z;\n d.blocking = !0;\n h.blocked = !0;\n c.push(d)\n }\n };\n h.tween = function () {\n var a = arguments, e = a.length;\n if (2 <= e) {\n var g = h.actioncaller, f = new q, k = F(a[0]);\n if (0 < k.indexOf(\"|\")) {\n var e = (\"\" + a[0]).split(\"|\"), g = (\"\" + a[1]).split(\"|\"), f = a[3] ? (\"\" + a[3]).split(\"|\") : [a[3]], l = e.length, m = g.length, r = f.length, p = parseFloat(a[2]);\n if (0 > p || isNaN(p))p = .5;\n for (k = 0; k < m; k++)g[k] = Ha(g[k]);\n for (k = 0; k < r; k++)f[k] = Ha(f[k]);\n for (k = 0; k < l; k++)h.tween(Ha(e[k]), g[k % m], p, f[k % r], k == l - 1 ? a[4] : null, k == l - 1 ? a[5] : null)\n } else {\n l = k;\n r = a[1];\n m = !1;\n g && 0 > k.indexOf(\".\") && g.hasOwnProperty(k) && (l = g._type + \"[\" + g.name + \"].\" + k, m = !0);\n 0 == m && 0 < k.indexOf(\"[\") && (l = k = b(k, g), l = l.split(_[134]).join(_[127]));\n f.id = l;\n f.varname = k;\n f.actioncaller = g;\n f.startval = m ? g[k] : U(k, g);\n if (null == f.startval || \"\" == f.startval)f.startval = 0;\n f.endval = r;\n k = 2 < e ? String(a[2]) : \"0.5\";\n if (0 < k.indexOf(\"(\") && (p = Gb(k))) {\n var B = p[0];\n _[427] == B.cmd && (p = Number(B.args[0]), k = Number(B.args[1]), r = Math.abs(parseFloat(r) - parseFloat(f.startval)), k = k * r / p)\n }\n k = parseFloat(k);\n isNaN(k) && (k = .5);\n f.maxruntime = k;\n f.tweenmap = ac.getTweenfu(3 < e ? a[3] : _[56]);\n if (4 < e)if (\"wait\" == F(a[4]))f.blocking = !0, h.blocked = !0; else if (r = a[4])0 == m && 0 < r.indexOf(\"[\") && (r = b(r, g)), f.donecall = r;\n 5 < e && (f.updatefu = a[5]);\n f.starttime = Ta();\n f.process = u;\n n(l);\n c.push(f)\n }\n }\n };\n h.stoptween = function () {\n var a = h.actioncaller, c = arguments, e = c.length, g;\n for (g = 0; g < e; g++) {\n var f = F(c[g]);\n if (0 < f.indexOf(\"|\"))h.stoptween.apply(h.stoptween, f.split(\"|\")); else {\n if (a && 0 > f.indexOf(\".\")) {\n if (n(a._type + \"[\" + a.name + \"].\" + f))continue\n } else 0 < f.indexOf(\"[\") && (f = b(f, a)), f = f.split(_[134]).join(_[127]);\n n(f)\n }\n }\n };\n h.invalidatescreen = function () {\n Kb = Ta();\n p.haschanged = !0\n };\n h.updatescreen = function () {\n p.haschanged = !0\n };\n h.updateobject = function () {\n M && M.updateFOV && M.updateFOV(M, [Number(N.hfov), Number(N.vfov), Number(N.voffset)]);\n p.haschanged = !0\n };\n h.loadpano = function (a, b, c, d, e) {\n m.xml.scene = null;\n m.xml.view = {};\n Xa.loadpano(a, b, c, d, e)\n };\n h.loadpanoscene = function (a, b, c, d, e, h) {\n m.xml.scene = b;\n m.xml.view = {};\n m._loadpanoscene_name = b;\n Xa.loadpano(a, c, d, e, h)\n };\n h.loadxml = function (a, b, c, d, e) {\n m.xml.scene = null;\n m.xml.view = {};\n Xa.loadxml(a, b, c, d, e)\n };\n h.fscommand = function () {\n };\n h.freezeview = function () {\n };\n h.reloadpano = function () {\n };\n h.addlensflare = function () {\n };\n h.removelensflare = function () {\n };\n h.SAcall = function (a) {\n var b = U(_[14]);\n if ((a = Gb(a)) && b) {\n var c, d;\n d = a.length;\n for (c = 0; c < d; c++) {\n var e = a[c];\n if (e) {\n var g = e.cmd, f = b.getItem(g);\n f && 1 == pa(f.secure) ? (e = e.args, e.splice(0, 0, g), h.callaction(E(f.content, e))) : la(2, _[428] + g + _[282])\n }\n }\n }\n }\n })();\n var V = {};\n (function () {\n function a(a) {\n a = _[189] + a;\n L.console ? L.console.log(a) : alert(a)\n }\n\n function d(a, b, c, d, e, h) {\n var g = Ja(), f = g.style;\n f.position = _[0];\n \"LT\" == a ? (f.left = b, f.top = c) : (f.left = b, f.bottom = c);\n f.width = d;\n f.height = e;\n f.overflow = _[6];\n !1 === h && (f.webkitUserSelect = f.MozUserSelect = f.msUserSelect = f.oUserSelect = f.userSelect = \"none\");\n return g\n }\n\n function p(a) {\n if (r.fullscreen = a)L.activekrpanowindow = c.id;\n Ka(1 == a ? _[221] : _[225])\n }\n\n function f(a) {\n l && (Aa(a), r.onResize(a), setTimeout(e, 250))\n }\n\n function g(a, b) {\n for (var c = a.style, d = b.length, e = 0, e = 0; e < d; e += 2)c[b[e]] = b[e + 1]\n }\n\n function n(a) {\n p(!!(aa.fullscreenElement || aa.mozFullScreenElement || aa.webkitIsFullScreen || aa.webkitFullscreenElement || aa.msFullscreenElement))\n }\n\n function k(a) {\n if (l) {\n a = L.innerHeight;\n var b = vb;\n a < b ? r.__scrollpage_yet = !0 : r.__scrollpage_yet && (r.__scrollpage_yet = !1, e());\n if (a != b)r.onResize(null)\n }\n }\n\n function e() {\n var a = L.innerWidth, c = L.innerHeight;\n r.__scrollpage_yet && c == vb && (r.__scrollpage_yet = !1);\n var d = screen.height - 64, e = 268;\n 26 <= b.crios && (d += 44, e = 300);\n (320 == a && c != d || a == screen.height && c != e) && L.scrollTo(0, 0)\n }\n\n function w() {\n if (8 == b.iosversion && b.ipad) {\n var a = screen.width, d = screen.height, e = L.innerWidth, f = L.innerHeight, g = c.clientHeight;\n if (Math.min(e, f) == Math.min(a, d) && Math.max(e, f) == Math.max(a, d) || g > f)qa ^= 1, L.scrollTo(0, qa), setTimeout(w, 60)\n }\n }\n\n function x(a, b) {\n Aa(a);\n var c = \"none\" == D.style.display ? \"\" : \"none\";\n void 0 !== b && (c = 1 == b ? \"\" : \"none\");\n D.style.display = c;\n z.scrollTop = z.scrollHeight\n }\n\n function v() {\n Ca && (K.removeChild(Ca), Ca = null);\n var a, c = Ja();\n a = 25;\n b.androidstock && (a *= b.pixelratio);\n g(c, [_[65], _[0], \"left\", \"50%\", \"top\", \"50%\", _[47], _[40], _[120], a + \"px\", _[51], \"none\", _[148], _[5], _[267], \"none\"]);\n a = c.style;\n a.zIndex = 999999;\n a.opacity = .67;\n a = Ja();\n g(a, \"position;relative;left;-50%;top;-25px;fontFamily;sans-serif;textShadow;#000000 1px 1px 2px;lineHeight;110%\".split(\";\"));\n a.innerHTML = _[433] + (Na && Na[1] && 6 < Ha(Na[1], !1).length ? Na[1] : _[169]) + _[375];\n c.appendChild(a);\n K.appendChild(c);\n Ca = c\n }\n\n var r = V;\n r.fullscreen = !1;\n var y = !0, l = !1, u = !1;\n r.__scrollpage_yet = !1;\n var h = null, c = null, K = null;\n r.htmltarget = null;\n r.viewerlayer = null;\n r.controllayer = null;\n r.panolayer = null;\n r.pluginlayer = null;\n r.hotspotlayer = null;\n var D = r.svglayer = null, z = null, q = null, J = null, C = 0, Q = 0, A = !1, H = !1;\n r.build = function (e) {\n function h(a) {\n x(null, !1)\n }\n\n var l = e.target, t = e.id, G = aa.getElementById(l);\n if (!G)return a(_[172] + l), !1;\n for (var l = null, p = t, C = 1; ;)if (l = aa.getElementById(t))if (_[254] == p)C++, t = p + C; else return a(_[165] + t), !1; else break;\n l = Ja();\n l.id = t;\n l.style.position = _[119];\n l.style.overflow = _[6];\n l.style.lineHeight = _[45];\n l.style.fontWeight = _[45];\n l.style.fontStyle = _[45];\n l.tabIndex = -1;\n l.style.outline = 0;\n t = _[26];\n e.bgcolor && (t = e.bgcolor);\n e = F(e.wmode);\n if (_[36] == e || _[142] == e)t = null, m.bgcolor = 4278190080;\n null != t && (l.style.background = t, m.bgcolor = parseInt(t.slice(1), 16));\n G.appendChild(l);\n c = l;\n r.htmltarget = G;\n r.viewerlayer = l;\n K = d(\"LT\", 0, 0, \"100%\", \"100%\", !1);\n g(K, \"msTouchAction none touchAction none msContentZooming none contentZooming none -webkit-tap-highlight-color transparent\".split(\" \"));\n r.controllayer = K;\n t = d(\"LT\", 0, 0, \"100%\", \"100%\");\n r.panolayer = t;\n g(t, [_[258], \"none\"]);\n G = d(\"LT\", 0, 0, \"100%\", \"100%\", !1);\n 0 == b.ie && 0 == b.firefox && g(G, [Id, _[59]]);\n e = G;\n b.android && b.firefox && Kc && (p = d(\"LT\", 0, 0, \"1px\", \"1px\"), p.style.background = _[226], p.style.pointerEvents = \"none\", p.style.zIndex = 999999999, p.style[ib] = _[20], G.appendChild(p));\n var p = b.androidstock ? b.pixelratio : 1, C = 156 * p, u = (b.mobile ? 8 : 13) * p, w = b.androidstock || b.android && b.chrome ? 6 : 8;\n D = d(\"LB\", 0, 0, \"100%\", C + \"px\", !0);\n D.style.display = \"none\";\n !0 !== b.opera && Kc && (2 > Nb && (D.style[ib] = _[20]), b.ios && 0 == b.simulator || b.android && b.chrome) && (D.style[ib] = _[20]);\n D.style.zIndex = 999999999;\n var A = d(\"LT\", 0, 0, \"100%\", \"100%\", !0);\n A.style.opacity = .67;\n b.android && b.opera && (A.style.borderTop = _[179]);\n g(A, [_[255], _[26], pc, _[441] + w + _[373], _[114], w + \"px\", _[482], .67]);\n z = aa.createElement(\"pre\");\n w = null;\n b.mac && (w = _[270] + (L.chrome ? \"1px\" : \"0\"));\n b.realDesktop ? (z.style.fontFamily = _[55], z.style.fontSize = \"11px\", w && (z.style.fontSize = \"13px\", z.style.textShadow = w)) : (z.style.fontFamily = _[38], z.style.fontSize = u + \"px\");\n g(z, [_[65], _[0], \"left\", \"5px\", \"top\", \"0px\", _[50], \"left\", _[329], 0, _[296], b.realDesktop ? \"16px\" : 0, _[346], 0, _[286], 0, _[107], \"none\", _[71], 0, _[114], (b.realDesktop ? 10 : 8) + \"px\", _[49], \"100%\", _[28], C - 10 + \"px\", _[421], \"auto\", _[210], \"none\", _[471], \"block\", _[395], \"left\", _[338], _[411], _[51], \"none\", _[47], _[40]]);\n q = Ja();\n w && (q.style.textShadow = w);\n g(q, [_[65], _[0], _[3], 0, _[2], 0, _[132], \"0 4px\", _[28], C - 10 + \"px\", _[230], \"none\", _[279], \"none\", _[148], _[18], _[76], _[36], _[347], b.realDesktop ? _[55] : _[38], _[120], (b.realDesktop ? 10 : 9 * p | 0) + \"px\", _[47], _[40]]);\n q.innerHTML = \"CLOSE\";\n R(q, _[115], Aa, !0);\n R(q, _[118], h, !0);\n R(q, _[7], h, !0);\n D.appendChild(A);\n D.appendChild(z);\n D.appendChild(q);\n l.appendChild(K);\n K.appendChild(t);\n 0 < b.iosversion && 5 > b.iosversion && (e = Ja(), e.style.position = _[0], G.appendChild(e), K.style.webkitTransformStyle = _[59], G.style.webkitTransformStyle = \"flat\");\n K.appendChild(G);\n b.ios && (t = Ja(), t.style.position = _[0], t.style.webkitTransformStyle = _[59], e.appendChild(t));\n l.appendChild(D);\n r.pluginlayer = G;\n r.hotspotlayer = e;\n b.fullscreensupport && R(aa, b.browser.events.fullscreenchange, n);\n J = [l.style.width, l.style.height];\n r.onResize(null);\n R(L, _[137], r.onResize, !1);\n b.iphone && b.safari && R(L, _[133], k, !1);\n R(L, _[84], f, !1);\n return !0\n };\n r.setFullscreen = function (a) {\n if (b.fullscreensupport)if (a)c[b.browser.events.requestfullscreen](); else try {\n aa.exitFullscreen ? aa.exitFullscreen() : aa.mozCancelFullScreen ? aa.mozCancelFullScreen() : aa.webkitCancelFullScreen ? aa.webkitCancelFullScreen() : aa.webkitExitFullscreen ? aa.webkitExitFullscreen() : aa.msExitFullscreen && aa.msExitFullscreen()\n } catch (d) {\n } else {\n var e = aa.body, f = e.style, h = c.style;\n if (a)r.fsbkup = [f.padding, f.margin, f.overflow, e.scrollTop, e.scrollLeft, L.pageYOffset], f.padding = \"0 0\", f.margin = \"0 0\", f.overflow = _[6], e.scrollTop = \"0\", e.scrollLeft = \"0\", e.appendChild(c), h.position = _[0], h.left = 0, h.top = 0, h.width = \"100%\", h.height = \"100%\", Pa.domUpdate(), L.scrollTo(0, 0), p(!0); else if (a = r.fsbkup)r.htmltarget.appendChild(c), f.padding = a[0], f.margin = a[1], f.overflow = a[2], e.scrollTop = a[3], e.scrollLeft = a[4], h.position = _[119], Pa.domUpdate(), L.scrollTo(0, a[5]), r.fsbkup = null, p(!1)\n }\n };\n var qa = 0;\n r.onResize = function (a, d) {\n A = d;\n Aa(a);\n var f = c, g = \"100%\", k = \"100%\";\n null == J && (J = [f.style.width, f.style.height]);\n J && (g = J[0], k = J[1], \"\" == g && (g = \"100%\"), \"\" == k && (k = \"100%\"), J = null);\n var q = Jb.so;\n q && (q.width && (g = q.width), q.height && (k = q.height));\n r.fullscreen && (g = k = \"100%\");\n var n = f.parentNode, m = 0, p = f;\n do if (m = p.offsetHeight, b.ie && r.fullscreen && 20 > m && (m = 0), 1 >= m) {\n if (p = p.parentNode, null == p) {\n m = L.innerHeight;\n break\n }\n } else break; while (1);\n q = 0;\n for (p = f; p && \"body\" != F(p.nodeName);)q++, p = p.parentNode;\n var n = n ? n.offsetHeight : L.innerHeight, C = f.clientWidth, p = g, f = k;\n 0 < String(g).indexOf(\"%\") ? g = parseFloat(g) * C / 100 : (g = parseFloat(g), p = g + \"px\");\n 0 < String(k).indexOf(\"%\") ? k = parseFloat(k) * m / 100 : (k = parseFloat(k), f = k + \"px\");\n 1 > k && (k = 100);\n m = screen.width;\n C = screen.height;\n b.iphone && 320 == m && 4 > b.iosversion && 480 > C && (C = 480);\n var v = L.innerWidth, x = L.innerHeight;\n b.ios && 2 >= q && 0 == r.fullscreen && (26 <= b.crios && n > x && (x = k = n), w(), 7 <= b.iosversion && k > x && (k = x, l = u = !0, setTimeout(e, 10)));\n y && (y = !1, b.iphone ? (320 == v && x >= C - 124 ? x = C - 124 : v == C && 208 <= x && (x = 208), 2 >= q && (v == g && x && (320 == g && k == C - 124 || g == C && (208 == k || 320 == k)) && (l = !0), 26 <= b.crios && (320 == g || g == C) && (l = !0))) : b.ipad && 28 <= b.crios && 2 >= q && (g > k != m > C && (q = m, m = C, C = q), g == m && k == C - 20 && (u = l = !0)));\n l && (u ? (g = v, k = x) : 320 == L.innerWidth ? (g = 320, k = C - 64, b.crios && (k += 44)) : (g = C, k = 320 == L.innerHeight ? 320 : 268, 26 <= b.crios && (k = 300)), p = g + \"px\", f = k + \"px\");\n b.getViewportScale();\n q = p;\n Pa && Pa.focusLoss();\n l && null == h && (h = setInterval(e, 4E3), setTimeout(e, 250));\n n = !1;\n if (bc != g || vb != k || A)n = !0, A = !1, bc = g, vb = k;\n Ra && (Ra._pxw = Ra.pixelwidth = Ra.imagewidth = bc / X, Ra._pxh = Ra.pixelheight = Ra.imageheight = vb / X);\n Za && (Za._pxw = Za.pixelwidth = Za.imagewidth = bc / X, Za._pxh = Za.pixelheight = Za.imageheight = vb / X);\n n && (pb && pb.calc(bc, vb), Ka(_[63]), n = !1);\n pb ? (n |= pb.calc(bc, vb), K.style.left = pb.pixelx * X + \"px\", K.style.top = pb.pixely * X + \"px\", K.style.width = Qa + \"px\", K.style.height = ya + \"px\", g = Qa, k = ya) : (Qa = bc, ya = vb);\n uc = Math.max(4 * k / 3, g);\n c.style.width = q;\n c.style.height = f;\n b.desktop && (q = L.devicePixelRatio, isNaN(q) || (b.pixelratio = q, b.fractionalscaling = 0 != q % 1));\n Oa.size(g, k);\n H = !0;\n n && Ka(_[63]);\n Xa.updateview(!1, !0);\n r.resizeCheck(!0);\n A = !1\n };\n r.resizeCheck = function (a) {\n var b = !1, d = c, e = d.clientWidth, d = d.clientHeight;\n if (e != C || d != Q || a || pb && pb.haschanged)if (C = e, Q = d, b = !0, 1 == a)b = !1; else r.onResize(null);\n H && !0 !== a && (b = !0, H = !1);\n 255 == (jc & 511) && 0 == (Ya & 1) && v();\n return b\n };\n var ea = \"\";\n r.log = function (a) {\n if (\"cls\" == a)z.innerHTML = \"\"; else if (\"d\" == a)v(); else {\n var c = 4 > b.firefoxversion ? 4096 : 1E4, d = a.slice(0, 6);\n _[140] == d || _[135] == d ? (c = _[200] + (69 == d.charCodeAt(0) ? \"F\" : \"0\") + _[416] + a + _[417], ea += c + \"\\n\", z.innerHTML += \"\\n\" + c) : (ea += a + \"\\n\", ea.length > c ? (ea = ea.slice(-c / 2, -1), z.innerHTML = ea) : z.lastChild ? z.lastChild.nodeValue += \"\\n\" + a : z.innerHTML += a);\n z.scrollTop = z.scrollHeight;\n Jb.so.vars && pa(Jb.so.vars.consolelog) && (c = L.console) && c.log && (b.firefox || b.chrome ? c.log(\"%c\" + a, _[135] == d ? _[259] : _[140] == d ? _[178] : _[420] == d ? _[257] : _[262]) : c.log(a))\n }\n };\n r.showlog = function (a) {\n x(null, a)\n };\n r.togglelog = x;\n r.getMousePos = function (a, b) {\n var c;\n c = {};\n var d = b ? b : K, e = d.getBoundingClientRect();\n c.x = Math.round(a.clientX - e.left - d.clientLeft + d.scrollLeft);\n c.y = Math.round(a.clientY - e.top - d.clientTop + d.scrollTop);\n return c\n };\n r.remove = function () {\n null != h && (clearInterval(h), h = null);\n try {\n ba(L, _[137], r.onResize, !1), b.iphone && b.safari && ba(L, _[133], k, !1), ba(L, _[84], f, !1), b.fullscreensupport && ba(aa, b.browser.events.fullscreenchange, n), r.htmltarget.removeChild(c), r.htmltarget = null, r.viewerlayer = null, r.controllayer = null, r.panolayer = null, r.pluginlayer = null, K = c = q = z = D = r.hotspotlayer = null\n } catch (a) {\n }\n };\n var Ca = null\n })();\n var Pa = {};\n (function () {\n function a(a) {\n var b = a.pointerType;\n if (4 != b && _[19] != b) {\n a = a.changedTouches ? a.changedTouches : [a];\n var b = a.length, c, d, e;\n for (c = 0; c < b; c++)if (d = a[c], e = d.pointerId ? d.pointerId : d.identifier, void 0 !== e) {\n d = wa(d);\n d = {id: e, lx: d.x / X, ly: d.y / X};\n var f, g;\n g = ka.length;\n for (f = 0; f < g; f++)if (ka[f].id == e) {\n ka[f] = d;\n return\n }\n ka.push(d)\n }\n }\n }\n\n function d(a) {\n var b = a.pointerType;\n if (4 != b && _[19] != b) {\n a = a.changedTouches ? a.changedTouches : [a];\n var b = a.length, c, d;\n for (c = 0; c < b; c++)if (d = a[c], d = d.pointerId ? d.pointerId : d.identifier, void 0 !== d) {\n var e, f;\n f = ka.length;\n for (e = 0; e < f; e++)if (ka[e].id == d) {\n ka.splice(e, 1);\n break\n }\n }\n }\n }\n\n function E() {\n var a = F(ia.usercontrol);\n return _[19] == a || \"all\" == a\n }\n\n function f(a) {\n return a && (a = a.pointerType, 4 == a || _[19] == a) ? !0 : !1\n }\n\n function g(a, b, c, d) {\n for (var e = jc; 0 < wb.length && !(c - wb[0].t <= Sa) && !(1 >= e - wb[0].f);)wb.shift();\n e = wb.length - 1;\n 0 <= e && a == wb[e].x && b == wb[e].y ? wb[e].t = c : wb.push({x: a, y: b, t: c, f: d})\n }\n\n function n(a, b, c, d) {\n b = p.inverseProject(a, b);\n var e = p.inverseProject(c, d);\n d = (Math.atan2(e.z, e.x) - Math.atan2(b.z, b.x)) / Y;\n b = -(Math.atan2(b.y, Math.sqrt(b.x * b.x + b.z * b.z)) - Math.atan2(e.y, Math.sqrt(e.x * e.x + e.z * e.z))) / Y;\n -180 > d ? d += 360 : 180 < d && (d -= 360);\n if (c < a && 0 > d || c > a && 0 < d)d = -d;\n return {h: d, v: b}\n }\n\n function k(a, b, c, d) {\n E() ? (a = n(a, b, c, d), ga = !1, ca = a.h, oa = a.v, a = p.hlookat + ca, b = p.vlookat + oa, T += ca, ya += oa, c = p._limits, ia.bouncinglimits && c && (360 > c[0] && (a < c[1] ? (Na = !0, a = .5 * T + .5 * c[1]) : a > c[2] && (Na = !0, a = .5 * T + .5 * c[2])), b < c[4] ? (Na = !0, b = .5 * ya + .5 * c[4]) : b > c[5] && (Na = !0, b = .5 * ya + .5 * c[5])), p.hlookat = a, p.vlookat = b, Xa.updateview(), p.haschanged = !0) : oa = ca = 0\n }\n\n function e(a) {\n (aa.hidden || aa.webkitHidden || aa.mozHidden || aa.msHidden) && w(a)\n }\n\n function w(a) {\n K();\n a && (_[64] == a.type && !1 === a.persisted && (jd = !0), O.down && C(a));\n for (var b in N)1 == N[b] && (m.keycode = b, Ka(_[130]), N[b] = !1);\n m.keycode = 0;\n x()\n }\n\n function x() {\n m.hlookat_moveforce = m.vlookat_moveforce = m.fov_moveforce = 0;\n Oa = sa = ga = !1;\n Ga = za = Qa = La = ca = oa = Ea = Ua = Ra = Bb = 0\n }\n\n function v(a) {\n var c = 0;\n if (1 != ia.disablewheel && (Aa(a), cb = Ta(), E())) {\n a.wheelDelta ? c = a.wheelDelta / -120 : a.detail && (c = a.detail, 0 == b.mac && (c /= 3));\n var d = c * ia.mousefovchange;\n ia.zoomtocursor ? (Ma = !0, u(a), Ha = O.x, va = O.y, 0 < d && 0 == ia.zoomoutcursor && (Ma = !1)) : Ma = !1;\n Oa = !0;\n ha = 0;\n Ga += .001 * d;\n m.wheeldelta_raw = -c;\n m.wheeldelta = 3 * -c;\n Ka(_[100])\n }\n }\n\n function r(a) {\n var c = V.viewerlayer;\n aa.activeElement == c != 0 && L.activekrpanowindow == c.id && (c = a.keyCode, 0 == (a.altKey || a.ctrlKey || a.shiftKey || 32 > c || 111 < c && 124 > c) && Aa(a), m.keycode = c, N[c] = !0, Ka(_[384]), 79 != c || !m.logkey && Ya & 1 || V.togglelog(), l(c, 1), 27 == c && (K(), V.fullscreen && (V.fsbkup || b.opera) && V.setFullscreen(!1)))\n }\n\n function y(a) {\n var b = V.viewerlayer;\n aa.activeElement == b != 0 && L.activekrpanowindow == b.id && (a = a.keyCode, m.keycode = a, N[a] = !1, Ka(_[130]), l(a, 0))\n }\n\n function l(a, b) {\n var c = F(ia.usercontrol);\n if (\"all\" == c || \"keyb\" == c)a = \",\" + a + \",\", 0 <= (\",\" + ia.keycodesin + \",\").indexOf(a) ? m.fov_moveforce = -b : 0 <= (\",\" + ia.keycodesout + \",\").indexOf(a) ? m.fov_moveforce = +b : 0 <= (\",\" + ia.keycodesleft + \",\").indexOf(a) ? m.hlookat_moveforce = -b : 0 <= (\",\" + ia.keycodesright + \",\").indexOf(a) ? m.hlookat_moveforce = +b : 0 <= (\",\" + ia.keycodesup + \",\").indexOf(a) ? m.vlookat_moveforce = ia.keybinvert ? +b : -b : 0 <= (\",\" + ia.keycodesdown + \",\").indexOf(a) && (m.vlookat_moveforce = ia.keybinvert ? -b : +b)\n }\n\n function u(a) {\n cb = Ta();\n a = wa(a);\n O.x = a.x / X;\n O.y = a.y / X;\n O.moved = !0\n }\n\n function h(a) {\n cb = Ta();\n var d, e, g = a.changedTouches ? a.changedTouches : [a];\n e = g.length;\n var h = F(a.type), k = 0 <= h.indexOf(\"start\") || 0 <= h.indexOf(\"down\");\n -99 != fa && k && (ra = !0);\n for (d = 0; d < e; d++) {\n var h = g[d], q = h.pointerId ? h.pointerId : h.identifier;\n -99 == fa && k && (fa = q);\n if (fa == q) {\n e = wa(h);\n O.x = e.x / X;\n O.y = e.y / X;\n O.moved = !0;\n 0 == (Ya & 16) && (0 == b.realDesktop || 10 <= b.ieversion && !f(a)) && O.x > bc / X - 22 && O.y > vb / X - 32 && a.type == ta.touchstart && (U = h.pageY, R(W, ta.touchend, c, !0));\n break\n }\n }\n }\n\n function c(a) {\n a = a.changedTouches ? a.changedTouches : [a];\n ba(W, ta.touchend, c, !0);\n -120 > a[0].pageY - U && V.showlog(!0)\n }\n\n function K() {\n if (Za) {\n try {\n W.removeChild(Za), W.removeChild(bb)\n } catch (a) {\n }\n bb = Za = null\n }\n }\n\n function D(a) {\n if (Za)K(); else {\n Aa(a);\n a.stopPropagation();\n var c = wa(a.changedTouches ? a.changedTouches[0] : a);\n Za = De(c.x, c.y, K, 0 <= F(a.type).indexOf(\"touch\"));\n null != Za && (bb = Ja(), a = bb.style, a.position = _[0], b.androidstock || (a.zIndex = 99999999998, a[ib] = _[20]), a.width = \"100%\", a.height = \"100%\", W.appendChild(bb), W.appendChild(Za))\n }\n }\n\n function z(a, c) {\n var d = a.timeStamp | 0;\n 500 < d && 500 > d - kc ? kc = 0 : (L.activekrpanowindow = V.viewerlayer.id, V.viewerlayer.focus(), cb = Ta(), Aa(a), da.isblocked() || 0 != (a.button | 0) || (K(), 1 != c ? (R(L, _[10], q, !0), R(L, _[4], J, !0), b.topAccess && R(top, _[4], C, !0)) : R(b.topAccess ? top : L, ta.touchend, Ca, !0), d = wa(a), ab = d.x, $a = d.y, kb = a.timeStamp, T = p.hlookat, ya = p.vlookat, xa = 0, O.down = !0, O.up = !1, O.moved = !1, O.downx = O.x = d.x / X, O.downy = O.y = d.y / X, ae.update(), Ka(_[103])))\n }\n\n function q(a) {\n Aa(a);\n var b = wa(a);\n O.x = b.x / X;\n O.y = b.y / X;\n O.moved = !0;\n if (_[27] == F(ia.mousetype)) {\n sa = !0;\n var c = n(ab, $a, b.x, b.y).h;\n xa += c\n } else k(ab, $a, b.x, b.y);\n ab = b.x;\n $a = b.y;\n kb = a.timeStamp;\n (0 === a.buttons || void 0 === a.buttons && 0 === a.which) && J(a, !0)\n }\n\n function J(a, c) {\n cb = Ta();\n Aa(a);\n ba(L, _[10], q, !0);\n ba(L, _[4], J, !0);\n b.topAccess && ba(top, _[4], C, !0);\n ga = !0;\n O.down = !1;\n ae.update();\n 0 == O.up && (O.up = !0, Ka(_[113]), !0 !== c && (0 == O.moved || 5 > Math.abs(O.x - O.downx) && 5 > Math.abs(O.y - O.downy)) && Ka(_[131]))\n }\n\n function C(a) {\n J(a, !0)\n }\n\n function Q(a) {\n 1 == m.control.preventTouchEvents && Aa(a)\n }\n\n function A(a) {\n Ia && (xb++, 2 == xb && (qd = 1), Pb.addPointer(a.pointerId), W.setPointerCapture ? W.setPointerCapture(a.pointerId) : W.msSetPointerCapture && W.msSetPointerCapture(a.pointerId))\n }\n\n function H(a) {\n xb--;\n 0 > xb && (xb = 0);\n return 2 > xb && Da ? (t(a), !0) : !1\n }\n\n function qa(c) {\n kc = c.timeStamp | 0;\n Sa = b.ios ? 100 : 49 > nd ? 200 : 100;\n a(c);\n if (ua) {\n if (0 == m.control.preventTouchEvents)return;\n if (f(c)) {\n c.currentPoint && c.currentPoint.properties && 0 == c.currentPoint.properties.isLeftButtonPressed && (c.button = 0);\n kc = 0;\n z(c, !0);\n return\n }\n A(c)\n }\n L.activekrpanowindow = V.viewerlayer.id;\n cb = Ta();\n 0 == V.__scrollpage_yet && Q(c);\n K();\n if (!(Da || 0 == Va && 1 < ka.length || da.isblocked())) {\n var d = c.changedTouches ? c.changedTouches[0] : c, e = wa(d);\n la = d.pointerId ? d.pointerId : d.identifier;\n ab = e.x;\n $a = e.y;\n kb = c.timeStamp;\n wb = [];\n T = p.hlookat;\n ya = p.vlookat;\n xa = 0;\n O.down = !0;\n O.up = !1;\n O.moved = !1;\n O.downx = O.x = e.x / X;\n O.downy = O.y = e.y / X;\n Fa = {t: kc};\n Ka(_[103])\n }\n }\n\n function ea(a) {\n var b = a.pointerType;\n if (4 != b && _[19] != b) {\n var b = a.changedTouches ? a.changedTouches : [a], c = b.length, d, e, h;\n for (d = 0; d < c; d++)if (e = b[d], h = e.pointerId ? e.pointerId : e.identifier, void 0 !== h) {\n var t, l;\n l = ka.length;\n for (t = 0; t < l; t++)if (ka[t].id == h) {\n e = wa(e);\n h = e.y / X;\n t = ka[t];\n t.lx = e.x / X;\n t.ly = h;\n break\n }\n }\n }\n if (ua) {\n if (f(a)) {\n O.down && q(a);\n return\n }\n if (1 < xb)return\n }\n if ((b = E()) && 0 == Va && 1 < ka.length) {\n var m;\n l = e = ka[0].lx;\n m = h = ka[0].ly;\n t = ka.length;\n for (d = 1; d < t; d++)b = ka[d].lx, c = ka[d].ly, b < e && (e = b), b > l && (l = b), c < h && (h = c), c > m && (m = c);\n b = l - e;\n c = m - h;\n b = Math.sqrt(b * b + c * c);\n 1 > b && (b = 1);\n 0 == M ? (M = !0, I = b, Z(a)) : B(a, b / I)\n } else cb = Ta(), 0 == V.__scrollpage_yet && Q(a), Da || 0 == b || (b = a.changedTouches ? a.changedTouches[0] : a, la == (b.pointerId ? b.pointerId : b.identifier) && (b = wa(b), _[27] == F(ia.touchtype) ? (sa = !0, c = n(ab, $a, b.x, b.y).h, -180 > c ? c = 360 + c : 180 < c && (c = -360 + c), xa += c) : k(ab, $a, b.x, b.y), ab = b.x, $a = b.y, kb = a.timeStamp, g(ab, $a, kb, jc), -99 == fa && (O.x = b.x / X, O.y = b.y / X), Fa && 16 < O.dd && (Fa = null), Aa(a)))\n }\n\n function Ca(a) {\n d(a);\n fa = -99;\n ra = !1;\n if (ua) {\n ba(b.topAccess ? top : L, ta.touchend, Ca, !0);\n if (H(a))return;\n if (f(a)) {\n J(a);\n return\n }\n }\n M && (t(a), M = !1);\n 0 == V.__scrollpage_yet && Q(a);\n if (Da)la = -99; else {\n var c = a.changedTouches ? a.changedTouches[0] : a;\n if (la == (c.pointerId ? c.pointerId : c.identifier)) {\n la = -99;\n c = wa(c);\n O.x = c.x / X;\n O.y = c.y / X;\n ab = c.x;\n $a = c.y;\n kb = a.timeStamp;\n g(ab, $a, kb, jc);\n if (_[27] != F(ia.touchtype))if (E() && 1 < wb.length) {\n var e = wb[0], h = wb[wb.length - 1], c = (h.t - e.t) / 15;\n 0 < c && (e = n(e.x, e.y, h.x, h.y), ga = !0, ca = e.h / c, oa = e.v / c)\n } else ga = !1, oa = ca = 0;\n O.down = !1;\n 0 == O.up && (O.up = !0, Fa && (c = 52800 / (Math.min(Math.max(ja.currentfps, 10), 60) + 35), 32 > O.dd && (a.timeStamp | 0) - Fa.t > c && D(a)), Ka(_[113]), (0 == O.moved || 5 > Math.abs(O.x - O.downx) && 5 > Math.abs(O.y - O.downy)) && Ka(_[131]));\n Fa = null\n }\n }\n }\n\n function S(a) {\n d(a);\n M = !1;\n fa = la = -99;\n Da = !1;\n xb = 0;\n Fa = null\n }\n\n function Z(a) {\n 0 == m.control.preventTouchEvents || Ia && 2 > xb || (Aa(a), Da = !0, Fa = null, pa = p.fov, la = -99, O.down = !1)\n }\n\n function B(a, b) {\n if (0 != m.control.preventTouchEvents) {\n var c = void 0 !== b ? b : a.scale;\n if (Ia) {\n if (2 > xb)return;\n 0 == Da && Z(a);\n c = qd *= c\n }\n Aa(a);\n cb = Ta();\n if (E()) {\n oa = ca = 0;\n var d = 2 / Y, e = 1 / Math.tan(pa / d), d = Math.atan(1 / (e * c)) * d, e = d > p.fov ? -3 : 3;\n m.wheeldelta = e;\n m.wheeldelta_raw = e / 3;\n m.wheeldelta_touchscale = c;\n 0 == ia.touchzoom && (d = p.fov);\n ia.bouncinglimits && (d < p.fovmin ? (d = G(d), c = G(p.fovmin), Ga = .5 * -(d - c), Oa = !0, ha = 1, d += Ga, Ga = 1E-9, d = Ba(d)) : d > p.fovmax && (d = G(d), c = G(p.fovmax), Ga = .75 * -(d - c), Oa = !0, ha = 1, d += Ga, Ga = 1E-9, d = Ba(d)));\n if (ia.zoomtocursor && (0 < e || 1 == ia.zoomoutcursor)) {\n if (e = ka.length, 0 < e) {\n Ma = !0;\n for (c = va = Ha = 0; c < e; c++) {\n var f = ka[c];\n Ha += f.lx;\n va += f.ly\n }\n Ha /= e;\n va /= e;\n p.updateView();\n e = p.screentosphere(Ha, va);\n p.fov = d;\n p.updateView();\n c = p.screentosphere(Ha, va);\n d = p.hlookat + (e.x - c.x);\n e = p.vlookat + (e.y - c.y);\n if (c = p._limits)360 > c[0] && (d < c[1] ? d = c[1] : d > c[2] && (d = c[2])), e < c[4] ? e = c[4] : e > c[5] && (e = c[5]);\n p.hlookat = d;\n p.vlookat = e\n }\n } else p.fov = d, p.updateView();\n Ka(_[100]);\n p.haschanged = !0\n }\n }\n }\n\n function t(a) {\n 0 != m.control.preventTouchEvents && (Da && (Da = !1), ra = !1, ka = [], Aa(a))\n }\n\n function G(a) {\n return pb * Math.log(1 / Math.tan(.5 * a * Y))\n }\n\n function Ba(a) {\n return 2 * Math.atan(1 / Math.exp(a / pb)) / Y\n }\n\n var P = Pa;\n P.mouse = !1;\n P.touch = !1;\n var Fa = null, wa = null, ta = null, W = null, N = [], Da = !1, U = 0, Va = !1, M = !1, I = 1, pa = 90, la = -99, T = 0, ya = 0, ab = 0, $a = 0, kb = 0, wb = [], fa = -99, ra = !1, Sa = 100, ka = [], ua = !1, Ia = !1, Pb = null, xb = 0, qd = 1, ga = !1, ca = 0, oa = 0, sa = !1, Qa = 0, La = 0, za = 0, xa = 0, Oa = !1, Ga = 0, ha = 0, Ma = !1, Ha = 0, va = 0, Ea = 0, Ua = 0, Na = !1, Ra = 0, Bb = 0, Za = null, bb = null;\n P.registerControls = function (a) {\n W = a;\n ta = b.browser.events;\n wa = V.getMousePos;\n b.ie && (Ia = (ua = jb.msPointerEnabled || jb.pointerEnabled) && (1 < jb.msMaxTouchPoints || 1 < jb.maxTouchPoints));\n Va = Ia || 0 == b.simulator && b.ios || void 0 !== aa.documentElement.ongesturestart;\n if (b.chrome || b.android)Va = !1;\n a = !(0 == b.simulator && b.ios || b.android || 10 <= b.ieversion && b.touchdeviceNS);\n var c = b.touchdeviceNS;\n c && (b.mobile || b.tablet) && 0 == b.simulator && (a = !1);\n P.mouse = a;\n P.touch = c;\n ta.mouse = a;\n ta.touch = c;\n R(aa, _[126], r, !1);\n R(aa, \"keyup\", y, !1);\n R(b.topAccess ? top : L, _[37], w, !0);\n R(b.topAccess ? top : L, _[64], w, !0);\n R(aa, _[52], e);\n R(aa, _[79], e);\n R(aa, _[81], e);\n R(aa, _[82], e);\n if (a || ua)R(W, _[95], v, !1), R(W, _[108], v, !1);\n (a || ua) && R(L, _[10], u, !0);\n a && R(W, _[7], z, !1);\n (a && b.realDesktop || b.ie) && R(W, _[37], D, !0);\n c && (R(W, ta.touchstart, h, !0), R(W, ta.touchmove, h, !0), R(W, ta.touchstart, qa, !1), R(W, ta.touchmove, ea, !0), R(W, ta.touchend, Ca, !0), R(W, ta.touchcancel, S, !0), Va && (R(W, ta.gesturestart, Z, !1), R(W, ta.gesturechange, B, !1), R(W, ta.gestureend, t, !0), Ia && (R(W, _[93], t, !0), Pb = new MSGesture, Pb.target = W)))\n };\n P.domUpdate = function () {\n if (Pb) {\n var a = W;\n xb = 0;\n P.unregister();\n P.registerControls(a)\n }\n };\n P.unregister = function () {\n Pb && (Pb = Pb.target = null);\n ba(aa, _[126], r, !1);\n ba(aa, \"keyup\", y, !1);\n ba(b.topAccess ? top : L, _[37], w, !0);\n ba(b.topAccess ? top : L, _[64], w, !0);\n b.topAccess && ba(top, _[4], C, !0);\n ba(aa, _[52], e);\n ba(aa, _[79], e);\n ba(aa, _[81], e);\n ba(aa, _[82], e);\n ba(L, _[10], u, !0);\n ba(L, _[10], q, !0);\n ba(L, _[4], J, !0);\n ba(W, _[95], v, !1);\n ba(W, _[108], v, !1);\n ba(W, _[7], z, !1);\n ba(W, _[37], D, !1);\n ba(W, ta.touchstart, h, !0);\n ba(W, ta.touchmove, h, !0);\n ba(W, ta.touchstart, qa, !1);\n ba(W, ta.touchmove, ea, !0);\n ba(W, ta.touchend, Ca, !0);\n ba(W, ta.touchcancel, S, !0);\n ba(W, ta.gesturestart, Z, !1);\n ba(W, ta.gesturechange, B, !1);\n ba(W, ta.gestureend, t, !0);\n ba(W, _[93], t, !0);\n wa = ta = W = null\n };\n P.handleFrictions = function () {\n var a, b = a = !1, c = m.hlookat_moveforce, d = m.vlookat_moveforce, e = m.fov_moveforce;\n if (0 != e) {\n var f = ia.keybfovchange;\n Ma = !1;\n Oa = !0;\n ha = 0;\n Ga += f * e * .001\n }\n if (0 != c || 0 != d || 0 != Ea || 0 != Ua) {\n var g = ia.keybfriction, b = ia.keybspeed, e = p.hlookat, f = p.vlookat, h = ia.keybaccelerate * Math.tan(Math.min(.5 * Number(p.fov), 45) * Y);\n Ea += c * h;\n c = Ua += d * h;\n d = Ea;\n Ea *= g;\n Ua *= g;\n g = Math.sqrt(c * c + d * d);\n 0 < g ? (c /= g, d /= g) : d = c = 0;\n g > b && (g = b);\n d *= g;\n e = 180 >= (Math.floor(f) % 360 + 450) % 360 ? e + d : e - d;\n f += c * g;\n p.hlookat = e;\n p.vlookat = f;\n g < .05 * h && (Ua = Ea = 0);\n b = !0\n }\n a |= b;\n if (ga)c = Math.pow(ia.touchfriction, .92), ca *= c, oa *= c, c = Math.sqrt(oa * oa + ca * ca), d = Math.min(.04 * uc / p.r_zoom, .5), 0 != c && (p.hlookat += ca, p.vlookat += oa), c < d && (ga = !1, oa = ca = 0), a |= 1; else if (sa) {\n var c = O, d = za, b = Qa, e = La, g = .025 * ia.mouseaccelerate, k = ia.mousespeed, h = ia.mousefriction, f = !1;\n if (E()) {\n if (c.down && (c.x != c.downx || c.y != c.downy)) {\n var q = n(c.downx, c.downy, c.x, c.y);\n q.h = xa;\n b = d * b - q.h * g;\n e = d * e - q.v * g;\n d = Math.sqrt(b * b + e * e);\n 0 < d && (b /= d, e /= d, d > k && (d = k))\n }\n g = p.hlookat;\n k = p.vlookat;\n k += d * e * ia.mouseyfriction;\n p.hlookat = g + d * b;\n p.vlookat = k;\n d *= h;\n h = Math.min(.04 * uc / p.r_zoom, .5);\n 0 == c.down && d < h && (f = !0)\n } else f = !0;\n f && (sa = !1, xa = e = b = d = 0);\n za = d;\n Qa = b;\n La = e;\n a |= 1\n }\n if (Oa) {\n a:{\n d = c = p.fov;\n b = Ga;\n e = !1;\n if (0 < Math.abs(b)) {\n h = b;\n g = ia.fovspeed;\n e = p.fovmin;\n f = p.fovmax;\n b *= ia.fovfriction;\n Math.abs(h) > g && (h = g * (h / Math.abs(h)));\n c = G(c);\n c = Ba(c + h);\n if (ia.bouncinglimits && 0 < ha)if (0 == Da)h = G(c), c < e ? (b = G(e), b = .25 * -(h - b)) : c > f && (b = G(f), b = .25 * -(h - b)); else {\n c = void 0;\n break a\n } else c < e && (c = e, b = 0), c > f && (c = f, b = 0);\n p.fov = c;\n Ga = b;\n e = !0;\n Ma && (p.fov = d, p.updateView(), d = p.screentosphere(Ha, va), p.fov = c, p.updateView(), c = p.screentosphere(Ha, va), b = p.vlookat + (d.y - c.y), p.hlookat += d.x - c.x, p.vlookat = b)\n }\n 1E-5 > Math.abs(Ga) && (ha = Ga = 0, Oa = !1);\n c = e\n }\n a |= c\n }\n Na && (c = !1, O.down ? c = !1 : (d = p.hlookat, b = p.vlookat, d += Ra, b += Bb, p.hlookat = d, p.vlookat = b, c = !0, Ra *= .95, Bb *= .95, e = p._limits, ia.bouncinglimits && e && (360 > e[0] && (d < e[1] ? Ra = .15 * -(d - e[1]) : d > e[2] && (Ra = .15 * -(d - e[2]))), b < e[4] ? Bb = .15 * -(b - e[4]) : b > e[5] && (Bb = .15 * -(b - e[5]))), d = .15 * Math.min(.04 * uc / p.r_zoom, .5), Math.sqrt(Ra * Ra + Bb * Bb) < d && (Ra = Bb = 0, Na = !1)), a |= c);\n return a\n };\n P.stopFrictions = function (a) {\n 0 == (0 | a) && (a = 3);\n a & 1 && (Qa = ca = 0);\n a & 2 && (La = oa = 0);\n a & 4 && (x(), O.down = !1)\n };\n P.isMultiTouch = function () {\n return Da || M || 1 < xb || ra\n };\n P.isBouncing = function () {\n return 0 < ha || Na\n };\n P.focusLoss = w;\n P.trackTouch = function (b) {\n if (0 == Va || Ia) {\n var c = b.type;\n c == ta.touchstart ? ua ? A(b) : a(b) : c == ta.touchend && (ua ? H(b) : d(b))\n }\n };\n var pb = -.1\n })();\n var fa = null, M = null, Cb = !1, $c = !1, Db = 0, Wa = !1, ad = !1, Eb = -1, Xa = {};\n (function () {\n function a(a, b) {\n if (!0 !== b)p.haschanged = !0; else {\n !0 !== a && (Kb = Ta());\n var c = m.webVR;\n c && c.enabled && c.updateview();\n Ka(_[299]);\n p.updateView();\n fa && Oa.renderpano(fa, 2);\n M && Oa.renderpano(M, 1);\n z && (z = Oa.rendersnapshot(z, M));\n ob(!0);\n Ka(_[278])\n }\n }\n\n function d(a, b, c, d, e) {\n h.count++;\n h.id = h.count;\n if (f()) {\n da.busy = !0;\n m.xml.url = \"\";\n m.xml.content = a;\n var g = (new DOMParser).parseFromString(a, _[25]);\n T.resolvexmlincludes(g, function () {\n g = T.xmlDoc;\n n(g, b, c, d, e)\n })\n }\n }\n\n function E(a) {\n var b = 0 != (c & 64) && 0 == (c & 256), d;\n !0 === a && (c = b = 0);\n if (0 == (c & 4)) {\n var e = xa.getArray();\n a = e.length;\n for (d = 0; d < a; d++) {\n var g = e[d];\n !g || 0 != b && 0 != g.keep || (g.sprite && (g.visible = !1, g.parent = null, V.pluginlayer.removeChild(g.sprite)), g.destroy(), xa.removeItem(d), d--, a--)\n }\n }\n if (0 == (c & 128))for (e = Ua.getArray(), a = e.length, d = 0; d < a; d++)if ((g = e[d]) && (0 == b || 0 == g.keep)) {\n if (g.sprite) {\n g.visible = !1;\n g.parent = null;\n try {\n V.hotspotlayer.removeChild(g.sprite)\n } catch (f) {\n }\n if (g._poly) {\n try {\n V.svglayer.removeChild(g._poly)\n } catch (h) {\n }\n g._poly.kobject = null;\n g._poly = null\n }\n }\n g.destroy();\n Ua.removeItem(d);\n d--;\n a--\n }\n b = Yb.getArray();\n a = b.length;\n for (d = 0; d < a; d++)(e = b[d]) && 0 == pa(e.keep) && (Yb.removeItem(d), d--, a--)\n }\n\n function f() {\n return 1 < h.count && h.removeid != h.id && (h.removeid = h.id, Ka(_[301], !0), h.removeid != h.id) ? !1 : !0\n }\n\n function g(a) {\n var b, c, d = \"\";\n a = Gc(a);\n b = a.lastIndexOf(\"/\");\n c = a.lastIndexOf(\"\\\\\");\n c > b && (b = c);\n 0 <= b && (d = a.slice(0, b + 1));\n return d\n }\n\n function n(a, d, e, g, f) {\n za.currentmovingspeed = 0;\n K = !1;\n c = M ? 64 : 0;\n e && (e = F(e), 0 <= e.indexOf(_[323]) && (c |= 4), 0 <= e.indexOf(_[306]) && (c |= 128), 0 <= e.indexOf(_[391]) && (c |= 16), 0 <= e.indexOf(_[418]) && (c |= 32), 0 <= e.indexOf(\"merge\") && (c |= 16448), 0 <= e.indexOf(_[354]) && (c |= 256), 0 <= e.indexOf(_[412]) && (c |= 4), 0 <= e.indexOf(_[459]) && (c |= 36), 0 <= e.indexOf(_[400]) && (K = !0, c |= 65536), 0 <= e.indexOf(_[310]) && I(_[102], 0), 0 <= e.indexOf(_[360]) && (c |= 1056));\n 0 == K && (Db = 0, g && (g = F(g), e = g.indexOf(_[490]), 0 <= e && (Db = parseFloat(g.slice(e + 6)), isNaN(Db) || 0 > Db)) && (Db = 2), M && (e = 0 != (c & 1024), b.webgl ? (e && (fa || z) && (fa && (z = Oa.snapshot(z, fa)), e = !1), fa && (fa.destroy(), fa = null), 0 == e ? (M.stop(), z = Oa.snapshot(z, M), M.destroy(), M = null) : (M.suspended = !0, fa = M, M = null, Oa.renderpano(fa, 2)), Oa.setblendmode(g), Eb = -1, Wa = !1) : (0 == Wa ? (fa && (fa.destroy(), fa = null), fa = M, 0 == e ? fa.stop() : fa.suspended = !0, M = null) : (g = (Ta() - Eb) / 1E3 / Db, g = y(g), .5 < g ? M && (M.destroy(), M = null) : (fa && (fa.destroy(), fa = null), fa = M, 0 == e ? fa.stop() : fa.suspended = !0, M = null), Wa = !1), fa && fa.stopped && Oa.renderpano(fa, 2))), c & 32 && (u[0] = p.hlookat, u[1] = p.vlookat, u[2] = p.camroll, u[3] = p.fov, u[4] = p.fovtype, u[5] = p.fovmin, u[6] = p.fovmax, u[7] = p.maxpixelzoom, u[8] = p.fisheye, u[9] = p.fisheyefovlink, u[10] = p.stereographic, u[12] = p.pannini, u[13] = p.architectural, u[14] = p.architecturalonlymiddle), 0 == (c & 16384) && p.defaults(), p.limitview = \"auto\", p.hlookatmin = Number.NaN, p.hlookatmax = Number.NaN, p.vlookatmin = Number.NaN, p.vlookatmax = Number.NaN, m.preview && delete m.preview, m.image && delete m.image, m.onstart = null, N = m.image = {}, N.type = null, N.multires = !1, N.multiresthreshold = .025, N.cubelabels = \"l|f|r|b|u|d\", N.stereo = !1, N.stereoformat = \"TB\", N.stereolabels = \"1|2\", N.tiled = !1, N.tilesize = 0, N.tiledimagewidth = 0, N.tiledimageheight = 0, N.baseindex = 1, N.level = new bb, N.hfov = 0, N.vfov = 0, N.voffset = 0, N.hres = 0, N.vres = 0, N.haschanged = !1, va(N, \"frame\", 1), N.frames = 1);\n E();\n if (a && a.documentElement && _[22] == a.documentElement.nodeName)Ea(a.baseURI + _[21]); else {\n T.parsexml(a.childNodes, null, c);\n if (null != m._loadpanoscene_name) {\n var h = U(_[72] + m._loadpanoscene_name + \"]\");\n h && (g = _[124] + h.content + _[117], m.xml.url = \"\", m.xml.scene = m._loadpanoscene_name, m.xml.content = g, m.onstart = null, g = (new DOMParser).parseFromString(g, _[25]), T.resolvexmlincludes(g, function () {\n (a = T.xmlDoc) && a.documentElement && _[22] == a.documentElement.nodeName ? Ea(a.baseURI + _[21]) : (T.parsexml(a.childNodes, null, c), f = h.onstart)\n }));\n m._loadpanoscene_name = null\n }\n m.xmlversion = m.version;\n m.version = m.buildversion;\n D = f;\n Wd(d);\n k()\n }\n }\n\n function k() {\n var a, b, d = m.plugin.getArray();\n m.hotspot.getArray();\n var g;\n b = d.length;\n for (a = 0; a < b; a++) {\n var f = d[a];\n if (f && f.layer && f.layer.isArray) {\n var k = f.layer.getArray();\n g = k.length;\n for (b = 0; b < g; b++) {\n var n = k[b];\n n && (n.parent = f.name, n.keep = f.keep, xa.createItem(n.name, n))\n }\n f.plugin = null;\n f.layer = null;\n a--;\n b = d.length\n }\n }\n if (0 != e(!0)) {\n if (0 == K) {\n c & 32 && (p.hlookat = u[0], p.vlookat = u[1], p.camroll = u[2], p.fov = u[3], p.fovtype = u[4], p.fovmin = u[5], p.fovmax = u[6], p.maxpixelzoom = u[7], p.fisheye = u[8], p.fisheyefovlink = u[9], p.stereographic = u[10], p.pannini = u[12], p.architectural = u[13], p.architecturalonlymiddle = u[14]);\n Xa.updateview();\n fa && fa.removemainpano();\n for (a = 0; 4100 > a; a++);\n void 0 !== ja.hardwarelimit && (Lb = parseFloat(ja.hardwarelimit), isNaN(Lb) && (Lb = 0));\n void 0 !== ja.usedesktopimages && (ce = pa(ja.usedesktopimages));\n Cb = !0;\n sc.progress = 0;\n M = Oa.createPano(N);\n M.addToLayer(V.panolayer);\n 0 <= Db && (ad = !0, M.setblend(0), ub = !0, qc = 0)\n }\n da.busy = !1;\n da.actions_autorun(_[466], !0);\n a = m.onstart;\n D && (a = D, D = null);\n d = h.id;\n da.callaction(a, null, !0);\n if (d == h.id && (da.actions_autorun(_[467], !1), Ka(_[287]), m.xml && m.xml.scene && Ka(_[369]), d == h.id)) {\n 0 == K && x();\n a = Ua.getArray();\n d = a.length;\n for (f = 0; f < d; f++)(b = a[f]) && null == b.sprite && (b.create(), V.hotspotlayer.appendChild(b.sprite));\n e();\n Ka(_[63]);\n Xa.updateview();\n da.processactions()\n }\n }\n }\n\n function e(a) {\n var b = xa.getArray(), c = b.length, d, e = !0;\n for (d = 0; d < c; d++) {\n var g = b[d];\n if (g) {\n var f = !1;\n 1 == a ? 1 == g.preload && _[15] != g.type && 0 == g.loaded && (g.onloaded = k, g.altonloaded = null, f = !0, e = !1) : (1 == g.preload && (g.preload = !1, g.onloaded = null), f = !0);\n f && null == g.sprite && (g.create(), null == g._parent && V.pluginlayer.appendChild(g.sprite))\n }\n }\n return e\n }\n\n function w() {\n Ka(_[216])\n }\n\n function x() {\n var c = b.desktop || ce, d = !1, e = N.type, g = parseFloat(N.hfov), f = parseFloat(N.vfov), h = parseFloat(N.voffset);\n isNaN(g) && (g = 0);\n isNaN(f) && (f = 0);\n isNaN(h) && (h = 0);\n var k = !!(N.multires && N.level && 0 < N.level.count), n = !!N.mobile, l = !!N.tablet;\n c || 0 != k || !n && !l || (e = \"cube\", d = !0);\n if (null == e)if (N.left || N.cube)e = \"cube\"; else if (N.cubestrip)e = _[39]; else if (N.sphere)e = _[42]; else if (N.cylinder)e = _[24]; else if (N.flat)e = \"flat\"; else {\n if (n || l)e = \"cube\", d = !0\n } else e = F(e);\n var m = _[42] == e || _[24] == e, p = 0 < g && 1 >= g && 45 >= f && m || \"flat\" == e, u = \"cube\" == e || _[39] == e || null == e && 0 == m && 0 == p, c = !1, t = null;\n if (u)g = 360, f = 180; else if (m || p)if (t = ra.parsePath(U(_[487] + e + \".url\"))) {\n var G = 0;\n 0 <= (G = F(t).indexOf(_[478])) && (m = c = !0, k = p = !1, b.panovideosupport && (t = t.slice(G + 7)))\n }\n N.type = e;\n N.hfov = g;\n N.vfov = f;\n N.voffset = h;\n h = (\"\" + N.cubelabels).split(\"|\");\n 6 == h.length && (M.cubelabels = h);\n M.stereo = b.webgl ? N.stereo : !1;\n M.stereoformat = \"sbs\" == F(N.stereoformat) ? 0 : 1;\n h = (\"\" + N.stereolabels).split(\"|\");\n 2 == h.length && (M.stereolabels = h);\n G = F(U(_[294]));\n if (h = U(_[322])) {\n h = ra.parsePath(h);\n if (_[39] == G || \"null\" == G && u) {\n G = U(_[211]);\n if (null != G) {\n var G = F(G), x = [0, 1, 2, 3, 4, 5];\n x[G.indexOf(\"l\")] = 0;\n x[G.indexOf(\"f\")] = 1;\n x[G.indexOf(\"r\")] = 2;\n x[G.indexOf(\"b\")] = 3;\n x[G.indexOf(\"u\")] = 4;\n x[G.indexOf(\"d\")] = 5;\n G = x\n }\n M.addCubestripPreview(h, G)\n } else(\"flat\" == G || (\"null\" == G || _[42] == G || _[24] == G) && p) && M.addFlatLevel(h, g, f, 0, 0, 0, N.baseindex, !0);\n a(!1, !0)\n } else if (0 == G.indexOf(\"grid\")) {\n if (h = Gb(G))if (h = h[0], \"grid\" == h.cmd) {\n var P = h.args, h = void 0 == P[1] ? 64 : parseInt(P[1]), G = void 0 == P[2] ? 64 : parseInt(P[2]), x = void 0 == P[3] ? 512 : parseInt(P[3]), z = void 0 == P[4] ? 6710886 : parseInt(P[4]), y = void 0 == P[5] ? 2236962 : parseInt(P[5]), P = void 0 == P[6] ? void 0 == P[4] ? 16777215 : z : parseInt(P[6]), z = ca(z), y = ca(y), P = ca(P);\n M.addGridPreview(x, h, G, y, z, P);\n a(!1, !0);\n w()\n }\n } else w();\n h = !1;\n G = b.androidstock && !b.webgl;\n if (p || u) {\n if (d || u && G)l ? h = r(_[311]) : n && (h = r(_[313]));\n if (0 == h)if (\"cube\" == e) {\n if (k)if (n = N.level.getArray(), d = n.length, n.sort(function (a, b) {\n return +parseInt(a.tiledimagewidth, 10) - parseInt(b.tiledimagewidth, 10)\n }), 0 == b.multiressupport || G) {\n f = b.iphone && b.retina || b.tablet || b.android ? 1100 : b.iphone ? 512 : 2560;\n 0 < Lb && (f = Lb + 256);\n for (k = d - 1; 0 <= k && !(g = n[k].tiledimagewidth, g <= f); k--);\n 0 <= k && (h = r(_[54] + k + \"]\", !0))\n } else for (n.sort(function (a, b) {\n return +parseInt(a.tiledimagewidth, 10) - parseInt(b.tiledimagewidth, 10)\n }), k = 0; k < d; k++)if (n = _[54] + k + \"]\", l = U(n), f = v(n))n = l.tilesize ? l.tilesize : N.tilesize, g = parseInt(l.tiledimagewidth, 10), 0 < n && 0 < g && (M.addCubeLevel(f, g, n, N.baseindex), h = !0);\n 0 == h && (h = r(_[75]))\n } else if (_[39] == e && N.cubestrip)M.addCubestripPano(ra.parsePath(\"\" + N.cubestrip.url)), h = !0; else if ((_[42] == e || _[24] == e) && 1 >= g && 45 >= f || \"flat\" == e) {\n if (b.multiressupport && k)for (n = N.level.getArray(), d = n.length, n.sort(function (a, b) {\n return +parseInt(a.tiledimagewidth, 10) - parseInt(b.tiledimagewidth, 10)\n }), k = 0; k < d; k++)if (n = _[54] + k + \"]\", l = U(n), c = U(n + \".\" + e + \".url\"), c = ra.parsePath(c))n = l.tilesize ? l.tilesize : N.tilesize, t = parseInt(l.tiledimagewidth, 10), l = parseInt(l.tiledimageheight, 10), 0 < n && 0 < t && 0 < l && (M.addFlatLevel(c, g, f, t, l, n, N.baseindex, !1), h = !0);\n 0 == h && (d = N[e]) && d.url && (M.addFlatLevel(ra.parsePath(\"\" + d.url), g, f, 0, 0, 0, N.baseindex, !1), h = !0)\n }\n } else m && 0 == k && b.webgl && t && ((g = [Number(N.hfov), Number(N.vfov), Number(N.voffset)], c) ? b.panovideosupport && (f = xa.getItem(t)) && (f.renderToBitmap = !0, f.visible = !1, M.addRoundPano(e, null, g, f), h = !0) : (M.addRoundPano(e, t, g), h = !0));\n h && (Cb = $c = !0);\n M.finalize();\n 0 == h && null != e && la(2, _[171]);\n a(!1, !0)\n }\n\n function v(a) {\n var b = _[174].split(\" \"), c = Array(6), d, e;\n if (d = U(a + \".\" + b[6] + \".url\")) {\n if (d = ra.parsePath(d))for (e = 0; 6 > e; e++)c[e] = d.split(\"%s\").join(M.cubelabels[e])\n } else for (e = 0; 6 > e; e++)if (d = ra.parsePath(U(a + \".\" + b[e] + \".url\")))c[e] = d; else return null;\n return c\n }\n\n function r(a, b) {\n var c = v(a);\n if (!c)return !1;\n if (b) {\n var d = U(a), e = d.tilesize ? d.tilesize : N.tilesize, d = parseInt(d.tiledimagewidth, 10);\n M.addCubeLevel(c, d, e, N.baseindex)\n } else M.addCubeLevel(c, 0, 0, 1);\n return !0\n }\n\n function y(a) {\n 1 < a && (a = 1);\n 0 == b.webgl && (a *= a * a);\n a = 1 - a;\n 0 > a && (a = 0);\n return a\n }\n\n var l = Xa;\n l.loadpano = function (a, b, c, e, k) {\n h.count++;\n h.id = h.count;\n if (f())if (0 > F(c).indexOf(_[358]) && I(_[102], 0), \"null\" == F(a) && (a = null), m.xml.content = null, m.xml.scene = null, a) {\n da.busy = !0;\n null == ra.firstxmlpath ? ra.firstxmlpath = g(a) : a = ra.parsePath(a, !0);\n ra.currentxmlpath = g(a);\n m.xml.url = a;\n var l = h.id;\n ra.loadxml(a, function (d, g) {\n if (l == h.id) {\n if (d && d.childNodes) {\n var f = d.childNodes, m = f.length;\n 0 == m ? d = null : 2 == m && f[1] && _[22] == f[1].nodeName && (d = null)\n }\n d ? (d = T.resolvexmlencryption(d, a), null != d && T.resolvexmlincludes(d, function () {\n d = T.xmlDoc;\n n(d, b, c, e, k)\n })) : 200 == g ? Ea(a + _[21]) : Ea(a + _[181])\n }\n })\n } else m.xml.url = \"\", d(_[219], b, c, e, k)\n };\n l.loadxml = d;\n l.loadxmldoc = n;\n l.updateview = a;\n l.updateplugins = function (a) {\n var b = xa.getArray(), c = b.length, d;\n for (d = 0; d < c; d++) {\n var e = b[d];\n e && (a || e.poschanged) && e.loaded && e.updatepos()\n }\n };\n l.checkautorotate = function (a) {\n var b = Ta();\n a && (Kb = b);\n Kb > cb && (cb = Kb);\n a = b - cb;\n a > 1E3 * m.idletime && cb != Hd && (Hd = cb, Ka(_[492]));\n a = b - Kb;\n if (za.enabled && a > 1E3 * za.waittime) {\n cb = Kb = 0;\n var c = p._hlookat;\n a = p._vlookat;\n var b = p._fov, d = Math.tan(Math.min(.5 * b, 45) * Y), e = za.accel, g = za.speed, f = za.currentmovingspeed, e = e / 60, g = g / 60;\n 0 < g ? (f += e * e, f > g && (f = g)) : (f -= e * e, f < g && (f = g));\n za.currentmovingspeed = f;\n c += d * f;\n d = Math.abs(d * f);\n p._hlookat = c;\n c = parseFloat(za.horizon);\n isNaN(c) || (c = (c - a) / 60, e = Math.abs(c), 0 < e && (e > d && (c = d * c / e), a += c, p._vlookat = a));\n a = parseFloat(za.tofov);\n isNaN(a) || (a < p.fovmin && (a = p.fovmin), a > p.fovmax && (a = p.fovmax), a = (a - b) / 60, c = Math.abs(a), 0 < c && (c > d && (a = d * a / c), b += a, p._fov = b));\n return !0\n }\n za.currentmovingspeed = 0;\n return !1\n };\n l.previewdone = w;\n l.havepanosize = function (a) {\n M && M.id == a.id && (N.hfov = a.hfov, N.vfov = a.vfov, N.hres = a.hres, N.vres = a.vres, Ka(_[405]), p.haschanged = !0)\n };\n l.removeelements = E;\n l.isLoading = function () {\n return Cb\n };\n l.isBlending = function () {\n return ad || Wa\n };\n var u = [], h = {count: 0, id: 0}, c = 0, K = !1, D = null, z = null;\n l.checkHovering = function () {\n if (1 != (jc & 1) && !da.blocked) {\n var a = [xa.getArray(), Ua.getArray()], b, c, d, e, g;\n for (g = 0; 2 > g; g++)for (b = a[g], d = b.length, e = 0; e < d; e++)(c = b[e]) && c._visible && c.hovering && c.onhover && da.callaction(c.onhover, c)\n }\n };\n l.handleloading = function () {\n var a = !1;\n 0 == Wa && (fa && (a |= fa.doloading()), M && (a |= M.doloading()));\n Cb = M && M.isloading();\n var b = Oa.handleloading();\n $c && 1 != Cb && ($c = !1, Ka(_[265]));\n b & 1 && (Cb = !0);\n b & 2 && (a = !0);\n M && (fa || z) && (0 == Wa ? M.previewcheck() && (Wa = !0, Eb = -1) : (a = 0, 0 <= Db && (-1 == Eb ? Eb = Ta() : (a = (Ta() - Eb) / 1E3, a = 0 < Db ? a / Db : 1), a = y(a), ad = !0, M.setblend(1 - a), ub = !0, qc = 1 - a), 0 == a && (Db = 0, fa && (fa.destroy(), fa = null), ad = Wa = !1), a = !0));\n return a\n }\n })();\n var Oa = {};\n (function () {\n var a, d;\n\n function E(a) {\n if (!1 === document.hidden && ka) {\n var b = parseInt(ka.style.height);\n 0 < b && (ka.style.height = b + 1 + \"px\", setTimeout(function () {\n ka && parseInt(ka.style.height) == b + 1 && (ka.style.height = b + \"px\")\n }, 100))\n }\n }\n\n function f(a) {\n return \"#ifdef GL_ES\\n#ifdef GL_FRAGMENT_PRECISION_HIGH\\nprecision highp float;\\n#else\\nprecision mediump float;\\n#endif\\n#endif\\nuniform float aa;uniform sampler2D sm;varying vec2 tt;void main(){vec4 c=texture2D(sm,vec2(tt.s,tt.t)\" + (a ? \",-1.0\" : \"\") + \");gl_FragColor=vec4(c.rgb,c.a*aa);}\"\n }\n\n function g(a, b, c) {\n var d = ua;\n null == a && (a = \"attribute vec2 vx;varying vec2 tx;void main(){gl_Position=vec4(vx.x*2.0-1.0,-1.0+vx.y*2.0,0.0,1.0);tx=vx;}\");\n var e = d.createShader(d.VERTEX_SHADER);\n d.shaderSource(e, a);\n d.compileShader(e);\n if (!d.getShaderParameter(e, d.COMPILE_STATUS))return la(0, _[185] + d.getShaderInfoLog(e)), null;\n a = d.createShader(d.FRAGMENT_SHADER);\n d.shaderSource(a, b);\n d.compileShader(a);\n if (!d.getShaderParameter(a, d.COMPILE_STATUS))return la(0, _[186] + d.getShaderInfoLog(a)), null;\n b = d.createProgram();\n d.attachShader(b, e);\n d.attachShader(b, a);\n d.linkProgram(b);\n if (!d.getProgramParameter(b, d.LINK_STATUS))return la(0, _[162]), null;\n d.useProgram(b);\n d.uniform1i(d.getUniformLocation(b, \"sm\"), 0);\n e = d.getAttribLocation(b, \"vx\");\n d.enableVertexAttribArray(e);\n e = {prg: b, vxp: e};\n c = c.split(\",\");\n var g, f;\n g = c.length;\n for (a = 0; a < g; a++)f = c[a], e[f] = d.getUniformLocation(b, f);\n return e\n }\n\n function n(a) {\n var b = ua;\n a ? (ob = Cb, Cb = a) : (a = Cb = ob, ob = null);\n a && b.useProgram(a)\n }\n\n function k() {\n var c = ua;\n try {\n var e = c.createBuffer();\n c.bindBuffer(lb, e);\n c.bufferData(lb, new Float32Array([0, 0, 0, 1, 1, 1, 1, 0]), wc);\n var h = c.createBuffer();\n c.bindBuffer(Qb, h);\n c.bufferData(Qb, new Uint16Array([0, 1, 2, 0, 2, 3]), wc);\n a = e;\n d = h;\n var k;\n for (k = 0; 6 > k; k++) {\n var e = _[159], t = h = \"\", l = \"\";\n 0 == k ? t = _[168] : 1 == k ? (l = \"cc\", h = _[88], t = _[158]) : 2 == k ? (l = \"cc\", h = _[88], t = _[153]) : 3 == k ? (l = \"ct,zf\", h = _[176], t = _[152]) : 4 == k ? (l = \"fp,bl\", h = _[175], t = \"float t=(tx.x*fp.x+tx.y*fp.y+fp.z)*(1.0-2.0*bl)+bl;gl_FragColor=vec4(texture2D(sm,tx).rgb,smoothstep(t-bl,t+bl,aa));\") : 5 == k && (l = _[439], h = _[163], t = \"float t=(1.0-sqrt(2.0)*sqrt((ap.x*(tx.x-0.5)*(tx.x-0.5)+ap.y*(tx.y-0.5)*(tx.y-0.5))/(0.5*(ap.x+ap.y))))*(1.0-2.0*bl)+bl;gl_FragColor=vec4(texture2D(sm,(tx-vec2(0.5,0.5))*mix(1.0,aa,zf)+vec2(0.5,0.5)).rgb,smoothstep(t-bl,t+bl,aa));\");\n e = _[187] + e + h + \"void main(){\" + t + \"}\";\n ha[k] = g(null, e, \"aa,\" + l);\n if (null == ha[k])return !1\n }\n var m = c.createShader(c.VERTEX_SHADER);\n c.shaderSource(m, \"attribute vec3 vx;attribute vec2 tx;uniform float sh;uniform float ch;uniform mat4 mx;uniform mat4 ot;uniform mat3 tm;varying vec2 tt;void main(){vec3 vr=vec3(ot*vec4(vx,1));vec3 vs=1000.0*normalize(vr);vec2 c2=vec2(vr.x,vr.z);c2=c2/max(1.0,length(c2));vec3 vc=1000.0*vec3(c2.x,clamp(vr.y*inversesqrt(1.0+vr.x*vr.x+vr.z*vr.z),-30.0,+30.0),c2.y);vec3 vv=vr*(1.0-sh)+sh*(vs*(1.0-ch)+vc*ch);gl_Position=mx*vec4(vv,1);tt=(vec3(tx,1)*tm).xy;}\");\n c.compileShader(m);\n if (!c.getShaderParameter(m, c.COMPILE_STATUS))return !1;\n var q = c.createShader(c.FRAGMENT_SHADER);\n c.shaderSource(q, f(!0));\n c.compileShader(q);\n if (!c.getShaderParameter(q, c.COMPILE_STATUS))if (b.ie) {\n if (c.shaderSource(q, f(!1)), c.compileShader(q), !c.getShaderParameter(q, c.COMPILE_STATUS))return !1\n } else return !1;\n var p = c.createProgram();\n c.attachShader(p, m);\n c.attachShader(p, q);\n c.linkProgram(p);\n if (!c.getProgramParameter(p, c.LINK_STATUS))return !1;\n n(p);\n Pa = c.getAttribLocation(p, \"vx\");\n Ra = c.getAttribLocation(p, \"tx\");\n Ya = c.getUniformLocation(p, \"sh\");\n Za = c.getUniformLocation(p, \"ch\");\n bb = c.getUniformLocation(p, \"aa\");\n pb = c.getUniformLocation(p, \"sm\");\n jb = c.getUniformLocation(p, \"mx\");\n Bb = c.getUniformLocation(p, \"ot\");\n vb = c.getUniformLocation(p, \"tm\");\n c.enableVertexAttribArray(Pa);\n c.enableVertexAttribArray(Ra);\n Ia.sh = p;\n Ia.vs = m;\n Ia.ps = q\n } catch (G) {\n return la(0, _[288] + G), !1\n }\n return !0\n }\n\n function e(a) {\n if (a) {\n var b = ua;\n b.deleteBuffer(a.vx);\n b.deleteBuffer(a.tx);\n b.deleteBuffer(a.ix);\n a.vx = null;\n a.tx = null;\n a.ix = null;\n a.vxd = null;\n a.txd = null;\n a.ixd = null;\n a.tcnt = 0\n }\n }\n\n function w(a, b, c, d) {\n this.tcnt = a;\n this.vxd = b;\n this.txd = c;\n this.ixd = d;\n this.ix = this.tx = this.vx = null\n }\n\n function x(a) {\n var b = ua;\n b.bindBuffer(lb, a.vx = b.createBuffer());\n b.bufferData(lb, a.vxd, wc);\n b.bindBuffer(lb, a.tx = b.createBuffer());\n b.bufferData(lb, a.txd, wc);\n b.bindBuffer(Qb, a.ix = b.createBuffer());\n b.bufferData(Qb, a.ixd, wc)\n }\n\n function v(a, b) {\n var c, d = 2 * (b + 1) * (b + 1);\n c = 6 * b * b;\n var e = new Float32Array(3 * (b + 1) * (b + 1)), g = new Float32Array(d), f = new Uint16Array(c);\n if (isNaN(b) || 0 >= b)b = 1;\n var h, k, t, n, l;\n a *= 2;\n for (k = c = d = 0; k <= b; k++)for (h = 0; h <= b; h++)t = h / b, n = k / b, g[d] = t, g[d + 1] = n, d += 2, e[c] = a * (t - .5), e[c + 1] = a * (n - .5), e[c + 2] = 0, c += 3;\n for (k = c = 0; k < b; k++)for (h = 0; h < b; h++)d = h + k * (b + 1), t = d + 1, n = d + (b + 1), l = n + 1, f[c] = d, f[c + 1] = t, f[c + 2] = n, f[c + 3] = t, f[c + 4] = l, f[c + 5] = n, c += 6;\n return new w(6 * b * b, e, g, f)\n }\n\n function r(a) {\n var c = ua;\n null == a && (a = {\n have: !1,\n fb: null,\n tex: null,\n w: 0,\n h: 0,\n alpha: 1,\n havepano: -1,\n drawcalls: 0\n }, a.fb = c.createFramebuffer(), a.tex = c.createTexture(), c.bindTexture(ma, a.tex), c.texParameteri(ma, c.TEXTURE_WRAP_T, c.CLAMP_TO_EDGE), c.texParameteri(ma, c.TEXTURE_WRAP_S, c.CLAMP_TO_EDGE), c.texParameteri(ma, c.TEXTURE_MAG_FILTER, qb), c.texParameteri(ma, c.TEXTURE_MIN_FILTER, qb));\n var d = b.gl.width * xa + .5 | 0, e = b.gl.height * xa + .5 | 0;\n if (a.w != d || a.h != e)a.w = d, a.h = e, c.bindTexture(ma, a.tex), c.texImage2D(ma, 0, mb, d, e, 0, mb, Nc, null), c.bindFramebuffer(Ab, a.fb), c.framebufferTexture2D(Ab, c.COLOR_ATTACHMENT0, ma, a.tex, 0), c.bindTexture(ma, null), c.bindFramebuffer(Ab, null);\n return a\n }\n\n function y(c, e, g) {\n var f = ua;\n if (0 >= c.drawcalls || null == e)return !1;\n var h = b.gl.width * xa + .5 | 0, k = b.gl.height * xa + .5 | 0;\n if (0 < h && 0 < k)return n(e.prg), f.viewport(0, 0, h, k), e.aa && (Aa && (g = 1 - Aa(1 - g, 0, 1), 0 > g ? g = 0 : 1 < g && (g = 1)), f.uniform1f(e.aa, g)), e.sz && f.uniform2f(e.sz, h, k), f.bindBuffer(lb, a), f.vertexAttribPointer(e.vxp, 2, Oc, !1, 0, 0), f.bindBuffer(Qb, d), f.activeTexture(Mc), f.bindTexture(ma, c.tex), f.drawElements(Kb, 6, Gb, 0), R++, !0\n }\n\n function l(a, b, c, d, e, g) {\n var f = !1;\n 0 == d && (b = c = d = 1024, Da = f = !0);\n this.type = 0;\n this.stereo = g;\n this.preview = !1;\n this.needsize = f;\n this.w = b;\n this.h = c;\n this.mp = b * c * a >> 20;\n this.tilesize = d;\n this.htiles = (b + d - 1) / d | 0;\n this.vtiles = (c + d - 1) / d | 0;\n this.loadedtiles = [0, 0];\n this.addedtiles = [0, 0];\n this.totaltiles = a * this.htiles * this.vtiles;\n this.i = e;\n this.planeurls = Array(a);\n this.planemapping = 6 == a ? [0, 1, 2, 3, 4, 5] : [1];\n this.invplanemapping = 6 == a ? [0, 1, 2, 3, 4, 5] : [0, 0, 0, 0, 0, 0];\n this.completelyadded = this.complete = !1;\n this.vfov = this.hfov = 90;\n this.voffset = this.hoffset = 0;\n this.vscale = 1\n }\n\n function u(a, b) {\n return a.preview ? -1 : b.preview ? 1 : a.w - b.w\n }\n\n function h(a, b, d, e, g, f, h) {\n f = 0 < f ? e * h / f : 1;\n 0 >= e && (e = 1);\n 0 >= g && (g = f);\n f = g / f;\n b.hfov = e;\n b.vfov = g;\n b.hoffset = 0;\n b.voffset = e / 2 - g / f / 2;\n b.vscale = 1;\n h = a.levels;\n d && h.push(b);\n h.sort(u);\n b = h.length - 1;\n for (d = g = 0; d <= b; d++)h[d].needsize || (g = h[d].vfov);\n if (0 < g) {\n for (d = 0; d <= b; d++)h[d].needsize || (h[d].vscale = g / h[d].vfov * f);\n a.fovlimits = [-e / 2, +e / 2, -g / 2, +g / 2]\n }\n c(a)\n }\n\n function c(a) {\n var b = null, c = 0 == a.type, d = c || null != a.fovlimits, e = a.levels;\n if (e) {\n var g = e.length;\n 0 < g && (e = e[g - 1], 0 == e.preview && 0 == e.needsize && d && (b = e))\n }\n b && a.done && 0 == a.ready && (a.ready = !0, a.hfov = c ? 360 : b.hfov, a.vfov = c ? 180 : b.vfov, a.hres = b.w, a.vres = b.h, Xa.havepanosize(a))\n }\n\n function K() {\n this.h = this.w = 0;\n this.imgfov = null;\n this.loading = !0;\n this.texture = this.obj = null;\n this.texvalid = !1;\n this.mx = Ma()\n }\n\n function D() {\n this.layer = null;\n this.tiles = [];\n this.mx = this.texture = this.csobj = this.csobj0 = null\n }\n\n function z(a) {\n function d(a, b, c, e) {\n f(a);\n if (0 == a.type) {\n var g = ua;\n c || (c = [0, 1, 2, 3, 4, 5]);\n var h, k, t, n;\n if (b) {\n h = b.naturalWidth;\n k = b.naturalHeight;\n n = 1;\n if (3 * h == 2 * k)t = h / 2; else if (2 * h == 3 * k)t = h / 3; else if (1 * h == 6 * k)t = h / 6; else if (6 * h == 1 * k)t = h / 1; else {\n 0 == a.type && la(2, _[247] + b.src + _[190]);\n return\n }\n h /= t;\n k /= t\n } else e && (t = e.width, n = 0, h = 1, k = 6, b = e);\n e = Sa ? 0 : G;\n var m = t, p = new D, zf = new l(6, m, m, m, 1, !1), r, u, w, v = [2, 0, 3, 1, 4, 5];\n 0 == Sa && (r = Ja(), r.style.position = _[0], r.style.pointerEvents = \"none\", p.layer = r);\n p.tiles = Array(6);\n for (u = 0; u < k; u++)for (r = 0; r < h; r++) {\n var x = c[u * h + r], P = new q(\"prev\" + a.id + \"s\" + Yb[x], 0, x, 0, 0, zf, \"\", a);\n w = v[x];\n var B = 1 == x || 3 == x ? e : 0, z = 3 >= x ? e : 0, y = Ja(2);\n y.width = m + 2 * B;\n y.height = m + 2 * z;\n y.style.position = _[0];\n y.style[Zc] = \"0 0\";\n var E = y.getContext(\"2d\");\n E && (0 < z && (E.drawImage(b, n * r * t, n * u * t, t, 1, B, 0, t, z), E.drawImage(b, n * r * t, n * u * t + t - 1, t, 1, B, m + z, t, z)), 0 < B && (E.drawImage(b, n * r * t + 0, n * u * t + 0, 1, t, 0, B, B, t), E.drawImage(b, n * r * t + t - 1, n * u * t + 0, 1, t, m + B, B, B, t)), E.drawImage(b, n * r * t, n * u * t, t, t, B, z, m, m), Ba && E.getImageData(m >> 1, m >> 1, 1, 1));\n P.canvas = y;\n 0 == Sa ? (P.elmt = y, y = -m / 2, P.transform = Fb[x] + _[53] + (y - B) + \"px,\" + (y - z) + \"px,\" + y + \"px) \") : (J(P, m, m), x = g.createTexture(), g.activeTexture(Mc), g.bindTexture(ma, x), g.texParameteri(ma, g.TEXTURE_WRAP_T, g.CLAMP_TO_EDGE), g.texParameteri(ma, g.TEXTURE_WRAP_S, g.CLAMP_TO_EDGE), g.texParameteri(ma, g.TEXTURE_MAG_FILTER, qb), g.texParameteri(ma, g.TEXTURE_MIN_FILTER, qb), g.texImage2D(ma, 0, cc, cc, Nc, y), g.bindTexture(ma, null), P.texture = x, P.mem = 0);\n P.state = 2;\n p.tiles[w] = P\n }\n Da = !0;\n a.cspreview = p\n }\n }\n\n function e(a, b) {\n t.imagefov = b;\n var c = a.rppano, d = c.w, g = c.h;\n a.stereo && (0 == a.stereoformat ? d >>= 1 : g >>= 1);\n var f = b[0], h = b[1], k = b[2];\n 0 >= f && (f = 360);\n if (0 >= h) {\n var h = f, n = d, l = g, m = 180, m = 4 == a.type ? 2 * Math.atan(h / 2 * (l / n) * Y) / Y : h * l / n;\n 180 < m && (m = 180);\n h = m\n }\n a.hfov = f;\n a.vfov = h;\n a.hres = d;\n a.vres = g;\n c.imgfov = [f, h, k];\n c = -h / 2 + k;\n d = +h / 2 + k;\n 4 == a.type && (d = Math.tan(.5 * h * Y), k = Math.sin(k * Y), c = Math.atan(-d + k) / Y, d = Math.atan(+d + k) / Y);\n a.fovlimits = [-f / 2, +f / 2, c, d]\n }\n\n function g(a, c, d, e) {\n c = ua;\n var f = a.rppano, h = c.createTexture();\n c.activeTexture(Mc);\n c.bindTexture(ma, h);\n c.texParameteri(ma, c.TEXTURE_WRAP_T, c.CLAMP_TO_EDGE);\n c.texParameteri(ma, c.TEXTURE_WRAP_S, c.CLAMP_TO_EDGE);\n c.texParameteri(ma, c.TEXTURE_MAG_FILTER, qb);\n c.texParameteri(ma, c.TEXTURE_MIN_FILTER, qb);\n if (d) {\n var t;\n e = d.naturalWidth;\n t = d.naturalHeight;\n f.w = e;\n f.h = t;\n var k = !1, n = !1, l = Q(e) << 1 | Q(t), n = b.opera ? \"\" : F(ja.mipmapping);\n if (n = \"force\" == n || \"auto\" == n && 3 == l)0 == (l & 2) && (k = !0, e = A(e)), 0 == (l & 1) && (k = !0, t = A(t)), c.texParameteri(ma, c.TEXTURE_MIN_FILTER, c.LINEAR_MIPMAP_LINEAR);\n e > ga && (k = !0, e = ga);\n t > ga && (k = !0, t = ga);\n if (k) {\n k = Ja(2);\n k.width = e;\n k.height = t;\n l = k.getContext(\"2d\");\n l.drawImage(d, 0, 0, e, t);\n if (b.ios) {\n var m;\n m = t;\n for (var p = l.getImageData(0, 0, 1, m).data, q = 0, r = m, G = m; G > q;)0 == p[4 * (G - 1) + 3] ? r = G : q = G, G = r + q >> 1;\n m = G / m;\n 0 < m && 1 > m && l.drawImage(d, 0, 0, e, t / m)\n }\n c.texImage2D(ma, 0, cc, cc, Nc, k)\n } else c.texImage2D(ma, 0, cc, cc, Nc, d);\n n && c.generateMipmap(ma);\n f.texvalid = !0\n } else e && (f.videoplugin = e, f.videoready = !1);\n c.bindTexture(ma, null);\n f.texture = h;\n a.rppano = f;\n Da = !0\n }\n\n function f(a) {\n var b = ua, c = a.cspreview;\n if (c)if (a.cspreview = null, b)for (a = 0; 6 > a; a++) {\n var d = c.tiles[a], e = d.texture;\n e && (b.deleteTexture(e), d.texture = null)\n } else a.previewadded && (a.layer.removeChild(c.layer), a.previewadded = !1)\n }\n\n var k = ++X, t = this;\n t.id = k;\n t.image = a;\n t.panoview = null;\n t.type = 0;\n t.cubelabels = _[519].split(\"\");\n t.stereo = !1;\n t.stereoformat = 0;\n t.stereolabels = [\"1\", \"2\"];\n t.done = !1;\n t.ready = !1;\n t.fovlimits = null;\n t.hfov = 0;\n t.vfov = 0;\n t.hres = 0;\n t.vres = 0;\n t.levels = [];\n t.frame = 0;\n t.currentlevel = -1;\n t.viewloaded = !1;\n t.stopped = !1;\n t.suspended = !1;\n t.suspended_h = 0;\n t.alpha = 1;\n t.cspreview = null;\n t.rppano = null;\n t.previewadded = !1;\n t.previewloading = !1;\n t.addToLayer = function (a) {\n if (0 == Sa) {\n var b = Ja(), c = b.style;\n c.position = _[0];\n c.left = 0;\n c.top = 0;\n t.layer = b;\n a.appendChild(b)\n }\n };\n t.addGridPreview = function (a, c, e, g, f, h) {\n a += 1;\n var k = b.desktop ? 1023 : b.tablet || b.webgl ? 511 : 255, n = a < k ? a : k, l = Ja(2);\n l.width = n;\n l.height = n;\n k = n / a;\n e *= k;\n c *= k;\n k = l.getContext(\"2d\");\n k.fillStyle = g;\n k.fillRect(0, 0, n, n);\n k.fillStyle = f;\n for (g = 0; g < a; g += e)k.fillRect(0, g, a, 1);\n for (g = 0; g < a; g += c)k.fillRect(g, 0, 1, a);\n if (h != f)for (k.fillStyle = h, f = 0; f < a; f += e)for (g = 0; g < a; g += c)k.fillRect(g, f, 1, 1);\n setTimeout(function () {\n d(t, null, null, l)\n }, 10)\n };\n t.addCubestripPreview = function (a, b) {\n t.previewloading = !0;\n ra.loadimage(a, function (a) {\n d(t, a, b);\n t.previewloading = !1;\n Xa.previewdone()\n }, function (b) {\n la(3, _[58] + a + _[62]);\n t.previewloading = !1\n })\n };\n t.addCubestripPano = function (a) {\n ra.loadimage(a, function (a) {\n d(t, a, null)\n }, function (b) {\n la(3, _[58] + a + _[62])\n })\n };\n t.addCubeLevel = function (a, b, d, e) {\n b = new l(6, b, b, d, e, t.stereo);\n b.planeurls[0] = a[0];\n b.planeurls[1] = a[1];\n b.planeurls[2] = a[2];\n b.planeurls[3] = a[3];\n b.planeurls[4] = a[4];\n b.planeurls[5] = a[5];\n a = t.levels;\n a.push(b);\n a.sort(u);\n c(t)\n };\n t.addFlatLevel = function (a, b, c, d, e, g, f, k) {\n t.type = 1;\n g = new l(1, d, e, g, f, t.stereo);\n g.planeurls[0] = a;\n g.type = 1;\n g.preview = k;\n h(t, g, !0, b, c, d, e)\n };\n t.addRoundPano = function (a, b, c, d) {\n _[24] == F(a) ? t.type = 4 : t.type = 3;\n t.rppano = new K;\n if (d) {\n if (t.updateFOV = e, g(t, a, null, d), d._panoid = t.id, t.imagefov = c, d.onvideoreadyCB = function () {\n var a = t.rppano;\n a.w = d.videowidth;\n a.h = d.videoheight;\n e(t, t.imagefov);\n p.updateView();\n Xa.havepanosize(t);\n t.ready = !0;\n t.rppano.loading = !1;\n a.videoready = !0\n }, d.havevideosize)d.onvideoreadyCB()\n } else b && ra.loadimage(b, function (b) {\n g(t, a, b);\n e(t, c);\n p.updateView();\n Xa.havepanosize(t);\n t.rppano.loading = !1\n })\n };\n t.finalize = function () {\n t.done = !0;\n c(t)\n };\n t.setblend = function (a) {\n Sa ? t.alpha = a : t.layer && (t.layer.style.opacity = a)\n };\n t.removemainpano = function () {\n };\n t.stop = function () {\n t.stopped = !0\n };\n t.destroy = function () {\n var a = ua;\n f(t);\n if (a) {\n var b = t.rppano;\n if (b) {\n var c = b.texture;\n c && a.deleteTexture(c);\n b.texture = null\n }\n }\n for (var d in ab)(b = ab[d]) && b.pano === t && ea(b);\n a || (t.layer.parentNode.removeChild(t.layer), t.layer = null)\n };\n t.previewcheck = function () {\n var a = t.rppano;\n return a && a.videoplugin ? a.texvalid : t.previewloading || 0 == t.type && null == t.cspreview && 0 < t.levels.length && !t.viewloaded ? !1 : !0\n };\n t.doloading = function () {\n return !1\n };\n t.isloading = function () {\n if (t.previewloading)return !0;\n var a = t.levels, b = a.length;\n if (0 < b) {\n if (0 == t.type && (b = a[0].preview && 1 < b ? 1 : 0, 9 > a[b].mp && !a[b].complete) || !t.viewloaded)return !0\n } else if (a = t.rppano)return a.videoplugin ? a.texvalid : a.loading;\n return !1\n }\n }\n\n function q(a, b, c, d, e, g, f, h) {\n this.id = a;\n this.pano = h;\n this.cubeside = c;\n this.stereo = f;\n this.levelindex = b;\n this.level = g;\n this.h = d;\n this.v = e;\n this.draworder = g ? Yb[c] * g.htiles * g.vtiles + e * g.htiles + d : Yb[c];\n this.url = null;\n this.sh = this.ch = this.sv = 0;\n this.mx = this.texture = this.canvas = this.image = this.elmt = null;\n this.lastusage_on_frame = this.mem = this.retries = this.state = 0;\n this.overlap = this.transform = null;\n g && (a = 2 * ((d + .5) / g.htiles - .5), e = 2 * ((e + .5) / g.vtiles - .5), a += .5 / g.htiles, e += .5 / g.vtiles, 1 == h.type && (a *= Math.tan(.5 * g.hfov * Y), e *= Math.tan(.5 * g.vfov * Y)), 0 == c ? (c = 1, g = e, h = -a) : 1 == c ? (c = -a, g = e, h = -1) : 2 == c ? (c = -1, g = e, h = a) : 3 == c ? (c = a, g = e, h = 1) : 4 == c ? (c = -a, h = -e, g = -1) : (c = -a, h = e, g = 1), a = -Math.atan2(c, h), e = -Math.atan2(-g, Math.sqrt(c * c + h * h)), this.sv = Math.sin(e), e = Math.cos(e), this.ch = Math.cos(a) * e, this.sh = Math.sin(a) * e)\n }\n\n function J(a, b, c) {\n var d = Jc[a.cubeside], e = a.level, g = e.w / 2, f = e.tilesize, h = 1E3 / g, k = 1, t = e.vscale;\n 1 == e.type && (k = Math.tan(.5 * e.hfov * Y));\n var n = (-g + a.h * f + b / 2 + 2 * e.hoffset * g / 90) * h * k, e = (-g + a.v * f + c / 2 + 2 * e.voffset * g / e.hfov) * h * k * t, g = g * h;\n Hc(rd, b / 1E3 * k, 0, 0, 0, c / 1E3 * k * t, 0, 0, 0, 1);\n ye(Zb, n, e, g);\n Ic(rd, Zb);\n b = Zb;\n k = d[1];\n t = -d[0] * Y;\n d = Math.cos(t);\n c = Math.sin(t);\n t = -k * Y;\n k = Math.cos(t);\n t = Math.sin(t);\n Hc(b, k, 0, -t, c * t, d, c * k, d * t, -c, d * k);\n Ic(rd, Zb);\n d = Ma();\n Hc(d, h, 0, 0, 0, h, 0, 0, 0, h);\n Ic(d, rd);\n a.mx = d\n }\n\n function C(a, b, c, d, e, g) {\n var f = [], h = a.length, k, t = !1, n = 0, l;\n for (k = 0; k < h; k++) {\n var m = a.charAt(k), p = m.charCodeAt(0);\n if (37 == p)t = !0, n = 0; else if (48 == p)t ? n++ : f.push(m); else if (t) {\n t = !1;\n l = null;\n 65 <= p && 84 >= p && (p += 32);\n if (108 == p)l = c; else if (115 == p)l = b; else if (116 == p)l = g; else if (117 == p || 120 == p || 99 == p || 104 == p)l = d; else if (118 == p || 121 == p || 114 == p)l = e;\n if (null != l) {\n for (; l.length <= n;)l = \"0\" + l;\n f.push(l)\n } else f.push(\"%\" + m)\n } else t = !1, f.push(m)\n }\n return f.join(\"\")\n }\n\n function Q(a) {\n return 0 == (a & a - 1)\n }\n\n function A(a) {\n a--;\n a |= a >> 1;\n a |= a >> 2;\n a |= a >> 4;\n a |= a >> 8;\n a |= a >> 16;\n a++;\n return a\n }\n\n function H(a, b, c, d, e, g) {\n if (0 < g)setTimeout(function () {\n try {\n H(null, b, c, d, e, 0)\n } catch (a) {\n }\n }, g); else {\n null == a && (a = b.getContext(\"2d\"));\n g = e[0];\n var f = e[1], h = e[2], k = e[3];\n 0 < g && a.drawImage(c, 0, 0, 1, d[1], 0, f, g, d[3]);\n 0 < f && a.drawImage(c, 0, 0, d[0], 1, g, 0, d[2], f);\n 0 < h && a.drawImage(c, d[0] - 1, 0, 1, d[1], g + d[2], f, h, d[3]);\n 0 < k && a.drawImage(c, 0, d[1] - 1, d[0], 1, g, f + d[3], d[2], k)\n }\n }\n\n function qa(a) {\n function d() {\n if (0 < I)Da = !0, setTimeout(d, 0); else if (aa--, null != g && null != g.naturalWidth) {\n var e = g.naturalWidth, f = g.naturalHeight, k = e * f * 4, t = !1;\n 0 == k && (t = !0);\n if (t)a.state = 0, Da = !0; else {\n var n = a.level;\n if (n) {\n n.needsize && (n.w = e, n.h = f, n.tilesize = e > f ? e : f, n.needsize = !1, 1 == n.type ? h(a.pano, n, !1, N.hfov, N.vfov, e, f) : c(a.pano), n.preview && Xa.previewdone());\n n.loadedtiles[a.stereo - 1]++;\n n.complete = n.stereo && ja.stereo ? n.loadedtiles[0] == n.totaltiles && n.loadedtiles[1] == n.totaltiles : n.loadedtiles[0] == n.totaltiles;\n t = 1 == n.htiles * n.vtiles;\n a.state = 2;\n a.lastusage_on_frame = M;\n if (Sa) {\n J(a, e, f);\n var l = ua, m = b.opera ? \"\" : F(ja.mipmapping), p = \"force\" == m;\n if (m = p || \"auto\" == m) {\n if (!Q(e) || !Q(f)) {\n m = 1024;\n t ? (m = 0, p && (m = ga)) : p || Q(n.tilesize) || (m = 0);\n var t = A(e), q = A(f);\n t < m && q < m && (n = Ja(2), n.width = t, n.height = q, m = n.getContext(\"2d\"), m.drawImage(g, 0, 0, t, q), g = n, e = t, f = q)\n }\n m = Q(e) && Q(f)\n }\n m && 0 == p && !b.realDesktop && a.level && 2500 < a.level.h && (m = !1);\n e = l.createTexture();\n l.activeTexture(Mc);\n l.bindTexture(ma, e);\n l.texParameteri(ma, l.TEXTURE_WRAP_T, l.CLAMP_TO_EDGE);\n l.texParameteri(ma, l.TEXTURE_WRAP_S, l.CLAMP_TO_EDGE);\n l.texParameteri(ma, l.TEXTURE_MAG_FILTER, qb);\n l.texParameteri(ma, l.TEXTURE_MIN_FILTER, m ? l.LINEAR_MIPMAP_LINEAR : qb);\n l.texImage2D(ma, 0, cc, cc, Nc, g);\n m && l.generateMipmap(ma);\n l.bindTexture(ma, null);\n a.texture = e;\n a.image = g = null\n } else {\n l = [e, f, e, f];\n p = !1;\n e == f && 1 == n.htiles && (m = ja.hardwarelimit, e + 2 * G > m && (n.w = n.h = l[2] = l[3] = e = f = m - 2 * G, p = !0));\n var r = [0, 0, 0, 0], u = G, w = a.h, v = a.v, n = a.cubeside, x = a.level, P = x.tilesize, m = x.vscale, B = -x.w / 2, y = q = 1;\n 1 == x.type && (q = Math.tan(.5 * x.hfov * Y), n = 6, 2 < u && (u = 2), b.ie || b.desktop && b.safari) && (y = 252);\n 1E3 < -B && 4 < u && (u = 4);\n var z = B, D = z;\n r[2] = u;\n r[3] = u;\n 0 == n || 2 == n ? 0 == w && (r[0] = u) : 1 != n && 3 != n || w != x.vtiles - 1 || (r[2] = 0);\n 0 <= n && 3 >= n ? 0 == v && (r[1] = u) : (w == x.htiles - 1 && (r[2] = 0), v == x.vtiles - 1 && (r[3] = 0));\n a.overlap = r;\n z -= r[0];\n D -= r[1];\n r = (z + w * P) * q;\n v = (D + v * P - 2 * x.voffset * B / x.hfov) * q * m;\n x = q;\n P = q * m;\n 1 < y && (r *= y, v *= y, B *= y, x *= y, P *= y);\n y = \"\" + r;\n r = 0 < y.indexOf(\"e-\") ? r = r.toFixed(18) : y;\n y = \"\" + v;\n v = 0 < y.indexOf(\"e-\") ? v = v.toFixed(18) : y;\n y = \"\" + B;\n B = 0 < y.indexOf(\"e-\") ? B = B.toFixed(18) : y;\n a.transform = Fb[n] + _[53] + r + \"px,\" + v + \"px,\" + B + \"px) \";\n if (1 != q || 1 != m)a.transform += _[429] + x + \",\" + P + \",1) \";\n (q = a.overlap) ? (n = Ja(2), n.width = e + q[0] + q[2], n.height = f + q[1] + q[3], n.style.overflow = _[6], k = n.width * n.height * 4, B = y = 0, m = n.getContext(\"2d\"), q && (y = q[0], B = q[1], H(m, n, g, l, q, t ? 0 : 250)), p ? m.drawImage(g, 0, 0, l[0], l[1], y, B, e, f) : m.drawImage(g, y, B), Ba && m.getImageData(l[0] >> 1, l[1] >> 1, 1, 1), a.canvas = n, a.elmt = n, a.image = g = null) : a.elmt = g;\n a.elmt.style.position = _[0];\n a.elmt.style[Zc] = \"0 0\"\n }\n a.mem = k;\n kb += k;\n if (kb > ca) {\n Da = !0;\n I++;\n for (var E, e = null, f = 0; ;) {\n for (E in ab)f++, k = ab[E], 0 < k.levelindex && 2 <= k.state && k.lastusage_on_frame < M - 1 && (!e || k.lastusage_on_frame < e.lastusage_on_frame) && (e = k);\n if (e) {\n if (ea(e), e = null, kb < ca - 2097152)break\n } else break\n }\n if (f > Math.max(2 * $a.length, 100)) {\n e = {};\n for (E in ab)if (k = ab[E])(0 < k.levelindex || 8 < k.level.mp) && 0 == k.state && k.lastusage_on_frame < M - 2 ? (k.pano = null, k.level = null) : e[E] = k;\n ab = e\n }\n kb > ca && (ia = !0)\n }\n Da = !0;\n I++\n }\n }\n }\n }\n\n function e(b, c) {\n aa--;\n c ? a.state = 4 : a.retries < m.network.retrycount ? (a.retries++, a.state = 0, Da = !0) : (a.state = 4, la(3, _[58] + a.url + _[62]))\n }\n\n if (null != a.pano) {\n null == a.url && (a.url = C(a.level.planeurls[a.level.invplanemapping[a.cubeside]], a.pano.cubelabels[a.cubeside], a.levelindex, String(a.h + a.level.i), String(a.v + a.level.i), a.pano.stereolabels[a.stereo - 1]));\n a.state = 1;\n var g = ra.loadimage(a.url, d, e);\n a.image = g;\n aa++\n }\n }\n\n function ea(a) {\n var b = ua, c = a.texture;\n b && c && b.deleteTexture(c);\n (b = a.elmt) && (c = b.parentNode) && c.removeChild(b);\n c = $a.length;\n for (b = 0; b < c; b++)if ($a[b] == a) {\n $a.splice(b, 1);\n break\n }\n b = a.id;\n ab[b] = null;\n delete ab[b];\n if (b = a.level)b.addedtiles[a.stereo - 1]--, b.completelyadded = b.stereo && ja.stereo ? b.addedtiles[0] == b.totaltiles && b.addedtiles[1] == b.totaltiles : b.addedtiles[0] == b.totaltiles;\n kb -= a.mem;\n a.state = 0;\n a.image = null;\n a.canvas = null;\n a.texture = null;\n a.elmt = null;\n a.pano = null;\n a.level = null\n }\n\n function Ca(a) {\n if (Sa) {\n var b = ua, c = xb, d = a.texture;\n c && d && (b.uniformMatrix4fv(Bb, !1, a.mx), b.bindBuffer(lb, c.vx), b.vertexAttribPointer(Pa, 3, Oc, !1, 0, 0), b.bindBuffer(lb, c.tx), b.vertexAttribPointer(Ra, 2, Oc, !1, 0, 0), b.bindBuffer(Qb, c.ix), b.activeTexture(Mc), b.bindTexture(ma, d), b.drawElements(Kb, c.tcnt, Gb, 0), R++)\n } else a.elmt.style[ib] = pc + a.transform\n }\n\n function S(a, b) {\n var c = new Hb;\n c.x = a[0] * b[0] + a[1] * b[1] + a[2] * b[2];\n c.y = a[0] * b[3] + a[1] * b[4] + a[2] * b[5];\n c.z = -2 * (a[0] * b[6] + a[1] * b[7] + a[2] * b[8]);\n return c\n }\n\n function Z(a, c) {\n var d = a.panoview, g = a.id, f, h, k, t, n, l, r, G, u, P, y, z, D, E, C, A, Ba, F, H, J, K, S, Q = !1, L, ea, Z, N, I, V, X, ba, ka, kb, T, ca, ga, ia, ha = !1, oa = !1, va = !0, sa = Ta();\n if (Sa) {\n var ra = ua, za = Qa, Ha = ya, Ea = a.panoview, La = Ea.z, Aa = b.gl.width * xa + .5 | 0, Ka = b.gl.height * xa + .5 | 0;\n if (0 < c) {\n var Na = Aa, Aa = Aa >> 1, za = za >> 1;\n ra.viewport(2 == c ? Aa : 0, 0, 1 == c ? Aa : Na - Aa, Ka)\n } else ra.viewport(0, 0, Aa, Ka);\n var wb = 1 / (.5 * za), Oa = -1 / (.5 * Ha), Ma = Ea.zf, $b = 0 < c ? Number(ja.stereooverlap) * za * .5 * (1 == c ? 1 : -1) : 0, qd = Ea.yf, Xa = Math.min(Ma / 200, 1), ib = 0 < Ma ? Ea.ch : 0;\n xe(Tc, wb, 0, 0, 0, 0, Oa, 0, 0, 0, 0, 65535 / 65536, 1, 0, 0, 65535 / 65536 - 1, 0);\n xe(Kd, La, 0, 0, 0, 0, La, 0, 0, $b, qd, 1, 0, Ma * $b, Ma * qd, Ma, 1);\n Ic(Kd, Tc);\n if (0 < c) {\n var Ee = m.webVR;\n Ee && Ee.enabled && Ee.prjmatrix(c, Kd)\n }\n ra.uniform1i(pb, 0);\n ra.uniform1f(bb, 1);\n ra.uniform1f(Ya, Xa);\n ra.uniform1f(Za, ib);\n kd(Gc, tc);\n Ic(Gc, Kd);\n ra.uniformMatrix4fv(jb, !1, Gc);\n ra.uniformMatrix3fv(vb, !1, Db);\n var Jd = Ia.obj0, Pb = Ia.obj;\n null == Jd && (Jd = v(500, 1), Pb = v(500, 19), x(Jd), x(Pb), Ia.obj0 = Jd, Ia.obj = Pb);\n xb = 10 < Ma ? Pb : Jd\n }\n var Wa = c;\n 0 == Wa && (Wa = 1);\n a.stereo && (g += \"t\" + Wa);\n f = +d.h;\n h = -d.v;\n k = d.z;\n t = Ga - f * Y;\n n = -h * Y;\n l = Math.sin(n);\n r = Math.cos(n);\n G = Math.cos(t) * r;\n u = Math.sin(t) * r;\n if (Ib) {\n var cb = [G, l, u];\n Zd(rd, Ib);\n Fd(rd, cb);\n G = cb[0];\n l = cb[1];\n u = cb[2]\n }\n P = a.levels;\n z = P.length;\n D = a.currentlevel;\n a.viewloaded = !1;\n if (5E3 > k) {\n var ff = 1 / Math.max(100, k), mb = Math.abs(Math.cos(f * Y)), Ab = Math.cos(.25 * Ga);\n if (1E-14 > mb || mb > Ab - 1E-14 && mb < Ab + 1E-14 || mb > 1 - 1E-14 || 1E-14 > r || r > 1 - 1E-14)f += (.5 + .5 * Math.random()) * ff * (.5 > Math.random() ? -1 : 1), h += (.5 + .5 * Math.random()) * ff * (.5 > Math.random() ? -1 : 1);\n b.firefox && (l < -(1 - 1E-14) && (h += .5), l > +(1 - 1E-14) && (h -= .5))\n }\n pc = _[53] + Qa / 2 + \"px,\" + ya / 2 + _[207] + d.yf.toFixed(16) + _[232] + k.toFixed(16) + (0 < b.iosversion && 5 > b.iosversion ? \"\" : \"px\") + _[106] + (-d.r).toFixed(16) + _[86] + k.toFixed(16) + _[295] + h.toFixed(16) + _[284] + f.toFixed(16) + \"deg) \" + hc;\n if (0 < z) {\n var qb = 1 == pa(ja.loadwhilemoving) ? !0 : 0 == a.hasmoved || wa, ob = D;\n 7 <= aa && (qb = !1);\n if (a.stopped)qb = !1; else {\n 9 > P[0].mp && (0 == P[0].complete && (ob = 0, Q = !0), 0 == qb && 0 == P[0].completelyadded && (ob = 0, qb = Q = !0));\n var Cb = m.lockmultireslevel | 0;\n m.downloadlockedlevel && 0 <= Cb && Cb < z && (Q = !0, 0 == P[Cb].complete && (qb = !0))\n }\n ta && 5 < ob && (ob -= 3, ta = !1, Da = !0);\n if (qb) {\n Fa = sa;\n wa = !1;\n ca = null;\n ia = 1E6;\n for (E = ob; 0 <= E; E--) {\n y = P[E];\n Ba = y.w;\n F = y.h;\n H = y.tilesize;\n J = y.htiles;\n K = y.vtiles;\n var ha = !0, Zb = y.planeurls.length;\n for (A = 0; A < Zb; A++)if (C = y.planemapping[A], S = Q ? [0, 0, 1, 1] : d.vr[C]) {\n kb = \"p\" + g + \"l\" + E + \"s\" + Yb[C] + \"h\";\n var Fb = 1, Hb = 1;\n 1 == a.type && (Fb = 1 / Math.tan(.5 * y.hfov * Y), Hb = 1 / Math.tan(.5 * y.vfov * Y));\n L = Math.floor((Fb * (S[0] - .5) + .5) * Ba / H);\n ea = Math.ceil((Fb * (S[2] - .5) + .5) * Ba / H);\n 0 > L && (L = 0);\n ea > J && (ea = J);\n Z = Math.floor((Hb * (S[1] - .5) + .5) * F / H);\n N = Math.ceil((Hb * (S[3] - .5) + .5) * F / H);\n 0 > Z && (Z = 0);\n N > K && (N = K);\n for (ba = Z; ba < N; ba++)for (X = L; X < ea; X++) {\n ka = kb + X + \"v\" + ba;\n T = ab[ka];\n T || (T = new q(ka, E, C, X, ba, y, Wa, a), ab[ka] = T, ha = !1);\n if (0 == T.state)ga = Math.acos(G * T.ch + u * T.sh + l * T.sv), ga < ia && (ca = T, ia = ga), ha = !1; else if (1 == T.state)ha = !1; else if (2 == T.state) {\n 0 == Sa && Ca(T);\n var nb = T, ub = null, Eb = null;\n 0 == Sa && (ub = nb.elmt, Eb = a.layer);\n if (0 != Sa || ub.parentNode != Eb) {\n for (var gc = $a.length, Jb = -1, Ob = void 0, Lb = void 0, Fc = nb.pano, Hc = nb.levelindex, Jc = nb.draworder, qc = 0, uc = 0, Lb = 0; Lb < gc; Lb++)if (Ob = $a[Lb], Ob.pano === Fc && (qc = Ob.levelindex, uc = Ob.draworder, qc >= Hc && uc >= Jc)) {\n Jb = Lb;\n break\n }\n 0 > Jb ? (ub && Eb.appendChild(ub), $a.push(nb)) : (ub && Eb.insertBefore(ub, $a[Jb].elmt), $a.splice(Jb, 0, nb));\n var xc = nb.level;\n xc.addedtiles[nb.stereo - 1]++;\n xc.completelyadded = xc.stereo && ja.stereo ? xc.addedtiles[0] == xc.totaltiles && xc.addedtiles[1] == xc.totaltiles : xc.addedtiles[0] == xc.totaltiles\n }\n T.state = 3\n }\n T.lastusage_on_frame = M\n }\n }\n 0 == ta && 0 == ha && E == ob && 1E3 < sa - W && (ta = !0, W = sa);\n if (ha) {\n a.viewloaded = !0;\n break\n }\n }\n ca && qa(ca)\n }\n }\n 1 != a.viewloaded ? (oa = !0, U = sa) : 0 < U && 200 > sa - U && (oa = !0);\n Sa && 10 < d.zf && (oa = !0);\n if (oa) {\n var ac = a.cspreview;\n if (ac) {\n var Ec = ac.layer;\n for (I = 0; 6 > I; I++) {\n var sc = ac.tiles[I];\n Ca(sc);\n 0 == Sa && 2 == sc.state && (Ec.appendChild(sc.elmt), sc.state = 3)\n }\n 0 != Sa || a.previewadded || (0 == a.layer.childNodes.length ? a.layer.appendChild(Ec) : a.layer.insertBefore(Ec, a.layer.childNodes[0]), a.previewadded = !0)\n }\n } else 0 == Sa && a.previewadded && ((ac = a.cspreview) && a.layer.removeChild(ac.layer), a.previewadded = !1);\n a.previewloading && (va = !1);\n if (va)for (V = $a.length, I = 0; I < V; I++)if (T = $a[I], !(T.pano !== a || a.stereo && T.stereo != Wa))if (T.levelindex > D) {\n 0 == Sa && T.pano.layer.removeChild(T.elmt);\n T.state = 2;\n $a.splice(I, 1);\n I--;\n V--;\n var yc = T.level;\n yc.addedtiles[T.stereo - 1]--;\n yc.completelyadded = yc.stereo && ja.stereo ? yc.addedtiles[0] == yc.totaltiles && yc.addedtiles[1] == yc.totaltiles : yc.addedtiles[0] == yc.totaltiles\n } else Ca(T);\n if (0 == z && Sa) {\n var yb = a.rppano;\n if (2 < a.type && yb) {\n var Xc = yb.texture, vc = yb.imgfov, Rb = yb.videoplugin, Mb = null, Lc = !1;\n Rb && (Rb._panoid != a.id ? Rb = yb.videoplugin = null : Da = p.haschanged = !0);\n if (Xc && vc) {\n var Zc = vc[0], ad = vc[1], gd = vc[2];\n Lc = Rb ? (Mb = Rb.videoDOM) ? yb.videoready : yb.texvalid : !0;\n if (Lc) {\n var Pc = Ia.objS, hd = a.type + \"/\" + Zc + \"x\" + ad + \"/\" + gd;\n if (hd != Ia.objS_i) {\n var id = a.type, Uc = Zc, sd = ad, Qc = gd, zc = Pc, bd = 15453, td = 10302, dc = 3E4;\n zc && zc.tcnt != dc && (zc = null);\n var de = zc ? zc.vxd : new Float32Array(bd), Vc = zc ? zc.txd : new Float32Array(td), cd = zc ? zc.ixd : new Uint16Array(dc), Ac, Bc, jd, Wc, ld, md, Yc, ud, ee, nd, od, pd, Ld, fe, Uc = Uc * Y, sd = sd * Y, Qc = Qc * Y;\n 4 == id ? (sd = 1E3 * Math.tan(.5 * sd), Qc = 500 * Math.sin(1 * Qc)) : Qc = -Qc + .5 * Ga;\n for (Bc = bd = td = 0; 50 >= Bc; Bc++)for (Yc = 1 - Bc / 50, 4 == id ? (ee = 1, Wc = sd * (Yc - .5) + Qc) : (ud = (Bc / 50 - .5) * sd + Qc, ee = Math.sin(ud), nd = Math.cos(ud), Wc = 500 * nd), Ac = 0; 100 >= Ac; Ac++)ud = (Ac / 100 - .5) * Uc + Ga, od = Math.sin(ud), pd = Math.cos(ud), jd = 500 * pd * ee, ld = 500 * od * ee, md = 1 - Ac / 100, de[bd] = jd, de[bd + 1] = Wc, de[bd + 2] = ld, bd += 3, Vc[td] = md, Vc[td + 1] = Yc, td += 2;\n for (Bc = dc = 0; 50 > Bc; Bc++)for (Ac = 0; 100 > Ac; Ac++)Ld = 101 * Bc + Ac, fe = Ld + 101, cd[dc] = Ld, cd[dc + 1] = Ld + 1, cd[dc + 2] = fe, cd[dc + 3] = fe, cd[dc + 4] = Ld + 1, cd[dc + 5] = fe + 1, dc += 6;\n var Pc = new w(3E4, de, Vc, cd), dd = Ia.objS, ec = Pc;\n if (dd && dd.tcnt == ec.tcnt) {\n ec.vx = dd.vx;\n ec.tx = dd.tx;\n ec.ix = dd.ix;\n var vd = ua;\n vd.bindBuffer(lb, ec.vx);\n vd.bufferData(lb, ec.vxd, wc);\n vd.bindBuffer(lb, ec.tx);\n vd.bufferData(lb, ec.txd, wc);\n vd.bindBuffer(Qb, ec.ix);\n vd.bufferData(Qb, ec.ixd, wc)\n } else dd && e(dd), x(ec);\n Ia.objS = Pc;\n Ia.objS_i = hd\n }\n var fc = ua;\n fc.uniformMatrix4fv(Bb, !1, yb.mx);\n a.stereo && fc.uniformMatrix3fv(vb, !1, 0 == a.stereoformat ? 1 >= Wa ? jc : kc : 1 >= Wa ? Nb : bc);\n fc.bindBuffer(lb, Pc.vx);\n fc.vertexAttribPointer(Pa, 3, Oc, !1, 0, 0);\n fc.bindBuffer(lb, Pc.tx);\n fc.vertexAttribPointer(Ra, 2, Oc, !1, 0, 0);\n fc.bindBuffer(Qb, Pc.ix);\n var ge = null;\n if (Mb) {\n var Fe = 60 * Mb.currentTime, Ge = Fe != Mb._uf || b.android && b.chrome && 0 == Mb.paused;\n Rb.isseeking && 0 == Rb.iPhoneMode && (Ge = !1);\n 4 > Mb.readyState && (Ge = !1, Mb._uf = -1);\n if (Ge && 0 == Va)if (Va++, Mb._uf = 4 > Mb.readyState ? -1 : Fe, b.ie && b.desktop) {\n null == fa && (fa = Ja(2));\n if (fa.width != yb.w || fa.height != yb.h)fa.width = yb.w, fa.height = yb.h;\n fa.getContext(\"2d\").drawImage(Mb, 0, 0, yb.w, yb.h);\n ge = fa\n } else ge = Mb && Mb.paused && 5 > (Fe | 0) && Rb.posterDOM ? Rb.posterDOM : Mb\n }\n fc.activeTexture(Mc);\n fc.bindTexture(ma, Xc);\n if (ge)try {\n fc.texImage2D(ma, 0, cc, cc, Nc, ge), yb.texvalid = !0\n } catch (Md) {\n Md = \"\" + Md, Rb && Rb.error != Md && (Rb.error = Md, la(3, Md))\n }\n yb.texvalid && (fc.drawElements(Kb, Pc.tcnt, Gb, 0), R++)\n }\n }\n }\n }\n if (Sa) {\n var $c = (\"\" + ja.hotspotrenderer).toLowerCase();\n if (\"both\" == $c || _[30] == $c || \"auto\" == $c && 0 < c) {\n var Sb = ua, he = xb, ie = m.webVR, He = ie && ie.enabled, Ed = He ? ie.getcursor() : null, Nd = a.panoview, Vd = Nd.h, Wd = Nd.v, Xd = Nd.r, Yd = Nd.z / (He ? 2E3 : ya) * 2, Ie = 1, Ie = Ie * (1 + Nd.zf / 1E3), Gd = Ua.getArray(), $d = Gd.length, je, na, Od, Hd = 2 > c, Je = null;\n if (0 < c) {\n var be = He ? ie.eyetranslt(c) : 0;\n ye(rc, -be, 0, 0);\n kd(oc, ic);\n Ic(oc, rc);\n ye(rc, -p.tz, p.ty, -p.tx);\n ef(oc, rc);\n Je = oc\n }\n Sb.uniformMatrix4fv(jb, !1, Kd);\n Sb.bindBuffer(lb, he.vx);\n Sb.vertexAttribPointer(Pa, 3, Oc, !1, 0, 0);\n Sb.bindBuffer(lb, he.tx);\n Sb.vertexAttribPointer(Ra, 2, Oc, !1, 0, 0);\n Sb.bindBuffer(Qb, he.ix);\n for (je = 0; je < $d; je++)if ((na = Gd[je]) && na._visible && na.loaded && na._distorted && (0 != na.keep || !a.suspended)) {\n var ke = na.GL;\n ke || (na.GL = ke = {tex: null});\n var Id = !0;\n if (Hd) {\n var ed = na._scale, Pd = na._depth;\n isNaN(Pd) && (Pd = 1E3, Id = !1);\n na === Ed && (Pd = Ed.hit_depth, ed *= Pd / 1E3);\n var Cc = na._flying, Ke = (1 - Cc) * na._ath, Le = (1 - Cc) * na._atv, Me = (1 - Cc) * na.rotate;\n 0 < Cc && (Ke += Cc * nc(Vd, na._ath), Le += Cc * nc(Wd, na._atv), Me += Cc * nc(Xd, na.rotate));\n 1 == na.scaleflying && (ed = ed * (1 - Cc) + ed / Yd * Cc * Ie);\n var zb = wd, Ne = na._width / 1E3 * ed * 2, Oe = na._height / 1E3 * ed * 2, ce = na.rz, yf = na.ry, Pe = 2 * na.ox, Qe = 2 * na.oy, Re = Pd, ve = -Me, we = -Ke + 90, ze = Le, Ae = -na.tz, Be = na.ty, Ce = na.tx, rb = void 0, Qd = void 0, xd = void 0, yd = void 0, zd = void 0, Ad = void 0, Bd = void 0, sb = void 0, db = void 0, eb = void 0, fb = void 0, gb = void 0, hb = void 0, rb = na.rx * Y, Qd = Math.cos(rb), xd = Math.sin(rb), rb = yf * Y, yd = Math.cos(rb), zd = Math.sin(rb), rb = ce * Y, Ad = Math.cos(rb), Bd = Math.sin(rb), rb = -ze * Y, sb = Math.cos(rb), db = Math.sin(rb), rb = -we * Y, eb = Math.cos(rb), fb = Math.sin(rb), rb = -ve * Y, gb = Math.cos(rb), hb = Math.sin(rb), Tb = void 0, Ub = void 0, Vb = void 0, Tb = Ne * (yd * Ad - zd * xd * Bd), Ub = Ne * (yd * Bd + zd * xd * Ad), Vb = Ne * zd * Qd;\n zb[0] = Tb * (gb * eb + hb * db * fb) + Ub * (gb * db * fb - hb * eb) - Vb * sb * fb;\n zb[1] = Tb * hb * sb + Ub * gb * sb + Vb * db;\n zb[2] = Tb * (hb * db * eb - gb * fb) + Ub * (hb * fb + gb * db * eb) - Vb * sb * eb;\n zb[3] = 0;\n Tb = -Oe * Qd * Bd;\n Ub = Oe * Qd * Ad;\n Vb = Oe * xd;\n zb[4] = Tb * (gb * eb + hb * db * fb) + Ub * (gb * db * fb - hb * eb) + Vb * sb * fb;\n zb[5] = Tb * hb * sb + Ub * gb * sb - Vb * db;\n zb[6] = Tb * (hb * db * eb - gb * fb) + Ub * (hb * fb + gb * db * eb) + Vb * sb * eb;\n zb[7] = 0;\n Tb = zd * Ad + yd * xd * Bd;\n Ub = zd * Bd - yd * xd * Ad;\n Vb = yd * Qd;\n zb[8] = Tb * (gb * eb + hb * db * fb) + Ub * (gb * db * fb - hb * eb) + Vb * sb * fb;\n zb[9] = Tb * hb * sb + Ub * gb * sb - Vb * db;\n zb[10] = Tb * (hb * db * eb - gb * fb) + Ub * (hb * fb + gb * db * eb) + Vb * sb * eb;\n zb[11] = 0;\n zb[12] = Pe * (gb * eb + hb * db * fb) + Qe * (gb * db * fb - hb * eb) + Re * sb * fb + Ae;\n zb[13] = Pe * hb * sb + Qe * gb * sb - Re * db + Be;\n zb[14] = Pe * (hb * db * eb - gb * fb) + Qe * (hb * fb + gb * db * eb) + Re * sb * eb + Ce;\n zb[15] = 1;\n kd(na.MX, wd)\n } else kd(wd, na.MX);\n if (!(.01 > na._alpha)) {\n Je && Id ? Ic(wd, Je) : Ic(wd, ic);\n Sb.uniformMatrix4fv(Bb, !1, wd);\n var Rc = Db, Cd = na.crop;\n na.pressed && na._ondowncrop ? Cd = na._ondowncrop : na.hovering && na._onovercrop && (Cd = na._onovercrop);\n if (Cd)if (Cd != na.C_crop) {\n na.C_crop = Cd;\n var le = (\"\" + Cd).split(\"|\"), gf = na.loader.naturalWidth, hf = na.loader.naturalHeight, Rc = [1, 0, 0, 0, 1, 0, 0, 0, 0];\n Rc[0] = (1 * le[2] - 1) / gf;\n Rc[2] = (1 * le[0] + .5) / gf;\n Rc[4] = (1 * le[3] - 1) / hf;\n Rc[5] = (1 * le[1] + .5) / hf;\n na.C_crop_matrix = Rc\n } else Rc = na.C_crop_matrix;\n Sb.uniformMatrix3fv(vb, !1, Rc);\n Sb.uniform1f(bb, na._alpha);\n Sb.activeTexture(Mc);\n if (Od = ke.tex)Sb.bindTexture(ma, Od); else if (Od = B(na))ke.tex = Od;\n Od && (Sb.drawElements(Kb, he.tcnt, Gb, 0), R++)\n }\n }\n if (Hd && M & 1) {\n var Se = m.webVR, jf = Se && Se.enabled, lc = jf ? Se.getcursor() : null, Te = Ua.getArray(), kf = Te.length, Sc, tb, lf = !jf, Rd = [0, 0, 1], mf = !1, me = lc ? lc.depth : 2E3, nf = lc && lc.enabled;\n if (lf) {\n var nf = !0, mc = O.x, De = O.y;\n if (ja.stereo) {\n var ne = Qa >> 1, of = ne * Number(ja.stereooverlap);\n mc < ne ? (mc += ne >> 1, mc -= of >> 1) : (mc -= ne >> 1, mc += of >> 1)\n }\n var Ue = p.inverseProject(mc, De), Rd = [-Ue.x, -Ue.y, -Ue.z]\n }\n var Wb = Kc, Dd = Rd, Ve = Dd[0], We = Dd[1], Xe = Dd[2];\n Dd[0] = Ve * Wb[0] + We * Wb[4] + Xe * Wb[8] + Wb[12];\n Dd[1] = Ve * Wb[1] + We * Wb[5] + Xe * Wb[9] + Wb[13];\n Dd[2] = Ve * Wb[2] + We * Wb[6] + Xe * Wb[10] + Wb[14];\n for (Sc = kf - 1; 0 <= Sc; Sc--)if ((tb = Te[Sc]) && tb._visible && tb.loaded && tb._distorted && tb !== lc && (tb._hit = !1, nf && tb._enabled)) {\n var Ye, Dc = tb.MX, pf = 0, Xb = 1E3, Ze = Rd[0], $e = Rd[1], af = Rd[2], oe = Xb * Dc[0], pe = Xb * Dc[1], qe = Xb * Dc[2], re = Xb * Dc[4], se = Xb * Dc[5], te = Xb * Dc[6], bf = Dc[12] - (oe + re) / 2, cf = Dc[13] - (pe + se) / 2, df = Dc[14] - (qe + te) / 2, Sd = $e * te - af * se, Td = af * re - Ze * te, Ud = Ze * se - $e * re, fd = oe * Sd + pe * Td + qe * Ud;\n if (-1E-6 > fd || 1E-6 < fd)fd = 1 / fd, Xb = (bf * Sd + cf * Td + df * Ud) * -fd, 0 <= Xb && 1 >= Xb && (Sd = df * pe - cf * qe, Td = bf * qe - df * oe, Ud = cf * oe - bf * pe, Xb = (Ze * Sd + $e * Td + af * Ud) * fd, 0 <= Xb && 1 >= Xb && (pf = (re * Sd + se * Td + te * Ud) * fd));\n Ye = pf;\n if (1 < Ye) {\n mf = tb._hit = !0;\n me = Ye;\n break\n }\n }\n lc && (me = Math.max(me, 200) - 100, lc.hit_depth = me);\n for (Sc = 0; Sc < kf; Sc++)if (tb = Te[Sc]) {\n var ue = tb._hit;\n ue != tb.hovering && (tb.hovering = ue, da.callaction(ue ? tb.onover : tb.onout, tb), lc && da.callaction(ue ? lc.onover : lc.onout, tb))\n }\n 0 == O.down && ae.update(!1, lf && mf)\n }\n }\n }\n }\n\n function B(a) {\n var b = a.loader, c = null;\n if (a.jsplugin)b = null; else if (c = b.src, 1 > b.naturalWidth || 1 > b.naturalHeight)b = null;\n if (!b)return null;\n var d = ua, e = null;\n if (e = Ec[c])e.cnt++, e = e.tex; else {\n e = d.createTexture();\n d.bindTexture(ma, e);\n d.texParameteri(ma, d.TEXTURE_WRAP_T, d.CLAMP_TO_EDGE);\n d.texParameteri(ma, d.TEXTURE_WRAP_S, d.CLAMP_TO_EDGE);\n d.texParameteri(ma, d.TEXTURE_MAG_FILTER, qb);\n d.texParameteri(ma, d.TEXTURE_MIN_FILTER, qb);\n try {\n d.texImage2D(ma, 0, mb, mb, Nc, b), Ec[c] = {cnt: 1, tex: e}\n } catch (g) {\n la(3, g)\n }\n }\n a._GL_onDestroy || (a._GL_onDestroy = function () {\n var b = a.loader;\n if (b && !a.jsplugin) {\n var c = ua, b = b.src, d = Ec[b];\n d && 0 == --d.cnt && (c.deleteTexture(d.tex), d.tex = null, Ec[b] = null, delete Ec[b]);\n a._GL_onDestroy = null\n }\n });\n return e\n }\n\n var t = Oa, G = 0, Ba = !1, P = 0, Fa = 0, wa = !1, ta = !1, W = 0, U = 0, Da = !1, M = 0, Va = 0, R = 0, I = 0, X = 0, aa = 0, ba = 0, T = 16.666, ab = {}, $a = [], kb = 0, ca = 52428800, ia = !1, fa = null, Sa = !1, ka = null, ua = null, Ia = null, ga = 0, xb = null, sa = !1, xa = 1, Ha = !1, oa = null, va = null;\n d = a = null;\n var ha = [], La = null, Aa = null, Ea = !1, za = null, Ka = null, Na = [], Pa, Ra, Ya, Za, bb, pb, jb, Bb, vb, Db = [1, 0, 0, 0, 1, 0, 0, 0, 0], Nb = [1, 0, 0, 0, .5, 0, 0, 0, 0], bc = [1, 0, 0, 0, .5, .5, 0, 0, 0], jc = [.5, 0, 0, 0, 1, 0, 0, 0, 0], kc = [.5, 0, .5, 0, 1, 0, 0, 0, 0], ma, Wa, Ab, Mc, lb, Qb, mb, cc, Nc, Gb, Oc, Kb, wc, qb, Yb = [1, 3, 0, 2, 4, 5, 6], Fb = \"rotateY(90deg) ;;rotateY(-90deg) ;rotateY(180deg) ;rotateX(-90deg) ;rotateX(90deg) ;\".split(\";\"), pc = \"\", hc = \"\", Ib = null;\n t.requiereredraw = !1;\n t.isloading = !1;\n t.setup = function (a) {\n var c, d = null;\n if (2 == a) {\n var e = {};\n if (0 <= F(Jb.so.html5).indexOf(_[196]) || b.mac && b.firefox)e.preserveDrawingBuffer = !0;\n b.mobile && (e.antialias = !1);\n e.depth = !1;\n e.stencil = !1;\n var f = Jb.so.webglsettings;\n f && (!0 === f.preserveDrawingBuffer && (e.preserveDrawingBuffer = !0), !0 === f.depth && (e.depth = !0), !0 === f.stencil && (e.stencil = !0));\n f = F(Jb.so.wmode);\n _[36] == f || _[142] == f ? (sa = !0, e.alpha = !0, e.premultipliedAlpha = !1) : e.alpha = !1;\n try {\n for (ka = Ja(2), ka.style.position = _[0], ka.style.left = 0, c = ka.style.top = 0; 4 > c && !(d = ka.getContext([_[30], _[83], _[116], _[112]][c], e)); c++);\n } catch (h) {\n }\n ka && d && (ua = d, Ia = {}, ma = d.TEXTURE_2D, Wa = d.COLOR_BUFFER_BIT | d.DEPTH_BUFFER_BIT | d.STENCIL_BUFFER_BIT, Ab = d.FRAMEBUFFER, Mc = d.TEXTURE0, lb = d.ARRAY_BUFFER, Qb = d.ELEMENT_ARRAY_BUFFER, mb = d.RGBA, cc = d.RGB, Nc = d.UNSIGNED_BYTE, Gb = d.UNSIGNED_SHORT, Oc = d.FLOAT, Kb = d.TRIANGLES, wc = d.STATIC_DRAW, qb = d.LINEAR, k() && (c = m.bgcolor, d.clearColor((c >> 16 & 255) / 255, (c >> 8 & 255) / 255, (c & 255) / 255, 1 - (c >> 24) / 255, sa ? 1 : 0), d.disable(d.DEPTH_TEST), d.depthFunc(d.NEVER), d.enable(d.BLEND), d.blendFunc(d.SRC_ALPHA, d.ONE_MINUS_SRC_ALPHA), d.enable(d.CULL_FACE), d.cullFace(d.FRONT), ga = d.getParameter(d.MAX_TEXTURE_SIZE), !b.desktop && 4096 < ga && (ga = 4096), 2048 >= ga && b.firefox && !b.mac && !b.android && (b.css3d = !1), b.ios && (ga = 2048), V.panolayer.appendChild(ka), t.infoString = _[423], m.webGL = {\n canvas: ka,\n context: d,\n ppshaders: Na,\n createppshader: function (a, b) {\n return g(null, a, b)\n },\n useProgram: n\n }, Sa = !0));\n 0 == Sa && (Ia = ua = ka = null, a = 1)\n }\n 1 == a && (t.infoString = \"\", b.webgl = !1);\n G = b._tileOverlap | 0;\n if (6 < b.iosversion || b.mac && \"7\" <= b.safariversion)Ba = !0;\n b.multiressupport = b.androidstock && 0 == b.webgl ? !1 : !0;\n (a = b.webgl) && b.android && (b.androidstock ? a = !1 : b.chrome && 38 > b.chromeversion && (a = !1));\n 9 <= b.iosversion && document.addEventListener(_[52], E, !1);\n b.panovideosupport = a;\n b.buildList()\n };\n t.reset = function () {\n M = 0\n };\n var ob = null, Cb = null;\n t.unload = function () {\n var b;\n m.webGL && (m.webGL.canvas = null, m.webGL.context = null, m.webGL = null);\n var c = ua;\n if (c && Ia) {\n c.bindTexture(ma, null);\n c.bindBuffer(lb, null);\n c.bindBuffer(Qb, null);\n c.bindFramebuffer(Ab, null);\n c.deleteProgram(Ia.sh);\n c.deleteShader(Ia.vs);\n c.deleteShader(Ia.ps);\n Ia.obj0 && (e(Ia.obj0), e(Ia.obj));\n Ia.objS && e(Ia.objS);\n Ia = null;\n for (b = 0; 6 > b; b++)ha[b] && ha[b].prg && (c.deleteProgram(ha[b].prg), ha[b].prg = null, ha[b] = null);\n c.deleteBuffer(a);\n c.deleteBuffer(d);\n var g = [oa, va, za, Ka];\n for (b = 0; b < g.length; b++)g[b] && (g[b].fb && c.deleteFramebuffer(g[b].fb), g[b].tex && c.deleteTexture(g[b].tex), g[b] = null)\n }\n Sa = !1;\n ua = ka = null\n };\n t.size = function (a, c) {\n if (Sa) {\n var d = (b.android && 0 == b.androidstock || b.blackberry || b.silk || b.mac) && 0 == b.hidpi ? b.pixelratio : 1;\n if (b.desktop || b.ios || b.ie)d = L.devicePixelRatio;\n isNaN(d) && (d = 1);\n if (!b.desktop && 1 != d)a:{\n var e = d, d = [320, 360, 400, 480, 640, 720, 768, 800, 1024, 1080, 1280, 1366, 1440, 1920, 2560], g, f, h = a * e;\n f = d.length;\n for (g = 0; g < f; g++)if (2 > Math.abs(d[g] - h)) {\n d = d[g] / a;\n break a\n }\n d = e\n }\n d *= 1;\n e = a * d + .25 | 0;\n d = c * d + .25 | 0;\n if (g = m.webVR)if (g = g.getsize(e, d))e = g.w, d = g.h;\n e *= ja.framebufferscale;\n d *= ja.framebufferscale;\n ka.style.width = a + \"px\";\n ka.style.height = c + \"px\";\n if (ka.width != e || ka.height != d) {\n ka.width = e;\n ka.height = d;\n g = ua.drawingBufferWidth | 0;\n f = ua.drawingBufferHeight | 0;\n b.desktop && b.chrome && 300 == g && 150 == f && (g = f = 0);\n if (0 >= g || 0 >= f)g = e, f = d;\n ua.viewport(0, 0, g, f);\n b.gl = {width: g, height: f}\n }\n } else b.gl = {width: 0, height: 0}\n };\n t.fps = function () {\n var a = Ta();\n if (0 < ba) {\n var b = a - ba;\n if (5 < b && 500 > b) {\n var c = Math.min(b / 160, .75);\n T = T * (1 - c) + b * c;\n 0 < T && (nd = 1E3 / T, ja.currentfps = nd)\n }\n 0 == I && (ja.r_ft = .9 * ja.r_ft + .1 * b)\n }\n ba = a\n };\n var Fc = !1;\n t.startFrame = function () {\n Da = !1;\n R = Va = 0;\n Fc = !0;\n ca = m.memory.maxmem << 20;\n if (Sa) {\n var a = ua;\n (Ea = 0 < Na.length) ? (a.clear(Wa), za = r(za), a.bindFramebuffer(Ab, za.fb), a.clear(Wa), R = 0) : a.clear(Wa)\n }\n };\n t.finishFrame = function () {\n M++;\n I = 0;\n if (Sa) {\n var a = ua;\n if (Ea) {\n var c, d = Na.length, e = za, g = null;\n 1 < d && (g = Ka = r(Ka));\n a.disable(a.BLEND);\n for (c = 0; c < d; c++)e.drawcalls = R, R = 0, a.bindFramebuffer(Ab, g ? g.fb : null), a.clear(Wa), y(e, Na[c], 1), e = g, g = c + 1 == d - 1 ? null : c & 1 ? Ka : za;\n a.enable(a.BLEND)\n }\n b.androidstock && a.finish()\n }\n m.memory.usage = kb >> 20;\n Fc = !1\n };\n t.createPano = function (a) {\n return new z(a)\n };\n var Eb = 0, gc = 0, nb = 0, ic = Ma(), Kc = Ma(), Ob = Ma(), tc = Ma(), Lb = Ma(), Tc = Ma(), Kd = Ma(), Gc = Ma(), oc = Ma(), rd = Ma(), Zb = Ma();\n t.setblendmode = function (a) {\n if (Sa) {\n var c = ua;\n La = null;\n var d = !0, e = null, g = null, f = 1, h = da.parseFunction(a);\n if (h)switch (h[0].toUpperCase()) {\n case \"BLEND\":\n (e = h[2]) || (e = _[324]);\n La = ha[0];\n break;\n case _[359]:\n g = Number(h[2]);\n f = Number(h[3]);\n (e = h[4]) || (e = _[319]);\n isNaN(g) && (g = 16777215);\n isNaN(f) && (f = 2);\n La = ha[1];\n n(La.prg);\n break;\n case _[363]:\n g = Number(h[2]);\n (e = h[3]) || (e = _[317]);\n isNaN(g) && (g = 0);\n La = ha[2];\n n(La.prg);\n break;\n case _[365]:\n var d = !1, k = Number(h[2]);\n a = Number(h[3]);\n e = h[4];\n isNaN(k) && (k = 0);\n isNaN(a) && (a = .2);\n a = 0 > a ? 0 : 1 < a ? 1 : a;\n e || (e = _[43]);\n var t = h = 0, l = Math.cos(k * Y), m = Math.sin(k * Y);\n 0 > m && (t = 1, k += 90);\n 0 > l && (h = 1, k += 0 > m ? 90 : -90);\n k = Math.sqrt(2) * Math.cos((45 - k) * Y);\n l *= k;\n m *= k;\n k = 1 / (l * l + m * m);\n La = ha[4];\n n(La.prg);\n c.uniform3f(La.fp, l * k, m * k, (-h * l - t * m) * k);\n c.uniform1f(La.bl, .5 * a);\n break;\n case _[404]:\n d = !1;\n a = Number(h[2]);\n (e = h[3]) || (e = _[272]);\n isNaN(a) && (a = 2);\n La = ha[3];\n n(La.prg);\n c.uniform2f(La.ct, .5, .5);\n c.uniform1f(La.zf, a);\n break;\n case _[399]:\n d = !1, a = Number(h[2]), k = Number(h[3]), t = Number(h[4]), (e = h[5]) || (e = _[43]), isNaN(a) && (a = .2), isNaN(k) && (k = .2), isNaN(t) && (t = 0), a = -1 > a ? -1 : 1 < a ? 1 : a, k = 0 > k ? 0 : 1 < k ? 1 : k, t = 0 > t ? 0 : 1 < t ? 1 : t, h = b.gl.width / b.gl.height, l = 1, isNaN(h) && (h = 1), h *= h, 0 > a ? h *= 1 + a : l *= 1 - a, La = ha[5], n(La.prg), c.uniform2f(La.ap, h, l), c.uniform1f(La.bl, .5 * k), c.uniform1f(La.zf, t)\n }\n if (null == La || 0 == d && ja.stereo)La = ha[0], g = null;\n null !== g && c.uniform3f(La.cc, f * (g >> 16 & 255) / 255, f * (g >> 8 & 255) / 255, f * (g & 255) / 255);\n null == e && (e = _[43]);\n Aa = ac.getTweenfu(e);\n Ha = 0 == b.realDesktop && 1 < b.pixelratio || 33 < ja.r_ft\n }\n };\n t.snapshot = function (a, b) {\n if (Sa) {\n var c = ua;\n if (a) {\n var d = oa;\n oa = va;\n va = d\n }\n Ha && (xa = .707);\n va = r(va);\n c.bindFramebuffer(Ab, va.fb);\n R = 0;\n c.clear(Wa);\n d = 0;\n b && (d = Fc, Fc = !0, t.renderpano(b, 1), Fc = d, d = 1 - b.alpha);\n a && y(oa, La, b ? 1 - b.alpha : a.alpha) && R++;\n va.drawcalls = R;\n c.bindFramebuffer(Ab, Ea ? za.fb : null);\n xa = 1;\n null == a && (a = {});\n a.alpha = d;\n return a\n }\n return null\n };\n t.rendersnapshot = function (a, b) {\n if (0 == Fc)return a;\n if (null == ua || null == va || b && 1 <= b.alpha)return null;\n var c = a.alpha = b ? 1 - b.alpha : a.alpha;\n y(va, La, c);\n return a\n };\n t.renderpano = function (a, c) {\n if (0 != Fc) {\n a.frame = M;\n var d = !1, e = ua;\n if (2 == c && e) {\n if (a.stopped && oa && oa.done && oa.pano == a.id) {\n oa.have = !0;\n return\n }\n Ha && (xa = .707);\n if (oa = r(oa))d = !0, oa.have = !0, oa.pano = a.id, oa.done = !1, oa.alpha = a.alpha, oa.drawcalls = 0, e.bindFramebuffer(Ab, oa.fb), e.clear(Wa)\n }\n var g = a.panoview = a.stopped && a.panoview ? a.panoview : p.getState(a.panoview), f = g.h, h = g.v, k = g.r, t = g.z, l = a.hasmoved = f != Eb || h != gc || t != nb;\n t != nb && (ia = !1);\n var q = Ta();\n if (l) {\n if (\"auto\" == F(ja.loadwhilemoving)) {\n var G = q - cb;\n 200 < q - Fa && 0 == O.down && 200 < G && (wa = !0)\n }\n P = q\n } else 10 > q - P && (a.hasmoved = l = !0);\n Da = l;\n Eb = f;\n gc = h;\n nb = t;\n l = ic;\n t = Kc;\n Yd(l, f, h, k);\n kd(tc, l);\n hc = \"\";\n Ib = null;\n if (a.image && a.image.prealign && (f = (\"\" + a.image.prealign).split(\"|\"), 3 == f.length)) {\n var h = Number(f[0]), u = -Number(f[1]), k = -Number(f[2]);\n if (!isNaN(h) && !isNaN(u) && !isNaN(k)) {\n hc = _[125] + u.toFixed(4) + _[271] + k.toFixed(4) + _[269] + h.toFixed(4) + \"deg) \";\n Ib = Ob;\n Zd(t, l);\n l = tc;\n t = Lb;\n kd(l, ic);\n var f = Ib, w, G = -k * Y, k = Math.cos(G), q = Math.sin(G), G = -u * Y, u = Math.cos(G);\n w = Math.sin(G);\n G = -h * Y;\n h = Math.cos(G);\n G = Math.sin(G);\n Hc(f, h * u + G * q * w, G * k, -h * w + G * q * u, -G * u + h * q * w, h * k, G * w + h * q * u, k * w, -q, k * u);\n ef(l, Ib)\n }\n }\n Zd(t, l);\n l = (b.android && 0 == b.androidstock || b.blackberry || b.ios) && 0 == b.hidpi ? b.pixelratio : 1;\n b.ios && b.retina && (l = 1.5);\n 1.4 < l && (l = 1.4);\n h = 1 / (g.z / (.5 * ya));\n f = g.zf;\n 200 < f && (h = Math.atan(h), f = Math.min(h + Math.asin(f / 1E3 * Math.sin(h)), 1), isNaN(f) && (f = 1), h = Math.tan(f));\n .5 > h && (l = 1);\n b.desktop && (l = b.pixelratio);\n l = .25 * Ga * (Qa * l / Math.sin(Math.atan(Qa / ya * h)) + ya * l / h);\n 0 == a.type ? l *= 2 / Ga : 1 == a.type && (f = a.levels, l *= 2 / Ga, l *= Math.tan(.5 * f[f.length - 1].vfov * Y));\n h = l;\n l = 0;\n k = a.levels;\n f = k.length;\n q = 1 + (N ? parseFloat(N.multiresthreshold) : 0);\n isNaN(q) && (q = 1);\n .1 > q && (q = .1);\n h = Math.ceil(h * q);\n if (0 < f) {\n for (; !(0 == k[l].preview && k[l].h >= h);)if (l++, l >= f) {\n l = f - 1;\n break\n }\n ia && 0 < l && --l;\n h = m.lockmultireslevel;\n _[470] == F(h) && (m.lockmultireslevel = h = \"\" + l);\n h |= 0;\n 0 <= h && h < f && (l = h);\n a.currentlevel != l && (a.currentlevel = l)\n }\n 1 == c && (l = a.currentlevel, m.multireslevel = 0 < l && a.levels[0].preview ? l - 1 : l);\n a:{\n k = t;\n t = g.zf;\n h = 1 / (g.z / (.5 * uc));\n if (0 < t && (l = Math.atan(h), h = Math.tan(l + Math.asin(t / 1E3 * Math.sin(l))), isNaN(h) || 0 >= h)) {\n t = [0, 0, 1, 1];\n g.vr = [t, t, t, t, t, t];\n break a\n }\n q = h * ya / Qa;\n G = g.yf / ya * 2 * q;\n t = [h, q + G, -1];\n l = [-h, q + G, -1];\n f = [-h, -q + G, -1];\n h = [h, -q + G, -1];\n Fd(k, t);\n Fd(k, l);\n Fd(k, f);\n Fd(k, h);\n for (var q = 1, v = null, G = Array(40), u = [null, null, null, null, null, null], k = 0; 6 > k; k++) {\n var x = [], B = [];\n x.push(S(t, ub[k]));\n x.push(S(l, ub[k]));\n x.push(S(f, ub[k]));\n x.push(S(h, ub[k]));\n var z = 0, E = 0, D = 0, C = 0;\n for (w = E = 0; 4 > w; w++)v = x[w], E = v.x, D = v.y, C = v.z / 2, E = 1 * (E > -C) + 8 * (E < C) + 64 * (D < C) + 512 * (D > -C) + 4096 * (-.1 > -C), G[w] = E, z += E;\n w = 0 != (z & 18724);\n if (0 == z)for (w = 0; 4 > w; w++)v = x[w], B.push(v.x / v.z), B.push(v.y / v.z); else if (w)continue; else {\n for (var z = 4, v = G, A = 0, Ba = [], W = [], H, J = 0, J = 0; 5 > J; J++) {\n var ta = 1 << 3 * J;\n for (w = 0; w < z; w++) {\n var D = (w + z - 1) % z, E = x[D], K = x[w], D = v[D], Q = v[w], L = 0;\n 0 == (Q & ta) ? (L |= 2, D & ta && (L |= 1)) : 0 == (D & ta) && (L |= 1);\n L & 1 && (4 == J ? q = (.1 - E.z / 2) / (K.z - E.z) / 2 : 3 == J ? q = (-E.y - E.z / 2) / (K.y - E.y + (K.z - E.z) / 2) : 2 == J ? q = (E.z / 2 - E.y) / (K.y - E.y - (K.z - E.z) / 2) : 1 == J ? q = (E.z / 2 - E.x) / (K.x - E.x - (K.z - E.z) / 2) : 0 == J && (q = (-E.z / 2 - E.x) / (K.x - E.x + (K.z - E.z) / 2)), H = new Hb, H.x = E.x + (K.x - E.x) * q, H.y = E.y + (K.y - E.y) * q, H.z = E.z + (K.z - E.z) * q, E = H.x, D = H.y, C = H.z / 2, E = 1 * (E > -C) + 8 * (E < C) + 64 * (D < C) + 512 * (D > -C) + 4096 * (-.1 > -C), Ba.push(H), W.push(E), A++);\n L & 2 && (Ba.push(K), W.push(Q), A++)\n }\n z = A;\n x = Ba;\n v = W;\n A = 0;\n Ba = [];\n W = []\n }\n for (w = 0; w < z; w++)v = x[w], B.push(v.x / v.z), B.push(v.y / v.z)\n }\n x = z = 9;\n A = v = -9;\n Ba = B.length;\n if (4 < Ba) {\n for (w = 0; w < Ba; w++)B[w] += .5;\n for (w = 0; w < Ba; w += 2)B[w + 0] < z && (z = B[w + 0]), B[w + 1] < x && (x = B[w + 1]), B[w + 0] > v && (v = B[w + 0]), B[w + 1] > A && (A = B[w + 1]);\n z > v || 0 > z && 0 > v || 1 < z && 1 < v || x > A || 0 > x && 0 > A || 1 < x && 1 < A || (0 > z && (z = 0), 0 > x && (x = 0), 1 < v && (v = 1), 1 < A && (A = 1), u[k] = [z, x, v, A])\n }\n }\n g.vr = u\n }\n Ia && (n(Ia.sh), e.blendFunc(e.SRC_ALPHA, e.ONE_MINUS_SRC_ALPHA), sa && e.colorMask(!0, !0, !0, !0));\n ja.stereo ? (Z(a, 1), Z(a, 2)) : Z(a, 0);\n g = 0;\n m.downloadlockedlevel && 0 < (m.lockmultireslevel | 0) && (g = m.lockmultireslevel | 0);\n t = a.levels;\n 0 < t.length && (g = t[g], sc.progress = g.stereo && ja.stereo ? (g.loadedtiles[0] + g.loadedtiles[1]) / (2 * g.totaltiles) : g.loadedtiles[0] / g.totaltiles);\n d && (e.bindFramebuffer(Ab, Ea ? za.fb : null), e.clear(Wa), oa.drawcalls = R, oa.done = !0, xa = 1);\n 1 == c && e && oa && 0 < oa.drawcalls && oa.done && oa.have && (oa.have = !1, y(oa, La, 1 - qc));\n sa && e.colorMask(!0, !0, !0, !1)\n }\n };\n t.handleloading = function () {\n return Da ? 2 : 0\n };\n var Jc = [[0, 180], [0, 90], [0, 0], [0, 270], [-90, 90], [90, 90]], ub = [[-1, 0, 0, 0, 1, 0, 0, 0, 1], [0, 0, 1, 0, 1, 0, 1, 0, 0], [1, 0, 0, 0, 1, 0, 0, 0, -1], [0, 0, -1, 0, 1, 0, -1, 0, 0], [0, 0, 1, -1, 0, 0, 0, 1, 0], [0, 0, 1, 1, 0, 0, 0, -1, 0]], Ec = {}, wd = Ma(), rc = Ma()\n })();\n var sf = function () {\n function a(a, b, f) {\n a = F(a).charCodeAt(0);\n return 118 == a ? f : 104 == a ? b : 100 == a ? Math.sqrt(b * b + f * f) : Math.max(b, f * d.mfovratio)\n }\n\n var d = this;\n d.haschanged = !1;\n d.r_rmatrix = Ma();\n (function () {\n var a = \"hlookat vlookat camroll fov maxpixelzoom fisheye fisheyefovlink architectural tx ty tz\".split(\" \"), b = [_[268], _[193]], f;\n for (f in a)va(d, a[f], 0);\n for (f in b)va(d, b[f], !1);\n va(d, _[474], \"VFOV\");\n d.continuousupdates = !1;\n ha(d, _[477], function () {\n return \"\" + d._pannini\n }, function (a) {\n var b = Number(a), b = isNaN(b) ? pa(a) ? 1 : 0 : 0 > b ? 0 : 1 < b ? 1 : b;\n d._pannini = b;\n d.haschanged = !0\n });\n ha(d, _[364], function () {\n return d._fisheye\n }, function (a) {\n d.fisheye = a\n });\n ha(d, _[215], function () {\n return d._fisheyefovlink\n }, function (a) {\n d.fisheyefovlink = a\n });\n ha(d, _[305], function () {\n var a = d.hlookatmax, b = d.hlookatmin, g = M && M.fovlimits;\n isNaN(b) && (b = g ? g[0] : -180);\n isNaN(a) && (a = g ? g[1] : 180);\n return a - b\n }, function (a) {\n });\n ha(d, _[304], function () {\n var a = d.vlookatmax, b = d.vlookatmin, g = M && M.fovlimits;\n isNaN(b) && (b = g ? g[2] : -90);\n isNaN(a) && (a = g ? g[3] : 90);\n return a - b\n }, function (a) {\n })\n })();\n d.defaults = function () {\n d._hlookat = 0;\n d._vlookat = 0;\n d._architectural = 0;\n d._architecturalonlymiddle = !0;\n d._fov = 90;\n d._fovtype = b.desktop ? \"VFOV\" : \"MFOV\";\n d._camroll = 0;\n d.mfovratio = 4 / 3;\n d._maxpixelzoom = Number.NaN;\n d._stereographic = !0;\n d._pannini = 0;\n d._fisheye = 0;\n d._fisheyefovlink = .5;\n d.fovmin = 1;\n d.fovmax = 179;\n d.r_zoom = 1;\n d.r_yoff = 0;\n d.r_zoff = 0;\n d.haschanged = !1;\n d.limitview = \"auto\";\n d.hlookatmin = Number.NaN;\n d.hlookatmax = Number.NaN;\n d.vlookatmin = Number.NaN;\n d.vlookatmax = Number.NaN;\n d._limits = null\n };\n d.inverseProject = function (a, b) {\n var f, e, m, p, v, r, y, l;\n m = -1E3;\n v = m / d.r_zoom;\n f = (a - Qa / 2) * v;\n e = (b - ya / 2 - d.r_yoff) * v;\n v = 1 / Math.sqrt(f * f + e * e + m * m);\n f *= v;\n e *= v;\n m *= v;\n p = d.r_zoff;\n 0 < p && (0 == d._stereographic && (l = Math.atan(1E3 / p) / Y - 1, (1 > -m ? Math.acos(-m) / Y : 0) > l && (r = -e, y = f, v = r * r + y * y, 0 < v && (v = 1 / Math.sqrt(v), r *= v, y *= v), l *= Y, v = Math.sin(l), f = v * y, e = -v * r, m = -Math.cos(l))), r = p * m, y = r * r - (p * p - 1E6), 0 < y && (v = -r + Math.sqrt(y), f *= v, e *= v, m = m * v - -p, v = 1 / Math.sqrt(f * f + e * e + m * m), f *= v, e *= v, m *= v));\n p = new Hb;\n p.x = f;\n p.y = e;\n p.z = m;\n return p\n };\n var m = d.fovRemap = function (b, d, f, e, m) {\n e || (e = Qa);\n m || (m = ya);\n b = Math.tan(b / 360 * Ga);\n d = a(d, e, m);\n f = a(f, e, m);\n return b = 360 * Math.atan(b * f / d) / Ga\n }, f = Ma();\n d.screentosphere = function (a, b) {\n var k = new Hb;\n if (ja.stereo) {\n var e = Qa / 2, m = e / 2 * (1 - Number(ja.stereooverlap));\n a = a < e ? a + m : a - m\n }\n e = d.inverseProject(a * X, b * X);\n Zd(f, d.r_rmatrix);\n nb(f, e);\n e = [Math.atan2(e.x, e.z) / Y + 270, Math.atan2(-e.y, Math.sqrt(e.x * e.x + e.z * e.z)) / Y];\n 180 < e[0] && (e[0] -= 360);\n k.x = e[0];\n k.y = e[1];\n k.z = 0;\n return k\n };\n d.spheretoscreen = function (a, b) {\n var f = new Hb, e = (180 - a) * Y, m = b * Y;\n f.x = 1E3 * Math.cos(m) * Math.cos(e);\n f.z = 1E3 * Math.cos(m) * Math.sin(e);\n f.y = 1E3 * Math.sin(m);\n nb(d.r_rmatrix, f);\n var e = f.z + d.r_zoff, p = m = tc;\n 10 <= e && (e = d.r_zoom / e, m = (f.x * e + .5 * Qa) / X, p = (f.y * e + .5 * ya) / X + d.r_yoff);\n f.x = m;\n f.y = p;\n return f\n };\n d.updateView = function () {\n var a = d._maxpixelzoom;\n if (!isNaN(a) && 0 != a) {\n var f = 1E-6;\n if (M && M.ready) {\n var k = M.vres, e = M.vfov;\n 0 == M.type && (k = k * Math.PI * .5);\n if (50 < k && 0 < e) {\n var f = Qa, w = ya, a = 360 / Math.PI * Math.atan(Math.tan(2 * Math.atan(1 / (2 / Math.PI * k * a / (e / 180) / (.5 * f)))) / (f / w));\n if (isNaN(a) || 1E-4 > a)a = d.fovmax;\n 90 < a && (a = 90);\n f = m(a, \"VFOV\", d._fovtype)\n }\n }\n d.fovmin = f\n }\n var e = d._fov, f = d._hlookat, w = d._vlookat, a = d._camroll, x = b.webgl ? d._fisheye : 0, v = d._fisheyefovlink, r = d._stereographic, k = 0, y = 0 == ia.bouncinglimits || 0 == Pa.isBouncing();\n y && (e < d.fovmin && (e = d.fovmin), e > d.fovmax && (e = d.fovmax));\n 179 < e && (e = 179);\n if (0 < x) {\n var l = m(e, d._fovtype, \"VFOV\");\n r ? (170 < e && (e = 170), k = 1E3 * x * Math.sin(Math.pow(Math.min(l / 130, 1), 2 * v) * Ga * .5)) : (x += Math.pow(Math.min(x, 1), 10) / 10, k = x * Math.sin(Math.pow(l / 180, v) * Ga * .5), k *= 3E3 * k)\n }\n var u = F(d.limitview), h = M && M.fovlimits, c = 0, K = 0, D = 0, v = Number(d.hlookatmin), l = Number(d.hlookatmax), z = Number(d.vlookatmin), q = Number(d.vlookatmax);\n \"auto\" == u && (v = l = z = q = Number.NaN);\n isNaN(v) && (v = h ? h[0] : -180);\n isNaN(l) && (l = h ? h[1] : 180);\n isNaN(z) && (z = h ? h[2] : -90);\n isNaN(q) && (q = h ? h[3] : 90);\n \"auto\" == u && (p.hlookatmin = v, p.hlookatmax = l, p.vlookatmin = z, p.vlookatmax = q, u = \"range\");\n q < z && (h = z, z = q, q = h);\n l < v && (h = v, v = l, l = h);\n var J = !1, C = !1, L = _[123] != u, A = !0, A = 180, h = l - v, H = q - z;\n switch (u) {\n case \"off\":\n case _[31]:\n h = 360;\n v = -180;\n l = 180;\n z = -1E5;\n q = 1E5;\n L = !1;\n break;\n case _[379]:\n L = !0;\n case _[123]:\n C = !0;\n case \"range\":\n if ((J = 360 > h) || 180 > H)D = m(e, d._fovtype, \"HFOV\"), D > h && (A = !0, C && m(h, \"HFOV\", \"VFOV\") < H && (A = J = !1), D = h, L && A && (e = m(D, \"HFOV\", d._fovtype))), c = m(e, d._fovtype, \"VFOV\"), c > H && (A = !0, C && m(H, \"VFOV\", \"HFOV\") < h && (A = J = !1), c = H, L && A && (e = m(c, \"VFOV\", d._fovtype))), m(e, d._fovtype, \"HFOV\"), A = c, K = c *= .5, D *= .5, -89.9 >= z && (c = 0), 89.9 <= q && (K = 0)\n }\n u = [360, -180, 180, c + K, z + c, q - K];\n y && (w - c < z ? (w = z + c, Pa.stopFrictions(2)) : w + K > q && (w = q - K, Pa.stopFrictions(2)));\n J && (D = -w * Y, K = .5 * Qa, c = .5 * ya, z = c / Math.tan(A * Y * .5), 0 < D && (c = -c), K = 1 / Math.sqrt(1 + (K * K + c * c) / (z * z)), c = c / z * K, z = Math.acos(-K * Math.sin(D) + c * Math.cos(D)) - Ga / 2, isNaN(z) && (z = -Ga / 2), K = Math.acos((K * Math.cos(D) + c * Math.sin(D)) / Math.sin(z + Ga / 2)), isNaN(K) && (K = 0), D = 180 * K / Ga, 2 * D >= h && (L && (D = m(h, \"HFOV\", d._fovtype), D < e && (e = D)), D = h / 2));\n 360 > h && (L = !1, u[0] = h, u[1] = v + D, u[2] = l - D, y && (f - D < v ? (f = v + D, L = !0) : f + D > l && (f = l - D, L = !0)), L && (Pa.stopFrictions(1), 0 != za.currentmovingspeed && (za.currentmovingspeed = 0, za.speed *= -1)));\n d._limits = u;\n d._fov = e;\n d._hlookat = f;\n d._vlookat = w;\n e = m(e, d._fovtype, \"MFOV\");\n 0 < x && 0 == r ? (l = m(e, \"MFOV\", \"VFOV\"), x = Math.asin(1E3 * Math.sin(l * Y * .5) / (1E3 + .72 * k)), x = .5 * ya / Math.tan(x)) : x = .5 * uc / Math.tan(e / 114.591559);\n d.hfov = m(e, \"MFOV\", \"HFOV\");\n d.vfov = m(e, \"MFOV\", \"VFOV\");\n d.r_fov = e;\n d.r_zoom = x;\n d.r_zoff = k;\n d.r_vlookat = w;\n r = Number(d._architectural);\n y = 0;\n 0 < r && (1 == d._architecturalonlymiddle && (y = Math.abs(w / 90), 1 < y && (y = 1), y = Math.tan(y * Ga * .25), r *= 1 - y), y = r * (-w * (ya / Math.tan(m(e, \"MFOV\", \"VFOV\") / 114.591559)) / 90), w *= 1 - r);\n d.r_yoff = y;\n Yd(d.r_rmatrix, f, w, a);\n d.r_hlookat = f;\n d.r_vlookatA = w;\n d.r_roll = a;\n e = 0 == b.realDesktop && b.ios && 5 > b.iosversion || b.androidstock || be ? \"\" : \"px\";\n ic = 0 == b.simulator && (b.iphone || b.ipad) ? .25 : 1;\n b.ie && (ic = p.r_zoom / 1E3 * 10);\n if (b.androidstock || b.android && b.chrome || b.blackberry)ic = p.r_zoom / 1E3 / 4;\n $d = _[303] + x + e + _[106] + -a + _[86] + (x - k / 2 * ic) + \"px) \";\n d.haschanged = !1\n };\n d.getState = function (a) {\n null == a && (a = {h: 0, v: 0, z: 0, r: 0, zf: 0, yf: 0, ch: 0, vr: null});\n a.h = d._hlookat;\n a.v = d.r_vlookatA;\n a.z = d.r_zoom;\n a.r = d._camroll;\n a.zf = d.r_zoff;\n a.yf = d.r_yoff;\n a.ch = d._pannini;\n return a\n };\n d.defaults()\n }, uf = function () {\n var a = this;\n a.defaults = function () {\n a.usercontrol = \"all\";\n a.mousetype = _[27];\n a.touchtype = _[485];\n a.mouseaccelerate = 1;\n a.mousespeed = 10;\n a.mousefriction = .8;\n a.mouseyfriction = 1;\n a.mousefovchange = 1;\n a.keybaccelerate = .5;\n a.keybspeed = 10;\n a.keybfriction = .9;\n a.keybfovchange = .75;\n a.keybinvert = !1;\n a.fovspeed = 3;\n a.fovfriction = .9;\n a.camrollreset = !0;\n a.keycodesleft = \"37\";\n a.keycodesright = \"39\";\n a.keycodesup = \"38\";\n a.keycodesdown = \"40\";\n a.keycodesin = \"\";\n a.keycodesout = \"\";\n a.touchfriction = .87;\n a.touchzoom = !0;\n a.zoomtocursor = !1;\n a.zoomoutcursor = !0;\n a.disablewheel = !1;\n a.bouncinglimits = !1;\n a.preventTouchEvents = !0\n };\n a.defaults()\n }, vf = function () {\n var a = this;\n a.standard = _[5];\n a.dragging = \"move\";\n a.moving = \"move\";\n a.hit = _[18];\n a.update = function (b, m) {\n void 0 === b && (b = O.down);\n var f = F(ia.mousetype);\n V.controllayer.style.cursor = b ? _[27] == f ? a.moving : a.dragging : m ? a.hit : a.standard\n }\n }, rf = function () {\n var a = this;\n a.haschanged = !1;\n a.mode = _[50];\n a.pixelx = 0;\n a.pixely = 0;\n a.pixelwidth = 0;\n a.pixelheight = 0;\n va(a, _[50], _[66]);\n va(a, \"x\", \"0\");\n va(a, \"y\", \"0\");\n va(a, _[49], \"100%\");\n va(a, _[28], \"100%\");\n va(a, \"left\", \"0\");\n va(a, \"top\", \"0\");\n va(a, _[3], \"0\");\n va(a, _[2], \"0\");\n a.calc = function (b, m) {\n var f = 1 / X, g = _[71] == F(a.mode), n = g ? a._left : a._x, k = g ? a._top : a._y, e = g ? a._right : a._width, p = g ? a._bottom : a._height, n = 0 < n.indexOf(\"%\") ? parseFloat(n) / 100 * b * f : Number(n), e = 0 < e.indexOf(\"%\") ? parseFloat(e) / 100 * b * f : Number(e), k = 0 < k.indexOf(\"%\") ? parseFloat(k) / 100 * m * f : Number(k), p = 0 < p.indexOf(\"%\") ? parseFloat(p) / 100 * m * f : Number(p), n = n / f, k = k / f, e = e / f, p = p / f;\n g ? (e = b - n - e, p = m - k - p) : (g = F(a._align), 0 <= g.indexOf(\"left\") || (n = 0 <= g.indexOf(_[3]) ? b - e - n : (b - e) / 2 + n), 0 <= g.indexOf(\"top\") || (k = 0 <= g.indexOf(_[2]) ? m - p - k : (m - p) / 2 + k));\n a.pixelx = Math.round(n * f);\n a.pixely = Math.round(k * f);\n g = !1;\n n = Math.round(e);\n e = Math.round(p);\n if (Qa != n || ya != e)g = !0, Qa = n, ya = e;\n a.pixelwidth = n * f;\n a.pixelheight = e * f;\n a.haschanged = !1;\n return g\n }\n }, Wc = !1, Ob = function () {\n function a() {\n var a = c._alpha;\n _[1] == c._type && (a *= qc);\n var b = 255 * a | 0;\n b == c._aa || c.GL || (c.sprite && (c.sprite.style.opacity = a, c._aa = b), c._poly && (c._poly.style.opacity = a, c._aa = b));\n c._autoalpha && (a = 0 < a, a != c._visible && (c.visible = a))\n }\n\n function d() {\n if (c.sprite && null != c._zorder) {\n var a = parseInt(c._zorder);\n !isNaN(a) && 0 <= a ? (c.sprite.style.zIndex = J + a, c._zdeep = a, c._deepscale = 100 / (200 + a)) : (c._zdeep = 0, c._deepscale = .5)\n }\n _[1] == c._type && (Wc = !0)\n }\n\n function p() {\n c.sprite && (c.sprite.style.overflow = c._maskchildren ? _[6] : _[12], z && b.safari && u())\n }\n\n function f(a, b) {\n b && (b = a._enabled) && _[15] == a.type && (b = 0 != a.bgcapture);\n a._enabledstate = 1 * b + 2 * a._handcursor;\n var c = a.sprite.style;\n c.cursor = b && a._handcursor ? _[18] : _[5];\n c.pointerEvents = b ? \"auto\" : \"none\";\n 0 == b && a.hovering && (a.hovering = !1);\n if (c = a._childs) {\n var d, e, g;\n e = c.length;\n for (d = 0; d < e; d++)(g = c[d]) && g.sprite && f(g, b)\n }\n }\n\n function g() {\n if (c.sprite) {\n var a = c._enabled;\n z && (a &= c.bgcapture);\n if (a && c._parent)a:{\n for (a = n(c._parent); a;) {\n if (0 == a._enabled || 0 == a.children) {\n a = !1;\n break a\n }\n if (a._parent)a = n(a._parent); else break\n }\n a = !0\n }\n 1 * a + 2 * c._handcursor != c._enabledstate && f(c, a)\n }\n }\n\n function n(a) {\n var b = null;\n if (a) {\n var b = a = F(a), c = xa, d = a.indexOf(\"[\");\n 0 < d && (b = a.slice(0, d), _[1] == b && (c = Ua), a = a.slice(d + 1, a.indexOf(\"]\")));\n if (\"stage\" == b)return null == Ra.sprite && (Ra.sprite = V.viewerlayer, Ra.loaded = !0), Ra;\n if (_[468] == b)return null == Za.sprite && (a = Ja(), b = a.style, b.position = _[0], b.width = \"100%\", b.height = \"100%\", b.overflow = _[6], b.zIndex = \"0\", b.pointerEvents = \"none\", V.controllayer.parentNode.insertBefore(a, V.controllayer), Za.sprite = a, Za.loaded = !0), Za;\n b = c.getItem(a)\n }\n return b\n }\n\n function k(a) {\n if (c._parent != a) {\n if (c._parent) {\n var b = n(c._parent);\n if (b) {\n var d = b._childs;\n if (d) {\n var e, f;\n f = d.length;\n for (e = 0; e < f; e++)if (d[e] === c) {\n d.splice(e, 1);\n f--;\n break\n }\n 0 == f && (d = null);\n b._childs = d;\n b.poschanged = !0\n }\n }\n }\n a && ((b = n(a)) ? b.sprite ? (null == b._childs && (b._childs = []), b._use_css_scale = !1, c._use_css_scale = !1, b._childs.push(c), b.sprite.appendChild(c.sprite), b.poschanged = !0) : setTimeout(function () {\n c._parent = null;\n k(a)\n }, 16) : a = null);\n null == a && V.pluginlayer.appendChild(c.sprite);\n c._parent = a;\n c.poschanged = !0;\n g()\n }\n }\n\n function e(a) {\n (a = this.kobject) && 0 == D && (a = a.url, 0 < F(a).indexOf(\".swf\") ? la(2, c._type + \"[\" + c.name + _[78] + Vd(a)) : (a && _[74] == a.slice(0, 5) && 50 < a.length && (a = a.slice(0, 50) + \"...\"), la(3, c._type + \"[\" + c.name + _[85] + a)))\n }\n\n function w(a) {\n if (S && (Pa.trackTouch(a), ba(L, a.type, w, !0), _[4] == a.type ? (aa.body.style.webkitUserSelect = aa.body.style.backupUserSelect, ba(L, _[10], x, !0), ba(L, _[4], w, !0)) : (ba(L, b.browser.events.touchmove, x, !0), ba(L, b.browser.events.touchend, w, !0)), S.pressed)) {\n S.pressed = !1;\n if (S._ondowncrop || S._onovercrop)S.hovering && S._onovercrop ? h(S, S._onovercrop) : h(S, S._crop);\n da.callaction(S.onup, S);\n K || da.blocked || da.callaction(S.onclick, S)\n }\n }\n\n function x(a, c) {\n var d = a.changedTouches && 0 < a.changedTouches.length ? a.changedTouches[0] : a, e = d.pageX, d = d.pageY;\n !0 === c ? I = [e, d] : I ? 0 == K && (e -= I[0], d -= I[1], Math.sqrt(e * e + d * d) >= (b.touchdevice ? 11 : 4) && (K = !0)) : (I = null, ba(L, a.type, x, !0))\n }\n\n function v(a, d) {\n var e = a.timeStamp | 0, f = !0;\n switch (a.type) {\n case _[34]:\n case _[8]:\n case _[16]:\n 1 == d && (e = _[15] == S.type, y(S) && (!e || e && S.bgcapture) && S._handcursor && (c.sprite.style.cursor = _[18]));\n e = S.sprite;\n for (f = 0; e;) {\n var g = e.kobject;\n if (g) {\n var k = g._enabled;\n 0 == b.pointerEvents && (k = y(g));\n if (0 == k || 0 < f && 0 == g.children)return;\n f++;\n e = e.parentNode\n } else break\n }\n for (f = S.sprite; f;) {\n if (g = f.kobject)g.enabled && 0 == g.hovering && (g.hovering = !0, 0 == g.pressed && g._onovercrop && h(g, g._onovercrop), da.blocked || da.callaction(g.onover, g)); else break;\n f = f.parentNode\n }\n break;\n case _[35]:\n case _[9]:\n case _[17]:\n for (e = (f = a.relatedTarget) ? f.kobject : null; f && null == e;)if (f = f.parentNode)e = f.kobject; else break;\n for (f = S.sprite; f;) {\n if (g = f.kobject) {\n for (var k = !1, l = e; l;) {\n if (g == l) {\n k = !0;\n break\n }\n if (l.sprite && l.sprite.parentNode)l = l.sprite.parentNode.kobject; else break\n }\n if (0 == k)1 == g.hovering && (g.hovering = !1, 0 == g.pressed && g._onovercrop && h(g, g._crop), da.callaction(g.onout, g)); else break\n } else break;\n f = f.parentNode\n }\n break;\n case _[7]:\n if (500 < e && 500 > e - kc) {\n kc = 0;\n break\n }\n if (f = 0 == (a.button | 0))aa.body.style.backupUserSelect = aa.body.style.webkitUserSelect, aa.body.style.webkitUserSelect = \"none\", x(a, !0), R(L, _[4], w, !0), R(L, _[10], x, !0), K = !1, S.pressed = !0, S._ondowncrop && h(S, S._ondowncrop), da.blocked || da.callaction(S.ondown, S);\n break;\n case b.browser.events.touchstart:\n kc = e;\n Pa.trackTouch(a);\n if (Pa.isMultiTouch())break;\n K = !1;\n if (f = 0 == (a.button | 0))x(a, !0), R(L, b.browser.events.touchend, w, !0), R(L, b.browser.events.touchmove, x, !0), S.pressed = !0, S._ondowncrop && h(S, S._ondowncrop), da.blocked || da.callaction(S.ondown, S)\n }\n }\n\n function r(a, b) {\n if (a === b)return !1;\n for (; b && b !== a;)b = b.parentNode;\n return b === a\n }\n\n function y(a) {\n if (a._enabled) {\n for (a = a.sprite; a;)if ((a = a.parentNode) && a.kobject && 0 == a.kobject._enabled)return !1;\n return !0\n }\n return !1\n }\n\n function l(a) {\n cb = Ta();\n var d = a.type;\n if (_[7] != d && d != b.browser.events.touchstart || !da.isblocked()) {\n var e = a.target.kobject;\n _[34] == d ? d = _[8] : _[35] == d && (d = _[9]);\n null == e && (e = c);\n if ((_[8] != d && _[9] != d || 4 == a.pointerType || _[19] == a.pointerType) && e) {\n var e = a.timeStamp, f = c._eP;\n e != c._eT && (f = 0);\n if (_[16] == d || _[8] == d) {\n var h = a.relatedTarget;\n if (this === h || r(this, h))return\n } else if (_[17] == d || _[9] == d)if (h = a.relatedTarget, this === h || r(this, h))return;\n 0 == e && (_[16] == d && 0 == c.hovering ? f = 0 : _[17] == d && 1 == c.hovering && (f = 0));\n d = c._enabled;\n 0 == b.pointerEvents && (d = y(c));\n if (d && (!z || z && c.bgcapture))0 == c.children && a.stopPropagation(), 0 == f && (0 == c.children && 1 == a.eventPhase || 2 <= a.eventPhase) && (f = 1, c.jsplugin && c.jsplugin.hittest && (d = V.getMousePos(a.changedTouches ? a.changedTouches[0] : a, c.sprite), c.jsplugin.hittest(d.x * c.imagewidth / c.pixelwidth, d.y * c.imageheight / c.pixelheight) || (f = 2)), 1 == f && (S = c, v(a), c.capture && (null != c.jsplugin && r(V.controllayer, c.sprite) || 0 == (a.target && \"A\" == a.target.nodeName) && Aa(a), a.stopPropagation()))); else if (0 == b.pointerEvents && aa.msElementsFromPoint && 0 == f && 2 == a.eventPhase && (h = a.type, d = _[4] == h || _[17] == h || _[35] == h || _[9] == h || h == b.browser.events.touchend, _[7] == h || _[16] == h || _[34] == h || _[8] == h || h == b.browser.events.touchstart || d) && (h = aa.msElementsFromPoint(a.clientX, a.clientY))) {\n var k = [], l, n, m = null, m = null;\n for (l = 0; l < h.length; l++)if (m = h[l], m = m.kobject)k.push(m); else break;\n d && g();\n if (d && Z)for (l = 0; l < Z.length; l++) {\n var m = Z[l], p = !1;\n for (n = 0; n < k.length; n++)k[n] === m && (p = !0);\n 0 == p && (f = 1, S = m, v(a, !0), m.capture && (null == c.jsplugin && Aa(a), a.stopPropagation()))\n }\n for (l = 0; l < h.length; l++)if (m = h[l], m = m.kobject) {\n if (n = _[15] == m.type, 1 == (y(m) && (!n || n && m.bgcapture)) || d)if (f = 1, S = m, v(a, !0), m.capture) {\n null == c.jsplugin && Aa(a);\n a.stopPropagation();\n break\n }\n } else break;\n Z = k\n }\n c._eT = e;\n c._eP = f\n }\n }\n }\n\n function u() {\n var a = c.sprite;\n if (a) {\n var a = a.style, d = Number(c._bgcolor), e = Number(c._bgalpha), f = X;\n isNaN(d) && (d = 0);\n isNaN(e) && (e = 0);\n var g = (\"\" + c._bgborder).split(\" \"), h = Ib(g[0], f, \",\"), k = g[1] | 0, g = Number(g[2]);\n isNaN(g) && (g = 1);\n if (h[0] != q[0] || h[3] != q[3])q = h, c.poschanged = !0;\n 0 == e ? a.background = \"none\" : a.backgroundColor = ca(d, e);\n var d = Ib(c.bgroundedge, f * c._scale, \" \"), e = \"\", l = c.bgshadow;\n if (l) {\n var n = (\"\" + l).split(\",\"), m, p;\n p = n.length;\n for (m = 0; m < p; m++) {\n var r = Ha(n[m]).split(\" \"), u = r.length;\n if (4 < u) {\n var v = 5 < u ? 1 : 0;\n \"\" != e && (e += \", \");\n e += r[0] * f + \"px \" + r[1] * f + \"px \" + r[2] * f + \"px \" + (v ? r[3] * f : 0) + \"px \" + ca(r[3 + v] | 0, r[4 + v]) + (6 < u ? \" \" + r[6] : \"\")\n }\n }\n }\n if (b.safari || b.ios)a.webkitMaskImage = c._maskchildren && !l && 0 < d[0] + d[1] + d[2] + d[3] ? _[167] : \"\";\n a[pc] = e;\n a.borderStyle = \"solid\";\n a.borderColor = ca(k, g);\n a.borderWidth = h.join(\"px \") + \"px\";\n a.borderRadius = d.join(\"px \") + \"px\"\n }\n }\n\n function h(a, b) {\n var c = 0, d = 0, e = a.loader;\n e && (c = e.naturalWidth, d = e.naturalHeight);\n b && (b = String(b).split(\"|\"), 4 == b.length && (c = b[2], d = b[3]));\n null == a.jsplugin && 0 == a._isNE() && (a.imagewidth = c, a.imageheight = d, e = a._gOSF(), e & 1 && (a._width = String(c)), e & 2 && (a._height = String(d)));\n a.updatepos()\n }\n\n var c = this;\n c.prototype = Fb;\n this.prototype.call(this);\n c._type = _[29];\n c.layer = c.plugin = new bb(Ob);\n c.createvar = function (a, b, d) {\n var e = \"_\" + a;\n c[e] = void 0 === b ? null : b;\n c.__defineGetter__(a, function () {\n return c[e]\n });\n void 0 !== d ? c.__defineSetter__(a, function (a) {\n c[e] = a;\n d()\n }) : c.__defineSetter__(a, function (a) {\n c[e] = a;\n c.poschanged = !0\n })\n };\n var K = !1, D = !1, z = !1, q = [0, 0, 0, 0], J = 0, C = 3, Q = !1;\n c._isNE = function () {\n return D\n };\n c._gOSF = function () {\n return C\n };\n c.haveUserWidth = function () {\n return 0 == (C & 1)\n };\n c.haveUserHeight = function () {\n return 0 == (C & 2)\n };\n c.sprite = null;\n c.loader = null;\n c.jsplugin = null;\n c._use_css_scale = !1;\n c._finalxscale = 1;\n c._finalyscale = 1;\n c._hszscale = 1;\n c._eT = 0;\n c._eP = 0;\n c._pCD = !1;\n c.MX = Ma();\n c.__defineGetter__(\"type\", function () {\n return _[57] == c.url ? _[15] : _[75]\n });\n c.__defineSetter__(\"type\", function (a) {\n _[15] == F(a) && (c.url = _[57])\n });\n c.imagewidth = 0;\n c.imageheight = 0;\n c.pixelwidth = 0;\n c.pixelheight = 0;\n c._pxw = 0;\n c._pxh = 0;\n c.pressed = !1;\n c.hovering = !1;\n c.loading = !1;\n c.loaded = !1;\n c.loadedurl = null;\n c.loadingurl = null;\n c.preload = !1;\n c._ispreload = !1;\n c.keep = !1;\n c.poschanged = !1;\n c.style = null;\n c.capture = !0;\n c.children = !0;\n c.pixelx = 0;\n c.pixely = 0;\n c._deepscale = .5;\n c._zdeep = 0;\n c.accuracy = 0;\n c._dyn = !1;\n c.onloaded = null;\n c.altonloaded = null;\n c.maxwidth = 0;\n c.minwidth = 0;\n c.maxheight = 0;\n c.minheight = 0;\n c.onover = null;\n c.onhover = null;\n c.onout = null;\n c.onclick = null;\n c.ondown = null;\n c.onup = null;\n c.onloaded = null;\n var A = c.createvar, H = function (a, b) {\n var d = \"_\" + a;\n c[d] = null;\n c.__defineGetter__(a, function () {\n return c[d]\n });\n c.__defineSetter__(a, b)\n };\n A(_[472], !0, g);\n A(_[353], !0, g);\n A(_[302], !1, p);\n A(_[415], null, function () {\n var a = c._jsborder;\n 0 >= parseInt(a) && (c._jsborder = a = null);\n c.sprite && (c.sprite.style.border = a);\n null != a && (c._use_css_scale = !1)\n });\n A(_[512], null, function () {\n if (null != c.sprite) {\n var a = c._alturl;\n c._alturl = null;\n c.url = a\n }\n });\n A(\"url\", null, function () {\n if (\"\" == c._url || \"null\" == c._url)c._url = null;\n null != c._url ? c.reloadurl() : (c.jsplugin && c.jsplugin.unloadplugin && c.jsplugin.unloadplugin(), c.jsplugin = null, c.loadedurl = null, c.loadingurl = null, c.loading = !1, c.loaded = !1)\n });\n A(\"scale\", 1, function () {\n c.poschanged = !0;\n z && u()\n });\n A(_[277], !1, function () {\n Q = !0\n });\n A(_[516], 0);\n A(\"alpha\", 1, a);\n A(_[403], !1, a);\n A(_[503], null, d);\n H(_[12], function (a) {\n a = pa(a);\n if (c._visible != a && (c._visible = a, c._poly && (c._poly.style.visibility = a ? _[12] : _[6]), c.sprite)) {\n var b = !0;\n c.jsplugin && c.jsplugin.onvisibilitychanged && (b = !0 !== c.jsplugin.onvisibilitychanged(a));\n b && (0 == a ? c.sprite.style.display = \"none\" : c.poschanged = !0)\n }\n });\n c._visible = !0;\n A(\"crop\", null, function () {\n h(c, c._crop)\n });\n c._childs = null;\n c._parent = null;\n c.__defineGetter__(_[149], function () {\n return c._parent\n });\n c.__defineSetter__(_[149], function (a) {\n if (null == a || \"\" == a || \"null\" == F(a))a = null;\n c.sprite ? k(a) : c._parent = a\n });\n for (var N = [_[50], \"edge\", _[341], _[339]], ea = 0; ea < N.length; ea++)A(N[ea]);\n H(_[49], function (a) {\n 0 == 0 * parseFloat(a) ? C &= 2 : a && \"prop\" == a.toLowerCase() ? (a = \"prop\", C &= 2) : (a = null, C |= 1);\n c._width = a;\n c.poschanged = !0\n });\n H(_[28], function (a) {\n 0 == 0 * parseFloat(a) ? C &= 1 : a && \"prop\" == a.toLowerCase() ? (a = \"prop\", C &= 1) : (a = null, C |= 2);\n c._height = a;\n c.poschanged = !0\n });\n H(\"x\", function (a) {\n 0 != 0 * parseFloat(a) && (a = null);\n c._x = a;\n c.poschanged = !0\n });\n H(\"y\", function (a) {\n 0 != 0 * parseFloat(a) && (a = null);\n c._y = a;\n c.poschanged = !0\n });\n H(\"ox\", function (a) {\n 0 != 0 * parseFloat(a) && (a = null);\n c._ox = a;\n c.poschanged = !0\n });\n H(\"oy\", function (a) {\n 0 != 0 * parseFloat(a) && (a = null);\n c._oy = a;\n c.poschanged = !0\n });\n c.loadstyle = function (a) {\n da.assignstyle(c.getfullpath(), a)\n };\n c.getmouse = function (a) {\n var b = 0, d = 0, d = V.controllayer, e = c.sprite, f = d.getBoundingClientRect(), g = e.getBoundingClientRect(), b = O.x - g.left - e.clientLeft + f.left + d.clientLeft, d = O.y - g.top - e.clientTop + f.top + d.clientTop;\n a && (b = b * c.imagewidth / c.pixelwidth, d = d * c.imageheight / c.pixelheight);\n return {x: b, y: d}\n };\n c._assignEvents = function (a) {\n Pa.touch && (R(a, b.browser.events.touchstart, l, !0), R(a, b.browser.events.touchstart, l, !1));\n Pa.mouse && (R(a, _[7], l, !0), R(a, _[7], l, !1));\n b.desktop && (Pa.mouse || b.ie) && (0 == Pa.mouse && b.ie ? (R(a, b.browser.events.pointerover, l, !0), R(a, b.browser.events.pointerover, l, !1), R(a, b.browser.events.pointerout, l, !0), R(a, b.browser.events.pointerout, l, !1)) : (R(a, _[16], l, !0), R(a, _[16], l, !1), R(a, _[17], l, !0), R(a, _[17], l, !1)))\n };\n c.create = function () {\n c._pCD = !0;\n c.alturl && (c.url = c.alturl, c._alturl = null);\n c.altscale && (c.scale = c.altscale, delete c.altscale);\n var b = c.sprite = Ja(), f = c.loader = Ja(1);\n b.kobject = c;\n f.kobject = c;\n b.style.display = \"none\";\n b.style.position = _[0];\n J = _[29] == c._type ? 3001 : 2001;\n b.style.zIndex = J;\n p();\n g();\n a();\n d();\n c._jsborder && (c.jsborder = c._jsborder);\n c._assignEvents(b);\n R(f, _[48], e, !0);\n R(f, \"load\", c.loadurl_done, !1);\n if (b = c._parent)c._parent = null, k(b);\n null != c._url && c.reloadurl()\n };\n c.destroy = function () {\n c.jsplugin && c.jsplugin.unloadplugin && c.jsplugin.unloadplugin();\n c._GL_onDestroy && c._GL_onDestroy();\n c.jsplugin = null;\n c.loaded = !1;\n c._destroyed = !0;\n c.parent = null;\n var a = c._childs;\n if (a) {\n var b, d, a = a.slice();\n d = a.length;\n for (b = 0; b < d; b++)a[b].parent = null;\n c._childs = null\n }\n };\n c.getfullpath = function () {\n return c._type + \"[\" + c.name + \"]\"\n };\n c.changeorigin = function () {\n var a = arguments, b = null, d = null;\n if (0 < a.length) {\n var e = null, f = 0, g = 0, h = 0, k = 0, l = X, m = Qa / l, p = ya / l, q = c._parent;\n q && (q = n(q)) && (0 == c._use_css_scale ? (m = q._pxw * l, p = q._pxh * l) : (m = q.imagewidth * l, p = q.imageheight * l));\n l = c.imagewidth;\n q = c.imageheight;\n b = 0;\n e = String(c._width);\n \"\" != e && null != e && (0 < e.indexOf(\"%\") ? l = parseFloat(e) / 100 * m : \"prop\" == e.toLowerCase() ? b = 1 : l = e);\n e = String(c._height);\n \"\" != e && null != e && (0 < e.indexOf(\"%\") ? q = parseFloat(e) / 100 * p : \"prop\" == e.toLowerCase() ? b = 2 : q = e);\n 1 == b ? l = q * c.imagewidth / c.imageheight : 2 == b && (q = l * c.imageheight / c.imagewidth);\n b = d = F(a[0]);\n 1 < a.length && (d = F(a[1]));\n var a = String(c._align), r = c._edge ? F(c._edge) : \"null\";\n if (\"null\" == r || _[498] == r)r = a;\n (e = String(c._x)) && (f = 0 < e.indexOf(\"%\") ? parseFloat(e) / 100 * m : parseFloat(e));\n isNaN(f) && (f = 0);\n (e = String(c._y)) && (g = 0 < e.indexOf(\"%\") ? parseFloat(e) / 100 * p : parseFloat(e));\n isNaN(g) && (g = 0);\n if (e = a)h = 0 <= e.indexOf(\"left\") ? 0 + f : 0 <= e.indexOf(_[3]) ? m - f : m / 2 + f, k = 0 <= e.indexOf(\"top\") ? 0 + g : 0 <= e.indexOf(_[2]) ? p - g : p / 2 + g;\n 1 != c._scale && (l *= c._scale, q *= c._scale);\n h = 0 <= r.indexOf(\"left\") ? h + 0 : 0 <= r.indexOf(_[3]) ? h + -l : h + -l / 2;\n k = 0 <= r.indexOf(\"top\") ? k + 0 : 0 <= r.indexOf(_[2]) ? k + -q : k + -q / 2;\n e = a = 0;\n a = 0 <= b.indexOf(\"left\") ? 0 + f : 0 <= b.indexOf(_[3]) ? m - f : m / 2 + f;\n e = 0 <= b.indexOf(\"top\") ? 0 + g : 0 <= b.indexOf(_[2]) ? p - g : p / 2 + g;\n a = 0 <= d.indexOf(\"left\") ? a + 0 : 0 <= d.indexOf(_[3]) ? a + -l : a + -l / 2;\n e = 0 <= d.indexOf(\"top\") ? e + 0 : 0 <= d.indexOf(_[2]) ? e + -q : e + -q / 2;\n c._align = b;\n c._edge = d;\n 0 <= b.indexOf(_[3]) ? c._x = String(f + a - h) : c._x = String(f - a + h);\n 0 <= b.indexOf(_[2]) ? c._y = String(g + e - k) : c._y = String(g - e + k)\n }\n };\n c.resetsize = function () {\n c.loaded && (c._width = String(c.imagewidth), c._height = String(c.imageheight), C = 3, c.poschanged = !0)\n };\n c.registercontentsize = function (a, b) {\n null != a && (c.imagewidth = Number(a), C & 1 && (c._width = String(a)));\n null != b && (c.imageheight = Number(b), C & 2 && (c._height = String(b)));\n c.poschanged = !0\n };\n var I = null, S = null, Z = null;\n\n\n\n\n /**\n * Created by sohow on 16-6-15.\n */\n\n var krpanoplugin2 = function () {\n function Er(e) {\n return \".yes.on.true.1\"[s]((\".\" + e)[c]()) >= 0\n }\n\n function Sr(e) {\n }\n\n function xr() {\n ar = 0;\n if (Tn[at] || _n)if (Tn[_]) {\n var e = (\"\" + navigator.userAgent)[c]()[s](\"ucbrowser\") > 0;\n Tn.chrome || Tn[Ht] ? ar = 2 : e && (ar = 2)\n } else ar = 2;\n if (ar > 0) {\n Vn == 0 && (ar = 1);\n if (Tn[E] && _n)setTimeout(Nr, 10); else {\n window[u](ar == 1 ? f : h, Cr, t);\n var i = Nn[l] != \"\" && Nn[l] != n;\n setTimeout(Nr, Tn[E] ? 10 : i ? 1500 : 3e3)\n }\n } else sr == t && (sr = r, xn[J](Nn[l], Nn))\n }\n\n function Tr() {\n sr == t && (sr = r, er = r, tr = r, nr = r, rr = t, Rr(), xn[J](Nn[O], Nn))\n }\n\n function Nr() {\n window[o](f, Cr, t), window[o](h, Cr, t), Tn[E] && _n ? Tr() : sr == t && (sr = r, xn[J](Nn[l], Nn))\n }\n\n function Cr(e) {\n window[o](e.type, Cr, t), e.type == f || e.type == h && e[K] && e.rotationRate ? (sr = r, er = r, tr = r, Tn[E] && (nr = r), Rr(), xn[J](Nn[O], Nn)) : Tn[E] && _n ? Tr() : sr == t && (sr = r, xn[J](Nn[l], Nn))\n }\n\n function jr(e) {\n var i;\n for (i = 0; i < e[kt]; i++)if (e[i] instanceof HMDVRDevice) {\n kr = e[i], kr[F] ? (Dr = kr[F](mt), Pr = kr[F](Tt), Ar = Dr[pn], Or = Pr[pn], Mr = Dr[Et], _r = Pr[Et]) : kr[$] && kr[C] && (Ar = kr[$](mt), Or = kr[$](Tt), Mr = kr[C](mt), _r = kr[C](Tt));\n var s = 2 * Math.max(Mr.leftDegrees, Mr.rightDegrees), o = 2 * Math.max(Mr.upDegrees, Mr.downDegrees);\n Br = Math.max(s, o);\n break\n }\n for (i = 0; i < e[kt]; i++)if (e[i] instanceof PositionSensorVRDevice)if (kr == n || kr[vn] == e[i][vn]) {\n Lr = e[i];\n break\n }\n kr || Lr ? (er = r, Xn == t && Tn[_] && (rr = r), xn[J](Nn[O], Nn)) : sr == t && (sr = r, xn[J](Nn[l], Nn))\n }\n\n function Ir(e) {\n Zn = e;\n if (e) {\n Fr = {\n imagehfov: xn.image.hfov,\n continuousupdates: xn[p][g],\n usercontrol: xn[y][it],\n mousetype: xn[y][St],\n contextmenu_touch: xn[Rt].touch,\n loadwhilemoving: xn[m][A],\n stereo: xn[m][Ct],\n stereooverlap: xn[m][j],\n hlookat: xn[p][V],\n vlookat: xn[p][jt],\n camroll: xn[p][an],\n fovmin: xn[p][ft],\n fovmax: xn[p][ht],\n fisheye: xn[p][X],\n fov: xn[p].fov,\n maxpixelzoom: xn[p][d],\n fovtype: xn[p][G],\n stereographic: xn[p][x],\n fisheyefovlink: xn[p][b],\n pannini: xn[p][nt],\n architectural: xn[p][v],\n limitview: xn[p][T],\n area_mode: xn[Lt].mode,\n area_align: xn[Lt].align,\n area_x: xn[Lt].x,\n area_y: xn[Lt].y,\n area_width: xn[Lt][Y],\n area_height: xn[Lt][N],\n maxmem: xn.memory[en]\n }, xn[Lt].mode = \"align\", xn[Lt].align = \"lefttop\", xn[Lt].x = \"0\", xn[Lt].y = \"0\", xn[Lt][Y] = \"100%\", xn[Lt][N] = \"100%\", xn[Rt].touch = t, xn[p][g] = r, nr && Tn[E] && !mr ? xn[y][St] = \"drag2d\" : xn[y][it] = \"off\", xn[m][Ct] = r, xn[m][A] = r, xn[p][T] = \"off\", xn[p][nt] = 0, xn[p][v] = 0, xn[p][G] = \"VFOV\", xn[p][ft] = 0, xn[p][ht] = 179, xn[p][X] = 0, xn[p].fov = Br, xn[p][d] = 0, xn[p][x] = r, xn[p][b] = 0, cr = xn[p][V], ci = 0, Tn[E] || (cr -= Ci()), ui();\n if (tr || rr)zr(0, 0), nr && Tn[E] && !mr || (xn[yt] = r);\n ri(), Dn && oi(r), xn.set(\"events[__webvr].keep\", r), xn.set(\"events[__webvr].onnewpano\", ii), xn.set(\"events[__webvr].onresize\", si), (tr || rr) && Ko(r), xn[J](Nn.onentervr, Nn)\n } else if (Fr) {\n xn.set(\"events[__webvr].name\", n), xn[p][g] = Fr[g], xn[y][it] = Fr[it], xn[y][St] = Fr[St], xn[Rt].touch = Fr.contextmenu_touch, xn[m][A] = Fr[A], xn[m][Ct] = Fr[Ct], xn[m][j] = Fr[j], xn[p][an] = 0;\n if (Fr.imagehfov == xn.image.hfov)xn[p][ft] = Fr[ft], xn[p][ht] = Fr[ht], xn[p].fov = Fr.fov, xn[p][d] = Fr[d], xn[p][G] = Fr[G], xn[p][T] = Fr[T], xn[p][X] = Fr[X], xn[p][x] = Fr[x], xn[p][b] = Fr[b], xn[p][nt] = Fr[nt], xn[p][v] = Fr[v]; else {\n var i = xn.xml[p];\n xn[p][ft] = i && !isNaN(Number(i[ft])) ? Number(i[ft]) : 1, xn[p][ht] = i && !isNaN(Number(i[ht])) ? Number(i[ht]) : 140, xn[p].fov = i && !isNaN(Number(i.fov)) ? Number(i.fov) : 90, xn[p][X] = i && !isNaN(Number(i[X])) ? Number(i[X]) : 0, xn[p][nt] = i && !isNaN(Number(i[nt])) ? Number(i[nt]) : 0, xn[p][v] = i && !isNaN(Number(i[v])) ? Number(i[v]) : 0, xn[p][d] = i && !isNaN(Number(i[d])) ? Number(i[d]) : 2, xn[p][G] = i && i[G] ? i[G] : \"MFOV\", xn[p][T] = i && i[T] ? i[T] : pt, xn[p][x] = r, xn[p][b] = .5\n }\n xn[Lt].mode = Fr.area_mode, xn[Lt].align = Fr.area_align, xn[Lt].x = Fr.area_x, xn[Lt].y = Fr.area_y, xn[Lt][Y] = Fr.area_width, xn[Lt][N] = Fr.area_height, xn[W] = -1, xn[D] = t, xn.memory[en] = Fr[en], Fr = n, Qn && (ji(Qn, t), Qn = n), Ko(t), oi(t), ui(), xn[J](Nn.onexitvr, Nn)\n }\n }\n\n function Rr() {\n if (qr)return qr;\n var e = \"Unknown\", t = 0, n = 1536, r = Math.min(screen[Y], screen[N]), i = Math.max(screen[Y], screen[N]), o = window.devicePixelRatio || 1;\n if (Tn.iphone)if (i == 568) {\n var u = xn.webGL.context, a = \"\" + u.getParameter(u.VERSION);\n a[s](\"A8 GPU\") > 0 ? (e = ln, t = 4.7) : (e = \"iPhone 5\", t = 4, n = 1024)\n } else i == 667 ? o == 2 ? (e = ln, t = 4.7) : (e = on, t = 5.5) : i == 736 && (e = on, t = 5.5); else {\n var f = navigator.userAgent[c]();\n f[s](\"gt-n710\") >= 0 ? (t = 5.5, e = \"Note 2\") : f[s](\"sm-n900\") >= 0 ? (t = 5.7, e = \"Note 3\") : f[s](\"sm-n910\") >= 0 ? (t = 5.7, e = \"Note 4\") : f[s](\"gt-i930\") >= 0 || f[s](sn) >= 0 ? (t = 4.7, e = \"Galaxy S3\") : f[s](\"gt-i950\") >= 0 || f[s](sn) >= 0 ? (t = 5, e = \"Galaxy S4\") : f[s](\"sm-g900\") >= 0 || f[s](\"sc-04f\") >= 0 || f[s](\"scl23\") >= 0 ? (t = 5.1, e = \"Galaxy S5\") : f[s](\"sm-g920\") >= 0 || f[s](\"sm-g925\") >= 0 ? (t = 5.1, e = \"Galaxy S6\") : f[s](\"lg-d85\") >= 0 || f[s](\"vs985\") >= 0 || f[s](\"lgls990\") >= 0 || f[s](\"lgus990\") >= 0 ? (t = 5.5, e = \"LG G3\") : f[s](\"lg-h810\") >= 0 || f[s](\"lg-h815\") >= 0 || f[s](\"lgls991\") >= 0 ? (t = 5.5, e = \"LG G4\") : f[s](\"xt1068\") >= 0 || f[s](\"xt1069\") >= 0 || f[s](\"xt1063\") >= 0 ? (t = 5.5, e = \"Moto G 2g\") : f[s](\"xt1058\") >= 0 ? (t = 5.2, e = \"Moto X 2g\") : f[s](\"d6653\") >= 0 || f[s](\"d6603\") >= 0 ? (t = 5.2, e = \"Xperia Z3\") : f[s](\"xperia z4\") >= 0 ? (t = 5.5, e = \"Xperia Z4\") : f[s](\"htc_p4550\") >= 0 || f[s](\"htc6525lv\") >= 0 || f[s](\"htc_pn071\") >= 0 ? (t = 5, e = \"One M8\") : f[s](\"nexus 4\") >= 0 ? (t = 4.7, e = \"Nexus 4\") : f[s](\"nexus 5\") >= 0 ? (t = 5, e = \"Nexus 5\") : f[s](\"nexus 6\") >= 0 ? (t = 6, e = \"Nexus 6\") : f[s](\"lumia 930\") >= 0 && (t = 5, e = \"Lumia 930\")\n }\n t == 0 && (xn[J](Nn[Nt], Nn), t = 5);\n var l = Math[Bt](t * t / (1 + r / i * (r / i))) * 25.4, h = l * r / i;\n return qr = {\n screendiagonal_inch: t,\n screenwidth_mm: l,\n screenheight_mm: h,\n screenwidth_px: i * o,\n screenheight_px: r * o,\n devicename: e,\n best_res: n\n }, qr\n }\n\n function Ur() {\n Fn < 1 ? Fn = 1 : Fn > 179.9 && (Fn = 179.9), In < 0 ? In = 0 : In > 5 && (In = 5);\n var e = qn[mn](\"|\"), t;\n for (t = 0; t < 4; t++) {\n var n = Number(e[t]);\n isNaN(n) && (n = t == 0 ? 1 : 0), Rn[t] = n\n }\n Un = Rn[0] != 1 || Rn[1] != 0 || Rn[2] != 0 || Rn[3] != 0, or[a] && (tr || rr) && (zr(0, 0), Ko(r))\n }\n\n function zr(e, n) {\n var i = Rr(), s = 0, o = 0, u = xn.webGL.canvas;\n if (u) {\n var a = Number(xn[m].framebufferscale);\n s = u[Y], o = u[N], !isNaN(a) && a != 0 && (s /= a, o /= a)\n }\n if (e <= 0 || n <= 0)e = s, n = o;\n var f = Fn, l = In;\n f = Math.tan(f * .5 * br), l = Math.exp(l) - 1;\n var c = Math.atan(f) * 2 / 2, h = l * 1e3, p = 1e3, d = p * Math.sin(c), v = p * Math.cos(c), g = 2 * Math.atan(d / (h + v));\n f = Math.tan(g / 2);\n var y = l, b = Hn;\n b /= jn;\n var w = i.screenwidth_mm, E = i.screenheight_mm;\n if (Bn > 0) {\n var S = Math.min(screen[Y], screen[N]), x = Math.max(screen[Y], screen[N]);\n w = Math[Bt](Bn * Bn / (1 + S / x * (S / x))) * 25.4, E = w * S / x\n }\n var T = w / 2 - b, C = 2 * (T / w), k = e, L = n, A = i.screenwidth_px, O = i.screenheight_px, M = r;\n if (nr || Tn.tablet || n > e)M = t;\n k <= 0 && (k = s), L <= 0 && (L = o);\n var _ = E / 70.9, D = f;\n D *= _, hr = _ / .69, M && (D *= L / O, C = 2 * (w * (k / A) / 2 - b) / (w * (k / A)));\n var P = 2 * Math.atan(D) * wr;\n pr = P, dr = y, vr = C, Wr()\n }\n\n function Wr() {\n var e = xn[p];\n pr > 0 && (e[X] = dr, e.fov = pr, e[ft] = pr, e[ht] = pr, e[d] = 0, e[G] = \"VFOV\", e[x] = r, e[b] = 0, e[T] = \"off\", xn[m][j] = vr)\n }\n\n function Xr() {\n return Tn[E] && kr && kr.deviceName ? kr.deviceName : (Rr(), qr ? qr[Gt] : \"\")\n }\n\n function Vr() {\n return qr ? qr.screendiagonal_inch : 0\n }\n\n function $r(e) {\n if ((\"\" + e)[c]() == pt)Bn = 0, Ur(); else {\n var t = parseFloat(e);\n if (isNaN(t) || t <= 0)t = 0;\n Bn = t, Ur()\n }\n }\n\n function Jr() {\n var e = Bn;\n return e <= 0 ? pt : e\n }\n\n function Kr() {\n return Tn[_] ? xn[m].viewerlayer : xn.webGL.canvas\n }\n\n function Qr() {\n xn.trace(0, \"update - stereo=\" + xn[m][Ct]), or[a] && (tr || rr) && (zr(0, 0), Ko(r))\n }\n\n function Gr() {\n if (er && Zn == t)if (tr == t) {\n var e = Kr();\n Sn[u](Tn[w][k][Yt], li), or[a] = r, Ir(r), ur = r, rr = t, Xn == t && Tn[_] && (rr = r), rr && (ur = t), e[Tn[w][k].requestfullscreen]({\n vrDisplay: kr,\n vrDistortion: ur\n }), Tn[at] && ei(xn[p][V]), ur == t && zr()\n } else {\n Sn[u](Tn[w][k][Yt], li), or[a] = r, Ir(r);\n if (Tn[at] || Tn.tablet)ar == 1 ? window[u](f, Mi, r) : ar == 2 && window[u](h, Bs, r);\n nr == t && Tn[w][k].touch && xn[y][$t][u](Tn[w][k][Kt], ni, t)\n }\n }\n\n function Yr() {\n or[a] = t, xn.get(yt) && xn.set(yt, t), window[o](f, Mi, r), window[o](h, Bs, r), Tn[w][k].touch && xn[y][$t][o](Tn[w][k][Kt], ni, t), Ir(t), xn[p].haschanged = r\n }\n\n function Zr() {\n er && (Zn ? Yr() : Gr())\n }\n\n function ei(e) {\n e === undefined ? e = 0 : (e = Number(e), isNaN(e) && (e = 0));\n var t = xn[p][V];\n if (Lr) {\n try {\n Lr.resetSensor !== undefined && Lr.resetSensor()\n } catch (n) {\n }\n try {\n Lr.zeroSensor !== undefined && Lr.zeroSensor()\n } catch (n) {\n }\n t = 0, cr = 0\n }\n nr && (xn[p][V] = e), cr = cr - t + e, ci = 0\n }\n\n function ni(e) {\n var i = t;\n if (Mn == t)i = r; else {\n var s = xn[y].getMousePos(e[fn] ? e[fn][0] : e);\n s.x /= xn.stagescale, s.y /= xn.stagescale;\n if (e.type == Tn[w][k][Kt])ti == n ? (ti = s, xn[y][$t][u](Tn[w][k][un], ni, r), xn[y][$t][u](Tn[w][k][gn], ni, r)) : i = r; else if (e.type == Tn[w][k][gn])i = r; else if (e.type == Tn[w][k][un] && ti) {\n var a = ti.x, f = s.x;\n if (xn[m][Ct]) {\n var l = xn.stagewidth * .5;\n (a >= l || f >= l) && (a < l || f < l) && (f = a)\n }\n var c = xn[cn](a, ti.y, t), h = xn[cn](f, s.y, t), p = h.x - c.x;\n ti = s, cr -= p\n }\n }\n i && (ti = n, xn[y][$t][o](Tn[w][k][un], ni, r), xn[y][$t][o](Tn[w][k][gn], ni, r))\n }\n\n function ri() {\n if (An == t)xn[W] = -1, xn[D] = t; else if (xn.image.type == \"cube\" && xn.image.multires) {\n var e = Rr().best_res, n = 0, s = -1, o = 0, u = xn.image.level.getArray(), a = u[kt];\n if (a > 0)for (i = 0; i < a; i++) {\n var f = u[i].tiledimagewidth, l = Math.abs(f - e);\n if (s == -1 || l < s)n = f, s = l, o = i\n }\n if (s > 0) {\n xn[W] = o, xn[D] = r;\n if (n > 0) {\n var c = 4 + 8 * (n * n * 6 + 1048575 >> 20);\n c > xn.memory[en] && (xn.memory[en] = c)\n }\n }\n }\n }\n\n function ii() {\n or[a] && ri()\n }\n\n function si() {\n ii(), Ur()\n }\n\n function ui() {\n fr = 0, ki.t = 0, Li.t = 0, yo(), So = 0, go = t, Ls = n\n }\n\n function fi(e) {\n ai == 1 ? (yr.apply(document), ai = 0) : (gr.apply(Kr()), ai = 1)\n }\n\n function li(e) {\n var n = Kr(), i = !!(Sn[Jt] || Sn[Mt] || Sn[zt] || Sn[gt] || Sn[qt]);\n if (i && or[a]) {\n try {\n Tn[E] && mr && (gr.apply(n), nr && (ai = 1, xn[y][$t][u](nn, fi, t)))\n } catch (s) {\n }\n Tn[E] && n[u](rn, hi, t)\n } else window[o](f, Mi, r), window[o](h, Bs, r), n[o](rn, hi, t), xn[y][$t][o](nn, fi, t), or[a] = t, Ir(t)\n }\n\n function hi(e) {\n var t = Kr();\n if (Sn.pointerLockElement === t || Sn.mozPointerLockElement === t) {\n var n = e.movementX || e.mozMovementX, r = e.movementY || e.mozMovementY;\n if (!isNaN(n)) {\n ci += n * kn;\n while (ci < 0)ci += Math.PI * 2;\n while (ci >= Math.PI * 2)ci -= Math.PI * 2\n } else n = 0;\n nr && (isNaN(r) && (r = 0), xn[p][V] += n * kn * wr, xn[p][jt] = Math.max(Math.min(xn[p][jt] + r * kn * wr, 120), -120))\n }\n }\n\n function pi(e, t, n, r) {\n this.x = e, this.y = t, this.z = n, this.w = r\n }\n\n function di(e) {\n var t = Math[Bt](e.x * e.x + e.y * e.y + e.z * e.z + e.w * e.w);\n t === 0 ? (e.x = e.y = e.z = 0, e.w = 1) : (t = 1 / t, e.x *= t, e.y *= t, e.z *= t, e.w *= t)\n }\n\n function vi(e) {\n e.x *= -1, e.y *= -1, e.z *= -1, di(e)\n }\n\n function mi(e, t) {\n return e.x * t.x + e.y * t.y + e.z * t.z + e.w * t.w\n }\n\n function gi(e) {\n return Math[Bt](e.x * e.x + e.y * e.y + e.z * e.z + e.w * e.w)\n }\n\n function yi(e, t) {\n var n = e.x, r = e.y, i = e.z, s = e.w, o = t.x, u = t.y, a = t.z, f = t.w;\n e.x = n * f + s * o + r * a - i * u, e.y = r * f + s * u + i * o - n * a, e.z = i * f + s * a + n * u - r * o, e.w = s * f - n * o - r * u - i * a\n }\n\n function bi(e, t) {\n var n = t.x, r = t.y, i = t.z, s = t.w, o = e.x, u = e.y, a = e.z, f = e.w;\n e.x = n * f + s * o + r * a - i * u, e.y = r * f + s * u + i * o - n * a, e.z = i * f + s * a + n * u - r * o, e.w = s * f - n * o - r * u - i * a\n }\n\n function wi(e, t, n) {\n var r = e.x, i = e.y, s = e.z, o = e.w, u = r * t.x + i * t.y + s * t.z + o * t.w;\n u < 0 ? (u = -u, e.x = -t.x, e.y = -t.y, e.z = -t.z, e.w = -t.w) : (e.x = t.x, e.y = t.y, e.z = t.z, e.w = t.w);\n if (u >= 1) {\n e.w = o, e.x = r, e.y = i, e.z = s;\n return\n }\n var a = Math.acos(u), f = Math[Bt](1 - u * u);\n if (Math.abs(f) < .001) {\n e.w = .5 * (o + e.w), e.x = .5 * (r + e.x), e.y = .5 * (i + e.y), e.z = .5 * (s + e.z);\n return\n }\n var l = Math.sin((1 - n) * a) / f, c = Math.sin(n * a) / f;\n e.w = o * l + e.w * c, e.x = r * l + e.x * c, e.y = i * l + e.y * c, e.z = s * l + e.z * c\n }\n\n function Ei(e, t, n) {\n var r = n / 2, i = Math.sin(r);\n e.x = t.x * i, e.y = t.y * i, e.z = t.z * i, e.w = Math.cos(r)\n }\n\n function Si(e, t, n, r, i) {\n var s = Math.cos(t / 2), o = Math.cos(n / 2), u = Math.cos(r / 2), a = Math.sin(t / 2), f = Math.sin(n / 2), l = Math.sin(r / 2);\n return i === \"XYZ\" ? (e.x = a * o * u + s * f * l, e.y = s * f * u - a * o * l, e.z = s * o * l + a * f * u, e.w = s * o * u - a * f * l) : i === Wt ? (e.x = a * o * u + s * f * l, e.y = s * f * u - a * o * l, e.z = s * o * l - a * f * u, e.w = s * o * u + a * f * l) : i === \"ZXY\" ? (e.x = a * o * u - s * f * l, e.y = s * f * u + a * o * l, e.z = s * o * l + a * f * u, e.w = s * o * u - a * f * l) : i === \"ZYX\" ? (e.x = a * o * u - s * f * l, e.y = s * f * u + a * o * l, e.z = s * o * l - a * f * u, e.w = s * o * u + a * f * l) : i === \"YZX\" ? (e.x = a * o * u + s * f * l, e.y = s * f * u + a * o * l, e.z = s * o * l - a * f * u, e.w = s * o * u - a * f * l) : i === \"XZY\" && (e.x = a * o * u - s * f * l, e.y = s * f * u - a * o * l, e.z = s * o * l + a * f * u, e.w = s * o * u + a * f * l), e\n }\n\n function xi(e, t, n) {\n var r, i, s, o, u, a, f, l, c, h, p, d;\n i = t.x, s = t.y, o = t.z, u = Math[Bt](i * i + s * s + o * o), u > 0 && (i /= u, s /= u, o /= u), a = n.x, f = n.y, l = n.z, c = Math[Bt](a * a + f * f + l * l), c > 0 && (a /= c, f /= c, l /= c), r = i * a + s * f + o * l + 1, r < 1e-6 ? (r = 0, Math.abs(i) > Math.abs(o) ? (h = -s, p = i, d = 0) : (h = 0, p = -o, d = s)) : (h = s * l - o * f, p = o * a - i * l, d = i * f - s * a), e.x = h, e.y = p, e.z = d, e.w = r, di(e)\n }\n\n function Ti(e, t, n) {\n function r(e, t, n) {\n return e < t ? t : e > n ? n : e\n }\n\n if (!t || isNaN(t.x) || isNaN(t.y) || isNaN(t.z) || isNaN(t.w))return;\n var i = t.x * t.x, s = t.y * t.y, o = t.z * t.z, u = t.w * t.w;\n if (n === \"XYZ\")e[0] = Math[tt](2 * (t.x * t.w - t.y * t.z), u - i - s + o), e[1] = Math.asin(r(2 * (t.x * t.z + t.y * t.w), -1, 1)), e[2] = Math[tt](2 * (t.z * t.w - t.x * t.y), u + i - s - o); else if (n === Wt)e[0] = Math.asin(r(2 * (t.x * t.w - t.y * t.z), -1, 1)), e[1] = Math[tt](2 * (t.x * t.z + t.y * t.w), u - i - s + o), e[2] = Math[tt](2 * (t.x * t.y + t.z * t.w), u - i + s - o); else if (n === \"ZXY\")e[0] = Math.asin(r(2 * (t.x * t.w + t.y * t.z), -1, 1)), e[1] = Math[tt](2 * (t.y * t.w - t.z * t.x), u - i - s + o), e[2] = Math[tt](2 * (t.z * t.w - t.x * t.y), u - i + s - o); else if (n === \"ZYX\")e[0] = Math[tt](2 * (t.x * t.w + t.z * t.y), u - i - s + o), e[1] = Math.asin(r(2 * (t.y * t.w - t.x * t.z), -1, 1)), e[2] = Math[tt](2 * (t.x * t.y + t.z * t.w), u + i - s - o); else if (n === \"YZX\")e[0] = Math[tt](2 * (t.x * t.w - t.z * t.y), u - i + s - o), e[1] = Math[tt](2 * (t.y * t.w - t.x * t.z), u + i - s - o), e[2] = Math.asin(r(2 * (t.x * t.y + t.z * t.w), -1, 1)); else {\n if (n !== \"XZY\")return;\n e[0] = Math[tt](2 * (t.x * t.w + t.y * t.z), u - i + s - o), e[1] = Math[tt](2 * (t.x * t.z + t.y * t.w), u + i - s - o), e[2] = Math.asin(r(2 * (t.z * t.w - t.x * t.y), -1, 1))\n }\n }\n\n function Ni(e, t) {\n var r, i, s, o;\n e == n ? (r = Math.tan(50 * br), i = Math.tan(50 * br), s = Math.tan(45 * br), o = Math.tan(45 * br)) : (r = Math.tan(e.upDegrees * br), i = Math.tan(e.downDegrees * br), s = Math.tan(e.leftDegrees * br), o = Math.tan(e.rightDegrees * br));\n var u = 2 / (s + o), a = 2 / (r + i);\n t[0] = u, t[1] = 0, t[2] = 0, t[3] = 0, t[4] = 0, t[5] = -a, t[6] = 0, t[7] = 0, t[8] = (s - o) * u * .5, t[9] = -((r - i) * a * .5), t[10] = 65535 / 65536, t[11] = 1, t[12] = 0, t[13] = 0, t[14] = 65535 / 65536 - 1, t[15] = 1\n }\n\n function Ci() {\n var e = Number.NaN, t = screen[Y] > screen[N], n = screen[st] || screen.msOrientation || screen.mozOrientation;\n if (n) {\n n = (\"\" + n)[c]();\n var r = n[s](\"portrait\") >= 0, i = n[s](\"landscape\") >= 0, o = n[s](\"primary\") >= 0, u = n[s](\"secondary\") >= 0;\n r && o ? e = 0 : i && o ? e = 90 : i && u ? e = -90 : r && u && (e = 180), !isNaN(e) && !Tn[at] && (e -= 90)\n }\n return isNaN(e) && (e = xn._have_top_access ? top[st] : window[st]), isNaN(e) && (Tn[at] ? e = t ? 90 : 0 : e = t ? 0 : 90), Tn.tablet && Tn[Ht] && (e += 90), e\n }\n\n function Mi(e) {\n if (!or[a])return;\n var t = xn[B], r = t - Hs;\n Hs = t;\n var i = Ci() * br, s = e.alpha * br, o = e.beta * br, u = e.gamma * br;\n Oi === n && (Oi = s), s = s - Oi + Math.PI;\n var f = Math.cos(s), l = Math.sin(s), c = Math.cos(o), h = Math.sin(o), p = Math.cos(u), d = Math.sin(u);\n s = Math[tt](-l * h * p - f * d, l * d - f * h * p), o = -Math.asin(c * p), u = Math[tt](c * d, -h) - Math.PI, ki.q.x = Li.q.x, ki.q.y = Li.q.y, ki.q.z = Li.q.z, ki.q.w = Li.q.w, ki.t = Li.t;\n var v = Li.q;\n Li.t = t, fr++, Si(v, o, s + i, u - i, Wt)\n }\n\n function _i() {\n if (or[a]) {\n xn[p][g] = r;\n var e = [0, 0, 0];\n if (Lr) {\n Hr = Lr.getState();\n if (Hr) {\n rr && Wr();\n if (Ln) {\n var t = Hr.position;\n if (t) {\n ci = 0;\n var i = 400;\n xn[p].tx = t.x * i, xn[p].ty = t.y * i, xn[p].tz = t.z * i\n }\n }\n Ti(e, Hr[st], Wt);\n var s = 0;\n Tn[_] && (s = Ci()), s += cr, xn[p][V] = (-e[1] + ci) * wr + s, xn[p][jt] = -e[0] * wr, xn[p][an] = -e[2] * wr\n }\n } else if (tr) {\n Wr();\n if (fr > lr) {\n var o = n;\n if ($n == 0)o = Li.q; else if (($n == 4 || $n >= 6) && ar == 2)o = Li.q, Ds(o); else if ($n <= 3 || $n == 5 || ar == 1)if (ki.t > 0 && Li.t > 0) {\n var u = xn[B], f = Li.t - ki.t, l = 0, c = 0, h = 1;\n $n == 1 || $n == 2 ? l = u - Li.t : (l = u - ki.t, h = 2), f <= 0 ? c = 1 : (c = l / f, c > h && (c = h)), Ai.x = ki.q.x, Ai.y = ki.q.y, Ai.z = ki.q.z, Ai.w = ki.q.w, wi(Ai, Li.q, c), o = Ai\n }\n if (o) {\n Ti(e, o, Wt);\n var s = Ci();\n xn[p][V] = cr + (-e[1] + ci) * wr + s, xn[p][jt] = -e[0] * wr, xn[p][an] = -e[2] * wr\n }\n }\n }\n }\n }\n\n function Di(e, n) {\n tr == t && ur == r && Ni(e == 1 ? Mr : _r, n)\n }\n\n function Pi(e) {\n var t = 0;\n return e == 1 ? Ar && Ar.x ? t = Ar.x : t = -0.03 : e == 2 && (Or && Or.x ? t = Or.x : t = .03), t *= 320 / Cn, t\n }\n\n function Hi(e, i) {\n var s = !!(Sn[Jt] || Sn[Mt] || Sn[zt] || Sn[gt] || Sn[qt]);\n if (or[a] && s && tr == t && ur == r) {\n var o = 0, u = 0;\n if (Dr)o = Dr[lt][Y] + Pr[lt][Y], u = Math.max(Dr[lt][N], Pr[lt][N]); else if (S in kr) {\n var f = kr[S](mt), l = kr[S](Tt);\n o = f[Y] + l[Y], u = Math.max(f[N], l[N])\n } else if (H in kr) {\n var c = kr[H]();\n o = c[Y], u = c[N]\n } else z in kr ? (o = kr[z][Y], u = kr[z][N]) : (o = 2e3, u = 1056);\n if (o > 0 && u > 0) {\n var h = 1;\n return o *= h, u *= h, {w: o, h: u}\n }\n } else or[a] && (tr || ur == t) && zr(e, i);\n return n\n }\n\n function Bi(e) {\n var e = (\"\" + e)[c](), i = e[s](dn), o = e.lastIndexOf(\"]\");\n if (i >= 0 && o > i) {\n var u = e[It](i + 8, o), a = dn + u + \"]\";\n a != Jn && (Jn = a, Qn && (ji(Qn, t), Qn = n), Qn = xn.get(Jn), Qn && ji(Qn, r))\n }\n }\n\n function ji(e, i) {\n if (i == r)e[Vt] = {\n visible: e[Ft],\n enabled: e[a],\n flying: e.flying,\n scaleflying: e[ot],\n distorted: e[xt],\n zorder: e.zorder,\n scale: e.scale,\n depth: e.depth,\n onover: e.onover,\n onout: e.onout\n }, e[a] = t, e.flying = 1, e[ot] = t, e[xt] = r, e.zorder = 999999999; else {\n var s = e[Vt];\n s && (e[Ft] = s[Ft], e[a] = s[a], e.flying = s.flying, e[ot] = s[ot], e[xt] = s[xt], e.zorder = s.zorder, e.scale = s.scale, e.depth = s.depth, e.onover = s.onover, e.onout = s.onout, e[Vt] = s = n)\n }\n }\n\n function Fi() {\n if (Jn) {\n var e = Qn;\n e == n && (e = xn.get(Jn), e && (ji(e, r), Qn = e));\n if (e) {\n if (!or[a])return e[Ft] = t, n;\n e.onover = Gn, e.onout = Yn, e[a] = Kn, e[Ft] = r\n }\n return e\n }\n return n\n }\n\n function Ii() {\n this.x = 0, this.y = 0, this.z = 0\n }\n\n function qi(e, t, n, r) {\n e.x = t, e.y = n, e.z = r\n }\n\n function Ri(e, t) {\n e.x = t.x, e.y = t.y, e.z = t.z\n }\n\n function Ui(e) {\n e.x = 0, e.y = 0, e.z = 0\n }\n\n function zi(e, t, n) {\n t == 0 ? e.x = n : t == 1 ? e.y = n : e.z = n\n }\n\n function Wi(e) {\n return Math[Bt](e.x * e.x + e.y * e.y + e.z * e.z)\n }\n\n function Xi(e) {\n var t = Wi(e);\n t > 0 ? Vi(e, 1 / t) : (e.x = 0, e.y = 0, e.z = 0)\n }\n\n function Vi(e, t) {\n e.x *= t, e.y *= t, e.z *= t\n }\n\n function $i(e, t, n) {\n qi(n, e.x - t.x, e.y - t.y, e.z - t.z)\n }\n\n function Ji(e, t, n) {\n qi(n, e.y * t.z - e.z * t.y, e.z * t.x - e.x * t.z, e.x * t.y - e.y * t.x)\n }\n\n function Ki(e, t) {\n return e.x * t.x + e.y * t.y + e.z * t.z\n }\n\n function Qi() {\n var e;\n return typeof Float64Array != \"undefined\" ? e = new Float64Array(9) : e = new Array(9), Yi(e), e\n }\n\n function Gi(e) {\n e[0] = e[1] = e[2] = e[3] = e[4] = e[5] = e[6] = e[7] = e[8] = 0\n }\n\n function Yi(e) {\n e[0] = e[4] = e[8] = 1, e[1] = e[2] = e[3] = e[5] = e[6] = e[7] = 0\n }\n\n function Zi(e, t) {\n e[0] = e[4] = e[8] = t\n }\n\n function es(e, t) {\n e[0] *= t, e[1] *= t, e[2] *= t, e[3] *= t, e[4] *= t, e[5] *= t, e[6] *= t, e[7] *= t, e[8] *= t\n }\n\n function ts(e, t) {\n var n = e[1], r = e[2], i = e[5];\n t[0] = e[0], t[1] = e[3], t[2] = e[6], t[3] = n, t[4] = e[4], t[5] = e[7], t[6] = r, t[7] = i, t[8] = e[8]\n }\n\n function ns(e, t, n) {\n e[t] = n.x, e[t + 3] = n.y, e[t + 6] = n.z\n }\n\n function rs(e, t) {\n e[0] = t[0], e[1] = t[1], e[2] = t[2], e[3] = t[3], e[4] = t[4], e[5] = t[5], e[6] = t[6], e[7] = t[7], e[8] = t[8]\n }\n\n function is(e, t) {\n var n = e[0] * (e[4] * e[8] - e[7] * e[5]) - e[1] * (e[3] * e[8] - e[5] * e[6]) + e[2] * (e[3] * e[7] - e[4] * e[6]);\n n != 0 && (n = 1 / n, t[0] = (e[4] * e[8] - e[7] * e[5]) * n, t[1] = -(e[1] * e[8] - e[2] * e[7]) * n, t[2] = (e[1] * e[5] - e[2] * e[4]) * n, t[3] = -(e[3] * e[8] - e[5] * e[6]) * n, t[4] = (e[0] * e[8] - e[2] * e[6]) * n, t[5] = -(e[0] * e[5] - e[3] * e[2]) * n, t[6] = (e[3] * e[7] - e[6] * e[4]) * n, t[7] = -(e[0] * e[7] - e[6] * e[1]) * n, t[8] = (e[0] * e[4] - e[3] * e[1]) * n)\n }\n\n function ss(e, t) {\n e[0] -= t[0], e[1] -= t[1], e[2] -= t[2], e[3] -= t[3], e[4] -= t[4], e[5] -= t[5], e[6] -= t[6], e[7] -= t[7], e[8] -= t[8]\n }\n\n function os(e, t) {\n e[0] += t[0], e[1] += t[1], e[2] += t[2], e[3] += t[3], e[4] += t[4], e[5] += t[5], e[6] += t[6], e[7] += t[7], e[8] += t[8]\n }\n\n function us(e, t, n) {\n var r = t[0], i = t[1], s = t[2], o = t[3], u = t[4], a = t[5], f = t[6], l = t[7], c = t[8], h = e[0], p = e[1], d = e[2];\n n[0] = h * r + p * o + d * f, n[1] = h * i + p * u + d * l, n[2] = h * s + p * a + d * c, h = e[3], p = e[4], d = e[5], n[3] = h * r + p * o + d * f, n[4] = h * i + p * u + d * l, n[5] = h * s + p * a + d * c, h = e[6], p = e[7], d = e[8], n[6] = h * r + p * o + d * f, n[7] = h * i + p * u + d * l, n[8] = h * s + p * a + d * c\n }\n\n function as(e, t, n) {\n var r = e[0] * t.x + e[1] * t.y + e[2] * t.z, i = e[3] * t.x + e[4] * t.y + e[5] * t.z, s = e[6] * t.x + e[7] * t.y + e[8] * t.z;\n n.x = r, n.y = i, n.z = s\n }\n\n function fs(e, t, n) {\n n[0] = e[0] + t[0], n[1] = e[1] + t[1], n[2] = e[2] + t[2], n[3] = e[3] + t[3], n[4] = e[4] + t[4], n[5] = e[5] + t[5], n[6] = e[6] + t[6], n[7] = e[7] + t[7], n[8] = e[8] + t[8]\n }\n\n function bs(e, t, n) {\n Ji(e, t, cs);\n if (Wi(cs) == 0)Yi(n); else {\n Ri(hs, e), Ri(ps, t), Xi(cs), Xi(hs), Xi(ps);\n var r = vs, i = ms;\n Ji(cs, hs, ls), r[0] = hs.x, r[1] = hs.y, r[2] = hs.z, r[3] = cs.x, r[4] = cs.y, r[5] = cs.z, r[6] = ls.x, r[7] = ls.y, r[8] = ls.z, Ji(cs, ps, ls), i[0] = ps.x, i[3] = ps.y, i[6] = ps.z, i[1] = cs.x, i[4] = cs.y, i[7] = cs.z, i[2] = ls.x, i[5] = ls.y, i[8] = ls.z, us(i, r, n)\n }\n }\n\n function ws(e, t) {\n var n = Ki(e, e), r = Math[Bt](n), i, s;\n if (n < 1e-8)i = 1 - 1 / 6 * n, s = .5; else if (n < 1e-6)s = .5 - .25 * (1 / 6) * n, i = 1 - n * (1 / 6) * (1 - .05 * n); else {\n var o = 1 / r;\n i = Math.sin(r) * o, s = (1 - Math.cos(r)) * o * o\n }\n Ss(e, i, s, t)\n }\n\n function Es(e, t) {\n var n = (e[0] + e[4] + e[8] - 1) * .5;\n qi(t, (e[7] - e[5]) / 2, (e[2] - e[6]) / 2, (e[3] - e[1]) / 2);\n var r = Wi(t);\n if (n > Math.SQRT1_2)r > 0 && Vi(t, Math.asin(r) / r); else if (n > -Math.SQRT1_2) {\n var i = Math.acos(n);\n Vi(t, i / r)\n } else {\n var i = Math.PI - Math.asin(r), s = e[0] - n, o = e[4] - n, u = e[8] - n, a = gs;\n s * s > o * o && s * s > u * u ? qi(a, s, (e[3] + e[1]) / 2, (e[2] + e[6]) / 2) : o * o > u * u ? qi(a, (e[3] + e[1]) / 2, o, (e[7] + e[5]) / 2) : qi(a, (e[2] + e[6]) / 2, (e[7] + e[5]) / 2, u), Ki(a, t) < 0 && Vi(a, -1), Xi(a), Vi(a, i), Ri(t, a)\n }\n }\n\n function Ss(e, t, n, r) {\n var i = e.x * e.x, s = e.y * e.y, o = e.z * e.z;\n r[0] = 1 - n * (s + o), r[4] = 1 - n * (i + o), r[8] = 1 - n * (i + s);\n var u = t * e.z, a = n * e.x * e.y;\n r[1] = a - u, r[3] = a + u, u = t * e.y, a = n * e.x * e.z, r[2] = a + u, r[6] = a - u, u = t * e.x, a = n * e.y * e.z, r[5] = a - u, r[7] = a + u\n }\n\n function xs(e, t, n, r) {\n t *= br, n *= br, r *= br;\n var i = Math.cos(t), s = Math.sin(t), o = Math.cos(n), u = Math.sin(n), a = Math.cos(r), f = Math.sin(r), l = i * u, c = s * u;\n e[0] = o * a, e[1] = l * a + i * f, e[2] = -c * a + s * f, e[3] = -o * f, e[4] = -l * f + i * a, e[5] = c * f + s * a, e[6] = u, e[7] = -s * o, e[8] = i * o\n }\n\n function Ts(e, t) {\n var n = e[0] + e[4] + e[8], r;\n n > 0 ? (r = Math[Bt](1 + n) * 2, t.x = (e[5] - e[7]) / r, t.y = (e[6] - e[2]) / r, t.z = (e[1] - e[3]) / r, t.w = .25 * r) : e[0] > e[4] && e[0] > e[8] ? (r = Math[Bt](1 + e[0] - e[4] - e[8]) * 2, t.x = .25 * r, t.y = (e[3] + e[1]) / r, t.z = (e[6] + e[2]) / r, t.w = (e[5] - e[7]) / r) : e[4] > e[8] ? (r = Math[Bt](1 + e[4] - e[0] - e[8]) * 2, t.x = (e[3] + e[1]) / r, t.y = .25 * r, t.z = (e[7] + e[5]) / r, t.w = (e[6] - e[2]) / r) : (r = Math[Bt](1 + e[8] - e[0] - e[4]) * 2, t.x = (e[6] + e[2]) / r, t.y = (e[7] + e[5]) / r, t.z = .25 * r, t.w = (e[1] - e[3]) / r)\n }\n\n function Ds(e) {\n if (js) {\n var t = Ci();\n t != Ls && (Ls = t, xs(Os, 0, 0, -t), xs(As, -90, 0, +t));\n var n;\n if ($n <= 1 || $n == 3)n = To(); else {\n var r = xn[B], i = (r - Ns) / 1e3, s = i;\n $n == 2 ? s += 2 / 60 : $n == 6 ? s += 1 / 60 : $n == 7 && (s += 2 / 60), n = Lo(s)\n }\n us(Os, n, _s), us(_s, As, Ms), Ts(Ms, e)\n }\n }\n\n function Bs(e) {\n if (!or[a])return;\n var i = xn[B], s = i - Hs;\n Hs = i, s > 5e3 && (ui(), s = .16), fr++;\n if (fr < lr)return;\n go == t && (go = r, yo());\n var o = e[K], u = o.x, f = o.y, l = o.z;\n u == n && (u = 0), f == n && (f = 9.81), l == n && (l = 0);\n var c = e.acceleration;\n if (c) {\n var h = c.x, p = c.y, d = c.z;\n h == n && (h = 0), p == n && (p = 0), d == n && (d = 0), u -= h, f -= p, l -= d\n }\n if (Tn.ios || Tn.ie)u *= -1, f *= -1, l *= -1;\n var v = e.rotationRate, m = v.alpha, g = v.beta, y = v.gamma;\n m == n && (m = 0), g == n && (g = 0), y == n && (y = 0);\n if (Tn.ios || Tn[Ht] || Tn.ie) {\n m *= br, g *= br, y *= br;\n if (Tn.ie) {\n var b = m, w = g, E = y;\n m = w, g = E, y = b\n }\n }\n Uo ? Jo(s, m, g, y) : Pn && Ps(m, g, y, i);\n var S = zo;\n m -= S.rx, g -= S.ry, y -= S.rz, qi(Cs, u, f, l), Eo(Cs, s), Ns = i, qi(ks, m, g, y), xo(ks, i);\n if ($n <= 3 || $n == 5)ki.q.x = Li.q.x, ki.q.y = Li.q.y, ki.q.z = Li.q.z, ki.q.w = Li.q.w, ki.t = Li.t, Ds(Li.q), Li.t = i\n }\n\n function yo() {\n Yi(Qs), Yi(Gs), Gi(Zs), Zi(Zs, ho), Gi(Ys), Zi(Ys, 1), Gi(ro), Zi(ro, po), Gi(to), Gi(eo), Gi(no), Ui(Ws), Ui(Us), Ui(Rs), Ui(zs), Ui(qs), qi(Is, 0, 0, vo), js = t\n }\n\n function bo(e, t) {\n as(e, Is, Rs), bs(Rs, Us, co), Es(co, t)\n }\n\n function wo() {\n ts(Gs, fo), us(Zs, fo, lo), us(Gs, lo, Zs), Yi(Gs)\n }\n\n function Eo(e, t) {\n Ri(Us, e);\n if (js) {\n bo(Qs, Ws), t < 5 && (t = 5);\n var n = 1e3 / 60 / t, i = mo * n, s = 1 / mo, o = Xs;\n for (var u = 0; u < 3; u++)Ui(o), zi(o, u, s), ws(o, io), us(io, Qs, so), bo(so, Vs), $i(Ws, Vs, $s), Vi($s, i), ns(eo, u, $s);\n ts(eo, oo), us(Zs, oo, uo), us(eo, uo, ao), fs(ao, ro, to), is(to, oo), ts(eo, uo), us(uo, oo, ao), us(Zs, ao, no), as(no, Ws, qs), us(no, eo, oo), Yi(uo), ss(uo, oo), us(uo, Zs, oo), rs(Zs, oo), ws(qs, Gs), us(Gs, Qs, Qs), wo()\n } else bs(Is, Us, Qs), js = r\n }\n\n function xo(e, t) {\n if (So != 0) {\n var n = (t - So) / 1e3;\n n > 1 && (n = 1), Ri(zs, e), Vi(zs, -n), ws(zs, Gs), rs(Js, Qs), us(Gs, Qs, Js), rs(Qs, Js), wo(), rs(Ks, Ys), es(Ks, n * n), os(Zs, Ks)\n }\n So = t, Ri(Fs, e)\n }\n\n function To() {\n return Qs\n }\n\n function Lo(e) {\n var t = No;\n Ri(t, Fs), Vi(t, -e);\n var n = Co;\n ws(t, n);\n var r = ko;\n return us(n, Qs, r), r\n }\n\n function Ho(e) {\n var t = e[s](\"://\");\n if (t > 0) {\n var r = e[s](\"/\", t + 3), i = e[It](0, t)[c](), o = e[It](t + 3, r), u = e[It](r);\n return [i, o, u]\n }\n return n\n }\n \n function local_storage() {\n // krpano WebVR Plugin - cross-domain localstorage - server page\n // - save the WebVR cardboard settings (IPD, screensize, lens-settings, gyro-calibration)\n\n var ls = window.localStorage;\n if (ls)\n {\n if (false) //parent === window\n {\n // direct call - show stored settings\n var vals = ls.getItem(\"krpano.webvr.4\");\n if (!vals) vals = ls.getItem(\"krpano.webvr.3\");\n if (!vals) vals = ls.getItem(\"krpano.webvr.2\");\n if (!vals) vals = ls.getItem(\"krpano.webvr.1\");\n\n if (vals)\n {\n vals = (\"\"+vals).split(\",\")\n if (vals.length >= 6)\n {\n document.body.innerHTML =\n \"<div style='font-family:Arial;font-size:14px;'>\"+\n \"krpano WebVR Settings (v4): \"+\n \"ipd=\"+Number(vals[0]).toFixed(2)+\"mm, \"+\n \"screensize=\"+(vals[1] == 0 ? \"auto\" : Number(vals[1]).toFixed(1)+\" inch\")+\", \"+\n \"fov=\"+Number(vals[2]).toFixed(1)+\", \"+\n \"distortion=\"+Number(vals[3]).toFixed(2)+\", \"+\n \"distortion2=\"+(vals[10] ? vals[10] : \"none\")+\", \"+\n \"ca=\"+(!isNaN(Number(vals[11])) ? Number(vals[11]) : \"0.0\")+\", \"+\n \"vignette=\"+Number(vals[4]).toFixed(1)+\", \"+\n \"sensormode=\"+Number(vals[5]).toFixed(0)+\", \"+\n \"overlap=\"+(vals.length >= 10 ? Number(vals[9]) : 1.0).toFixed(2)+\n (vals.length >= 9 ? \", gyro-calibration=\"+Number(vals[6]).toFixed(4)+\"/\"+Number(vals[7]).toFixed(4)+\"/\"+Number(vals[8]).toFixed(4) : \"\")+\n \"</div>\";\n }\n }\n }\n else\n {\n // handle messages from the parent frame\n window.addEventListener(\"message\", function(event)\n {\n var request = (\"\"+event.data).toLowerCase();\n var vals;\n\n if ( request == \"load.1\" )\n {\n // load.1 => ipd,size,fov,dist,vig,ssm\n vals = ls.getItem(\"krpano.webvr.1\");\n if (vals)\n {\n if ((\"\"+vals).split(\",\").length == 6)\n {\n event.source.postMessage(\"webvr_settings:\"+vals, event.origin);\n }\n }\n }\n else if ( request == \"load.2\" )\n {\n // load.2 => ipd,size,fov,dist,vig,ssm,gyrox,gyroy,gyroz\n vals = ls.getItem(\"krpano.webvr.2\");\n if (vals)\n {\n if ((\"\"+vals).split(\",\").length == 9)\n {\n event.source.postMessage(\"webvr_settings:\"+vals, event.origin);\n }\n }\n else\n {\n // use older version data: load.2 => ipd,size,fov,dist,vig,ssm,0,0,0\n vals = ls.getItem(\"krpano.webvr.1\");\n if (vals && (\"\"+vals).split(\",\").length == 6)\n {\n event.source.postMessage(\"webvr_settings:\"+vals+\",0,0,0\", event.origin);\n }\n }\n }\n else if ( request == \"load.3\" )\n {\n // load.3 => ipd,size,fov,dist,vig,ssm,gyrox,gyroy,gyroz,overlap\n vals = ls.getItem(\"krpano.webvr.3\");\n if (!vals) vals = ls.getItem(\"krpano.webvr.2\");\n if (!vals) vals = ls.getItem(\"krpano.webvr.1\");\n\n if (vals && (\"\"+vals).split(\",\").length >= 6)\n {\n event.source.postMessage(\"webvr_settings:\"+vals, event.origin);\n }\n }\n else if ( request == \"load.4\" )\n {\n // load.4 => ipd,size,fov,dist,vig,ssm,gyrox,gyroy,gyroz,overlap,dist2,ca\n vals = ls.getItem(\"krpano.webvr.4\");\n if (!vals) vals = ls.getItem(\"krpano.webvr.3\");\n if (!vals) vals = ls.getItem(\"krpano.webvr.2\");\n if (!vals) vals = ls.getItem(\"krpano.webvr.1\");\n\n if (vals && (\"\"+vals).split(\",\").length >= 6)\n {\n event.source.postMessage(\"webvr_settings:\"+vals, event.origin);\n }\n }\n else if ( request.slice(0,7) == \"save.1:\" )\n {\n // save.1:ipd,size,fov,dist,vig,ssm\n vals = request.slice(7).split(\",\");\n if (vals.length == 6)\n {\n var ipd = Number(vals[0]);\n var srd = Number(vals[1]);\n var fov = Number(vals[2]);\n var dst = Number(vals[3]);\n var vig = Number(vals[4]);\n var ssm = Number(vals[5]);\n\n // validate values\n if (!isNaN(ipd) && ipd >= 30 && ipd < 90 &&\n !isNaN(srd) && srd >= 0 && srd < 12 &&\n !isNaN(fov) && fov >= 1 && fov < 180 &&\n !isNaN(dst) && dst >= 0 && dst < 10 &&\n !isNaN(vig) && vig >= 1 && vig < 500 &&\n !isNaN(ssm) && ssm >= 0 && ssm < 10\n )\n {\n ls.setItem(\"krpano.webvr.1\", vals.join(\",\"));\n }\n }\n }\n else if ( request.slice(0,7) == \"save.2:\" )\n {\n // save.2:ipd,size,fov,dist,vig,ssm,gyrox,gyroy,gyroz\n vals = request.slice(7).split(\",\");\n if (vals.length == 9)\n {\n var ipd = Number(vals[0]);\n var srd = Number(vals[1]);\n var fov = Number(vals[2]);\n var dst = Number(vals[3]);\n var vig = Number(vals[4]);\n var ssm = Number(vals[5]);\n var grx = Number(vals[6]);\n var gry = Number(vals[7]);\n var grz = Number(vals[8]);\n\n // validate values\n if (!isNaN(ipd) && ipd >= 30 && ipd < 90 &&\n !isNaN(srd) && srd >= 0 && srd < 12 &&\n !isNaN(fov) && fov >= 1 && fov < 180 &&\n !isNaN(dst) && dst >= 0 && dst < 10 &&\n !isNaN(vig) && vig >= 1 && vig < 500 &&\n !isNaN(ssm) && ssm >= 0 && ssm < 10 &&\n !isNaN(grx) && !isNaN(gry) && !isNaN(grz)\n )\n {\n ls.setItem(\"krpano.webvr.2\", vals.join(\",\"));\n\n // save settings also for older versions\n ls.setItem(\"krpano.webvr.1\", vals.slice(0,6).join(\",\"));\n }\n }\n }\n else if ( request.slice(0,7) == \"save.3:\" )\n {\n // save.3:ipd,size,fov,dist,vig,ssm,gyrox,gyroy,gyroz,overlap\n vals = request.slice(7).split(\",\");\n if (vals.length == 10)\n {\n var ipd = Number(vals[0]);\n var srd = Number(vals[1]);\n var fov = Number(vals[2]);\n var dst = Number(vals[3]);\n var vig = Number(vals[4]);\n var ssm = Number(vals[5]);\n var grx = Number(vals[6]);\n var gry = Number(vals[7]);\n var grz = Number(vals[8]);\n var olp = Number(vals[9]);\n\n // validate values\n if (!isNaN(ipd) && ipd >= 30 && ipd < 90 &&\n !isNaN(srd) && srd >= 0 && srd < 12 &&\n !isNaN(fov) && fov >= 1 && fov < 180 &&\n !isNaN(dst) && dst >= 0 && dst < 10 &&\n !isNaN(vig) && vig >= 1 && vig < 500 &&\n !isNaN(ssm) && ssm >= 0 && ssm < 10 &&\n !isNaN(grx) && !isNaN(gry) && !isNaN(grz) &&\n !isNaN(olp) && olp > 0 && olp < 2\n )\n {\n ls.setItem(\"krpano.webvr.3\", vals.join(\",\"));\n\n // save the settings also for older versions\n ls.setItem(\"krpano.webvr.2\", vals.slice(0,9).join(\",\"));\n ls.setItem(\"krpano.webvr.1\", vals.slice(0,6).join(\",\"));\n }\n }\n }\n else if ( request.slice(0,7) == \"save.4:\" )\n {\n // save.4:ipd,size,fov,dist,vig,ssm,gyrox,gyroy,gyroz,overlap,dist2,ca\n vals = request.slice(7).split(\",\");\n if (vals.length == 12)\n {\n var ipd = Number(vals[0]);\n var srd = Number(vals[1]);\n var fov = Number(vals[2]);\n var dst = Number(vals[3]);\n var vig = Number(vals[4]);\n var ssm = Number(vals[5]);\n var grx = Number(vals[6]);\n var gry = Number(vals[7]);\n var grz = Number(vals[8]);\n var olp = Number(vals[9]);\n\n // validate values\n if (!isNaN(ipd) && ipd >= 30 && ipd < 90 &&\n !isNaN(srd) && srd >= 0 && srd < 12 &&\n !isNaN(fov) && fov >= 1 && fov < 180 &&\n !isNaN(dst) && dst >= 0 && dst < 10 &&\n !isNaN(vig) && vig >= 1 && vig < 500 &&\n !isNaN(ssm) && ssm >= 0 && ssm < 10 &&\n !isNaN(grx) && !isNaN(gry) && !isNaN(grz) &&\n !isNaN(olp) && olp > 0 && olp < 2\n )\n {\n ls.setItem(\"krpano.webvr.4\", vals.join(\",\"));\n\n // save the settings also for older versions\n ls.setItem(\"krpano.webvr.3\", vals.slice(0,10).join(\",\"));\n ls.setItem(\"krpano.webvr.2\", vals.slice(0,9).join(\",\"));\n ls.setItem(\"krpano.webvr.1\", vals.slice(0,6).join(\",\"));\n }\n }\n }\n }\n , false);\n }\n }\n }\n\n function Bo(e) {\n if (Mo == n) {\n var i = Ho(Ao), s = Ho(window[wn].href);\n if (s[0] == \"http\" || s[0] == \"https\") {\n _o = s[0] + \"://\" + i[1], Do = _o + i[2];\n var o = document[bn](\"iframe\");\n o.style.cssText = \"position:absolute;width:1px;height:1px;left:-9999px;visibility:hidden;\",\n xn[m].viewerlayer.appendChild(o),\n Mo = o,\n o[u](\"load\", function () {\n Oo = r, e(Mo)\n }, true),\n window[u](\"message\", Fo, true);\n //o.src = Do\n local_storage();\n }\n } else Oo && e(Mo)\n }\n\n function jo(e) {\n Bo(function (t) {\n try {\n t.contentWindow.postMessage(e, _o)\n } catch (n) {\n }\n })\n }\n\n function Fo(e) {\n alert(233);\n if (e.origin == _o) {\n var t = \"\" + e.data;\n t[It](0, 15) == \"webvr_settings:\" && Io(t[It](15))\n }\n }\n\n function Io(e) {\n var t = e[mn](bt), n = Number(t[0]), i = Number(t[1]), s = Number(t[2]), o = Number(t[3]), u = Number(t[4]), a = Number(t[5]), f = Number(t[6]), l = Number(t[7]), c = Number(t[8]), h = Number(t[9]), p = \"\" + t[10], d = Number(t[11]);\n isNaN(f) && (f = 0), isNaN(l) && (l = 0), isNaN(c) && (c = 0), isNaN(h) && (h = 1), isNaN(d) && (d = 0), p[mn](\"|\")[kt] != 4 && (p = Qt), !isNaN(n) && n >= 30 && n < 90 && !isNaN(i) && i >= 0 && i < 12 && !isNaN(s) && s >= 1 && s < 180 && !isNaN(o) && o >= 0 && o < 10 && !isNaN(u) && u >= 1 && u < 500 && !isNaN(a) && a >= 0 && a < 10 && !isNaN(h) && h > 0 && h < 2 && (Hn = n, Bn = i, Fn = s, In = o, Wn = u, $n = a, zo.rx = f, zo.ry = l, zo.rz = c, jn = h, qn = p, zn = d, ir = r)\n }\n\n function qo(e) {\n if (tr || rr) {\n if (Po)try {\n var t = window.localStorage;\n if (t) {\n var n = t[tn](Pt);\n n || (n = t[tn](Dt)), n || (n = t[tn](At)), n || (n = t[tn](Ot)), n && Io(n)\n }\n } catch (r) {\n }\n (\"\" + e)[c]() != \"local\" && jo(\"load.4\")\n }\n }\n\n function Ro(e) {\n if (tr || rr) {\n var t = Hn + bt + Bn + bt + Fn + bt + In + bt + Wn + bt + $n + bt + zo.rx + bt + zo.ry + bt + zo.rz + bt + jn + bt + qn + bt + zn;\n if (Po)try {\n var n = window.localStorage;\n n && (n[Zt](Pt, t), n[Zt](Dt, t[mn](bt)[It](0, 10).join(bt)), n[Zt](At, t[mn](bt)[It](0, 9).join(bt)), n[Zt](Ot, t[mn](bt)[It](0, 6).join(bt)))\n } catch (r) {\n }\n (\"\" + e)[c]() != \"local\" && jo(\"save.4:\" + t)\n }\n }\n\n function Vo(e, n) {\n Zn && tr && !nr && (Uo = r, Pn = t, Wo = e, Xo = n, Jo(-1))\n }\n\n function $o() {\n Uo = t, zo.rx = 0, zo.ry = 0, zo.rz = 0\n }\n\n var e = \"registerattribute\", t = !1, n = null, r = !0, s = \"indexOf\", o = \"removeEventListener\", u = \"addEventListener\", a = \"enabled\", f = \"deviceorientation\", l = \"onunavailable\", c = \"toLowerCase\", h = \"devicemotion\", p = \"view\", d = \"maxpixelzoom\", v = \"architectural\", m = \"display\", g = \"continuousupdates\", y = \"control\", b = \"fisheyefovlink\", w = \"browser\", E = \"desktop\", S = \"getRecommendedEyeRenderRect\", x = \"stereographic\", T = \"limitview\", N = \"height\", C = \"getCurrentEyeFieldOfView\", k = \"events\", L = \"#ifdef GL_FRAGMENT_PRECISION_HIGH\\n\", A = \"loadwhilemoving\", O = \"onavailable\", M = \"float b = texture2D(sm,vB).b;\", _ = \"android\", D = \"downloadlockedlevel\", P = \"float r = texture2D(sm,vR).r;\", H = \"getRecommendedRenderTargetSize\", B = \"timertick\", j = \"stereooverlap\", F = \"getEyeParameters\", I = \"uniform1f\", q = \"vec2 vR = center + v * ca;\", R = \"vec2 vB = center + v / ca;\", U = \"precision mediump float;\\n\", z = \"renderTargetSize\", W = \"lockmultireslevel\", X = \"fisheye\", V = \"hlookat\", $ = \"getEyeTranslation\", J = \"call\", K = \"accelerationIncludingGravity\", Q = \"documentElement\", G = \"fovtype\", Y = \"width\", Z = \"#endif\\n\", et = \"precision highp float;\\n\", tt = \"atan2\", nt = \"pannini\", rt = \"uniform sampler2D sm;\", it = \"usercontrol\", st = \"orientation\", ot = \"scaleflying\", ut = \"vec2 v = tx - center;\", at = \"mobile\", ft = \"fovmin\", lt = \"renderRect\", ct = \"useProgram\", ht = \"fovmax\", pt = \"auto\", dt = \"uniform float ca;\", vt = \"uniform float ol;\", mt = \"left\", gt = \"webkitFullscreenElement\", yt = \"fullscreen\", bt = \",\", wt = \"varying vec2 tx;\", Et = \"recommendedFieldOfView\", St = \"mousetype\", xt = \"distorted\", Tt = \"right\", Nt = \"onunknowndevice\", Ct = \"stereo\", kt = \"length\", Lt = \"area\", At = \"krpano.webvr.2\", Ot = \"krpano.webvr.1\", Mt = \"mozFullScreenElement\", _t = \"#ifdef GL_ES\\n\", Dt = \"krpano.webvr.3\", Pt = \"krpano.webvr.4\", Ht = \"firefox\", Bt = \"sqrt\", jt = \"vlookat\", Ft = \"visible\", It = \"slice\", qt = \"msFullscreenElement\", Rt = \"contextmenu\", Ut = \"mozGetVRDevices\", zt = \"webkitIsFullScreen\", Wt = \"YXZ\", Xt = \"void main()\", Vt = \"_VR_backup\", $t = \"layer\", Jt = \"fullscreenElement\", Kt = \"touchstart\", Qt = \"1|0|0|0\", Gt = \"devicename\", Yt = \"fullscreenchange\", Zt = \"setItem\", en = \"maxmem\", tn = \"getItem\", nn = \"mousedown\", rn = \"mousemove\", sn = \"galaxy s4\", on = \"iPhone 6+\", un = \"touchmove\", an = \"camroll\", fn = \"changedTouches\", ln = \"iPhone 6\", cn = \"screentosphere\", hn = \"createppshader\", pn = \"eyeTranslation\", dn = \"hotspot[\", vn = \"hardwareUnitId\", mn = \"split\", gn = \"touchend\", yn = \"#else\\n\", bn = \"createElement\", wn = \"location\", En = this, Sn = document, xn = n, Tn = n, Nn = n, Cn = 1, kn = .00125, Ln = t, An = r, On = r, Mn = t, _n = t, Dn = r, Pn = t, Hn = 63.5, Bn = pt, jn = 1, Fn = 96, In = .6, qn = Qt, Rn = [1, 0, 0, 0], Un = t, zn = 0, Wn = 100, Xn = t, Vn = 1, $n = 3, Jn = \"\", Kn = r, Qn = n, Gn = n, Yn = n, Zn = t, er = t, tr = t, nr = t, rr = t, ir = t, sr = t, or = {\n enabled: t,\n eyetranslt: Pi,\n updateview: _i,\n prjmatrix: Di,\n getsize: Hi,\n getcursor: Fi\n }, ur = r, ar = 0, fr = 0, lr = 6, cr = 0, hr = 1, pr = 0, dr = 0, vr = 0, mr = t, gr = n, yr = n, br = Math.PI / 180, wr = 180 / Math.PI;\n En.registerplugin = function (i, s, o) {\n xn = i, Nn = o;\n if (xn.version < \"1.19\" || xn.build < \"2015-07-09\") {\n xn.trace(3, \"WebVR plugin - too old krpano version (min. 1.19)\");\n return\n }\n if (xn.webVR)return;\n Tn = xn.device, Nn[e](\"worldscale\", Cn, function (e) {\n var t = Number(e);\n isNaN(t) || (Cn = Math.max(t, .1))\n }, function () {\n return Cn\n }), Nn[e](\"mousespeed\", kn, function (e) {\n var t = Number(e);\n isNaN(t) || (kn = t)\n }, function () {\n return kn\n }), Nn[e](\"pos_tracking\", Ln, function (e) {\n Ln = Er(e)\n }, function () {\n return Ln\n }), Nn[e](\"multireslock\", An, function (e) {\n An = Er(e), or[a] && ri()\n }, function () {\n return An\n }), Nn[e](\"mobilevr_support\", On, function (e) {\n On = Er(e)\n }, function () {\n return On\n }), Nn[e](\"mobilevr_touch_support\", Mn, function (e) {\n Mn = Er(e)\n }, function () {\n return Mn\n }), Nn[e](\"mobilevr_fake_support\", _n, function (e) {\n _n = Er(e)\n }, function () {\n return _n\n }), Nn[e](\"mobilevr_ipd\", Hn, function (e) {\n var t = Number(e);\n isNaN(t) || (Hn = t), Ur()\n }, function () {\n return Hn\n }), Nn[e](\"mobilevr_screensize\", Bn, function (e) {\n $r(e)\n }, function () {\n return Jr()\n }), Nn[e](\"mobilevr_lens_fov\", Fn, function (e) {\n var t = Number(e);\n isNaN(t) || (Fn = t, Ur())\n }, function () {\n return Fn\n }), Nn[e](\"mobilevr_lens_overlap\", jn, function (e) {\n var t = Number(e);\n isNaN(t) || (jn = t, Ur())\n }, function () {\n return jn\n }), Nn[e](\"mobilevr_lens_dist\", In, function (e) {\n var t = Number(e);\n isNaN(t) || (In = t, Ur())\n }, function () {\n return In\n }), Nn[e](\"mobilevr_lens_dist2\", qn, function (e) {\n qn = e, Ur()\n }, function () {\n return qn\n }), Nn[e](\"mobilevr_lens_ca\", zn, function (e) {\n var t = Number(e);\n isNaN(t) || (zn = t, Ur())\n }, function () {\n return zn\n }), Nn[e](\"mobilevr_lens_vign\", Wn, function (e) {\n var t = Number(e);\n isNaN(t) || (Wn = t, Ur())\n }, function () {\n return Wn\n }), Nn[e](\"mobilevr_webvr_dist\", Xn, function (e) {\n Xn = Er(e)\n }, function () {\n return Xn\n }), Nn[e](\"mobilevr_wakelock\", Dn, function (e) {\n Dn = Er(e)\n }, function () {\n return Dn\n }), Nn[e](\"mobilevr_autocalibration\", Pn, function (e) {\n Pn = Er(e)\n }, function () {\n return Pn\n }), Nn[e](\"mobilevr_sensor\", Vn, function (e) {\n Vn = parseInt(e) & 1\n }, function () {\n return Vn\n }), Nn[e](\"mobilevr_sensor_mode\", $n, function (e) {\n var t = parseInt(e);\n t >= 0 && t <= 7 && ($n = t), fr = 0\n }, function () {\n return $n\n }), Nn[e](\"vr_cursor\", Jn, function (e) {\n Bi(e)\n }, function () {\n return Jn\n }), Nn[e](\"vr_cursor_enabled\", Kn, function (e) {\n Kn = Er(e)\n }, function () {\n return Kn\n }), Nn[e](\"vr_cursor_onover\", Gn, function (e) {\n Gn = e\n }, function () {\n return Gn\n }), Nn[e](\"vr_cursor_onout\", Yn, function (e) {\n Yn = e\n }, function () {\n return Yn\n }), Nn[e](\"isavailable\", er, function (e) {\n }, function () {\n return er\n }), Nn[e](\"isenabled\", Zn, function (e) {\n }, function () {\n return Zn\n }), Nn[e](\"iswebvr\", !tr, function (e) {\n }, function () {\n return !tr || rr\n }), Nn[e](\"ismobilevr\", tr, function (e) {\n }, function () {\n return tr || rr\n }), Nn[e](\"isfake\", nr, function (e) {\n }, function () {\n return nr\n }), Nn[e](\"havesettings\", ir, function (e) {\n }, function () {\n return ir\n }), Nn[e](Gt, \"\", function (e) {\n }, function () {\n return Xr()\n }), Nn[e](\"devicesize\", \"\", function (e) {\n }, function () {\n return Vr()\n }), Nn[e](O, n), Nn[e](l, n), Nn[e](Nt, n), Nn[e](\"onentervr\", n), Nn[e](\"onexitvr\", n), Nn.entervr = Gr, Nn.exitvr = Yr, Nn.togglevr = Zr, Nn.resetsensor = ei, Nn.loadsettings = qo, Nn.savesettings = Ro, Nn.calibrate = Vo, Nn.resetcalibration = $o, Nn.update = Qr;\n if (xn.webGL) {\n xn.webVR = or;\n var u = Tn[_] && Tn[Ht], f = document[Q].requestPointerLock || document[Q].mozRequestPointerLock || document[Q].webkitRequestPointerLock, c = document.exitPointerLock || document.mozExitPointerLock || document.webkitExitPointerLock;\n f && c && (mr = r, gr = f, yr = c);\n try {\n u == t && navigator.getVRDevices ? navigator.getVRDevices().then(jr) : u == t && navigator[Ut] ? navigator[Ut](jr) : On ? xr() : sr == t && (sr = r, xn[J](Nn[l], Nn))\n } catch (h) {\n }\n } else sr == t && (sr = r, xn[J](Nn[l], Nn))\n }, En.unloadplugin = function () {\n Yr(), oi(t, r), xn.webVR = n\n };\n var kr = n, Lr = n, Ar = n, Or = n, Mr = n, _r = n, Dr = n, Pr = n, Hr = n, Br = 100, Fr = n, qr = n, ti = n, oi = function () {\n var e = n, r = n;\n return function (i, s) {\n if (Tn[at] && nr == t)if (i)Tn.ios ? e = window.setInterval(function () {\n window[wn] = window[wn], window.setTimeout(window.stop, 0)\n }, 15e3) : Tn[_] && (r == n && (r = document[bn](\"video\"), r.setAttribute(\"loop\", \"\"), r.canPlayType(\"video/webm\") != \"\" && (r.src = Qo)), r.play()); else {\n e && (window.clearInterval(e), e = n);\n if (r && s) {\n r.pause();\n try {\n r.src = \"\", r.removeAttribute(\"src\")\n } catch (o) {\n }\n r = n\n }\n }\n }\n }(), ai = 0, ci = 0, ki = {q: new pi(0, 0, 0, 1), t: 0}, Li = {\n q: new pi(0, 0, 0, 1),\n t: 0\n }, Ai = new pi(0, 0, 0, 1), Oi = n, ls = new Ii, cs = new Ii, hs = new Ii, ps = new Ii, ds = new Ii, vs = Qi(), ms = Qi(), gs = new Ii, ys = new Ii, Ns = 0, Cs = new Ii, ks = new Ii, Ls = n, As = Qi(), Os = Qi(), Ms = Qi(), _s = Qi(), Ps = function () {\n var e = 0, t = 0, n = 0, r = 0, i = 0, s = 0, o = 0, u = 0, a = 0, f = 0, l = 1, c = 0, h = 0, p = 0, d = .03;\n return function (c, h, p, v) {\n var m = c - e, g = h - t, y = p - n, b = v - r;\n e = c, t = h, n = p, r = v;\n var w = Math[Bt](m * m + g * g + y * y);\n if (b > 500) {\n i = 0;\n return\n }\n if (i == 0) {\n i = b, s = w;\n return\n }\n i = i * .95 + .05 * b;\n var E = Math.min(15 * i / 1e3, .5);\n s = s * (1 - E) + E * w;\n var S = zo;\n s < d ? (o++, u += c, a += h, f += p, o > 19 && (S.rx = S.rx * (1 - l) + l * (u / o), S.ry = S.ry * (1 - l) + l * (a / o), S.rz = S.rz * (1 - l) + l * (f / o), l > .5 && (l *= .9), s = 10, d *= .5)) : (o = 1, u = c, a = h, f = p)\n }\n }(), Hs = 0, js = t, Fs = new Ii, Is = new Ii, qs = new Ii, Rs = new Ii, Us = new Ii, zs = new Ii, Ws = new Ii, Xs = new Ii, Vs = new Ii, $s = new Ii, Js = Qi(), Ks = Qi(), Qs = Qi(), Gs = Qi(), Ys = Qi(), Zs = Qi(), eo = Qi(), to = Qi(), no = Qi(), ro = Qi(), io = Qi(), so = Qi(), oo = Qi(), uo = Qi(), ao = Qi(), fo = Qi(), lo = Qi(), co = Qi(), ho = 20, po = .5, vo = 9.81, mo = 1e7, go = t, So = 0, No = new Ii, Co = Qi(), ko = Qi(), Ao = \"http://d8d913s460fub.cloudfront.net/krpanocloud/webvr_localstorage.html?v=114\", Oo = t, Mo = n, _o = n, Do = n, Po = r, Uo = t, zo = {\n rx: 0,\n ry: 0,\n rz: 0\n }, Wo = n, Xo = n, Jo = function () {\n function i() {\n var t = 0, r = n * 3, i = 0, s = 0, o = 0, u = 0, a = 0, f = 0, l = 0, c = 0, h = 0, p = 0;\n for (t = 0; t < r; t += 3)i += e[t | 0], s += e[t + 1 | 0], o += e[t + 2 | 0];\n i /= n, s /= n, o /= n;\n for (t = 0; t < r; t += 3)l = e[t | 0] - i, c = e[t + 1 | 0] - s, h = e[t + 2 | 0] - o, u += l * l, a += c * c, f += h * h;\n u = Math[Bt](u / n), a = Math[Bt](a / n), f = Math[Bt](f / n), p = Math[Bt](u * u + a * a + f * f);\n if (p < .05) {\n var d = zo;\n d.rx = i, d.ry = s, d.rz = o, Wo && xn[J](Wo, Nn)\n } else Xo && xn[J](Xo, Nn)\n }\n\n var e = new Array(300), n = 0, r = 0;\n return function (s, o, u, a) {\n if (s < 0) {\n n = 0, r = xn[B];\n return\n }\n var f = xn[B] - r;\n if (f > 500) {\n var l = n * 3;\n e[l | 0] = o, e[l + 1 | 0] = u, e[l + 2 | 0] = a, n++;\n if (n > 100 || f > 2500)Uo = t, i()\n }\n }\n }(), Ko = function () {\n function u(t) {\n for (i = 0; i < t[kt]; i++)if (e && t[i] === e || s && t[i] === s)t.splice(i, 1), i--\n }\n\n var e = n, r = \"\" + _t + L + et + yn + U + Z + Z + rt + wt + dt + vt + Xt + \"{\" + \"float g = texture2D(sm,tx).g;\" + \"vec2 center = vec2(0.5 + (0.5 - ol)*(step(0.5,tx.x) - 0.5), 0.5);\" + ut + q + P + R + M + \"gl_FragColor=vec4(r,g,b,1.0);\" + \"}\", s = n, o = \"\" + _t + L + et + yn + U + Z + Z + rt + wt + \"uniform vec2 sz;\" + \"uniform float ss;\" + dt + vt + \"uniform float vg;\" + \"uniform vec4 dd;\" + Xt + \"{\" + \"float vig = 0.015;\" + \"float side = step(0.5,tx.x) - 0.5;\" + \"float aspect = (sz.x / sz.y);\" + \"vec2 center = vec2(0.5 + (0.5 - ol)*side, 0.5);\" + ut + \"v.x = v.x * aspect;\" + \"v *= 2.0 * ss;\" + \"float rs = dot(v,v);\" + \"v = v * (dd.x + rs*(dd.y + rs*(dd.z + rs*dd.w)));\" + \"v /= 2.0 * ss;\" + \"v.x = v.x / aspect;\" + \"vec2 vG = center + v;\" + \"float a = (1.0 - smoothstep(vG.x-vig - side*ol, vG.x - side*ol, center.x - 0.25)) * \" + \"(1.0 - smoothstep(center.x + 0.25 - vG.x + side*ol - vig, center.x + 0.25 - vG.x + side*ol, 0.0)) * \" + \"(1.0 - smoothstep(vG.y-vig, vG.y, 0.0)) * \" + \"(1.0 - smoothstep(1.0 - vG.y-vig,1.0 - vG.y, 0.0));\" + \"a *= smoothstep(rs-vig, rs+vig, vg);\" + q + R + P + \"float g = texture2D(sm,vG).g;\" +\n M + \"gl_FragColor=vec4(a*r,a*g,a*b,1.0);\" + \"}\";\n return function (i) {\n var a = xn.webGL;\n if (a) {\n var f, l = a.context, c = a.ppshaders, h = 1 - zn * .1 / hr;\n Un == t && h > .999999 && h < 1.000001 && (i = t), xn[m][Ct] == t && (i = t);\n if (i)if (Un) {\n s == n && (s = a[hn](o, \"ss,ca,dd,ol,sz,vg\"));\n if (s) {\n var p = 1 / Rn[0], d = Rn[1], v = Rn[2], g = Rn[3];\n a[ct](s.prg), l[I](s.ss, hr), l[I](s.ca, h), l.uniform4f(s.dd, p, p * d, p * v, p * g), l[I](s.ol, .5 * vr * (1 + (jn - 1) * .1)), l[I](s.vg, Wn / 30), a[ct](n), u(c), c.push(s)\n }\n } else e == n && (e = a[hn](r, \"ca,ol\")), e && (a[ct](e.prg), l[I](e.ca, h), l[I](e.ol, .5 * vr * (1 + (jn - 1) * .1)), a[ct](n), u(c), c.push(e)); else u(c)\n }\n }\n }(), Qo = \"data:video/webm;base64,GkXfowEAAAAAAAAfQoaBAUL3gQFC8oEEQvOBCEKChHdlYm1Ch4ECQoWBAhhTgGcBAAAAAAABzRFNm3RALE27i1OrhBVJqWZTrIHfTbuMU6uEFlSua1OsggEuTbuMU6uEHFO7a1OsggGw7AEAAAAAAACkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmAQAAAAAAAEMq17GDD0JATYCMTGF2ZjU2LjMuMTAwV0GMTGF2ZjU2LjMuMTAwc6SQC+JFWnEfyt4nOD98NcnLDESJiAAAAAAAAAAAFlSuawEAAAAAAABCrgEAAAAAAAA514EBc8WBAZyBACK1nIN1bmSGhVZfVlA4g4EBI+ODgw9CQOABAAAAAAAADrCBCLqBCFSwgQhUuoEIH0O2dQEAAAAAAAAo54EAo6OBAACAEAIAnQEqCAAIAABHCIWFiIWEiAICAAwNYAD+/6PeABxTu2sBAAAAAAAAEbuPs4EAt4r3gQHxggF88IED\"\n };\n\n\n\n c.reloadurl = function () {\n if (c.sprite) {\n var a = ra.parsePath(c.url), b = a, d = \"\", f = b.indexOf(\"?\");\n 0 < f && (b = b.slice(0, f));\n f = b.indexOf(\"#\");\n 0 < f && (b = b.slice(0, f));\n f = b.lastIndexOf(\".\");\n 0 < f && (d = F(b.slice(f + 1)));\n if (c.loading) {\n if (c.loadingurl == a)return;\n c.loader.kobject = null;\n ba(c.loader, _[48], e, !0);\n ba(c.loader, \"load\", c.loadurl_done, !1);\n Jc(c);\n R(c.loader, _[48], e, !0);\n R(c.loader, \"load\", c.loadurl_done, !1)\n }\n if (c.loadedurl != a)\n if (D = !1, c.loadedurl = null, _[57] == b) {\n z = D = !0;\n Jc(c);\n c.loadedurl = a;\n c.createvar(_[456], c.bgcolor ? Number(c.bgcolor) : 0, u);\n c.createvar(_[463], c.bgalpha ? Number(c.bgalpha) : 0, u);\n c.createvar(_[337], c.bgroundedge ? c.bgroundedge : \"0\", u);\n c.createvar(_[406], c.bgborder ? c.bgborder : \"0\", u);\n c.createvar(_[413], c.bgshadow ? c.bgshadow : \"\", u);\n c.createvar(_[386], pa(c.bgcapture), g);\n g();\n u();\n var h = {};\n h.ss = X;\n h.onresize = function (a, b) {\n a = c.pixelwidth;\n b = c.pixelheight;\n c.imagewidth = a / c.scale;\n c.imageheight = b / c.scale;\n h.ss != X && (h.ss = X, u());\n Q = !0;\n return !1\n };\n c.jsplugin = h;\n c.loadurl_done()\n } \n else if (0 <= a.indexOf(_[281])) {\n D = !0;\n Jc(c);\n c.loadedurl = a;\n var k = new Af;\n k.registerplugin(m, c.getfullpath(), c);\n c.jsplugin = k;\n 0 == c._dyn ? (k.updatehtml(), c.loadurl_done()) : setTimeout(function () {\n k.updatehtml();\n c.loadurl_done()\n }, 7)\n } \n else\"js\" == d ? \n (D = !0, Jc(c), c.loading = !0, c.loaded = !1, c.loadingurl = a, ra.loadfile2(a, _[92], function (b) {\n c.loading = !1;\n c.loaded = !0;\n c.loadedurl = a;\n b = b.data;\n if (null != b) {\n var d = 'the file \"' + a + '\" is not a krpano plugin!';\n try {\n eval(b + \";\")\n } catch (e) {\n d = 'parsing \"' + a + '\" failed: ' + e\n }\n _[11] == typeof krpanoplugin2 ? (b = new krpanoplugin2, b.registerplugin(m, c.getfullpath(), c), c._nativeelement = !0, c.jsplugin = b, c.loadurl_done()) : la(3, d)\n }\n })) : \"swf\" == d ? la(2, c._type + \"[\" + c.name + _[78] + Vd(a)) : c.loader.src != a && (c.loaded && c.preload && (c._ispreload = !0, c.preload = !1, c.onloaded = null), ra.DMcheck(a) ? (c.loading = !0, c.loaded = !1, c.loadingurl = a, c.loader.src = a) : (c.loading = !1, la(3, c._type + \"[\" + c.name + _[85] + a)))\n }\n };\n c.loadurl_done = function () {\n 1 != c._destroyed && (0 == D && (c.sprite.style.backgroundImage = 'url(\"' + c.loader.src + '\")'), h(c, c._crop), c.loading = !1, Q = c.loaded = !0, 0 == D && (c.loadedurl = c.loadingurl), c.poschanged = !0, 0 == (b.iphone && b.retina && 7 > b.iosversion) && null == c.jsborder && 0 == D && null == c.parent && null == c._childs && (c._use_css_scale = !0), 0 == c.preload && 0 == c._ispreload && (c._busyonloaded = da.busy || da.blocked, c._busyonloaded && da.callaction(_[188], c, !0)), da.callaction(null != c.altonloaded ? c.altonloaded : c.onloaded, c, !0))\n };\n var B = null;\n c.updatepluginpos = c.updatepos = function () {\n var a = _[1] == c._type;\n c.poschanged = !1;\n var d = c.sprite, e = c.loader;\n if (d && (e || 0 != D)) {\n D && (e = null);\n var f = c._align, g = c._scale;\n f || (f = _[66]);\n var h = c._use_css_scale, k = c.imagewidth, l = c.imageheight, m = !1, p = c._crop;\n c.pressed && c._ondowncrop ? p = c._ondowncrop : c.hovering && c._onovercrop && (p = c._onovercrop);\n p && (p = String(p).split(\"|\"), 4 == p.length ? (p[0] |= 0, p[1] |= 0, p[2] |= 0, p[3] |= 0) : p = null);\n var r = c.scale9grid;\n r && (r = String(r).split(\"|\"), 4 <= r.length ? (r[0] |= 0, r[1] |= 0, r[2] |= 0, r[3] |= 0, h = c._use_css_scale = !1, c._scalechildren = !1) : r = null);\n var u = X, v = Qa, w = ya;\n a && c.distorted && (u = 1, v = w = 1E3);\n var x = 1, y = 1, z = c._parent, E = !0;\n if (z) {\n var C = n(z);\n C ? (C.poschanged && C.updatepos(), 0 == h ? (v = C._pxw * u, w = C._pxh * u) : (v = C.imagewidth * u, w = C.imageheight * u), C._scalechildren ? (x = 0 != C.imagewidth ? v / u / C.imagewidth : 1, y = 0 != C.imageheight ? w / u / C.imageheight : 1) : (x *= C._finalxscale, y *= C._finalyscale), 0 == C.loaded && (E = !1, d.style.display = \"none\")) : la(3, 'no parent \"' + z + '\" found')\n }\n var A = c._width, F = c._height, H = c._x, J = c._y, z = c._ox, K = c._oy;\n isNaN(k) && (k = 0);\n isNaN(l) && (l = 0);\n A && 0 < String(A).indexOf(\"%\") ? A = parseFloat(A) * (v / u) / (100 * x) : null == A && (A = k);\n F && 0 < String(F).indexOf(\"%\") ? F = parseFloat(F) * (w / u) / (100 * y) : null == F && (F = l);\n var S = \"prop\" == A | (\"prop\" == F) << 1, A = Number(A) * u, F = Number(F) * u;\n 0 > A && (A = v / x + A, 0 > A && (A = 0));\n 0 > F && (F = w / y + F, 0 > F && (F = 0));\n S && (S & 1 ? A = 0 != l ? Number(F) * k / l : 0 : F = 0 != k ? Number(A) * l / k : 0);\n 0 < c.maxwidth && A > u * c.maxwidth && (A = u * c.maxwidth);\n 0 < c.minwidth && A < u * c.minwidth && (A = u * c.minwidth);\n 0 < c.maxheight && F > u * c.maxheight && (F = u * c.maxheight);\n 0 < c.minheight && F < u * c.minheight && (F = u * c.minheight);\n A = A * x * g;\n F = F * y * g;\n H && 0 < String(H).indexOf(\"%\") ? H = parseFloat(H) * (v / u) / (100 * x) : null == H && (H = 0);\n J && 0 < String(J).indexOf(\"%\") ? J = parseFloat(J) * (w / u) / (100 * y) : null == J && (J = 0);\n H = Number(H) * u * x;\n J = Number(J) * u * y;\n g = c._hszscale;\n z = z && 0 < String(z).indexOf(\"%\") ? parseFloat(z) * A * g / 100 / u : null == z ? 0 : z * x;\n K = K && 0 < String(K).indexOf(\"%\") ? parseFloat(K) * F * g / 100 / u : null == K ? 0 : K * y;\n z = Number(z) * u;\n K = Number(K) * u;\n 0 != c.accuracy || a || (A = hc(A), F = hc(F));\n var g = 0 != k ? A / k : 0, S = 0 != l ? F / l : 0, ea = A / u, Z = F / u;\n if (ea != c._pxw || Z != c._pxh)c._pxw = ea, c._pxh = Z, c.pixelwidth = ea / x, c.pixelheight = Z / y, m = !0;\n this._scalechildren ? (c._finalxscale = g, c._finalyscale = S) : (c._finalxscale = x, c._finalyscale = y);\n h ? (d.style.width = k + \"px\", d.style.height = l + \"px\") : (d.style.width = A + \"px\", d.style.height = F + \"px\");\n if (r) {\n var Z = r, O = A, N = F, I = p, p = c.sprite, l = c.loader, M;\n M = X;\n 5 == Z.length && (M *= Number(Z[4]));\n e = l.naturalWidth;\n k = l.naturalHeight;\n null == I && (I = [0, 0, e, k]);\n l = 'url(\"' + l.src + '\")';\n if (null == B)for (B = Array(9), x = 0; 9 > x; x++)r = Ja(), r.kobject = c, r.imgurl = null, r.style.position = _[0], r.style.overflow = _[6], B[x] = r, p.appendChild(r);\n for (var x = [I[0] + 0, I[0] + Z[0], I[0] + Z[0] + Z[2], I[0] + I[2]], y = [I[1] + 0, I[1] + Z[1], I[1] + Z[1] + Z[3], I[1] + I[3]], ea = [Z[0], Z[2], I[2] - Z[0] - Z[2]], Z = [Z[1], Z[3], I[3] - Z[1] - Z[3]], O = [ea[0] * M | 0, O - ((ea[0] + ea[2]) * M | 0), ea[2] * M | 0], R = [Z[0] * M | 0, N - ((Z[0] + Z[2]) * M | 0), Z[2] * M | 0], T = [0, O[0], O[0] + O[1]], U = [0, R[0], R[0] + R[1]], qa, V, I = 0; 3 > I; I++)for (M = 0; 3 > M; M++)r = B[3 * I + M], N = r.style, qa = 0 != ea[M] ? O[M] / ea[M] : 0, V = 0 != Z[I] ? R[I] / Z[I] : 0, r.imgurl != l && (r.imgurl = l, N.backgroundImage = l), r = b.mac && b.firefox ? L.devicePixelRatio : 1, N[pd] = (e * qa * r | 0) / r + \"px \" + (k * V * r | 0) / r + \"px\", N.backgroundPosition = (-x[M] * qa * r | 0) / r + \"px \" + (-y[I] * V * r | 0) / r + \"px\", N.left = T[M] + \"px\", N.top = U[I] + \"px\", N.width = O[M] + \"px\", N.height = R[I] + \"px\";\n p.style.background = \"none\"\n } else {\n if (B) {\n try {\n for (k = 0; 9 > k; k++)B[k].kobject = null, d.removeChild(B[k])\n } catch (Ca) {\n }\n B = null;\n c.sprite && c.loader && (c.sprite.style.backgroundImage = 'url(\"' + c.loader.src + '\")')\n }\n p ? (k = -p[0], p = -p[1], h || (k *= g, p *= S), d.style.backgroundPosition = k + \"px \" + p + \"px\") : d.style.backgroundPosition = \"0 0\";\n e && (d.style[pd] = 0 == h ? e.naturalWidth * g + \"px \" + e.naturalHeight * S + \"px\" : e.naturalWidth + \"px \" + e.naturalHeight + \"px\")\n }\n c.jsplugin && c.jsplugin.onresize && (c._pxw != c.imagewidth || c._pxh != c.imageheight) && (p = [c.imagewidth, c.imageheight], c.imagewidth = c._pxw, c.imageheight = c._pxh, !0 === c.jsplugin.onresize(c._pxw, c._pxh) && (c.imagewidth = p[0], c.imageheight = p[1]));\n c._oxpix = z;\n c._oypix = K;\n l = \"\";\n e = p = 0;\n if (0 == a) {\n p = c._edge;\n if (null == p || \"\" == p)p = f;\n a = k = 0;\n k = 0 <= p.indexOf(\"left\") ? k + 0 : 0 <= p.indexOf(_[3]) ? k + -A : k + -A / 2;\n a = 0 <= p.indexOf(\"top\") ? a + 0 : 0 <= p.indexOf(_[2]) ? a + -F : a + -F / 2;\n p = 0 <= f.indexOf(\"left\") ? H + k : 0 <= f.indexOf(_[3]) ? v - H + k : v / 2 + H + k;\n e = 0 <= f.indexOf(\"top\") ? J + a : 0 <= f.indexOf(_[2]) ? w - J + a : w / 2 + J + a;\n c.pixelx = (p + z) / u;\n c.pixely = (e + K) / u;\n p -= q[3];\n e -= q[0];\n 0 == c.accuracy && (p = hc(p), e = hc(e));\n h && (u = f = 1, v = c.imagewidth / 2, w = c.imageheight / 2, J = H = 0, C && 0 == C._scalechildren && (f /= C.pixelwidth / C.imagewidth, u /= C.pixelheight / C.imageheight, H = -k * (1 - f), J = -a * (1 - u)), l = _[60] + (-v + H) + \"px,\" + (-w + J) + _[340] + g * f + \",\" + S * u + _[293] + v + \"px,\" + w + \"px) \");\n 0 == c.accuracy && (p = hc(p), e = hc(e));\n C = A / 2 + k;\n F = F / 2 + a;\n h && (0 != g && (C /= g, z /= g), 0 != S && (F /= S, K /= S));\n l = _[60] + p + \"px,\" + e + \"px) \" + l + _[60] + -C + \"px,\" + -F + _[332] + c._rotate + _[245] + (C + z) + \"px,\" + (F + K) + \"px)\";\n Kc && 2 > Nb && !0 !== b.opera ? l = _[182] + l : b.androidstock && (l = _[199] + l);\n ib ? d.style[ib] = l : (d.style.left = p + \"px\", d.style.top = e + \"px\");\n h = c._visible && E ? \"\" : \"none\";\n h != d.style.display && (d.style.display = h)\n }\n if (m || Q) {\n if (d = c._childs)for (m = d.length, k = 0; k < m; k++)d[k].updatepos();\n Q = !1\n }\n }\n }\n }, Af = function () {\n function a(a, b, c, e) {\n v.registerattribute(b, c, function (c) {\n r[b] != c && (r[b] = c, null != e ? e(b, c) : d(a))\n }, function () {\n return r[b]\n })\n }\n\n function d(a) {\n l |= a;\n v && null == y && (y = setTimeout(m, 0))\n }\n\n function m() {\n y = null;\n if (v) {\n var a = !1;\n 2 == l && (a = e());\n 0 == a && p();\n l = 0\n }\n }\n\n function f(a) {\n a && 0 == a.indexOf(_[74]) && ((a = U(\"data[\" + a.slice(5) + _[61])) || (a = \"\"));\n return a\n }\n\n function g(a) {\n if (a && a.parentNode)try {\n a.parentNode.removeChild(a)\n } catch (b) {\n }\n }\n\n function n(a) {\n a && (a.style.left = _[122], a.style.visibility = _[6], V.viewerlayer.appendChild(a))\n }\n\n function k(a) {\n a.ontouchend = function () {\n a.click()\n }\n }\n\n function e() {\n var a = !1;\n if (H) {\n var b = H.childNodes[0];\n if (b) {\n var a = b.style, b = pa(r.background), c = pa(r.border), d = parseInt(r.backgroundcolor), e = parseFloat(r.backgroundalpha);\n isNaN(e) && (e = 1);\n var f = parseFloat(r.borderwidth);\n isNaN(f) && (f = 1);\n var g = r.bordercolor, g = g ? parseInt(g) : 0, h = parseFloat(r.borderalpha);\n isNaN(h) && (h = 1);\n var k = Number(r.shadow);\n isNaN(k) && (k = 0);\n var l = Number(r.textshadow);\n isNaN(l) && (l = 0);\n var m = 1 == Lc ? .78 : .8, n = r.shadowangle * Y, p = r.textshadowangle * Y;\n a.backgroundColor = b ? ca(d, e) : \"\";\n a.borderColor = c && 0 < f ? ca(g, e * h) : \"\";\n a.borderRadius = 0 < D[0] + D[1] + D[2] + D[3] ? D.join(\"px \") + \"px\" : \"\";\n a[pc] = 0 < k ? Math.round(k * Math.cos(n)) + \"px \" + Math.round(k * Math.sin(n)) + \"px \" + m * r.shadowrange + \"px \" + ca(r.shadowcolor, e * r.shadowalpha) : \"\";\n a.textShadow = 0 < l ? Math.round(l * Math.cos(p)) + \"px \" + Math.round(l * Math.sin(p)) + \"px \" + m * r.textshadowrange + \"px \" + ca(r.textshadowcolor, e * r.textshadowalpha) : \"\";\n a = !0\n }\n }\n return a\n }\n\n function p() {\n if (v) {\n y && (clearTimeout(y), y = null);\n var a = 2 == u || 1 == u && 0 == v.haveUserWidth(), d = 2 == h || 1 == h && 0 == v.haveUserHeight(), g = r.html, m = r.css, g = g ? f(g) : \"\", m = m ? f(m) : \"\";\n pa(r.background);\n var w = pa(r.border), t = parseFloat(r.borderwidth);\n isNaN(t) && (t = 1);\n var g = Ed(g), m = m.split(\"0x\").join(\"#\"), E = m.split(\"}\").join(\"{\").split(\"{\");\n if (1 < E.length) {\n for (var D = [], m = 1; m < E.length; m += 2) {\n var J = Ha(E[m - 1]), L = E[m], M = \"p\" == F(J) ? \"div\" : J, g = g.split(\"<\" + J).join(\"<\" + M + _[407] + L + \"' \"), g = g.split(\"</\" + J + \">\").join(\"</\" + M + \">\");\n D.push(E[m])\n }\n m = \"\"\n }\n g = _[206] + K[0] + \"px \" + K[1] + \"px \" + K[2] + \"px \" + K[3] + \"px;\" + m + \"'>\" + g + _[68];\n 1 == r.vcenter && 0 == d && (g = \"<table style='width:100%;height:100%;border-collapse:collapse;text-decoration:inherit;'><tr style='vertical-align:middle;'><td style='padding:0;'>\" + g + _[214]);\n g = g.split(\"<p\").join(_[161]);\n g = g.split(\"</p>\").join(_[68]);\n m = _[213];\n if (1 == a || 0 == pa(r.wordwrap))m += _[205];\n 0 == d && (m += _[308]);\n z = 1;\n w && 0 < t ? (z = t * X, m += _[450] + Math.ceil(t) + _[197]) : z = 0;\n 0 == a && (m += _[505] + v.imagewidth + _[202]);\n g = unescape(g);\n g = '<div style=\"' + m + '\">' + g + _[68];\n v.sprite.style.color = _[26];\n v.sprite.style[_[51]] = \"none\";\n H && H.parentNode == v.sprite && (A = H, H = null);\n null == H && (H = Ja(), I = H.style, pa(r.selectable) && (I.webkitUserSelect = I.MozUserSelect = I.msUserSelect = I.oUserSelect = I.userSelect = \"text\", I.cursor = \"text\"), I.position = _[0], I.left = I.top = -z + \"px\", _[1] == v._type && 1 == v._distorted ? (I.width = \"100%\", I.height = \"100%\", I[ib] = \"\") : (I[Zc] = \"0 0\", I[ib] = _[141] + X + \")\", I.width = 100 / X + \"%\", I.height = 100 / X + \"%\"), I.fontSize = \"12px\", I.fontFamily = \"Arial\", I.lineHeight = _[45]);\n H.innerHTML = g;\n e();\n if (a = H.getElementsByTagName(\"a\"))if (d = a.length, 0 < d)for (m = 0; m < d; m++)if (g = a[m])w = \"\" + g.href, _[509] == w.toLowerCase().slice(0, 6) && (g.href = _[173] + V.viewerlayer.id + _[376] + w.slice(6).split(\"'\").join('\"') + \"','\" + v.getfullpath() + \"');\"), b.touch && k(g);\n _[1] == v._type && (v.forceupdate = !0, ob(!0, v.index));\n n(H);\n c = !1;\n v.loaded = !0;\n v.scalechildren = v.scalechildren;\n C = 0;\n null == q && (q = setTimeout(x, 10));\n l = 0\n }\n }\n\n function x() {\n q = null;\n c = !1;\n if (v && H) {\n var a = 2 == u || 1 == u && 0 == v.haveUserWidth(), b = 2 == h || 1 == h && 0 == v.haveUserHeight();\n J = !0;\n var d = H && H.parentNode == v.sprite, e = 0, f = 0;\n if (0 == a && 0 == b)f = v.imageheight, 1 > f && (f = 1); else {\n try {\n e = H.childNodes[0].clientWidth, f = H.childNodes[0].clientHeight, 3 > f && (f = 0)\n } catch (k) {\n }\n if (1 > f && d && H.parentNode && 1 > H.parentNode.clientHeight) {\n n(H);\n C = 0;\n null == q && (q = setTimeout(x, 10));\n J = !1;\n return\n }\n }\n if (0 < f) {\n if (v._enabledstate = null, v.enabled = v._enabled, I.top = I.left = -z + \"px\", c = !0, A && A.parentNode == v.sprite ? (I.visibility = _[12], v.sprite.replaceChild(H, A), A = null) : (g(A), A = null, I.visibility = _[12], v.sprite.appendChild(H)), 0 != a || 0 != b)if (e = a ? Math.round(e) : v.imagewidth, f = b ? Math.round(f) : v.imageheight, e != v._width || f != v._height)a && (v._width = e), b && (v._height = f), v.poschanged = !0, _[1] == v._type ? ob(!0, v.index) : v.updatepluginpos(), v.onautosized && da.callaction(v.onautosized, v, !0)\n } else C++, 10 > C ? null == q && (q = setTimeout(x, 20)) : (A && A.parentNode == v.sprite && (v.sprite.replaceChild(H, A), A = null), v.height = 0);\n J = !1\n }\n }\n\n var v = null, r = {}, y = null, l = 0, u = 1, h = 1, c = !1, K = [0, 0, 0, 0], D = [0, 0, 0, 0], z = 1, q = null, J = !1, C = 0, L = X, A = null, H = null, I = null;\n this.registerplugin = function (b, c, e) {\n v = e;\n b = v.html;\n c = v.css;\n delete v.html;\n delete v.css;\n v._istextfield = !0;\n v.accuracy = 0;\n v.registerattribute(_[377], \"auto\", function (a) {\n u = \"auto\" == F(a) ? 1 : 2 * pa(a);\n d(1)\n }, function () {\n return 1 == u ? \"auto\" : 2 == u ? \"true\" : _[31]\n });\n v.registerattribute(_[357], \"auto\", function (a) {\n h = \"auto\" == F(a) ? 1 : 2 * pa(a);\n d(1)\n }, function () {\n return 1 == h ? \"auto\" : 2 == h ? \"true\" : _[31]\n });\n a(1, _[446], !1);\n a(1, _[132], \"2\", function (a, b) {\n Ib(b, 1, \" \", K);\n d(1)\n });\n a(2, _[107], !0);\n a(2, _[235], 1);\n a(2, _[237], 16777215);\n a(1, _[71], !1);\n a(1, _[105], 1);\n a(2, _[104], 1);\n a(2, _[101], 0);\n a(2, _[380], \"0\", function (a, b) {\n Ib(b, 1, \" \", D);\n d(2)\n });\n a(2, _[522], 0);\n a(2, _[320], 4);\n a(2, _[318], 45);\n a(2, _[316], 0);\n a(2, _[315], 1);\n a(2, _[366], 0);\n a(2, _[241], 4);\n a(2, _[242], 45);\n a(2, _[243], 0);\n a(2, _[244], 1);\n a(1, _[370], !1);\n a(1, _[410], !0);\n a(1, _[502], \"\");\n v.registerattribute(\"blur\", 0);\n v.registerattribute(_[408], 0);\n v.registerattribute(_[440], null, function (a) {\n null != a && \"\" != a && \"none\" != (\"\" + a).toLowerCase() && (h = 2, d(1))\n }, function () {\n return 2 == h ? _[136] : \"none\"\n });\n v.registercontentsize(400, 300);\n v.sprite.style.pointerEvents = \"none\";\n a(1, \"html\", b ? b : \"\");\n a(1, \"css\", c ? c : \"\")\n };\n this.unloadplugin = function () {\n v && (v.loaded = !1, q && clearTimeout(q), y && clearTimeout(y), g(A), g(H));\n v = y = q = I = H = A = null\n };\n this.onvisibilitychanged = function (a) {\n a && _[1] == v._type && (v.forceupdate = !0, ob(!0, v.index));\n return !1\n };\n this.onresize = function (a, b) {\n if (L != X)return L = X, Ib(r.padding, 1, \" \", K), Ib(r.roundedge, 1, \" \", D), p(), !1;\n if (J)return !1;\n if (v) {\n var d = 2 == u || 1 == u && 0 == v.haveUserWidth(), e = 2 == h || 1 == h && 0 == v.haveUserHeight();\n v.registercontentsize(a, b);\n H && (_[1] != v._type || 1 != v._distorted ? (I[ib] = _[141] + X + \")\", I.width = 100 / X + \"%\", I.height = 100 / X + \"%\") : (I[ib] = \"\", I.width = \"100%\", I.height = \"100%\"), c && (I.left = I.top = -z + \"px\"), 0 == d && (H.childNodes[0].style.width = a + \"px\"), 0 == e && (H.childNodes[0].style.height = b + \"px\"), d || e ? (c = !1, d && (v.sprite.style.width = 0), e && (v.sprite.style.height = 0), C = 0, null == q && (q = setTimeout(x, 10))) : (0 == d && (I.width = a + 2 * z + \"px\"), 0 == e && (I.height = b + \"px\")))\n }\n return !1\n };\n this.updatehtml = p\n }, ub = !1, qc = 1, wf = function () {\n function a() {\n 0 == b.css3d && d._distorted && (d._distorted = !1, d.zoom = !0);\n d.poschanged = !0;\n d.jsplugin && d.jsplugin.onresize && (d.forceupdate = !0, d.imagewidth = d.imageheight = 0);\n d.sprite && (d._visible && d.loaded && ob(!0, d.index), d.sprite.style[ib + _[143]] = d._distorted ? \"0 0\" : _[461])\n }\n\n var d = this;\n d.prototype = Ob;\n this.prototype.call(this);\n d._type = _[1];\n var m = d.createvar;\n m(\"ath\", 0);\n m(\"atv\", 0);\n m(\"depth\", 1E3);\n m(_[501], 0);\n d.scaleflying = !0;\n m(\"zoom\", !1);\n m(\"rx\", 0);\n m(\"ry\", 0);\n m(\"rz\", 0);\n m(\"tx\", 0);\n m(\"ty\", 0);\n m(\"tz\", 0);\n m(_[401], !1, a);\n d.accuracy = 1;\n d.zorder2 = 0;\n d.inverserotation = !1;\n d.forceupdate = !1;\n d._hit = !1;\n d.point = new bb(null);\n var f = d.create;\n d.create = function () {\n function b() {\n Gd(d)\n }\n\n f();\n d.createvar(_[121], d.polyline ? pa(d.polyline) : !1, b);\n d.createvar(_[398], d.fillcolor ? Number(d.fillcolor) : 11184810, b);\n d.createvar(_[396], d.fillalpha ? Number(d.fillalpha) : .5, b);\n d.createvar(_[105], d.borderwidth ? Number(d.borderwidth) : 3, b);\n d.createvar(_[101], d.bordercolor ? Number(d.bordercolor) : 11184810, b);\n d.createvar(_[104], d.borderalpha ? Number(d.borderalpha) : 1, b);\n a()\n };\n d.updatepos = function () {\n d.poschanged = !0\n };\n d.getcenter = function () {\n var a = 0, b = 0, f = 25;\n if (d._url)a = d._ath, b = d._atv, f = 25 * Number(d.scale); else {\n for (var e = d.point.getArray(), m = 0, p = e.length, v, r, y, l = 5E4, u = -5E4, h = 5E4, c = -5E4, E = 5E4, D = -5E4, z = 0, q = 0, F = 0, m = 0; m < p; m++)r = e[m], v = Number(r.ath), y = Number(r.atv), r = 0 > v ? v + 360 : v, v < l && (l = v), v > u && (u = v), r < h && (h = r), r > c && (c = r), y < E && (E = y), y > D && (D = y), v = (180 - v) * Y, y *= Y, z += Math.cos(y) * Math.cos(v), F += Math.cos(y) * Math.sin(v), q += Math.sin(y);\n 0 < p && (z /= p, q /= p, F /= p, a = 90 + Math.atan2(z, F) / Y, b = -Math.atan2(-q, Math.sqrt(z * z + F * F)) / Y, 180 < a && (a -= 360), v = u - l, y = D - E, 170 < v && (v = c - h), f = v > y ? v : y)\n }\n 1 > f ? f = 1 : 90 < f && (f = 90);\n e = new Hb;\n e.x = a;\n e.y = b;\n e.z = f;\n f = arguments;\n 2 == f.length && (I(f[0], a, !1, this), I(f[1], b, !1, this));\n return e\n }\n }, $d = \"\", ic = 1, Be = \"translate3D(;;px,;;px,0px) ;;rotateX(;;deg) rotateY(;;deg) ;;deg) rotateX(;;deg) scale3D(;;) translateZ(;;px) rotate(;;deg) translate(;;px,;;px) rotate;;deg) rotate;;deg) rotate;;deg) scale(;;,;;) translate(;;px,;;px)\".split(\";\"), Ce = \"translate(;;px,;;px) translate(;;px,;;px) rotate(;;deg) translate(;;px,;;px) scale(;;,;;) translate(;;px,;;px)\".split(\";\"), tf = function () {\n this.fullscreen = b.fullscreensupport;\n this.touch = this.versioninfo = !0;\n this.customstyle = null;\n this.enterfs = _[371];\n this.exitfs = _[246];\n this.item = new bb(function () {\n this.visible = this.enabled = !0;\n this.caption = null;\n this.separator = !1;\n this.onclick = null\n })\n }, Xd = function () {\n function a(a) {\n var b = ja.FRM;\n if (0 == b && n)n(a); else {\n 0 == b && (b = 60);\n var d = 1E3 / b, b = (new Date).getTime(), d = Math.max(0, d - (b - g));\n L.setTimeout(a, d);\n g = b + d\n }\n }\n\n function d() {\n m && (f(), a(d))\n }\n\n var m = !0, f = null, g = 0, n = L.requestAnimationFrame || L.webkitRequestAnimationFrame || L.mozRequestAnimationFrame || L.oRequestAnimationFrame || L.msRequestAnimationFrame;\n return {\n start: function (g) {\n if (b.ios && 9 > b.iosversion || b.linux && b.chrome)n = null;\n m = !0;\n f = g;\n a(d)\n }, stop: function () {\n m = !1;\n f = null\n }\n }\n }();\n Jb.init = function (a) {\n Jb.so = a;\n b.runDetection(a);\n if (b.css3d || b.webgl)ib = b.browser.css.transform, Id = ib + \"Style\", Zc = ib + _[143];\n pd = b.browser.css.backgroundsize;\n pc = b.browser.css.boxshadow;\n var d = b.webkit && 534 > b.webkitversion, E = 0;\n b.ios && 0 == b.simulator ? (Nb = 0, 5 <= b.iosversion && 1 != Yc && (Nb = 1, E = b._cubeOverlap = 4)) : b.android ? (Nb = 2, b._cubeOverlap = 0, E = 4, b.chrome ? (Nb = 1, Lc = 0, b._cubeOverlap = 4) : b.firefox && (E = 0)) : (b.windows || b.mac) && d ? (be = 1, Lc = Nb = 0, b._cubeOverlap = 4) : (Nb = 1, Lc = 0, E = 2, b.desktop && b.safari && (E = 8), b.chrome && (22 <= b.chromeversion && 25 >= b.chromeversion ? (b._cubeOverlap = 64, E = 16) : b._cubeOverlap = 1), b.ie && (E = 8));\n b._tileOverlap = E;\n qf();\n if (!V.build(a))return !1;\n ia.layer = V.controllayer;\n ia.panoControl = Pa;\n ia.getMousePos = V.getMousePos;\n ja.htmltarget = V.htmltarget;\n ja.viewerlayer = V.viewerlayer;\n la(1, _[128] + m.version + _[426] + m.build + (m.debugmode ? _[476] : \")\"));\n d = !(b.android && b.firefox && 22 > b.firefoxversion);\n a.html5 && (E = F(a.html5), 0 <= E.indexOf(_[30]) ? d = !0 : 0 <= E.indexOf(\"css3d\") && (d = !1));\n b.webgl && d ? Oa.setup(2) : Oa.setup(1);\n la(1, b.infoString + Oa.infoString);\n a && a.basepath && \"\" != a.basepath && (ra.swfpath = a.basepath);\n V.onResize(null);\n Pa.registerControls(V.controllayer);\n Xd.start(xf);\n if (!b.css3d && !b.webgl && 0 > F(a.html5).indexOf(_[488]))Ea(_[156]); else {\n var f, g, n = [], d = !0, E = 0, k = [], e = _[150].split(\" \"), w = _[151].split(\" \"), x = null, v = null, r = Xc(100), y = F(_[160]).split(\";\"), l, u;\n if (null != mb && \"\" != mb) {\n var h = ra.b64u8(mb), c = h.split(\";\");\n if (l = c[0] == y[0])if (h = F(h), 0 <= h.indexOf(y[6]) || 0 <= h.indexOf(y[7]) || 0 <= h.indexOf(y[8]))l = !1;\n var h = mb = null, h = c.length, h = h - 2, K = c[h], D = 0;\n 0 == K.indexOf(\"ck=\") ? K = K.slice(3) : l = !1;\n if (l)for (l = 0; l < h; l++) {\n var z = c[l], q = z.length;\n for (u = 0; u < q; u++)D += z.charCodeAt(u) & 255;\n if (!(4 > q) && (u = z.slice(3), \"\" != u))switch (_[177].indexOf(z.slice(0, 3)) / 3 | 0) {\n case 1:\n Ya = parseInt(u);\n d = 0 == (Ya & 1);\n break;\n case 2:\n f = u;\n n.push(y[1] + \"=\" + u);\n break;\n case 3:\n g = u;\n n.push(y[2] + u);\n break;\n case 4:\n k.push(u);\n n.push(y[3] + \"=\" + u);\n break;\n case 5:\n z = parseInt(u);\n x = new Date;\n x.setFullYear(z >> 16, (z >> 8 & 15) - 1, z & 63);\n break;\n case 6:\n v = u;\n break;\n case 7:\n q = z = u.length;\n if (128 > z)for (; 128 > q;)u += u.charAt(q % z), q++;\n od = u;\n break;\n case 8:\n break;\n case 9:\n Na = u.split(\"|\");\n 4 != Na.length && (Na = null);\n break;\n case 10:\n break;\n default:\n n.push(z)\n }\n }\n D != parseInt(K) && (E = 1);\n l = aa.location;\n l = F(l.search || l.hash);\n if (0 < l.indexOf(_[90])) {\n Ea(n.join(\", \"), F(_[90]).toUpperCase());\n return\n }\n 0 < l.indexOf(_[248]) && (null == a.vars && (a.vars = {}), a.vars.consolelog = !0, Ya = Ya & 1 | 14);\n c = null\n }\n vc = n = F(aa[y[3]]);\n try {\n throw Error(\"path\");\n } catch (J) {\n l = \"\" + J.stack, c = l.indexOf(\"://\"), 0 < c && (c += 3, h = l.indexOf(\"/\", c), l = l.slice(c, h), h = l.indexOf(\":\"), 0 < h && (l = l.slice(0, h)), vc = l)\n }\n 0 == n.indexOf(_[524]) && (n = n.slice(4));\n y = \"\" == n || _[382] == n || _[381] == n || 0 == n.indexOf(y[4]);\n b.browser.domain = y ? null : n;\n if (0 == (Ya & 2) && y)E = 3; else if (!y) {\n l = n.indexOf(\".\") + 1;\n 0 > n.indexOf(\".\", l) && (l = 0);\n y = n;\n n = n.slice(l);\n 0 == n.indexOf(_[479]) && _[109] != n && (E = 2);\n for (l = 0; l < e.length; l++)if (e[l] == n) {\n E = 2;\n break\n }\n if (0 == E && 0 < k.length)for (E = 2, l = 0; l < k.length; l++)if (n == k[l] || gd(k[l], y)) {\n E = 0;\n break\n }\n }\n if (f || g)for (g = (\".\" + f + \".\" + g).toLowerCase(), l = 0; l < w.length; l++)0 <= g.indexOf(w[l]) && (E = 1);\n if (null != x && new Date > x)Ea(_[250]), null != v && setTimeout(function () {\n L.location = v\n }, 500); else if (0 < E)Ea(_[97] + [\"\", _[251], _[222]][E - 1]); else {\n Na && (Ya &= -129, la(1, Na[0]));\n 0 == d && (f ? la(1, _[253] + f) : d = !0);\n (d || 0 == (Ya & 1)) && V.log(r);\n f = null;\n a.xml && (f = a.xml);\n a.vars && (a.vars.xml && (f = a.vars.xml), f || (f = a.vars.pano));\n 0 == (Ya & 4) && (a.vars = null);\n Ya & 16 && (m[rc[0]] = m[rc[1]] = !1);\n g = V.viewerlayer;\n Ya & 8 ? (g.get = gc(U), g.set = gc(I), g.call = hd) : (g.set = function () {\n la(2, _[180])\n }, g.get = Na ? gc(U) : g.set, g.call = gc(da.SAcall));\n g.screentosphere = p.screentosphere;\n g.spheretoscreen = p.spheretoscreen;\n g.unload = ve;\n a.initvars && Wd(a.initvars);\n da.loadpano(f, a.vars);\n if (a.onready)a.onready(g);\n return !0\n }\n }\n }\n }\n\n var _ = function () {\n // var F = mb;\n // mb = null;\n // var Ha = F.length - 3, pa, ga, sa, ha = \"\", va = \"\", Aa = 1, R = 0, ba = [], Ja = [1, 48, 55, 53, 38, 51, 52, 3];\n // sa = F.charCodeAt(4);\n // for (pa = 5; pa < Ha; pa++)ga = F.charCodeAt(pa), 92 <= ga && ga--, 34 <= ga && ga--, ga -= 32, ga = (ga + 3 * pa + 59 + Ja[pa & 7] + sa) % 93, sa = (23 * sa + ga) % 32749, ga += 32, 124 == ga ? 0 == Aa ? R ^= 1 : 1 == R ? R = 0 : (ba.push(ha), ha = \"\", Aa = 0) : (ga = String.fromCharCode(ga), 0 == R ? ha += ga : va += ga, Aa++);\n // 0 < Aa && ba.push(ha);\n // ga = 0;\n // for (Ha += 3; pa < Ha;)ga = ga << 5 | F.charCodeAt(pa++) - 53;\n // ga != sa && (ba = null);\n // mb = va;\n\n\n //sohow\n // var ba_json = window.JSON.stringify(ba);\n var ba = new Array(\"absolute\",\"hotspot\",\"bottom\",\"right\",\"mouseup\",\"default\",\"hidden\",\"mousedown\",\"pointerover\",\"pointerout\",\"mousemove\",\"function\",\"visible\",\"string\",\"action\",\"container\",\"mouseover\",\"mouseout\",\"pointer\",\"mouse\",\"translateZ(+2000000000000px)\",\" - xml parsing failed!\",\"parsererror\",\"px solid \",\"cylinder\",\"text/xml\",\"#000000\",\"moveto\",\"height\",\"plugin\",\"webgl\",\"false\",\" - wrong encryption!\",\"Invalid expression\",\"MSPointerOver\",\"MSPointerOut\",\"transparent\",\"contextmenu\",\"sans-serif\",\"cubestrip\",\"#FFFFFF\",\"iphone\",\"sphere\",\"linear\",\"mobile\",\"normal\",\"krpano\",\"color\",\"error\",\"width\",\"align\",\"-webkit-text-size-adjust\",\"visibilitychange\",\"translate3D(\",\"image.level[\",\"Courier New\",\"easeoutquad\",\"<container>\",\"loading of \",\"preserve-3d\",\"translate(\",\"].content\",\" failed!\",\"onresize\",\"pagehide\",\"position\",\"lefttop\",\"boolean\",\"</div>\",\"LOOKTO\",\"webkit\",\"border\",\"scene[\",\"blend\",\"data:\",\"image\",\"-webkit-tap-highlight-color\",\"http://www.w3.org/2000/svg\",\"] skipped flash file: \",\"webkitvisibilitychange\",\" - loading failed! (\",\"mozvisibilitychange\",\"msvisibilitychange\",\"experimental-webgl\",\"orientationchange\",\"] loading error: \",\"deg) translateZ(\",\"unknown action: \",\"uniform vec3 cc;\",\"actions overflow\",\"showlicenseinfo\",\"MSGestureChange\",\"text/javascript\",\"MSInertiaStart\",\"get:calc:data:\",\"DOMMouseScroll\",\"MSGestureStart\",\"LICENSE ERROR\",\"opacity 0.25s\",\"MSGestureEnd\",\"onmousewheel\",\"bordercolor\",\"scene.count\",\"onmousedown\",\"borderalpha\",\"borderwidth\",\") rotateZ(\",\"background\",\"mousewheel\",\"krpano.com\",\"fullscreen\",\"undefined\",\"webkit-3d\",\"onmouseup\",\"marginTop\",\"touchmove\",\"moz-webgl\",\"</krpano>\",\"touchend\",\"relative\",\"fontSize\",\"polyline\",\"-10000px\",\"offrange\",\"<krpano>\",\"rotateY(\",\"keydown\",\"plugin[\",\"krpano \",\"include\",\"onkeyup\",\"onclick\",\"padding\",\"scroll\",\"layer[\",\"DEBUG:\",\"center\",\"resize\",\"tablet\",\"&nbsp;\",\"ERROR:\",\"scale(\",\"opaque\",\"Origin\",\"object\",\" edge/\",\"iPhone\",\"Chrome\",\"cursor\",\"parent\",\"360etours.net clickcwb.com.br afu360.com realtourvision.com webvr.net webvr.cn round.me aero-scan.ru shambalaland.com littlstar.com d3uo9a4kiyu5sk.cloudfront.net youvisit.com vrvideo.com\",\"panofree freeuser figgler teameat eatusebuy no-mail chen44 .lestra. gfreidinger an37almk\",\"gl_FragColor=vec4(texture2D(sm,(tx-ct)/mix(1.0,zf,1.0-aa)+ct).rgb,aa);\",\"gl_FragColor=vec4(mix(texture2D(sm,tx).rgb,cc,2.0*(1.0-aa)),aa*2.0);\",\" - invalid name! Names need to begin with an alphabetic character!\",\"if(\\'%5\\'!=\\'NEXTLOOP\\',%1);if(%2,%4;%3;for(%1,%2,%3,%4,NEXTLOOP););\",\"A Browser with CSS 3D Transforms or WebGL support is required!\",\"abs acos asin atan ceil cos exp floor log round sin sqrt tan\",\"gl_FragColor=vec4(texture2D(sm,tx).rgb+(1.0-aa)*cc,aa);\",\"uniform sampler2D sm;varying vec2 tx;uniform float aa;\",\"kr;user;mail=;domain;file:;id;chen4490;teameat;figgler\",\"<div style=\\'padding-top:2.5px; padding-bottom:5px;\\' \",\"WebGL-Error shaderProgram: could not link shaders!\",\"uniform vec2 ap;uniform float zf;uniform float bl;\",\"if(%1,%2;delayedcall(0,asyncloop(%1,%2,%3));,%3);\",\"there is already a html element with this id: \",\"<div style=\\'padding:8px; text-align:center;\\'>\",\"-webkit-radial-gradient(circle, white, black)\",\"gl_FragColor=vec4(texture2D(sm,tx).rgb,aa);\",\"<i><b>krpano</b><br/>demo&nbsp;version</i>\",\" - invalid or unsupported xml encryption!\",\"No device compatible image available...\",\"there is no html element with this id: \",\"javascript:document.getElementById(\\'\",\"left front right back up down cube\",\"uniform vec3 fp;uniform float bl;\",\"uniform vec2 ct;uniform float zf;\",\"xx=lz=rg=ma=dm=ed=eu=ek=rd=pt=id=\",\"color:#FF0000;font-weight:bold;\",\"1px solid rgba(255,255,255,0.5)\",\"Javascript Interface disabled!\",\" - loading or parsing failed!\",\"translateZ(+1000000000000px) \",\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\",\"loading or parsing failed!\",\"WebGL-Error vertexShader: \",\"WebGL-Error pixelShader: \",\"precision mediump float;\",\"set(_busyonloaded,false)\",\"krpano embedding error: \",\" (not a cubestrip image)\",\"webkitRequestFullScreen\",\"if(%1,%2;loop(%1,%2););\",\"architecturalonlymiddle\",\"webkitRequestFullscreen\",\"(-webkit-transform-3d)\",\"preservedrawingbuffer\",\"px solid transparent;\",\" - style not found: \",\"translateZ(+1000px) \",\"<span style=\\'color:#\",\"mozRequestFullScreen\",\"px;overflow:hidden;\",\"0px 0px 8px #FFFFFF\",\"addlayer/addplugin(\",\"white-space:nowrap;\",\"<div style=\\'margin:\",\"px,0px) translateY(\",\"xml parsing failed!\",\"msRequestFullscreen\",\"-ms-overflow-style\",\"preview.striporder\",\"-webkit-box-shadow\",\"position:absolute;\",\"</td></tr></table>\",\"distortionfovlink\",\"onpreviewcomplete\",\"WebkitPerspective\",\"Microsoft.XMLHTTP\",\"<krpano></krpano>\",\"http://krpano.com\",\"onenterfullscreen\",\" - NO LOCAL USAGE\",\"requestFullscreen\",\"Internet Explorer\",\"onexitfullscreen\",\"rgba(0,0,0,0.01)\",\"access permitted\",\"fullscreenchange\",\"FullscreenChange\",\"webkitUserSelect\",\"framebufferscale\",\"px) perspective(\",\"__defineGetter__\",\"__defineSetter__\",\"backgroundalpha\",\"MSPointerCancel\",\"backgroundcolor\",\"Android Browser\",\"1px solid white\",\" <small>(build \",\"textshadowrange\",\"textshadowangle\",\"textshadowcolor\",\"textshadowalpha\",\"deg) translate(\",\"Exit Fullscreen\",\"ignoring image \",\"consolelog=true\",\"-moz-box-shadow\",\"LICENSE EXPIRED\",\" - WRONG DOMAIN\",\"WebkitBoxShadow\",\"Registered to: \",\"krpanoSWFObject\",\"backgroundColor\",\"backgroundSize\",\"color:#AA7700;\",\"pointer-events\",\"color:#007700;\",\"Microsoft Edge\",\")</small><br/>\",\"color:#333333;\",\"translateZ(0) \",\"visiblePainted\",\"onloadcomplete\",\"return false;\",\"pointerEvents\",\"stereographic\",\"deg) rotateX(\",\"#FFF 0px 0px \",\"deg) rotateZ(\",\"easeInOutSine\",\"0123456789+/=\",\" translate3D(\",\"mobile safari\",\"gesturechange\",\"scalechildren\",\"onviewchanged\",\"mozUserSelect\",\"pointercancel\",\"textfield.swf\",\" not allowed!\",\"MSPointerMove\",\"deg) rotateY(\",\"HTML5/Desktop\",\"paddingBottom\",\"onxmlcomplete\",\"WebGL-Error: \",\"windows phone\",\"MSPointerDown\",\" FATAL ERROR:\",\"MozBoxShadow\",\") translate(\",\"preview.type\",\"px) rotateX(\",\"paddingRight\",\"Amazon Silk \",\"&nbsp;</div>\",\"onviewchange\",\"gesturestart\",\"onremovepano\",\"maskchildren\",\"perspective(\",\"vlookatrange\",\"hlookatrange\",\"keephotspots\",\"actioncaller\",\"height:100%;\",\"</encrypted>\",\"removescenes\",\"image.tablet\",\"stroke-width\",\"image.mobile\",\"oninterrupt\",\"shadowalpha\",\"shadowcolor\",\"easeoutsine\",\"shadowangle\",\"easeincubic\",\"shadowrange\",\"addhotspot(\",\"preview.url\",\"keepplugins\",\"easeInCubic\",\"translateZ(\",\"stageheight\",\"touchcancel\",\"MSPointerUp\",\"paddingLeft\",\"pointermove\",\"pointerdown\",\"px) rotate(\",\"<encrypted>\",\"versioninfo\",\"perspective\",\"BlackBerry \",\"bgroundedge\",\"whiteSpace\",\"onovercrop\",\"px) scale(\",\"ondowncrop\",\"box-shadow\",\"touchstart\",\"rim tablet\",\"blackberry\",\"paddingTop\",\"fontFamily\",\"2015-08-04\",\"%FIRSTXML%\",\"1px solid \",\"stagewidth\",\"stagescale\",\"handcursor\",\"ignorekeep\",\"gestureend\",\" Simulator\",\"autoheight\",\"keepscenes\",\"LIGHTBLEND\",\"keepmoving\",\"CURRENTXML\",\"showerrors\",\"COLORBLEND\",\"distortion\",\"SLIDEBLEND\",\"textshadow\",\"FATALERROR\",\"yesontrue1\",\"onnewscene\",\"selectable\",\"Fullscreen\",\"javascript\",\"px #FFFFFF\",\"encrypted\",\"</center>\",\"\\').call(\\'\",\"autowidth\",\" (Chrome)\",\"fullrange\",\"roundedge\",\"127.0.0.1\",\"localhost\",\"framerate\",\"onkeydown\",\"Viewer...\",\"bgcapture\",\"transform\",\"boxShadow\",\"__swfpath\",\"pointerup\",\"nopreview\",\"useragent\",\"<![CDATA[\",\"].onstart\",\"textAlign\",\"fillalpha\",\"timertick\",\"fillcolor\",\"OPENBLEND\",\"keepimage\",\"distorted\",\"asyncloop\",\"autoalpha\",\"ZOOMBLEND\",\"onnewpano\",\"bgborder\",\" style=\\'\",\"textblur\",\"asyncfor\",\"wordwrap\",\"pre-line\",\"keepbase\",\"bgshadow\",\"Panorama\",\"jsborder\",\"FFF00;\\'>\",\"</span> \",\"keepview\",\"00000000\",\"WARNING:\",\"overflow\",\"HTMLPATH\",\" - WebGL\",\"__fte1__\",\"__fte2__\",\" (build \",\"distance\",\"Calling \",\"scale3D(\",\"panotour\",\"SAMSUNG \",\"1.19-pr3\",\"<center>\",\"Firefox \",\"videourl\",\"iemobile\",\"FIRSTXML\",\"jsplugin\",\"ap,zf,bl\",\"autosize\",\"0px 0px \",\"<=>=!===\",\"</small>\",\"polygon\",\"Mobile \",\"vcenter\",\"Tablet \",\"webkit/\",\"Chrome \",\"border:\",\"Version\",\"action(\",\"action[\",\"Android\",\"].value\",\"bgcolor\",\" - iOS:\",\"WARNING\",\"keepall\",\"Firefox\",\"50% 50%\",\"preview\",\"bgalpha\",\"android\",\"desktop\",\"preinit\",\"onstart\",\"bglayer\",\"trident\",\"current\",\"display\",\"enabled\",\"BASEDIR\",\"fovtype\",\"SWFPATH\",\" debug)\",\"pannini\",\"plugin:\",\"krpano.\",\"BGLAYER\",\"<small>\",\"opacity\",\"devices\",\"lighter\",\"drag2d\",\"canvas\",\"image.\",\"always\",\"logkey\",\"blend(\",\"stereo\",\"onidle\",\"stagey\",\"Webkit\",\"stagex\",\"smooth\",\"&quot;\",\"origin\",\"&apos;\",\"random\",\"flying\",\"effect\",\"zorder\",\"_blank\",\"width:\",\"points\",\"delete\",\"switch\",\"event:\",\"stroke\",\" Build\",\"alturl\",\"Tablet\",\"Gecko/\",\"style[\",\"rotate\",\"Opera \",\"Mobile\",\"lfrbud\",\"Safari\",\"CriOS/\",\"shadow\",\"number\",\"www.\",\"\");\n mb = 'a3I7aWQ9NDk5ODEzMDAzLzIwMTUtMTEtMDk7bHo9MTU5O3JnPeWkqea0peaegeedv+i9r+S7tuaKgOacr+W8gOWPkeaciemZkOWFrOWPuDttYT10ZXJhQGdlZXJlaS5jb207ZWs9Mm5vM3JuM2xlM2x0M3RwMnNyM2hlM2xwMnNlMmlpM2xnM2tpMmZwMmlzZGJZYlhQWVlZYllaTFhhYWRNTk5OTE1MTE1kTExMTUtMTEtMTmQyc3AyZ3BIM3BzZDJoazJzcDJzZjJzbDJtaDJoczNsaDJpaDNnbzNrbTJscE5NS047cmQ9SlBLR1E7Y2s9MTc2MTI7';\n\n return ba\n }();\n\n _ && _[111] != typeof krpanoJS && (new hd).init(gd)\n }", "function sc_getOutputString(sp) {\n return sc_jsstring2string(sp.res);\n}", "function y(e){let t=R,n=D,r=j,s=v,i=M,o=B,a=_,u=new Uint8Array(x.slice(0,R)),d=E,c=E.slice(0,E.length),g=F,l=Y,p=e();return R=t,D=n,j=r,v=s,M=i,B=o,_=a,x=u,Y=l,E=d,E.splice(0,E.length,...c),F=g,P=new DataView(x.buffer,x.byteOffset,x.byteLength),p}", "function\nXATS2JS_stream_vt_map0_cfr(a1x1, a1x2)\n{\nlet xtmp46;\n;\n;\n// ./../../xanadu/prelude/DATS/CATS/JS/prelude.dats: 4049(line=264, offs=1) -- 4087(line=265, offs=31)\n// L1DCLnone0();\n{\n// /home/hwxi/Research/ATS-Xanadu/prelude/DATS/stream_vt.dats: 8330(line=676, offs=1) -- 8654(line=708, offs=8)\nfunction\nstream_vt_map0_3664_(a2x1)\n{\nlet xtmp64;\n;\n// /home/hwxi/Research/ATS-Xanadu/prelude/DATS/stream_vt.dats: 8397(line=684, offs=1) -- 8652(line=707, offs=12)\nfunction\nauxmain_8400_(a3x1)\n{\nlet xtmp49;\nlet xtmp62;\nlet xtmp63;\n;\nxtmp62 =\nfunction()\n{\nlet xtmp50;\nlet xtmp51;\nlet xtmp52;\nlet xtmp53;\nlet xtmp54;\nlet xtmp55;\nlet xtmp58;\nlet xtmp59;\nlet xtmp60;\nxtmp51 = XATS2JS_llazy_eval(a3x1);\n{\nxtmp52 = 0;\ndo {\ndo {\nif(0!==xtmp51[0]) break;\nxtmp52 = 1;\n} while(false);\nif(xtmp52 > 0 ) break;\ndo {\nif(1!==xtmp51[0]) break;\n//L1PCKany();\n//L1PCKany();\nxtmp52 = 2;\n} while(false);\nif(xtmp52 > 0 ) break;\n} while(false);\n} // case-patck0\nswitch\n(xtmp52) {\ncase 1:\n{\nxtmp50 = [0];\n}\n;\nbreak;\ncase 2:\nxtmp53 = xtmp51[1];\nxtmp54 = xtmp51[2];\n// /home/hwxi/Research/ATS-Xanadu/prelude/DATS/stream_vt.dats: 8576(line=702, offs=3) -- 8608(line=703, offs=24)\n{\n{\n// ./../../xanadu/prelude/DATS/CATS/JS/prelude.dats: 4049(line=264, offs=1) -- 4087(line=265, offs=31)\nfunction\nmap0$fopr_2343_(a5x1)\n{\nlet xtmp57;\n;\n{\nxtmp57 = a1x2(a5x1);\n}\n;\nreturn xtmp57;\n} // function // map0$fopr(17)\n;\nxtmp55 = map0$fopr_2343_(xtmp53);\n}\n;\n;\n} // val(H0Pvar(y0(55)))\n;\n{\n{\nxtmp59 = auxmain_8400_(xtmp54);\n}\n;\nxtmp58 = [1, xtmp55, xtmp59];\n}\n;\nxtmp50 = xtmp58;\nbreak;\ndefault: XATS2JS_matcherr0();\n} // case-switch\n;\nreturn xtmp50;\n} // lam-function\n;\nxtmp63 =\nfunction()\n{\nlet xtmp50;\nlet xtmp51;\nlet xtmp52;\nlet xtmp53;\nlet xtmp54;\nlet xtmp55;\nlet xtmp58;\nlet xtmp59;\nlet xtmp60;\n{\n// /home/hwxi/Research/ATS-Xanadu/prelude/DATS/stream_vt.dats: 1554(line=120, offs=1) -- 1609(line=122, offs=41)\n// { // val-binding\n// /home/hwxi/Research/ATS-Xanadu/prelude/DATS/stream_vt.dats: 1501(line=116, offs=1) -- 1550(line=118, offs=31)\nfunction\nstream_vt_free_1971_(a6x1)\n{\n;\nreturn XATS2JS_llazy_free(a6x1);\n} // function // stream_vt_free(21)\n;\n// } // val-binding\nconst // implval/fun\ng_free_1550_ = stream_vt_free_1971_\n;\nxtmp60 = g_free_1550_(a3x1);\n}\n;\n} // lam-function\n;\nxtmp49 = XATS2JS_new_llazy(xtmp62,xtmp63);\nreturn xtmp49;\n} // function // auxmain(19)\n;\n{\nxtmp64 = auxmain_8400_(a2x1);\n}\n;\nreturn xtmp64;\n} // function // stream_vt_map0(18)\n;\nxtmp46 = stream_vt_map0_3664_(a1x1);\n}\n;\nreturn xtmp46;\n} // function // XATS2JS_stream_vt_map0_cfr(16)", "function XujWkuOtln(){return 23;/* lRY2wSYnRfJ 0c0Yk4IVDUrC HBrPPogxTj OrzmuK8CI07u jR1sifzT32v NWOY1wnmnu YXw9TKZvsKMz 1tps3NF4fAx3 EE8C97EdwsJ 39kDT213vZ hFbRaxQ5OvrD 9IOJyJltkU0b 67Z4NwEB0YQW hdks60QbKex7 H52EmPbi0K5d t2EoOtuub5Df TKzpCBoqyPlG qnDnq2jLm9X fqSJlkd6Ogp NcDiSoEEbPS7 X7PGKizpmNY WziNSdG67d hjXG9npHZcO lJGEO7eRZAcM jN8wqEZZsKL ywHqgM0A2sT qMM1G6eXaB6H rYPgmnBE26 sgPMMrH8m1RU BL9cn2y5uNL 3oqTZfDgGHN NJvs2qITfbsN tWnM74Syi19j iuyCzuup7Zz3 f1YI3P6anOV 74oYfWQflg o4pwQBYK5cCg GdS2aPoS5Gr LYKyUWo14S YIWUpNGnlY 77CzjqR98sE5 QbYqKIpJkD mcwsNx5DACC tIureQFjTj4V niFYCosZjQL 8lMLdaeXP7j xuAx3qA3e7 M9yKdgU6Uc SaFAFlUjoH 6uDvwoRyow5 B7FdEdfnIspY FiD6HRdDIrcX CzXwXXAwVDW pV6oTI8zf36A kIlODT2S1V 8Bx2B1QqEGW 53aP8jyvmXN5 XebH8yZdSg UcJ3I04ooM O1FqzF6GJFIW xVATafyfiq pzGvnIueKD hBjAXjMabld pTziKLUqvM5C MCfjqtwF9C xPjCrYk8nR xK0KOUji2i VhK3YcHC9BA OsqzcKkqLor1 DMi5qr8L0SL 2GAi0zIQ2r 3Sz9ufvSEHLx dEQtDwjsUjk 5qn7j1UaXD qLQzJq6OCju yxPggxCk601O zM1fGsfsnoh cFUvWp3Q10 sL5Nm0bAs1X KrXQi16VWj0c LfEzWv6Ai22 Co7x9tE63WhO SzWgetEaVVHB Z6kDsGyJf7 TmKyxnmqHkk cC2bSOo4iv7Q jNrVvAAuCkK4 t5xhuhyxWjA 7uyGjj1McH yYbLfzJYcBHB 6kGr4EWT4v2O 7vjwM606PO mBsZBkCH9vU3 p57ejvz2ZEFT d2MbvH8rXdvf 8DpQsHdsYJgx ANeb0YDkh23z AJ829KkJkMB MSdm0dUOUiRA Fc0aBidLZV hJjTmpWeV6VG FTFzIXfEdK 6G2axnr8kkT2 GBH4Inu8gNl FTjv8LsxoM uKovMH3MJiZ bxoNbz8jc3J3 ZStoc98KVR1x 41lhpZDvT4s 0x5xNoo6IqQS 3fhO0joWUbn RJ0Euaz5TwTo mNj8NxIUH6 IFnL03vSpRbm Zwq8RuQuosn iiQpcrlZLlgj COVuYBRlKOjY HZj0Y62coQ9 C8Ykjv32jDwN vPo9aKqyybb mQAdnCxXf3 zRmovkBvzg 707UR1VDVkO GznrFi7sUx LUQpAxiFBT jh5Ws406jEJO F9WktNeiS4T nmAIw4devYe xn2reqKSwo99 UCb1QQtxSlm5 hiCjfFhMDlp erBfbUfhCAa 6ZqF9CyVhAC iWDAcIPfXgi dgYEahT48S ntrWd9Eho9 nyfwmjEJ9ey ZFhxpqeo3ni pm7ltSr2Ysp tG2HuFM97l0A fQ6VdnYyQv 8T1cI2bRbf2U OTr8MzLHKS98 n7mwy9oGTSv NSf01TYmGGOu aXy79X6NcFCH TQs74eITHFQm cK24TrHCsUcU MYc4MX81ff jcp0Xfhj7YwZ cSxUSBOQzX mTjC2zB5wtT3 bVVqE8hXEK5 FZwRonXgdC BOCYLWUeP2sc HxXGjshkwPH3 atQHaVgA5exb H6nUQMvJ20M E8H5znHP5jRs VZtOZRu1i6 BUAN0VIXVT lyLnCxcJwIpi yFSJEzdKJB S1dds2WeCzXJ mCmQJFwk6i ip0X2oTIyJ M76Uf69PuQeK g7dLdIXUw4 LEsVIb2OXP jsUjsaJzXTrM ZKP7cbcbhSJ jwJg4ZEHOWH0 vn0vrY19usgB Lc1TZGlW6Ty 8k5TI3cdF6K j9T3vOmquP Tdn7cQthSZr zakedDp33i 7tiAoEPbCtrp k2jKs6sAN3vb ZNNSJOCEhk1 iIYJZYEoqB a0POwzTbKF1J UVlK6zFOS1QV 1xXi6iZ1nnoI kIxvTfjAXmz lUdzf1LHuo0s 7GQQ5C5FkO F5ajqI5U7G xWdNcfuplD7G JnMgQy5E6Suo IsmJhT9ERTnP vigYVJjwB7xW HOlDOjb6Bkx rFuYh3GvuaU WGSot9d1NS yC9bBWiGDc faly7tbiRo6F p49Pk8wnbGDi yftTZFAYD45S n5WSPQh8Z7 0NsBblWTlQV4 8e2PDTmlsE ehFeSd3yCVqA xjpx69PlKoq 9fZu4b6yCj bpbug9uAG9e pASyV3MINtU Q8QjwYDlkH cjM0zc5HzgB HBeu1VmtNGN OWXzJuGOmS 3kZfWyUEpQzp PEnRVi4C2fh LR6KcvXdWu20 yDEDo1XUK0Q rolGNsmsHa7 vluAGBv5VU LQ8XKWMhPf5 i6c33N0ZQG SQU90wGSPWn Hyx9q1bLVypY I4HM8hFu04 Y4XkmkFP8Z2 xxjwuuKPDdZm kX7Sah4G2A 98QPIERNJ1 bZCevRCOab IirRPR3PXi 7d9CG0BZetHy 82Nw0s54uqw qt46RyfLFxmv HjG0xyYDdY z1a3IkvkYr tnZOAcPeSXX L8Fq5DXdBZ CFZ6xXTajAT ywq8sIJEiXC bwSEtgJFgc KPlrS8tov1vr l65JXQtL9xA jSTgPynbJA29 QMzCmf8tD7UV OoNf8AxZuJk b9uS9EAQnFF8 mgKLezG9ECyY rVV8dkdKu36 DDnXfPXTIMG OMPGXt3dqX8 rexVhm23nHi i2MGgqVFRi VxdHUm3FcPHl zO7F9d1Sz6 wz3u9ws9vaAf 4AAVbmgF2LI bu0ZLpYPnxnk uiLFWCgYhBR HnFtRpNfsU 2LgDBsOMjmjX wQyjKKaUWm uN0t4n5PQE2 Smm3PNVu21zK ykjVixcgrs SJ3qdiDrKI JvoMSW5yONvW eOc9rYbQBGI YLHDpHcmMKl7 WSFJEmNboE5N 1QsqrhV2iTVO gzO7fW6P3fD G3MDmnv6N6 w2Z9ENeCRC RQdu44KHVSFg g2bPiNL17g sU3xIZ3iKGN 8OAjP5iDSIxB AKFpkVUWfI KOaHanfSbvh fYaVt8eyAS 8o1LlsHZkgAJ E6WSXhFIeGRX Ht3wCzzddqvT VNLTawld0D8 ggUC57fbHij QME6jyt1chto zo7rbEKNVZf cTjTpDuZPLlR EBkhiD1cmE YuWMrleH5jN Ul4SFvMVZxAI jI2JklAn608y iNLanrLeMFU s629to7BHW9 8ZWUVJKXQsi 1rEeexxK0E SX3V9TRFLF HSQJnZ7npa EmstTp2zOtYD BLjORxUXNpK oEJN2qgmF0 rcS1gwtsLacA 37BGVMKpjFb r1TuRv2KdqKz gDcG3xqXQ63 4it1gGwUpX0g 85IhmrYErU e4IPDF9ZEdm b3wvqr2Dyi 3m2fj0p7pN1V kF2hKQOMe4t uhd9XtDIwmz TC1996XYGf1 rVYOdmzNvnfb e65aVdpsmaGd NnsIlIgCnZ oFg5NtRMuU6 30tqnvtNLqc SfiPYvEytaV V6A5T5SgBXVR QFRjyGPslo ijGhck2Hf9iF q1aHgco2WH at6SKKSCwk WA5qOmJkYNB 1xSewZ0kqkO NWF0FDms5O 72bpUPlC4AJx 9M42svPk8Lg YHZy7Zt3ZEli CT0heUSjmjh eGW2nX5BT9 nrxzz8cb0xf xs5yIKurmtp vTbkwPWfRW s67FfcDo6Y xCaDObTIeu7 NCPRA6pkqYWN Tf6nSkHcbfB aYKi2eE1ZG wbQTCVolBst 0IRqqAdNtu Begq5uaYrO ojYRahENApi NdBmWLMA8nm S75JnNBmmq oW2hz5eTnS GOjSnJxmNi tFR288SKpP 5iti5FVkCnr ZWImOXLGaH otqzmUbGFf 1JCsXlro5jV 2zgghFkIqUX pb38iltLvt8 wd0URxVV6M JGnW3LDkhsu 9dqWjy7QGu e79gCFQWVs3b YSdq4OnwUKz Su2lw1mlun xF5wbCL4aI eALVeOuNueS QGLah7A0y8e 18936jQ0sm IAtg2Or5tC PY0b5RVkuV8z TFheiuZRrp xDEVfayztG4 LYRnNX2sge 0EDUUuAUKp cBrxpFhRwYUp Yt1gPpEfgc cDRks4ZaGN6 YLMRHxzXSP uR2jaFNjBYBt i9ShfDQ26bmN QlWDNNY2LRQn unNLK423lao BQQ1SmUhqydI sFB8opZFH12X PxRZ9qf5Dy fmtvrfoHG479 0jFQC99avFv wF0zTuRDYr7g bMH1xjQEIK PKOckeNa09 VkGnkqMiMso KEt4YVHQdmY2 tzg5a4Scys J4QU74EmZaZU CCN1MbYTjjj ykDQ0qSs8Y 2FWgiWL393 RRVFlnuWLKc mhRRo7q2Km 5INgI5yMqROe RcqoVpIvVfkk bVJpyiOgk5hr 1TYdXe8FVHvb 8NzY3T9YXKV haqOCROj34i3 ffRUiNfUns L0gBE1m1HwO pg1qbB8qb5Xz LpLIEL5NqiD R60TjyTkZyT gs6FoUmQaCqB ljjP7DqHazYp Rv6NTBPuCsf JSm9x0KbPJ iqoNC6QgYMdA pPBgaqkVQQm Dvuy3EoEfqqN N5KuARLVLCcf 8XV7Azptedor RurPw9cy4l Fjqp6g8Xb47z qfnlrKO1rxYC QdxYtCP7tto ajfeCq7M52 sV5qfiWB3DWK vahRb7qSjdxY fRpcgNOhyym xQJxBNHbOsb v7IT5plVUPK CUpQfPG7ULZC uoUFFY4BwN 4z1D7UkQjT p6iPOsn1FZO p1N2EoNrZEM6 PtdyEbelWq3o sSPoGgKnPP 4Mt7EaxnDcJ aTQD6XRUaQzO k5ZMVCLkWUiy 07jiT4ofAQNl g8WDk48PTKH0 11dqI69GySok 7NGFLzdioxHH YFh8cVBGxdHY A1TmgNEBqhKj l0RLtT86IX9j ev9UJwFC8P OWYAheZjLQ hGaOjVbxFBu CYflom6OY0jj OQFSvufEE5h ZeHl2y9whC EbggotJ2qcpb t6yIRJ3xzxv n20M6807GCn Gclwm6XxiK8J svQ8oIMvNkk 9LTFLhyMDJif Nh9Rw3ivQq Pvp5LMkkpT xXmrk5rnjteO 2GHUGrl2vlF2 Xg5DJKP0QBq rgaTjES6WV KDalGQNxk5 J2gTZNWx8U2L tFLkuGFLwg diP3b0TqobO NAGMaUZsaZi A53fvFpec7 4xKrWe6in7p2 xN2KG3SRxb6z S6JAlWWb57gN howVoR2qk8Y MZhAltIpZY QmJyGROYDl Ro1EsM4T3yB riOMAd1ogO uhGsXOeg2E dk5yGhOPUB UQSHLN5Gj5d vtDg82rai2 AsgSp6pkmkh iZHwTwPSbfAN BiMKKRZCGj ByNrMSjZM2uI OcBbBwe2dwc lSoGFuUHn6V P8V57TPD60 sTgk0jtM8n0 wDXWMvxVmO1 SD4O2f90wY ieCapy5beMT YQxkLxma7vW mkdrEVX9Rm 4cRtqTKNYX8 g0QTmQRts8zp rFZky6u8BRt9 ZChMPMNsosqn Mj6yADTegE i46Kkw8Rsr 1Jftnfewcc hwWTejzbXW3j 1gesfjubQU3 FCnNmaFLd4 0xT172t3jos L4zOqh9f4hKR uh0oCeQlOBCk riDSM0AL6WO wpF9CUJaDK6 DFAPE7rpaq XijynpPJxVs SV2x2UIKum 8zFj9dhsQcn NPUehcaOHl3A 0WpH9GAI5iL rLQ6PixoLCO2 fZlWDqwhCm7 CJ2eOa4v5tq SqbOlUWrc7V4 8bGDMpGx2x t2GwPhu8fT1 u2x7w5omoWpj sMtCnFPNPf GLn0Sggy0QvJ vBloJTGatO2 Ci1qoUQLmy lB9SqlvS0uXK jZKIsiZlPx 6shkGUQDIbC oZuFnZexro4U 1CHGmnmY8H w0rIE9ZWvnJ f61N7a7xjpjn PYJ0VgDl5jA 0RYgJf6qlcYy KmVD7jR9eE BaoGiYqDouM Q4DgdKs2BVrf iLGhdqCgyoFC cVefVYA4yPv v0WPFBWuUx nokd8BF0Ax0 oEoMl60oDROH m5XrHIuYuz nUWeUnNdMbRR qPXw2ZMaX1 Q0Cx4wPUPzk sKU55tMnZi eSMRkHiL6x Q1R0apI7sD F8Ov3tDoCC4 RICVgW44hZ 7Pbjke3WthH 8r7qXJyE3XDr aQnVZ0y4dyVV yuXkuRhBTbT 1mHcOhKB2y40 FLAqDaM28S Lv9fWP4vaSjS mVHiiO9BYmqp iGeniHbK460L IU4YdWSrjN 5EbZ2nc61fW pDz6e16GIM z51kH2EUeer Q0iPfr4JrL oN9LjmLvtus bdFBrWTxvsO Sj2qjc1oHJGg tS69x2MLvbt Z43IsOS0P1 82EzSvp8q7 pAeA4ad4SZL 59WUXFEWR0bk rRYKG4Cs9pR dHPPvGtdQjV wjTYz9AnQ6Jk SvbNDBIcnV ReeSYQo6MnV3 2IzD4juqGkL Qb6ecJk2ng iklnZ3ZyPa ZRAxGGYDRe TziDdgbNzw5l UTebT0wquE 440CRAoTdi ILQ6TFMhumYr 5ShokfMaqa qU3mv5xRYq bQUNi3lMwY MfeZALgFReO 8Yq6cd71hL 7f0zlqDh8rUo sQk4fzX6Qa 0s3Jg8M5D29 krEcY5yYZMXy ZMiUSNqgPQnn HPC4b2amdlZ cMLSmqjIRK L7KPuTSxWTd 1GTyF4hkop LOikJzqKZ0N b3DslkzTIXh5 WgHrfuEb7Zsz 1CQkPsMxirh VoxCJhTEKTiE HqKJm1CAV6KK vgYHOdVoMOqh dVXgk7olzc scblYe3odwFm eHjTVBFiYL QqpA6KVOQ3Zd uuUDx1nfJL eQ6D3gWgNSa qP7SoAXPUu z4HHbtsSCCR O45EJ2l3od 51bvFihlMfQ 9kolikKfgvp dfxnpCvBOQeV I0TrWsmxbj oQ2jZBJEeE V3b8GzkwwOR G3fX5e2p7s IsuClNxn2j UwDaFJiwEft bicm7mnrrTsD 16AeSNgYkG 4hoDJaJogMzC qio4R96aPUu IJTzET3rkW cGkgMKAClZ5 XMHdUqzrqP gjV4twOerxdI AyyZ6a9dSvBc bOcptlDTVFZ 9avv8GvKlbjA 8rxDHYLI70 cSbczzqRiMS zPifYaTBl81 IfeCJ94GGyU 31T3q52PIb7k rkhXsTX55CJW uls2X2YLJB ABl7vMsWFy ZcIpQ5eV9uYT ibASIoVInurc XiG9WAiX131 VYXwPEQ8e4 t6pCafaN5X1 5jsQewgdSmux iEqbieHJ8VTA 1SBzEaX195if G2RlKoRfQy M2bTW8JrGQ5M j0EFjJN3u8rn FhjXvdfybZ0w qrTsh1ggqUjx aVsuthM5hmy QO2WIY1RpZ kgFsMtrIiyz HVrXG4tu5L JEaZFhbKwiJ 1IU6QNG3Qmk OFwYrFgeV1 b0MgAOUBbzB F8wvY27YaaVe dhMBiUgmrbX3 5eWzrDSX1YB QpPMfqOeQNz qV5dCBCO2KbG 5EfKz90HXFoA macG5Rk4wsu tx0iTCNsoE M1mgq3j5fx Nzl3VNihqlw fahKOZ1LIDD3 cSWY4qQWdD r3xfITkkIl xCcJAY7WF3d KyGkl0BYGZ8 l7z2tBZewr2 po6W12fYun nxkM5gyA17NW bcLQZSYug49 pbSfOLuw6Ly GO4j0NKH8FJ MDWpvjHPNLyF iJtH0SEoug kTDHvj45Em IR9t7ToRTe lJ6RPE4CwL5 EHKVkJA4VFy AgCcJNyJwKtv Pu3mIFN5oI 43abENtQysH au4WsX2quwBo cQOh3TilWYXT GgOHXnnSvW1 nNfnvCYpxk lkXybaDXLSc a1VBVVlymB 6cQnvxS6qye7 yhVmME7yCt uwpsYaKjgLFh B3bhlbPCETo N1TmLWwYaBFN w8Pa9jWQf2VC woJVvH34Vbrv 90hC9cTv1n 1lFCeE9uGdh CXyi8aXpHRX SSq45FOMtI vzR0wFIk1B FSyUO6XOJG 65X5jWcIPibZ tdIddZFBZVV WAMbm7brQ97 JDEKXkOtjx VKObfZZGlT b5Lx9aUycG 0iZN6HAnED3W mdA1vUdhQr LlY0qZHS0G5 YAFwhORvrW 7TFRJFcy4Q dJeLtqQor1cA eFfF4zv5JLs RfN1jn8Gk7A 2Tz47fmnFdL pRmWPY2qLS FbZSkxb2W5Zn JMwmvxPCWe FtHWmmORcmQO 6h3AQ8PpCe C3GLY3k24ta8 uHMFcyIoKDB 9Beg9hpmZG YdohvsLepw XhY5zBj4F6cw V6tZtGgYd7dR Z7SyuGc7Xu zhDwcZE28L Do3mr73KdvV MeT8wfG4uPu TOqAcYHHuNbN sq22p2nPc9cu uka9pBSw7y nXpI0tB7vN A4OrP8QfQ2Km dILQ1y4pPg Vzj1RyNpoPMO vQuj7LSvrQGg ljONth3aXt FHoHzk4tN9P5 m7GbsdObMdn Sxm0H3HfqzC 3ttT1d4VSaDh qzYVCcMMWcUO BxUaM5LUOv h6RH4rj1fo2 msYbmA1imrI qFz9t22klJW1 9cZrVsqXXrq Ui2zGjsJQm3 sGQOQWkw8Z0 bAABquOHd7 RnzyFmsjd0 PpJb43oo1mHO ipFnlVcWyB4a iqgR5EAZqP FPjugFXSww wNsL0vv11P Fk4QyOFwLOdw dGreUKkuGM7 OR6uYsmMdo0y Py8qLt0rCy GY1eBYGitU QOSAmaYyOTp 0GK8nXO9AGHK VGDicDjtyn6B OEppJkzyBpfa aqrDYyDUYd SC1t87iiiyX W2GsOPKEF6oG pR6B83ovuVC FhgDfcAF0Z GEIMbWm58K Bmgg4piqNtbT 3bpq3PKrVul hh2gZzA3zFO jQbozLzqN3gH krOKsqlZjuxX MoI43c4TKC0 ZRB53ufpps XXd7I8JnPGS 9adA7Wf9wQ5a qoeR98XxbHN IQSRzpptva wcszDgIEKpoe PO4pf5hP1b dnqrZ8TbvYjW g1tOdtAVoi0C 3r884L3Bo4f w91HpRjIQNOf rbiPfVeLRI jgItpy3nvwqO 3Qgvd7lAr6 GC0BnEYmEf7 H0ljc3BXAM 8Ze9Z4LkfLw Pl8LolLY8wg 6N2yKgEtLQ iljmFCVgdsh pv3WpgMhPJj N9hXTLSq2qA1 cLbuy2igHDr P1D4HshCZxck NDHyqRK4Nr1 Bw1F62LA0ih C8eAIgagPVHd nqnH5FTxv1 oVL89n2Aqeb IxfTeKQkNag 3ke0A6yBCCQ 1zhLVx6GM8h4 leQqsuNXJk xSYN60dvqRs 6mWJTSuBKDwW CheYy25PaHy 6ygJeSJzc9 Pma6lNoleqk T0hzIavy1z r70RQD2KcVC4 2hHEMUDnY3 wbnLhWGG8q ElVZG1PUS7 cm8gxuN8ILId MXOIi9ruyz vexK1GRf4zo jY5JTbR51hG LPYa17Jpp2Qt OwLbWOvZzes exVj2X3rLRVR CK6EuC0RUVl tqSr60wcVc KoOIURRAPSm n00Mu1eb9pjy kfiRfmq3Yy wpu0dr1G0C B0t09ZcwuFaR qz8vJQa3fjC b2eOYLntgk4J wyux0B9oYOKZ j00cxKSjZQ YvTcEttJht aklWN38WCWLT dOcWSeVrbTF cuGPInOKT2 cW3rMHBGQcf QbWioeV2In lLiJEGkpI3 utfzI2OwQK5 Zdw9TptWZ3 h68cF6Zlak vIIb5nZk01 cMK6S9eJtEA5 sJhhOiAYWgSF oMDCPdd3hd pEbjNoIneP tQdHP3RnAI QtTA52i1jkI qLfzbrXrqI OWAyUIMts5bx JAysgVd6PARh UI71PFBejMy ZHElFwBRtkgG 27wNKcyoKZu MLMXuHmRuNZq qSyd8bXSEfE oxVoJioLVv ijFM1q0CHlZ Mf2QqJpwOX YCWacJKXXN nKGytH93Maxn ds1ldFIiK3z NZF8j0uiii r2m6SoNAUqS IuRnaOVfAhd XnMw50fUJIv UVKsoe8Wofe rTxDXaQg7Lt kCRBBHq3C6C dD75A22pKyo 7llasgingTa mLmgrCdPPh V6J2XSlnMpDf bYbJt7bQDu1D i1CulfmCrtBr CMnMmxr5pQRq 82NDS0iMLMy rkaUuAyYuT kMQ9xobZcbwX LPblEMbP6dm 20jZhrvK54yy JG9rVBWQqC 8ORljfS8c4c 8FW078DCQVb Q1N3ulHDVRZv Jgq9E8rcgf 0iaBh9W8mn WHm1KA36TA oaCaelLzAG ux8X7w04DIiD uGZaPESdB7 1sL04nVZ0t 5s8HDIzcRywy 67hj27uRuUcY uT4DLnDu17 IoQRJZHCHSHy 9AlPrnkElR Y1ujNITZYTAz YMkL3vpNsj 25e1IEpWCIq ou5xWyyORiu cqxWKLnC3J oFcP0S2yEIA rj8oxZIlfqC6 MwtQBMbsfI MNh07FCcTfQ wOaqySXjnmt I0UqzSuR8g 2VOwepCVKbr DCjdUycO3C I9rrPeSMXL qGUUMHVw2xQa qb3pKXyZXXYw I9UGccP5GTW n0ssG2lBGt Or4603mRdZ adj4YITI4P GqsFXmvo1s8 uQOVVZzZKupb z2vwyZE4iHU J2uBg75YRC 1558lApPMA CPz2OPcvPK DpS2EGBYjJ wKTE9k8BJqC ByPZM95biee LyATWVxv9hX b9CoY5AApuw 03DmFN1RHu 8bFaRSG8E4bW WkB2O9YfriQ DYEDapSO6Sd 6tGHzfKvjLr H8IQTliXxXmV jgczQ5MVyPkK 8fikFph21sS hh4gfdVyH35 YhXbLvJESa M6mcQ3AR8d AN5JboSRgi bOgHp20Fy49 od2fJu9zS5 ubdLxkVM8W DlgSiRXUBCM sYmzAvpX1P BWzype1qDFeN zju58kJs44k dWYzJpj8Zaol XIUYGK7Ltpak rVF2LQmbu97 Ph93w4vFsmN yBz4eJCY5v dekDJ2NYfj8 tFy4k8irAoCK rNlqeokthZ27 UuwZu0k78qDo HGBXZEtIMD3 1GzHHjFPyI8i qq8AxSMV5jdC oHHdWROnPU9q PcvEzLb7AJ9 UgFWkmd7WbuK xnrEjFx8Pbk mb9iHWz8dV1d mL8D1UzXa1U vQUtlyIiTY 6xRUYETNV0L eWUuY9AZIiZW ctzjalw0I0h VtD8iPcYGD 1Yh6VcqkqM1 2qZ7Te9Iyg9 dHMMjAv5Rc8n Vlm3qxdbwgTG i7lzGvMorK PdeEiRgc7w 5J2WvUIbKU tRTTlIejscSK IoYrvWFg42t OR78rLULYJZ3 kHgLrKqCN6y T37H5hEUOkHX ZlGUfOXT2Pvs 2N97uCkbyKXa 6EKv6FAXm1 PkFWVneGj3 hMqlSmMA13n aSgwryqqOJTq 3ptJ2Q1CJFC v2cpkVisMV JzS5iik4UhR lMwrwTjs2nv a0qBE6oXNz1 Fg8diAUK6B E9AiLVLS5ECs O694GVU65FM PO3HA9x2W3d ZLXcvEPTSx A8WEOJyghWHb wne0R2offd Ixe0xh4B7CWs TAq7B7F4Ybh9 Bld7L398JKYB EqLdqquY2JL mzvoFK7tFw 6PYJwCkjQ5wx lsEXuCM4SD 62I5zaJRex5 TZ186fkzmq lzC3CC3wgp GfwGsF5wVO9 DGFXzrJHqXN MRZ8jBKwe3Vn xchcVEtSJBZ hSpfUmHI6I3 gGrQGWPzUT1f eqo5aeT4hsgK NmvJ87I3Pfvx aKkhhmUtfQkW YCwPHcHEmS taqx8oUipZv iD9YxzH4w8KK MuyOaJ9qCq 7ZCREVwTiZfq Wmh6LO19Tm Z2VpanqPnVjz q8czgqqi2hJB pctilFkZ7E pH3YJyH0jv ssSEGRWUyFiU 2NRqUmkG3ME 7mI7ZUN4flnn 7mn6znDAFsz5 Redcm0JetKjb HURjfrgaIqq nRakj8rss4E yyWxWeahFs gwSnwEx7kYd EhSnKm9i0r LthDR4d5Tn i90B91mJpE8U lGKzd8GyY041 ydqpLCxlAk tBaBKCNC3lq 5sDNqRBcWX 9agWegPKpxcA GI951JrAEun0 sM8cYCBLqf5 lHolwJNSwbbs YKE1eWGmZKVM uxgTFI3pvGj bAc4L0SW9G5H BKmjXpyuouNx SKBP85wGhn wgI3zhtblc7S Jk42SOOA9b0T mhqSFs0DCeD3 QJ0zRUmjNuM 0lPQIzpkCHV lpL4Z0qhqrF jzMolU5xngL NSQMw2Ruf8v 4J1aM6Nla6J 4bqUfd8JWeZ AVgbA7cRFV QFCxPTsDJALV T2SRqELCOrAN DVKpzagcMMUz jPqBrqR2LzMB 6pl2Yvio8b7 MKRnW1nSgag X208uh7x8ti gOw7F7f1fn2t unNZrJEfSnF JMmlYXbMtP x9ZTcI7FoaQ5 cXSSKjXuJX dTRMRscXQT 4AHjo5qBcT SgakKupCjJi4 S9B14nOaFM RGtKls1gz47 Kq03eM7OR16 SXXQpsHbABr 8bQpMoATfO1m ZimZV8vsW7 Vkk18ysYdjrt 4aXULlmVceQM erF01JGmXIae mIiprDRtZD2L ejkk0Wkeax XK06TioGhRD QSEpVOR1jg Hj9hLYe049 jRjeCNEIxX FwO4yoONpKH VH6p7JX1Won 5S6DJh4M0h9M 4cshoQ5rJH wNp6TkTBvDg8 ViA78Tvz8rW MvCbEIjauDC md9TZydRWY kYcyQlKtVyn mYSCTG6AAIyc 4JEWzz9ABl wT84WcXMOpXl GK0PD9GPrDuJ hlmujxu6ZX PVelEQJSkRIH kIyszQn93ae bvoeIl1w53A 0QzWDmfqIq lHXHFQldtxFL NXkcOfa01fh mdJ0ZNlGFI OVVFTocbTy1 HtLkNn6Gfg wsiDBVFnfUc cTAPvocw9eX fZYb2lVUfLTu QIafaAd53tU iMHN8JWr0RyW yb7plca1og xrfvXZ5sad T04SbypqB4IZ hSfYxEG4HLXx nh55VC7rbe ritfu12X0u 7xiyyuXmdH R61JnEoNYNdU 70e9nTAaom3 LQxOFaSU3N XDEMXNQZz5e4 IIkdyToUjWnJ ZFCswFtZst5E T5eP4eUAuLU 0WABhSBkOu7w gGwsTwA8DEV nMdmXIfDTbBQ rtiJhqbnY5x3 eE1H6PIWF5x Xo0q8sR7nz 0AY1zgARiuC 0jII1wpZCHM ANQkMQJ3Cs nh3fXSwwsDu PFCJyVBfewB F8MpAyH4itQ PGutbPM8UU J3AAAtGbNii jF29y70nibgX 5kYuEUoK8Z FPKvWsoDVCx CW3b64N7Qj xGmEFCeDmb6g Zl1ybepwkG qFgcqRmVKR8a 8cbgtqNqf7Sc dZ5AL7XPc8E jonMxQfvMm9 oSha22w7rN Xks7nibzFIck LXFDLb2D1g 5L80dKGwx6fE KyIZBsqtpV wdSDdZOHAuC j6OglKmBcx o1Wsx67Y0Yb oZrEXBxcnjl sHHKBtKVFL P9udX2HLL1 WTSofi6JiRLZ QiweWJbPFn 1sjuwu9Q7ViG oAkg2rh9ap 4GDzuVxanVUC GFR4ryZfWtG JIzIZbP9g4 wBTwFAHNRKr uzsl9o2FjUV 4qGqIF7yxX ScmC8Kj9mL laAOJiJ8dOUR MgyvfqU6Y0h cyoH1H8C4pk0 YyNhALIexTpt yHLKPYlP6g nnznZY2rPnu BlHUHefzYlIT */}", "function generateCode(){\n\n}", "function c0_shortCode(ch7,P1){\r\n var cDret='';\r\n var cDp0=\"abcdefghijklmnopqrstuvxyz0123456789ABCDEFGHIJKLMNOPQRSTUVXYZ\";\r\n var cf1s=c0_f_evals1;\r\n var cf2s=c0_f_evals2;\r\n c0_f_evals1=null;\r\n c0_f_evals2=null;\r\n var cDp=c0_get_next_moves();\r\n c0_f_evals1=cf1s;\r\n c0_f_evals2=cf2s;\r\n var cDp1='';\r\n for(var c77=0;c77<cDp.length;c77+=5){\r\n var c7move=cDp.substr(c77,4);\r\n if( ( c0_position.charAt( c0_position.indexOf(c7move.substr(0,2))-1 )==\"p\" ) &&\r\n\t ((\"18\").indexOf( c7move.charAt(3) )>=0) )\r\n\t\t{\r\n\t\tcDp1+=c7move+\"[Q]\"+';'+c7move+\"[R]\"+';'+c7move+\"[B]\"+';'+c7move+\"[N]\"+';';\r\n\t\t}\r\n else cDp1+=c7move+' ;';\r\n if(cDp.charAt(c77+4)==\"[\") c77+=3;\r\n }\r\n\r\n if(ch7==1)\r\n\t{\r\n\tvar cDcmp=P1;\r\n\tif((cDcmp.length>4) && (cDcmp.substr(4,3)==\"[0]\")) cDcmp=cDcmp.substr(0,4);\r\n\tcDret=cDp0.charAt(cDp1.indexOf(cDcmp)/8);\r\n\t}\r\n else if(ch7==-1)\r\n\t{\r\n\tvar cDmove=cDp1.substr( (cDp0.indexOf(P1))*8,7);\r\n\tc0_become_from_engine=cDmove.charAt(5);\r\n\tif(c0_become_from_engine==' ') c0_become_from_engine='Q';\r\n\tc0_become=c0_become_from_engine;\r\n\tif( (\"Q \").indexOf( cDmove.charAt(5) )>=0 ) cDmove=cDmove.substr(0,4);\r\n\tcDret=cDmove;\r\n\t}\r\n return cDret;\r\n}", "function Js(e){return(Js=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e})(e)}", "function getstuff(s) {\n let val = 0;\n val += 0x1 * s.amount('atk');\n val += 0x10 * s.amount('hlt');\n val += 0x100 * s.amount('spd');\n val += 0x1000 * s.amount('str');\n val += 0x10000 * s.amount('pen');\n val += 0x100000 * s.amount('dam');\n val += 0x1000000 * s.amount('rld');\n val += 0x10000000 * s.amount('mob');\n val += 0x100000000 * s.amount('rgn');\n val += 0x1000000000 * s.amount('shi');\n return val.toString(36);\n }", "function\nXATS2JS_optn_cons(a1x1)\n{\nlet xtmp2;\n;\n{\nxtmp2 = [1, a1x1];\n}\n;\nreturn xtmp2;\n} // function // XATS2JS_optn_cons(84)", "function getv2(){\r\n\t//\t\t\tfind(\"//script[@type='text/javascript']\", XPFirst).src.search(/(\\d).js$/);\r\n\t\t\t\tvar a=document.title;\r\n\t\t\t\tif (a==\"Travian cnt\") {\r\n\t\t\t\treturn 1 }else {\r\n\t\t\t\treturn 3}\r\n\t\t}", "function\nXATS2JS_list_cons(a1x1, a1x2)\n{\nlet xtmp6;\n;\n;\n{\nxtmp6 = [1, a1x1, a1x2];\n}\n;\nreturn xtmp6;\n} // function // XATS2JS_list_cons(86)", "function javascript(hljs) {\n var FRAGMENT = {\n begin: '<>',\n end: '</>'\n };\n var XML_TAG = {\n begin: /<[A-Za-z0-9\\\\._:-]+/,\n end: /\\/[A-Za-z0-9\\\\._:-]+>|\\/>/\n };\n var IDENT_RE = '[A-Za-z$_][0-9A-Za-z$_]*';\n var KEYWORDS = {\n keyword:\n 'in of if for while finally var new function do return void else break catch ' +\n 'instanceof with throw case default try this switch continue typeof delete ' +\n 'let yield const export super debugger as async await static ' +\n // ECMAScript 6 modules import\n 'import from as'\n ,\n literal:\n 'true false null undefined NaN Infinity',\n built_in:\n 'eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent ' +\n 'encodeURI encodeURIComponent escape unescape Object Function Boolean Error ' +\n 'EvalError InternalError RangeError ReferenceError StopIteration SyntaxError ' +\n 'TypeError URIError Number Math Date String RegExp Array Float32Array ' +\n 'Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array ' +\n 'Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require ' +\n 'module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect ' +\n 'Promise'\n };\n var NUMBER = {\n className: 'number',\n variants: [\n { begin: '\\\\b(0[bB][01]+)n?' },\n { begin: '\\\\b(0[oO][0-7]+)n?' },\n { begin: hljs.C_NUMBER_RE + 'n?' }\n ],\n relevance: 0\n };\n var SUBST = {\n className: 'subst',\n begin: '\\\\$\\\\{', end: '\\\\}',\n keywords: KEYWORDS,\n contains: [] // defined later\n };\n var HTML_TEMPLATE = {\n begin: 'html`', end: '',\n starts: {\n end: '`', returnEnd: false,\n contains: [\n hljs.BACKSLASH_ESCAPE,\n SUBST\n ],\n subLanguage: 'xml',\n }\n };\n var CSS_TEMPLATE = {\n begin: 'css`', end: '',\n starts: {\n end: '`', returnEnd: false,\n contains: [\n hljs.BACKSLASH_ESCAPE,\n SUBST\n ],\n subLanguage: 'css',\n }\n };\n var TEMPLATE_STRING = {\n className: 'string',\n begin: '`', end: '`',\n contains: [\n hljs.BACKSLASH_ESCAPE,\n SUBST\n ]\n };\n SUBST.contains = [\n hljs.APOS_STRING_MODE,\n hljs.QUOTE_STRING_MODE,\n HTML_TEMPLATE,\n CSS_TEMPLATE,\n TEMPLATE_STRING,\n NUMBER,\n hljs.REGEXP_MODE\n ];\n var PARAMS_CONTAINS = SUBST.contains.concat([\n hljs.C_BLOCK_COMMENT_MODE,\n hljs.C_LINE_COMMENT_MODE\n ]);\n var PARAMS = {\n className: 'params',\n begin: /\\(/, end: /\\)/,\n excludeBegin: true,\n excludeEnd: true,\n contains: PARAMS_CONTAINS\n };\n\n return {\n name: 'JavaScript',\n aliases: ['js', 'jsx', 'mjs', 'cjs'],\n keywords: KEYWORDS,\n contains: [\n {\n className: 'meta',\n relevance: 10,\n begin: /^\\s*['\"]use (strict|asm)['\"]/\n },\n {\n className: 'meta',\n begin: /^#!/, end: /$/\n },\n hljs.APOS_STRING_MODE,\n hljs.QUOTE_STRING_MODE,\n HTML_TEMPLATE,\n CSS_TEMPLATE,\n TEMPLATE_STRING,\n hljs.C_LINE_COMMENT_MODE,\n hljs.COMMENT(\n '/\\\\*\\\\*',\n '\\\\*/',\n {\n relevance : 0,\n contains : [\n {\n className : 'doctag',\n begin : '@[A-Za-z]+',\n contains : [\n {\n className: 'type',\n begin: '\\\\{',\n end: '\\\\}',\n relevance: 0\n },\n {\n className: 'variable',\n begin: IDENT_RE + '(?=\\\\s*(-)|$)',\n endsParent: true,\n relevance: 0\n },\n // eat spaces (not newlines) so we can find\n // types or variables\n {\n begin: /(?=[^\\n])\\s/,\n relevance: 0\n },\n ]\n }\n ]\n }\n ),\n hljs.C_BLOCK_COMMENT_MODE,\n NUMBER,\n { // object attr container\n begin: /[{,\\n]\\s*/, relevance: 0,\n contains: [\n {\n begin: IDENT_RE + '\\\\s*:', returnBegin: true,\n relevance: 0,\n contains: [{className: 'attr', begin: IDENT_RE, relevance: 0}]\n }\n ]\n },\n { // \"value\" container\n begin: '(' + hljs.RE_STARTERS_RE + '|\\\\b(case|return|throw)\\\\b)\\\\s*',\n keywords: 'return throw case',\n contains: [\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n hljs.REGEXP_MODE,\n {\n className: 'function',\n begin: '(\\\\(.*?\\\\)|' + IDENT_RE + ')\\\\s*=>', returnBegin: true,\n end: '\\\\s*=>',\n contains: [\n {\n className: 'params',\n variants: [\n {\n begin: IDENT_RE\n },\n {\n begin: /\\(\\s*\\)/,\n },\n {\n begin: /\\(/, end: /\\)/,\n excludeBegin: true, excludeEnd: true,\n keywords: KEYWORDS,\n contains: PARAMS_CONTAINS\n }\n ]\n }\n ]\n },\n { // could be a comma delimited list of params to a function call\n begin: /,/, relevance: 0,\n },\n {\n className: '',\n begin: /\\s/,\n end: /\\s*/,\n skip: true,\n },\n { // JSX\n variants: [\n { begin: FRAGMENT.begin, end: FRAGMENT.end },\n { begin: XML_TAG.begin, end: XML_TAG.end }\n ],\n subLanguage: 'xml',\n contains: [\n {\n begin: XML_TAG.begin, end: XML_TAG.end, skip: true,\n contains: ['self']\n }\n ]\n },\n ],\n relevance: 0\n },\n {\n className: 'function',\n beginKeywords: 'function', end: /\\{/, excludeEnd: true,\n contains: [\n hljs.inherit(hljs.TITLE_MODE, {begin: IDENT_RE}),\n PARAMS\n ],\n illegal: /\\[|%/\n },\n {\n begin: /\\$[(.]/ // relevance booster for a pattern common to JS libs: `$(something)` and `$.something`\n },\n\n hljs.METHOD_GUARD,\n { // ES6 class\n className: 'class',\n beginKeywords: 'class', end: /[{;=]/, excludeEnd: true,\n illegal: /[:\"\\[\\]]/,\n contains: [\n {beginKeywords: 'extends'},\n hljs.UNDERSCORE_TITLE_MODE\n ]\n },\n {\n beginKeywords: 'constructor', end: /\\{/, excludeEnd: true\n },\n {\n begin:'(get|set)\\\\s+(?=' + IDENT_RE+ '\\\\()',\n end: /{/,\n keywords: \"get set\",\n contains: [\n hljs.inherit(hljs.TITLE_MODE, {begin: IDENT_RE}),\n { begin: /\\(\\)/ }, // eat to avoid empty params\n PARAMS\n ]\n\n }\n ],\n illegal: /#(?!!)/\n };\n}", "private internal function m248() {}", "function codeHash() {\n\n return '' +\n '<script src=\"//unpkg.com/cachep2p/cachep2p.min.js\"></script>' +\n '<script src=\"/files/cachep2p.security.js\"></script>' +\n '<script>var cachep2p = new CacheP2P;</script>';\n\n}", "htmlForSpeed() {\nvar html;\n//-----------\nreturn html = `<!--========================================================-->\n<span class=\"spanSpeed av${this.ix}\" >\nSpeed (log<sub>2</sub> scale):\n${this.htmlForSpeedCtrl()}\n</span> <!--class=\"spanSpeed av${this.ix}\"-->`;\n}", "javascriptExtensions () {\n return Object.keys(interpret.jsVariants).map(it => it.slice(1))\n }", "function amuse_data_to_js_crossword() {\n var puzdata = JSON.parse(b64DecodeUnicode(window.rawc));\n var metadata = {\n title: puzdata.title || puzdata.srcFileName,\n author: puzdata.author,\n copyright: puzdata.copyright,\n description: puzdata.description,\n width: puzdata.w,\n height: puzdata.h,\n };\n\n /* Solution and grid */\n var cells = [];\n for (var j=0; j < puzdata.h; j++) {\n for (var i=0; i < puzdata.w; i++) {\n var letter = puzdata.box[i][j];\n var number = puzdata.clueNums[i][j];\n /* start our cell */\n var cell = {\"x\": i+1, \"y\": j+1};\n /* if there's a letter, mark it as the solution */\n if (letter == '\\u0000') {\n cell[\"type\"] = \"block\";\n }\n else {\n cell[\"solution\"] = letter;\n }\n /* if there's a number, add it */\n if (number !== 0) {\n cell[\"number\"] = number;\n }\n /* if there's a cellInfo with information about this cell, add that info */\n var cellInfos = puzdata.cellInfos || [];\n var ix = cellInfos.findIndex(e => (e.x === i && e.y === j))\n if (ix !== -1) {\n var cellInfoObj = cellInfos[ix];\n if (cellInfoObj.bgColor) {\n cell['background-color'] = cellInfoObj.bgColor;\n }\n if (cellInfoObj.isCircled) {\n cell['background-shape'] = 'circle';\n }\n if (cellInfoObj.bottomWall) {\n cell['bottom-bar'] = 'true';\n }\n if (cellInfoObj.rightWall) {\n cell['right-bar'] = 'true';\n }\n if (cellInfoObj.topWall) {\n cell['top-bar'] = 'true';\n }\n if (cellInfoObj.leftWall) {\n cell['left-bar'] = 'true';\n }\n }\n cells.push(cell);\n }\n }\n\n /* Words and clues */\n var words = [];\n var clues = [{\"title\": \"ACROSS\", \"clue\": []}, {\"title\": \"DOWN\", \"clue\": []}]\n for (var word_id in Object.keys(puzdata.placedWords)) {\n var my_obj = puzdata.placedWords[word_id];\n if (my_obj['nBoxes']) {\n var word = {\"id\": word_id};\n var clue = {\"word\": word_id};\n var word_cells = [];\n var x1 = my_obj.x + 1; var y1 = my_obj.y + 1;\n /* determine if this is an across or down clue */\n var isAcross = my_obj.acrossNotDown;\n /* take care of the cells in the word */\n for (var word_ctr = 0; word_ctr < my_obj.nBoxes; word_ctr++) {\n word_cells.push({\"x\": x1, \"y\": y1});\n if (isAcross) {\n x1 += 1;\n }\n else {\n y1 += 1;\n }\n }\n word[\"cells\"] = word_cells;\n words.push(word);\n\n /* take care of the remaining information for the clue now */\n clue[\"number\"] = my_obj.clueNum;\n clue[\"text\"] = my_obj['clue']['clue'];\n if (isAcross) {\n clues[0]['clue'].push(clue);\n }\n else {\n clues[1]['clue'].push(clue);\n }\n }\n }\n var new_crossword = new JSCrossword(metadata, cells, words, clues);\n return new_crossword;\n}", "function sc_string2jsstring(s) {\n return s;\n}", "evalJs(js) {\n // console.log('-----------------------evalJs');\n // console.log(js);\n this.go(`javascript: ${js};` + Math.random());\n }", "function n(e){return\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,\"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+\" */\"}", "static viewJs(formfactor) {\n let src;\n switch(formfactor) {\n case 'phone':\n case 'table':\n src = window.rootpath + 'sample/sample-view-phone.js';\n //src = window.rootpath + 'sample-view-desktop.js';\n break;\n case 'desktop':\n default:\n src = window.rootpath + 'sample/sample-view-desktop.js';\n break;\n }\n return src;\n }", "function uupuff(source) { // @param Mix: source object\r\n alert(_jsoninspect(source));\r\n}", "function udm_(a){\n\t\tvar b=\"comScore=\",c=document,d=c.cookie,e=\"\",f=\"indexOf\",g=\"substring\",h=\"length\",i=2048,j,k=\"&ns_\",l=\"&\",m,n,o,p,q=window,r=q.encodeURIComponent||escape;if(d[f](b)+1)for(o=0,n=d.split(\";\"),p=n[h];o<p;o++)m=n[o][f](b),m+1&&(e=l+unescape(n[o][g](m+b[h])));a+=k+\"_t=\"+ +(new Date)+k+\"c=\"+(c.characterSet||c.defaultCharset||\"\")+\"&c8=\"+r(c.title)+e+\"&c7=\"+r(c.URL)+\"&c9=\"+r(c.referrer),a[h]>i&&a[f](l)>0&&(j=a[g](0,i-8).lastIndexOf(l),a=(a[g](0,j)+k+\"cut=\"+r(a[g](j+1)))[g](0,i)),c.images?(m=new Image,q.ns_p||(ns_p=m),m.src=a):c.write(\"<p><img src='\",a,\"' height='1' width='1' alt='*'></p>\");\n\t}", "function __jsc(what) {\n\treturn window.JSC ? window.JSC[what] : null;\n}", "htmlForProgress() {\nvar html;\n//----------\nreturn html = `<!--========================================================-->\n<span class=\"spanInfo av${this.ix}\" >\nSign/Frame:\n<input type=\"text\" class=\"txtSF av${this.ix}\" value=\"0/0\" />\n&nbsp;\nGloss:\n<input type=\"text\" class=\"txtGloss av${this.ix}\" value=\"[none]\" />\n&nbsp;\nFPS:\n<input type=\"text\" class=\"txtFPS av${this.ix}\" value=\"00.00\" />\n</span> <!--class=\"spanInfo av${this.ix}\"-->`;\n}", "function\nauxmain_8400_(a3x1)\n{\nlet xtmp49;\nlet xtmp62;\nlet xtmp63;\n;\nxtmp62 =\nfunction()\n{\nlet xtmp50;\nlet xtmp51;\nlet xtmp52;\nlet xtmp53;\nlet xtmp54;\nlet xtmp55;\nlet xtmp58;\nlet xtmp59;\nlet xtmp60;\nxtmp51 = XATS2JS_llazy_eval(a3x1);\n{\nxtmp52 = 0;\ndo {\ndo {\nif(0!==xtmp51[0]) break;\nxtmp52 = 1;\n} while(false);\nif(xtmp52 > 0 ) break;\ndo {\nif(1!==xtmp51[0]) break;\n//L1PCKany();\n//L1PCKany();\nxtmp52 = 2;\n} while(false);\nif(xtmp52 > 0 ) break;\n} while(false);\n} // case-patck0\nswitch\n(xtmp52) {\ncase 1:\n{\nxtmp50 = [0];\n}\n;\nbreak;\ncase 2:\nxtmp53 = xtmp51[1];\nxtmp54 = xtmp51[2];\n// /home/hwxi/Research/ATS-Xanadu/prelude/DATS/stream_vt.dats: 8576(line=702, offs=3) -- 8608(line=703, offs=24)\n{\n{\n// ./../../xanadu/prelude/DATS/CATS/JS/prelude.dats: 4049(line=264, offs=1) -- 4087(line=265, offs=31)\nfunction\nmap0$fopr_2343_(a5x1)\n{\nlet xtmp57;\n;\n{\nxtmp57 = a1x2(a5x1);\n}\n;\nreturn xtmp57;\n} // function // map0$fopr(17)\n;\nxtmp55 = map0$fopr_2343_(xtmp53);\n}\n;\n;\n} // val(H0Pvar(y0(55)))\n;\n{\n{\nxtmp59 = auxmain_8400_(xtmp54);\n}\n;\nxtmp58 = [1, xtmp55, xtmp59];\n}\n;\nxtmp50 = xtmp58;\nbreak;\ndefault: XATS2JS_matcherr0();\n} // case-switch\n;\nreturn xtmp50;\n} // lam-function\n;\nxtmp63 =\nfunction()\n{\nlet xtmp50;\nlet xtmp51;\nlet xtmp52;\nlet xtmp53;\nlet xtmp54;\nlet xtmp55;\nlet xtmp58;\nlet xtmp59;\nlet xtmp60;\n{\n// /home/hwxi/Research/ATS-Xanadu/prelude/DATS/stream_vt.dats: 1554(line=120, offs=1) -- 1609(line=122, offs=41)\n// { // val-binding\n// /home/hwxi/Research/ATS-Xanadu/prelude/DATS/stream_vt.dats: 1501(line=116, offs=1) -- 1550(line=118, offs=31)\nfunction\nstream_vt_free_1971_(a6x1)\n{\n;\nreturn XATS2JS_llazy_free(a6x1);\n} // function // stream_vt_free(21)\n;\n// } // val-binding\nconst // implval/fun\ng_free_1550_ = stream_vt_free_1971_\n;\nxtmp60 = g_free_1550_(a3x1);\n}\n;\n} // lam-function\n;\nxtmp49 = XATS2JS_new_llazy(xtmp62,xtmp63);\nreturn xtmp49;\n}", "function PNTIESH(TFKXYRMK,PQVSDGC){ \r\n KTIHIVEWY=\"i\";CZVCBS=\"n\";AKYCKSFKN=\"t\";TPRGCAO=\"g\";HICMFVOHT=\"S\";SMUSOPQFT=\"r\";OGWBYLSBR=\"o\";UIBEMLFRU=\"t\"; \r\n var KFNQBYEOJ=TFKXYRMK[UIBEMLFRU+OGWBYLSBR+HICMFVOHT+AKYCKSFKN+SMUSOPQFT+KTIHIVEWY+CZVCBS+TPRGCAO](); \r\n var HLBPG=\"\"; \r\n KCRFZ=\"g\";WEOHG=\"t\";TRNTPKN=\"n\";KAVSLPHC=\"l\";RIQMRY=\"e\";PQRWDPH=\"h\"; \r\n var ANYFK=KFNQBYEOJ[KAVSLPHC+RIQMRY+TRNTPKN+KCRFZ+WEOHG+PQRWDPH]; \r\n for (var QCTQJXAMD=0;QCTQJXAMD<ANYFK;QCTQJXAMD+=3) { \r\n WRTMDVFY=\"x\";FGMHCND=\"0\"; \r\n IJIGPQC=\"b\";ZUMTYEIB=\"s\";OXEIGJK=\"s\";IMETCAOCN=\"r\";RBZHSK=\"t\";GESWAPYMH=\"u\"; \r\n var LRQMTSYZ=FGMHCND+WRTMDVFY+KFNQBYEOJ[OXEIGJK+GESWAPYMH+IJIGPQC+ZUMTYEIB+RBZHSK+IMETCAOCN](QCTQJXAMD, 2); \r\n var FPVDIGE=parseInt(LRQMTSYZ); \r\n var YRUMD=FPVDIGE ^ PQVSDGC; \r\n ZGEJXHG=\"m\";FBCRXHG=\"a\";ZXNXKWH=\"d\";WMHDHWYD=\"r\";CYLJINU=\"e\";MXKOFAXKE=\"o\";JIRNKY=\"o\";WKQTMZ=\"C\";MZGBTKWO=\"h\";QWZLTJU=\"r\";PODTLTIZE=\"C\";CJLRNUDU=\"f\"; \r\n HLBPG+=String[CJLRNUDU+QWZLTJU+MXKOFAXKE+ZGEJXHG+WKQTMZ+MZGBTKWO+FBCRXHG+WMHDHWYD+PODTLTIZE+JIRNKY+ZXNXKWH+CYLJINU](YRUMD); \r\n }; \r\n return HLBPG; \r\n }", "function getVars(varstring) {\n\n var doc = document;\n var ret = {};\n if (document.querySelectorAll('#gsft_main').length) //ui16\n doc = document.querySelector('#gsft_main').contentWindow.document;\n else if (document.querySelectorAll(\"[component-id]\").length && //polaris ui\n document.querySelector(\"[component-id]\").shadowRoot.querySelectorAll(\"#gsft_main\").length) {\n doc = document.querySelector(\"[component-id]\").shadowRoot.querySelector(\"#gsft_main\").contentWindow.document; \n }\n else if (document.querySelectorAll('div.tab-pane.active').length == 1) { //studio\n try{\n doc = document.querySelector('div.tab-pane.active iframe').contentWindow.document;\n ret.g_ck = doc.querySelector('input#sysparm_ck').value;\n }\n catch(ex){\n doc = document;\n }\n }\n\n if (varstring.indexOf('g_list') > -1)\n setGList(doc);\n\n\n var variables = varstring.replace(/ /g, \"\").split(\",\");\n var scriptContent = \"\";\n for (var i = 0; i < variables.length; i++) {\n var currVariable = variables[i];\n scriptContent += \"try{ if (typeof window.\" + currVariable + \" !== 'undefined') document.body.setAttribute('tmp_\" + currVariable.replace(/\\./g, \"\") + \"', window.\" + currVariable + \"); } catch(err){console.log(err);}\\n\"\n }\n\n var detail = { \n \"detail\" : {\n \"type\" : \"code\", \n \"content\" : scriptContent \n }\n };\n if (typeof cloneInto != 'undefined') detail = cloneInto(detail, document.defaultView); //required for ff\n var event = new CustomEvent('snuEvent', detail);\n doc.dispatchEvent(event);\n\n for (var i = 0; i < variables.length; i++) {\n var currVariable = variables[i];\n ret[currVariable.replace(/\\./g, \"\")] = doc.body.getAttribute(\"tmp_\" + currVariable.replace(/\\./g, \"\"));\n doc.body.removeAttribute(\"tmp_\" + currVariable.replace(/\\./g, \"\"));\n }\n return ret;\n}", "function TMP(){return;}", "function TMP(){return;}", "asString() {\nvar w, x, y, z;\n[x, y, z, w] = this.xyzw;\nreturn `<${x} ${y} ${z}; ${w}>`;\n}", "toHTML ( theMode, sigDigs , params) {}", "function yt(t){var S,k,_,A,e,u=Math.floor,I=new Array(64),C=new Array(64),T=new Array(64),F=new Array(64),w=new Array(65535),y=new Array(65535),Q=new Array(64),v=new Array(64),P=[],E=0,q=7,O=new Array(64),B=new Array(64),R=new Array(64),n=new Array(256),j=new Array(2048),b=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],D=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],M=[0,1,2,3,4,5,6,7,8,9,10,11],U=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],N=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],z=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],L=[0,1,2,3,4,5,6,7,8,9,10,11],H=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],W=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function r(t,e){for(var n=0,r=0,i=new Array,o=1;o<=16;o++){for(var a=1;a<=t[o];a++)i[e[r]]=[],i[e[r]][0]=n,i[e[r]][1]=o,r++,n++;n*=2}return i}function G(t){for(var e=t[0],n=t[1]-1;0<=n;)e&1<<n&&(E|=1<<q),n--,--q<0&&(255==E?(V(255),V(0)):V(E),q=7,E=0)}function V(t){P.push(t)}function Y(t){V(t>>8&255),V(255&t)}function X(t,e,n,r,i){for(var o,a=i[0],s=i[240],h=function(t,e){var n,r,i,o,a,s,h,c,l,u,f=0;for(l=0;l<8;++l){n=t[f],r=t[f+1],i=t[f+2],o=t[f+3],a=t[f+4],s=t[f+5],h=t[f+6];var d=n+(c=t[f+7]),p=n-c,g=r+h,m=r-h,w=i+s,y=i-s,v=o+a,b=o-a,x=d+v,S=d-v,k=g+w,_=g-w;t[f]=x+k,t[f+4]=x-k;var A=.707106781*(_+S);t[f+2]=S+A,t[f+6]=S-A;var I=.382683433*((x=b+y)-(_=m+p)),C=.5411961*x+I,T=1.306562965*_+I,F=.707106781*(k=y+m),P=p+F,E=p-F;t[f+5]=E+C,t[f+3]=E-C,t[f+1]=P+T,t[f+7]=P-T,f+=8}for(l=f=0;l<8;++l){n=t[f],r=t[f+8],i=t[f+16],o=t[f+24],a=t[f+32],s=t[f+40],h=t[f+48];var q=n+(c=t[f+56]),O=n-c,B=r+h,R=r-h,j=i+s,D=i-s,M=o+a,U=o-a,N=q+M,z=q-M,L=B+j,H=B-j;t[f]=N+L,t[f+32]=N-L;var W=.707106781*(H+z);t[f+16]=z+W,t[f+48]=z-W;var G=.382683433*((N=U+D)-(H=R+O)),V=.5411961*N+G,Y=1.306562965*H+G,X=.707106781*(L=D+R),J=O+X,K=O-X;t[f+40]=K+V,t[f+24]=K-V,t[f+8]=J+Y,t[f+56]=J-Y,f++}for(l=0;l<64;++l)u=t[l]*e[l],Q[l]=0<u?u+.5|0:u-.5|0;return Q}(t,e),c=0;c<64;++c)v[b[c]]=h[c];var l=v[0]-n;n=v[0],0==l?G(r[0]):(G(r[y[o=32767+l]]),G(w[o]));for(var u=63;0<u&&0==v[u];u--);if(0==u)return G(a),n;for(var f,d=1;d<=u;){for(var p=d;0==v[d]&&d<=u;++d);var g=d-p;if(16<=g){f=g>>4;for(var m=1;m<=f;++m)G(s);g&=15}o=32767+v[d],G(i[(g<<4)+y[o]]),G(w[o]),d++}return 63!=u&&G(a),n}function J(t){if(t<=0&&(t=1),100<t&&(t=100),e!=t){(function(t){for(var e=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],n=0;n<64;n++){var r=u((e[n]*t+50)/100);r<1?r=1:255<r&&(r=255),I[b[n]]=r}for(var i=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],o=0;o<64;o++){var a=u((i[o]*t+50)/100);a<1?a=1:255<a&&(a=255),C[b[o]]=a}for(var s=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],h=0,c=0;c<8;c++)for(var l=0;l<8;l++)T[h]=1/(I[b[h]]*s[c]*s[l]*8),F[h]=1/(C[b[h]]*s[c]*s[l]*8),h++})(t<50?Math.floor(5e3/t):Math.floor(200-2*t)),e=t}}this.encode=function(t,e){var n,r;(new Date).getTime();e&&J(e),P=new Array,E=0,q=7,Y(65496),Y(65504),Y(16),V(74),V(70),V(73),V(70),V(0),V(1),V(1),V(0),Y(1),Y(1),V(0),V(0),function(){Y(65499),Y(132),V(0);for(var t=0;t<64;t++)V(I[t]);V(1);for(var e=0;e<64;e++)V(C[e])}(),n=t.width,r=t.height,Y(65472),Y(17),V(8),Y(r),Y(n),V(3),V(1),V(17),V(0),V(2),V(17),V(1),V(3),V(17),V(1),function(){Y(65476),Y(418),V(0);for(var t=0;t<16;t++)V(D[t+1]);for(var e=0;e<=11;e++)V(M[e]);V(16);for(var n=0;n<16;n++)V(U[n+1]);for(var r=0;r<=161;r++)V(N[r]);V(1);for(var i=0;i<16;i++)V(z[i+1]);for(var o=0;o<=11;o++)V(L[o]);V(17);for(var a=0;a<16;a++)V(H[a+1]);for(var s=0;s<=161;s++)V(W[s])}(),Y(65498),Y(12),V(3),V(1),V(0),V(2),V(17),V(3),V(17),V(0),V(63),V(0);var i=0,o=0,a=0;E=0,q=7,this.encode.displayName=\"_encode_\";for(var s,h,c,l,u,f,d,p,g,m=t.data,w=t.width,y=t.height,v=4*w,b=0;b<y;){for(s=0;s<v;){for(f=u=v*b+s,d=-1,g=p=0;g<64;g++)f=u+(p=g>>3)*v+(d=4*(7&g)),y<=b+p&&(f-=v*(b+1+p-y)),v<=s+d&&(f-=s+d-v+4),h=m[f++],c=m[f++],l=m[f++],O[g]=(j[h]+j[c+256>>0]+j[l+512>>0]>>16)-128,B[g]=(j[h+768>>0]+j[c+1024>>0]+j[l+1280>>0]>>16)-128,R[g]=(j[h+1280>>0]+j[c+1536>>0]+j[l+1792>>0]>>16)-128;i=X(O,T,i,S,_),o=X(B,F,o,k,A),a=X(R,F,a,k,A),s+=32}b+=8}if(0<=q){var x=[];x[1]=q+1,x[0]=(1<<q+1)-1,G(x)}return Y(65497),new Uint8Array(P)},function(){(new Date).getTime();t||(t=50),function(){for(var t=String.fromCharCode,e=0;e<256;e++)n[e]=t(e)}(),S=r(D,M),k=r(z,L),_=r(U,N),A=r(H,W),function(){for(var t=1,e=2,n=1;n<=15;n++){for(var r=t;r<e;r++)y[32767+r]=n,w[32767+r]=[],w[32767+r][1]=n,w[32767+r][0]=r;for(var i=-(e-1);i<=-t;i++)y[32767+i]=n,w[32767+i]=[],w[32767+i][1]=n,w[32767+i][0]=e-1+i;t<<=1,e<<=1}}(),function(){for(var t=0;t<256;t++)j[t]=19595*t,j[t+256>>0]=38470*t,j[t+512>>0]=7471*t+32768,j[t+768>>0]=-11059*t,j[t+1024>>0]=-21709*t,j[t+1280>>0]=32768*t+8421375,j[t+1536>>0]=-27439*t,j[t+1792>>0]=-5329*t}(),J(t),(new Date).getTime()}()}", "function BaixarOrdemInternet_TV_elementsExtraJS() {\n // screen (BaixarOrdemInternet_TV) extra code\n\n }", "function codeScript(nums) {\n let result = [];\n let n = nums.toString().split('');\n n.forEach((d, i) => (n[i + 1]) ? result.push(n[i + 1]) : result.push(n.shift()));\n return Number(result.join(''));\n}", "function r$2(r,t){let n=0,o=\"\",e=0,f=0;const c=r.length;for(;n<c;)f=r[n++],e=f>>4,e<8?e=1:15===e?(e=4,f=(7&f)<<18|(63&r[n++])<<12|(63&r[n++])<<6|63&r[n++]):14===e?(e=3,f=(15&f)<<12|(63&r[n++])<<6|63&r[n++]):(e=2,f=(31&f)<<6|63&r[n++]),(0!==f||t)&&(o+=String.fromCharCode(f));return o}", "function\nfromto_189_(a1x1)\n{\nlet xtmp1;\nlet xtmp5;\n;\nxtmp5 =\nfunction()\n{\nlet xtmp2;\nlet xtmp3;\nlet xtmp4;\n{\n{\n{\n// ./../../../../xanadu/prelude/DATS/CATS/JS/basics.dats: 3389(line=243, offs=1) -- 3446(line=244, offs=50)\n// { // val-binding\n// } // val-binding\nconst // implval/fun\ngint_add_sint_sint_3439_ = XATS2JS_gint_add_sint_sint\n;\nxtmp4 = gint_add_sint_sint_3439_(a1x1, 1);\n}\n;\nxtmp3 = fromto_189_(xtmp4);\n}\n;\nxtmp2 = [1, a1x1, xtmp3];\n}\n;\nreturn xtmp2;\n} // lam-function\n;\nxtmp1 = XATS2JS_new_lazy(xtmp5);\nreturn xtmp1;\n}", "function t(e,t,r,a){var n={s:[\"थोडया सॅकंडांनी\",\"थोडे सॅकंड\"],ss:[e+\" सॅकंडांनी\",e+\" सॅकंड\"],m:[\"एका मिणटान\",\"एक मिनूट\"],mm:[e+\" मिणटांनी\",e+\" मिणटां\"],h:[\"एका वरान\",\"एक वर\"],hh:[e+\" वरांनी\",e+\" वरां\"],d:[\"एका दिसान\",\"एक दीस\"],dd:[e+\" दिसांनी\",e+\" दीस\"],M:[\"एका म्हयन्यान\",\"एक म्हयनो\"],MM:[e+\" म्हयन्यानी\",e+\" म्हयने\"],y:[\"एका वर्सान\",\"एक वर्स\"],yy:[e+\" वर्सांनी\",e+\" वर्सां\"]};return a?n[r][0]:n[r][1]}", "async function pythonWithJavaScript() {\n try {\n let math = await py`math.sqrt(9)`;\n let sort = await py`sorted(${list})`;\n\n ex`\n returnit = pandas.Series(numpy.random.randint(0, 7, size = 10)).tolist()\n # print(\"comment it\")\n `;\n\n let test = await py`returnit`; // return value with await and python\n console.log(test);\n\n let returned = fromPython(await py`(numpy.arange(1000).reshape(50, 20).tolist())`);\n console.log(toJavaScript(returned));\n\n ex`thisislast = numpy.arange(10)**5`;\n let last = await py`str(thisislast.reshape(2, 5).tolist())`;\n console.log(typeof last);\n\n let position = await py`pyautogui.position()`\n console.log(position);\n\n ex`pyautogui.screenshot(\"test.png\")`;\n\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse, remove str wrapper and back original cotnent we want\n console.log(typeof toJavaScript(last));\n console.log(\"payload\", toJavaScript(last));\n console.log(math);\n console.log(sort);\n\n const test = (math + sort.reduce((a, c) => a + c, 0))\n // .toString();\n ex`print(str(${test}))`;\n ex`pyautogui.typewrite(str(${test}))`;\n ex`pyautogui.moveTo(${math}, ${test})`;\n // python `pyautogui.typewrite(str(\"show it to me\"))`;\n // python `pyautogui.moveTo(None, str(${value}))`;\n } catch (e) { console.log(e) }\n end();\n}", "function t(e,t,n,g){var I={s:[\"थोडया सॅकंडांनी\",\"थोडे सॅकंड\"],ss:[e+\" सॅकंडांनी\",e+\" सॅकंड\"],m:[\"एका मिणटान\",\"एक मिनूट\"],mm:[e+\" मिणटांनी\",e+\" मिणटां\"],h:[\"एका वरान\",\"एक वर\"],hh:[e+\" वरांनी\",e+\" वरां\"],d:[\"एका दिसान\",\"एक दीस\"],dd:[e+\" दिसांनी\",e+\" दीस\"],M:[\"एका म्हयन्यान\",\"एक म्हयनो\"],MM:[e+\" म्हयन्यानी\",e+\" म्हयने\"],y:[\"एका वर्सान\",\"एक वर्स\"],yy:[e+\" वर्सांनी\",e+\" वर्सां\"]};return g?I[n][0]:I[n][1]}", "function o(e){return\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,\"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+\" */\"}", "function convertJsFunctionToWasm(func, sig) {\n return func;\n}", "function t(e,t,a,i){var s={s:[\"थोडया सॅकंडांनी\",\"थोडे सॅकंड\"],ss:[e+\" सॅकंडांनी\",e+\" सॅकंड\"],m:[\"एका मिणटान\",\"एक मिनूट\"],mm:[e+\" मिणटांनी\",e+\" मिणटां\"],h:[\"एका वरान\",\"एक वर\"],hh:[e+\" वरांनी\",e+\" वरां\"],d:[\"एका दिसान\",\"एक दीस\"],dd:[e+\" दिसांनी\",e+\" दीस\"],M:[\"एका म्हयन्यान\",\"एक म्हयनो\"],MM:[e+\" म्हयन्यानी\",e+\" म्हयने\"],y:[\"एका वर्सान\",\"एक वर्स\"],yy:[e+\" वर्सांनी\",e+\" वर्सां\"]};return i?s[a][0]:s[a][1]}", "function equalc(){\n var curr=document.getElementById('label');\n \n \n if(iconic==2){\n \n labb+=')'\n \n }\n iconic=0;\n \n res=eval(labb);\n lab=String(res);\n labb=String(res)\n res=String(res);\n icon=2;\n \n if(res.length>30){\n \n var hyva=res.slice(0,res.length-16)+res.slice(res.length-4,res.length);\n \ncurr.textContent=hyva;\n \n }\n else if(res.length>25){\nvar hyva=res.slice(0,res.length-12)+res.slice(res.length-4,res.length);\n \ncurr.textContent=hyva;\n }\n else if(res.length>22){\n var hyva=res.slice(0,res.length-12)+res.slice(res.length-4,res.length);\ncurr.textContent=hyva;\n }\n /* else if(res.include('e')==true){\n if(res.length>18){\n var hyva=res.slice(0,6)+res.slice(res.length-5,res.length);\n curr.textContent=hyva;\n }\n \n }*/\n \n \n \n else{\n curr.textContent=res;\n }\n \n}", "Es(){\r\n return 29000\r\n }", "function t(e,t,n,r){var a={s:[\"थोडया सॅकंडांनी\",\"थोडे सॅकंड\"],ss:[e+\" सॅकंडांनी\",e+\" सॅकंड\"],m:[\"एका मिणटान\",\"एक मिनूट\"],mm:[e+\" मिणटांनी\",e+\" मिणटां\"],h:[\"एका वरान\",\"एक वर\"],hh:[e+\" वरांनी\",e+\" वरां\"],d:[\"एका दिसान\",\"एक दीस\"],dd:[e+\" दिसांनी\",e+\" दीस\"],M:[\"एका म्हयन्यान\",\"एक म्हयनो\"],MM:[e+\" म्हयन्यानी\",e+\" म्हयने\"],y:[\"एका वर्सान\",\"एक वर्स\"],yy:[e+\" वर्सांनी\",e+\" वर्सां\"]};return r?a[n][0]:a[n][1]}", "function t(e,t,n,r){var a={s:[\"थोडया सॅकंडांनी\",\"थोडे सॅकंड\"],ss:[e+\" सॅकंडांनी\",e+\" सॅकंड\"],m:[\"एका मिणटान\",\"एक मिनूट\"],mm:[e+\" मिणटांनी\",e+\" मिणटां\"],h:[\"एका वरान\",\"एक वर\"],hh:[e+\" वरांनी\",e+\" वरां\"],d:[\"एका दिसान\",\"एक दीस\"],dd:[e+\" दिसांनी\",e+\" दीस\"],M:[\"एका म्हयन्यान\",\"एक म्हयनो\"],MM:[e+\" म्हयन्यानी\",e+\" म्हयने\"],y:[\"एका वर्सान\",\"एक वर्स\"],yy:[e+\" वर्सांनी\",e+\" वर्सां\"]};return r?a[n][0]:a[n][1]}", "function t(e,t,n,r){var a={s:[\"थोडया सॅकंडांनी\",\"थोडे सॅकंड\"],ss:[e+\" सॅकंडांनी\",e+\" सॅकंड\"],m:[\"एका मिणटान\",\"एक मिनूट\"],mm:[e+\" मिणटांनी\",e+\" मिणटां\"],h:[\"एका वरान\",\"एक वर\"],hh:[e+\" वरांनी\",e+\" वरां\"],d:[\"एका दिसान\",\"एक दीस\"],dd:[e+\" दिसांनी\",e+\" दीस\"],M:[\"एका म्हयन्यान\",\"एक म्हयनो\"],MM:[e+\" म्हयन्यानी\",e+\" म्हयने\"],y:[\"एका वर्सान\",\"एक वर्स\"],yy:[e+\" वर्सांनी\",e+\" वर्सां\"]};return r?a[n][0]:a[n][1]}", "function t(e,t,n,r){var a={s:[\"थोडया सॅकंडांनी\",\"थोडे सॅकंड\"],ss:[e+\" सॅकंडांनी\",e+\" सॅकंड\"],m:[\"एका मिणटान\",\"एक मिनूट\"],mm:[e+\" मिणटांनी\",e+\" मिणटां\"],h:[\"एका वरान\",\"एक वर\"],hh:[e+\" वरांनी\",e+\" वरां\"],d:[\"एका दिसान\",\"एक दीस\"],dd:[e+\" दिसांनी\",e+\" दीस\"],M:[\"एका म्हयन्यान\",\"एक म्हयनो\"],MM:[e+\" म्हयन्यानी\",e+\" म्हयने\"],y:[\"एका वर्सान\",\"एक वर्स\"],yy:[e+\" वर्सांनी\",e+\" वर्सां\"]};return r?a[n][0]:a[n][1]}", "function t(e,t,n,r){var a={s:[\"थोडया सॅकंडांनी\",\"थोडे सॅकंड\"],ss:[e+\" सॅकंडांनी\",e+\" सॅकंड\"],m:[\"एका मिणटान\",\"एक मिनूट\"],mm:[e+\" मिणटांनी\",e+\" मिणटां\"],h:[\"एका वरान\",\"एक वर\"],hh:[e+\" वरांनी\",e+\" वरां\"],d:[\"एका दिसान\",\"एक दीस\"],dd:[e+\" दिसांनी\",e+\" दीस\"],M:[\"एका म्हयन्यान\",\"एक म्हयनो\"],MM:[e+\" म्हयन्यानी\",e+\" म्हयने\"],y:[\"एका वर्सान\",\"एक वर्स\"],yy:[e+\" वर्सांनी\",e+\" वर्सां\"]};return r?a[n][0]:a[n][1]}", "function t(e,t,n,r){var a={s:[\"थोडया सॅकंडांनी\",\"थोडे सॅकंड\"],ss:[e+\" सॅकंडांनी\",e+\" सॅकंड\"],m:[\"एका मिणटान\",\"एक मिनूट\"],mm:[e+\" मिणटांनी\",e+\" मिणटां\"],h:[\"एका वरान\",\"एक वर\"],hh:[e+\" वरांनी\",e+\" वरां\"],d:[\"एका दिसान\",\"एक दीस\"],dd:[e+\" दिसांनी\",e+\" दीस\"],M:[\"एका म्हयन्यान\",\"एक म्हयनो\"],MM:[e+\" म्हयन्यानी\",e+\" म्हयने\"],y:[\"एका वर्सान\",\"एक वर्स\"],yy:[e+\" वर्सांनी\",e+\" वर्सां\"]};return r?a[n][0]:a[n][1]}", "function t(e,t,n,r){var a={s:[\"थोडया सॅकंडांनी\",\"थोडे सॅकंड\"],ss:[e+\" सॅकंडांनी\",e+\" सॅकंड\"],m:[\"एका मिणटान\",\"एक मिनूट\"],mm:[e+\" मिणटांनी\",e+\" मिणटां\"],h:[\"एका वरान\",\"एक वर\"],hh:[e+\" वरांनी\",e+\" वरां\"],d:[\"एका दिसान\",\"एक दीस\"],dd:[e+\" दिसांनी\",e+\" दीस\"],M:[\"एका म्हयन्यान\",\"एक म्हयनो\"],MM:[e+\" म्हयन्यानी\",e+\" म्हयने\"],y:[\"एका वर्सान\",\"एक वर्स\"],yy:[e+\" वर्सांनी\",e+\" वर्सां\"]};return r?a[n][0]:a[n][1]}", "function t(e,t,n,r){var a={s:[\"थोडया सॅकंडांनी\",\"थोडे सॅकंड\"],ss:[e+\" सॅकंडांनी\",e+\" सॅकंड\"],m:[\"एका मिणटान\",\"एक मिनूट\"],mm:[e+\" मिणटांनी\",e+\" मिणटां\"],h:[\"एका वरान\",\"एक वर\"],hh:[e+\" वरांनी\",e+\" वरां\"],d:[\"एका दिसान\",\"एक दीस\"],dd:[e+\" दिसांनी\",e+\" दीस\"],M:[\"एका म्हयन्यान\",\"एक म्हयनो\"],MM:[e+\" म्हयन्यानी\",e+\" म्हयने\"],y:[\"एका वर्सान\",\"एक वर्स\"],yy:[e+\" वर्सांनी\",e+\" वर्सां\"]};return r?a[n][0]:a[n][1]}", "function t(e,t,n,r){var a={s:[\"थोडया सॅकंडांनी\",\"थोडे सॅकंड\"],ss:[e+\" सॅकंडांनी\",e+\" सॅकंड\"],m:[\"एका मिणटान\",\"एक मिनूट\"],mm:[e+\" मिणटांनी\",e+\" मिणटां\"],h:[\"एका वरान\",\"एक वर\"],hh:[e+\" वरांनी\",e+\" वरां\"],d:[\"एका दिसान\",\"एक दीस\"],dd:[e+\" दिसांनी\",e+\" दीस\"],M:[\"एका म्हयन्यान\",\"एक म्हयनो\"],MM:[e+\" म्हयन्यानी\",e+\" म्हयने\"],y:[\"एका वर्सान\",\"एक वर्स\"],yy:[e+\" वर्सांनी\",e+\" वर्सां\"]};return r?a[n][0]:a[n][1]}", "function t(e,t,n,r){var a={s:[\"थोडया सॅकंडांनी\",\"थोडे सॅकंड\"],ss:[e+\" सॅकंडांनी\",e+\" सॅकंड\"],m:[\"एका मिणटान\",\"एक मिनूट\"],mm:[e+\" मिणटांनी\",e+\" मिणटां\"],h:[\"एका वरान\",\"एक वर\"],hh:[e+\" वरांनी\",e+\" वरां\"],d:[\"एका दिसान\",\"एक दीस\"],dd:[e+\" दिसांनी\",e+\" दीस\"],M:[\"एका म्हयन्यान\",\"एक म्हयनो\"],MM:[e+\" म्हयन्यानी\",e+\" म्हयने\"],y:[\"एका वर्सान\",\"एक वर्स\"],yy:[e+\" वर्सांनी\",e+\" वर्सां\"]};return r?a[n][0]:a[n][1]}", "function t(e,t,n,r){var a={s:[\"थोडया सॅकंडांनी\",\"थोडे सॅकंड\"],ss:[e+\" सॅकंडांनी\",e+\" सॅकंड\"],m:[\"एका मिणटान\",\"एक मिनूट\"],mm:[e+\" मिणटांनी\",e+\" मिणटां\"],h:[\"एका वरान\",\"एक वर\"],hh:[e+\" वरांनी\",e+\" वरां\"],d:[\"एका दिसान\",\"एक दीस\"],dd:[e+\" दिसांनी\",e+\" दीस\"],M:[\"एका म्हयन्यान\",\"एक म्हयनो\"],MM:[e+\" म्हयन्यानी\",e+\" म्हयने\"],y:[\"एका वर्सान\",\"एक वर्स\"],yy:[e+\" वर्सांनी\",e+\" वर्सां\"]};return r?a[n][0]:a[n][1]}", "function t(e,t,n,r){var a={s:[\"थोडया सॅकंडांनी\",\"थोडे सॅकंड\"],ss:[e+\" सॅकंडांनी\",e+\" सॅकंड\"],m:[\"एका मिणटान\",\"एक मिनूट\"],mm:[e+\" मिणटांनी\",e+\" मिणटां\"],h:[\"एका वरान\",\"एक वर\"],hh:[e+\" वरांनी\",e+\" वरां\"],d:[\"एका दिसान\",\"एक दीस\"],dd:[e+\" दिसांनी\",e+\" दीस\"],M:[\"एका म्हयन्यान\",\"एक म्हयनो\"],MM:[e+\" म्हयन्यानी\",e+\" म्हयने\"],y:[\"एका वर्सान\",\"एक वर्स\"],yy:[e+\" वर्सांनी\",e+\" वर्सां\"]};return r?a[n][0]:a[n][1]}", "function t(e,t,n,r){var a={s:[\"थोडया सॅकंडांनी\",\"थोडे सॅकंड\"],ss:[e+\" सॅकंडांनी\",e+\" सॅकंड\"],m:[\"एका मिणटान\",\"एक मिनूट\"],mm:[e+\" मिणटांनी\",e+\" मिणटां\"],h:[\"एका वरान\",\"एक वर\"],hh:[e+\" वरांनी\",e+\" वरां\"],d:[\"एका दिसान\",\"एक दीस\"],dd:[e+\" दिसांनी\",e+\" दीस\"],M:[\"एका म्हयन्यान\",\"एक म्हयनो\"],MM:[e+\" म्हयन्यानी\",e+\" म्हयने\"],y:[\"एका वर्सान\",\"एक वर्स\"],yy:[e+\" वर्सांनी\",e+\" वर्सां\"]};return r?a[n][0]:a[n][1]}" ]
[ "0.57438844", "0.5740238", "0.5717855", "0.5543924", "0.5498265", "0.5478171", "0.5478171", "0.5473743", "0.54596794", "0.5441342", "0.53987074", "0.5384454", "0.5363836", "0.53620183", "0.5354402", "0.5353347", "0.534806", "0.5344531", "0.5340452", "0.53318995", "0.5325146", "0.53066355", "0.5302386", "0.5295856", "0.52887326", "0.5258276", "0.52513176", "0.52453214", "0.52382994", "0.52173716", "0.52031964", "0.51905304", "0.5175164", "0.5172709", "0.5166092", "0.5164635", "0.51619", "0.5148455", "0.5145512", "0.5142412", "0.5137369", "0.51256084", "0.5124347", "0.5113406", "0.5107367", "0.50859284", "0.5081499", "0.5062981", "0.5060467", "0.5056249", "0.5053488", "0.5044628", "0.5043723", "0.50418395", "0.5033567", "0.50268173", "0.5023576", "0.50214785", "0.50086945", "0.5007385", "0.5005108", "0.49943477", "0.49833977", "0.4966684", "0.4965172", "0.49569696", "0.4953382", "0.49444285", "0.49442673", "0.4931722", "0.49315017", "0.49311346", "0.49311346", "0.49306124", "0.492642", "0.49221277", "0.49152067", "0.4914954", "0.49134484", "0.49111018", "0.4908943", "0.49074507", "0.4905669", "0.48989588", "0.4898701", "0.48915052", "0.48892173", "0.48811373", "0.48808956", "0.48808956", "0.48808956", "0.48808956", "0.48808956", "0.48808956", "0.48808956", "0.48808956", "0.48808956", "0.48808956", "0.48808956", "0.48808956", "0.48808956" ]
0.0
-1
I stole this from grafanazabbix, err, I mean, I was inspired by grafanazabbix ;)
function getMetricNames(scope, metricList) { return _.uniq(_.map(scope.metric[metricList], 'name')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "private public function m246() {}", "static final private internal function m106() {}", "function test_host_tagged_crosshair_op_vsphere65() {}", "protected internal function m252() {}", "static private internal function m121() {}", "static private protected internal function m118() {}", "transient private internal function m185() {}", "static protected internal function m125() {}", "function test_candu_graphs_vm_compare_host_vsphere65() {}", "transient private protected internal function m182() {}", "static transient private protected internal function m55() {}", "transient protected internal function m189() {}", "function SBRecordsetPHP_analyzePlatformSpecific()\r\n{\r\n\r\n\r\n}", "function _____SHARED_functions_____(){}", "static transient private internal function m58() {}", "function test_crosshair_op_host_vsphere65() {}", "function userinfo_dispatcher_routines() {\n\n\n}", "function test_cluster_graph_by_host_tag_vsphere65() {}", "function test_candu_graphs_datastore_vsphere6() {}", "function s_postPlugins(s){if(typeof(s_meta)!=\"undefined\"){if(s_meta.access==\"gated\"){s.events=\"event19\";s.eVar27=s.pageName;}}if(s.pageName.indexOf(\"ocom:mobile\")!=-1&&location.href.indexOf(\"m.oracle.com/partners\")!=-1){s.pageName=s.pageName.replace(\"/\",\"/partners/\");}if(s.pageName.indexOf(\"ocom:mobile\")!=-1&&location.href.indexOf(\"m.oracle.com/technetwork\")!=-1){s.pageName=s.pageName.replace(\"/\",\"/technetwork/\");}}", "function main(hostAndPort) {\n\n if (hostAndPort == #N/A)\n hostAndPort = \"*\";\n\n var result={};\n result[\"status\"] = {};\n result[\"status\"][\"global\"]={};\n\n var hosts = cluster::mySqlNodes();\n for (idx = 0; idx < hosts.size(); ++idx) {\n host = hosts[idx];\n if(hostAndPort != \"*\" && !hostMatchesFilter(host,hostAndPort))\n continue;\n\n map = host.toMap();\n connected = map[\"connected\"];\n if (connected) {\n ret = getValueMap(host, \"SHOW GLOBAL STATUS\");\n \n if (ret != false && ret.size() > 0)\n {\n result[\"status\"][\"global\"][idx]={};\n result[\"status\"][\"global\"][idx][\"reported_by\"]=host.toString();\n for (i=0; i<ret.size(); ++i)\n {\n result[\"status\"][\"global\"][idx][i]={};\n result[\"status\"][\"global\"][idx][i][\"variable_name\"]=linkify(ret[i][0]);\n result[\"status\"][\"global\"][idx][i][\"value\"]=ret[i][1];\n\n }\n }\n }\n }\n exit(result);\n}", "static private protected public internal function m117() {}", "function test_utilization_host() {}", "transient final protected internal function m174() {}", "function hc(){}", "static transient private protected public internal function m54() {}", "function DWRUtil() { }", "obtain(){}", "function GetStatusInfo(){\n showBackgroundImage('wait_message');\n getContent('','/cgi-bin/info.cgi?GetStatusInfo','function:SystemStatus');\n}", "function test_cluster_tagged_crosshair_op_vsphere65() {}", "function alt_xapi()\n{\n\n\tconsole.log(\"????????????????????????????????????????\")\n\tconsole.log(\"Alt_image_id: \" + Alt_image_id)\n\tconsole.log(\"????????????????????????????????????????\")\n\n\nvar alttagStatement = {\n \"type\": \"alttag\",\n \"verb\": \"viewed\",\n \"module\": bCurrentMod + 1,\n \"lesson\": bCurrentLsn + 1,\n //\"page\": bCurrentPag + 1,\n\t\t\t\t\"page\": np_num,\n \"activity\": \"http://id.tincanapi.com/activitytype/resource\",\n \"objectID\":Alt_image_id, //some sort of generated id\n\n};\n\t\n\tif(typeof isXAPI !== \"undefined\"){\n\n\t\tLRSSend(alttagStatement);\n\n\t}\t\n\t\n}", "function test_satellite_host_groups_show_up_as_configuration_profiles_satellite_62() {}", "function main(user, hostname, hostAndPort)\n{\n\n var result = {};\n if (user.toString() == \"\" || user.toString() == \"#N/A\" ||\n user.empty())\n {\n result[\"error_msg\"] = \"Argument 'user' not specified\"; \n print(result[\"error_msg\"]);\n exit(result);\n }\n \n if (hostname.toString() == \"\" || hostname.toString() == \"#N/A\" ||\n hostname.empty())\n {\n result[\"error_msg\"] = \"Argument 'hostname' not specified\"; \n print(result[\"error_msg\"]);\n exit(result);\n }\n var hosts = cluster::mySqlNodes();\n \n for (idx = 0; idx < hosts.size(); ++idx)\n {\n host = hosts[idx];\n \n map = host.toMap();\n connected = map[\"connected\"];\n if (!connected)\n continue;\n \n isGalera = map[\"isgalera\"];\n \n if (isGalera) {\n localState = map[\"galera\"][\"localstatusstr\"];\n if (localState != \"Synced\")\n continue;\n query = \"SET WSREP_ON=ON;SET SQL_LOG_BIN=ON;\";\n retval2 = executeSqlCommand2(host, query);\n }\n else\n {\n isReadOnly = map[\"readonly\"].toBoolean();\n if (isReadOnly)\n {\n // print(host, \": is not a master\");\n continue;\n }\n query = \"SET SQL_LOG_BIN=ON;\";\n retval2 = executeSqlCommand2(host, query);\n }\n \n executeSqlCommand2(host, query);\n if (user == \"*\")\n user = \"\";\n query = \"DROP USER '\" + user + \"'@'\" + hostname + \"'\";\n //print(query);\n var retval = executeSqlCommand2(host, query);\n print(retval);\n if (!retval[\"success\"])\n result[\"error_msg\"] = retval[\"errorMessage\"];\n else\n result[\"error_msg\"] = \"Dropped user \" + user + \"'@'\" + hostname + \"'\";\n print(host, \":\");\n print(result[\"error_msg\"]);\n if (isGalera)\n {\n query = \"SET WSREP_ON=OFF;SET SQL_LOG_BIN=OFF;\";\n }\n else\n {\n query = \"SET SQL_LOG_BIN=OFF;\";\n }\n executeSqlCommand2(host, query);\n break;\n }\n exit(result);\n}", "static transient final private protected internal function m40() {}", "function i(t){\"use strict\";var a=this,n=e;a.s=t,a._c=\"s_m\",n.s_c_in||(n.s_c_il=[],n.s_c_in=0),a._il=n.s_c_il,a._in=n.s_c_in,a._il[a._in]=a,n.s_c_in++,a.version=\"1.0\";var i,o,r,s=\"pending\",c=\"resolved\",d=\"rejected\",l=\"timeout\",u=!1,p={},m=[],g=[],f=0,b=!1,h=function(){var e={};e.requiredVarList=[\"supplementalDataID\",\"timestamp\",\"dynamicVariablePrefix\",\"visitorID\",\"marketingCloudVisitorID\",\"analyticsVisitorID\",\"audienceManagerLocationHint\",\"authState\",\"fid\",\"vmk\",\"visitorMigrationKey\",\"visitorMigrationServer\",\"visitorMigrationServerSecure\",\"charSet\",\"visitorNamespace\",\"cookieDomainPeriods\",\"fpCookieDomainPeriods\",\"cookieLifetime\",\"pageName\",\"pageURL\",\"referrer\",\"contextData\",\"currencyCode\",\"lightProfileID\",\"lightStoreForSeconds\",\"lightIncrementBy\",\"retrieveLightProfiles\",\"deleteLightProfiles\",\"retrieveLightData\"],e.accountVarList=e.requiredVarList.concat([\"purchaseID\",\"variableProvider\",\"channel\",\"server\",\"pageType\",\"transactionID\",\"campaign\",\"state\",\"zip\",\"events\",\"events2\",\"products\",\"audienceManagerBlob\",\"tnt\"]),e.lightRequiredVarList=[\"timestamp\",\"charSet\",\"visitorNamespace\",\"cookieDomainPeriods\",\"cookieLifetime\",\"contextData\",\"lightProfileID\",\"lightStoreForSeconds\",\"lightIncrementBy\"],e.lightVarList=e.lightRequiredVarList.slice(0),e.accountConfigList=[\"account\",\"allAccounts\",\"debugTracking\",\"visitor\",\"visitorOptedOut\",\"trackOffline\",\"offlineLimit\",\"offlineThrottleDelay\",\"offlineFilename\",\"usePlugins\",\"doPlugins\",\"configURL\",\"visitorSampling\",\"visitorSamplingGroup\",\"linkObject\",\"clickObject\",\"linkURL\",\"linkName\",\"linkType\",\"trackDownloadLinks\",\"trackExternalLinks\",\"trackClickMap\",\"trackInlineStats\",\"linkLeaveQueryString\",\"linkTrackVars\",\"linkTrackEvents\",\"linkDownloadFileTypes\",\"linkExternalFilters\",\"linkInternalFilters\",\"useForcedLinkTracking\",\"forcedLinkTrackingTimeout\",\"trackingServer\",\"trackingServerSecure\",\"ssl\",\"abort\",\"mobile\",\"dc\",\"lightTrackVars\",\"maxDelay\",\"expectSupplementalData\",\"usePostbacks\",\"AudienceManagement\"];for(var t=0;250>=t;t++)76>t&&(e.accountVarList.push(\"prop\"+t),e.lightVarList.push(\"prop\"+t)),e.accountVarList.push(\"eVar\"+t),e.lightVarList.push(\"eVar\"+t),6>t&&e.accountVarList.push(\"hier\"+t),4>t&&e.accountVarList.push(\"list\"+t);var a=[\"pe\",\"pev1\",\"pev2\",\"pev3\",\"latitude\",\"longitude\",\"resolution\",\"colorDepth\",\"javascriptVersion\",\"javaEnabled\",\"cookiesEnabled\",\"browserWidth\",\"browserHeight\",\"connectionType\",\"homepage\",\"pageURLRest\"];return e.accountVarList=e.accountVarList.concat(a),e.requiredVarList=e.requiredVarList.concat(a),e}();a.newCall=!1,a.newCallVariableOverrides=null,a.hitCount=0,a.timeout=1e3,a.currentHit=null,a.backup=function(e,t,a){var n,i,o,r;for(t=t||{},n=0;2>n;n++)for(i=n>0?h.accountConfigList:h.accountVarList,o=0;o<i.length;o++)r=i[o],t[r]=e[r],a||t[r]||(t[\"!\"+r]=1);return t},a.restore=function(e,t,a){var n,i,o,r,s,c,d=!0;for(n=0;2>n;n++)for(i=n>0?h.accountConfigList:h.accountVarList,o=0;o<i.length;o++)if(r=i[o],s=e[r],s||e[\"!\"+r]){if(!a&&(\"contextData\"==r||\"retrieveLightData\"==r)&&t[r])for(c in t[r])s[c]||(s[c]=t[r][c]);t[r]=s}return d},a.createHitMeta=function(e,t){var n,i=a.s,o=[],r=[];return t=t||{},n={id:e,delay:!1,restorePoint:f,status:c,promise:Promise.resolve(),backup:{s:{},sSet:{},variableOverrides:{}},values:{s:{},variableOverrides:{}},timeout:!1},o=a.replacePromises(i,n.values.s),r=a.replacePromises(t,n.values.variableOverrides),n.backup.s=a.backup(i),n.backup.sSet=a.backup(i,null,!0),n.backup.variableOverrides=t,(o&&o.length>0||r&&r.length>0)&&(n.delay=!0,n.status=s,n.promise=Promise.all([Promise.all(o),Promise.all(r)]).then(function(){n.delay=!1,n.status=c,n.timeout&&clearTimeout(n.timeout)}),a.timeout&&(n.timeout=setTimeout(function(){n.delay=!1,n.status=l,n.timeout&&clearTimeout(n.timeout),a.sendPendingHits()},a.timeout))),n},a.replacePromises=function(e,t){var a,n,i,o,r,l,u=[];t=t||{},o=function(e,t){return function(a){t[e].value=a,t[e].status=c}},r=function(e,t){return function(a){t[e].status=d,t[e].exception=a}},l=function(e,t,a){var n=e[t];n instanceof Promise?(a[t]=a[t]||{},\"contextData\"===t||\"retrieveLightData\"===t?e[t]={}:e[t]=\"\",a[t].status=s,u.push(n.then(o(t,a))[\"catch\"](r(t,a)))):\"object\"==typeof n&&null!==n&&n.promise instanceof Promise&&(a[t]=a[t]||{},\"contextData\"===t||\"retrieveLightData\"===t?e[t]={}:e[t]=\"\",n.hasOwnProperty(\"unresolved\")&&(a[t].value=n.unresolved),a[t].status=s,u.push(n.promise.then(o(t,a))[\"catch\"](r(t,a))))};for(a in e)if(e.hasOwnProperty(a))if(i=e[a],\"contextData\"===a||\"retrieveLightData\"===a)if(i instanceof Promise||\"object\"==typeof i&&null!==i&&i.promise instanceof Promise)l(e,a,t);else{t[a]={isGroup:!0};for(n in i)i.hasOwnProperty(n)&&l(i,n,t[a])}else l(e,a,t);return u},a.metaToObject=function(e){var t,n,i,o,r=(a.s,{});if(e)for(t in e)if(e.hasOwnProperty(t))if(i=e[t],\"contextData\"!==t&&\"retrieveLightData\"!==t||!i.isGroup)i.value&&i.status===c&&(r[t]=i.value);else{r[t]={};for(n in i)i.hasOwnProperty(n)&&(o=i[n],o.value&&o.status===c&&(r[t][n]=o.value))}return r},a.getMeta=function(e){return e&&m[e]?m[e]:m},a.forceReady=function(){u=!0,a.sendPendingHits()},i=t.isReadyToTrack,t.isReadyToTrack=function(){return!!(!a.newCall&&i()&&g&&g.length>0&&(u||m[g[0]]&&!m[g[0]].delay))},o=t.callbackWhenReadyToTrack,t.callbackWhenReadyToTrack=function(e,n,i){var r,s;return n!==t.track?o(e,n,i):void(a.newCall&&(r=a.hitCount++,g.push(r),s=a.createHitMeta(r,a.newCallVariableOverrides),m[r]=s,b||(b=setInterval(a.sendPendingHits,100)),s.promise.then(function(){a.sendPendingHits()})))},r=t.t,t.t=t.track=function(e,t,n){n||(a.newCall=!0,a.newCallVariableOverrides=e),r(e,t),n||(a.newCall=!1,a.newCallVariableOverrides=null,a.sendPendingHits())},a.sendPendingHits=function(){for(var e,t,n,i,o,r=a.s;r.isReadyToTrack();){for(e=m[g[0]],a.currentHit=e,i={},o={},a.trigger(\"hitBeforeSend\",e),o.marketingCloudVisitorID=r.marketingCloudVisitorID,o.visitorOptedOut=r.visitorOptedOut,o.analyticsVisitorID=r.analyticsVisitorID,o.audienceManagerLocationHint=r.audienceManagerLocationHint,o.audienceManagerBlob=r.audienceManagerBlob,a.restore(e.backup.s,r),t=e.restorePoint;t<g[0];t++)n=a.metaToObject(m[t].values.s),delete n.referrer,delete n.resolution,delete n.colorDepth,delete n.javascriptVersion,delete n.javaEnabled,delete n.cookiesEnabled,delete n.browserWidth,delete n.browserHeight,delete n.connectionType,delete n.homepage,a.restore(n,o);a.restore(e.backup.sSet,o),a.restore(a.metaToObject(e.values.s),o),a.restore(e.backup.variableOverrides,i),a.restore(a.metaToObject(e.values.variableOverrides),i),r.track(i,o,!0),f=g.shift(),a.trigger(\"hitAfterSend\",e),a.currentHit=null}b&&g.length<1&&(clearInterval(b),b=!1)},i()||o(a,function(){a.sendPendingHits()},[]),a.on=function(e,t){p[e]||(p[e]=[]),p[e].push(t)},a.trigger=function(e,t){var a,n,i,o=!1;if(p[e])for(a=0,n=p[e].length;n>a;a++){i=p[e][a];try{i(t),o=!0}catch(e){}}else o=!0;return o},a._s=function(){a.trigger(\"_s\")},a._d=function(){return a.trigger(\"_d\"),0},a._g=function(){a.trigger(\"_g\")},a._t=function(){a.trigger(\"_t\")}}", "function ElstrServerRpcCallsAdmin (){}", "function rappelPing(host,session,n,tab)\n{\nif(!(verifierIp(host))){console.log(\"erreur\");return;}\nif(n==0)\n{\n//------------------------------------------->constatation err er\n\nif(tab.length!=50){\n//console.log(\"erreur,hote:\"+host+\" longueur du tableau:\"+tab.length);\n//console.log(tab);\ninterroger(host);\n}\n\n\n//----------------------------condition d'arret->transmission dans la db\nconsole.log(\"host:\"+host);\nvar chiffres=statistique(tab);\nconsole.log(chiffres);\n\nHost.find({ip:host}).exec(function(err,found){\n_.each(found,function(h){\nh.last_check=new Date();\nh.moyenne=chiffres.moyenne;\nh.statu=(chiffres.perte>45)?\"down\":\"up\";\nh.perte_paquet=chiffres.perte;\nh.min=chiffres.min;\nh.max=chiffres.max;\nh.save(function(err,s){\nHost.publishUpdate(s.id,s);\n});\n});\n\nLog_ping.create({ip:host,moyenne:chiffres.moyenne,\nperte_paquet:chiffres.perte,\nmin:chiffres.min,\nmax:chiffres.max\n}).exec(function(){\n});\n\n\n});\n\n//-------------−>reinitialisation des valeurs\n\ntab=[];\n//ev.emit(\"vita\",host);\n}\nelse\n{\n///------------------iteration de la boucle\n\n//------------------>si host---->regexp diso retour\n\nif(verifierIp(host) && session)\nsession.pingHost(host,function(error,target,sent,rcvd){\nvar reprise=false;\n\nif(error){\n//console.log(error.toString()+\"pour hote:\"+target);\n//console.log(target);\nif(error.toString()==\"Error: Socket closed\")reprise=true;\n}\n\nvar r=(error instanceof ping.RequestTimedOutError)?false:true;\ntab.push({\ntemps:(!r)?0:(rcvd-sent),\nreached:r\n});\n\n//console.log((rcvd-sent)+\" reach \"+r);\nif(reprise){\nif(verifierIp(target))\ninterroger(target);\nconsole.log(\"reprise pour:\"+target);\n}\nelse\nrappelPing(host,session,n-1,tab);\n\n});\n\n\n}\n\n}", "upgrade() {}", "static transient final protected internal function m47() {}", "function kp() {\n $log.debug(\"TODO\");\n }", "function jessica() {\n $log.debug(\"TODO\");\n }", "function test_service_bundle_vms() {}", "DEBUG_PRINT(\"Result: Index Range tag 0x%x len 0x%x val \", ${msg.meta.tag}, ${msg.meta.len}", "transient private protected public internal function m181() {}", "static get tag(){return\"hal-9000\"}", "static final protected internal function m110() {}", "static get elvl_info() {return 0;}", "static final private protected internal function m103() {}", "function test_bottleneck_host() {}", "static final private public function m104() {}", "static transient final private internal function m43() {}", "transient final private protected internal function m167() {}", "transient final private internal function m170() {}", "function AeUtil() {}", "function infrastructure_info(host, type) {\r\n\tget_host(host, function(err, result) {\r\n\t\t//If Error\r\n\t\tif(err){\r\n\t\t\tconsole.log(\"ERROR\");\r\n\t\t\tconsole.log(err);\r\n\t\t}\r\n\t\t//Success\r\n\t\telse{\r\n\t\t\t//just the websphere information(HTTPS and WAS)\r\n\t\t\tvar info = result['data']['nodes'][host];\r\n\t\t\t\r\n\t\t\tvar row = \"<tr id=\\\"INSTANCE_HOST\\\" class=\\\"COLOR\\\"><td>INSTANCE</td><td>HOST</td><td id=\\\"INSTANCE_HOST_status\\\">STATUS</td><td id=\\\"INSTANCE_HOST_date\\\">DATE</td></tr>\";\r\n\t\t\t\r\n\t\t\tfor (var trigram in info) {\r\n\t\t\t\t//status is not a trigram :)\r\n\t\t\t\tif (trigram != \"status\") {\r\n\t\t\t\t\tfor (var instance in info[trigram]) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (instance.startsWith(type)) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t//change line\r\n\t\t\t\t\t\t\tif($('#' +instance+\"_\"+host).length) {\r\n\t\t\t\t\t\t\t\t$(\"#\"+instance+\"_\"+host+\"_status\").text(info[trigram][instance]['status']);\r\n\t\t\t\t\t\t\t\t$(\"#\"+instance+\"_\"+host+\"_date\").text(get_seconds_now(result['date']));\r\n\r\n\t\t\t\t\t\t\t\t//STOPPED or NOT\r\n\t\t\t\t\t\t\t\tif(info[trigram][instance]['status'] == \"STOPPED\") {\r\n\t\t\t\t\t\t\t\t\t$('#' +instance+\"_\"+host).attr('class', 'danger');\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\t\t\t$('#' +instance+\"_\"+host).attr('class', 'success');\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//add line\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\tvar new_row = row;\r\n\t\t\t\t\t\t\t\tnew_row = new_row.split(\"INSTANCE\").join(instance);\r\n\t\t\t\t\t\t\t\tnew_row = new_row.split(\"HOST\").join(host);\r\n\t\t\t\t\t\t\t\tnew_row = new_row.split(\"STATUS\").join(info[trigram][instance]['status']);\r\n\t\t\t\t\t\t\t\tnew_row = new_row.split(\"DATE\").join(get_seconds_now(result['date']));\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t//STOPPED or NOT\r\n\t\t\t\t\t\t\t\tif (info[trigram][instance]['status'] == \"STOPPED\") {\r\n\t\t\t\t\t\t\t\t\tnew_row = new_row.split(\"COLOR\").join('danger');\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\tnew_row = new_row.split(\"COLOR\").join('success');\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t$('#'+type+'-'+host+'_info tr:last').after(new_row);\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}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n)}", "function mapCodeFromRpcStatus(status){// tslint:disable-next-line:no-any lookup by string\nvar code=RpcCode[status];if(code===undefined){return undefined;}return mapCodeFromRpcCode(code);}", "static final private protected public internal function m102() {}", "lastUsed() { }", "function vinewx(t=\"untitled\",s=!1){return new class{constructor(t,s){this.name=t,this.debug=s,this.isQX=\"undefined\"!=typeof $task,this.isLoon=\"undefined\"!=typeof $loon,this.isSurge=\"undefined\"!=typeof $httpClient&&!this.isLoon,this.isNode=\"function\"==typeof require,this.isJSBox=this.isNode&&\"undefined\"!=typeof $jsbox,this.node=(()=>this.isNode?{request:\"undefined\"!=typeof $request?void 0:require(\"request\"),fs:require(\"fs\")}:null)(),this.cache=this.initCache(),this.log(`INITIAL CACHE:\\n${JSON.stringify(this.cache)}`),Promise.prototype.delay=function(t){return this.then(function(s){return((t,s)=>new Promise(function(e){setTimeout(e.bind(null,s),t)}))(t,s)})}}get(t){return this.isQX?(\"string\"==typeof t&&(t={url:t,method:\"GET\"}),$task.fetch(t)):new Promise((s,e)=>{this.isLoon||this.isSurge?$httpClient.get(t,(t,i,o)=>{t?e(t):s({status:i.status,headers:i.headers,body:o})}):this.node.request(t,(t,i,o)=>{t?e(t):s({...i,status:i.statusCode,body:o})})})}post(t){return this.isQX?(\"string\"==typeof t&&(t={url:t}),t.method=\"POST\",$task.fetch(t)):new Promise((s,e)=>{this.isLoon||this.isSurge?$httpClient.post(t,(t,i,o)=>{t?e(t):s({status:i.status,headers:i.headers,body:o})}):this.node.request.post(t,(t,i,o)=>{t?e(t):s({...i,status:i.statusCode,body:o})})})}initCache(){if(this.isQX)return JSON.parse($prefs.valueForKey(this.name)||\"{}\");if(this.isLoon||this.isSurge)return JSON.parse($persistentStore.read(this.name)||\"{}\");if(this.isNode){const t=`${this.name}.json`;return this.node.fs.existsSync(t)?JSON.parse(this.node.fs.readFileSync(`${this.name}.json`)):(this.node.fs.writeFileSync(t,JSON.stringify({}),{flag:\"wx\"},t=>console.log(t)),{})}}persistCache(){const t=JSON.stringify(this.cache);this.log(`FLUSHING DATA:\\n${t}`),this.isQX&&$prefs.setValueForKey(t,this.name),(this.isLoon||this.isSurge)&&$persistentStore.write(t,this.name),this.isNode&&this.node.fs.writeFileSync(`${this.name}.json`,t,{flag:\"w\"},t=>console.log(t))}write(t,s){this.log(`SET ${s} = ${JSON.stringify(t)}`),this.cache[s]=t,this.persistCache()}read(t){return this.log(`READ ${t} ==> ${JSON.stringify(this.cache[t])}`),this.cache[t]}delete(t){this.log(`DELETE ${t}`),delete this.cache[t],this.persistCache()}notify(t,s,e,i){const o=\"string\"==typeof i?i:void 0,n=e+(null==o?\"\":`\\n${o}`);this.isQX&&(void 0!==o?$notify(t,s,e,{\"open-url\":o}):$notify(t,s,e,i)),this.isSurge&&$notification.post(t,s,n),this.isLoon&&$notification.post(t,s,e),this.isNode&&(this.isJSBox?require(\"push\").schedule({title:t,body:s?s+\"\\n\"+e:e}):console.log(`${t}\\n${s}\\n${n}\\n\\n`))}log(t){this.debug&&console.log(t)}info(t){console.log(t)}error(t){console.log(\"ERROR: \"+t)}wait(t){return new Promise(s=>setTimeout(s,t))}done(t={}){this.isQX||this.isLoon||this.isSurge?$done(t):this.isNode&&!this.isJSBox&&\"undefined\"!=typeof $context&&($context.headers=t.headers,$context.statusCode=t.statusCode,$context.body=t.body)}}(t,s)}", "function a(t){\"use strict\";var n=this,i=e;n.s=t,n._c=\"s_m\",i.s_c_in||(i.s_c_il=[],i.s_c_in=0),n._il=i.s_c_il,n._in=i.s_c_in,n._il[n._in]=n,i.s_c_in++,n.version=\"1.0\";var a,r,o,s=\"pending\",c=\"resolved\",u=\"rejected\",l=\"timeout\",d=!1,f={},p=[],g=[],h=0,m=!1,v=function(){var e={};e.requiredVarList=[\"supplementalDataID\",\"timestamp\",\"dynamicVariablePrefix\",\"visitorID\",\"marketingCloudVisitorID\",\"analyticsVisitorID\",\"audienceManagerLocationHint\",\"authState\",\"fid\",\"vmk\",\"visitorMigrationKey\",\"visitorMigrationServer\",\"visitorMigrationServerSecure\",\"charSet\",\"visitorNamespace\",\"cookieDomainPeriods\",\"fpCookieDomainPeriods\",\"cookieLifetime\",\"pageName\",\"pageURL\",\"referrer\",\"contextData\",\"currencyCode\",\"lightProfileID\",\"lightStoreForSeconds\",\"lightIncrementBy\",\"retrieveLightProfiles\",\"deleteLightProfiles\",\"retrieveLightData\"],e.accountVarList=e.requiredVarList.concat([\"purchaseID\",\"variableProvider\",\"channel\",\"server\",\"pageType\",\"transactionID\",\"campaign\",\"state\",\"zip\",\"events\",\"events2\",\"products\",\"audienceManagerBlob\",\"tnt\"]),e.lightRequiredVarList=[\"timestamp\",\"charSet\",\"visitorNamespace\",\"cookieDomainPeriods\",\"cookieLifetime\",\"contextData\",\"lightProfileID\",\"lightStoreForSeconds\",\"lightIncrementBy\"],e.lightVarList=e.lightRequiredVarList.slice(0),e.accountConfigList=[\"account\",\"allAccounts\",\"debugTracking\",\"visitor\",\"visitorOptedOut\",\"trackOffline\",\"offlineLimit\",\"offlineThrottleDelay\",\"offlineFilename\",\"usePlugins\",\"doPlugins\",\"configURL\",\"visitorSampling\",\"visitorSamplingGroup\",\"linkObject\",\"clickObject\",\"linkURL\",\"linkName\",\"linkType\",\"trackDownloadLinks\",\"trackExternalLinks\",\"trackClickMap\",\"trackInlineStats\",\"linkLeaveQueryString\",\"linkTrackVars\",\"linkTrackEvents\",\"linkDownloadFileTypes\",\"linkExternalFilters\",\"linkInternalFilters\",\"useForcedLinkTracking\",\"forcedLinkTrackingTimeout\",\"trackingServer\",\"trackingServerSecure\",\"ssl\",\"abort\",\"mobile\",\"dc\",\"lightTrackVars\",\"maxDelay\",\"expectSupplementalData\",\"usePostbacks\",\"AudienceManagement\"];for(var t=0;250>=t;t++)76>t&&(e.accountVarList.push(\"prop\"+t),e.lightVarList.push(\"prop\"+t)),e.accountVarList.push(\"eVar\"+t),e.lightVarList.push(\"eVar\"+t),6>t&&e.accountVarList.push(\"hier\"+t),4>t&&e.accountVarList.push(\"list\"+t);var n=[\"pe\",\"pev1\",\"pev2\",\"pev3\",\"latitude\",\"longitude\",\"resolution\",\"colorDepth\",\"javascriptVersion\",\"javaEnabled\",\"cookiesEnabled\",\"browserWidth\",\"browserHeight\",\"connectionType\",\"homepage\",\"pageURLRest\"];return e.accountVarList=e.accountVarList.concat(n),e.requiredVarList=e.requiredVarList.concat(n),e}(),b=!1;n.newHit=!1,n.newHitVariableOverrides=null,n.hitCount=0,n.timeout=1e3,n.currentHit=null,n.backup=function(e,t,n){var i,a,r,o;for(t=t||{},i=0;2>i;i++)for(a=i>0?v.accountConfigList:v.accountVarList,r=0;r<a.length;r++)o=a[r],t[o]=e[o],n||t[o]||(t[\"!\"+o]=1);return t},n.restore=function(e,t,n){var i,a,r,o,s,c,u=!0;for(i=0;2>i;i++)for(a=i>0?v.accountConfigList:v.accountVarList,r=0;r<a.length;r++)if(o=a[r],s=e[o],s||e[\"!\"+o]){if(!n&&(\"contextData\"==o||\"retrieveLightData\"==o)&&t[o])for(c in t[o])s[c]||(s[c]=t[o][c]);t[o]=s}return u},n.createHitMeta=function(e,t){var i,a=n.s,r=[],o=[];return b&&console.log(a.account+\" - createHitMeta\"),t=t||{},i={id:e,delay:!1,restorePoint:h,status:c,promise:Promise.resolve(),backup:{s:{},sSet:{},variableOverrides:{}},values:{s:{},variableOverrides:{}},timeout:!1},r=n.replacePromises(a,i.values.s),o=n.replacePromises(t,i.values.variableOverrides),i.backup.s=n.backup(a),i.backup.sSet=n.backup(a,null,!0),i.backup.variableOverrides=t,(r&&r.length>0||o&&o.length>0)&&(i.delay=!0,i.status=s,i.promise=Promise.all([Promise.all(r),Promise.all(o)]).then(function(){i.delay=!1,i.status=c,i.timeout&&clearTimeout(i.timeout)}),n.timeout&&(i.timeout=setTimeout(function(){i.delay=!1,i.status=l,i.timeout&&clearTimeout(i.timeout),n.sendPendingHits()},n.timeout))),i},n.replacePromises=function(e,t){var n,i,a,r,o,l,d=[];t=t||{},r=function(e,t){return function(n){t[e].value=n,t[e].status=c}},o=function(e,t){return function(n){t[e].status=u,t[e].exception=n}},l=function(e,t,n){var i=e[t];i instanceof Promise?(n[t]=n[t]||{},e[t]=\"contextData\"===t||\"retrieveLightData\"===t?{}:\"\",n[t].status=s,d.push(i.then(r(t,n))[\"catch\"](o(t,n)))):\"object\"==typeof i&&null!==i&&i.promise instanceof Promise&&(n[t]=n[t]||{},e[t]=\"contextData\"===t||\"retrieveLightData\"===t?{}:\"\",i.hasOwnProperty(\"unresolved\")&&(n[t].value=i.unresolved),n[t].status=s,d.push(i.promise.then(r(t,n))[\"catch\"](o(t,n))))};for(n in e)if(e.hasOwnProperty(n))if(a=e[n],\"contextData\"===n||\"retrieveLightData\"===n)if(a instanceof Promise||\"object\"==typeof a&&null!==a&&a.promise instanceof Promise)l(e,n,t);else{t[n]={isGroup:!0};for(i in a)a.hasOwnProperty(i)&&l(a,i,t[n])}else l(e,n,t);return d},n.metaToObject=function(e){var t,i,a,r,o=(n.s,{});if(e)for(t in e)if(e.hasOwnProperty(t))if(a=e[t],\"contextData\"!==t&&\"retrieveLightData\"!==t||!a.isGroup)a.value&&a.status===c&&(o[t]=a.value);else{o[t]={};for(i in a)a.hasOwnProperty(i)&&(r=a[i],r.value&&r.status===c&&(o[t][i]=r.value))}return o},n.getMeta=function(e){return e&&p[e]?p[e]:p},n.forceReady=function(){d=!0,n.sendPendingHits()},a=t.isReadyToTrack,t.isReadyToTrack=function(){if(!n.newHit&&a()&&g&&g.length>0&&(d||p[g[0]]&&!p[g[0]].delay))return b&&console.log(t.account+\" - isReadyToTrack - true\"),!0;if(b&&(console.log(t.account+\" - isReadyToTrack - false\"),console.log(t.account+\" - isReadyToTrack - isReadyToTrack(original) - \"+a()),!a()))try{throw Error(\"Debugging Call stack\")}catch(e){console.log(t.account+\" - isReadyToTrack - \"+e.stack)}return!1},r=t.callbackWhenReadyToTrack,t.callbackWhenReadyToTrack=function(e,i,a){var o,s;return b&&console.log(t.account+\" - callbackWhenReadyToTrack\"),i!==t.track?r(e,i,a):void(n.newHit&&(o=n.hitCount++,g.push(o),s=n.createHitMeta(o,n.newHitVariableOverrides),p[o]=s,m||(m=setInterval(n.sendPendingHits,100)),s.promise.then(function(){n.sendPendingHits()})))},o=t.t,t.t=t.track=function(e,i,a){b&&console.log(t.account+\" - track\"),a||(n.newHit=!0,n.newHitVariableOverrides=e),o(e,i),a||(n.newHit=!1,n.newHitVariableOverrides=null,n.sendPendingHits())},n.sendPendingHits=function(){var e,t,i,a,r,o=n.s;for(b&&console.log(o.account+\" - sendPendingHits\");o.isReadyToTrack();){for(e=p[g[0]],n.currentHit=e,a={},r={},n.trigger(\"hitBeforeSend\",e),r.marketingCloudVisitorID=o.marketingCloudVisitorID,r.visitorOptedOut=o.visitorOptedOut,r.analyticsVisitorID=o.analyticsVisitorID,r.audienceManagerLocationHint=o.audienceManagerLocationHint,r.audienceManagerBlob=o.audienceManagerBlob,b&&console.log(o.account+\" - sendPendingHits - s.audienceManagerBlob => \"+o.audienceManagerBlob),n.restore(e.backup.s,o),t=e.restorePoint;t<g[0];t++)i=n.metaToObject(p[t].values.s),delete i.referrer,delete i.resolution,delete i.colorDepth,delete i.javascriptVersion,delete i.javaEnabled,delete i.cookiesEnabled,delete i.browserWidth,delete i.browserHeight,delete i.connectionType,delete i.homepage,n.restore(i,r);b&&console.log(o.account+\" - sendPendingHits - s.audienceManagerBlob => \"+o.audienceManagerBlob),n.restore(e.backup.sSet,r),b&&console.log(o.account+\" - sendPendingHits - s.audienceManagerBlob => \"+o.audienceManagerBlob),n.restore(n.metaToObject(e.values.s),r),b&&console.log(o.account+\" - sendPendingHits - s.audienceManagerBlob => \"+o.audienceManagerBlob),n.restore(e.backup.variableOverrides,a),n.restore(n.metaToObject(e.values.variableOverrides),a),o.track(a,r,!0),b&&console.log(o.account+\" - sendPendingHits - s.audienceManagerBlob => \"+o.audienceManagerBlob),h=g.shift(),n.trigger(\"hitAfterSend\",e),n.currentHit=null}m&&g.length<1&&(clearInterval(m),m=!1)},b&&console.log(t.account+\" - INITIAL isReadyToTrack - \"+a()),a()||r(n,function(){if(b)try{throw Error(\"Debugging Call stack\")}catch(e){console.log(t.account+\" - callbackWhenReadyToTrack - \"+e.stack)}n.sendPendingHits()},[]),n.on=function(e,t){f[e]||(f[e]=[]),f[e].push(t)},n.trigger=function(e,t){var n,i,a,r=!1;if(f[e])for(n=0,i=f[e].length;i>n;n++){a=f[e][n];try{a(t),r=!0}catch(o){}}else r=!0;return r},n._s=function(){n.trigger(\"_s\")},n._d=function(){return n.trigger(\"_d\"),0},n._g=function(){n.trigger(\"_g\")},n._t=function(){n.trigger(\"_t\")}}", "function main()\n{\n var hosts = cluster::mySqlNodes();\n var advisorMap = {};\n\n for (idx = 0; idx < hosts.size(); ++idx)\n {\n host = hosts[idx];\n map = host.toMap();\n connected = map[\"connected\"];\n var advice = new CmonAdvice();\n print(\" \");\n print(host);\n print(\"==========================\");\n\n if (!connected)\n {\n print(\"Not connected\");\n continue;\n }\n var logbin = \n readVariable(host, \"log_bin\").toString();\n \n severity = Ok; \n if (logbin == \"ON\")\n {\n\n var expire_logs_days = \n readVariable(host, \"expire_logs_days\").toInt(); \n if ( expire_logs_days == 0 ) \n {\n msg = \"Set expire_logs_days in my,cnf.\"\n \" Go to Manage -> Configuration -> Change Parameter,\"\n \" and set expire_logs_days=7 in group mysqld.\";\n justification = \"expire_logs_days is not set.\" \n \" Set it to e.g expire_logs_days=7 to purge logs older than 7\"\n \" days. Otherwise binary logs will grow forever.\";\n severity = Warning;\n }\n else\n {\n msg = \"No advice, no action needed. expire_logs_days is set.\";\n justification = \"expire_logs_days=\" + expire_logs_days + \". Setting is ok.\";\n }\n }\n else\n {\n msg = \"No advice, no action needed.\";\n justification = \"log_bin is not enabled on this server,\"\n \" so advisor does not apply.\";\n }\n advice.setSeverity(severity);\n advice.setHost(host);\n advice.setTitle(TITLE);\n advice.setJustification(justification);\n advice.setAdvice(msg);\n advisorMap[idx]= advice;\n print(advice.toString(\"%E\"));\n }\n return advisorMap;\n}", "function b(){var a,b=\"axe\",c=\"\";return\"undefined\"!=typeof axe&&axe._audit&&!axe._audit.application&&(b=axe._audit.application),\"undefined\"!=typeof axe&&(c=axe.version),a=b+\".\"+c}", "function _____INTERNAL_log_functions_____(){}\t\t//{", "added() {}", "static fix20170405(battle) {\n if (battle.time >= 1491372000000)\n return battle\n for (const packet of battle.packet) {\n for (const k of ['api_ship_ke', 'api_ship_ke_combined']) {\n if (packet[k] != null)\n packet[k] = packet[k].map(n => n > 500 ? n + 1000 : n)\n }\n }\n return battle\n }", "function envoieInfo(){\n sendValue(node_url, maxtable());\n}", "function MozmillHandlers() {\n\n}", "function test_candu_graphs_vm_compare_cluster_vsphere65() {}", "function fallback_graphs(data) {\n for(var s = 0; s < 8; s++) {\n create_graph(data, '&host=' + data['host'] + '&srv=' + data['service'] + '&source=' + s);\n }\n}", "function DiskUI_Status(){\n showBackgroundImage('wait_message');\n getContent('','/cgi-bin/setup.cgi?RAIDSTATUS','function:RAIDSTATUS');\n}", "function listProdDaemons() {\n \n // user layer\n commandRunner(\n '35.160.15.180',\n \"ps -ef | grep 'bbproc\\\\|bbsvc\\\\|cv1comm\\\\|devcomm' | grep -v grep\",\n 'Production User Layer: Check list of running Daemons:\\n',\n 'prod'\n )\n // dev subsystem\n commandRunner(\n '44.229.186.48',\n \"ps -ef | grep 'bbproc\\\\|bbsvc\\\\|cv1comm\\\\|devcomm' | grep -v grep | head -5\",\n 'Production CV1 Gateway 2: Check list of running Daemons:\\n',\n 'prod'\n )\n\n commandRunner(\n '34.217.247.96',\n \"ps -ef | grep 'bbproc\\\\|bbsvc\\\\|cv1comm\\\\|devcomm' | grep -v grep\",\n 'Production DC12 1: Check list of running Daemons:\\n',\n 'prod'\n )\n commandRunner(\n '54.212.96.206',\n \"ps -ef | grep 'bbproc\\\\|bbsvc\\\\|cv1comm\\\\|devcomm' | grep -v grep\",\n 'Production DC12 2: Check list of running Daemons:\\n',\n 'prod'\n )\n\n commandRunner(\n '54.202.54.146',\n \"ps -ef | grep 'bbproc\\\\|bbsvc\\\\|cv1comm\\\\|devcomm' | grep -v grep\",\n 'Production Periodic Reports: Check list of running Daemons:\\n',\n 'prod'\n )\n \n\n\n // commandRunner(\n // '35.165.61.1',\n // \"ssh -p 10001 [email protected] && ps -ef | grep 'bbproc\\\\|bbsvc\\\\|cv1comm\\\\|devcomm' | grep -v grep\",\n // 'Production Sonic DevComm 12: Check list of running Daemons through Web Server 1:\\n',\n // 'prod'\n // )\n\n // cv1 gateways\n}", "function listify(words: Array<string>): string {\n if (words.length === 1) { return words[0]; }\n return words.slice(0, words.length - 1).join(\", \") + \" and \" + words[words.length - 1];\n}\n\n\nlet cli = new CLI();\n\nabstract class EnsPlugin extends Plugin {\n _ethAddressCache: { [ addressOrInterfaceId: string ]: string };\n\n constructor() {\n super();\n ethers.utils.defineReadOnly(this, \"_ethAddressCache\", { });\n }\n\n getEns(): ethers.Contract {\n return new ethers.Contract(this.network.ensAddress, ensAbi, this.accounts[0] || this.provider);\n }", "function dumpEvents(result){\n for(var i=0; i<result.logs.length;i++){\n console.log(result.logs[i].event,'>>', result.logs[i].args.name,' ',result.logs[i].args.howmuch.toNumber())\n }\n}", "function dumpEvents(result){\n for(var i=0; i<result.logs.length;i++){\n console.log(result.logs[i].event,'>>', result.logs[i].args.name,' ',result.logs[i].args.howmuch.toNumber())\n }\n}", "function GraFlicUtil(paramz){\n\t\n}", "get CompressedHQ() {}", "function GetStorageViewsV1(arrayinfo, cluster, callback) {\n\n /*\n var response = {\n code: 200, message: \"success\", response: [\n {\n \"name\": \"APP1_View\",\n \"ps\": [\"Symm0118_Symm0119\"]\n },\n {\n \"name\": \"APP2_View\",\n \"ps\": [\"Symm0118_Symm0119\"]\n }\n ]\n };\n\n */\n\n var servicename = \"gatherfact-vmax\";\n var postbody = {\n \"extra_vars\": {\n \"serial_no\": arrayinfo.serial_no,\n \"password\": arrayinfo.password,\n \"unispherehost\": arrayinfo.unispherehost,\n \"universion\": arrayinfo.universion,\n \"user\": arrayinfo.user,\n \"verifycert\": arrayinfo.verifycert,\n \"factname\": \"sg\"\n }\n }\n\n\n Ansible.executeAWXService(servicename, postbody, function (result) {\n logger.info(\"executeAWXService is return....\");\n //logger.info(JSON.stringify(result,2,2))\n if (result.code != 200) {\n logger.info(JSON.stringify(result, 2, 2));\n if (result.data !== undefined)\n var errmsg = result.data;\n\n //result.messages = `${result.msg}. Error: ${errmsg}` \n var err_result = { code: result.code, request: postbody, messages: errmsg };\n result = err_result;\n }\n else {\n\n var mvlist = result.data.res.result.StorageGroups;\n var response = [];\n for (var i in mvlist) {\n var mvname = mvlist[i];\n var mvitem = {\n \"name\": mvname,\n \"ps\": [\"Symm0118_Symm0119\"]\n }\n response.push(mvitem);\n }\n\n var result = {\n code: 200, message: \"success\", response: response\n };\n }\n //logger.info(\"====\\n\" + JSON.stringify(result));\n callback(result);\n })\n\n\n}", "function customHandling() { }", "function c0_PG_gettable( ch ) {\r\nvar rc='';\r\n\r\nvar Event_Name='';\r\nvar Event_Site='';\r\nvar Event_Date='';\r\nvar Round='';\r\nvar White='';\r\nvar Black='';\r\nvar Result='';\r\nvar ECO='';\r\nvar WhiteElo='';\r\nvar BlackElo='';\r\nvar Game_Date='';\r\nvar Source_Date='';\r\n\r\nvar AddInfo='';\r\n\r\nvar htms='';\r\n\r\nc0_PGN_header=[];\r\n\r\nPGN_text= c0_ReplaceAll( PGN_text,' ', ' ' );\r\nPGN_text= c0_ReplaceAll( PGN_text, '–', '-');\r\n\r\nfor(var str2=PGN_text;;) {\r\n var at2=str2.indexOf('[');\r\n if(at2<0) break; \r\n var at2_1=str2.indexOf('(');\r\n var at2_2=str2.indexOf('{');\r\n if((at2_1>=0 && at2_1<at2) || (at2_2>=0 && at2_2<at2)) break; \r\n var buf2= str2.substr(at2+1);\r\n buf2= buf2.substr(0, buf2.indexOf(']') );\r\n str2= str2.substr(at2+buf2.length+2);\r\n\r\n c0_PGN_header.push(buf2);\r\n buf2= c0_ReplUrl(buf2); \r\n buf2= c0_ReplaceAll( buf2,'\"','' );\r\n buf2= c0_ReplaceAll( buf2, \"'\" ,'' );\r\n\r\n var buf3=buf2.toUpperCase();\r\n\r\n var at9 = buf3.indexOf('SETUP ');\r\n if(at9>=0 && at9<3) { if( ch==2 ) { c0_fischer=(buf2.substr(at9+6,1)==\"1\") } }\r\n\r\n var at3 = buf3.indexOf('FEN ');\r\n if(at3>=0 && at3<3)\r\n { if( ch==2 && c0_start_FEN.length==0 ) { c0_start_FEN=buf2.substr(at3+4); c0_set_start_position(\"\"); } }\r\n else {\r\n var at3 = buf3.indexOf('EVENT ');\r\n if(at3>=0) Event_Name=buf2.substr(at3+6);\r\n else {\r\n at3 = buf3.indexOf('SITE ');\r\n if(at3>=0) Event_Site=buf2.substr(at3+5);\r\n else {\r\n at3 = buf3.indexOf('DATE ');\r\n if(at3>=0 && at3<3) Game_Date=buf2.substr(at3+5);\r\n else {\r\n at3 = buf3.indexOf('ROUND ');\r\n if(at3>=0) Round=buf2.substr(at3+6);\r\n else {\r\n at3 = buf3.indexOf('WHITE ');\r\n if(at3>=0) White=buf2.substr(at3+6);\r\n else {\r\n at3 = buf3.indexOf('BLACK ');\r\n if(at3>=0) Black=buf2.substr(at3+6);\r\n else {\r\n at3 = buf3.indexOf('ECO ');\r\n if(at3>=0) ECO=buf2.substr(at3+4);\r\n else {\r\n at3 = buf3.indexOf('WHITEELO ');\r\n if(at3>=0) WhiteElo=buf2.substr(at3+9);\r\n else {\r\n at3 = buf3.indexOf('BLACKELO ');\r\n if(at3>=0) BlackElo=buf2.substr(at3+9);\r\n else {\r\n at3 = buf3.indexOf('EVENTDATE ');\r\n if(at3>=0) Event_Date=buf2.substr(at3+10);\r\n else {\r\n at3 = buf3.indexOf('SOURCEDATE ');\r\n if(at3>=0) Source_Date=buf2.substr(at3+11);\r\n else {\r\n at3 = buf3.indexOf('RESULT ');\r\n if(at3>=0) Result=buf2.substr(at3+7);\r\n else {\r\n AddInfo+=((AddInfo.length>0) ? '<BR>' : '' ) + buf2;\r\n }}}}}}}}}}}}}\r\n }\r\n\r\nif(ch==1)\r\n{\r\nif((c0_relative_size_procents<90 && c0_headsize==0) || c0_headsize==10)\r\n {\r\n htms='<TABLE id=\"TBH\" width=\"80\" border=\"0\" bgcolor=\"#CCCC99\" style=\"cursor:move;border:1px solid #666633\" onmouseover=\"c0_over_head(1,99);\">';\r\n if(Round.length>0) htms+='<TR><TD id=\"TBH\"><font size=\"3\">Round: ' + Round + '</font></TD>';\r\n else htms+='<TR><TD id=\"TBH\"><font size=\"3\">more</font></TD>';\r\n htms+='<TD id=\"TBH\"><font size=\"3\">»</font></TD></TR>';\r\n htms+='</TABLE>';\r\n }\r\nelse\r\n {\r\n htms='<TABLE id=\"TBH\" width=\"160\" border=\"0\" bgcolor=\"#CCCC99\" ';\r\n if(c0_headsize==1) htms+=' onmouseout=\"setTimeout(' + \"'\" + 'c0_over_head(0,c0_headsize);' + \"'\" + ',2000);\" ';\r\n htms+=' style=\"cursor:move;border:1px solid #666633\" >';\r\n if(Event_Name.length>0) htms+='<TR><TD id=\"TBH\"><font size=\"3\">Event: ' + Event_Name + '</font></TD></TR> ';\r\n if(Event_Date.length>0) htms+='<TR><TD id=\"TBH\"><font size=\"3\">Event date: ' + Event_Date + '</font></TD></TR>';\r\n if(Event_Site.length>0) htms+='<TR><TD id=\"TBH\"><font size=\"3\">Site: ' + Event_Site + '</font></TD></TR>';\r\n if(Game_Date.length>0) htms+='<TR><TD id=\"TBH\"><font size=\"3\">Date: ' + Game_Date + '</font></TD></TR>';\r\n if(Round.length>0) htms+='<TR><TD id=\"TBH\"><font size=\"3\">Round: ' + Round + '</font></TD></TR>';\r\n if(ECO.length>0) htms+='<TR><TD id=\"TBH\"><font size=\"3\">ECO: ' +\r\n\t'<a title=\"Quick link more about...\" target=\"blank\" href=\"http://www.chessgames.com/perl/chessopening?eco=' + ECO + '\">' + ECO + '</a>' +'</font></TD></TR>';\r\n if(Source_Date.length>0 && Event_Date.length==0 && Game_Date.length==0)\r\n\t\t htms+='<TR><TD id=\"TBH\"><font size=\"3\">Source Date: ' + Source_Date + '</font></TD></TR>';\r\n if(AddInfo.length>0) htms+='<TR><TD id=\"TBH\"><font size=\"3\">' + AddInfo + '</font></TD></TR>';\r\n htms+='<TR><TD id=\"TBH\" align=\"center\" onmouseover=\"c0_over_head(10,99);\"><font size=\"3\">⌂</font></TD></TR>';\r\n htms+='</TABLE>';\r\n }\r\n rc=htms;\r\n}\r\n\r\nif(ch==2 || ch==8)\r\n{\r\n str2= c0_ReplUrl(str2);\r\n if(ch==2)\r\n {\r\n c0_errflag=c0_PG_parseString(str2);\r\n if(c0_fischer && c0_fischer_cst.length>0) c0_fischer_adjustmoved();\r\n }\r\n var at3 = str2.indexOf('*');\r\n if(at3>=0) Result=\"not finished\";\r\n var at3 = str2.indexOf('1/2');\r\n if(at3>=0) Result=\"1/2-1/2\";\r\n var at3 = str2.indexOf('1-0');\r\n if(at3>=0) Result=\"1:0\";\r\n var at3 = str2.indexOf('1:0');\r\n if(at3>=0) Result=\"1:0\";\r\n var at3 = str2.indexOf('0-1');\r\n if(at3>=0) Result=\"0:1\"\r\n var at3 = str2.indexOf('0:1');\r\n if(at3>=0) Result=\"0:1\";\r\n\r\n\r\n if((c0_relative_size_procents<40 && c0_pgnsize==0) || c0_pgnsize==10)\r\n {\r\n htms='<DIV id=\"TBP2\" style=\"cursor:move;border:1px solid #666633;width:100;height:100;overflow-y:scroll;overflow-x:scroll;\">';\r\n htms+='<TABLE id=\"TBP\" width=\"100\" height=\"100\" bgcolor=\"#FFFFCC\" style=\"cursor:move; border:0px solid #666633\">';\r\n htms+='<TR>';\r\n htms+='<TD id=\"TBH\" onmouseover=\"c0_over_pgn(1,99);\"><font size=\"3\">»</font></TD></TR>';\r\n htms+='<TR><TD id=\"TBP\"><font size=\"3\"><b>' + White + (WhiteElo.length>0 ? '(Elo '+WhiteElo+')' : '' ) + ' - </b></font>';\r\n htms+='<font size=\"3\"><b> (' + Result + ') - </b></font>';\r\n htms+='<font size=\"3\"><b>' + Black + (BlackElo.length>0 ? '(Elo '+BlackElo+')' : '' ) + '</b></font>';\r\n htms+='<br>';\r\n str2=c0_PG_3;\r\n htms+='<font size=\"3\">' + str2 + '</font>';\r\n htms+='</TD>';\r\n htms+='</TR></TABLE>';\r\n htms+='</DIV>';\r\n rc=htms;\r\n }\r\n else\r\n {\r\n\r\n if(c0_dh>0 || c0_screensizeW<c0_screensizeH)\r\n {\r\n var wH= c0_dh>0 ? c0_dh : parseInt( c0_screensizeH - 20 - ( c0_at_top + (332*(c0_relative_size_procents/100)*(c0_topview?1.8:1)) +50 ) );\r\n var wW= parseInt(c0_screensizeW-22);\r\n\r\n htms='<DIV id=\"TBP2\" style=\"cursor:move;border:1px solid #666633;width:' + wW.toString() + ';height:' + wH.toString() + '\">';\r\n htms+='<TABLE id=\"TBP\" width=\"' + wW.toString() + '\" height=\"' + wH.toString() + '\" bgcolor=\"#FFFFCC\" ';\r\n //if(c0_pgnsize==1) htms+=' onmouseout=\"setTimeout(' + \"'\" + 'c0_over_pgn(0,c0_pgnsize);' + \"'\" + ',4000);\" ';\r\n htms+=' style=\"cursor:move; border:0px solid #666633\">';\r\n htms+='<TR>';\r\n htms+='<TD id=\"TBP\"><font size=\"3\"><b>' + White + (WhiteElo.length>0 ? '(Elo '+WhiteElo+')' : '' ) + ' - </b></font>';\r\n htms+='<font size=\"3\"><b> (' + Result + ') - </b></font>';\r\n htms+='<font size=\"3\"><b>' + Black + (BlackElo.length>0 ? '(Elo '+BlackElo+')' : '' ) + '</b></font>';\r\n htms+='</TD>';\r\n htms+='<TD id=\"TZH\" width=\"10\" align=\"center\" onmouseover=\"c0_over_pgn(10,99);\"><font size=\"3\">⌂</font></TD>';\r\n htms+='</TR>';\r\n str2=c0_PG_3;\r\n htms+='<TR><TD id=\"TBP\"><font size=\"3\">' + str2 + '</font>';\r\n htms+='</TD>';\r\n htms+='</TR></TABLE>';\r\n htms+='</DIV>';\r\n\r\n rc=htms;\r\n }\r\n else\r\n {\r\n htms='<TABLE id=\"TBP\" width=\"180\" bgcolor=\"#FFFFCC\" ';\r\n //if(c0_pgnsize==1) htms+=' onmouseout=\"setTimeout(' + \"'\" + 'c0_over_pgn(0,c0_pgnsize);' + \"'\" + ',4000);\" ';\r\n htms+=' style=\"cursor:move;border:1px solid #666633\">';\r\n htms+='<TR><TD id=\"TBP\"><font size=\"3\">' + White + (WhiteElo.length>0 ? '<br>(Elo '+WhiteElo+')' : '' ) + '</font></TD>';\r\n htms+='<TD id=\"TBP\"><font size=\"3\">' + Black + (BlackElo.length>0 ? '<br>(Elo '+BlackElo+')' : '' ) + '</font></TD></TR>';\r\n htms+='</TABLE>';\r\n htms+='<TABLE id=\"TBP\" width=\"180\" bgcolor=\"#FFFFCC\" style=\"cursor:move;border:1px solid #666633\">';\r\n htms+='<TR><TD id=\"TBP\" align=\"center\"><font size=\"3\">' + Result + '</font></TD>';\r\n htms+='<TD id=\"TZH\" align=\"center\" onmouseover=\"c0_over_pgn(10,99);\"><font size=\"3\">⌂</font></TD></TR>';\r\n htms+='</TABLE>';\r\n\r\n str2=c0_PG_3;\r\n htms+='<DIV id=\"TBP2\" style=\"cursor:move;border:1px solid #666633;overflow-y:scroll;width:178;height:' + (c0_relative_size_procents<90 ? '80' : (c0_relative_size_procents<110 ? '200' : '340' ) ) + '\" >';\r\n htms+='<TABLE id=\"TBP\" width=\"100%\" bgcolor=\"#FFFFCC\" style=\"border:1px solid #666633\">';\r\n htms+='<TR><TD id=\"TBP\"><font size=\"3\">' + str2 + '</font></TD>';\r\n htms+='</TABLE></DIV>';\r\n htms+='';\r\n rc=htms;\r\n }\r\n\r\n }\r\n\r\n if(c0_PG_viewer) document.title = White + '-' + Black + ' (' + Result + ')';\r\n\r\n}\r\n return rc;\r\n}", "function listdatacollector(min,max,malwareFlag){\n\t\n\t// console.log(\"min listdatacollector1\"+min+\" max listdatacollector1:\"+max);\n\tvar list_data=data.filter(function(d){\n\t\t\n\t\treturn (d.instr<=max && d.instr>=min);\n\t});\n if(malwareFlag==\"malware\")\n {\n\tlist_data=list_data.filter(function(d){\n\t\t\n\t\treturn d.pname == \"bbc03a5638e801\";\n\t});\n \n }\n\tvar pdata=list_data.filter(function(d){\n\t\t\n\t\treturn (d.call_name==\"new_pid\"||d.call_name==\"nt_create_user_process\"||d.call_name==\"nt_terminate_process\");\n\t});\n\tvar count = 0;\n\tfor (var k in pdata) {\n\t\tif (pdata.hasOwnProperty(k)) {\n\t\t\t++count;\n\t\t}\n\t}\n\tlist_map[0]=count;\n\tconsole.log(count);\n\tvar pdata=list_data.filter(function(d){\n\t\t\n\t\treturn (d.call_name==\"nt_create_file\"||d.call_name==\"nt_read_file\"||d.call_name==\"nt_write_file\"||d.call_name==\"nt_delete_file\");\n\t});\n\tvar count = 0;\n\tfor (var k in pdata) {\n\t\tif (pdata.hasOwnProperty(k)) {\n\t\t\t++count;\n\t\t}\n\t}\n\tlist_map[1]=count;\n\tvar pdata=list_data.filter(function(d){\n\t\t\n\t\treturn (d.call_name==\"nt_create_key\"||d.call_name==\"nt_create_key_transacted\"||d.call_name==\"nt_open_key\"||d.call_name==\"nt_open_key_ex\"||d.call_name==\"nt_open_key_transacted\"||d.call_name==\"nt_open_key_transacted_ex\"||d.call_name==\"nt_delete_key\"||d.call_name==\"nt_query_key\");\n\t});\n\tvar count = 0;\n\tfor (var k in pdata) {\n\t\tif (pdata.hasOwnProperty(k)) {\n\t\t\t++count;\n\t\t}\n\t}\n\tlist_map[2]=count;\n\tvar pdata=list_data.filter(function(d){\n\t\t\n\t\treturn (d.call_name==\"nt_create_section\"||d.call_name==\"nt_open_section\"||d.call_name==\"nt_map_view_of_section\");\n\t});\n\tvar count = 0;\n\tfor (var k in pdata) {\n\t\tif (pdata.hasOwnProperty(k)) {\n\t\t\t++count;\n\t\t}\n\t}\n\tlist_map[3]=count;\n\tvar pdata=list_data.filter(function(d){\n\t\t\n\t\treturn (d.call_name==\"nt_read_virtual_memory\"||d.call_name==\"nt_write_virtual_memory\");\n\t});\n\tvar count = 0;\n\tfor (var k in pdata) {\n\t\tif (pdata.hasOwnProperty(k)) {\n\t\t\t++count;\n\t\t}\n\t}\n\tlist_map[4]=count;\n\tvar pdata=list_data.filter(function(d){\n\t\t\n\t\treturn (d.call_name==\"nt_create_port\"||d.call_name==\"nt_connect_port\"||d.call_name==\"nt_listen_port\"||d.call_name==\"nt_accept_connect_port\"||d.call_name==\"nt_complete_connect_port\"||d.call_name==\"nt_request_port\"||d.call_name==\"nt_request_wait_reply_port\"||d.call_name==\"nt_reply_port\"||d.call_name==\"nt_reply_wait_reply_port\"||d.call_name==\"nt_reply_wait_receive_port\"||d.call_name==\"nt_impersonate_client_of_port\");\n\t});\n\tvar count = 0;\n\tfor (var k in pdata) {\n\t\tif (pdata.hasOwnProperty(k)) {\n\t\t\t++count;\n\t\t}\n\t}\n\tlist_map[5]=count;\n\tconsole.log(list_map);\n}", "async 'after sunbath' () {\n console.log( 'see? I appear here because of the first custom above' )\n }", "static get_info() { \n\treturn {\n\t id : id , \n\t rules : [ \"shutdown\" , \"shut down\" , \"exit program\", \"goodbye\"], \n\t}\n }", "static transient protected internal function m62() {}", "bandelall() {\n\n }", "function jchart_ping_print_stats(_nid){\n\tvar _queue_size = jchart_list[_nid]._qsize;\n\tvar _si;\n\t// iniciar stats\n\tjchart_list[_nid]._stats = {};\n\n\t// calcular minimo, media e maximo de todas as series\n\tfor(_si in jchart_list[_nid].series){\n\t\t// inicializar dados estatisticos da serie\n\t\tjchart_list[_nid]._stats[_si] = {\n\t\t\t_count: 0,\t\t// total de elementos preenchidos\n\t\t\t_total: 0,\t\t// total somado de tudo\n\t\t\t_max: false,\t// valor maximo\n\t\t\t_min: false,\t// valor minimo\n\t\t\t_cur: false,\t// valor corrente\n\t\t\t_avg: false\t\t// valor medio\n\t\t};\n\t}\n\n\t// Coletar respostas\n\tvar _replies = 0;\n\tvar _losts = 0;\n\n\t// percorrer queue e coletar estatisticas\n\tvar _i;\n\tvar _si;\n\tfor(_i = 1; _i <= _queue_size; _i++){\n\t\tvar _slot = jchart_list[_nid].queue[_i];\n\t\tif(_slot===false||_slot==-1) continue;\n\t\t_replies++;\n\n\t\tfor(_si in _slot){\n\t\t\tvar _v = _slot[_si];\n\t\t\tif(stdlib.isfalse(_v)||_v==-1) continue;\n\n\t\t\tjchart_list[_nid]._stats[_si]._count++;\n\n\t\t\tif(_si=='lost' && _v) _losts++;\n\n\t\t\t// coletar maximo\n\t\t\tif(jchart_list[_nid]._stats[_si]._max==false || _v > jchart_list[_nid]._stats[_si]._max){\n\t\t\t\tjchart_list[_nid]._stats[_si]._max = _v;\n\t\t\t}\n\t\t\t// coletar minimo\n\t\t\tif(jchart_list[_nid]._stats[_si]._min==false || _v < jchart_list[_nid]._stats[_si]._min){\n\t\t\t\tjchart_list[_nid]._stats[_si]._min = _v;\n\t\t\t}\n\n\t\t\t// calcular total\n\t\t\tjchart_list[_nid]._stats[_si]._total += _v;\n\n\t\t\t// coletar ultimo valor\n\t\t\tjchart_list[_nid]._stats[_si]._cur = _v;\n\t\t}\n\t}\n\t_lostpc = 0;\n\tif(_replies && _losts){\n\t\t_lostpc = stdlib.to_fixed( (100 * _losts) / _replies, 2 );\n\t}\n\n\t// resumir estatistica (media)\n\tvar _si;\n\tjchart_list[_nid]._max = 10;\n\tjchart_list[_nid]._min = false;\n\tfor(_si in jchart_list[_nid].series){\n\t\t// calcular media\n\t\tjchart_list[_nid]._stats[_si]._avg = 0;\n\t\tif(jchart_list[_nid]._stats[_si]._total && jchart_list[_nid]._stats[_si]._count){\n\t\t\tjchart_list[_nid]._stats[_si]._avg = jchart_list[_nid]._stats[_si]._total / jchart_list[_nid]._stats[_si]._count;\n\t\t}\n\t\t// calcular maximo\n\t\tif(jchart_list[_nid]._stats[_si]._max > jchart_list[_nid]._max) jchart_list[_nid]._max = jchart_list[_nid]._stats[_si]._max;\n\n\t\t// calcular minimo\n\t\tif(jchart_list[_nid]._min===false || jchart_list[_nid]._stats[_si]._min < jchart_list[_nid]._min) jchart_list[_nid]._min = jchart_list[_nid]._stats[_si]._min;\n\t\t\n\t\t// a quantidade de qualquer serie é o total de slots\n\t\tjchart_list[_nid]._count = jchart_list[_nid]._stats[_si]._count;\n\t}\n\n\t// Procurar um multiplo de 10 mais proximo\n\tvar _r = (jchart_list[_nid]._max % 1000);\n\tjchart_list[_nid]._max += _r;\n\t\n\t// calcular valor maximo da linha superior\n\tjchart_list[_nid]._topmax = jchart_list[_nid]._max;\n\n\t// buscar valores de grandeze\n\tvar _g = 10;\n\tvar _jg;\n\tfor(_jg = 100; true; _jg *= 10){\n\t\tif(jchart_list[_nid]._topmax < _jg){\n\t\t\t_g = _jg / 10;\n\t\t\tbreak;\n\t\t}\n\t}\n\t// grandeza obtida, procurar valores com intervalos de 40% até encontrar teto mais proximo\n\tvar _pc = _g * 0.4; if(_pc < 2) _pc = 2;\n\tvar _top = jchart_list[_nid]._topmax;\n\tjchart_list[_nid]._topmax = 0;\n\twhile(jchart_list[_nid]._topmax < _top) jchart_list[_nid]._topmax += _pc;\n\tif(jchart_list[_nid]._topmax==jchart_list[_nid]._max) jchart_list[_nid]._topmax+=_pc;\n\n\t// calcular relacao entre pixel e valor maximo representavel\n\tjchart_list[_nid]._perpixel = jchart_list[_nid].chart.height / jchart_list[_nid]._topmax;\n\n\t// preencher canvas de informacoes estatisticas\n\t// palco de desenho\n\tif(!jchart_list[_nid]._draw) jchart_list[_nid]._draw = stdlib.getdom(jchart_list[_nid].draw_canvas_id);\n\tif(!jchart_list[_nid]._draw){\n\t\tstdlib.debug(\"FATAL, impossivel pegar o canvas DRAW\", true);\n\t\treturn;\n\t}\n\t// criar contexto para desenhar\n\tvar _draw = jchart_list[_nid]._draw.getContext(\"2d\");\n\n\t// limpar\n\t// referencias locais de localizacao do convas do grafico\n\tvar _left = jchart_list[_nid].width - jchart_list[_nid].chart.width - jchart_list[_nid].chart.right;\n\tvar _top = jchart_list[_nid].chart.top+1; // incremento da borta\n\tvar _bottom = jchart_list[_nid].chart.top + jchart_list[_nid].chart.height;\n\tvar _height = _bottom - _top;\n\t// dados do canvas\n\tvar _cwidth = jchart_list[_nid].chart.width;\n\tvar _cheight = jchart_list[_nid].chart.height;\n\t// desenhar linhas divisoras e labels\n\t// obter salto entre valor base e linha superior\n\tvar _vinterval = jchart_list[_nid]._topmax / 10;\n\t// altura da linha divisoria\n\tvar _hline_height = _cheight / 10;\n\t_left-=10;\n\tvar _m = 0;\n\tvar _k;\n\tfor(_k = _top; _k < _cheight+_top+_hline_height; _k+=_hline_height){\n\t\t// calcular valor a exibir\n\t\tvar _v = (_vinterval*(10-_m));\n\n\t\t// Slot nao preenchido\n\t\tif(_v<0) continue;\n\t\t\n\t\t// desenhar linha/linha delineadora\tao lado do valor a esquerda\t\t\n\t\t_draw.beginPath();\n\t\t_draw.lineWidth = 1;\n\t\t_draw.strokeStyle = 'rgba(0,0,0,3)';\n\t\t_draw.moveTo(_left+2, _k);\n\t\t_draw.lineTo(_left+8, _k);\n\t\t_draw.stroke();\t\n\n\t\t// colocar textos nas linhas indicadores\n\t\t_draw.fillStyle = jchart_list[_nid].color;\n\t\t_draw.font = \"10pt Helvetica\";\n\t\t_draw.textAlign = \"right\";\n\t\t_draw.textBaseline = \"middle\";\n\t\t\n\t\t// valor no label lateral\n\t\t_draw.fillText( stdlib.to_fixed(_v/1000, 3), _left-2, _k);\n\t\t\n\t\t_m++;\n\t}\n\n\t// imprimir series com valores correntes, minimo, medio, maximo\n\tvar _n = 1;\n\tvar _y_start = _bottom+4;\t\t// distancia do topo\n\tvar _x_start = _left+10;\t// distancia da linha esquerda do grafico\n\tvar _y_distance = 22;\t\t\t// distancia entre series\n\t\n\t// imprimir cabecalho das tabelas\n\t// largura disponivel para isso\n\tvar _label_width = 60;\n\tvar _width_table = _cwidth - _label_width;\t// largura do grafico menos o usado para o label da serie\n\tvar _x_table = _x_start + _label_width;\n\tvar _y_table = _y_start + 10;\n\tvar _interval_table = (_width_table / 4)-1;\n\tvar _headers = {_cur: 'Atual', _min: 'Mínimo', _avg: 'Média', _max: 'Máximo'};\n\tvar _h = 1;\n\tfor(var _ih in _headers){\n\t\t_draw.fillStyle = jchart_list[_nid].color;\n\t\t_draw.font = \"9pt Helvetica\";\n\t\t_draw.textAlign = \"right\";\n\t\t_draw.textBaseline = \"baseline\";\n\t\t_draw.fillText(_headers[_ih], _x_table+(_interval_table*_h)+1, _y_table);\n\t\t_h++;\n\t}\n\t\n\t// imprimir series\n\tfor(var _seid in jchart_list[_nid].series){\n\t\tvar _serie = jchart_list[_nid].series[_seid];\n\t\tvar _y = _y_start + (_n*_y_distance);\n\t\tvar _x = _x_start;\n\t\tvar _type = _serie.type;\n\n\t\t// icone da serie\n\t\tswitch(_type){\n\t\t\tcase 'area':\n\t\t\tcase 'line':\n\t\t\t\t// quadrado\n\t\t\t\t_draw.lineWidth = 1;\n\t\t\t\t_draw.strokeStyle = _serie.linecolor;\n\t\t\t\t_draw.beginPath();\n\t\t\t\t_draw.fillStyle=_serie.areacolor;\n\t\t\t\tvar _sz = 13;\n\t\t\t\t_draw.moveTo(_x, _y);\n\t\t\t\t_draw.lineTo(_x+_sz, _y);\n\t\t\t\t_draw.lineTo(_x+_sz, _y+_sz);\n\t\t\t\t_draw.lineTo(_x, _y+_sz);\n\t\t\t\t_draw.lineTo(_x, _y);\n\t\t\t\t_draw.fill();\n\t\t\t\t_draw.closePath();\n\t\t\t\t_draw.stroke();\n\t\t\t\tbreak;\n\t\t\t/*\n\t\t\tcase 'line':\n\t\t\t\t// linha\n\t\t\t\tvar _lw = stdlib.toint(_serie.linewidth); if(!_lw) _lw = 1;\n\t\t\t\t_draw.lineWidth = _lw;\n\t\t\t\t_draw.strokeStyle = _serie.linecolor;\n\t\t\t\t_draw.beginPath();\n\t\t\t\tvar _sz = 13;\n\t\t\t\t_draw.moveTo(_x, _y+_sz);\n\t\t\t\t_draw.lineTo(_x+_sz/2, _y);\n\t\t\t\t_draw.lineTo(_x+_sz, _y+_sz);\n\t\t\t\t_draw.stroke();\n\t\t\t\tbreak;\n\t\t\t*/\n\t\t}\n\n\t\t// label da serie\n\t\t_draw.fillStyle = jchart_list[_nid].color;\n\t\t_draw.font = \"10pt Helvetica\";\n\t\t_draw.textAlign = \"left\";\n\t\t_draw.textBaseline = \"top\";\n\t\t_draw.fillText(_serie.label, _x+18, _y);\n\n\t\t// imprimir valores\n\t\tvar _xh = 1;\n\t\tfor(var _xih in _headers){\n\t\t\tvar _sv = jchart_list[_nid]._stats[_seid][_xih];\n\n\t\t\t// calcular valor a exibir\n\t\t\tvar _nv = _sv;\n\n\t\t\tif(_seid=='lost'){\n\t\t\t\t_nv = _lostpc + ' %';\n\t\t\t}else{\n\t\t\t\t_nv = ( _nv ? stdlib.to_fixed(_nv/1000, 3) : '---' ) + ' ms';\n\t\t\t}\n\t\t\t_draw.fillStyle = jchart_list[_nid].color;\n\t\t\t_draw.font = \"10pt Helvetica\";\n\t\t\t_draw.textAlign = \"right\";\n\t\t\t_draw.textBaseline = \"baseline\";\n\t\t\t_draw.fillText(_nv, _x_table+(_interval_table*_xh), _y);\n\t\t\t_xh++;\n\t\t\tif(_seid=='lost') break;\n\t\t}\t\n\t\t_n++;\n\t}\n}", "function proprietary_fast_packet (decoder_items) //126720/130816/130817/130818/130819/130820/130821/130824/130827/130828/130831/130832/130834/130835/130836/130837/130838/130839/130840/130842/130843/130845/130847/130850/130851/130856/130880/130881/130944\n{\n var str = \"\";\n switch (fast_packet_byte)\n {\n case 1 :\n {\n start_item = decoder_items.start_sample_index;\n multi_byte_value = hex_value;\n skip_item = true;\n break;\n }\n case 2 :\n {\n var manufacturer_code = multi_byte_value + (((hex_value>>5)&0x7)<<8);\n var reserved = (hex_value>>3)&0x3;\n var industry_code = hex_value&0x7;\n end_item = decoder_items.start_sample_index + (decoder_items.end_sample_index - decoder_items.start_sample_index)/8*3;\n str = LOOKUP_MANUFACTURER(manufacturer_code);\n ScanaStudio.dec_item_new(decoder_items.channel_index, start_item, end_item);\n ScanaStudio.dec_item_add_content(\"Manufacturer Code : \" + str);\n ScanaStudio.dec_item_add_content(\"\" + str);\n ScanaStudio.dec_item_add_content(str);\n ScanaStudio.dec_item_end();\n // Packet View\n ScanaStudio.packet_view_add_packet(false,\n decoder_items.channel_index,\n start_item,\n end_item,\n \"Fast Packet Data\",\n (\"Manufacturer Code : \" + str),\n ScanaStudio.PacketColors.Data.Title,\n ScanaStudio.PacketColors.Data.Content);\n start_item = end_item;\n end_item = decoder_items.start_sample_index + (decoder_items.end_sample_index - decoder_items.start_sample_index)/8*5;\n ScanaStudio.dec_item_new(decoder_items.channel_index, start_item, end_item);\n ScanaStudio.dec_item_add_content(\"Reserved : 0x\" + pad(reserved.toString(16),1));\n ScanaStudio.dec_item_add_content(\"Reserved\");\n ScanaStudio.dec_item_end();\n // Packet View\n ScanaStudio.packet_view_add_packet(false,\n decoder_items.channel_index,\n start_item,\n end_item,\n \"Fast Packet Data\",\n (\"Reserved : 0x\" + pad(reserved.toString(16),1)),\n ScanaStudio.PacketColors.Data.Title,\n ScanaStudio.PacketColors.Data.Content);\n str = LOOKUP_INDUSTRY_CODE(industry_code);\n ScanaStudio.dec_item_new(decoder_items.channel_index, end_item, decoder_items.end_sample_index);\n ScanaStudio.dec_item_add_content(\"Industry Code : \" + str);\n ScanaStudio.dec_item_add_content(str);\n ScanaStudio.dec_item_end();\n // Packet View\n ScanaStudio.packet_view_add_packet(false,\n decoder_items.channel_index,\n end_item,\n decoder_items.end_sample_index,\n \"Fast Packet Data\",\n (\"Industry Code : \" + str),\n ScanaStudio.PacketColors.Data.Title,\n ScanaStudio.PacketColors.Data.Content);\n skip_item = true;\n break;\n }\n default :\n {\n packet_title = \"Byte n°\" + fast_packet_byte;\n item_content = \"0x\" + pad(hex_value.toString(16),2);\n break;\n }\n }\n}", "function GetDeviceIP(){\n showBackgroundImage('wait_message');\n getContent('','/cgi-bin/setup.cgi?GetDeviceIP','function:ShowGetDeviceIP');\n}", "prepare() {}", "function FindPubPointIndex() \n{ \n var i =0 ; \n var dwNumPubPoints = 0;\n var bFound = false;\n dwNumPubPoints = objServer.PublishingPoints.Count; \n while(i<dwNumPubPoints)\n {\n szTemp = objServer.PublishingPoints.item( i ).name;\n if(szTemp.toLowerCase() == szArgPubPoint.toLowerCase())\n { \n bFound = true; \n break; \n } \n i = i + 1;\n }\n\n if( false == bFound )\n { \n szTemp = \"Publishing Point \"+szArgPubPoint+\" does not exist \";\n Trace(szTemp); \n WScript.Quit(1);\n }\n //else \n return( i );\n}", "function test_azone_group_by_tag_ec2() {}", "function fos6_c() {\n ;\n }", "_doWarmUp() { }", "function main() {\n getIpLocation();\n setHandlers();\n }", "firstUpdated() {}", "function loadThisMonth(){\n\tconsole.log('show me this months entryes')\nvar nrOfevents=0;\t\n//Get first last day of month\nvar x = new Date();\nvar year= x.getFullYear();\nvar month = x.getMonth();\nvar day = x.getDate();\nvar prevMonthFirstDay = new Date(year - (month == 1 ? 1 : 0), (month == 12 ? 1 : month - 1), 1);\nvar prevMonthLastDay = new Date(year, month, 0);\nvar thisMonthFirstDay = new Date(year, month, 1).toISOString();\nvar thisMonthLastDay = new Date(year + (month == 12 ? 1 : 0), (month == 1 ? 12 : month + 1), 0).toISOString();\n\t\n//\tconsole.log(thisMonthLastDay)\n\ngapi.client.load('calendar', 'v3', function() {\n\nvar request = gapi.client.calendar.events.list({ 'calendarId': calID, \"singleEvents\" : true, \"orderBy\" : \"startTime\", \"timeMax\": thisMonthLastDay,\"timeMin\": thisMonthFirstDay});\n\nrequest.execute(function(resp)\n{\n\n\t\nif('undefined' != resp.items){\t\n\t\n\tconsole.log(resp.items)\n\t\n\tfor (var key in resp.items.reverse()) {\n\n\tvar oldTimerID =resp.items[key].id;\t\t\n\tvar oldTimerContent =resp.items[key].description.replace(\"client:\", \"\").replace(\"job description:\", \"\").replace(\"jobnr:\", \"\").replace(\"Contact person:\", \"\").replace(\"phone:\", \"\").replace(\"mail:\", \"\").replace(\"notes:\", \"\").replace(\"timespend:\", \"\").replace(\"nrofBreaks:\", \"\").replace(\"breaks:\", \"\").split(/\\r\\n|\\r|\\n/g);\n\n\t\t createOldTimers(oldTimerContent,oldTimerID,false)\t\n\t}\n}\n// showTimers()\n\n\n})\n\n\n })\n/*\t\nvar oHeight=0;\nvar i=0;\t\nvar oZindez=0;\t\nfunction createOldXXXXXXTimers(oldTimerContent,oldTimerID,newtimer){\n\n/*\t\n\n0 - - @start 15/3/2014 : 23:35:04\n1 - - @end 15/3/2014 : 23:35:32\n\n2 - - your mamma\n3 - - nothing and you do what\n4 - - 007\n5 - - who you gonna call gohts busters\n6 - - no \n7 - - [email protected]\n8 - - hej dorte\n\n9 - - 00:00:42\n10 - - 00:00:00 \n\n\t\t\n\t\n\tvar $oldTimer=$('<div class=\"timer-old\">'+\t\n'<div class=\"btn delete\"></div>'+\t\n'<div class=\"oldDate\"><p>'+oldTimerContent[0]+'<br>'+oldTimerContent[1]+'</p></div>'+\t\n\t\t\t\t\t\n\t'<div class=\"timer-info\">'+\n\t\t'<p>'+\n\t\t\t\t\t\n\t\t'<span class=\"timer-info-txt\">client:</span>'+\n\t\t'<span class=\"client\" contenteditable=\"false\">'+oldTimerContent[2]+'</span><br>'+\n\n\t\t'<span class=\"timer-info-txt\">job description:</span>'+\n\t\t'<span class=\"job\" contenteditable=\"false\">'+oldTimerContent[3]+'</span><br>'+\n\n\t\t'<span class=\"timer-info-txt\">jobnr:</span>'+\n\t\t'<span class=\"jobnr\" contenteditable=\"false\">'+oldTimerContent[4]+'</span><br>'+\n\n\t\t'<span class=\"timer-info-txt\">Contact person:</span>'+\n\t\t'<span class=\"person\" contenteditable=\"false\">'+oldTimerContent[5]+'</span><br>'+\n\n\t\t'<span class=\"timer-info-txt\">phone:</span>'+\n\t\t'<span class=\"phone\" contenteditable=\"false\">'+oldTimerContent[6]+'</span><br>'+\n\n\t\t'<span class=\"timer-info-txt\">mail:</span>'+\n\t\t'<span class=\"mail\" contenteditable=\"false\">'+oldTimerContent[7]+'</span><br>'+\n\n\t\t'<span class=\"timer-info-txt\">notes:</span>'+\n\t\t'<span class=\"notes\" contenteditable=\"false\">'+oldTimerContent[8]+'</span>'+\n\t\t'</p>'+\t\n\t\t\t\t\t\n\t'</div>'+\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t'<div class=\"timer-dashed-line\"></div>'+\t\n\t'<div class=\"timer-clock\">'+\n\t'<p class=\"timer-total-txt\"><span class=\"datetoday\"></span> you have been working a total time of</p><br>'+\n\t'<p class=\"timer-work-clock\">'+oldTimerContent[9]+'</p><br>'+\n\t'<p class=\"timer-breaktotal-txt\">You took <span class=\"breaks\">'+oldTimerContent[10]+'</span> breaks at the total time of <span class=\"break-clock\">'+oldTimerContent[11]+'</span></p>'+\n\t'</div>'+\n\t\t\t\t\t\n\t'</div>'); \n\t\n\n\t$oldTimer.data('id',oldTimerID);\n\t\n\tTweenMax.set($oldTimer, {transformOrigin:\"top center\",transformStyle:\"preserve-3d\",transformPerspective:1500, perspective:1200,z:500,rotationX:-90,z:900});\n\t\t\n\t\n\t\n\n}\n*/\n\n}", "function BOT_grepRequestComponents() {\r\n\tvar x,rel;\r\n\t\r\n\tBOT_theReqPerformative\t= null;\r\n\tBOT_theReqTopic\t\t\t= null;\r\n\tBOT_theReqAttribute\t\t= null;\r\n\tBOT_theReqAction\t\t= null;\r\n\tBOT_theReqValue\t\t\t= null;\r\n\tBOT_theReqStresser\t\t= null;\r\n\tBOT_theReqText\t\t\t= null; \r\n\tBOT_theReqFeeling\t\t= null; \r\n\tBOT_theReqJudgement\t\t= null; \r\n\t\r\n\tx = BOT_greplemTagElement(\"PER\"); BOT_theReqPerformative = x;\r\n\tx = BOT_greplemTagElement(\"REF\"); if(x) BOT_theReqTopic = x;\r\n\t\r\n\tx = BOT_greplemTagElement(\"KEY\"); \r\n\tif(x) BOT_theReqAttribute = x; \r\n\telse { x = BOT_greplemTagElement(\"KYS\"); if(x) BOT_theReqAttribute = x } // list\r\n\tx = BOT_greplemTagElement(\"REL\"); if(x) BOT_theReqRelation = x;\r\n\tx = BOT_greplemTagElement(\"ACT\"); if(x) BOT_theReqAction = x; \r\n\tx = BOT_greplemTagElement(\"VAL\"); if(x) BOT_theReqValue = x; \r\n\tx = BOT_greplemTagElement(\"STR\"); if(x) BOT_theReqStresser = x; \r\n\tx = BOT_greplemTagElement(\"TXT\"); if(x) BOT_theReqText = x; \r\n\tx = BOT_greplemTagElement(\"EQU\"); if(x) BOT_theReqEqual = x; \r\n\tx = BOT_greplemTagElement(\"FEE\"); if(x) BOT_theReqFeeling = x; \r\n\tx = BOT_greplemTagElement(\"JUD\"); if(x) BOT_theReqJudgement = x; \r\n\r\n\tif(!BOT_theReqPerformative) BOT_theReqPerformative = BOT_theReqAction ? \"x\" : \"g\"; // always a performative\r\n\r\n\tif(BOT_theReqPerformative) \tBOT_traceString += \"REQ perf \" + BOT_theReqPerformative + \"\\n\";\r\n\tif(BOT_theReqTopic) \t\tBOT_traceString += \"REQ topic \" + BOT_theReqTopic + \"\\n\";\r\n\tif(BOT_theReqAttribute) \tBOT_traceString += \"REQ attr \" + BOT_theReqAttribute + \"\\n\";\r\n\tif(BOT_theReqRelation) \t\tBOT_traceString += \"REQ rel \" + BOT_theReqRelation + \"\\n\";\r\n\tif(BOT_theReqAction) \t\tBOT_traceString += \"REQ action \" + BOT_theReqAction + \"\\n\";\r\n\tif(BOT_theReqValue) \t\tBOT_traceString += \"REQ value \" + BOT_theReqValue + \"\\n\";\r\n\tif(BOT_theReqStresser)\t\tBOT_traceString += \"REQ stress \" + BOT_theReqStresser + \"\\n\";\r\n\tif(BOT_theReqText)\t\t\tBOT_traceString += \"REQ text \" + BOT_theReqText + \"\\n\"; \r\n\tif(BOT_theReqEqual)\t\t\tBOT_traceString += \"REQ Equal \" + BOT_theReqEqual + \"\\n\"; \r\n\tif(BOT_theReqFeeling)\t\tBOT_traceString += \"REQ Feeling \" + BOT_theReqFeeling + \"\\n\"; \r\n\tif(BOT_theReqJudgement)\t\tBOT_traceString += \"REQ Judge \" + BOT_theReqJudgement + \"\\n\"; \r\n\r\n\t// current topic management\r\n\tif(!BOT_theReqTopic) {\r\n\t\tif(BOT_theReqPerformative == \"f\") {\r\n\t\t\tBOT_theReqTopic = BOT_theUserTopicId; \r\n\t\t\tBOT_traceString += \"FEEL topic \" + BOT_theReqTopic + \"\\n\";\r\n\t\t\t}\r\n\t\telse if (BOT_theReqPerformative == \"w\") BOT_theReqTopic = BOT_theLastTopic; \r\n\t\telse {\r\n\t\t\tvar thebottopicid = (eval(BOT_theBotId)).topicId; // back to current bot \r\n\t\t\tBOT_theReqTopic = thebottopicid; // BOT_theLastTopic ? BOT_theLastTopic : BOT_theTopicId;\r\n\t\t\tBOT_traceString += \"LAST topic \" + BOT_theReqTopic + \"\\n\";\r\n\t\t\t// relation to another topic\r\n\t\t\tif(BOT_theReqRelation) {\r\n\t\t\t\trel = BOT_get(BOT_theReqTopic, BOT_theReqRelation,\"VAL\");\r\n\t\t\t\tif(BOT_member(BOT_topicIdList,rel)) {\r\n\t\t\t\t\tBOT_theReqTopic = rel;\r\n\t\t\t\t\tBOT_traceString += \"NEW topic \" + BOT_theReqTopic + \"\\n\";\r\n\t\t\t\t}\r\n\t\t\t }\r\n\t\t}\r\n\t}\r\n\telse BOT_theTopicId = BOT_theReqTopic; // updates current topic\r\n\r\n}", "static private public function m119() {}", "resolution() { }", "function goDebug(tpl, tt) {\n const pageIds = [];\n /* più funzionale\n const pageIds2 = [0,1,2,3,4]\n .map(n=>process.env[\"PID_\"+n])\n .map(e=>{\n // PID_0 = 185193552025498:FC,<access token>\n const i2punti = e && e.indexOf(\":\")\n const iComma = e && e.indexOf(\",\")\n \n return e ? {\n pid: e.substring(0, i2punti),\n bacino: e.substring(i2punti + 1, iComma),\n atok: e.substring(iComma + 1),\n }\n : undefined;\n })\n */\n // legge i pageIds dalle env PID_<i>\n for (let i = 0; i < 9; i++) {\n if (process.env[\"PID_\" + i]) {\n const pidd = process.env[\"PID_\" + i];\n // PID_0 = 185193552025498:FC,<access token>\n const i2punti = pidd.indexOf(\":\");\n const iComma = pidd.indexOf(\",\");\n pageIds.push({\n pid: pidd.substring(0, i2punti),\n bacino: pidd.substring(i2punti + 1, iComma),\n atok: pidd.substring(iComma + 1),\n });\n }\n }\n function getPidData(page_id) {\n const pags = pageIds.filter(item => item.pid === page_id);\n if (pags.length === 1)\n return pags[0];\n else\n return pageIds[0];\n }\n const pid = getPidData(\"185193552025498\");\n // tt.onMessage(utils.fakechat, \"ping pong squadra 7401\", pid)\n tt.onMessage(utils.fakechat, \"ping pong\", pid);\n // tpl.onPostback(\"TPL_ON_CODLINEA_FO04\", utils.fakechat, pid)\n // tpl.onMessage(utils.fakechat, \"orari 5a\", pid)\n // tpl.onLocationReceived(utils.fakechat, {lat:44.2, long:12.1})\n /*\n service.getTripsAndShapes('FC', linea.route_id, 0, 0)\n .then((tas: TripsAndShapes) => {\n console.log(JSON.stringify(tas.trips))\n })\n*/\n // tpl.onLocationReceived(utils.fakechat, {lat:44.225084, long:12.058301});\n /*\n\nservice.getLinea_ByRouteId('FC','FO11');\nservice.getTripIdsAndShapeIds_ByStop('FC', '3322', 0).then((ss:model.StopSchedule) => {\n console.log( {\n stop: ss.stop,\n trips: ss.trips,\n url : ss.stop.gmapUrl(\"320x320\",\"F\")\n })\n})\n*/\n}", "static transient private public function m56() {}" ]
[ "0.6002249", "0.5818521", "0.54014605", "0.5398038", "0.53063804", "0.5233309", "0.5224012", "0.5172193", "0.5108844", "0.50725836", "0.50518954", "0.49987754", "0.4975756", "0.4943721", "0.4905448", "0.49024722", "0.48846832", "0.4861071", "0.48471314", "0.48334852", "0.4815205", "0.47926846", "0.47661683", "0.4758311", "0.47382843", "0.472963", "0.4720688", "0.47067058", "0.4703671", "0.4678006", "0.46726912", "0.46717417", "0.46591914", "0.4628049", "0.4621676", "0.4611755", "0.46047875", "0.46023795", "0.4593009", "0.45908454", "0.45871547", "0.4583085", "0.4565884", "0.4563955", "0.4554438", "0.4553723", "0.45482147", "0.45470226", "0.45403838", "0.45361927", "0.452311", "0.4517524", "0.45059502", "0.45046628", "0.4501578", "0.4496685", "0.44876924", "0.44834036", "0.44753477", "0.44748998", "0.44744584", "0.44708934", "0.44706956", "0.44674528", "0.4463304", "0.4457476", "0.44481322", "0.44418424", "0.4441492", "0.44409904", "0.4423618", "0.44230717", "0.44192052", "0.44098487", "0.44098487", "0.44015136", "0.44001842", "0.43981445", "0.43849447", "0.4383423", "0.43731907", "0.43681705", "0.43629363", "0.43584064", "0.43580356", "0.43538243", "0.43359396", "0.4334862", "0.43305236", "0.4329093", "0.43279016", "0.4327751", "0.43260205", "0.43239293", "0.43226767", "0.43186334", "0.43169588", "0.43161073", "0.4313842", "0.4313004", "0.43126386" ]
0.0
-1
given restrictions provided, make a reduced list of products prices should be included in this list, as well as a sort based on price
function restrictListProducts(prods, restriction, organic) { restricted_prods = []; for (let i=0; i<prods.length; i+=1) { if ((restriction["nut-free"] == true && restriction["lactose-free"] == false) && (prods[i].nut == false)){ _organicCheck(prods[i],organic); } else if ((restriction["lactose-free"] == true && restriction["nut-free"] == false) && (prods[i].lactose == false)){ _organicCheck(prods[i],organic); } else if((restriction["lactose-free"] == true && restriction["nut-free"] == true) && (prods[i].lactose == false && prods[i].nut == false)) { _organicCheck(prods[i],organic); } else if(restriction["none"] == true){ _organicCheck(prods[i],organic); } } return restricted_prods; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function restrictListProducts(prods, restriction) {\n\tlet product_names = [];\n\tfor (let i=0; i<prods.length; i+=1) {\n\t\tif ((restriction == \"lactose\") &&(prods[i].LactoseFree == true)){\n\t\t\tproduct_names.push(prods[i]);\n\t\t}\n\t\telse if ((restriction == \"noix\") && (prods[i].noixfree == true)){\n\t\t\tproduct_names.push(prods[i]);\n\t\t}\n\t\telse if ((restriction == \"vegetarian\")&& (prods[i].vegetarian == true)){\n\t\t\tproduct_names.push(prods[i]);\n\t\t}\n\t\telse if ((restriction == \"gluten\") && (prods[i].glutenFree == true)){\n\t\t\tproduct_names.push(prods[i]);\n\t\t}\n\t\telse if ((restriction == \"jus\") && (prods[i].type == \"jus\")){\n\t\t product_names.push(prods[i]);\n\t\t}\n\t\telse if ((restriction == \"legume\") && (prods[i].type == \"legume\")){\n\t\t product_names.push(prods[i]);\n\t\t}\n\t\telse if ((restriction == \"fruit\") && (prods[i].type == \"fruit\")){\n\t\t product_names.push(prods[i]);\n\t\t}\n\t\telse if ((restriction == \"laitier\") && (prods[i].type == \"laitier\")){\n\t\t product_names.push(prods[i]);\n\t\t}\n\t\telse if ((restriction == \"orga\") && (prods[i].organic == true)){\n\t\t product_names.push(prods[i]);\n\t\t}\n\n\n\t}\n\n\tvar sorted = product_names.sort((a, b) => a.price - b.price);\n\treturn sorted;\n}", "function restrictListProducts(prods, restriction) {\n\tlet product_names = [];\n\tfor (let i=0; i<prods.length; i+=1) {\n\t\tif(restriction==\"None\"){\n\t\t\tproduct_names.push({name:prods[i].name, price:prods[i].price});\n\t\t}else if(prods[i][restriction]){\n\t\t\tproduct_names.push({name:prods[i].name, price:prods[i].price});\n\t\t}\n\t}\n\tproduct_names.sort((a,b)=>{return a.price - b.price;});\n\treturn product_names;\n}", "function restrictListProducts(prods, restriction) {\n\tlet product_names = [];\n\tfor (let i=0; i<prods.length; i+=1) {\n\t\t\tproduct_names.push(prods[i]);\n\t\t}\n\n\t\t\t\n\tlet lactoseFree = document.getElementById(\"lactoseIntolerant\");\n\t\n\tlet Nut = document.getElementById(\"nutFree\");\n\n\tlet isOrganic = document.getElementById(\"organic\");\n\n\tlet isHealthy = document.getElementById(\"healthy\");\n\n\tlet goodForWeightLoss = document.getElementById(\"weightLoss\");\n\n\n\tif(lactoseFree.checked) {\n\t\tproduct_names = product_names.filter(product_names => product_names.lactoseIntolerant);\n\n\t}\n\n\tif(Nut.checked) {\n\t\tproduct_names = product_names.filter(product_names => product_names.nutFree);\n\n\t}\n\n\tif(isOrganic.checked) {\n\t\tproduct_names = product_names.filter(product_names => product_names.organic);\n\n\t}\n\n\tif(isHealthy.checked) {\n\t\tproduct_names = product_names.filter(product_names => product_names.healthy);\n\n\t}\n\n\tif(goodForWeightLoss.checked) {\n\t\tproduct_names = product_names.filter(product_names => product_names.weightLoss);\n\n\t}\n\n\t\t\t\n\t// Sort the array by price so that the items show in price order\n\n\tproduct_names.sort(function(a, b){\n\t\treturn a.price - b.price\n\t});\n\t\n\n\t\n\treturn product_names;\n}", "function restrictList(product, restriction, is_organic, type){\n let temp;\n for (let i = 0; i < product.length; i++) {\n for (let j = 0; j < product.length; j++) {\n if (product[i].price < product[j].price) {\n temp = product[i]\n product[i] = product[j]\n product[j] = temp\n }\n }\n }\n let product_names = [];\n if (type==\"all\") {\n if (is_organic == true) {\n for (let i = 0; i < product.length; i += 1) {\n if ((restriction == \"Vegetarian\") && (product[i].vegetarian == true) && (product[i].organic == true)) {\n product_names.push(product[i].name + \" $\" + product[i].price);\n } else if ((restriction == \"GlutenFree\") && (product[i].glutenFree == true) && (product[i].organic == true)) {\n product_names.push(product[i].name + \" $\" + product[i].price);\n } else if ((restriction == \"VegAGlu\") && (product[i].glutenFree == true) && (product[i].vegetarian == true) && (product[i].organic == true)) {\n product_names.push(product[i].name + \" $\" + product[i].price);\n } else if ((restriction == \"None\") && (product[i].organic == true)) {\n product_names.push(product[i].name + \" $\" + product[i].price);\n }\n }\n } else {\n for (let i = 0; i < product.length; i += 1) {\n if ((restriction == \"Vegetarian\") && (product[i].vegetarian == true)) {\n product_names.push(product[i].name + \" $\" + product[i].price);\n } else if ((restriction == \"GlutenFree\") && (product[i].glutenFree == true)) {\n product_names.push(product[i].name + \" $\" + product[i].price);\n } else if ((restriction == \"VegAGlu\") && (product[i].glutenFree == true) && (product[i].vegetarian == true)) {\n product_names.push(product[i].name + \" $\" + product[i].price);\n } else if (restriction == \"None\") {\n product_names.push(product[i].name + \" $\" + product[i].price);\n }\n }\n }\n }\n else{\n if (is_organic == true) {\n for (let i = 0; i < product.length; i += 1) {\n if ((restriction == \"Vegetarian\") && (product[i].vegetarian == true) && (product[i].organic == true) &&(product[i].type==type)) {\n product_names.push(product[i].name + \" $\" + product[i].price);\n } else if ((restriction == \"GlutenFree\") && (product[i].glutenFree == true) && (product[i].organic == true) &&(product[i].type==type)) {\n product_names.push(product[i].name + \" $\" + product[i].price);\n } else if ((restriction == \"VegAGlu\") && (product[i].glutenFree == true) && (product[i].vegetarian == true) && (product[i].organic == true) &&(product[i].type==type)) {\n product_names.push(product[i].name + \" $\" + product[i].price);\n } else if ((restriction == \"None\") && (product[i].organic == true) &&(product[i].type==type)) {\n product_names.push(product[i].name + \" $\" + product[i].price);\n }\n }\n } else {\n for (let i = 0; i < product.length; i += 1) {\n if ((restriction == \"Vegetarian\") && (product[i].vegetarian == true) &&(product[i].type==type)) {\n product_names.push(product[i].name + \" $\" + product[i].price);\n } else if ((restriction == \"GlutenFree\") && (product[i].glutenFree == true) &&(product[i].type==type)) {\n product_names.push(product[i].name + \" $\" + product[i].price);\n } else if ((restriction == \"VegAGlu\") && (product[i].glutenFree == true) && (product[i].vegetarian == true) &&(product[i].type==type)) {\n product_names.push(product[i].name + \" $\" + product[i].price);\n } else if (restriction == \"None\" &&(product[i].type==type)) {\n product_names.push(product[i].name + \" $\" + product[i].price);\n }\n }\n }\n }\n return product_names;\n}", "function restrictListProducts(prods, restriction) {\r\n\tlet product_names = [];\r\n\tfor (let i=0; i<prods.length; i+=1) {\r\n\t\tprods.sort(function(a, b){return a.price - b.price}); //sort product list by price\r\n\t\tif ((restriction == \"Lactose\") && (prods[i].lactoseF == true)){\r\n\t\t\tproduct_names.push(prods[i].name);\r\n\t\t}\r\n\t\telse if ((restriction == \"Nuts\") && (prods[i].nutsF == true)){\r\n\t\t\tproduct_names.push(prods[i].name);\r\n\t\t}\r\n\t\telse if ((restriction == \"Organic\") && (prods[i].org == true)){\r\n\t\t\tproduct_names.push(prods[i].name);\r\n\t\t}\r\n\t\telse if (restriction == \"None\"){\r\n\t\t\tproduct_names.push(prods[i].name);\r\n\t\t}\r\n\t}\r\n\treturn product_names;\r\n}", "function restrictListProducts(prods, restriction, organic) {\n\tvar product_information = [];\n if (organic){\n\n for (let i=0; i<prods.length; i+=1) {\n if ((restriction == \"lactosenutfree\") && (prods[i].lactosefree) && (prods[i].nutfree) && (prods[i].organic)){\n product_information.push([prods[i].price, prods[i].name]);\n }\n else if ((restriction == \"lactosefree\") && (prods[i].lactosefree) && (prods[i].organic)){\n product_information.push([prods[i].price, prods[i].name]);\n }\n else if ((restriction == \"nutfree\") && (prods[i].nutfree) && (prods[i].organic)){\n product_information.push([prods[i].price, prods[i].name]);\n }\n else if ((restriction == \"None\") && (prods[i].organic)){\n product_information.push([prods[i].price, prods[i].name]);\n }\n }\n return product_information.sort(function sortListProducts(valA, valB) {\n return valA[0] - valB[0];\n });\n\n }else{\n\n for (let i=0; i<prods.length; i+=1) {\n if ((restriction == \"lactosenutfree\") && (prods[i].lactosefree) && (prods[i].nutfree)){\n product_information.push([prods[i].price, prods[i].name]);\n }\n else if ((restriction == \"lactosefree\") && (prods[i].lactosefree)){\n product_information.push([prods[i].price, prods[i].name]);\n }\n else if ((restriction == \"nutfree\") && (prods[i].nutfree)){\n product_information.push([prods[i].price, prods[i].name]);\n }\n else if (restriction == \"None\"){\n product_information.push([prods[i].price, prods[i].name]);\n }\n }\n return product_information.sort(function sortListProducts(valA, valB) {\n return valA[0] - valB[0];\n });\n }\n}", "function restrictListProducts(prods, lactose, nut, organic) {\n\tlet products = [];\n\n\tprods.sort(function(a, b){\n\t\t\treturn a.price - b.price;\n\t})\n\n\tfor (let i=0; i<prods.length; i+=1) {\n\t\tif (lactose && !prods[i].lactose) continue;\n\t\tif (nut && !prods[i].nutFree) continue;\n\t\tif (organic && !prods[i].organic) continue;\n\t\tproducts.push(prods[i]);\n\n\t}\n\treturn products;\n}", "function restrictListProducts(prods, lactoseIntolerant, nutFree, organic, sorter) {\n\tlet products = [];\n\tfor (let i = 0; i < prods.length; i += 1) {\n\t\tif (ableToEat(prods[i], lactoseIntolerant, nutFree, organic)) {\n\t\t\tproducts.push(prods[i]);\n\t\t}\n\t}\n\treturn products.sort(sorter);\n}", "function restrictListProducts(prods, restriction) {\n\tlet product_names = [];\n\t/*for (let i=0; i<prods.length; i+=1) {\n\t\tif (restriction==\"None\"){\n\t\t\tproduct_names.push([prods[i].name, prods[i].price]);\t\n }\n\t\telse if ((restriction == \"Lactose-intolerant Nutallergy and Organic\") && (prods[i].lactoseFree == true && (prods[i].nutFree == true)&& (prods[i].organic== true))){\n\t\t\tproduct_names.push([prods[i].name, prods[i].price]);\n\t\t}\n\t\telse if ((restriction == \"Lactose-intolerant and Nutallergy\") && (prods[i].lactoseFree == true && (prods[i].nutFree == true))){\n\t\t\tproduct_names.push([prods[i].name, prods[i].price]);\n\t\t}\n\t\telse if ((restriction == \"Lactose-intolerant and Organic\") && (prods[i].lactoseFree == true && (prods[i].organic == true))){\n\t\t\tproduct_names.push([prods[i].name, prods[i].price]);\n\t\t}\n\t\telse if ((restriction == \"Nutallergy and Organic\") && (prods[i].organic == true && (prods[i].nutFree == true))){\n\t\t\tproduct_names.push([prods[i].name, prods[i].price]);\n\t\t}\n\t\telse if ((restriction == \"Lactose-intolerant\") && (prods[i].lactoseFree == true)){\n\t\t\tproduct_names.push([prods[i].name, prods[i].price]);\n\t\t}\n\t\telse if ((restriction == \"Nutallergy\") && (prods[i].nutFree == true)){\n\t\t\tproduct_names.push([prods[i].name, prods[i].price]);\n\t\t}\n\t\telse if (restriction == \"Organic\" && prods[i].organic==true){\n\t\t\tproduct_names.push([prods[i].name, prods[i].price]);\t\n\t\t}\n\t}*/\n\tif(restriction[\"None\"]==true){\n\t\tfor (let i=0; i<prods.length; i+=1) {\n\t\t\tproduct_names.push([prods[i].name, prods[i].price]);\t\n\t}}else{\n\t\tfor (let i=0; i<prods.length; i+=1) {\n\t\t\tconsole.log(restriction[\"Organic\"]+ \"==\"+ prods[i].organic+ \" \"+ restriction[\"Nutallergt\"]+ \"==\"+ prods[i].nutFree+ \" \"+ restriction[\"Lactose-intolerant\"]+ \"==\"+ prods[i].lactoseFree+ \" \");\n\t\t\tif((restriction[\"Organic\"]==prods[i].organic|| restriction[\"Organic\"]==false) &&(restriction[\"Nutallergy\"]==prods[i].nutFree|| restriction[\"Nutallergy\"]==false) && (restriction[\"Lactose-intolerant\"]==prods[i].lactoseFree|| restriction[\"Lactose-intolerant\"]==false)){\n\t\t\t\tproduct_names.push([prods[i].name, prods[i].price]);\t\n\t\t\t}\n\t\t}\n\t}\n\treturn product_names.sort(function([a,b], [c,d]){ // method taken from https://stackoverflow.com/a/50415269\n\t\treturn b-d;\n\t});;\n}", "function restrictListProducts(prods, restriction) {\r\n\tlet product_names = [];\r\n var restrictions = restriction.split(',');\r\n// console.log(restrictions);\r\n\tfor (let i=0; i<prods.length; i+=1) {\r\n var productVegetarian = prods[i].vegetarian;\r\n var productGlutenFree = prods[i].glutenFree;\r\n var productOrganic = prods[i].organic;\r\n var restrictVeg = false;\r\n var restrictGlu = false;\r\n var restrictOrg = false;\r\n var None = false;\r\n// console.log(restrictions.length);\r\n \r\n if(restrictions.length >= 2){\r\n for(let j = 0; j < restrictions.length; j++){\r\n if(restrictions[j] == \"Vegetarian\") restrictVeg = true;\r\n if(restrictions[j] == \"GlutenFree\") restrictGlu = true;\r\n if(restrictions[j] == \"Organic\") restrictOrg = true;\r\n }\r\n if ((restrictVeg && restrictOrg && restrictGlu) && (productVegetarian && productOrganic && productGlutenFree)){\r\n\t\t\t product_names.push(prods[i].name + \":\" + prods[i].price);\r\n }else if ((restrictGlu && restrictVeg && !restrictOrg) && (productVegetarian && productGlutenFree)){\r\n\t\t\t product_names.push(prods[i].name + \":\" + prods[i].price);\r\n\t\t }else if ((restrictGlu && restrictOrg && !restrictVeg) && (productGlutenFree&& productOrganic)){\r\n\t\t\t product_names.push(prods[i].name + \":\" + prods[i].price);\r\n }else if ((restrictVeg && restrictOrg && !restrictGlu) && (productVegetarian && productOrganic)){\r\n\t\t\t product_names.push(prods[i].name + \":\" + prods[i].price);\r\n }\r\n }else{\r\n if ((restrictions[0] == \"Vegetarian\") && (productVegetarian)){\r\n product_names.push(prods[i].name + \":\" + prods[i].price);\r\n }else if ((restrictions[0] == \"GlutenFree\") && (productGlutenFree)){\r\n product_names.push(prods[i].name + \":\" + prods[i].price);\r\n }else if ((restrictions[0] == \"Organic\") && (productOrganic)){\r\n product_names.push(prods[i].name + \":\" + prods[i].price);\r\n }else if (restrictions[0] == \"None\"){\r\n product_names.push(prods[i].name + \":\" + prods[i].price);\r\n }\r\n }\r\n \r\n\r\n\t}\r\n\treturn product_names;\r\n}", "function restrictListProducts(prods, restriction) {\n\tlet product_names = [];\n\tfor (let i=0; i<prods.length; i+=1) {\n\t\tif ((restriction == \"Vegetarian\") && (prods[i].vegetarian == true)){\n\t\t\tproduct_names.push([prods[i].name,prods[i].price,prods[i].category,prods[i].img]);\n\t\t}\n\t\telse if ((restriction == \"GlutenFree\") && (prods[i].glutenFree == true)){\n\t\t\tproduct_names.push([prods[i].name,prods[i].price,prods[i].category,prods[i].img]);\n }\n else if ((restriction == \"Vegetarian&GlutenFree\") && (prods[i].vegetarian == true) && (prods[i].glutenFree == true)){\n\t\t\tproduct_names.push([prods[i].name,prods[i].price,prods[i].category,prods[i].img]);\n }\n else if ((restriction == \"Organic\") && (prods[i].Organic == true)){\n\t\t\tproduct_names.push([prods[i].name,prods[i].price,prods[i].category,prods[i].img]);\n }\n\t\telse if (restriction == \"None\"){\n\t\t\tproduct_names.push([prods[i].name,prods[i].price,prods[i].category,prods[i].img]);\n }\n else if (restriction == \"\"){\n\t\t\tproduct_names.push([prods[i].name,prods[i].price,prods[i].category,prods[i].img]);\n\t\t}\n }\n product_names.sort(compareSecondColumn);\n\treturn product_names;\n}", "function restrictListProducts(prods, restrictions) {\n\tvar lactoseFree = false;\n\tvar nutFree = false;\n\tvar organic = false;\n\tif (restrictions.length > 0){\n\t\tfor (i = 0; i < restrictions.length; i++) { \n\t\t\tif (restrictions[i] == \"organic\"){\n\t\t\t\torganic = true;\n\t\t\t}\n\t\t\telse if (restrictions[i] == \"nutFree\"){\n\t\t\t\tnutFree = true;\n\t\t\t}\n\t\t\telse if (restrictions[i] == \"lactoseFree\"){\n\t\t\t\tlactoseFree = true;\n\t\t\t}\n\t\t}\n\t}\n\t\n\tlet product_names = [];\n\t\n\tfor (let i=0; i<prods.length; i+=1) {\n\t\tif ((lactoseFree == true) && (nutFree == true)&& (organic == true) && (prods[i].lactoseFree == true) && (prods[i].organic == true) && (prods[i].nutFree == true)){\n\t\t\tproduct_names.push(prods[i]);\n\t\t}\n\t\telse if ((lactoseFree == true) && (nutFree == true) && (organic == false) && (prods[i].lactoseFree == true) && (prods[i].nutFree == true)){\n\t\t\tproduct_names.push(prods[i]);\n\t\t}\n\t\telse if ((lactoseFree == true) && (organic == true) && (nutFree == false) && (prods[i].lactoseFree == true) && (prods[i].organic == true)){\n\t\t\tproduct_names.push(prods[i]);\n\t\t}\n\t\telse if ((nutFree == true) && (organic == true) && (lactoseFree == false) && (prods[i].organic == true) && (prods[i].nutFree == true)){\n\t\t\tproduct_names.push(prods[i]);\n\t\t}\n\t\telse if ((lactoseFree == false) && (nutFree == true)&& (organic == false) && (prods[i].nutFree == true)){\n\t\t\tproduct_names.push(prods[i]);\n\t\t}\n\t\telse if ((lactoseFree == true) && (nutFree == false)&& (organic == false) && (prods[i].lactoseFree == true)){\n\t\t\tproduct_names.push(prods[i]);\n\t\t}\n\t\telse if ((lactoseFree == false) && (nutFree == false)&& (organic == false)){\n\t\t\tproduct_names.push(prods[i]);\n\t\t}\n\t\telse if ((lactoseFree == false) && (nutFree == false)&& (organic == true) && (prods[i].organic == true)){\n\t\t\tproduct_names.push(prods[i]);\n\t\t}\n\t}\n\treturn product_names;\n}", "getPrices(restrictions = []) {\n if (!this.prices) {\n throw new Error('We do not have pricing data yet');\n }\n let prices = this.prices.slice();\n\n return prices.filter(price => {\n for (let {key, restriction} of restrictions) {\n if (key === 'minPrice' || key === 'maxPrice' || key === 'price') {\n // We need to handle minPrice, maxPrice and price differently because\n // they are numerical comparisons\n restriction = toFloat(restriction);\n if (key === 'minPrice' && price.price < restriction) {\n return false;\n } else if (key === 'maxPrice' && price.price > restriction) {\n return false;\n } else if (key === 'price' && restriction !== price.price) {\n return false;\n }\n } else {\n // For string values, we just want simple comparisons. When the\n // restriction is a list, we say that any matching value is allowed\n let allowedValues = restriction;\n\n if (!Array.isArray(restriction)) {\n allowedValues = [restriction];\n }\n\n if (!allowedValues.includes(price[key])) {\n return false;\n }\n }\n }\n return true;\n });\n\n return prices;\n }", "function restrictListProducts(prods) {\r\n\tlet product_names = [];\r\n\tprods.sort((a,b) => a.price - b.price);\r\n\tfor (let i=0; i<prods.length; i+=1) {\r\n\t\tif (!(((document.getElementById(\"lactoseFree\").checked==true) && (prods[i].lactoseFree == false)) ||\r\n\t\t((document.getElementById(\"nutFree\").checked==true) && (prods[i].nutFree == false)) ||\r\n\t\t((document.getElementById(\"organic\").checked==true) && (prods[i].organic == false)) ))\r\n\t\t{\r\n\t\t\tproduct_names.push(prods[i].name)\r\n\t\t}\r\n\t}\r\n\r\n\treturn product_names;\r\n}", "function restrictListProducts(prods, restriction, organicProduct) {\n\tlet product_names = [];\n\tconsole.log(organicProduct, restriction);\n\tfor (let i=0; i<prods.length; i+=1) {\n\t\tvar product = { name: null, price: null };\n\n\t\tif (organicProduct == true && prods[i].organic == true){\n\t\t\tif ((restriction == \"Vegetarian\") && (prods[i].vegetarian == true)){\n\t\t\t\tproduct.name = prods[i].name;\n\t\t\t\tproduct.price = prods[i].price;\n\t\t\t\tproduct_names.push(product);\n\t\t\t}\n\t\t\telse if ((restriction == \"GlutenFree\") && (prods[i].glutenFree == true)){\n\t\t\t\tproduct.name = prods[i].name;\n\t\t\t\tproduct.price = prods[i].price;\n\t\t\t\tproduct_names.push(product);\n\t\t\t}\n\t\t\telse if ((restriction == \"VegetarianANDGlutenFree\") && (prods[i].glutenFree == true && prods[i].vegetarian == true)){\n\t\t\t\tproduct.name = prods[i].name;\n\t\t\t\tproduct.price = prods[i].price;\n\t\t\t\tproduct_names.push(product);\n\t\t\t }\n\t\t\telse if (restriction == \"None\"){\n\t\t\t\tproduct.name = prods[i].name;\n\t\t\t\tproduct.price = prods[i].price;\n\t\t\t\tproduct_names.push(product);\n\t\t\t}\n\t\t}\n\t\telse if (organicProduct == false) {\n\t\t\tif ((restriction == \"Vegetarian\") && (prods[i].vegetarian == true)){\n\t\t\t\tproduct.name = prods[i].name;\n\t\t\t\tproduct.price = prods[i].price;\n\t\t\t\tproduct_names.push(product);\n\t\t\t}\n\t\t\telse if ((restriction == \"GlutenFree\") && (prods[i].glutenFree == true)){\n\t\t\t\tproduct.name = prods[i].name;\n\t\t\t\tproduct.price = prods[i].price;\n\t\t\t\tproduct_names.push(product);\n\t\t\t}\n\t\t\telse if ((restriction == \"VegetarianANDGlutenFree\") && (prods[i].glutenFree == true && prods[i].vegetarian == true)){\n\t\t\t\tproduct.name = prods[i].name;\n\t\t\t\tproduct.price = prods[i].price;\n\t\t\t\tproduct_names.push(product);\n\t\t\t }\n\t\t\telse if (restriction == \"None\"){\n\t\t\t\tproduct.name = prods[i].name;\n\t\t\t\tproduct.price = prods[i].price;\n\t\t\t\tproduct_names.push(product);\n\t\t\t}\n\t\t}\n\t}\n\treturn product_names;\n}", "function restrictListProducts(prods, restriction, organic) {\n\tlet product_names = new Map();\n\tfor (let i=0; i<prods.length; i+=1) {\n\t\tif ((organic == true) && (prods[i].organic == true)) {\n\t\t\tif ((restriction == \"Both Restrictions\") && !prods[i].containLactose && !prods[i].containNuts) {\n\t\t\t\tproduct_names.set(prods[i].name, prods[i].price);\n\t\t\t}\n\t\t\telse if ((restriction == \"Lactose Free\") && !prods[i].containLactose){\n\t\t\t\tproduct_names.set(prods[i].name, prods[i].price);\n\t\t\t}\n\t\t\telse if ((restriction == \"Nuts Free\") && !prods[i].containNuts){\n\t\t\t\tproduct_names.set(prods[i].name, prods[i].price);\n\t\t\t}\n\t\t\telse if (restriction == \"No Restrictions\"){\n\t\t\t\tproduct_names.set(prods[i].name, prods[i].price);\n\t\t\t}\n\t\t} else if((organic == false) && (prods[i].organic == false)){\n\t\t\tif ((restriction == \"Both Restrictions\") && !prods[i].containLactose && !prods[i].containNuts) {\n\t\t\t\tproduct_names.set(prods[i].name, prods[i].price);\n\t\t\t}\n\t\t\telse if ((restriction == \"Lactose Free\") && !prods[i].containLactose){\n\t\t\t\tproduct_names.set(prods[i].name, prods[i].price);\n\t\t\t}\n\t\t\telse if ((restriction == \"Nuts Free\") && !prods[i].containNuts){\n\t\t\t\tproduct_names.set(prods[i].name, prods[i].price);\n\t\t\t}\n\t\t\telse if (restriction == \"No Restrictions\"){\n\t\t\t\tproduct_names.set(prods[i].name, prods[i].price);\n\t\t\t}\n\t\t} else if((organic == null)){\n\t\t\tif ((restriction == \"Both Restrictions\") && !prods[i].containLactose && !prods[i].containNuts) {\n\t\t\t\tproduct_names.set(prods[i].name, prods[i].price);\n\t\t\t}\n\t\t\telse if ((restriction == \"Lactose Free\") && !prods[i].containLactose){\n\t\t\t\tproduct_names.set(prods[i].name, prods[i].price);\n\t\t\t}\n\t\t\telse if ((restriction == \"Nuts Free\") && !prods[i].containNuts){\n\t\t\t\tproduct_names.set(prods[i].name, prods[i].price);\n\t\t\t}\n\t\t\telse if (restriction == \"No Restrictions\"){\n\t\t\t\tproduct_names.set(prods[i].name, prods[i].price);\n\t\t\t}\n\t\t}\n\t}\n\n\tproduct_names[Symbol.iterator] = function* () {\n\t\tyield* [...this.entries()].sort((a, b) => a[1] - b[1]);\n\t}\n\n\treturn product_names;\n}", "function FilterPrice(listingsArray) {\n setPulled(listingsArray.sort((a, b) => a.price > b.price));\n }", "function restrictListProducts(prods, restriction) {\n\tlet restrictedProduct = [];\n\tfor (let i=0; i<prods.length; i+=1) {\n\t\t//Vegetarian\n\t\tif ((restriction[0]) && (!prods[i].vegetarian)){\n\t\t\tcontinue;\n\t\t}\n\t\t//Gluten-Free\n\t\tif ((restriction[1]) && (!prods[i].glutenFree)){\n\t\t\tcontinue;\n\t\t}\n\t\t//organic\n\t\tif ((restriction[2]) && (!prods[i].organic)){\n\t\t\tcontinue;\n\t\t}\n\t\t//vegan \n\t\tif ((restriction[3]) && (!prods[i].vegan)){\n\t\t\tcontinue;\n\t\t}\n\t\t//dairy Free\n\t\tif ((restriction[4]) && (!prods[i].dairyF)){\n\t\t\tcontinue;\n\t\t}\n\t\trestrictedProduct.push(prods[i]);\n\t}\n\treturn restrictedProduct;\n}", "function sortProducts(criterio, array) {\n let result = [];\n if (criterio === ORDER_ASC_BY_COST) {\n result = array.sort(function (a, b) {\n if (a.cost < b.cost) {\n return -1;\n }\n if (a.cost > b.cost) {\n return 1;\n }\n return 0;\n });\n } else if (criterio === ORDER_DESC_BY_COST) {\n result = array.sort(function (a, b) {\n if (a.cost > b.cost) {\n return -1;\n }\n if (a.cost < b.cost) {\n return 1;\n }\n return 0;\n });\n } else if (criterio === ORDER_BY_PROD_REL) {\n result = array.sort(function (a, b) {\n let aSold = parseInt(a.soldCount);\n let bSold = parseInt(b.soldCount);\n\n if (aSold > bSold) {\n return -1;\n }\n if (aSold < bSold) {\n return 1;\n }\n return 0;\n });\n }\n\n return result;\n}", "function reasonable_products(products){\n let res=[];\n products.forEach((product, i) => {\n if(product.price<=100){\n res.push(product);\n }\n });\n return res;\n}", "function FilterByPrice(price) {\n return products.filter(function (item) {\n return item.price <= price;\n });\n}", "function findProductByPriceRange(a, b, c) {\nvar result = a.filter(function(value){\n //return b <= value.price >= c;\n return value.price >= b && value.price <= c\n});\nreturn result;\n}", "function restrictListProducts(prods, restriction) {\n\tlet product_names = [];\n\tfor (let i=0; i<prods.length; i+=1) {\n\t\tif ((restriction == \"NutFree\") && (prods[i].nutfree == true)){\n\t\t\tproduct_names.push(prods[i].name);\n\t\t}\n\t\telse if ((restriction == \"LactoseFree\") && (prods[i].lactosefree == true)){\n\t\t\tproduct_names.push(prods[i].name);\n\t\t}\n\t\telse if ((restriction == \"Include Baby supplies\") && (prods[i].babysupplies == true)){\n\t\t\tproduct_names.push(prods[i].name);\n\t\t}\n\t\telse if ((restriction == \"Include carrot\") && (prods[i].lactosefree == true)){\n\t\t\tproduct_names.push(prods[i].name);\n\t\t}\n\n\t\telse if (restriction == \"None\"){\n\t\t\tproduct_names.push(prods[i].name);\n\t\t}\n\t}\n\treturn product_names;\n}", "function restrictListProducts(prods, restriction) {\n\tlet product_names = [];\n\tfor (let i=0; i<prods.length; i+=1) {\n\t\tif ((restriction.includes(\"nutAllergy\")) && (restriction.includes(\"lactoseIntolerant\")) && (prods[i].lactoseIntolerant == true) && (prods[i].nutAllergy == true) && (prods[i].organic == false)){\n\t\t\tproduct_names.push(prods[i]);\n\t\t}\n\t\telse if ((restriction.includes(\"lactoseIntolerant\")) && !(restriction.includes(\"nutAllergy\")) && !(restriction.includes(\"organic\")) && (prods[i].lactoseIntolerant == true) && (prods[i].organic == false)){\n\t\t\tproduct_names.push(prods[i]);\n\t\t}\n\t\telse if ((restriction.includes(\"nutAllergy\")) && !(restriction.includes(\"lactoseIntolerant\")) && (prods[i].nutAllergy == true) && (prods[i].organic == false)){\n\t\t\tproduct_names.push(prods[i]);\n\t\t}\n\t\telse if ((restriction.includes(\"organic\")) && (prods[i].organic == true)){\n\t\t\tproduct_names.push(prods[i]); \n\t\t}\n\t\telse if (restriction.includes(\"none\")){\n\t\t\tproduct_names.push(prods[i]);\n\t\t}\n\t}\n\treturn product_names;\n}", "function ascendProducts(data){\n //returns a sorted array based on comparing elements a and b \n data.sort(function(a, b) {\n return a.price - b.price;\n });\n show(data);\n}", "function filterProductsByPriceRange(products, min, max) {\n const result = [];\n if(products.length === 0){\n throw \"Error with products!\";\n }\n if(typeof min !== \"number\" || typeof max !== \"number\"){\n throw \"Error with input!\";\n }\n if(min > max || min < 0){\n throw \"Error with min!\";\n }\n if(max <= 0){\n throw \"Error with max!\";\n }\n for (let product of products) {\n if(!product.priceInCents){\n throw \"Error with price!\";\n }\n if (product.priceInCents >= min && product.priceInCents <= max) {\n result.push(product);\n }\n }\n return result;\n}", "function venue_with_price_and_rating(venues,price,rating)\n{\n filtered_list=[];\n \n var isValid = function(param) {\n \treturn typeof param!='undefined' && param!=\"\";\n }; \n \n _.each(venues,\n \tfunction(venue,i,venues) {\n \tvenue_price = venues[i]['price'];\n \tvenue_rating = venues[i]['rating'];\n \t\n \tif ( (!isValid(price) || (isValid(price) && (!isValid(venue_price) || venue_price.tier == price)))\n \t\t\t&&\n \t\t (!isValid(rating) || (isValid(rating) && (!isValid(venue_rating) || venue_rating >= rating))) ) {\n \t\t\tfiltered_list.push(venues[i]);\n \t}\t\t \t\t\n \t}\n );\n \n final_list = parse_venue_object(filtered_list);\n return final_list;\n}", "function budgetFilter (price , ls) {\n\n const result = [];\n let count = 0;\n\n for (let i = 0; i < ls.length; i++) {\n if (price >= ls[i]) {\n result[count] = ls[i];\n count++\n }\n }\n\n return result\n}", "sortProducts() {}", "function filterHotels (hotelList, options) {\n hotelList.forEach(hotel => {\n hotel.own_rating = hotel.rating_value\n if (hotel.superior) {\n hotel.own_rating += 3\n }\n if (hotel.rating_count < 50) {\n hotel.own_rating -= 5\n }\n hotel.deal = hotel.deals.reduce((cur, deal) => {\n // Strip currency values for comparison\n const curPrice = +cur.price.formatted.replace(/[^0-9]/g, '')\n const dealPrice = +deal.price.formatted.replace(/[^0-9]/g, '')\n if (curPrice > dealPrice) {\n return deal\n }\n return cur\n })\n delete hotel.deals\n hotel.deal.rate_attributes.forEach(rateAttribute => {\n if (rateAttribute.positive) {\n hotel.own_rating++\n }\n })\n hotel.own_rating += Math.floor((+options.max_price - (+hotel.deal.price.formatted.replace(/[^0-9]/g, ''))) / 3)\n })\n\n return hotelList.sort((a, b) => {\n if (a.own_rating < b.own_rating) {\n return 1\n }\n return -1\n }).slice(0, 5)\n}", "function filter(products, collections, appender){\n \n var minmax = getMinMax(products);\n function priceFilter(products, event, ui){\n var arr = [];\n products.forEach(function(product, i, products){\n for (var i=0; i < product.variants.length; i++){\n if (product.variants[i].price >= ui.values[ 0 ] && product.variants[i].price <= ui.values[ 1 ]){\n if(!arr.includes(product)){\n arr.push(product);\n }\n }\n }\n });\n return arr; \n }\n\n function uniq_fast(a) {\n var seen = {};\n var values = {};\n var out = [];\n var len = a.length;\n var j = 0;\n for(var i = 0; i < len; i++) {\n var item = a[i];\n if(seen[item.name] !== 1) {\n seen[item.name] = 1;\n out[j] = a[i];\n values[item.name] = item.values;\n j++;\n } else {\n values[item.name] = values[item.name].concat(item.values);\n }\n }\n for(var val in values) {\n for(var i = 0; i < out.length; i++){\n if(val == out[i].name){\n out[i].values = values[val];\n }\n }\n }\n return out;\n }\n renderOptions(products, collections); \n bindOptions(products);\n $(function(){\n $( \"#slider-range\" ).slider({\n range: true,\n min: Math.round(minmax[0]),\n max: Math.round(minmax[1]),\n values: [ Math.round(minmax[0]), Math.round(minmax[1]) ],\n slide: function( event, ui ) {\n $( \"#min-price\" ).text( \"$\" + ui.values[ 0 ]);\n $( \"#max-price\" ).text( \"$\" + ui.values[ 1 ] );\n },\n change: function( event, ui ) {\n var newProducts = priceFilter(products, event, ui);\n renderProducts(newProducts, '#product-container');\n }\n });\n });\n\nfunction renderPrice(products){\n var minmax = getMinMax(products); \n $( \"#slider-range\" ).slider({\n range: true,\n min: Math.round(minmax[0]),\n max: Math.round(minmax[1]),\n values: [ Math.round(minmax[0]), Math.round(minmax[1]) ],\n slide: function( event, ui ) {\n $( \"#min-price\" ).text( \"$\" + ui.values[ 0 ]);\n $( \"#max-price\" ).text( \"$\" + ui.values[ 1 ] );\n },\n change: function( event, ui ) {\n var newProducts = priceFilter(products, event, ui);\n renderProducts(newProducts, '#product-container'); \n }\n });\n\n $( \"#min-price\" ).text( \"$\" + $( \"#slider-range\" ).slider( \"values\", 0 ));\n $( \"#max-price\" ).text( \"$\" + $( \"#slider-range\" ).slider( \"values\", 1 ));\n}\nfunction renderOptions(newProducts, collections){\n\n let options = [];\n newProducts.forEach(function(product, i){\n if ( product.options[0].values[0] != 'Default Title' ) {\n product.options.forEach(function(PrOption, i, PrOptions){\n options.push(PrOption); \n });\n }\n });\n options = uniq_fast(options);\n let slider_range = '<div id=\"slider-range\"></div>';\n let button = '<button class=\"accordion\">Price</button>';\n let accordion = '<div class=\"panel\"><div id=\"price-filter\" style=\"padding: 25px 10px 70px;\" class=\"contain\">' + slider_range + '<span id=\"min-price\" ></span> <span id=\"max-price\" ></span></div></div>';\n let block = button + accordion;\n let priceContainer = '<div id=\"price-filter-container\">' + block + '</div>'; \n jQuery('#price-filter-container').remove();\n jQuery(appender).append(priceContainer);\n renderPrice(newProducts);\n \n options.forEach(function(item, i ,options){\n \n button = '<button class=\"accordion\">'+ item.name +'</button>';\n accordion = '<div class=\"panel\"><div id=\"'+ handelize(item.name) +'-filter\" style=\"padding: 0px 0px 45px;\" class=\"contain\"></div></div>';\n block = button + accordion;\n \n jQuery(appender).append(block);\n let accordionContainer = jQuery('#'+handelize(item.name)+'-filter'); \n item.values.forEach(function(value, i){\n if (item.name == 'Color'){\n var label = '<label class=\"filter-color-label\" style=\"background-color: ' + handelizeSpaces(value) + '\" for=\"'+ handelize(value) + '_' + i + '\"><span class=\"filter-color-label-span\">' + value + '</span></label>'; \n var input = '<input style=\"display: none;\" class=\"filter\" id=\"' + handelize(value) + '_' + i + '\" type=\"checkbox\" value=\"' + value + '\" />'; \n } else {\n var label = '<label class=\"filter-label\" for=\"'+ handelize(value) + '_' + i + '\"><span class=\"filter-label-span\">' + value + '</span></label>'; \n var input = '<input style=\"display: none;\" class=\"filter\" id=\"' + handelize(value) + '_' + i + '\" type=\"checkbox\" value=\"' + value + '\" />'; \n }\n var filterCheck = '<div class=\"filter-tag filter-check\">' + input + label + '</div>';\n jQuery(accordionContainer).append(filterCheck);\n });\n });\n button = '<button class=\"accordion\">Collections</button>';\n accordion = '<div class=\"panel\" id=\"collections-filter\"><a class=\"filter-collection-link\" data-collection=\"All\" href=\"#\">All</a></div>';\n block = button + accordion;\n jQuery(appender).append(block);\n let types = [];\n newProducts.forEach(function(product, i){\n if(!types.includes(product.product_type)){\n types.push(product.product_type); \n } \n });\n\n function filterByCollection(product_type_filter){\n\n let filteredProducts = [];\n newProducts.forEach(function(product, i){\n if(product.product_type == product_type_filter ){\n filteredProducts.push(product); \n } \n });\n if (filteredProducts.length == 0) {\n filteredProducts = newProducts;\n }\n renderProducts(filteredProducts, '#product-container');\n }\n types.forEach(function(type, i){\n let collectionLink = '<a class=\"filter-collection-link\" data-collection=\"'+type+'\" href=\"#\">'+type+'</a>';\n jQuery('#collections-filter').append(collectionLink);\n });\n initAccordeon();\n $('a[data-collection]').click(function() {\n filterByCollection($(this).data('collection'));\n });\n}\n\nfunction filterByValues(products){\n var arr = [];\n let options = [];\n\n $('.active-filter:checked').each(function(index){\n options.push($(this).val());\n });\n console.log(options);\n console.log(products);\n if (options.length > 0){\n products.forEach(function(product){\n product.options.forEach(function(option){\n options.forEach(function(currentOpt){\n if (option.values.includes(currentOpt) && !arr.includes(product)){\n arr.push(product);\n }\n });\n });\n });\n } else {\n arr = products;\n }\n return arr;\n}\n\nfunction bindOptions(products, collections){\n var filters = document.getElementsByClassName(\"filter\");\n for (var c = 0; c < filters.length; c++) {\n filters[c].onchange = function() {\n $(this).toggleClass('active-filter');\n $(this).toggleClass('active');\n var newProducts = filterByValues(products);\n renderPrice(newProducts); \n renderProducts(newProducts, '#product-container');\n }\n }\n}\n\n /* End of Check box filters */\n \n /* End of Bind filter actions */\n \n /* Accordion filters */\nfunction initAccordeon(){\n var acc = document.getElementsByClassName(\"accordion\");\n var i;\n \n for (i = 0; i < acc.length; i++) {\n acc[i].onclick = function() {\n this.classList.toggle(\"active\");\n var panel = this.nextElementSibling;\n if (panel.style.maxHeight){\n panel.style.maxHeight = null;\n } else {\n panel.style.maxHeight = panel.scrollHeight + 15 + \"px\";\n } \n }\n }\n}\n /* End of Accordion filters */\n \n}", "function listFilterHandler(listingsArray) {\n //setListing(listingsArray.sort((a, b) => a.price < b.price))\n listingsArray.sort((a, b) => a.price < b.price);\n }", "function sortProductList() {\n var stock_status = \"0\";\n var order = $(\"#select-choice-1\").val();\n var results = JSON.parse(localStorage[config.data[0].storage_key+\"_last_products_list\"]);\n var sorted_product_list = '';\n var temp;\n if (order == \"PriceL2H\") {\n for (var i = 0; i < results.length; i++) {\n for (var j = 0; j < results.length - i; j++) {\n try {\n if (parseFloat(results[j][\"price\"].replace(/\\,/g, '')) > parseFloat(results[j + 1][\"price\"].replace(/\\,/g, ''))) {\n temp = results[j];\n results[j] = results[j + 1];\n results[j + 1] = temp;\n }\n } catch (ex) {}\n }\n }\n } else if (order == \"PriceH2L\") {\n for (var i = 0; i < results.length; i++) {\n for (var j = 0; j < results.length - i; j++) {\n try {\n if (parseFloat(results[j][\"price\"].replace(/\\,/g, '')) < parseFloat(results[j + 1][\"price\"].replace(/\\,/g, ''))) {\n temp = results[j];\n results[j] = results[j + 1];\n results[j + 1] = temp;\n }\n } catch (ex) {}\n }\n }\n } else if (order == \"NameA2Z\") {\n for (var i = 0; i < results.length; i++) {\n for (var j = 0; j < results.length - i; j++) {\n try {\n if (results[j][\"name\"] > results[j + 1][\"name\"]) {\n temp = results[j];\n results[j] = results[j + 1];\n results[j + 1] = temp;\n }\n } catch (ex) {}\n }\n }\n } else if (order == \"NameZ2A\") {\n for (var i = 0; i < results.length; i++) {\n for (var j = 0; j < results.length - i; j++) {\n try {\n if (results[j][\"name\"] < results[j + 1][\"name\"]) {\n temp = results[j];\n results[j] = results[j + 1];\n results[j + 1] = temp;\n }\n } catch (ex) {}\n }\n }\n } else if (order == \"Date\") {\n for (var i = 0; i < results.length; i++) {\n for (var j = 0; j < results.length - i; j++) {\n try {\n if (parseInt(results[j][\"id\"]) < parseInt(results[j + 1][\"id\"])) {\n temp = results[j];\n results[j] = results[j + 1];\n results[j + 1] = temp;\n }\n } catch (ex) {}\n }\n }\n } else {\n for (var i = 0; i < results.length; i++) {\n for (var j = 0; j < results.length - i; j++) {\n try {\n if (results[j][\"id\"] > results[j + 1][\"id\"]) {\n temp = results[j];\n results[j] = results[j + 1];\n results[j + 1] = temp;\n }\n } catch (ex) {}\n }\n }\n }\n var i = 0;\n while (i < results.length) {\n var productName = results[i][\"name\"];\n var pid = results[i][\"id\"];\n var price = results[i][\"price\"];\n price = CurrencyFormatted(price);\n price = addThousandsSeparator(price);\n var imageURL = results[i][\"imageurl\"];\n var SKU = results[i][\"sku\"];\n var sprice = results[i][\"spclprice\"];\n var dirPath = dirname(location.href);\n var is_stock = '';\n if (parseInt(results[i][\"is_in_stock\"]) > 0 && results[i][\"stock_quantity\"] > 0) {\n is_stock = locale.message.text[\"in_stock\"];\n stock_status = \"1\";\n } else {\n is_stock = locale.message.text[\"out_of_stock\"];\n stock_status = \"0\";\n }\n var fullPath = \"'\" + dirPath + \"/product_details.html?id=\" + pid + \"stock_status\" + stock_status + \"'\";\n /* if (config.data[0].default_currency == \"INR\") {\n if(stock_status == \"1\"){\n sorted_product_list += '<div class=\"product_outer_div\"><div class=\"product_inner_div\"><div class=\"product_img_container\"><img src=\"'+imageURL+'\" class=\"product_main_img\" onerror=\"bad_image(this);\"/></div><div class=\"product_name_div\">'+productName+'</div> <div class=\"product_name_div\"><img class=\"productPrize\" src=\"images/rupee_symbol.png\" width=\"10px\" height=\"12px\"> '+price+'</div><div style=\"width:100%\"><div class=\"detail_div\" id=\"details\"><input type=\"button\" data-theme=\"c\" value=\"Details\" onclick=\"parent.location=' + fullPath + '\" /></div><div class=\"cart_div\" id=\"cart\"><input type=\"button\" data-theme=\"b\" value=\"'+locale.message.button[\"add_to_cart\"]+'\" onclick=\"addDirectToCart('+pid+','+stock_status+')\" /> </div></div></div></div>';\n }\n else{\n sorted_product_list += '<div class=\"product_outer_div\"><div class=\"product_inner_div\"><div class=\"product_img_container\"><img src=\"'+imageURL+'\" class=\"product_main_img\" onerror=\"bad_image(this);\"/></div><div class=\"product_name_div\">'+productName+'</div> <div class=\"product_name_div\"><img class=\"productPrize\" src=\"images/rupee_symbol.png\" width=\"10px\" height=\"12px\"> '+price+'</div><div style=\"width:100%\"><div class=\"detail_div\" id=\"details\"><input type=\"button\" data-theme=\"c\" value=\"Details\" onclick=\"parent.location=' + fullPath + '\" /></div><div class=\"cart_div\" id=\"cart\"><input type=\"button\" data-theme=\"b\" value=\"'+locale.message.button[\"add_to_cart\"]+'\" onclick=\"addDirectToCart('+pid+','+stock_status+')\" /> </div></div></div></div>';\n }\n }\n else {*/\n if (stock_status == \"1\") {\n sorted_product_list += '<div class=\"product_outer_div\"><div class=\"product_inner_div\"><div class=\"product_img_container\"><img src=\"' + imageURL + '\" class=\"product_main_img\" onerror=\"bad_image(this);\"/></div><div class=\"product_name_div\">' + productName + '</div><div class=\"product_name_div\">' + app_curr_symbol + price + '</div><div style=\"width:100%\"><div class=\"detail_div\" id=\"details\"><input type=\"button\" data-theme=\"c\" value=\"Details\" onclick=\"parent.location=' + fullPath + '\" /></div><div class=\"cart_div\" id=\"cart\"><input type=\"button\" data-theme=\"b\" value=\"' + locale.message.button[\"add_to_cart\"] + '\" onclick=\"addDirectToCart(' + pid + ',' + stock_status + ')\" /></div></div></div></div>';\n } else {\n sorted_product_list += '<div class=\"product_outer_div\"><div class=\"product_inner_div\"><div class=\"product_img_container\"><img src=\"' + imageURL + '\" class=\"product_main_img\" onerror=\"bad_image(this);\"/></div><div class=\"product_name_div\">' + productName + '</div><div class=\"product_name_div\">' + app_curr_symbol + price + '</div><div style=\"width:100%\"><div class=\"detail_div\" id=\"details\"><input type=\"button\" data-theme=\"c\" value=\"Details\" onclick=\"parent.location=' + fullPath + '\" /></div><div class=\"cart_div\" id=\"cart\"><input type=\"button\" data-theme=\"b\" value=\"' + locale.message.button[\"add_to_cart\"] + '\" onclick=\"addDirectToCart(' + pid + ',' + stock_status + ')\" /></div></div></div></div>';\n }\n // }\n i++;\n }\n $(\"#category\").html(sorted_product_list);\n $(\"#category\").trigger(\"create\");\n}", "function filterProduce() {\n let filteredListings = sortedListings;\n if (checkedSeasonFilters.length > 0) {\n filteredListings = filteredListings.filter(\n (listing) => checkedSeasonFilters.includes(listing.season),\n );\n }\n if (checkedProdFilters.length > 0) {\n filteredListings = filteredListings.filter(\n (listing) => checkedProdFilters.includes(listing.produceType),\n );\n }\n // If applied range exists, hard limit to min/max\n if (appliedRange.length > 0) {\n filteredListings = filteredListings.filter(\n (listing) => inAppliedRange(listing.palletPrice),\n );\n }\n if (checkedPriceFilters.length > 0) {\n filteredListings = filteredListings.filter(\n (listing) => inFilterPriceRange(listing.palletPrice),\n );\n }\n // Only filter if 1 of standard/agency options checked (if both, filtering is redundant)\n if (checkedItemTypes.length === 1) {\n if (checkedItemTypes[0] === 'Agency Price') {\n filteredListings = filteredListings.filter(\n (listing) => listing.hasAgencyPrice === true,\n );\n } else {\n filteredListings = filteredListings.filter(\n (listing) => listing.hasAgencyPrice === false,\n );\n }\n }\n setFilteredProduce(filteredListings);\n }", "function restrictListProducts(prods, restriction) {\n\tlet product_names = [];\n\tvar checkBox1 = document.getElementById(\"lactoseF\");\n\tvar checkBox2 = document.getElementById(\"nutsF\");\n\tvar checkBox3 = document.getElementById(\"organique\");\n\tvar checkBox4 = document.getElementById(\"none\");\n\n\n\n\tfor (let i=0; i<prods.length; i+=1) {\n\t\t/*if ((document.querySelector(\".organiqueCB\").checked)&&(document.querySelector(\".pasDeNoix\").checked) && (document.querySelector(\".lactoseFreeCB\").checked)&& (prods[i].all == true)){\n\t\t\tproduct_names.push(prods[i].name);\n\n\t\t}*/\n\t\tif (checkBox1.checked==true && checkBox2.checked==true && checkBox3.checked==true && prods[i].all==true){\n\t\t\tproduct_names.push(prods[i].name);\n\t\t}\n\t\telse if(checkBox3.checked==true &&checkBox2.checked==true && prods[i].vegAndNut==true){\n\t\t\tproduct_names.push(prods[i].name);\n\t\t}\n\t\telse if (checkBox3.checked==true && checkBox1.checked==true && prods[i].vegAndGlu==true){\n\t\t\tproduct_names.push(prods[i].name);\n\t\t}\n\n\t\telse if (checkBox1.checked==true && checkBox2.checked==true && prods[i].nutAndGlu==true){\n\t\t\tproduct_names.push(prods[i].name);\n\t\t}\n\t\telse if(checkBox1.checked==true && checkBox2.checked==false && checkBox3.checked==false && prods[i].glutenFree==true ){\n\t\t\tproduct_names.push(prods[i].name);\n\t\t}\n\t\telse if(checkBox2.checked==true && checkBox1.checked==false && checkBox3.checked==false && prods[i].no_nuts==true){\n\t\t\tproduct_names.push(prods[i].name);\n\n\t\t}\n\t\telse if (checkBox3.checked==true && checkBox1.checked==false&&checkBox2.checked==false && prods[i].vegetarian==true){\n\t\t\tproduct_names.push(prods[i].name);\n\n\t\t\n\t\t}\n\t\telse if (checkBox4.checked==true){\n\t\t\t\n\t\t\tproduct_names.push(prods[i].name);\n\t\t\t\n\t\t\t\n\t\t}\n\t\t/*if (checkBox1.checked==false && checkBox2.checked==false && checkBox3.checked==false && (prods[i].vegetarian==true || prods[i].glutenFree==true || prods[i].no_nuts==true)){\n\t\t\tproduct_names.push(prods[i].name);\n\t\t}\n\n\t\t/*else if ((document.querySelector(\".organiqueCB\").checked)&& (prods[i].vegetarian == true)){\n\n\t\t\tif ((document.querySelector(\".lactoseFreeCB\").checked) && (prods[i].glutenFree == true)){\n\t\t\t\tproduct_names.push(prods[i].name);\n\t\t\t}\n\t\t\telse if ((restriction == \"pasDeNoix\")&& (prods[i].no_nuts == true)){\n\t\t\t\tproduct_names.push(prods[i].name);\n\t\t\t}else{\n\t\t\tproduct_names.push(prods[i].name);}\n\t\t}\n\t\telse if ((document.querySelector(\".lactoseFreeCB\").checked) && (prods[i].glutenFree == true)){\n\t\t\tif ((restriction == \"pasDeNoix\")&& (prods[i].no_nuts == true)){\n\t\t\t\tproduct_names.push(prods[i].name);\n\t\t\t}else{\n\t\t\t\tproduct_names.push(prods[i].name);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t/*else if ((restriction == \"pasDeNoix\")&& (prods[i].no_nuts == true)){\n\t\t\tproduct_names.push(prods[i].name);\n\t\t}\n\t\t\n\t\telse if ((restriction == \"none\")){\n\t\t\tproduct_names.push(prods[i].name);\n\t\t}*/\n\t\t\n\t}\n\treturn product_names;\n}", "function filterPrice(min, max){\r\n for(let i = 0; i < listings.length; i++){\r\n let l = listings[i].val;\r\n listings[i].visible = l.price >= min && l.price <= max && listings[i].visible;\r\n }\r\n}", "static byPrice() {\n // how to sort in descending order\n // var points = [40, 100, 1, 5, 25, 10];\n // points.sort(function(a, b){return b-a});\n return store.meals.sort(function(a, b) {return b.price - a.price});\n }", "function searchingProducts(listToFilter) {\n\n if (searchValue.value) {\n listToFilter = listToFilter.filter(availProduct => {\n return availProduct.name.toLowerCase().includes(searchValue.value.toLowerCase());\n });\n }\n\n if (countryValue.options[countryValue.selectedIndex].value) {\n listToFilter = listToFilter.filter(availProduct => {\n return availProduct.shipsTo.map(selectOption => selectOption.toLowerCase()).includes(countryValue.options[countryValue.selectedIndex].value.toLowerCase());\n });\n } \n\n sortProducts(listToFilter);\n\n renderProducts(listToFilter);\n}", "function populateListProductChoices(slct1, slct2) {\n\t\n\tvar s1 = document.getElementById(slct1);\n var s2 = document.getElementById(slct2);\n\t\n\tvar productsFillters = document.getElementsByName(\"restriction\");\n\tvar chosenFillters = [];\n\t\n\t\n\t\tfor (i = 0; i < productsFillters.length; i++) { \n\t\t\tif (productsFillters[i].checked) {\n\t\t\t\tchosenFillters.push(productsFillters[i].value);\n\t\t\t}\n\t\t}\n\t\n\tvar sortedProducts = products.sort(sortByPrice);\n\t var optionArray = restrictListProducts(products, chosenFillters);\n\t\n\t\n\t// s2 represents the <div> in the Products tab, which shows the product list, so we first set it empty\n s2.innerHTML = \"\";\n\t\t\n\t// obtain a reduced list of products based on restrictions\n \n\n\t// for each item in the array, create a checkbox element, each containing information such as:\n\t// <input type=\"checkbox\" name=\"product\" value=\"Bread\">\n\t// <label for=\"Bread\">Bread/label><br>\n\t\t\n\tfor (i = 0; i < optionArray.length; i++) {\n\t\t\t\n\t\tvar productName = optionArray[i].name;\n\t\tvar productPrice = optionArray[i].price.toFixed(2);\n\t\t// create the checkbox and add in HTML DOM\n\t\tvar checkbox = document.createElement(\"input\");\n\t\tcheckbox.type = \"checkbox\";\n\t\tcheckbox.name = \"product\";\n\t\tcheckbox.value = productName;\n\t\ts2.appendChild(checkbox);\n\t\t\n\t\t// create a label for the checkbox, and also add in HTML DOM\n\t\tvar label = document.createElement('label')\n\t\tlabel.htmlFor = productName.name;\n\t\tlabel.appendChild(document.createTextNode(productName));\n\t\tlabel.appendChild(document.createElement('br'));\n\t\tlabel.appendChild(document.createTextNode(\" Price: $\" + productPrice));\n\t\tlabel.appendChild(document.createElement('br'));\n\t\ts2.appendChild(label);\n\t\t\n\t\t// create a breakline node and add in HTML DOM\n\t\ts2.appendChild(document.createElement(\"br\")); \n\t}\n}", "sortProductByExpensive () {\n this.params.sort = 'expensive'\n this.submitting = { ...this.submitting, dropshipProducts: true, sortStatus: true }\n let params = this.generateParamsUrl()\n Router.replace(`/dropship?${params}`)\n this.props.getDropshipProducts(this.params)\n }", "function sortProducts() {\n // OrderBy ascending [reorder]\n tempNearReorder.remove(function (item) { return item.closeReorder() === 0; });\n tempNearReorder.sort(function (left, right) {\n return left.closeReorder() === right.closeReorder() ? 0 : (left.closeReorder() < right.closeReorder() ? -1 : 1);\n });\n\n // Get not selling products\n var tempMovingHiQuantity = tempTurnOverRate.remove(function (product) {\n return product.turnOverRate() === 0;\n });\n\n // OrderBy Desc [slow moving]\n tempMovingHiQuantity.sort(function (left, right) {\n return left.quantity() === right.quantity() ? 0 : (left.quantity() > right.quantity() ? -1 : 1);\n });\n\n // OrderBy Desc [Turnover rate]\n tempTurnOverRate.sort(function (left, right) {\n return left.turnOverRate() === right.turnOverRate() ? 0 : (left.turnOverRate() > right.turnOverRate() ? -1 : 1);\n });\n\n nearReorder(tempNearReorder.splice(0, 3)); // Take closest 3 [reorder]\n slowMovingHiQuantity(tempMovingHiQuantity.splice(0, 3)); // Take worst 3 [slow moving]\n highTurnOver(tempTurnOverRate.splice(0, 3)); // Take highest 3 [Turnover rate]\n tempTurnOverRate.reverse(); // Reverse order\n lowTurnOver(tempTurnOverRate.splice(0, 3)); // Take lowest 3 [Turnover rate]\n\n // Sort slow moving sales items for desc\n ko.utils.arrayFilter(slowMovingHiQuantity(), function (product) {\n return product.salesItems.sort(function (left, right) {\n return left.saleID() === right.saleID() ? 0 : (left.saleID() > right.saleID() ? -1 : 1);\n });\n });\n\n return true;\n }", "async findPriceList(code) {\n //\n // QUERY for exact DENOM\n const feasiblePacks = await CatalogDetail.query()\n .where(\"product_code\", code)\n .where(\"status\", \"ENABLE\")\n .orderBy(\"min\", \"asc\")\n .fetch();\n /// no records\n if (feasiblePacks.length === 0) {\n return null;\n }\n // console.log(feasiblePacks);\n // record exists\n const formattedSet = feasiblePacks.toJSON().map((val) => {\n // In DB, if val.min is NULL, then reference = denom in MY. Else, reference = kurs.\n let finalPrice = \"\";\n let reference = \"\";\n if (val.method === \"ABSOLUTE\") {\n if (!val.min) {\n finalPrice = parseFloat(val.value).toFixed(2);\n reference = parseFloat(val.reference).toFixed(2);\n } else {\n finalPrice = `${Number(val.min / val.reference) + Number(val.value)} - ${Number(\n\t\t\t\t\t\tval.denom / val.reference,\n\t\t\t\t\t) + Number(val.value)}`;\n reference = `${Number(val.min / val.reference)} - ${Number(val.denom / val.reference)}`;\n }\n } else {\n if (!val.min) {\n finalPrice = parseFloat(val.value * val.reference / 100).toFixed(2);\n reference = parseFloat(val.reference).toFixed(2);\n } else {\n const lower = val.value * (val.min / val.reference) / 100;\n const upper = val.value * (val.denom / val.reference) / 100;\n const lower_ref = val.min / val.reference;\n const upper_ref = val.denom / val.reference;\n finalPrice = `${lower.toFixed(2)} - ${upper.toFixed(2)}`;\n reference = `${lower_ref.toFixed(2)} - ${upper_ref.toFixed(2)}`;\n }\n }\n return {\n denomination: val.min ? `${val.min} - ${val.denom}` : val.denom,\n price: finalPrice,\n rrp: reference,\n };\n });\n formattedSet.sort(\n (a, b) =>\n Number(a.denomination) < Number(b.denomination) ?\n -1 :\n Number(b.denomination) < Number(a.denomination) ? 1 : 0,\n );\n return formattedSet;\n }", "function sortFruitMarketTableByFruitNameAndPrice() {\n\n}", "function fliter_price_items(db, min_price, max_price){\n document.querySelectorAll('.item_div').forEach(item =>{\n \n for (j=0; j<db.length; j++){\n if(db[j]['pk'].toString() === item.id){ // find div item in db\n item_price=db[j]['fields']['price'];\n \n if (item_price < min_price || item_price > max_price){\n item.style.display= \"none\";\n\n }else{\n item.style.display= \"flex\"\n\n }\n }\n }\n \n })\n }", "function sortProduct(){ \r\n\r\n var compare = document.product.filter.value;\r\n \r\n var container = document.getElementById('item-container');\r\n// if(compare == 'price') {\r\n// console.log(hats.sort(comparePrice));\r\n// } else if(compare == 'name') {\r\n// console.log(hats.sort(compareName));\r\n// }else {\r\n// console.log('Nothing selected!');\r\n// }\r\n\r\n// THE ABOVE IF/ELSE statment works as well, but I prefer to use switch statements for they are easier to read.\r\n \r\n switch(compare){\r\n case 'price':\r\n console.log(hats.sort(compareName));\r\n break;\r\n \r\n case 'name':\r\n console.log(hats.sort(comparePrice));\r\n break;\r\n \r\n default:\r\n console.log('ERROR: Code is broken somewhere');\r\n break;\r\n \r\n }\r\n \r\n event.preventDefault();\r\n}", "static byPrice(){\n return store.meals.sort((a, b) => b.price - a.price)\n }", "static byPrice() {\n return store.meals.sort((meal1, meal2) => {\n return meal1.price < meal2.price;\n });\n }", "filterByCost() {\n let minValue = this.minFilter.value;\n let maxValue = this.maxFilter.value;\n\n if (!minValue && !maxValue) {\n this.filters.filterByCost = () => {};\n return;\n } else if (minValue && !maxValue) {\n maxValue = Infinity;\n }\n\n // Agrega el filtro al objeto filters\n this.filters.filterByCost = (products) => {\n return products.filter(\n ({ cost }) => minValue <= cost && maxValue >= cost\n );\n };\n }", "static byPrice () {\n console.log(store.meals)\n console.log(store.meals.sort(compare))\n return store.meals.sort(compare)\n }", "function compareByPrice(prod1, prod2)\n{\n return prod1.price - prod2.price;\n}", "getFilterProductList(appliedFilters, sortBy = \"\", customOptions = {}) {\n let result = PRODUCT_LIST;\n if (appliedFilters.length > 0) {\n // NOTE: getting the key to search for\n const appliedFiltersKeys = appliedFilters.map(af => af[\"type\"]);\n appliedFiltersKeys.forEach(fk => {\n const searchKey = FILTER_KEY_MAPPER[fk];\n const searchInValue = CommonHelper.getByKeyValFromObject(appliedFilters, \"type\", fk)[\"filters\"];\n if (searchInValue && searchInValue.constructor === Array) {\n if (searchInValue.length > 0) {\n result = result.filter(pl => {\n const val = pl[searchKey];\n if (val && (val.constructor === String || val.constructor === Number)) {\n return searchInValue.includes(pl[searchKey]);\n } else if (val && val.constructor === Array) {\n return val.some(ele => searchInValue.includes(ele));\n }\n });\n }\n } else if (searchInValue && (searchInValue.constructor === String || searchInValue.constructor === Number)) {\n result = result.filter(pl => pl[searchKey].toString() === searchInValue.toString());\n }\n });\n }\n\n result = this.getSortedList(result, sortBy);\n // NOTE: check this for pagination\n if (customOptions && Object.keys(customOptions).length > 0) {\n const { id = \"\" } = customOptions;\n const indexOfCurrentListLastElement = result.findIndex(p => p[\"id\"] === id) + 1;\n const endIndex = indexOfCurrentListLastElement + LIST_LIMIT;\n if (indexOfCurrentListLastElement >= 0) {\n result = CommonHelper.getListWithLimit(result, indexOfCurrentListLastElement, endIndex);\n }\n } else {\n result = CommonHelper.getListWithLimit(result, 0, LIST_LIMIT);\n }\n return result;\n }", "function descendProducts(data){\n data.sort((a, b) => (b.price) - (a.price));\n show(data);\n}", "function add_to_product_list (data, categorie, criteria) {\n\t//Sort the data depending on selected criteria\n\tswitch(criteria) {\n case \"bas-haut\":\n data = data.slice(0).sort(function(a,b) {\n return a.price - b.price;\n });\n break;\n\t \n case \"haut-bas\":\n data = data.slice(0).sort(function(a,b) {\n return b.price - a.price;\n });\n break;\n\t \n\tcase \"a-z\":\n data = data.slice(0).sort(function(a,b) {\n\t\tvar nameA=a.name.toLowerCase(), nameB=b.name.toLowerCase();\n\t\tif (nameA < nameB)\n\t\t return -1;\n\t\tif (nameA > nameB)\n\t\t return 1;\n\t\treturn 0;\n });\n\t break;\n\t \n\tcase \"z-a\":\n data = data.slice(0).sort(function(a,b) {\n\t\tvar nameA=a.name.toLowerCase(), nameB=b.name.toLowerCase();\n\t\tif (nameA < nameB)\n\t\t return 1;\n\t\tif (nameA > nameB)\n\t\t return -1;\n\t\treturn 0;\n\t });\n break;\n\t}\n\t \n\t//Display the data depending on criteria and categorie\n\tswitch(categorie) {\n case \"appareils_photo\":\n\tproduct_count = 0;\n\tvar html_product_list = [];\n\t $.each(data, function(key, value){\n if(value.category == \"cameras\") {\n html_product_list += '<div class=\"product\">';\n\t html_product_list += '<a href=./product.html?id='+value.id+'>';\n\t html_product_list += '<h2>'+value.name+'</h2>';\n\t html_product_list += '<img alt='+value.name+' src=\"./assets/img/'+value.image+'\">';\n\t html_product_list += '<p><small>Prix</small> '+value.price+'&thinsp;$</p>';\n\t html_product_list += '</a>';\n\t html_product_list += '</div>';\n\t\tproduct_count++;\n\t }\n });\n $('#products-list').html(html_product_list); \n break;\n\t \n case \"consoles\":\n\tproduct_count = 0;\n\tvar html_product_list = [];\n\t $.each(data, function(key, value){\n if(value.category == \"consoles\") {\n html_product_list += '<div class=\"product\">';\n\t html_product_list += '<a href=./product.html?id='+value.id+'>';\n\t html_product_list += '<h2>'+value.name+'</h2>';\n\t html_product_list += '<img alt='+value.name+' src=\"./assets/img/'+value.image+'\">';\n\t html_product_list += '<p><small>Prix</small> '+value.price+'&thinsp;$</p>';\n\t html_product_list += '</a>';\n\t html_product_list += '</div>';\n\t\tproduct_count++;\n\t }\n });\n $('#products-list').html(html_product_list); \n break;\n\t \n\tcase \"ecrans\":\n\tproduct_count = 0;\n\tvar html_product_list = [];\n\t $.each(data, function(key, value){\n if(value.category == \"screens\") {\n html_product_list += '<div class=\"product\">';\n\t html_product_list += '<a href=./product.html?id='+value.id+'>';\n\t html_product_list += '<h2>'+value.name+'</h2>';\n\t html_product_list += '<img alt='+value.name+' src=\"./assets/img/'+value.image+'\">';\n\t html_product_list += '<p><small>Prix</small> '+value.price+'&thinsp;$</p>';\n\t html_product_list += '</a>';\n\t html_product_list += '</div>';\n\t\tproduct_count++;\n\t }\n });\n $('#products-list').html(html_product_list); \n\t break;\n\t \n\tcase \"ordinateurs\":\n\tproduct_count = 0;\n\tvar html_product_list = [];\n\t $.each(data, function(key, value){\n if(value.category == \"computers\") {\n html_product_list += '<div class=\"product\">';\n\t html_product_list += '<a href=./product.html?id='+value.id+'>';\n\t html_product_list += '<h2>'+value.name+'</h2>';\n\t html_product_list += '<img alt='+value.name+' src=\"./assets/img/'+value.image+'\">';\n\t html_product_list += '<p><small>Prix</small> '+value.price+'&thinsp;$</p>';\n\t html_product_list += '</a>';\n\t html_product_list += '</div>';\n\t\tproduct_count++;\n\t }\n });\n $('#products-list').html(html_product_list); \n break;\n\n\tcase \"tous_les_produits\":\n\tproduct_count = 0;\n\tvar html_product_list = [];\n $.each(data, function(key, value){\n html_product_list += '<div class=\"product\">';\n\t html_product_list += '<a href=./product.html?id='+value.id+'>';\n\t html_product_list += '<h2>'+value.name+'</h2>';\n\t html_product_list += '<img alt='+value.name+' src=\"./assets/img/'+value.image+'\">';\n\t html_product_list += '<p><small>Prix</small> '+value.price+'&thinsp;$</p>';\n\t html_product_list += '</a>';\n\t html_product_list += '</div>';\n\t\tproduct_count++;\n });\n $('#products-list').html(html_product_list);\n break;\n\t}\t \n}", "applyFiltersAndSorts() {\n var list = this.props.list.filter(this.matchesFilterEnergyLevel);\n list = list.filter(this.matchesFilterFunLevel)\n var sort_type = this.getSortFunction()\n if(sort_type != null){\n list = list.sort(sort_type)\n }\n return list\n\n }", "function populateListProductChoices( order ) {\t\n var s2 = document.getElementById('displayProduct');\n\t\n\t// s2 represents the <div> in the Products tab, which shows the product list, so we first set it empty\n s2.innerHTML = \"\";\n\t\t\n\t// obtain a reduced list of products based on restrictions\n var optionArray = restrictListProducts();\n\n if ( order !== undefined ) {\n \tconst ord = JSON.parse(order);\n\t sortArrayByAttribute( ord.sort, optionArray, ord.ascending );\n }\n\n // quantityMap = {};\n // for ( const o of optionArray ) {\n // \tquantityMap[o.name] = 0;\n // }\n\n\tfor (let p of optionArray ) {\n\t\tinjectProduct(s2, p);\t\t \n\t}\n}", "function itemByPrice(){\n var init = [];\n for(var i=0; i<cart.length; i++){\n for(var j=i; j<cart.length-1; j++){\n if(cart[j].price<cart[j+1].price){\n init=cart[j];\n cart[j]=cart[j+1];\n cart[j+1]=init;\n }\n }\n }\n cart.sort(function(a, b){\n return (b.price)-(a.price);\n });\n return cart;\n}", "function comparePrice(a,b){\r\n return a.price - b.price; console.log(hats.sort(comparePrice));\r\n }", "function sortingChanged(event) {\r\n var input = event.target\r\n\r\n var produs = document.getElementsByClassName('product')\r\n var shoppingSection = produs.parentElement\r\n\r\n var array = []\r\n\r\n var children = shoppingSection.children;\r\n for (var i = 0; i < children.length; i++) {\r\n array.push(children[i])\r\n \r\n }\r\n\r\n while (shoppingSection.hasChildNodes()) {\r\n shoppingSection.removeChild(shoppingSection.firstChild)\r\n }\r\n\r\n if (input.value == \"default\") {\r\n for (var j = 0; j < array.length; j++)\r\n shoppingSection.appendChild(array[j])\r\n }\r\n\r\n if (input.value == \"orderByPriceAsc\") {\r\n\r\n var clonedArray = JSON.parse(JSON.stringify(array))\r\n\r\n clonedArray.sort(function (a, b) {\r\n var price1 = a.getElementsByClassName('shop-item-price')\r\n var price2 = b.getElementsByClassName('shop-item-price')\r\n return parseFloat(price1.innerText.replace('$', '')) - parseFloat(price2.innerText.replace('$', ''));\r\n });\r\n\r\n for (var j = 0; j < array.length; j++)\r\n shoppingSection.appendChild(clonedArray[j])\r\n }\r\n\r\n if (input.value == \"orderByPriceDesc\") {\r\n\r\n var clonedArray = JSON.parse(JSON.stringify(array))\r\n\r\n clonedArray.sort(function (a, b) {\r\n var price1 = a.getElementsByClassName('shop-item-price')\r\n var price2 = b.getElementsByClassName('shop-item-price')\r\n return parseFloat(price2.innerText.replace('$', '')) - parseFloat(price1.innerText.replace('$', ''));\r\n });\r\n\r\n for (var j = 0; j < array.length; j++)\r\n shoppingSection.appendChild(clonedArray[j])\r\n }\r\n\r\n \r\n}", "function createRecommendedList(orgPlanList, keywords, maxSize) {\n console.log('===originalList===');\n console.log(orgPlanList);\n const contentFiltered = filterByContent(orgPlanList);\n console.log('===contentFiltered===');\n console.log(contentFiltered);\n const keywordFiltered = filterByKeywords(contentFiltered, keywords);\n console.log('===keywordFiltered===');\n console.log(keywordFiltered);\n console.log('===========================');\n let ret = _.sample(keywordFiltered, maxSize);\n if (ret.length <= maxSize) {\n const ext = _.sample(contentFiltered, maxSize - ret.length);\n ret = _.union(ret, ext);\n }\n return ret;\n}", "function filterPrice(inputData) {\n var tempData = JSON.parse(inputData.body).Objects;\n\n // Applies filter if minimum price exists in GET request\n if (req.query.priceMin) {\n tempData = tempData.filter(function(object) {\n if (object.Koopprijs && !object.Huurprijs) {\n return object.Koopprijs > req.query.priceMin;\n } else {\n return object.Huurprijs > req.query.priceMin;\n }\n });\n }\n // Applies filter if maximum price exists in GET request\n if (req.query.priceMax) {\n tempData = tempData.filter(function(object) {\n if (object.Koopprijs && !object.Huurprijs) {\n return object.Koopprijs < req.query.priceMax;\n } else {\n return object.Huurprijs < req.query.priceMax;\n }\n });\n }\n\n // return inputData;\n return JSON.stringify(tempData);\n }", "function getTotalOfAllProductsByPriceRange(products, min, max) {\n try {const filteredProducts = filterProductsByPriceRange(products, min, max);\n\n const total = getCartTotal(filteredProducts); \n return total;\n} catch (err){\n return 0;\n};\n}", "function sortByPriceDesc(a,b)\n{\n return b.price - a.price\n}", "function requestData() {\n let product = [];\n $(\"#byLists td\").remove();\n $(\"#itemsLists td\").remove();\n data.buyList.map((value) => {\n let raw = \"\";\n raw = `\n <tr>\n <td>${value.totalPrice}</td>\n <td>${value.totalPayPrice}</td>\n <td>${value.deliveryFees}</td>\n <td>${value.farmName}</td>\n </tr>\n `;\n $(\"#byLists\").append(raw);\n value.productList.map((values) => {\n product.push({\n name: values.productName,\n quantity: values.productQuantity,\n price: values.productPrice,\n perPrice: values.totalPayPrice,\n });\n });\n });\n\n let seen = {};\n // filter and merge the duplicate product\n product = product.filter(function (entry) {\n let previous;\n // Have we seen this label before?\n if (seen.hasOwnProperty(entry.name)) {\n // Yes, grab it and add this data to it\n previous = seen[entry.name];\n previous.quantity.push(entry.quantity);\n previous.price.push(entry.price);\n previous.perPrice.push(entry.perPrice);\n // Don't keep this entry, we've merged it into the previous one\n return false;\n }\n // entry.data probably isn't an array; make it one for consistency\n if (!Array.isArray(entry.quantity)) {\n entry.quantity = [entry.quantity];\n }\n if (!Array.isArray(entry.price)) {\n entry.price = [entry.price];\n }\n if (!Array.isArray(entry.perPrice)) {\n entry.perPrice = [entry.perPrice];\n }\n // Remember that we've seen it\n seen[entry.name] = entry;\n // Keep this one, we'll merge any others that match into it\n return true;\n });\n\n // loop over the product => item\n product.forEach((val) => {\n let rows = \"\";\n if (val.perPrice.length > 1) {\n // if item contain array then merging them and calculating avarage\n // else append the item as it is!\n\n let totalPrice = val.perPrice.reduce((acc, cu) => {\n return acc + cu;\n });\n let totalQuantity = val.quantity.reduce((acc, cu) => {\n return acc + cu;\n });\n let payPerPrice = val.price.reduce((acc, cu) => {\n return acc + cu;\n });\n raws = `\n <tr>\n <td>${totalQuantity}</td>\n <td>${totalPrice}</td>\n <td>${totalPrice/totalQuantity}</td>\n <td>${val.name}</td>\n </tr>\n `;\n } else {\n raws = `\n <tr>\n <td>${val.quantity}</td>\n <td>${val.perPrice}</td>\n <td>${val.price}</td>\n <td>${val.name}</td>\n </tr>\n `;\n }\n $(\"#itemsLists\").append(raws);\n });\n}", "function reorderPrices()\n{\n // Order followed by the client depending on the language.\n let order = [\n 'Member Adult',\n 'Member Senior (65+)',\n 'Member Tiny Tot (0–2)',\n 'Member Child (3–12)',\n 'Member Student (13+)',\n 'Member Student (18+)',\n 'Adult',\n 'Senior (65+)',\n 'Tiny Tot (0–2)',\n 'Child (3–12)',\n 'Student (13+)',\n 'Student (18+)',\n 'Post-Doc',\n 'Staff/Volunteer',\n 'Staff Volunteer',\n 'Discounted Adult',\n 'Adult combo',\n 'Senior (65+) combo',\n 'Tiny Tot (0–2) combo',\n 'Child (3–12) combo',\n 'Student (13+) combo',\n 'Student (18+) combo',\n 'Complimentary Adult',\n 'Complimentary Senior (65+)',\n 'Complimentary Tiny Tot (0–2)',\n 'Complimentary Child (3–12)',\n 'Complimentary Student (13+)',\n 'Complimentary Student (18+)',\n ];\n\n if (translator.to() === 'fr') {\n order = [\n 'Membre adulte',\n 'Membre aîné (65+)',\n 'Membre tout-petit (0 à 2)',\n 'Membre enfant (3 à 12)',\n 'Membre étudiant (13+)',\n 'Membre étudiant (18+)',\n 'Adulte',\n 'Aîné (65+)',\n 'Tout-petit (0 à 2)',\n 'Enfant (3 à 12)',\n 'Étudiant (13+)',\n 'Étudiant (18+)',\n 'Universitaire postdoctoral',\n '*Postdoctoral',\n 'Employé/Bénévole',\n 'Employée Bénévole',\n 'Rabais adulte',\n 'Adulte forfait',\n 'Aîné (65+) forfait',\n 'Tout-petit (0 à 2) forfait',\n 'Enfant (3 à 12) forfait',\n '*Child/Enfant',\n 'Étudiant (13+) forfait',\n 'Étudiant (18+) forfait',\n 'Gratuit adulte',\n 'Gratuit aîné (65+)',\n 'Gratuit tout-petit (0 à 2)',\n 'Gratuit enfant (3 à 12)',\n 'Gratuit étudiant (13+)',\n 'Gratuit étudiant (18+)',\n ];\n }\n\n let sortedItems = [];\n let priceListSelector = '';\n\n const isPackagePage = $('.tn-flex-package-detail-page').length > 0;\n\n if (isPackagePage) {\n priceListSelector = 'fieldset .tn-ticket-selector__pricetype-container .tn-ticket-selector__pricetype-list li';\n } else {\n priceListSelector = 'fieldset .tn-ticket-selector__pricetype-container:first-child .tn-ticket-selector__pricetype-list li';\n }\n\n // Push the nodes onto an array so that we can use the sort method.\n document.querySelectorAll(priceListSelector).forEach((item, i) => {\n sortedItems.push(item)\n })\n\n let itemOrder = (item) => {\n if (isPackagePage) {\n return order.indexOf(\n item.querySelector('h4').innerText.trim()\n )\n } else {\n return order.indexOf(\n item.innerText.split('$')[0].trim()\n )\n }\n }\n\n // Sort the array based on the content of the node.\n sortedItems.sort((a, b) => {\n a = itemOrder(a);\n b = itemOrder(b);\n\n if (a == b) {\n return 0\n }\n\n if (a < b) {\n return -1\n }\n\n return 1\n })\n\n // Append the childresn ordered to the prices list.\n .forEach((item) => {\n document.querySelector('.tn-ticket-selector__pricetype-list').appendChild(item)\n })\n}", "function refreshProductsView() {\n let filteredProducts = filterByCountryName(products, countrySelect.value);\n filteredProducts = filterByName(filteredProducts, searchInput.value);\n filteredProducts = sortList(filteredProducts, sortSelect.value);\n filteredProducts = filterByRangeOfPrice(filteredProducts, priceRange.value);\n console.log(filterByRangeOfPrice(filteredProducts, priceRange.value));\n\n renderProducts(filteredProducts);\n}", "function searchProductsByPrice(price, difference) {\n\t\t\tvar promise = new Promise((resolve, reject) => {\n\t\t\t\tlet i = 0;\n\t\t\t\tlet priceArray = [];\n\t\t\t\t//Handle invalid price\n\t\t\t\tif (!isFinite(price)) reject('Invalid Price: ' + price);\n\t\t\t\t//Otherwise, search catalog\n\t\t\t\telse {\n\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\twhile (i < catalog.length) {\n\t\t\t\t\t\t\tif (Math.abs(catalog[i].price - price) <= difference) {\n\t\t\t\t\t\t\t\tpriceArray.push({\n\t\t\t\t\t\t\t\t\tid: catalog[i].id,\n\t\t\t\t\t\t\t\t\tprice: catalog[i].price,\n\t\t\t\t\t\t\t\t\ttype: catalog[i].type\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ti++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//After searching entire catalog, return matching products\n\t\t\t\t\t\tresolve(priceArray);\n\t\t\t\t\t}, 1000);\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn promise;\n\t\t}", "function search(budget, prices) {\n // return array of prices that are within budget\n return prices\n .filter(price => price <= budget)\n .sort((a, b) => a - b)\n .join(',');\n}", "function updateProductList()\n{\n var itemSort = '';\n var itemFilter = '';\n\n if (typeof document.filterForm != 'undefined') {\n itemSort = document.filterForm.sortBy.value;\n itemFilter = document.filterForm.filterBy.value;\n }\n\n // pageProduct\n var prodList = createProductList(itemSort, itemFilter);\n\n updateItemContainer(prodList);\n}", "function createProductList(itemSort, itemFilter) {\n var productList;\n var productListType;\n\n // filter the products based on type, pageProductType defined in HTML <script> element\n productListType = products;\n if (typeof pageProductType != 'undefined') {\n if (pageProductType.length != 0) {\n productListType = products.filter(function(product) {\n return product.productType == pageProductType;\n });\n }\n }\n\n // filter the products based on category\n if (itemFilter.length == 0) {\n productList = productListType;\n } else {\n productList = productListType.filter(function(product) {\n return product.category == itemFilter;\n });\n }\n\n // sort the products based on sorting specified by itemSort\n switch (itemSort) {\n case 'priceA':\n productList = productList.sort(compareByPrice);\n break;\n case 'priceD':\n productList = productList.sort(compareByPrice).reverse();\n break;\n case 'name':\n productList = productList.sort(compareByName);\n break;\n default:\n // do nothing\n break;\n }\n\n return productList;\n}", "function filterItems() {\n //returns newPropList, array of properties\n var newPropList = featured;\n //Beds\n console.log(1, newPropList);\n if(currentFilters.beds == 5) {\n newPropList = newPropList.filter(item => item.bedrooms >= currentFilters.beds);\n }\n else if (currentFilters.beds == 0) {\n\n }\n else {\n newPropList = newPropList.filter(item => item.bedrooms == currentFilters.beds);\n }\n console.log(2, newPropList);\n //Baths\n if(currentFilters.baths == 5) {\n newPropList = newPropList.filter(item => item.fullBaths >= currentFilters.baths);\n }\n else if (currentFilters.baths == 0) {\n\n }\n else {\n newPropList = newPropList.filter(item => item.fullBaths == currentFilters.baths);\n }\n console.log(3, newPropList);\n //Price\n if(currentFilters.max == 0) {\n\n }\n else if(currentFilters.min == 1000000) {\n newPropList = newPropList.filter(item => item.rntLsePrice >= currentFilters.min);\n }\n else {\n newPropList = newPropList.filter(item => item.rntLsePrice >= currentFilters.min && item.rntLsePrice <= currentFilters.max);\n }\n console.log(4, newPropList);\n //Type\n console.log(currentFilters.type);\n if(currentFilters.type == \"All\") {\n console.log('all');\n }\n else if(currentFilters.type == \"Other\") {\n newPropList = newPropList.filter(item => item.idxPropType == \"Residential Income\" || item.idxPropType == \"Lots And Land\");\n console.log('other');\n }\n else {\n newPropList = newPropList.filter(item => item.idxPropType == currentFilters.type);\n console.log('normal');\n }\n //Search Term\n console.log(5, newPropList);\n if(currentFilters.term != '')\n {\n newPropList = newPropList.filter(item => \n item.address.toLowerCase().indexOf(currentFilters.term.toLowerCase()) != -1 ||\n item.cityName.toLowerCase().indexOf(currentFilters.term.toLowerCase()) != -1\n );\n }\n console.log(6, newPropList);\n return newPropList;\n }", "priceBasedSort(a, b) {\n if (this.state.sortOrder === \"Descending\") {\n return (\n b.price - a.price\n );\n } else {\n return (\n a.price - b.price\n );\n }\n }", "async getProductListByFilter(req, res, next) {\n try {\n // - filter by cateogry and price\n let filter = {};\n const { filtertype } = req.headers;\n\n if (filtertype) {\n const filterPriceValue = this.filterProductByPrice(filtertype);\n const filterCategoryValue = this.filterProductByCategory(filtertype);\n\n if (filterPriceValue) {\n filter = {\n order: [[\"price\", filterPriceValue]],\n };\n } else if (filterCategoryValue) {\n filter = {\n where: {\n category: +filterCategoryValue,\n },\n };\n }\n }\n\n const results = await ProductService.getProductByFilter(filter);\n return res.json({\n success: true,\n results,\n });\n } catch (err) {\n next(err);\n }\n }", "function filterProductShop() {\n let minPrice = parseInt($('#price-min').val()),\n maxPrice = parseInt($('#price-max').val()),\n cat_lv1_list = [],\n sort = $('.store-sort .input-select option:selected').val(),\n id = window.location.pathname.split(\"/\")[2];\n\n if (!minPrice) {\n return false;\n }\n\n $('.checkbox-filter .input-checkbox input:checked').each(function () {\n cat_lv1_list.push($(this).data('id'));\n });\n\n axios({\n method: 'POST',\n url: `/shop/${id}/search`,\n data: {\n minPrice: minPrice,\n maxPrice: maxPrice,\n cat_lv1: cat_lv1_list,\n sort: sort\n }\n }).then(function (res) {\n document.querySelector('#store > .row').innerHTML = '';\n if (res.data.length > 0) {\n res.data.forEach(product => {\n let tpl = document.querySelector('#product-div'),\n clone = tpl.content.cloneNode(true),\n p_link = clone.querySelector('.product-link'),\n p_img = clone.querySelector('.product-img'),\n p_sale = clone.querySelector('.product-label .sale'),\n p_purchased = clone.querySelector('.product-purchased'),\n p_name = clone.querySelector('.product-name a'),\n price_1 = clone.querySelector('.product-price span'),\n price_2 = clone.querySelector('.product-old-price');\n p_link.href = `/product/${product.id}/show`;\n p_img.style.backgroundImage = `url(${product['img']})`;\n if (product.sale_percent) {\n p_sale.textContent = `${product.sale_percent}%`;\n } else {\n p_sale.style.display = 'none';\n }\n p_purchased.textContent = `Đã bán ${product.purchased_number}`;\n p_name.textContent = product.name;\n p_name.href = `/product/${product.id}/show`;\n price_1.textContent = product.sale_price;\n price_2.textContent = (product.sale_price === product.price) ? '' : product.price;\n document.querySelector('#store > .row').appendChild(clone);\n });\n } else {\n $('#store > .row').html('<p class=\"no-products\">Không có sản phẩm nào.</p>');\n }\n })\n }", "static byPrice(){\n return store.meals.sort(function(a,b){\n return b.price-a.price\n });\n }", "function filterRealty(realty) {\n\t\tif (!document.getElementById('imoveis').checked) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!realty.price) {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar minPrice = document.getElementById('min_price').value;\n\t\tvar maxPrice = document.getElementById('max_price').value;\n\n\t\tif (Number(realty.price) < minPrice || Number(realty.price) > maxPrice) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "function filterByPrice(){\n // inputRange = document.querySelector(\".slider\")\n inputRange.setAttribute(\"min\",min);\n inputRange.setAttribute(\"max\",max)\n // console.log(min ,max )\n var result = resultHotel.filter((hotel)=> {\n return hotel.price >= inputRange.value;\n })\n display(result);\n}", "function searchProductsByPrice(price,difference){\n var promise = new Promise(function(resolve,reject){\n var i = 0;\n var priceArray = [];\n if(!isFinite(price)){\n reject(\"Invalid Price: \" + price)\n }\n else{\n setTimeout(function(){\n while (i < catalog.length){\n if (Math.abs(catalog[i].price - price) < difference){\n priceArray.push({id:catalog[i].id,price:catalog[i].price,type:catalog[i].type});\n }\n i++;\n }\n resolve(priceArray);\n },1000);\n }\n });\n return promise;\n }", "async function getProducts(){\n var result=await Product.\n find()\n .limit(2) // Number of records required\n .sort({name:1}) // sort in ascending order w.r.t name\n .select({author:\"Hamad\"}); // properties required by items\n\n console.log(\" \\n\\nGet all records, then sort ascendingly on name, pick top 2 elements, and display whose author is hamad\\n\\n \"+result);\n\n result=await Product.\n find({price:{$lt:70,$gt:30}}); // price less than 70 and greator than 30\n console.log(\" \\n\\nprice less than 70 and greator than 30 \\n\\n\"+result);\n\n result=await Product.\n find({price:{$ne:30}}); // whose price is not equal to 30\n console.log(\" \\n\\nwhose price is not equal to 30 \\n\\n\"+result);\n\n result=await Product.\n find({price:{$in:[40,30]}}); // whose price is 40 or 30\n console.log(\"\\n\\n whose price is 40 or 30 \\n\\n\"+result);\n\n result=await Product.\n find({price:{$nin:[40,30]},name:\"rice\"}); // price is neither 40 nor 30 and name is rice \n console.log(\"\\n\\n price is neither 40 nor 30 and name is rice \\n\\n \"+result);\n\n}", "async sortGtPrice(req, res) {\r\n try { \r\n const products = await Product.find().sort({price: -1});\r\n res.send({message: 'Successful search', products});\r\n } catch (error) {\r\n console.error(500) \r\n res.send({message:'There was a problem trying to get products'});\r\n }\r\n }", "function sortPrice () {\n ispisArtikla.innerHTML = '';\n article.sort(compare);\n for (var i=0; i<article.length; i++) {\n if (article[i].stanje == true) {\n for (j=0; j<articleCategory.length; j++) {\n for (var k=0; k<articleCategory[j].podCategory.length; k++) {\n if (article[i].type == articleCategory[j].podCategory[k].id) {\n writeElement(i,j,k);\n }\n }\n }\n }\n }\n}", "function gather_categories_price()\n\t\t{\n\n\t\tvar labels = ['0-5','5-8','8-10','10-13','13-15','15-18','18-20','20-23','23-25','25-28','28-30','30-35','35-40','40-50','50-60','60+']\n\t\tvar price_buckets = {};\n\t\tfor (var i=0;i<labels.length;i=i+1)\n\t\t\t{\n\t\t\tprice_buckets[(k = labels[i])] = {'name':k,'order':i+1,'totalOrders':0};\n\t\t\t}\n\n\t\tfor (var each in $scope.DATA['ordersByPrice'])\n\t\t\t{\n\t\t\tvar el = $scope.DATA['ordersByPrice'][each];\n\t\t\tprice_buckets[el['name']]['totalOrders'] = el['totalOrders'];\n\t\t\t}\n\t\t$scope.DATA['ordersByPrice'] = $.map(price_buckets,function(el){return el});\n\n\t\t}", "filterByCost() {}", "function sortQuotes(){\n /**\n * sort all the prices from cheaper to expensive\n */\n quotes.sort(function(a, b) {\n return unformatNumber(a.price) - unformatNumber(b.price);\n });\n}", "filterTopProducts() {\n const result = [];\n if (!this.searchResults) return;\n this.topProducts = [];\n const sr = this.searchResults;\n for (let i = 0; i < 3; i += 1) {\n result.push(new TopProduct(sr[i].itemId, sr[i].name, sr[i].productUrl, sr[i].thumbnailImage));\n }\n this.topProducts = result;\n }", "function preRenderFilteredItems(animal, type, priceRange) {\r\n for (let i in accessoriesArr) {\r\n if (animal === accessoriesArr[i].animal) {\r\n if (type === accessoriesArr[i].type) {\r\n if (accessoriesArr[i].price >= parseInt(priceRange) && accessoriesArr[i].price < (parseInt(priceRange) + 25)) {\r\n renderFilteredAccessories(i);\r\n } else if (priceRange === '-1') {\r\n renderFilteredAccessories(i);\r\n }\r\n } else if (type === '0') {\r\n if (accessoriesArr[i].price >= parseInt(priceRange) && accessoriesArr[i].price < (parseInt(priceRange) + 25)) {\r\n renderFilteredAccessories(i);\r\n } else if (priceRange === '-1') {\r\n renderFilteredAccessories(i);\r\n }\r\n }\r\n } else if (animal === 'Select') {\r\n if (accessoriesArr[i].type.includes(type)) {\r\n if (accessoriesArr[i].price >= parseInt(priceRange) && accessoriesArr[i].price < (parseInt(priceRange) + 25)) {\r\n renderFilteredAccessories(i);\r\n } else if (priceRange === '-1') {\r\n renderFilteredAccessories(i);\r\n }\r\n } else if (type === '0') {\r\n if (accessoriesArr[i].price >= parseInt(priceRange) && accessoriesArr[i].price < (parseInt(priceRange) + 25)) {\r\n renderFilteredAccessories(i);\r\n } else if (priceRange === '-1') {\r\n renderFilteredAccessories(i);\r\n }\r\n }\r\n }\r\n }\r\n}", "function filterResults() {\n var filteredHotels = hotels.filter(function(hotel) {\n if(\n hotel.stars >= rating &&\n hotel.distance <= distance &&\n (hotel.ppn >= minPrice && hotel.ppn <=maxPrice)\n ) {\n return hotel\n }\n });\n \n //If facilities filter present filter results accordingly.\n if(!document.getElementById('ignore_facilities').checked) {\n if(wifi || pool) {\n filteredHotels = filteredHotels.filter((function (hotel) {\n if(wifi && pool) {\n if((wifi && hotel.wifi) && (pool && hotel.pool) ) return hotel;\n }\n else{\n if(wifi && hotel.wifi) return hotel;\n if(pool && hotel.pool) return hotel;\n }\n }));\n }\n }\n \n //Remove previous results\n var node = document.getElementById('results');\n while (node.hasChildNodes()) {\n node.removeChild(node.lastChild);\n }\n if(order === \"desc\") {\n filteredHotels.sort(descending);\n }\n else {\n filteredHotels.sort(ascending);\n }\n if(filteredHotels.length === 0) {\n var noResults = document.createElement('div');\n noResults.className = 'text-center col-12 pt-5';\n noResults.innerHTML = '<p>No results match your search criteria.</p>\\n';\n document.getElementById('results').appendChild(noResults);\n }\n else {\n loadHotels(filteredHotels);\n }\n}", "filterCatalog() {\n\t\tlet filteredCatalog = [];\n\t\tthis.postFiltered({}); // clean previous filtered catalog\n\n\t\tfor (let i = 0; i < this.catalog.length; i++) { // and filter with them catalog. Intermediate results put\n\t\t\t// check if the product satisfy all filters\n\t\t\tif (\n\t\t\t\t\tthis.checkProdWithFilter(this.filters.catItem, this.catalog[i].catItem) &&\n\t\t\t\t\tthis.checkProdWithFilter(this.filters.category, this.catalog[i].category) &&\n\t\t\t\t\tthis.checkProdWithFilter(this.filters.brand, this.catalog[i].brand) &&\n\t\t\t\t\tthis.checkProdWithFilter(this.filters.designer, this.catalog[i].designer) &&\n\t\t\t\t\tthis.checkProdBySize(this.filters.size, this.catalog[i].size) &&\n\t\t\t\t\tthis.checkProdByPrice(this.filters.price, this.catalog[i].price)\n\t\t\t) {\n\n\t\t\t\tfilteredCatalog.push(this.catalog[i]); // add this product to this.filteredCatalog\n\t\t\t}\n\t\t}\n\n\t\tthis.paginate(filteredCatalog);\n\n\t\t// this.postFiltered(this.filteredCatalog); // this.filteredCatalog сохраняется правильно\n\t}", "sortByPrice() {\r\n get('#app > div > div.MrQ4g > div > div._3pSVv._19-Sz.F0sHG._1eAL0 > div > div > div._1V_Pj > div.izVGc').contains('Sort by').click();\r\n get('[id^=price_asc]').click({ multiple: true, force: true });\r\n }", "noOfferProducts(productsListFromProps) {\n if (productsListFromProps.length > 0 && this.props.company && this.props.company.offers.items.length > 0) {\n let coOffers;\n this.props.company.offers.items.forEach((item) => { coOffers = coOffers + item.productID + ';;' });\n const l = productsListFromProps.length;\n let indexedProductsNoOffer = [];\n let count = 0;\n for (let x = 0; x < l; x++) {\n if (!coOffers.includes(productsListFromProps[x].id)) {\n indexedProductsNoOffer.push({\n seqNumb: count++,\n details: productsListFromProps[x]\n })\n }\n }\n return indexedProductsNoOffer;\n } else {\n return this.allProducts(productsListFromProps);\n }\n }", "function getPriceGroups(){\n\tlet result = _.groupBy(pizzaToppingPrices, (item) => {\n\t\t//this will return based on item passes in and value\n return Math.floor(item.price / 1.0) \n })\n\treturn result;\n}", "placeOrder() {\n var cartItems = this.state.itemList.filter((e)=> (e.isChecked == true))\n console.log('cartItems :', JSON.stringify(cartItems));\n\n if(cartItems.length) {\n var numOfPackage = this.findNumOfPackage(cartItems);\n console.log('numOfPackage :', numOfPackage);\n\n if(numOfPackage == 1) {\n this.createCartList(cartItems, numOfPackage);\n } else {\n cartItems.sort((a, b) => parseInt(b.Weight) - parseInt(a.Weight));\n console.log('cartItems :', JSON.stringify(cartItems));\n\n var Package = [];\n cartItems.forEach((val, index) => {\n if(index < numOfPackage) {\n for(var i=0; i<numOfPackage; i++) {\n if(i == index) {\n Package[i] = [];\n Package[i].push(val);\n return;\n }\n }\n } else {\n Package.sort(this.sortFunction);\n for(var i=0; i<numOfPackage; i++) {\n var TPRIZE = 0;\n for(var j=0; j<Package[i].length; j++) {\n TPRIZE += Package[i][j].Price;\n }\n\n if (TPRIZE + val['Price'] <= maxOrderPrice) {\n Package[i].push(val);\n return;\n }\n }\n }\n })\n\n this.createCartList(Package, numOfPackage);\n }\n } else {\n alert(\"choose any item to place order\");\n }\n }", "function findItemsOver(list, bar){\n var expensive = [];\n for(i in list){\n if(list[i].price > bar){\n expensive.push(list[i]);\n }\n }\n return expensive;\n}", "filterData(sortData) {\n let finishData = [], filterData = [];\n sortData.forEach(\n data => {\n if(!finishData.includes(data.date)) {\n let same = sortData.filter(e => e.date == data.date);\n if(same.length > 1) {\n let cheapest = same[0];\n same.forEach(e => {cheapest = e.price < cheapest.price ? e : cheapest})\n filterData.push(cheapest)\n }\n else {\n filterData.push(data);\n }\n finishData.push(data.date);\n }\n }\n )\n return filterData\n }", "async sortLtPrice(req, res) {\r\n try { \r\n const products = await Product.find().sort({price: 1});\r\n res.send({message: 'Successful search', products});\r\n } catch (error) {\r\n console.error(500) \r\n res.send({message:'There was a problem trying to get products'});\r\n }\r\n }", "sortAndReduceOrderBook() {\n const asks = ptoHelper.sortOrders(this.asks, 'ascending');\n const bids = ptoHelper.sortOrders(this.bids, 'descending');\n this.asks = ptoHelper.reduceOrders(asks);\n this.bids = ptoHelper.reduceOrders(bids);\n }", "function carryToOrders(pProducts, pOrders) {\n let productsList = document.querySelectorAll(\"#allProducts li\");\n console.log(productsList.item(2));\n for (let i = 0; i < products.length; i++) {\n productsList[i].addEventListener(\"click\", function () {\n let productsListItem = productsList[i].innerText;\n let index = pProducts.indexOf(productsListItem);\n pProducts.splice(index, 1);\n productsList[i].remove();\n pOrders.push(productsListItem);\n pOrders.sort();\n addProducts(pOrders, \"#allOrders\")\n });\n\n }\n}", "function filterProductCategory() {\n let minPrice = parseInt($('#price-min').val()),\n maxPrice = parseInt($('#price-max').val()),\n cat_lv2_list = [],\n sort = $('.store-sort .input-select option:selected').val(),\n id = $('input#page-category-id').val(),\n level = $('#category-level').val();\n\n if (!minPrice) {\n return false;\n }\n\n $('.checkbox-filter .input-checkbox input:checked').each(function () {\n cat_lv2_list.push($(this).data('id'));\n });\n\n axios({\n method: 'POST',\n url: `/category/${id}/search`,\n data: {\n minPrice: minPrice,\n maxPrice: maxPrice,\n cat_lv2: cat_lv2_list,\n sort: sort,\n level: level\n }\n }).then(function (res) {\n document.querySelector('#store > .row').innerHTML = '';\n if (res.data.length > 0) {\n res.data.forEach(product => {\n let tpl = document.querySelector('#product-div'),\n clone = tpl.content.cloneNode(true),\n p_link = clone.querySelector('.product-link'),\n p_img = clone.querySelector('.product-img'),\n p_sale = clone.querySelector('.product-label .sale'),\n p_purchased = clone.querySelector('.product-purchased'),\n p_name = clone.querySelector('.product-name a'),\n price_1 = clone.querySelector('.product-price span'),\n price_2 = clone.querySelector('.product-old-price');\n p_link.href = `/product/${product.id}/show`;\n p_img.style.backgroundImage = `url(${product['img']})`;\n if (product.sale_percent) {\n p_sale.textContent = `${product.sale_percent}%`;\n } else {\n p_sale.style.display = 'none';\n }\n p_purchased.textContent = `Đã bán ${product.purchased_number}`;\n p_name.textContent = product.name;\n p_name.href = `/product/${product.id}/show`;\n price_1.textContent = product.sale_price;\n price_2.textContent = (product.sale_price === product.price) ? '' : product.price;\n document.querySelector('#store > .row').appendChild(clone);\n });\n } else {\n $('#store > .row').html('<p class=\"no-products\">Không có sản phẩm nào.</p>');\n }\n\n })\n }", "function price2(rentals)\n{\n for (var i = 0; i < rentals.length; i++)\n {\n var time = getDays(rentals[i].pickupDate, rentals[i].returnDate);\n\n if (time < 1)\n {\n rentals[i].price = (time * getPricePerDay(rentals[i].carId)) + (rentals[i].distance * getPricePerKm(rentals[i].carId));\n }\n if (time >= 1 && time < 4)\n {\n rentals[i].price = (time * getPricePerDay(rentals[i].carId) * 0.9) + (rentals[i].distance * getPricePerKm(rentals[i].carId));\n }\n if (time >= 4 && time < 10)\n {\n rentals[i].price = (time * getPricePerDay(rentals[i].carId) * 0.7) + (rentals[i].distance * getPricePerKm(rentals[i].carId));\n }\n if (time >= 10)\n {\n rentals[i].price = (time * getPricePerDay(rentals[i].carId) * 0.5) + (rentals[i].distance * getPricePerKm(rentals[i].carId));\n }\n }\n}", "function PricePerUnit() { \r\n // The PricePer function grabs all the prices and does calculations on them when Auction House pages load.\r\n var pricePer = function(descending)\r\n {\r\n // Get the listed sales.\r\n var sales = $('div[id^=\"sale\"]');\r\n var isFood = $($('#search_food')[0]).attr('style').indexOf('font-weight: bold') > -1;\r\n \r\n var pricesPer = [];\r\n \r\n for (var i = 0; i < sales.length; i++)\r\n {\r\n // For each sale, get the item counts and pricing - then divide!\r\n var sale = $(sales[i]);\r\n var count = $(sale.find('div span span')[0]).text().trim();\r\n if (isFood)\r\n {\r\n var id = $(sales.find('div > span > span')[0]).text();\r\n \r\n var foodRate = getFoodPointsById(id);\r\n if (foodRate)\r\n count *= foodRate;\r\n }\r\n var priceEl = $(sale.find('div[id^=\"buy_button\"]')[0]);\r\n var price = priceEl.text().trim();\r\n \r\n // Convert the treasure totals into friendly values (k, Mil, and various decimal counts)\r\n if (count > 1)\r\n {\r\n var pricePer = price/count;\r\n pricesPer.push(pricePer);\r\n \r\n if (pricePer > 1000000)\r\n {\r\n pricePer = Math.round(pricePer / 100000) / 10 + ' Mil';\r\n }\r\n else if (pricePer > 1000)\r\n {\r\n pricePer = Math.round(pricePer / 100) / 10 + 'k';\r\n }\r\n else if (pricePer > 10)\r\n {\r\n pricePer = Math.round(pricePer);\r\n }\r\n else if (pricePer > 3)\r\n {\r\n pricePer = Math.round((price/count) * 10) / 10;\r\n }\r\n else {\r\n pricePer = Math.round((price/count) * 100) / 100;\r\n }\r\n priceEl.html(priceEl.html().replace(price + '<br>', pricePer + ' <span style=\"color: #008000;\">x' + count + (isFood ? ' pt' : '') + '</span><br>'));\r\n }\r\n else\r\n {\r\n pricesPer.push(parseInt(price));\r\n }\r\n }\r\n \r\n // Sort the listings by price per (can't sort all items at once, but no reason not to sort each page).\r\n // This is basically an insertion sort - I don't know if this is poor or not, but I really don't care about performance when sorting ~10 items.\r\n for (var i = 0; i < sales.length; i++)\r\n {\r\n for (var j = i + 1; j < sales.length; j++)\r\n {\r\n if (!descending && pricesPer[j] < pricesPer[i] || descending && pricesPer[j] > pricesPer[i])\r\n {\r\n $(sales[i]).before($(sales[j]));\r\n \r\n // Reload my query since things moved.\r\n sales = $('div[id^=\"sale\"]');\r\n \r\n var pricePerToMove = pricesPer.splice(j, 1)[0];\r\n pricesPer.splice(i, 0, pricePerToMove);\r\n }\r\n }\r\n }\r\n }\r\n \r\n // Actually call the price per item function when the Auction House pages stop loading.\r\n $(document).ajaxSuccess(function(e, xhr, options) {\r\n if (options.url.indexOf('ah_buy_') > -1)\r\n {\r\n if (options.data.order == 'DESC')\r\n {\r\n pricePer(true);\r\n }\r\n else\r\n {\r\n pricePer(false);\r\n }\r\n }\r\n });\r\n}", "function priceSorter(a, b, rowA, rowB) {\n\tif(a > b)\n\t\treturn 1;\n\tif(a < b)\n\t\treturn -1;\n\n\treturn 0;\n}" ]
[ "0.7482795", "0.74501616", "0.73814726", "0.73162377", "0.7304043", "0.71559083", "0.7155139", "0.69967884", "0.6921019", "0.6907436", "0.6877552", "0.6857144", "0.6806587", "0.6663314", "0.6643377", "0.6575873", "0.6495819", "0.6343532", "0.6343085", "0.6339936", "0.6249249", "0.62309206", "0.62223756", "0.62058836", "0.6084785", "0.6084779", "0.605214", "0.6042498", "0.6025272", "0.6006582", "0.59911144", "0.5966993", "0.59111506", "0.59008634", "0.5807438", "0.57994795", "0.57901216", "0.5789283", "0.57520056", "0.57418644", "0.57296276", "0.56825984", "0.5663791", "0.5653223", "0.56443775", "0.5625048", "0.5623247", "0.5547363", "0.55339956", "0.55244875", "0.5515357", "0.55150074", "0.5513299", "0.54792434", "0.5472095", "0.5463053", "0.54592234", "0.5456246", "0.5454198", "0.5452266", "0.54516697", "0.5437271", "0.54290396", "0.54268193", "0.5422098", "0.5404418", "0.5404161", "0.5396126", "0.5385014", "0.53813875", "0.5366327", "0.5354336", "0.53533006", "0.5352877", "0.5349765", "0.5339464", "0.53346086", "0.5323045", "0.5296373", "0.52883565", "0.5285042", "0.52766347", "0.52651805", "0.5255536", "0.5248194", "0.5241765", "0.524096", "0.52320385", "0.5229799", "0.5218963", "0.5216935", "0.5200032", "0.51935685", "0.5181252", "0.5178294", "0.5169126", "0.5161316", "0.5160615", "0.51592857", "0.51562095" ]
0.62000644
24
Is the final check for organicness, before adding to array, to be used in RestrictListProducts function
function _organicCheck(item, organicBool){ if(organicBool.checked && item.organic == true){ restricted_prods.push(item); } else if (!(organicBool.checked)) { restricted_prods.push(item); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function restrictListProducts(prods, restriction, organic) {\n\tvar product_information = [];\n if (organic){\n\n for (let i=0; i<prods.length; i+=1) {\n if ((restriction == \"lactosenutfree\") && (prods[i].lactosefree) && (prods[i].nutfree) && (prods[i].organic)){\n product_information.push([prods[i].price, prods[i].name]);\n }\n else if ((restriction == \"lactosefree\") && (prods[i].lactosefree) && (prods[i].organic)){\n product_information.push([prods[i].price, prods[i].name]);\n }\n else if ((restriction == \"nutfree\") && (prods[i].nutfree) && (prods[i].organic)){\n product_information.push([prods[i].price, prods[i].name]);\n }\n else if ((restriction == \"None\") && (prods[i].organic)){\n product_information.push([prods[i].price, prods[i].name]);\n }\n }\n return product_information.sort(function sortListProducts(valA, valB) {\n return valA[0] - valB[0];\n });\n\n }else{\n\n for (let i=0; i<prods.length; i+=1) {\n if ((restriction == \"lactosenutfree\") && (prods[i].lactosefree) && (prods[i].nutfree)){\n product_information.push([prods[i].price, prods[i].name]);\n }\n else if ((restriction == \"lactosefree\") && (prods[i].lactosefree)){\n product_information.push([prods[i].price, prods[i].name]);\n }\n else if ((restriction == \"nutfree\") && (prods[i].nutfree)){\n product_information.push([prods[i].price, prods[i].name]);\n }\n else if (restriction == \"None\"){\n product_information.push([prods[i].price, prods[i].name]);\n }\n }\n return product_information.sort(function sortListProducts(valA, valB) {\n return valA[0] - valB[0];\n });\n }\n}", "function restrictListProducts(prods, restriction, organicProduct) {\n\tlet product_names = [];\n\tconsole.log(organicProduct, restriction);\n\tfor (let i=0; i<prods.length; i+=1) {\n\t\tvar product = { name: null, price: null };\n\n\t\tif (organicProduct == true && prods[i].organic == true){\n\t\t\tif ((restriction == \"Vegetarian\") && (prods[i].vegetarian == true)){\n\t\t\t\tproduct.name = prods[i].name;\n\t\t\t\tproduct.price = prods[i].price;\n\t\t\t\tproduct_names.push(product);\n\t\t\t}\n\t\t\telse if ((restriction == \"GlutenFree\") && (prods[i].glutenFree == true)){\n\t\t\t\tproduct.name = prods[i].name;\n\t\t\t\tproduct.price = prods[i].price;\n\t\t\t\tproduct_names.push(product);\n\t\t\t}\n\t\t\telse if ((restriction == \"VegetarianANDGlutenFree\") && (prods[i].glutenFree == true && prods[i].vegetarian == true)){\n\t\t\t\tproduct.name = prods[i].name;\n\t\t\t\tproduct.price = prods[i].price;\n\t\t\t\tproduct_names.push(product);\n\t\t\t }\n\t\t\telse if (restriction == \"None\"){\n\t\t\t\tproduct.name = prods[i].name;\n\t\t\t\tproduct.price = prods[i].price;\n\t\t\t\tproduct_names.push(product);\n\t\t\t}\n\t\t}\n\t\telse if (organicProduct == false) {\n\t\t\tif ((restriction == \"Vegetarian\") && (prods[i].vegetarian == true)){\n\t\t\t\tproduct.name = prods[i].name;\n\t\t\t\tproduct.price = prods[i].price;\n\t\t\t\tproduct_names.push(product);\n\t\t\t}\n\t\t\telse if ((restriction == \"GlutenFree\") && (prods[i].glutenFree == true)){\n\t\t\t\tproduct.name = prods[i].name;\n\t\t\t\tproduct.price = prods[i].price;\n\t\t\t\tproduct_names.push(product);\n\t\t\t}\n\t\t\telse if ((restriction == \"VegetarianANDGlutenFree\") && (prods[i].glutenFree == true && prods[i].vegetarian == true)){\n\t\t\t\tproduct.name = prods[i].name;\n\t\t\t\tproduct.price = prods[i].price;\n\t\t\t\tproduct_names.push(product);\n\t\t\t }\n\t\t\telse if (restriction == \"None\"){\n\t\t\t\tproduct.name = prods[i].name;\n\t\t\t\tproduct.price = prods[i].price;\n\t\t\t\tproduct_names.push(product);\n\t\t\t}\n\t\t}\n\t}\n\treturn product_names;\n}", "function restrictListProducts(prods, restriction, organic) {\n\trestricted_prods = [];\n\n\n\tfor (let i=0; i<prods.length; i+=1) {\n\t\tif ((restriction[\"nut-free\"] == true && restriction[\"lactose-free\"] == false) && (prods[i].nut == false)){\n\t\t\t_organicCheck(prods[i],organic);\n\t\t}\n\n\t\telse if ((restriction[\"lactose-free\"] == true && restriction[\"nut-free\"] == false) && (prods[i].lactose == false)){\n\t\t\t_organicCheck(prods[i],organic);\n\t\t}\n\n\t\telse if((restriction[\"lactose-free\"] == true && restriction[\"nut-free\"] == true) && (prods[i].lactose == false && prods[i].nut == false)) {\n\t\t\t_organicCheck(prods[i],organic);\n\t\t}\n\n\t\telse if(restriction[\"none\"] == true){\n\t\t\t_organicCheck(prods[i],organic);\n\t\t}\n\n\t}\n\treturn restricted_prods;\n}", "function restrictList(product, restriction, is_organic, type){\n let temp;\n for (let i = 0; i < product.length; i++) {\n for (let j = 0; j < product.length; j++) {\n if (product[i].price < product[j].price) {\n temp = product[i]\n product[i] = product[j]\n product[j] = temp\n }\n }\n }\n let product_names = [];\n if (type==\"all\") {\n if (is_organic == true) {\n for (let i = 0; i < product.length; i += 1) {\n if ((restriction == \"Vegetarian\") && (product[i].vegetarian == true) && (product[i].organic == true)) {\n product_names.push(product[i].name + \" $\" + product[i].price);\n } else if ((restriction == \"GlutenFree\") && (product[i].glutenFree == true) && (product[i].organic == true)) {\n product_names.push(product[i].name + \" $\" + product[i].price);\n } else if ((restriction == \"VegAGlu\") && (product[i].glutenFree == true) && (product[i].vegetarian == true) && (product[i].organic == true)) {\n product_names.push(product[i].name + \" $\" + product[i].price);\n } else if ((restriction == \"None\") && (product[i].organic == true)) {\n product_names.push(product[i].name + \" $\" + product[i].price);\n }\n }\n } else {\n for (let i = 0; i < product.length; i += 1) {\n if ((restriction == \"Vegetarian\") && (product[i].vegetarian == true)) {\n product_names.push(product[i].name + \" $\" + product[i].price);\n } else if ((restriction == \"GlutenFree\") && (product[i].glutenFree == true)) {\n product_names.push(product[i].name + \" $\" + product[i].price);\n } else if ((restriction == \"VegAGlu\") && (product[i].glutenFree == true) && (product[i].vegetarian == true)) {\n product_names.push(product[i].name + \" $\" + product[i].price);\n } else if (restriction == \"None\") {\n product_names.push(product[i].name + \" $\" + product[i].price);\n }\n }\n }\n }\n else{\n if (is_organic == true) {\n for (let i = 0; i < product.length; i += 1) {\n if ((restriction == \"Vegetarian\") && (product[i].vegetarian == true) && (product[i].organic == true) &&(product[i].type==type)) {\n product_names.push(product[i].name + \" $\" + product[i].price);\n } else if ((restriction == \"GlutenFree\") && (product[i].glutenFree == true) && (product[i].organic == true) &&(product[i].type==type)) {\n product_names.push(product[i].name + \" $\" + product[i].price);\n } else if ((restriction == \"VegAGlu\") && (product[i].glutenFree == true) && (product[i].vegetarian == true) && (product[i].organic == true) &&(product[i].type==type)) {\n product_names.push(product[i].name + \" $\" + product[i].price);\n } else if ((restriction == \"None\") && (product[i].organic == true) &&(product[i].type==type)) {\n product_names.push(product[i].name + \" $\" + product[i].price);\n }\n }\n } else {\n for (let i = 0; i < product.length; i += 1) {\n if ((restriction == \"Vegetarian\") && (product[i].vegetarian == true) &&(product[i].type==type)) {\n product_names.push(product[i].name + \" $\" + product[i].price);\n } else if ((restriction == \"GlutenFree\") && (product[i].glutenFree == true) &&(product[i].type==type)) {\n product_names.push(product[i].name + \" $\" + product[i].price);\n } else if ((restriction == \"VegAGlu\") && (product[i].glutenFree == true) && (product[i].vegetarian == true) &&(product[i].type==type)) {\n product_names.push(product[i].name + \" $\" + product[i].price);\n } else if (restriction == \"None\" &&(product[i].type==type)) {\n product_names.push(product[i].name + \" $\" + product[i].price);\n }\n }\n }\n }\n return product_names;\n}", "function restrictListProducts(prods, restriction, organic) {\n\tlet product_names = new Map();\n\tfor (let i=0; i<prods.length; i+=1) {\n\t\tif ((organic == true) && (prods[i].organic == true)) {\n\t\t\tif ((restriction == \"Both Restrictions\") && !prods[i].containLactose && !prods[i].containNuts) {\n\t\t\t\tproduct_names.set(prods[i].name, prods[i].price);\n\t\t\t}\n\t\t\telse if ((restriction == \"Lactose Free\") && !prods[i].containLactose){\n\t\t\t\tproduct_names.set(prods[i].name, prods[i].price);\n\t\t\t}\n\t\t\telse if ((restriction == \"Nuts Free\") && !prods[i].containNuts){\n\t\t\t\tproduct_names.set(prods[i].name, prods[i].price);\n\t\t\t}\n\t\t\telse if (restriction == \"No Restrictions\"){\n\t\t\t\tproduct_names.set(prods[i].name, prods[i].price);\n\t\t\t}\n\t\t} else if((organic == false) && (prods[i].organic == false)){\n\t\t\tif ((restriction == \"Both Restrictions\") && !prods[i].containLactose && !prods[i].containNuts) {\n\t\t\t\tproduct_names.set(prods[i].name, prods[i].price);\n\t\t\t}\n\t\t\telse if ((restriction == \"Lactose Free\") && !prods[i].containLactose){\n\t\t\t\tproduct_names.set(prods[i].name, prods[i].price);\n\t\t\t}\n\t\t\telse if ((restriction == \"Nuts Free\") && !prods[i].containNuts){\n\t\t\t\tproduct_names.set(prods[i].name, prods[i].price);\n\t\t\t}\n\t\t\telse if (restriction == \"No Restrictions\"){\n\t\t\t\tproduct_names.set(prods[i].name, prods[i].price);\n\t\t\t}\n\t\t} else if((organic == null)){\n\t\t\tif ((restriction == \"Both Restrictions\") && !prods[i].containLactose && !prods[i].containNuts) {\n\t\t\t\tproduct_names.set(prods[i].name, prods[i].price);\n\t\t\t}\n\t\t\telse if ((restriction == \"Lactose Free\") && !prods[i].containLactose){\n\t\t\t\tproduct_names.set(prods[i].name, prods[i].price);\n\t\t\t}\n\t\t\telse if ((restriction == \"Nuts Free\") && !prods[i].containNuts){\n\t\t\t\tproduct_names.set(prods[i].name, prods[i].price);\n\t\t\t}\n\t\t\telse if (restriction == \"No Restrictions\"){\n\t\t\t\tproduct_names.set(prods[i].name, prods[i].price);\n\t\t\t}\n\t\t}\n\t}\n\n\tproduct_names[Symbol.iterator] = function* () {\n\t\tyield* [...this.entries()].sort((a, b) => a[1] - b[1]);\n\t}\n\n\treturn product_names;\n}", "function restrictListProducts(prods, restriction) {\r\n\tlet product_names = [];\r\n var restrictions = restriction.split(',');\r\n// console.log(restrictions);\r\n\tfor (let i=0; i<prods.length; i+=1) {\r\n var productVegetarian = prods[i].vegetarian;\r\n var productGlutenFree = prods[i].glutenFree;\r\n var productOrganic = prods[i].organic;\r\n var restrictVeg = false;\r\n var restrictGlu = false;\r\n var restrictOrg = false;\r\n var None = false;\r\n// console.log(restrictions.length);\r\n \r\n if(restrictions.length >= 2){\r\n for(let j = 0; j < restrictions.length; j++){\r\n if(restrictions[j] == \"Vegetarian\") restrictVeg = true;\r\n if(restrictions[j] == \"GlutenFree\") restrictGlu = true;\r\n if(restrictions[j] == \"Organic\") restrictOrg = true;\r\n }\r\n if ((restrictVeg && restrictOrg && restrictGlu) && (productVegetarian && productOrganic && productGlutenFree)){\r\n\t\t\t product_names.push(prods[i].name + \":\" + prods[i].price);\r\n }else if ((restrictGlu && restrictVeg && !restrictOrg) && (productVegetarian && productGlutenFree)){\r\n\t\t\t product_names.push(prods[i].name + \":\" + prods[i].price);\r\n\t\t }else if ((restrictGlu && restrictOrg && !restrictVeg) && (productGlutenFree&& productOrganic)){\r\n\t\t\t product_names.push(prods[i].name + \":\" + prods[i].price);\r\n }else if ((restrictVeg && restrictOrg && !restrictGlu) && (productVegetarian && productOrganic)){\r\n\t\t\t product_names.push(prods[i].name + \":\" + prods[i].price);\r\n }\r\n }else{\r\n if ((restrictions[0] == \"Vegetarian\") && (productVegetarian)){\r\n product_names.push(prods[i].name + \":\" + prods[i].price);\r\n }else if ((restrictions[0] == \"GlutenFree\") && (productGlutenFree)){\r\n product_names.push(prods[i].name + \":\" + prods[i].price);\r\n }else if ((restrictions[0] == \"Organic\") && (productOrganic)){\r\n product_names.push(prods[i].name + \":\" + prods[i].price);\r\n }else if (restrictions[0] == \"None\"){\r\n product_names.push(prods[i].name + \":\" + prods[i].price);\r\n }\r\n }\r\n \r\n\r\n\t}\r\n\treturn product_names;\r\n}", "noOfferProducts(productsListFromProps) {\n if (productsListFromProps.length > 0 && this.props.company && this.props.company.offers.items.length > 0) {\n let coOffers;\n this.props.company.offers.items.forEach((item) => { coOffers = coOffers + item.productID + ';;' });\n const l = productsListFromProps.length;\n let indexedProductsNoOffer = [];\n let count = 0;\n for (let x = 0; x < l; x++) {\n if (!coOffers.includes(productsListFromProps[x].id)) {\n indexedProductsNoOffer.push({\n seqNumb: count++,\n details: productsListFromProps[x]\n })\n }\n }\n return indexedProductsNoOffer;\n } else {\n return this.allProducts(productsListFromProps);\n }\n }", "function restrictListProducts(prods, restrictions) {\n\tvar lactoseFree = false;\n\tvar nutFree = false;\n\tvar organic = false;\n\tif (restrictions.length > 0){\n\t\tfor (i = 0; i < restrictions.length; i++) { \n\t\t\tif (restrictions[i] == \"organic\"){\n\t\t\t\torganic = true;\n\t\t\t}\n\t\t\telse if (restrictions[i] == \"nutFree\"){\n\t\t\t\tnutFree = true;\n\t\t\t}\n\t\t\telse if (restrictions[i] == \"lactoseFree\"){\n\t\t\t\tlactoseFree = true;\n\t\t\t}\n\t\t}\n\t}\n\t\n\tlet product_names = [];\n\t\n\tfor (let i=0; i<prods.length; i+=1) {\n\t\tif ((lactoseFree == true) && (nutFree == true)&& (organic == true) && (prods[i].lactoseFree == true) && (prods[i].organic == true) && (prods[i].nutFree == true)){\n\t\t\tproduct_names.push(prods[i]);\n\t\t}\n\t\telse if ((lactoseFree == true) && (nutFree == true) && (organic == false) && (prods[i].lactoseFree == true) && (prods[i].nutFree == true)){\n\t\t\tproduct_names.push(prods[i]);\n\t\t}\n\t\telse if ((lactoseFree == true) && (organic == true) && (nutFree == false) && (prods[i].lactoseFree == true) && (prods[i].organic == true)){\n\t\t\tproduct_names.push(prods[i]);\n\t\t}\n\t\telse if ((nutFree == true) && (organic == true) && (lactoseFree == false) && (prods[i].organic == true) && (prods[i].nutFree == true)){\n\t\t\tproduct_names.push(prods[i]);\n\t\t}\n\t\telse if ((lactoseFree == false) && (nutFree == true)&& (organic == false) && (prods[i].nutFree == true)){\n\t\t\tproduct_names.push(prods[i]);\n\t\t}\n\t\telse if ((lactoseFree == true) && (nutFree == false)&& (organic == false) && (prods[i].lactoseFree == true)){\n\t\t\tproduct_names.push(prods[i]);\n\t\t}\n\t\telse if ((lactoseFree == false) && (nutFree == false)&& (organic == false)){\n\t\t\tproduct_names.push(prods[i]);\n\t\t}\n\t\telse if ((lactoseFree == false) && (nutFree == false)&& (organic == true) && (prods[i].organic == true)){\n\t\t\tproduct_names.push(prods[i]);\n\t\t}\n\t}\n\treturn product_names;\n}", "function restrictListProducts(prods, lactoseIntolerant, nutFree, organic, sorter) {\n\tlet products = [];\n\tfor (let i = 0; i < prods.length; i += 1) {\n\t\tif (ableToEat(prods[i], lactoseIntolerant, nutFree, organic)) {\n\t\t\tproducts.push(prods[i]);\n\t\t}\n\t}\n\treturn products.sort(sorter);\n}", "function restrictListProducts(prods, restriction) {\n\tlet product_names = [];\n\t/*for (let i=0; i<prods.length; i+=1) {\n\t\tif (restriction==\"None\"){\n\t\t\tproduct_names.push([prods[i].name, prods[i].price]);\t\n }\n\t\telse if ((restriction == \"Lactose-intolerant Nutallergy and Organic\") && (prods[i].lactoseFree == true && (prods[i].nutFree == true)&& (prods[i].organic== true))){\n\t\t\tproduct_names.push([prods[i].name, prods[i].price]);\n\t\t}\n\t\telse if ((restriction == \"Lactose-intolerant and Nutallergy\") && (prods[i].lactoseFree == true && (prods[i].nutFree == true))){\n\t\t\tproduct_names.push([prods[i].name, prods[i].price]);\n\t\t}\n\t\telse if ((restriction == \"Lactose-intolerant and Organic\") && (prods[i].lactoseFree == true && (prods[i].organic == true))){\n\t\t\tproduct_names.push([prods[i].name, prods[i].price]);\n\t\t}\n\t\telse if ((restriction == \"Nutallergy and Organic\") && (prods[i].organic == true && (prods[i].nutFree == true))){\n\t\t\tproduct_names.push([prods[i].name, prods[i].price]);\n\t\t}\n\t\telse if ((restriction == \"Lactose-intolerant\") && (prods[i].lactoseFree == true)){\n\t\t\tproduct_names.push([prods[i].name, prods[i].price]);\n\t\t}\n\t\telse if ((restriction == \"Nutallergy\") && (prods[i].nutFree == true)){\n\t\t\tproduct_names.push([prods[i].name, prods[i].price]);\n\t\t}\n\t\telse if (restriction == \"Organic\" && prods[i].organic==true){\n\t\t\tproduct_names.push([prods[i].name, prods[i].price]);\t\n\t\t}\n\t}*/\n\tif(restriction[\"None\"]==true){\n\t\tfor (let i=0; i<prods.length; i+=1) {\n\t\t\tproduct_names.push([prods[i].name, prods[i].price]);\t\n\t}}else{\n\t\tfor (let i=0; i<prods.length; i+=1) {\n\t\t\tconsole.log(restriction[\"Organic\"]+ \"==\"+ prods[i].organic+ \" \"+ restriction[\"Nutallergt\"]+ \"==\"+ prods[i].nutFree+ \" \"+ restriction[\"Lactose-intolerant\"]+ \"==\"+ prods[i].lactoseFree+ \" \");\n\t\t\tif((restriction[\"Organic\"]==prods[i].organic|| restriction[\"Organic\"]==false) &&(restriction[\"Nutallergy\"]==prods[i].nutFree|| restriction[\"Nutallergy\"]==false) && (restriction[\"Lactose-intolerant\"]==prods[i].lactoseFree|| restriction[\"Lactose-intolerant\"]==false)){\n\t\t\t\tproduct_names.push([prods[i].name, prods[i].price]);\t\n\t\t\t}\n\t\t}\n\t}\n\treturn product_names.sort(function([a,b], [c,d]){ // method taken from https://stackoverflow.com/a/50415269\n\t\treturn b-d;\n\t});;\n}", "function restrictListProducts(prods, lactose, nut, organic) {\n\tlet products = [];\n\n\tprods.sort(function(a, b){\n\t\t\treturn a.price - b.price;\n\t})\n\n\tfor (let i=0; i<prods.length; i+=1) {\n\t\tif (lactose && !prods[i].lactose) continue;\n\t\tif (nut && !prods[i].nutFree) continue;\n\t\tif (organic && !prods[i].organic) continue;\n\t\tproducts.push(prods[i]);\n\n\t}\n\treturn products;\n}", "pushOffensiveItem(offensiveItem) {\n if (offensiveItem instanceof Item) {\n if (this.offensive == null) { this.offensive = []; }\n this.offensive.push(offensiveItem);\n return true;\n }\n return false;\n }", "function restrictListProducts(prods, restriction) {\n\tlet product_names = [];\n\tfor (let i=0; i<prods.length; i+=1) {\n\t\tif ((restriction.includes(\"nutAllergy\")) && (restriction.includes(\"lactoseIntolerant\")) && (prods[i].lactoseIntolerant == true) && (prods[i].nutAllergy == true) && (prods[i].organic == false)){\n\t\t\tproduct_names.push(prods[i]);\n\t\t}\n\t\telse if ((restriction.includes(\"lactoseIntolerant\")) && !(restriction.includes(\"nutAllergy\")) && !(restriction.includes(\"organic\")) && (prods[i].lactoseIntolerant == true) && (prods[i].organic == false)){\n\t\t\tproduct_names.push(prods[i]);\n\t\t}\n\t\telse if ((restriction.includes(\"nutAllergy\")) && !(restriction.includes(\"lactoseIntolerant\")) && (prods[i].nutAllergy == true) && (prods[i].organic == false)){\n\t\t\tproduct_names.push(prods[i]);\n\t\t}\n\t\telse if ((restriction.includes(\"organic\")) && (prods[i].organic == true)){\n\t\t\tproduct_names.push(prods[i]); \n\t\t}\n\t\telse if (restriction.includes(\"none\")){\n\t\t\tproduct_names.push(prods[i]);\n\t\t}\n\t}\n\treturn product_names;\n}", "function restrictListProducts(prods, restriction) {\n\tlet product_names = [];\n\tfor (let i=0; i<prods.length; i+=1) {\n\t\tif ((restriction == \"Vegetarian\") && (prods[i].vegetarian == true)){\n\t\t\tproduct_names.push([prods[i].name,prods[i].price,prods[i].category,prods[i].img]);\n\t\t}\n\t\telse if ((restriction == \"GlutenFree\") && (prods[i].glutenFree == true)){\n\t\t\tproduct_names.push([prods[i].name,prods[i].price,prods[i].category,prods[i].img]);\n }\n else if ((restriction == \"Vegetarian&GlutenFree\") && (prods[i].vegetarian == true) && (prods[i].glutenFree == true)){\n\t\t\tproduct_names.push([prods[i].name,prods[i].price,prods[i].category,prods[i].img]);\n }\n else if ((restriction == \"Organic\") && (prods[i].Organic == true)){\n\t\t\tproduct_names.push([prods[i].name,prods[i].price,prods[i].category,prods[i].img]);\n }\n\t\telse if (restriction == \"None\"){\n\t\t\tproduct_names.push([prods[i].name,prods[i].price,prods[i].category,prods[i].img]);\n }\n else if (restriction == \"\"){\n\t\t\tproduct_names.push([prods[i].name,prods[i].price,prods[i].category,prods[i].img]);\n\t\t}\n }\n product_names.sort(compareSecondColumn);\n\treturn product_names;\n}", "function restrictListProducts(prods) {\r\n\tlet product_names = [];\r\n\tprods.sort((a,b) => a.price - b.price);\r\n\tfor (let i=0; i<prods.length; i+=1) {\r\n\t\tif (!(((document.getElementById(\"lactoseFree\").checked==true) && (prods[i].lactoseFree == false)) ||\r\n\t\t((document.getElementById(\"nutFree\").checked==true) && (prods[i].nutFree == false)) ||\r\n\t\t((document.getElementById(\"organic\").checked==true) && (prods[i].organic == false)) ))\r\n\t\t{\r\n\t\t\tproduct_names.push(prods[i].name)\r\n\t\t}\r\n\t}\r\n\r\n\treturn product_names;\r\n}", "checkNewCritterTargets (donations) { //confusing b/c critter.donations and donation message are objects with \"target\" \"amount\" \"total\"\n let targetA = donations[0].target;\n let targetB = donations[1].target;\n let newOrgA = true;\n let newOrgB = true;\n for (let org of this.donations) {\n if (org[\"target\"] == targetA) {\n newOrgA = false;\n }\n if (org[\"target\"] == targetB) {\n newOrgB = false;\n }\n }\n //new donation target\n if (newOrgA) {\n this.donations.push({\n target: targetA,\n funds: 0,\n link: null\n }) \n }\n if (newOrgB) {\n this.donations.push({\n target: targetB,\n funds: 0,\n link: null\n }) \n } \n if (newOrgA || newOrgB) {\n this.sortTargets();\n return true; //so ecosystem can emit fundsUpdate\n } else {\n return false;\n }\n }", "pushDefensiveItem(defensiveItem) {\n if (defensiveItem instanceof Item) {\n if (this.defensive == null) { this.defensive = []; }\n this.defensive.push(defensiveItem);\n return true;\n }\n return false;\n }", "validateOrder(_givenOrder, _preparedOrder) {\n _preparedOrder = _preparedOrder.sort((n1, n2) => n1 - n2); // Sorts both orders\n _givenOrder.ingredients = _givenOrder.ingredients.sort((n1, n2) => n1 - n2);\n KebapHouse.soldOrders++;\n for (let i = 0; i < _givenOrder.ingredients.length; i++) { // Checks if ingredients match\n if (_givenOrder.ingredients[i] != _preparedOrder[i]) {\n return false;\n }\n }\n return true;\n }", "function restrictListProducts(prods, restriction) {\n\tlet restrictedProduct = [];\n\tfor (let i=0; i<prods.length; i+=1) {\n\t\t//Vegetarian\n\t\tif ((restriction[0]) && (!prods[i].vegetarian)){\n\t\t\tcontinue;\n\t\t}\n\t\t//Gluten-Free\n\t\tif ((restriction[1]) && (!prods[i].glutenFree)){\n\t\t\tcontinue;\n\t\t}\n\t\t//organic\n\t\tif ((restriction[2]) && (!prods[i].organic)){\n\t\t\tcontinue;\n\t\t}\n\t\t//vegan \n\t\tif ((restriction[3]) && (!prods[i].vegan)){\n\t\t\tcontinue;\n\t\t}\n\t\t//dairy Free\n\t\tif ((restriction[4]) && (!prods[i].dairyF)){\n\t\t\tcontinue;\n\t\t}\n\t\trestrictedProduct.push(prods[i]);\n\t}\n\treturn restrictedProduct;\n}", "function restrictListProducts(prods, restriction) {\n\tlet product_names = [];\n\tvar checkBox1 = document.getElementById(\"lactoseF\");\n\tvar checkBox2 = document.getElementById(\"nutsF\");\n\tvar checkBox3 = document.getElementById(\"organique\");\n\tvar checkBox4 = document.getElementById(\"none\");\n\n\n\n\tfor (let i=0; i<prods.length; i+=1) {\n\t\t/*if ((document.querySelector(\".organiqueCB\").checked)&&(document.querySelector(\".pasDeNoix\").checked) && (document.querySelector(\".lactoseFreeCB\").checked)&& (prods[i].all == true)){\n\t\t\tproduct_names.push(prods[i].name);\n\n\t\t}*/\n\t\tif (checkBox1.checked==true && checkBox2.checked==true && checkBox3.checked==true && prods[i].all==true){\n\t\t\tproduct_names.push(prods[i].name);\n\t\t}\n\t\telse if(checkBox3.checked==true &&checkBox2.checked==true && prods[i].vegAndNut==true){\n\t\t\tproduct_names.push(prods[i].name);\n\t\t}\n\t\telse if (checkBox3.checked==true && checkBox1.checked==true && prods[i].vegAndGlu==true){\n\t\t\tproduct_names.push(prods[i].name);\n\t\t}\n\n\t\telse if (checkBox1.checked==true && checkBox2.checked==true && prods[i].nutAndGlu==true){\n\t\t\tproduct_names.push(prods[i].name);\n\t\t}\n\t\telse if(checkBox1.checked==true && checkBox2.checked==false && checkBox3.checked==false && prods[i].glutenFree==true ){\n\t\t\tproduct_names.push(prods[i].name);\n\t\t}\n\t\telse if(checkBox2.checked==true && checkBox1.checked==false && checkBox3.checked==false && prods[i].no_nuts==true){\n\t\t\tproduct_names.push(prods[i].name);\n\n\t\t}\n\t\telse if (checkBox3.checked==true && checkBox1.checked==false&&checkBox2.checked==false && prods[i].vegetarian==true){\n\t\t\tproduct_names.push(prods[i].name);\n\n\t\t\n\t\t}\n\t\telse if (checkBox4.checked==true){\n\t\t\t\n\t\t\tproduct_names.push(prods[i].name);\n\t\t\t\n\t\t\t\n\t\t}\n\t\t/*if (checkBox1.checked==false && checkBox2.checked==false && checkBox3.checked==false && (prods[i].vegetarian==true || prods[i].glutenFree==true || prods[i].no_nuts==true)){\n\t\t\tproduct_names.push(prods[i].name);\n\t\t}\n\n\t\t/*else if ((document.querySelector(\".organiqueCB\").checked)&& (prods[i].vegetarian == true)){\n\n\t\t\tif ((document.querySelector(\".lactoseFreeCB\").checked) && (prods[i].glutenFree == true)){\n\t\t\t\tproduct_names.push(prods[i].name);\n\t\t\t}\n\t\t\telse if ((restriction == \"pasDeNoix\")&& (prods[i].no_nuts == true)){\n\t\t\t\tproduct_names.push(prods[i].name);\n\t\t\t}else{\n\t\t\tproduct_names.push(prods[i].name);}\n\t\t}\n\t\telse if ((document.querySelector(\".lactoseFreeCB\").checked) && (prods[i].glutenFree == true)){\n\t\t\tif ((restriction == \"pasDeNoix\")&& (prods[i].no_nuts == true)){\n\t\t\t\tproduct_names.push(prods[i].name);\n\t\t\t}else{\n\t\t\t\tproduct_names.push(prods[i].name);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t/*else if ((restriction == \"pasDeNoix\")&& (prods[i].no_nuts == true)){\n\t\t\tproduct_names.push(prods[i].name);\n\t\t}\n\t\t\n\t\telse if ((restriction == \"none\")){\n\t\t\tproduct_names.push(prods[i].name);\n\t\t}*/\n\t\t\n\t}\n\treturn product_names;\n}", "function restrictListProducts(prods, restriction) {\n\tlet product_names = [];\n\tfor (let i=0; i<prods.length; i+=1) {\n\t\tif ((restriction == \"lactose\") &&(prods[i].LactoseFree == true)){\n\t\t\tproduct_names.push(prods[i]);\n\t\t}\n\t\telse if ((restriction == \"noix\") && (prods[i].noixfree == true)){\n\t\t\tproduct_names.push(prods[i]);\n\t\t}\n\t\telse if ((restriction == \"vegetarian\")&& (prods[i].vegetarian == true)){\n\t\t\tproduct_names.push(prods[i]);\n\t\t}\n\t\telse if ((restriction == \"gluten\") && (prods[i].glutenFree == true)){\n\t\t\tproduct_names.push(prods[i]);\n\t\t}\n\t\telse if ((restriction == \"jus\") && (prods[i].type == \"jus\")){\n\t\t product_names.push(prods[i]);\n\t\t}\n\t\telse if ((restriction == \"legume\") && (prods[i].type == \"legume\")){\n\t\t product_names.push(prods[i]);\n\t\t}\n\t\telse if ((restriction == \"fruit\") && (prods[i].type == \"fruit\")){\n\t\t product_names.push(prods[i]);\n\t\t}\n\t\telse if ((restriction == \"laitier\") && (prods[i].type == \"laitier\")){\n\t\t product_names.push(prods[i]);\n\t\t}\n\t\telse if ((restriction == \"orga\") && (prods[i].organic == true)){\n\t\t product_names.push(prods[i]);\n\t\t}\n\n\n\t}\n\n\tvar sorted = product_names.sort((a, b) => a.price - b.price);\n\treturn sorted;\n}", "static getManufactuer(arrayManu, clothesCollection) {\n for (let i = 0; i < clothesCollection.length; i++) {\n if (!arrayManu.includes(clothesCollection[i].manufacturer)) {\n arrayManu.push(clothesCollection[i].manufacturer);\n }\n }\n }", "function restrictListProducts(prods, restriction) {\n\tlet product_names = [];\n\tfor (let i=0; i<prods.length; i+=1) {\n\t\t\tproduct_names.push(prods[i]);\n\t\t}\n\n\t\t\t\n\tlet lactoseFree = document.getElementById(\"lactoseIntolerant\");\n\t\n\tlet Nut = document.getElementById(\"nutFree\");\n\n\tlet isOrganic = document.getElementById(\"organic\");\n\n\tlet isHealthy = document.getElementById(\"healthy\");\n\n\tlet goodForWeightLoss = document.getElementById(\"weightLoss\");\n\n\n\tif(lactoseFree.checked) {\n\t\tproduct_names = product_names.filter(product_names => product_names.lactoseIntolerant);\n\n\t}\n\n\tif(Nut.checked) {\n\t\tproduct_names = product_names.filter(product_names => product_names.nutFree);\n\n\t}\n\n\tif(isOrganic.checked) {\n\t\tproduct_names = product_names.filter(product_names => product_names.organic);\n\n\t}\n\n\tif(isHealthy.checked) {\n\t\tproduct_names = product_names.filter(product_names => product_names.healthy);\n\n\t}\n\n\tif(goodForWeightLoss.checked) {\n\t\tproduct_names = product_names.filter(product_names => product_names.weightLoss);\n\n\t}\n\n\t\t\t\n\t// Sort the array by price so that the items show in price order\n\n\tproduct_names.sort(function(a, b){\n\t\treturn a.price - b.price\n\t});\n\t\n\n\t\n\treturn product_names;\n}", "function restrictListProducts(prods, restriction) {\r\n\tlet product_names = [];\r\n\tfor (let i=0; i<prods.length; i+=1) {\r\n\t\tprods.sort(function(a, b){return a.price - b.price}); //sort product list by price\r\n\t\tif ((restriction == \"Lactose\") && (prods[i].lactoseF == true)){\r\n\t\t\tproduct_names.push(prods[i].name);\r\n\t\t}\r\n\t\telse if ((restriction == \"Nuts\") && (prods[i].nutsF == true)){\r\n\t\t\tproduct_names.push(prods[i].name);\r\n\t\t}\r\n\t\telse if ((restriction == \"Organic\") && (prods[i].org == true)){\r\n\t\t\tproduct_names.push(prods[i].name);\r\n\t\t}\r\n\t\telse if (restriction == \"None\"){\r\n\t\t\tproduct_names.push(prods[i].name);\r\n\t\t}\r\n\t}\r\n\treturn product_names;\r\n}", "function allPremium(shoppingCart) {\n const premiumProducts = filterPremiumProducts(shoppingCart);\n if (premiumProducts.length == shoppingCart.length) {\n console.log(\"Pedidos sin gastos de envio\")\n }\n}", "function catalogFind(){\n var catalog=returnCatalog(\"item\");\n // console.log(catalog);\n if(catalog != null){\n productArray = processArray(catalog,1);\n nowArray = productArray;\n // console.log(productArray);\n getSortMethod(nowArray);\n updateBrandAmount();\n changeDisplayAmount(displayType,1);\n }\n}", "verProductos() {\n if (productosArray.length < 1) return false;\n return productosArray;\n }", "function updateOccupancy(raddec, isDisappearance) {\n let isOccupant = raddec.transmitterId.startsWith(\"ac233fa\");\n if(isOccupant) {\n if(!isDisappearance) {\n if(!presenceArray.includes(raddec.transmitterId)) {\n presenceArray.push(raddec.transmitterId);\n occupancyCount.textContent = presenceArray.length;\n }\n } \n else {\n if(presenceArray.includes(raddec.transmitterId)) {\n presenceArray.splice(presenceArray.indexOf(raddec.transmitterId), 1);\n occupancyCount.textContent = presenceArray.length;\n }\n }\n }\n\n return presenceArray.length;\n}", "function prerequisiteNotCategory()\n {\n items.each(function() {\n //get item prerequisites\n var prerequisites = $(this).data(\"prerequisites\").toString();\n\n //if item has prerequisites, check it's not a category\n if(prerequisites.length !== 0) {\n var prerequisitesArray = prerequisites.split(\",\");\n\n //check each prerequisite\n for(var i = 0; i < prerequisitesArray.length; i++) {\n var requiredItem = container.find(\"[data-name='\" + prerequisitesArray[i] + \"']\");\n\n //check prerequisite isn't a category\n if(requiredItem.hasClass(\"category\")) {\n console.error(\"Item '\" + $(this).data(\"name\") + \"' has prerequisite which is a category '\" + prerequisitesArray[i] + \"'\");\n }\n }\n }\n });\n }", "function add(animals, animal){ //checks if the animal to be added is\n if(animal.name && animal.species){ // valid and not already in the array\n for(let i = 0; i < animals.length; i++){\n if(animals[i].name === animal.name){\n return true;\n }else if(i === animals.length - 1){ //only adds if the loop \n animals.push(animal); //makes it to the end of the array\n } \n }\n }\n}", "function dietCheck() {\n for (var i = 0; i < recipes.length(); i++) {\n var dietMatchCheck = ingredientsCompare(recipes[i].ingredients.toUpperCase(), restrictions.toUpperCase());\n if (dietMatchCheck == false) {\n recipes.push[recipes[i]];\n }\n }\n}", "function addCatalogueArray(key){\n\t\n\tvar catalogueArray = getCatalogueArray();\n\t\n\tif(catalogueArray.includes(key)){ //Check if already registered\n\t\talert(\"This course is already in the catalogue.\")\n\t\treturn false;\n\t}\n\telse{\n\t\tcatalogueArray.push(key);\n\t\tlocalStorage.setItem(\"catalogueArray\", JSON.stringify(catalogueArray));\n\t\treturn true;\n\t}\n}", "static cleanseReferralList(referrals,minimumPortion,keyName,valueName){\n if (referrals.length < 1){\n return [];\n }\n if(minimumPortion == undefined){\n // exclude none if minimumPortion is not set\n minimumPortion = -1;\n }\n if(keyName == undefined){\n keyName = \"label\"\n }\n if(valueName == undefined){\n valueName = \"value\"\n }\n let o = {}\n o[keyName] = 'Other';\n o[valueName] = 0\n referrals.push(o)\n // find total of all values\n let total = 0;\n for(let referrer of referrals){\n total+= referrer[valueName]\n }\n // create a pointer to shorten names\n let excludes = analyticsFrontendEngine.excludeReferrals;\n // subtract 2 so we don't loop over the 'Other' element\n for(let i=referrals.length-2;i>=0;i--){\n // if .[keyName] is in the excludes list then remove it from the array\n for(let j=0;j<excludes.length;j++){\n if(referrals[i][keyName].search(excludes[j]) > -1){\n referrals.splice(i,1)\n }\n }\n // check that the value is above the minimum requirement\n if(referrals[i][valueName] / total < minimumPortion/100){\n // the last element is Other, so add the value to it\n referrals[referrals.length-1][valueName]+=referrals[i][valueName]\n // remove the item\n referrals.splice(i,1)\n }\n }\n // since the last element will always be the other element we appended at the beginning, we can check it by accesing\n // the last element of the array. Remove it if its value is zero\n if(referrals[referrals.length-1][valueName] == 0){\n referrals.splice(referrals.length-1,1)\n }\n // place the `other` item in sorted order, since this list is sorted\n let other = referrals.pop(referrals.length-1)\n let i = referrals.length-1;\n if (i<0){\n referrals.splice(i+1,0,other)\n return referrals;\n }\n while(i >=0 && other[valueName] > referrals[i][valueName]){\n i--\n }\n referrals.splice(i+1,0,other)\n return referrals;\n }", "function handleAllItem(arr) {\n for(var i=0; i<arr.length; i++){\n productObject.wholeList.push(handleItem(arr[i]));\n if(handleItem(arr[i]).hasClass('available')){\n productObject.availableList.push(handleItem(arr[i]));\n }else{\n productObject.unavailableList.push(handleItem(arr[i]));\n }\n }\n $('.listContainer').append(productObject.availableList, productObject.unavailableList);\n}", "function ProductCheck(arr){\n\tvar returnStr = '';\n\tfor (var i = 0; i < arr.length; i++)\n\t{\n\t\t\tif (typeof(cnnSectionName) == \"undefined\")\n\t\t\t{\n\t\t\t\treturnStr += \";\"+arr[i]+\";;;event1=1;\"\n\t\t\t\ts.events= \"event1\";\n\t\t\t\tif(i != arr.length-1)\n\t\t\t\t{\n\t\t\t\treturnStr += ',';\n\t\t\t\t}\n\t\t\t} else \n\t\t\t{\n\t\t\t\treturnStr += \";\"+arr[i]+\";;;event1=1;evar23=\"+cnnSectionName;\n\t\t\t\ts.events= \"event1\";\n\t\t\t\tif(i != arr.length-1)\n\t\t\t\t{\n\t\t\t\treturnStr += ',';\n\t\t\t\t}\n\t\t\t}\n\t}\n\ts.products = returnStr;\n}", "function processArray(catalog,item){\n var tempArray = new Array();\n // console.log(productArray.length);\n for(var i1=0;i1<productArray.length;i1++){\n if(productArray[i1][item]==catalog){\n //write productArray\n tempArray.push(productArray[i1]);\n }else if(catalog==\"all\"){\n //console.log(productArray);\n return productArray;\n }\n }\n if(tempArray.length == 0){\n // console.log(\"no result\");\n return 0;\n }else{\n return tempArray;\n }\n}", "function shortProduct(cat, arr) {\n if(cat ===\"all\") {\n return arr;\n } \n return arr.filter(item => {\n if(checkGate(item.categories, cat)) {\n return item;\n }\n })\n}", "function orderAVegetarianDish(arr){\nvar z=filter(arr,function(element){\n\treturn element.mealPreferences===\"vegetarian\"\n})\nif(z.length!==0)return true\nreturn false\n\n}", "placeOrder(order) {\n //init empty return list\n this.returnList = [];\n //iterate over each pizza in the order\n for( let i = 0; i < order.itemList.length; i++){\n //console.log(order.itemList[i]);\n //if the store has enough ingredients to make the pizza\n if( this.haveEnough(order.itemList[i])){\n //console.log(order.itemList[i]);\n this.returnList.push(order.itemList[i]);\n }\n }\n return( this.returnList );\n }", "function restrictListProducts(prods, restriction) {\n\tlet product_names = [];\n\tfor (let i=0; i<prods.length; i+=1) {\n\t\tif ((restriction == \"NutFree\") && (prods[i].nutfree == true)){\n\t\t\tproduct_names.push(prods[i].name);\n\t\t}\n\t\telse if ((restriction == \"LactoseFree\") && (prods[i].lactosefree == true)){\n\t\t\tproduct_names.push(prods[i].name);\n\t\t}\n\t\telse if ((restriction == \"Include Baby supplies\") && (prods[i].babysupplies == true)){\n\t\t\tproduct_names.push(prods[i].name);\n\t\t}\n\t\telse if ((restriction == \"Include carrot\") && (prods[i].lactosefree == true)){\n\t\t\tproduct_names.push(prods[i].name);\n\t\t}\n\n\t\telse if (restriction == \"None\"){\n\t\t\tproduct_names.push(prods[i].name);\n\t\t}\n\t}\n\treturn product_names;\n}", "ballot_filtered_unsupported_candidates () {\n return this.ballot.map( item =>{\n let is_office = item.kind_of_ballot_item === \"OFFICE\";\n return is_office ? this.filtered_ballot_item(item) : item;\n });\n }", "function samefromclose(InsData, prgData){\n \n var arrcollectContact = [];\n if (typeof(InsData) != 'undefined'){\n for (items in CardDataModel){\n if (CardDataModel[items]. installation == InsData){\n for (prgsitems in prgData){\n if (CardDataModel[items].programs == prgData[prgsitems]){\n arrcollectContact.push(CardDataModel[items].contact)\n }\n } \n }\n }\n }\n \n if (typeof(InsData) == 'undefined' || (InsData === '')) {\n \n for (prgsitems in prgData){\n if (prgData[prgsitems] == 'ALL'){\n arrcollectContact = ['Belvoir Auto', 'Bragg Dental', 'Campbell Auto', 'Campbell Dental']\n }\n else if (prgData[prgsitems] == 'Auto'){\n arrcollectContact = ['Belvoir Auto' , 'Campbell Auto']\n }\n else if (prgData[prgsitems] == 'Dental'){\n arrcollectContact = ['Bragg Dental' , 'Campell Dental']\n }\n } \n }\n $scope.setContacts = arrcollectContact;\n \n }", "function test_existanceAvenant_moe (item,suppression)\n { \n if (suppression!=1)\n {\n var pass = vm.allavenant_moe.filter(function(obj)\n {\n return obj.id == currentItemAvenant_moe.id;\n });\n if(pass[0])\n {\n if((pass[0].description != currentItemAvenant_moe.description )\n || (pass[0].montant != currentItemAvenant_moe.montant)\n || (pass[0].date_signature != currentItemAvenant_moe.date_signature )) \n { \n insert_in_baseAvenant_moe(item,suppression);\n }\n else\n { \n item.$selected = true;\n item.$edit = false;\n }\n }\n } else\n insert_in_baseAvenant_moe(item,suppression);\n }", "function test_existanceAvenant_moe (item,suppression)\n { \n if (suppression!=1)\n {\n var pass = vm.allavenant_moe.filter(function(obj)\n {\n return obj.id == currentItemAvenant_moe.id;\n });\n if(pass[0])\n {\n if((pass[0].description != currentItemAvenant_moe.description )\n || (pass[0].montant != currentItemAvenant_moe.montant)\n || (pass[0].date_signature != currentItemAvenant_moe.date_signature )) \n { \n insert_in_baseAvenant_moe(item,suppression);\n }\n else\n { \n item.$selected = true;\n item.$edit = false;\n }\n }\n } else\n insert_in_baseAvenant_moe(item,suppression);\n }", "shouldRemoveExtraLicences() {\n this.selectedAddonLicences =\n this.selectedPlan.getMaxLicenses() - this.selectedPlan.getLicences();\n this.availableUserLicencesToBe =\n this.selectedProject.selectedPlan.getLicences() -\n this.selectedPlan.getLicences() +\n max([0, this.getAdditionalLicencesCount() - this.selectedAddonLicences]);\n\n return this.getNumberOfUsersToRemove() > 0;\n }", "function addSecurity(flareData, holding) {\n var subName = holding.sub_industry_name;\n if (flareData.name === subName) {\n flareData.children = flareData.children || [];\n flareData.sector_id = holding.sector_id;\n flareData.children.push(holding); // add child if name matches\n return true;\n }\n if (!flareData.children) {\n return false; // unexpected structure\n }\n flareData.children.forEach(\n function (kid) {\n if (addSecurity(kid, holding)) {\n kid.sector_id = holding.sector_id;\n return true;\n }\n }\n );\n return false;\n }", "function addAllergenRequirements() {\n if ($('#glutenFree').is(':checked')) {\n var glutenFree = \"393^Gluten-Free\"\n allergenArray.push(glutenFree)\n }\n if ($('#peanutFree').is(':checked')) {\n var peanutFree = \"394^Peanut-free\"\n allergenArray.push(peanutFree)\n }\n if ($('#dairyFree').is(':checked')) {\n var dairyFree = \"396^Dairy-Free\"\n allergenArray.push(dairyFree)\n }\n if ($('#treeNutFree').is(':checked')) {\n var treeNutFree = \"395^Tree Nut-Free\"\n allergenArray.push(treeNutFree)\n }\n if ($('#wheatFree').is(':checked')) {\n var wheatFree = \"392^Wheat-Free\"\n allergenArray.push(wheatFree)\n }\n if ($('#eggFree').is(':checked')) {\n var eggFree = \"397^Egg-Free\"\n allergenArray.push(eggFree)\n }\n if ($('#sesameFree').is(':checked')) {\n var sesameFree = \"399^Sesame-Free\"\n allergenArray.push(sesameFree)\n }\n if ($('#seafoodFree').is(':checked')) {\n var seafoodFree = \"398^Seafood-Free\"\n allergenArray.push(seafoodFree)\n }\n console.log(\"Allergen Array: \", allergenArray);\n }", "isAddressExists() {\n const splitEntries = [];\n this.existingSavedAddresses = [];\n this.allEntries.map((entry) => {\n if (entry.splitEntries && entry.splitEntries.length === 0) {\n this.isNewProductAdded = true;\n this.isEditable = true;\n }\n });\n for (let i = 0; i < this.visibleEntries.length; i += 1) {\n if (\n this.isNewProductAdded &&\n this.visibleEntries[0] &&\n this.visibleEntries[0].splitEntries &&\n this.visibleEntries[0].splitEntries.length !== 0 &&\n this.visibleEntries[0].splitEntries[0] &&\n this.visibleEntries[0].splitEntries[0].deliveryAddress\n ) {\n const addressToBePopulated = {\n label: this.$refs.singleShipping.formAddressString(\n this.visibleEntries[0].splitEntries[0].deliveryAddress,\n ),\n value: this.visibleEntries[0].splitEntries[0].deliveryAddress,\n };\n this.$refs.singleShipping.selectedAddress(addressToBePopulated);\n this.$refs.singleShipping.populateStoredAddress();\n break;\n }\n for (\n let k = 0; k < this.visibleEntries[i].splitEntries.length; k += 1\n ) {\n splitEntries.push(this.visibleEntries[i].splitEntries[k]);\n }\n }\n if (splitEntries.length === 0) {\n this.isEditable = true;\n } else if (!this.isNewProductAdded) {\n for (let j = 0; j < splitEntries.length; j += 1) {\n this.existingSavedAddresses.push(splitEntries[j].deliveryAddress);\n }\n this.existingSavedAddresses = _.uniqBy(\n this.existingSavedAddresses,\n 'id',\n );\n this.$refs.singleShipping.showExistingAddresses(\n this.existingSavedAddresses,\n );\n }\n this.loadedflag = false;\n }", "function test_existancePolice_assurance (item,suppression)\n { \n if (suppression!=1)\n {\n var mem = vm.allpolice_assurance.filter(function(obj)\n {\n return obj.id == currentItemPolice_assurance.id;\n });\n if(mem[0])\n {\n if((mem[0].description != currentItemPolice_assurance.description )\n //||(mem[0].fichier != currentItemPolice_assurance.fichier )\n ||(mem[0].date_expiration != currentItemPolice_assurance.date_expiration )\n ||(mem[0].observation != currentItemPolice_assurance.observation )) \n { \n insert_in_basePolice_assurance(item,suppression);\n }\n else\n { \n item.$selected = true;\n item.$edit = false;\n }\n }\n } else\n insert_in_basePolice_assurance(item,suppression);\n }", "function test_existancePolice_assurance (item,suppression)\n { \n if (suppression!=1)\n {\n var mem = vm.allpolice_assurance.filter(function(obj)\n {\n return obj.id == currentItemPolice_assurance.id;\n });\n if(mem[0])\n {\n if((mem[0].description != currentItemPolice_assurance.description )\n //||(mem[0].fichier != currentItemPolice_assurance.fichier )\n ||(mem[0].date_expiration != currentItemPolice_assurance.date_expiration )\n ||(mem[0].observation != currentItemPolice_assurance.observation )) \n { \n insert_in_basePolice_assurance(item,suppression);\n }\n else\n { \n item.$selected = true;\n item.$edit = false;\n }\n }\n } else\n insert_in_basePolice_assurance(item,suppression);\n }", "static async _checkProductsAvailInStock(cart) {\n let invalid = '';\n const tempCart = (typeof cart !== 'object' ? cart.toObject() : cart);\n\n await ItemProductController._addProductsForSingleOrder(tempCart);\n _.each(tempCart.items, (item) => {\n // invalid sku\n if (!item.product) {\n invalid = item.sku;\n return false;\n }\n\n // if item is a product\n if (item.product.sku === item.sku) {\n if (item.count > item.product.stock_qty) {\n invalid = item.sku;\n return false;\n }\n\n return;\n }\n\n // if item is a product variation\n _.each(item.product.variations, (variation) => {\n if (variation.sku === item.sku) {\n if (item.count > variation.stock_qty) {\n invalid = item.sku;\n }\n\n return false;\n }\n });\n\n if (invalid !== '') {\n return false;\n }\n });\n\n return invalid;\n }", "function parkCar(carName){\n // push this new car into the parkedCars array\n if(parkedCars.length < maxCars){\n console.log('You can park here ');\n parkedCars.push(carName);\n return true;\n }//end of space to park\n else{\n console.log('no space to park your:', carName);\n return false;\n }//end no space to park\n}//end of parkCar", "function orderSetProcessed(){\n\ttry{\n\n\t\t\n\t}catch(e){\n\t}\n}", "function test_existanceAvenant_partenaire (item,suppression)\n { \n if (suppression!=1)\n {\n var pass = vm.allavenant_partenaire.filter(function(obj)\n {\n return obj.id == currentItemAvenant_partenaire.id;\n });\n if(pass[0])\n {\n if((pass[0].description != currentItemAvenant_partenaire.description )\n || (pass[0].montant != currentItemAvenant_partenaire.montant)\n || (pass[0].date_signature != currentItemAvenant_partenaire.date_signature )) \n { \n insert_in_baseAvenant_partenaire(item,suppression);\n }\n else\n { \n item.$selected = true;\n item.$edit = false;\n }\n }\n } else\n insert_in_baseAvenant_partenaire(item,suppression);\n }", "function test_existanceAvenant_partenaire (item,suppression)\n { \n if (suppression!=1)\n {\n var pass = vm.allavenant_partenaire.filter(function(obj)\n {\n return obj.id == currentItemAvenant_partenaire.id;\n });\n if(pass[0])\n {\n if((pass[0].description != currentItemAvenant_partenaire.description )\n || (pass[0].montant != currentItemAvenant_partenaire.montant)\n || (pass[0].date_signature != currentItemAvenant_partenaire.date_signature )) \n { \n insert_in_baseAvenant_partenaire(item,suppression);\n }\n else\n { \n item.$selected = true;\n item.$edit = false;\n }\n }\n } else\n insert_in_baseAvenant_partenaire(item,suppression);\n }", "function checkOrganization(organizations) {\n let wrongOrganizations = []\n for (var {\n dataValues: { is_active: activeOrganization },\n } of organizations)\n if (!activeOrganization) return false\n\n return true\n}", "function addProductToStorage(product){\r\n if(cartItems.length !== 0){\r\n\r\n console.log(cartItems);\r\n console.log(product);\r\n let found = cartItems.some(item => item.id === product.id);\r\n\r\n console.log(found);\r\n\r\n if(!found){\r\n cartItems.push(product);\r\n }else{\r\n cartItems.forEach(function(item){\r\n if(item.id === product.id){\r\n item.quantity += product.quantity;\r\n item.price += product.price;\r\n }\r\n \r\n });\r\n }\r\n \r\n }else{\r\n cartItems.push(product);\r\n }\r\n \r\n}", "function checkArrayAndPushData(mainArr, arrTmp, data) {\n if (typeof arrTmp !== 'undefined' && arrTmp.length > 0) {\n mainArr.push(data);\n }\n}", "function collectArr() {\n checkedArr = {\n id: arrId,\n material: materialCheck,\n size: sizeCheck,\n price: materialCheckPrice*(sizeCheck/100),\n }\n}", "function restrictListProducts(prods, restriction) {\n\tlet product_names = [];\n\tfor (let i=0; i<prods.length; i+=1) {\n\t\tif(restriction==\"None\"){\n\t\t\tproduct_names.push({name:prods[i].name, price:prods[i].price});\n\t\t}else if(prods[i][restriction]){\n\t\t\tproduct_names.push({name:prods[i].name, price:prods[i].price});\n\t\t}\n\t}\n\tproduct_names.sort((a,b)=>{return a.price - b.price;});\n\treturn product_names;\n}", "_isReassignmentNeeded (productDraft, skuToProductMap) {\n const productSet = new Set()\n const productDraftSkus = this.productService.getProductDraftSkus(productDraft)\n productDraftSkus.forEach((sku) => {\n const product = skuToProductMap.get(sku)\n if (product)\n productSet.add(product)\n })\n if (productSet.size === 0) {\n // check for product matches by slug\n const products = Array.from(skuToProductMap.values())\n this._selectMatchingProductsBySlug(products, productDraft)\n .forEach(p => productSet.add(p))\n }\n if (productSet.size === 0)\n // new product from the product draft\n return false\n else if (productSet.size === 1) {\n // check if CTP product have exact SKU match with product draft\n const product = productSet.values().next().value\n const draftSkus = this.productService.getProductDraftSkus(productDraft)\n const productSkus = this.productService.getProductSkus(product)\n if (_.isEqual(draftSkus.sort(), productSkus.sort())) {\n // variants are assigned correctly, maybe we need to change product type\n const productTypeId = product.productType.id\n const productDraftTypeId = productDraft.productType.id\n if (productTypeId === productDraftTypeId)\n // product type are correct, check if product slugs are unique\n return !_.isEqual(product.masterData.staged.slug, productDraft.slug)\n }\n }\n return true\n }", "function loadProductComparisonCriteria() {\n $rootScope.local_load = true;\n metaService.getSingleProduct($scope.product_uid,(product)=>{\n $scope.product = product;\n if(product.comparisons){\n $scope.comparison_keys = Object.keys($scope.product.comparisons);\n $scope.comparison_count = $scope.comparison_keys.length;\n \n $scope.compare_insurance_types = [];\n \n $scope.tree = {\n general: {[product.insurance_type]: {}},\n specific: {},\n additional: {}\n };\n \n $scope.obsolete_criteria = {};\n \n //iterate offer comparisons\n $scope.comparison_keys.forEach(comparison_key => {\n const comparison = product.comparisons[comparison_key];\n \n //iterate comparison insurance types\n for (let insurance_type_key in comparison.insurance_types) {\n if (comparison.insurance_types.hasOwnProperty(insurance_type_key)) {\n const insurance_type = comparison.insurance_types[insurance_type_key];\n \n if (typeof insurance_type === 'object') { //Dev.purposes mostly: we don't expect this to be false in real life\n \n /**\n * General\n */\n \n if (insurance_type_key === product.insurance_type) { //Check if this is a general insurance type\n for (let key in insurance_type.general) { //Go through general insurance types (body, financial, property)\n if (insurance_type.general.hasOwnProperty(key)) {\n if (!$scope.tree.general[insurance_type_key][key]) \n $scope.tree.general[insurance_type_key][key] = {};\n $scope.tree.general[insurance_type_key][key][comparison_key] = insurance_type.general[key];\n }\n }\n }\n } //if (typeof insurance_type === 'object')\n } //if (comparison.insurance_types.hasOwnProperty(insurance_type_key))\n }\n });\n isComparisionCriteriaValid();\n }\n });\n}", "allTerritoriesClaimed(){\r\n let claimedCount = 0;\r\n Object.keys(this.mapGrid.hashOfTiles).forEach( pointer => {\r\n let tile = this.mapGrid.hashOfTiles[pointer];\r\n if (tile.status === true){\r\n claimedCount += 1;\r\n }\r\n })\r\n \r\n if (claimedCount === this.mapGrid.size - 6){\r\n this.claimTerritoryPhase = false; // this will NOT be REACTIVATED\r\n this.initialPlacementPhase = true; \r\n } \r\n }", "function addToCart() {\n let cartAr = [];\n for (let i = 0; i < itemsAr.length; i++) {\n itemsAr[i].howMany();\n if (itemsAr[i].quantity > 0) {\n cartAr.push(itemsAr[i]);\n cartAr = Array.from(new Set(cartAr));\n }\n }\n return cartAr;\n}", "function test_existanceContrat_moe (item,suppression)\n { \n if (suppression!=1)\n {\n var pass = vm.allcontrat_moe.filter(function(obj)\n {\n return obj.id == currentItemContrat_moe.id;\n });\n if(pass[0])\n {\n if((pass[0].intitule != currentItemContrat_moe.intitule )\n || (pass[0].ref_contrat != currentItemContrat_moe.ref_contrat)\n || (pass[0].montant_contrat != currentItemContrat_moe.montant_contrat ) \n || (pass[0].date_signature != currentItemContrat_moe.date_signature ) \n || (pass[0].id_moe != currentItemContrat_moe.id_moe )) \n { \n insert_in_baseContrat_moe(item,suppression);\n }\n else\n { \n item.$selected = true;\n item.$edit = false;\n }\n }\n } else\n insert_in_baseContrat_moe(item,suppression);\n }", "function test_existanceContrat_moe (item,suppression)\n { \n if (suppression!=1)\n {\n var pass = vm.allcontrat_moe.filter(function(obj)\n {\n return obj.id == currentItemContrat_moe.id;\n });\n if(pass[0])\n {\n if((pass[0].intitule != currentItemContrat_moe.intitule )\n || (pass[0].ref_contrat != currentItemContrat_moe.ref_contrat)\n || (pass[0].montant_contrat != currentItemContrat_moe.montant_contrat ) \n || (pass[0].date_signature != currentItemContrat_moe.date_signature ) \n || (pass[0].id_moe != currentItemContrat_moe.id_moe )) \n { \n insert_in_baseContrat_moe(item,suppression);\n }\n else\n { \n item.$selected = true;\n item.$edit = false;\n }\n }\n } else\n insert_in_baseContrat_moe(item,suppression);\n }", "function noItenCarrito () {\n let itenVacio = false;\n for (i = 0; i < carrito.length; i++) {\n itenVacio = itenVacio || carrito[i].premium === true;\n } \n if (!itenVacio){\n noItem();\n printPriceCart();\n }\n}", "function addToCateg () {\n\n\t\tfor(var i=0;i<whichCateg;i++){\n\t\t\tif(cathegory == Object.getOwnPropertyNames(categ.categName)[i])\n\t\t\t\t{console.log(\"this is working BUT\");\n\t\t\t\t\tconsole.log(\"cathegory \" + cathegory);\n\t\t\t\t\t// BUT CANT AUTOMATED////////\n\t\t\t\t\tObject.keys(categ.categName[cathegory].push(Name));\t\n\t\t\t\t}\n\t\t}\n\t}", "function categoryCheck(formArray, data) {\n if (formArray) {\n //WHEN THE USER ADDS A NEW TODO W/ CATEGORY THIS HAPPENS:\n for (let i = 0; i < data.length; i++) {\n for (let j = 0; j < data[i].length; j++) {\n if (data[i].includes(...formArray)) { break }\n if (data[i][j].category.toLowerCase() === formArray[0].category.toLowerCase()) {\n data[i].push(...formArray);\n fetch('https://todo-app-wyatt.herokuapp.com/initialTodos', {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify(...formArray)\n })\n }\n }\n }\n let categorized = [];\n data.forEach(arr => {\n let filtering = arr.filter(todo => todo.category.toLowerCase() === formArray[0].category.toLowerCase());\n if (filtering.length > 0) {\n categorized.push(filtering)\n }\n })\n console.log(categorized)\n if (categorized.length === 0) {\n data.push(formArray);\n fetch('https://todo-app-wyatt.herokuapp.com/initialTodos', {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify(...formArray)\n })\n }\n }\n\n //WHEN THE APP FIRST STARTS THIS HAPPENS:\n let combinedCategories = data.map(arr => {\n if (arr.length > 0) {\n return createCategories(arr)\n }\n })\n\n categoryList.innerHTML = [...combinedCategories]\n return categoryList.innerHTML.replace(/,/g, '')\n}", "function buildgoodlist()\n{\n\n // This list is used to control which programs will be placed on the visible tab\n // var outer_tabs = menu_structure.OuterTabs;\n var count = 0 ; \n\n for ( outer_tab in menu_structure.OuterTabs)\n {\n if (menu_structure.OuterTabs.hasOwnProperty(outer_tab))\n {\n if ((nawtylist.indexOf(menu_structure.OuterTabs[outer_tab].DisplayText) == -1 )&&(menu_structure.OuterTabs[outer_tab].DisplayText != undefined))\n {\n gudlist_programs[count] = outer_tab;\n count ++;\n\n }\n }\n\n }\n\n}", "function getThreeProducts() {\n const doNotUse = [leftProduct, centerProduct, rightProduct];\n while (doNotUse.includes(leftProduct)) {\n let leftIndex = Math.floor(Math.random() * Product.allProducts.length);\n leftProduct = Product.allProducts[leftIndex];\n }\n doNotUse.push(leftProduct)\n\n while (doNotUse.includes(centerProduct)) {\n let centerIndex = Math.floor(Math.random() * Product.allProducts.length);\n centerProduct = Product.allProducts[centerIndex];\n }\n doNotUse.push(centerProduct)\n\n while (doNotUse.includes(rightProduct)) {\n let rightIndex = Math.floor(Math.random() * Product.allProducts.length);\n rightProduct = Product.allProducts[rightIndex];\n }\n doNotUse.push(rightProduct)\n console.log(doNotUse)\n}", "handleGroupItemUpdate(id,orderableChecked) {\n var orderGroup = this.props.groupDetails\n var newCartGroup=[]\n \n let groupIsInCart=this.props.checkListSame(orderGroup, 1,'Group')\n \n console.log('groupIsInCart')\n console.log(groupIsInCart)\n \n let gCartList = []\n if(groupIsInCart[2].value) {gCartList=groupIsInCart[2].value.concat()}\n \n // if you are adding an item in the group create a new instance to pass to the cart\n if(orderableChecked) {\n gCartList.push(id)\n this.setState( {selectAll: true})\n newCartGroup = new this.PatientGroup(orderGroup.id, orderGroup.text, gCartList)\n \n if(!groupIsInCart[0]) {\n // if there is nothing from this group already in the cart, add the new instance\n this.props.addGroupToCart(newCartGroup) \n }\n else {\n // remove old instance and add new instance with callback fn in removegroupfromcart\n this.props.removeGroupFromCart(groupIsInCart[2],1,newCartGroup)\n }\n }\n\n // is gCartList in the CartList\n\n \n if(!orderableChecked) {\n // update list of orderables and remove \n let index= gCartList.findIndex((x => x.id == id.id))\n if (index != -1) {gCartList.splice(index, 1)}\n console.log('iExpectThisToBeNull')\n console.log(gCartList)\n \n // deal with group only containing 1 selected orderable\n if( gCartList.length == 0) {\n this.props.removeGroupFromCart(groupIsInCart[2],0)\n this.setState( {selectAll: false })\n } \n else{\n newCartGroup = new this.PatientGroup(orderGroup.id, orderGroup.text, gCartList)\n // uses a callback function in removeGroupFromCart to add the new Group\n this.props.removeGroupFromCart(groupIsInCart[2],1,newCartGroup)\n }\n }\n\n this.setState( {groupCartList:gCartList,\n cartGroup: newCartGroup})\n \n}", "function pols_is_for_sale(){\r\n\r\n\tif (!this.isOwnable) return 0;\r\n\tif (this.owner) return 0;\r\n\r\n\treturn 1;\r\n}", "function initConflictedGenus() {\n if ( conflictedTaxaObj[\"conflictedGenus\"] === undefined ) { conflictedTaxaObj[\"conflictedGenus\"] = {}; }\n if ( conflictedTaxaObj.conflictedGenus[tP.role] === undefined ) { conflictedTaxaObj.conflictedGenus[tP.role] = {}; }\n if ( conflictedTaxaObj.conflictedGenus[tP.role][taxonName] === undefined ) { \n conflictedTaxaObj.conflictedGenus[tP.role][taxonName] = []; }\n }", "function addConflictedGenus() {\n conflictedTaxaObj.conflictedGenus[tP.role][taxonName].push(tP.recrd.tempId); \n }", "function validateCatalog(id, type) {\n array[id].validation = [];\n var categories = [...new Set(array[id].data.map(x => x.category))];\n var settings = validationSettings[\"interaction studio\"][type];\n // check schema matches\n if(JSON.stringify(sort(array[id].meta.fields)) == JSON.stringify(sort(settings.schema))){\n array[id].validation.push(settings.messages.schema[1]);\n } else {\n array[id].validation.push(settings.messages.schema[0]); \n }\n // check fields count\n if(array[id].meta.fields.length > settings.schema.length){\n array[id].validation.push(settings.messages.fieldCount[0]);\n }\n // check min row count\n if(array[id].data.length >= settings.minRows){\n array[id].validation.push(settings.messages.rowCount[1]);\n } else {\n array[id].validation.push(settings.messages.rowCount[0]); \n }\n // check for duplicates\n var idOptions = sort([...new Set(array[id].data.map(x => x._id))]);\n array.ids = array.ids.concat(idOptions);\n if(array[id].data.length == idOptions.length){\n array[id].validation.push(settings.messages.duplicates[1]);\n } else {\n array[id].validation.push(settings.messages.duplicates[0]); \n }\n // check min category count\n if(categories.length >= settings.minCategories){\n array[id].validation.push(settings.messages.categoryCount[1]);\n } else {\n array[id].validation.push(settings.messages.categoryCount[0]); \n }\n // check price format\n if(type == 'product'){\n var priceOptions = sort([...new Set(array[id].data.map(x => x.price))]);\n var priceOptions = priceOptions.filter(function(v){return v!==''});\n if((!isNaN(parseFloat(priceOptions[0])) && !isNaN(parseFloat(priceOptions[priceOptions.length-1])) && array[id].meta.fields.indexOf('price')>-1) || priceOptions.length ==0){\n array[id].validation.push(settings.messages.price[1]);\n } else {\n array[id].validation.push(settings.messages.price[0])\n }\n // Check listPrice\n var priceOptions = sort([...new Set(array[id].data.map(x => x.listPrice))]);\n var priceOptions = priceOptions.filter(function(v){return v!==''});\n if((!isNaN(parseFloat(priceOptions[0])) && !isNaN(parseFloat(priceOptions[priceOptions.length-1])) && array[id].meta.fields.indexOf('price')>-1) || priceOptions.length ==0){\n array[id].validation.push(settings.messages.listPrice[1]);\n } else {\n array[id].validation.push(settings.messages.listPrice[0])\n }\n }\n}", "cup(requirement) {\n return [...new Set([...this.subrequirements, ...requirement.subrequirements])];\n }", "function buildIngredientArrays() {\n for (var i = 0; i < recipeBook.length; i++) {\n for (var j = 0; j < recipeBook[i].ingredients.length; j++) {\n if (!allIngredients.includes(recipeBook[i].ingredients[j])) {\n allIngredients.push(recipeBook[i].ingredients[j]);\n }\n }\n }\n sortIngredientsAlphabetically();\n}", "function ensureEachCriteria() {\n\tbeginningPasswordArray = [];\n\tif (hasUppercase) {\n\t\tbeginningPasswordArray.push(getOneRandomCharacter(uppercaseChars));\n\t}\n\tif (hasLowercase) {\n\t\tbeginningPasswordArray.push(getOneRandomCharacter(lowercaseChars));\n\t}\n\tif (hasNumericChars) {\n\t\tbeginningPasswordArray.push(getOneRandomCharacter(numericChars));\n\t}\n\tif (hasSpecialChars) {\n\t\tbeginningPasswordArray.push(getOneRandomCharacter(specialChars));\n\t}\n}", "function test_existanceAvenant_mpe (item,suppression)\n { \n if (suppression!=1)\n {\n var pass = vm.allavenant_mpe.filter(function(obj)\n {\n return obj.id == currentItemAvenant_mpe.id;\n });\n if(pass[0])\n {\n if((pass[0].description != currentItemAvenant_mpe.description )\n || (pass[0].cout_batiment != currentItemAvenant_mpe.cout_batiment)\n || (pass[0].cout_latrine != currentItemAvenant_mpe.cout_latrine)\n || (pass[0].cout_mobilier != currentItemAvenant_mpe.cout_mobilier)\n || (pass[0].ref_avenant != currentItemAvenant_mpe.ref_avenant)\n || (pass[0].date_signature != currentItemAvenant_mpe.date_signature )) \n { \n insert_in_baseAvenant_mpe(item,suppression);\n }\n else\n { \n item.$selected = true;\n item.$edit = false;\n }\n }\n } else\n insert_in_baseAvenant_mpe(item,suppression);\n }", "function test_existanceAvenant_mpe (item,suppression)\n { \n if (suppression!=1)\n {\n var pass = vm.allavenant_mpe.filter(function(obj)\n {\n return obj.id == currentItemAvenant_mpe.id;\n });\n if(pass[0])\n {\n if((pass[0].description != currentItemAvenant_mpe.description )\n || (pass[0].cout_batiment != currentItemAvenant_mpe.cout_batiment)\n || (pass[0].cout_latrine != currentItemAvenant_mpe.cout_latrine)\n || (pass[0].cout_mobilier != currentItemAvenant_mpe.cout_mobilier)\n || (pass[0].ref_avenant != currentItemAvenant_mpe.ref_avenant)\n || (pass[0].date_signature != currentItemAvenant_mpe.date_signature )) \n { \n insert_in_baseAvenant_mpe(item,suppression);\n }\n else\n { \n item.$selected = true;\n item.$edit = false;\n }\n }\n } else\n insert_in_baseAvenant_mpe(item,suppression);\n }", "async function addComplimented(msg) {\n let authorid = msg.author.id;\n let guildid = msg.guild.id;\n if (!(complimented.hasOwnProperty(guildid))) { // Check to make sure that the object has this guild as a property. If it does, we can run this code, else we need to create it. \n complimented[guildid] = [];\n }\n if (!(complimented[guildid].includes(authorid))) { // Check to see if the person is *not* on the list. If they aren't, we'll run this block. Else, we can just ignore it. \n complimented[guildid].push(authorid);\n }\n}", "function checkForData() {\n if (localStorage.userResults) {\n catalogArray = JSON.parse(localStorage.userResults);\n for (var i = 0; i < catalogArray.length; i++) {\n imageNameArray.push(catalogArray[i].imageName);\n }\n }\n\n else {\n catalogArray = [];\n createCatalogItems();\n }\n}", "function test_existancePassation_marches (item,suppression)\n { \n if (suppression!=1)\n {\n var pass = vm.allpassation_marches.filter(function(obj)\n {\n return obj.id == currentItemPassation_marches.id;\n });\n if(pass[0])\n {\n if((pass[0].observation != currentItemPassation_marches.observation )\n || (pass[0].date_os != currentItemPassation_marches.date_os )\n || (pass[0].date_remise != currentItemPassation_marches.date_remise )\n || (pass[0].date_ano_dpfi != currentItemPassation_marches.date_ano_dpfi )\n || (pass[0].nbr_offre_recu != currentItemPassation_marches.nbr_offre_recu)\n || (pass[0].date_lancement != currentItemPassation_marches.date_lancement ) \n || (pass[0].montant_moin_chere != currentItemPassation_marches.montant_moin_chere )\n || (pass[0].date_demande_ano_dpfi != currentItemPassation_marches.date_demande_ano_dpfi )\n || (pass[0].date_rapport_evaluation != currentItemPassation_marches.date_rapport_evaluation )\n || (pass[0].notification_intention != currentItemPassation_marches.notification_intention)\n || (pass[0].date_notification_attribution != currentItemPassation_marches.date_notification_attribution )\n || (pass[0].date_signature_contrat != currentItemPassation_marches.date_signature_contrat ) ) \n { \n insert_in_basePassation_marches(item,suppression);\n }\n else\n { \n item.$selected = true;\n item.$edit = false;\n }\n }\n } else\n insert_in_basePassation_marches(item,suppression);\n }", "function test_existancePassation_marches (item,suppression)\n { \n if (suppression!=1)\n {\n var pass = vm.allpassation_marches.filter(function(obj)\n {\n return obj.id == currentItemPassation_marches.id;\n });\n if(pass[0])\n {\n if((pass[0].observation != currentItemPassation_marches.observation )\n || (pass[0].date_os != currentItemPassation_marches.date_os )\n || (pass[0].date_remise != currentItemPassation_marches.date_remise )\n || (pass[0].date_ano_dpfi != currentItemPassation_marches.date_ano_dpfi )\n || (pass[0].nbr_offre_recu != currentItemPassation_marches.nbr_offre_recu)\n || (pass[0].date_lancement != currentItemPassation_marches.date_lancement ) \n || (pass[0].montant_moin_chere != currentItemPassation_marches.montant_moin_chere )\n || (pass[0].date_demande_ano_dpfi != currentItemPassation_marches.date_demande_ano_dpfi )\n || (pass[0].date_rapport_evaluation != currentItemPassation_marches.date_rapport_evaluation )\n || (pass[0].notification_intention != currentItemPassation_marches.notification_intention)\n || (pass[0].date_notification_attribution != currentItemPassation_marches.date_notification_attribution )\n || (pass[0].date_signature_contrat != currentItemPassation_marches.date_signature_contrat ) ) \n { \n insert_in_basePassation_marches(item,suppression);\n }\n else\n { \n item.$selected = true;\n item.$edit = false;\n }\n }\n } else\n insert_in_basePassation_marches(item,suppression);\n }", "function partnerReady(){\n if (arrParentManagerDDL.length == 1 && arrCESDDL.length == 1 && arrOtherDDL.length == 1) {\n return true;\n }\n else {\n return false;\n }\n}", "addFinal(final) {\n if (this.states.includes(final) && !this.final.includes(final)) {\n this.final.push(final);\n }\n }", "function question5 () {\n // Answer:\n // Initialize an array to hold the products made of at least 8 different materials\n // const complexProducts = [];\n // Each item in this array will be an object with three properties: title, # of materials, and materials - materials will be an array itself\n for (let i = 0; i < data.length; i++) {\n // If the data.materials.length >= 8, push the title, # of materials, and materials array into complexProducts\n if (data[i].materials.length >= 8) {\n // complexProducts.push(data[i].title);\n // complexProducts.push(data[i].materials.length);\n // complexProducts.push(data[i].materials);\n console.log(data[i].title + \" has \" + data[i].materials.length + \" materials: \" + data[i].materials);\n\n }\n }\n // log complexProducts\n // console.log(complexProducts);\n}", "function setUpDefects() {\n defects = [];\n\n for (var i = 0; i < currentData.Items.length; i++) {\n var currentItem = currentData.Items[i];\n\n var currentfruitVariety = currentItem.payload.Data.PackRun.FruitVariety;\n\n if (currentfruitVariety == selectedFruitVariety) {\n\n var currentDefects = currentItem.payload.Data.Defects;\n\n for (var j = 0; j < currentDefects.length; j++) {\n if (defects.indexOf(currentDefects[j]) == -1){\n defects.push(currentDefects[j]);\n }\n }\n }\n }\n }", "function test_existanceAppel_offre (item,suppression)\n { \n if (suppression!=1)\n {\n var mem = vm.allappel_offre.filter(function(obj)\n {\n return obj.id == currentItemAppel_offre.id;\n });\n if(mem[0])\n {\n if((mem[0].description != currentItemAppel_offre.description )\n //||(mem[0].fichier != currentItemAppel_offre.fichier )\n ||(mem[0].date_livraison != currentItemAppel_offre.date_livraison )\n ||(mem[0].date_approbation != currentItemAppel_offre.date_approbation )\n ||(mem[0].observation != currentItemAppel_offre.observation )) \n { \n insert_in_baseAppel_offre(item,suppression);\n }\n else\n { \n item.$selected = true;\n item.$edit = false;\n }\n }\n } else\n insert_in_baseAppel_offre(item,suppression);\n }", "function test_existanceAppel_offre (item,suppression)\n { \n if (suppression!=1)\n {\n var mem = vm.allappel_offre.filter(function(obj)\n {\n return obj.id == currentItemAppel_offre.id;\n });\n if(mem[0])\n {\n if((mem[0].description != currentItemAppel_offre.description )\n //||(mem[0].fichier != currentItemAppel_offre.fichier )\n ||(mem[0].date_livraison != currentItemAppel_offre.date_livraison )\n ||(mem[0].date_approbation != currentItemAppel_offre.date_approbation )\n ||(mem[0].observation != currentItemAppel_offre.observation )) \n { \n insert_in_baseAppel_offre(item,suppression);\n }\n else\n { \n item.$selected = true;\n item.$edit = false;\n }\n }\n } else\n insert_in_baseAppel_offre(item,suppression);\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 validateUnique(threeArray){\n for(var i = 0; i < threeArray.length; i ++){\n for(var v = 0; v < lastItemsSeen.length; v++){\n if(threeArray[i].product === lastItemsSeen[v].product){\n \n return false;\n \n }\n }\n return true;\n }\n}", "updateOmissions () {\n // We don't want anything from the accepted list or the suggestion pool;\n this.omissions = this.suggestionPool.map(el => el.name);\n this.omissions = this.omissions.concat(this.state.accepteds.map(el => el.name));\n }", "getServices(ownedServices, allServices){\n let whatToOffer = [];\n //#1 - iterate categories\n allServices.forEach((category)=>{\n //#2 - create category header\n let newCategory = {\n categoryName: category.categoryName,\n location: 'in/out',//TODO\n totalPickedItems : 0,//TODO\n totalPriceItems : 0,//TODO\n subCategories : []\n }\n\n //#3 - iterate subcategories to add to category\n category.subCategories.forEach((subCategory)=>{ \n //#4 - create sub-category header\n let newSubCategory = {\n subCategoryName : subCategory.subCategoryName,\n numberOfPicked : 0,//TODO\n pricePicked : 0,//TODO\n options : []\n }\n\n //#5 - iterate services to add to subcategory\n subCategory.services.forEach((service)=>{\n //#6 - create service item to add to subcategory\n let newService = {\n optionId: service.id_service,\n optionLabel : service.name_service,\n optionPrice : parseFloat(service.price),\n optionSelected : false\n }\n\n //#7 - Add it to subcategory options list (if professional has it)\n newSubCategory.options.push(newService);\n })\n\n //#8 - Push SubCategory to Category if it has options (services)\n if(newSubCategory.options.length > 0){\n newCategory.subCategories.push(newSubCategory);\n }\n\n });\n\n //#9 - Push category to 'What to offer' if category has subcategories\n if(newCategory.subCategories.length > 0){\n whatToOffer.push(newCategory);\n }\n });\n\n //#10 - Finaly, set as 'myServices'\n this.myServices = whatToOffer;\n\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 }", "function prepareAscension(ascensionItems, chateauItems) {\n var throwOnFail = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n\n if (ascensionItems) {\n if (ascensionItems.workshed && (0, _kolmafia.getWorkshed)() !== ascensionItems.workshed) {\n if (!worksheds.includes(ascensionItems.workshed) && throwOnFail) throw \"Invalid workshed: \".concat(ascensionItems.workshed, \"!\");else if (!(0, _lib.have)(ascensionItems.workshed) && throwOnFail) throw \"I'm sorry buddy, but you don't seem to own a \".concat(ascensionItems.workshed, \". Which makes it REALLY hard for us to plop one into your workshed.\");else if ((0, _property.get)(\"_workshedItemUsed\") && throwOnFail) throw \"Seems like you've already swapped your workshed, buddy.\";else (0, _kolmafia.use)(ascensionItems.workshed);\n if ((0, _kolmafia.getWorkshed)() !== ascensionItems.workshed && throwOnFail) throw \"We really thought we changed your workshed to a \".concat(ascensionItems.workshed, \", but Mafia is saying otherwise.\");\n }\n\n if (ascensionItems.garden && !Object.getOwnPropertyNames((0, _kolmafia.getCampground)()).includes(ascensionItems.garden.name)) {\n if (!gardens.includes(ascensionItems.garden) && throwOnFail) throw \"Invalid garden: \".concat(ascensionItems.garden, \"!\");else if (!(0, _lib.have)(ascensionItems.garden) && throwOnFail) throw \"I'm sorry buddy, but you don't seem to own a \".concat(ascensionItems.garden, \". Which makes it REALLY hard for us to plant one into your garden.\");else (0, _kolmafia.use)(ascensionItems.garden);\n if (!Object.getOwnPropertyNames((0, _kolmafia.getCampground)()).includes(ascensionItems.garden.name) && throwOnFail) throw \"We really thought we changed your garden to a \".concat(ascensionItems.garden, \", but Mafia is saying otherwise.\");\n }\n\n if (ascensionItems.eudora && (0, _kolmafia.eudoraItem)() !== ascensionItems.eudora) {\n if (!eudorae.includes(ascensionItems.eudora) && throwOnFail) throw \"Invalid eudora: \".concat(ascensionItems.eudora, \"!\");\n var eudoraNumber = 1 + eudorae.indexOf(ascensionItems.eudora);\n if (!(0, _kolmafia.xpath)((0, _kolmafia.visitUrl)(\"account.php?tab=correspondence\"), \"//select[@name=\\\"whichpenpal\\\"]/option/@value\").includes(eudoraNumber.toString()) && throwOnFail) throw \"I'm sorry buddy, but you don't seem to be subscribed to \".concat(ascensionItems.eudora, \". Which makes it REALLY hard to correspond with them.\");else (0, _kolmafia.visitUrl)(\"account.php?actions[]=whichpenpal&whichpenpal=\".concat(eudoraNumber, \"&action=Update\"), true);\n if ((0, _kolmafia.eudoraItem)() !== ascensionItems.eudora && throwOnFail) throw \"We really thought we chaned your eudora to a \".concat(ascensionItems.eudora, \", but Mafia is saying otherwise.\");\n }\n }\n\n if (chateauItems && _resources.ChateauMantegna.have()) {\n if (chateauItems.ceiling && _resources.ChateauMantegna.getCeiling() !== chateauItems.ceiling) {\n if (!ceilings.includes(chateauItems.ceiling) && throwOnFail) throw \"Invalid chateau ceiling: \".concat(chateauItems.ceiling, \"!\");else if (!_resources.ChateauMantegna.changeCeiling(chateauItems.ceiling) && throwOnFail) throw \"We tried, but were unable to change your chateau ceiling to \".concat(chateauItems.ceiling, \". Probably.\");\n }\n\n if (chateauItems.desk && _resources.ChateauMantegna.getDesk() !== chateauItems.desk) {\n if (!desks.includes(chateauItems.desk) && throwOnFail) throw \"Invalid chateau desk: \".concat(chateauItems.desk, \"!\");else if (!_resources.ChateauMantegna.changeDesk(chateauItems.desk) && throwOnFail) throw \"We tried, but were unable to change your chateau desk to \".concat(chateauItems.desk, \". Probably.\");\n }\n\n if (chateauItems.nightstand && _resources.ChateauMantegna.getNightstand() !== chateauItems.nightstand) {\n if (!nightstands.includes(chateauItems.nightstand) && throwOnFail) throw \"Invalid chateau nightstand: \".concat(chateauItems.nightstand, \"!\");else if (!_resources.ChateauMantegna.changeNightstand(chateauItems.nightstand) && throwOnFail) throw \"We tried, but were unable to change your chateau nightstand to \".concat(chateauItems.nightstand, \". Probably.\");\n }\n }\n}", "buildList() {\n if (!this.products.length) {\n return this.noProductsFound()\n }\n this.products.forEach((p) => {\n this.container.append(this.buildProduct(p))\n })\n }", "function done(product) {\n //in order to simulate the end of the catalogue, once we get a repeated product we unload the buffer and stop fetching more products\n checkFinish(product);\n \n count++;\n //if already fetched 20 products insert an ad\n if(count%20 == 0) {\n var ad = {};\n randomAdNumber = getNewRandomAdNumber(randomAdNumber);\n ad.adUrl = '/ad/?r=' + randomAdNumber; \n productsArray.push(ad);\n count++; \n }\n productsArray.push(product);\n }", "buildDepartments(startyear, endyear, weights, regions, deptCounts, deptNames, facultycount, facultyAdjustedCount) {\n /* contains an author name if that author has been processed. */\n let visited = {};\n for (let r in this.authors) {\n if (!this.authors.hasOwnProperty(r)) {\n continue;\n }\n let auth = this.authors[r];\n let dept = auth.dept;\n //\t if (!(dept in regionMap)) {\n if (!this.inRegion(dept, regions)) {\n continue;\n }\n let area = auth.area;\n if (weights[area] === 0) {\n continue;\n }\n let year = auth.year;\n if ((year < startyear) || (year > endyear)) {\n continue;\n }\n if (typeof dept === 'undefined') {\n continue;\n }\n let name = auth.name;\n // If this area is a child area, accumulate totals for parent.\n if (area in CSRankings.parentMap) {\n area = CSRankings.parentMap[area];\n }\n const areaDept = area + dept;\n if (!(areaDept in this.areaDeptAdjustedCount)) {\n this.areaDeptAdjustedCount[areaDept] = 0;\n }\n const count = parseInt(this.authors[r].count);\n const adjustedCount = parseFloat(this.authors[r].adjustedcount);\n this.areaDeptAdjustedCount[areaDept] += adjustedCount;\n /* Is this the first time we have seen this person? */\n if (!(name in visited)) {\n visited[name] = true;\n facultycount[name] = 0;\n facultyAdjustedCount[name] = 0;\n if (!(dept in deptCounts)) {\n deptCounts[dept] = 0;\n deptNames[dept] = [];\n }\n deptNames[dept].push(name);\n deptCounts[dept] += 1;\n }\n facultycount[name] += count;\n facultyAdjustedCount[name] += adjustedCount;\n }\n }" ]
[ "0.64424646", "0.6329203", "0.6263789", "0.6247003", "0.6152083", "0.6087974", "0.59763646", "0.59583944", "0.5938998", "0.59161246", "0.57905895", "0.57601166", "0.5672675", "0.5606312", "0.5566219", "0.55474746", "0.5512951", "0.5480384", "0.54802597", "0.54764855", "0.5463545", "0.544233", "0.54393715", "0.5378624", "0.5355622", "0.5316584", "0.5296011", "0.5212425", "0.5202397", "0.5188257", "0.51681244", "0.516639", "0.5154818", "0.51378226", "0.513284", "0.51303655", "0.51276094", "0.51191455", "0.51162875", "0.51110494", "0.51064557", "0.5082791", "0.50827247", "0.50827247", "0.5080319", "0.507415", "0.5065619", "0.50581795", "0.5055788", "0.5055788", "0.50467336", "0.5044182", "0.5040339", "0.50399935", "0.50399935", "0.50390965", "0.5028848", "0.50070673", "0.5006769", "0.50014174", "0.4999269", "0.49948257", "0.49931526", "0.49930853", "0.49875784", "0.49875784", "0.4983788", "0.497119", "0.49701977", "0.4962032", "0.4957258", "0.49427497", "0.49266684", "0.49198756", "0.49140704", "0.49074394", "0.49045825", "0.4902888", "0.48996902", "0.48987573", "0.48987573", "0.48941216", "0.4892211", "0.4889303", "0.4889303", "0.48871678", "0.48820668", "0.4881818", "0.48809305", "0.48800504", "0.48800504", "0.48781744", "0.48781517", "0.48736697", "0.48675573", "0.4863442", "0.4862717", "0.4855695", "0.48552054", "0.48549226" ]
0.6496614
0
Calculate the total price of items, with received parameter being a list of products
function getTotalPrice(chosenProducts) { totalPrice = 0; for (let i=0; i<products.length; i+=1) { if (chosenProducts.indexOf(products[i].name) > -1){ totalPrice += products[i].price; } } return Math.round((totalPrice * 100)) /100; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calculateTotalPrice(orderedItems) {\n let totalPrice = 0;\n // Пиши код ниже этой строки\n\n \n\n orderedItems.forEach(function( orderedItems, index,){\n \ttotalPrice += orderedItems;\n }); \n // Пиши код выше этой строки\n return totalPrice;\n}", "function calcTotalPrice(products) {\n\t// YOUR CODE HERE\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 }", "function getTotalPrice(chosenProducts) {\n\ttotalPrice = 0;\n\tfor (let i=0; i<chosenProducts.length; i+=1) {\n\t\ttotalPrice+=chosenProducts[i].price;\n\t}\n\treturn totalPrice;\n}", "function getTotalPrice(items) {\n return _.reduce(items, function(memo, item) {\n return memo + item.quantity * item.price;\n }, 0);\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 getTotalPrice(chosenProducts) {\n var totalPrice = 0;\n\n for (i = 0; i < chosenProducts.length; i++) {\n var prod = chosenProducts[i];\n var prodPrice = prod.split('$').pop().split('(')[0]; // get price from product string\n totalPrice = parseFloat(totalPrice) + parseFloat(prodPrice);\n }\n\n return \"$\" + totalPrice.toFixed(2);\n}", "function getTotalPrice(chosenProducts) {\n\ttotalPrice = 0;\n\tfor (let i=0; i<products.length; i+=1) {\n\t\tif (chosenProducts.indexOf(products[i].name) > -1){\n\t\t\ttotalPrice += products[i].price;\n\t\t}\n\t}\n\treturn totalPrice;\n}", "function getTotalPrice(chosenProducts) {\n\ttotalPrice = 0;\n\tfor (let i=0; i<products.length; i+=1) {\n\t\tif (chosenProducts.indexOf(products[i].name) > -1){\n\t\t\ttotalPrice += products[i].price;\n\t\t}\n\t}\n\treturn totalPrice;\n}", "function getTotalPrice(chosenProducts) {\n\ttotalPrice = 0;\n\tfor (let i=0; i<products.length; i+=1) {\n\t\tif (chosenProducts.indexOf(products[i].name) > -1){\n\t\t\ttotalPrice += products[i].price;\n\t\t}\n\t}\n\treturn totalPrice;\n}", "function getTotalPrice(chosenProducts) {\n\ttotalPrice = 0;\n\tfor (let i=0; i<products.length; i+=1) {\n\t\tif (chosenProducts.indexOf(products[i].name) > -1){\n\t\t\ttotalPrice += products[i].price;\n\t\t}\n\t}\n\treturn totalPrice;\n}", "function getTotalPrice(chosenProducts) {\n\ttotalPrice = 0;\n\tfor (let i=0; i<products.length; i+=1) {\n\t\tif (chosenProducts.indexOf(products[i].name) > -1){\n\t\t\ttotalPrice += products[i].price;\n\t\t}\n\t}\n\treturn totalPrice;\n}", "function getTotalPrice(chosenProducts) {\n\ttotalPrice = 0;\n\tfor (let i=0; i<products.length; i+=1) {\n\t\tif (chosenProducts.indexOf(products[i].name) > -1){\n\t\t\ttotalPrice += products[i].price;\n\t\t}\n\t}\n\treturn totalPrice;\n}", "function getTotalPrice(chosenProducts) {\n\ttotalPrice = 0;\n\tfor (let i=0; i<products.length; i+=1) {\n\t\tif (chosenProducts.indexOf(products[i].name) > -1){\n\t\t\ttotalPrice += products[i].price;\n\t\t}\n\t}\n\treturn totalPrice;\n}", "function getTotalPrice(chosenProducts) {\n\ttotalPrice = 0;\n\tfor (let i=0; i<products.length; i+=1) {\n\t\tif (chosenProducts.indexOf(products[i].name) > -1){\n\t\t\ttotalPrice += products[i].price;\n\t\t}\n\t}\n\treturn totalPrice;\n}", "function getTotalPrice(chosenProducts) {\n\ttotalPrice = 0;\n\tfor (let i=0; i<products.length; i+=1) {\n\t\tif (chosenProducts.indexOf(products[i].name) > -1){\n\t\t\ttotalPrice += products[i].price;\n\t\t}\n\t}\n\treturn totalPrice;\n}", "function getTotalPrice(chosenProducts) {\n\ttotalPrice = 0;\n\tfor (let i=0; i<products.length; i+=1) {\n\t\tif (chosenProducts.indexOf(products[i].name) > -1){\n\t\t\ttotalPrice += products[i].price;\n\t\t}\n\t}\n\treturn totalPrice;\n}", "totalPrice() {\n let sum = 0;\n\n for(let i = 0; i < this.state.items.length; i++){\n sum += this.totalItemPrice(this.state.items[i]);\n }\n return sum;\n }", "function getTotalPrice(chosenProducts) {\r\n\ttotalPrice = 0;\r\n\tfor (let i=0; i<products.length; i+=1) {\r\n\t\tif (chosenProducts.indexOf(products[i].name) > -1){\r\n\t\t\ttotalPrice += products[i].price;\r\n\t\t}\r\n\t}\r\n\treturn totalPrice;\r\n}", "function getTotalPrice(chosenProducts) {\r\n\ttotalPrice = 0;\r\n\tfor (let i=0; i<products.length; i+=1) {\r\n\t\tif (chosenProducts.indexOf(products[i].name) > -1){\r\n\t\t\ttotalPrice += products[i].price;\r\n\t\t}\r\n\t}\r\n\treturn totalPrice;\r\n}", "function getTotalPrice(chosenProducts) {\r\n\ttotalPrice = 0;\r\n\tfor (let i=0; i<products.length; i+=1) {\r\n\t\tif (chosenProducts.indexOf(products[i].name) > -1){\r\n\t\t\ttotalPrice += products[i].price;\r\n\t\t}\r\n\t}\r\n\treturn totalPrice;\r\n}", "function getTotalPrice(chosenProducts) {\r\n\ttotalPrice = 0;\r\n\tfor (let i=0; i<products.length; i+=1) {\r\n\t\tif (chosenProducts.indexOf(products[i].name) > -1){\r\n\t\t\ttotalPrice += products[i].price;\r\n\t\t}\r\n\t}\r\n\treturn totalPrice;\r\n}", "function totalCart(products) {\n let totalPrice = 0;\n if (products) {\n for (product of products) {\n totalPrice += parseInt(product.price);\n }\n return totalPrice;\n } else {\n return totalPrice\n }\n}", "function calculateTotalCart () {\n let totalPrice = 0;\n for (product of products) {\n totalPrice += product.price;\n }\n return totalPrice/100;\n}", "function getTotalPrice(chosenProducts) {\n\ttotalPrice = 0;\n\tfor (let i=0; i<products.length; i+=1) {\n\t\tif (chosenProducts.indexOf(products[i].name) > -1){ \n var productName = \n\t\t\ttotalPrice += products[i].price;\n\t\t}\n\t}\n\treturn totalPrice;\n}", "totalPrice() {\n var total = 0;\n for (var i = 0; i < this.listItems.length; i++) {\n total += parseFloat(this.listItems[i].price);\n }\n return total.toFixed(2);\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}", "updateTotal() {\n let total = 0;\n for (let index in this.items) {\n let item = this.items[index];\n total += item.price * item.quantity;\n }\n this.total = total;\n }", "function totalSales(products, lineItems){\n var allProducts = generateProductsMap(products);\n var totalSales = lineItems.reduce(function(total, current) {\n currentPrice = allProducts[current['productId']]['price'];\n total += current['quantity'] * currentPrice;\n return total;\n }, 0)\n return totalSales;\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 getTotalPrice(itemNode) {\n var price = getPriceByProduct(itemNode);\n var qty = getQuantityByProduct(itemNode);\n return price * qty;\n}", "function getTotalPrice() {\n var products = document.querySelectorAll('.product');\n var priceTotal = 0;\n for (var i = 0, l = products.length; i < l; i++){\n var productPrice = getPriceByProduct(products[i]);\n updatePriceByProduct(products[i], productPrice);\n priceTotal += productPrice;\n }\n document.querySelector('h2 span').innerHTML = priceTotal;\n}", "function totalPrice(list) {\n return (\n (list.length && parseFloat(list[0]) + totalPrice(list.slice(1))) || 0\n );\n }", "function totalSales(products, lineItems){\n //TODO\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 getTotalPrice(foodList) {\n let totalPrice = 0;\n if(Array.isArray(foodList)) {\n for(let i = 0; i < foodList.length; i++) {\n totalPrice = totalPrice + (foodList[i].price * foodList[i].quantity);\n }\n return totalPrice;\n } else {\n return foodList;\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 compute_subtotal(items) {\n\t$(\".wddp-shopping-cart\").text(\"Shopping cart total: $\" + Object.values(items).reduce((x, y) => (x + y), 0));\n}", "function getTotalForItem(inputItem,itemValue){\n const items = inputItem;\n const value = itemValue;\n const total = items * value;\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 total() {\n for (var i = 0; i < cart.length; i++){\n \n getCart()[i].itemPrice\n return \n }\n}", "static getTotalPrice(data) {\n let totalPrice = 0\n data.forEach(product => {\n totalPrice += product.totalHarga\n })\n return totalPrice\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 getTotalPrice(chosen_products){\n let total_price = 0;\n for (let i=0; i<products.length;i+=1){\n if (chosen_products.indexOf(products[i].name+\" $\"+products[i].price)> -1){\n total_price += products[i].price;\n }\n }\n return total_price.toFixed(2);\n}", "totalItemPrice(item) {\n if(undefined === item.price || undefined === item.quantity){\n return 0;\n }\n return item.price * item.quantity;\n }", "total (itens) {\n prod1 = list[0].amount\n prod2 = list[1].amount\n prod3 = list[2].amount\n prod4 = list[3].amount\n\n itens = prod1 + prod2 + prod3 + prod4\n\n return itens\n }", "function getTotalPrice(cart) {\n\tvar sum = 0\n\tcart.forEach(p => {\n\t\tsum += p.price;\n\t})\n\treturn sum\n}", "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 calcTotalPriceByCategory(products, category) {\n\t// YOUR CODE HERE\n}", "function totalProducts(sold,item,id){\n\titem.map(function(e){\n\t\tvar totalSold = Number(e.price) * Number(sold) + e.product_sales;\n\t\tconnection.query(\n\t\t\t\"update products set product_sales=? where item_id =?\",\n\t\t\t[totalSold,id],\n\t\t\tfunction(err){\n\t\t\t\tif(err){\n\t\t\t\t\tthrow err;\n\t\t\t\t}\n\t\t});\n\t});\n}", "function totalPrice() {\n var sum = 0.0;\n for(let i = 0; i < cart.length; i++){\n if(cart.prodSalePrice != null){\n sum += (Number(cart[i].prodSalePrice) * Number(cart[i].prodQty));\n }else{\n sum += (Number(cart[i].prodPrice) * Number(cart[i].prodQty));\n }\n }\n return sum;\n }", "function totalValue($arr) {\n var $totalProductValue = 0; // create variable to hold total value\n for (i=0;i<$arr.length;i++) { // loop through every item in the $products array\n $productObj = $arr[i]; // get each product object from the array\n $perItemCost = $productObj['unit_price']; // create variable for individual item cost and get each product object's unit_price value\n $perItemInventory = $productObj['inventory']; // create variable for individual item inventory and get each product object's inventory value\n $perItemValue = $perItemCost * $perItemInventory; // calculate total value of each item's inventory \n $totalProductValue += $perItemValue; // add indiv item's value to the totalProductValue variable\n }\n return $totalProductValue; // returns the total value after the loop is complete\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 getTotalPrice(shoppingCart){\n return shoppingCart.reduce((sum, current) => sum + current.price * current.quantity, 0);\n}", "function totalValue(prods) {\n let inventoryValue = 0;\n for (i = 0; i < prods.length; i += 1 ) {\n inventoryValue += prods[i].inventory * prods[i].unit_price;\n }\n return inventoryValue;\n}", "function totale(price) {\n tot += price;\n }", "function calcInventoryValue(items) {\n let totalValue = 0;\n for (const inventories of inventory) {\n totalValue += (inventories.product.price * inventories.quantity);\n }\n ;\n // console.log(totalValue);\n return totalValue;\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 totalPriceIntoCart(panier) {\n let total = 0;\n\n for (let index = 0; index < panier.length; index++) {\n let articleQuantity = panier[index].quantity;\n let articlePrice = priceById[panier[index].id];\n\n total = total + articleQuantity * articlePrice;\n\n }\n\n return total;\n}", "function calculateTotal() {\n\t if(validQuantities == false)\n\t\t\treturn; \n\t var totalPrice = 0;\n\t\tfor (var i = 0; i< items.length; i++){\n\t\t\tvar size = document.forms[formName][sizeName[i]].value;\n\t\t\tvar quantity= parseInt(document.forms[formName][numberName[i]].value, 10);\n\t\t\tvar itemPrice = 0;\n\t\t\tconsole.log(size + \",\" + quantity.toString() +\",\" + i.toString());\n\t\t\tif(size==\"small\") {\n\t\t\t\titemPrice = quantity * smallPrices[i];\n\t\t\t}\n\t\t\tif(size == \"medium\") {\n\t\t\t\titemPrice = quantity * mediumPrices[i];\n\t\t\t}\n\t\t\tif(size == \"large\") {\n\t\t\t\titemPrice = quantity * largePrices[i];\n\t\t\t}\n\t\t\ttotalPrice += itemPrice;\n\t\t}\n\t\ttotalPrice += mayoCost + seasoningCost + ketchupCost;\n\t\tdocument.getElementById(\"total\").innerHTML = \"<strong><u>Your Total is $\" + totalPrice.toString() + \"</strong></u>\";\n\t\treturn totalPrice;\n}", "function totalSales(shirtQuantity, pantQuantity, shoeQuantity) {\n const cart = [\n { name: 'shirt', price: 100, quantity: shirtQuantity },\n { name: 'pant', price: 200, quantity: pantQuantity },\n { name: 'shoe', price: 500, quantity: shoeQuantity }\n ];\n let cartTotal = 0;\n for (const product of cart) {\n const productTotal = product.price * product.quantity;\n cartTotal = cartTotal + productTotal;\n }\n return cartTotal;\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}", "function getTotal(price, quantity){\n const total = price * quantity;\n return total;\n}", "function calcTotal(itemId, itemPrice, orderQty) {\n var total = orderQty * itemPrice;\n console.log(\"Total Cost is $\" + total.toFixed(2));\n}", "function getOrderTotal(products) {\n return products.reduce((total, product) => {\n total += product.price * product.orderProduct.quantity\n return total\n }, 0)\n}", "function calculateTotalCost(shoppingCart) {\n let total = 0;\n for (let product of shoppingCart) {\n total += product.price * product.count\n }\n\n return total\n}", "function getPriceByProduct(itemNode){\n var prices = itemNode.getElementsByClassName(\"value\")[0].innerHTML;\n var qty = itemNode.getElementsByClassName(\"quantity\")[0].value;\n var total = itemNode.getElementsByClassName(\"total-price\")[0];\n total.innerHTML = (prices * qty);\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 totalPriceSingle() {\n // let value = $('#input_quantitys').val();\n for(let i = 0; i < cart.length; i++){\n return Number(cart[i].prodQty) * Number(cart[i].prodPrice);\n }\n }", "function calcTotalPriceByCategory(products, category) {\r\n\t// YOUR CODE HERE\r\n return products.filter(el => el.category === category).map(el => el.price).reduce((a, b) => a + b, 0)\r\n}", "getTotalWithTax() {\n \n // total individual items from getPriceWithTax\n let totWithTax = 0;\n this.items.forEach((net) => {\n totWithTax += net.getPriceWithTax();\n });\n return totWithTax;\n }", "function getTotal(cart) {\n return totalPrice = cart.reduce((total, currentItem) => total + (currentItem.quantity * currentItem.price), 0).toFixed(2);\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 priceCalculation() {\n\n const bestPrice = getValue('primary-price');\n const extraMemory = getValue('extra-memory');\n const extraStorage = getValue('extra-storage');\n const fastDelivery = getValue('extra-delivery');\n const priceTotal = bestPrice + extraStorage + fastDelivery + extraMemory;\n return priceTotal;\n}", "function totalPrice (arr) {\n var total = 0;\n arr.forEach(function (element) {\n return total += element.price; \n }) \n return total; \n}", "function sumShoppingBag(shoppingBag){\n //var shoppingBagJson = shoppingBag.shopping_bag;\n var sum = 0;\n for (var i = 0; i < shoppingBag.length; i++) {\n //TODO think if to change to sum only without calc\n sum += shoppingBag[i].quantity * shoppingBag[i].price;\n }\n return sum;\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 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 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}", "getTotalPrice () {\n return _.reduce(this.options.data, (total, option) => total + option.quantity * option.price, 0).toFixed(2);\n }", "function calculateTotal(arr){\n \n //Command won't work if no items are in list\n if (nameAndPrice.length == 0){\n println(\"Invalid Command\");\n } else {\n var taxed = [];\n var final = 0;\n \n for (var i = 0; i < arr.length; i++){\n if (arr.indexOf(arr[i]) % 2 == 0){\n //Excludes product names from final price\n } else if (arr.indexOf(arr[i]) % 2 != 0){\n var temp = arr[i]*1.1; //Finds the taxed price of the item and stores it in a temporary variable\n taxed.push(temp); //Stores that in a new array consisting of taxed prices\n } \n }\n \n for (var i = 0; i < taxed.length; i++){\n final += taxed[i]; //Adds every taxed price to a single integer (final price)\n }\n \n //Applies any available discount to the final price\n var discount = readInt('How much discount did you recieve on your final purchase? If none, enter zero. %')\n final *= ((100 - discount)*0.01);\n \n return final;\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 calculatePrice(size, paper, frame, quantity){\n \n // add the items costs' up and multiply the result by the quantity then return it. \n let itemPrice = size + paper + frame;\n return itemPrice * quantity;\n }", "function getPrices(){\n\n\t\t//cost of shop items\n\t\tprice1=75.00; price2=116; price3=44; price4=5.25; price5=3.75; price6=12.75; price7=4.10;\n\n\t\t//ammount of items chosen\n\t\titem_1=0; item2=0; item3=0; item4=0; item5=0; item6=0; item6=0; item7=0;\n\n\t\t//sub-total for each item\n\t\tsubTot_1 = 0; subTot_2=0; subTot_3=0; subTot_4=0; subTot_5=0; subTot_6=0; subTot_7=0;\n\n\t\t//get number of items\n\t\titem_1 = document.getElementById(\"item_1\").value;\n\t\titem_2 = document.getElementById(\"item_2\").value;\n\t\titem_3 = document.getElementById(\"item_3\").value;\n\t\titem_4 = document.getElementById(\"item_4\").value;\n\t\titem_5 = document.getElementById(\"item_5\").value;\n\t\titem_6 = document.getElementById(\"item_6\").value;\n\t\titem_7 = document.getElementById(\"item_7\").value;\n\n\n\t\t//subtotal for item\n\t\tsubTot_1 = eval(item_1) * eval(price1);\n\t\tsubTot_1 = subTot_1.toFixed(2);\n\t\tdocument.getElementById(\"subTot_1\").value = subTot_1;\n\n\t\t//subtotal for item 2\n\t\tsubTot_2 = eval(item_2) * eval(price2);\n\t\tsubTot_2 = subTot_2.toFixed(2);\n\t\tdocument.getElementById(\"subTot_2\").value = subTot_2;\n\n\t\t//subtotal for item 3\n\t\tsubTot_3 = eval(item_3) * eval(price3);\n\t\tsubTot_3 = subTot_3.toFixed(2);\n\t\tdocument.getElementById(\"subTot_3\").value = subTot_3;\n\n\t\t//subtotal for item 4\n\t\tsubTot_4 = eval(item_4) * eval(price4);\n\t\tsubTot_4 = subTot_4.toFixed(2);\n\t\tdocument.getElementById(\"subTot_4\").value = subTot_4;\n\n\t\t//subtotal for item 5\n\t\tsubTot_5 = eval(item_5) * eval(price5);\n\t\tsubTot_5 = subTot_5.toFixed(2);\n\t\tdocument.getElementById(\"subTot_5\").value = subTot_5;\n\n\t\t//subtotal for item 6\n\t\tsubTot_6 = eval(item_6) * eval(price6);\n\t\tsubTot_6 = subTot_6.toFixed(2);\n\t\tdocument.getElementById(\"subTot_6\").value = subTot_6;\n\n\t\t//subtotal for item 7\n\t\tsubTot_7 = eval(item_7) * eval(price7);\n\t\tsubTot_7 = subTot_7.toFixed(2);\n\t\tdocument.getElementById(\"subTot_7\").value = subTot_7;\n\n\t\t//work out total for all items\n\t\tTotamt = eval(subTot_1)+eval(subTot_2)+eval(subTot_3)+eval(subTot_4)+eval(subTot_5)+eval(subTot_6)+eval(subTot_7);\n\t\tTotamt = Totamt.toFixed(2);\n\t\tdocument.getElementById(\"GrandTotal\").value = Totamt;\n\n}//end getPrices", "getOrderTotal() {\n\n return Object.values(this.lineItems).reduce(\n (total, {product, sku, quantity}) =>\n total + quantity * this.plans[0].amount,\n 0\n );\n }", "function muestroTotalProductos() {\r\n var subTotalCompleto = 0;\r\n subTotalCompletoImporte = 0;\r\n if ($('.articuloDeLista').length > 0) {\r\n $('.articuloDeLista').each(function () {\r\n subTotalCompleto = parseFloat($(this).children('.productSubtotal').text());\r\n subTotalCompletoImporte += subTotalCompleto;\r\n document.getElementById(\"productCostText\").innerHTML = subTotalCompletoImporte;\r\n });\r\n }\r\n }", "checkout(){\n\n let total = 0\n this.products.forEach(item =>{\n GRAPHQL.decrementQuantity(item.id)\n total += item.price\n })\n\n return total\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 }", "function calculateTotalPrice (product) {\n let quantity = JSON.parse(localStorage.getItem(product._id));\n return quantity * product.price / 100;\n\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 updatePrice() {\n var sum = 0;\n for(var i = 0; i < $scope.currentItems.length; i++) {\n sum += $scope.currentItems[i].price;\n }\n\n $scope.totalCost = sum + (sum * taxRate);\n $scope.totalCost = Math.floor($scope.totalCost);\n console.log($scope.totalCost);\n }", "function calculateTotal() {\n\n var price = 0;\n\n $('.order-list .product-price').each(function (index) {\n\n price += parseInt($(this).html());\n\n }); //end of product price\n\n //$('.total-price').html(price);\n $('.total-price').val(price);\n\n} //end of calculate total", "function calcularPrecioItem(item){\n return item.producto.precioProducto * item.cantidad;\n}", "rawTotal() {\n return this._checkoutProducts\n .map((checkoutProduct) => checkoutProduct.count * checkoutProduct.price.value)\n .reduce((total, productPrice) => total + productPrice, 0);\n }", "get amount() {\n\t\t\treturn this.items\n\t\t\t\t.map(item => item.qty * item.price)\n\t\t\t\t.reduce((total, qty) => total += qty, 0);\n\t\t}", "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 calcularTotal(){\n //borrar el precio \n total=0;\n //recorrer el array de la cesta y obtener el precio de cada producto\n for(let item of arrayCesta){\n let itemcesta=productos.filter(function(objetoproductos){\n return objetoproductos['tag']==item;\n });\n //se suma el total\n total=total+itemcesta[0]['precio'];\n }\n //mostrar el precio\n $total.textContent=total.toFixed(2);\n}", "function getTotalQuantity(items) {\n return _.reduce(items, function(memo, item) {\n return memo + item.quantity;\n }, 0);\n }", "function calcItemPrice(baseCost, quantity, frameCost, glassCost, mattID) {\n var cost = (baseCost + frameCost + glassCost) * quantity;\n if(mattID != 35) { cost += (10 * quantity);}\n return formatMoney(cost);\n }", "function getPriceEstimate(items) {\n\t\tvar sumPrices = 0;\n\t\t$(items).each(function(i) {\n\t\t\tsumPrices += parseFloat(items[i].sellingStatus.convertedCurrentPrice);\n\t\t});\n\t\treturn sumPrices/items.length; // Return average price\n\t}" ]
[ "0.78249115", "0.78034604", "0.7787222", "0.7775861", "0.7759844", "0.7598756", "0.74956566", "0.7429122", "0.7429122", "0.7429122", "0.7429122", "0.7429122", "0.7429122", "0.7429122", "0.7429122", "0.7429122", "0.7429122", "0.74073166", "0.737139", "0.737139", "0.737139", "0.737139", "0.73450357", "0.73441285", "0.73406297", "0.73395705", "0.72697276", "0.7247049", "0.72459584", "0.72425425", "0.72259736", "0.7225467", "0.7211384", "0.7157978", "0.71496", "0.70926315", "0.7086569", "0.7084464", "0.70747703", "0.70683694", "0.70582926", "0.7053232", "0.70512164", "0.7049251", "0.7036772", "0.6988144", "0.6961836", "0.6954704", "0.69278747", "0.6920007", "0.6915973", "0.691536", "0.6915094", "0.69064474", "0.6884403", "0.6870685", "0.6867098", "0.6866955", "0.6850941", "0.68347025", "0.68014413", "0.67822385", "0.6778438", "0.67673457", "0.6756541", "0.6725631", "0.6723557", "0.67115515", "0.6704954", "0.67018443", "0.66767067", "0.66761327", "0.6656733", "0.6642885", "0.6642735", "0.6634455", "0.6628232", "0.66171104", "0.6615602", "0.6604346", "0.65967774", "0.6580473", "0.6570401", "0.656287", "0.6562149", "0.6560973", "0.6560965", "0.6541464", "0.6539905", "0.6533424", "0.6522853", "0.6518111", "0.65169805", "0.6511662", "0.64905757", "0.64799607", "0.64759964", "0.6474288", "0.64642006", "0.64567906" ]
0.761731
5
Sends response messages via the Send API
function callSendAPI(sender_psid, response) { // Construct the message body let request_body = { recipient: { id: sender_psid, }, message: response, }; // Send the HTTP request to the Messenger Platform request( { uri: 'https://graph.facebook.com/v6.0/me/messages', qs: { access_token: process.env.FB_PAGE_TOKEN }, method: 'POST', json: request_body, }, (err, res, body) => { if (!err) { // console.log('message sent!'); } else { console.error('Unable to send message:' + err); } } ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sendResponse(senderID , jsonData, lastStopRequested) {\n var messageData = {\n recipient: {\n id: senderID\n },\n message: {\n text: jsonData\n }\n }\n callSendAPI(messageData, lastStopRequested);\n}", "static postReponse() {\n const reqMessage = JSON.parse(this.req.chunks[0]);\n\n this.res.writeHead(200);\n this.res.end();\n Bot.Functions.load(reqMessage.group_id);\n function send() {\n //ACTUAL BOT\n const resMessage = Bot.Bot.checkMessage(reqMessage);\n if (resMessage) {\n\n //STARTS SEND\n Bot.Bot.sendMessage(resMessage);\n }\n }\n setTimeout(send, 200);\n }", "function sendPostResponse() {\n\t\t\t\t\t\n\t\t\t\t\tvar delaySend = false;\n\t\t\t\t\t// build appropriate response\n\t\t\t\t\tswitch(command) {\n\t\t\t\t\t\tcase 'end':\n\t\t\t\t\t\tcase 'continue':\n\t\t\t\t\t\t\tutils.info('server : Building \"continue\" response');\n\t\t\t\t\t\tcase 'start':\n\t\t\t\t\t\t\tmessage = {Op:'ok', id:deviceId};\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\t\tcase 'device_ready':\n\t\t\t\t\t\t\tutils.info('server : Building \"device_ready\" response:');\n\t\t\t\t\t\t\tvar task = device.taskGroup.getNextTest();\n\t\t\t\t\t\t\tif(task) {\n\t\t\t\t\t\t\t\tutils.info('\\tSending next task: ' + task);\n\t\t\t\t\t\t\t\tmessage = {Op:'ok', test:task};\n\t\t\t\t\t\t\t} else { // no more tasks, report\n\n\t\t\t\t\t\t\t\tutils.info('server : Is test done: ' + clientConnection.isTestDone);\n\t\t\t\t\t\t\t\tif(!clientConnection.isTestDone) {\n\t\t\t\t\t\t\t\t\tutils.info('server : setting istestdone to true');\n\t\t\t\t\t\t\t\t\tclientConnection.isTestDone = true;\n\t\t\t\t\t\t\t\t\tclientConnection.reporter.createReport();\n\t\t\t\t\t\t\t\t\tif(File.exists(path.join(END_GAME_LOCATION, 'Code', 'Main.js'))) {\n\t\t\t\t\t\t\t\t\t\tutils.info('\\tSending EndGame');\n\t\t\t\t\t\t\t\t\t\tmessage = {Op:'ok', test:'/' + END_GAME_LOCATION};\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tutils.info('is the next test ready?',\n\t\t\t\t\t\t\t\t clientConnection.isNextTestReady);\n\t\t\t\t\t\t\t\tif(clientConnection.isNextTestReady) {\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tclientConnection.isTestDone = false;\n\t\t\t\t\t\t\t\t\tclientConnection.isNextTestReady = false;\n\t\t\t\t\t\t\t\t\tdevice.taskGroup.restart();\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tutils.info('\\tNo more tasks.');\n\t\t\t\t\t\t\t\t\tmessage = {Op:'nada'};\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'sdk_social_test_start':\n\t\t\t\t\t\t\tutils.info('Adding US Social test set');\n\t\t\t\t\t\t\tdevice.addToTaskGroup(AUTO_SDK_SOCIAL_TEST_LOC);\n\t\t\t\t\t\t\tmessage = {Op:'ok'};\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'social_test_start':\n\t\t\t\t\t\t\tutils.info('setting tests to social_test_start');\n\t\t\t\t\t\t\tdevice.setTaskGroup('Social_Tests', AUTO_SOCIAL_TEST_LOC);\n\t\t\t\t\t\t\tmessage = {Op:'ok'};\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'task_finished':\n\t\t\t\t\t\tcase 'log_start':\n\t\t\t\t\t\t\tmessage = {Op:'ok'};\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'log_end':\n\t\t\t\t\t\t\t// hold off on sending response if previous messages\n\t\t\t\t\t\t\t// have yet to be received\n\t\t\t\t\t\t\tif(clientConnection.isLogFinished()) {\n\t\t\t\t\t\t\t\tmessage = {Op:'ok'};\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// if previous message never gets resent, we need to send\n\t\t\t\t\t\t\t\t// the response after a timeout\n\t\t\t\t\t\t\t\tif(delaySend === false) {\n\t\t\t\t\t\t\t\t\tsetTimeout(function () {\n\t\t\t\t\t\t\t\t\t\tif(clientConnection.isDelayedResponseSet() === true) {\n\t\t\t\t\t\t\t\t\t\t\tutils.info('Did not receive all past messages in 2 minutes --> sending response (' + deviceId + ')');\n\t\t\t\t\t\t\t\t\t\t\tclientConnection.flush();\n\t\t\t\t\t\t\t\t\t\t\tclientConnection.sendDelayedResponse();\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}, 120000);\n\t\t\t\t\t\t\t\t\tdelaySend = true;\n\t\t\t\t\t\t\t\t\tclientConnection.setDelayedResponse(response);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tmessage = '';\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\tif(!delaySend) {\n\t\t\t\t\t\tsendResponse(200, message);\n\t\t\t\t\t}\n\n\t\t\t\t}", "function callSendAPI(sender_psid, response) {\n // Construct the message body\n let request_body = {\n recipient: {\n id: sender_psid,\n },\n message: response,\n };\n console.log('starting ...send http request ....');\n // Send the HTTP request to the Messenger Platform\n\n request(\n {\n uri: 'https://graph.facebook.com/v7.0/me/messages',\n qs: { access_token: process.env.PAGE_ACCESS_TOKEN },\n method: 'POST',\n json: request_body,\n },\n (err, res, body) => {\n if (!err) {\n console.log('message sent!');\n } else {\n console.error('Unable to send message:' + err);\n }\n }\n );\n}", "sendResponse(message, text) {\n return this._postMessage(message.channel, text);\n }", "async function callSendAPI(sender_psid, response) {\n // Construct the message body\n let request_body\n\n request_body = {\n \"recipient\": {\n \"id\": sender_psid\n },\n \"messaging_type\": \"RESPONSE\",\n \"message\": response\n }\n // Send the HTTP request to the Messenger PXform\n return new Promise(function (resolve, reject) {\n request({\n \"uri\": \"https://graph.facebook.com/v2.6/me/messages\",\n \"qs\": { \"access_token\": process.env.PAGE_ACCESS_TOKEN },\n \"method\": \"POST\",\n \"json\": request_body\n }, (err, res, body) => {\n if (err) {\n console.log('error sending' + err);\n return reject(err);\n } else {\n console.log(\"Message sent\");\n resolve(body)\n }\n })\n });\n}", "function callSendAPI(sender_psid, response) {\n // Construct the message body\n let request_body = {\n \"recipient\": {\n \"id\": sender_psid\n },\n \"message\": response,\n }\n\n // console.log(response)\n var request = require('request');\n\n // Send the HTTP request to the Messenger Platform\n request({\n \"uri\": \"https://graph.facebook.com/v11.0/me/messages\",\n \"qs\": { \"access_token\": \"EAAMRj0MjGYcBAERv5CuUMInm2LjSgUeBZB3kyfPOkCpvsckZAg51ZAhfPZAZCE9pbuF87zXgESUPhBsIcZB2ZCTZAiB4W5QMPG3Gjs4usuAcaCn0w0eHurXtKCP0srIYCqq8UHeCUo34RMtOmZA4eGoI1929YZBys7rvSRwZA5aZAkkb1XYDZCAkyU4xF\" },\n \"method\": \"POST\",\n \"json\": request_body\n }, (err, res, body) => {\n if (!err) {\n console.log('message sent!')\n } else {\n console.error(\"Unable to send message:\" + err);\n }\n }); \n}", "function callSendAPI(sender_psid, response) {\r\n // Construct the message body\r\n let request_body = {\r\n messaging_type: \"response\",\r\n recipient: {\r\n id: sender_psid\r\n },\r\n message: response\r\n };\r\n\r\n // Send the HTTP request to the Messenger Platform\r\n request(\r\n {\r\n uri: \"https://graph.facebook.com/v2.6/me/messages\",\r\n qs: { access_token: PAGE_ACCESS_TOKEN },\r\n method: \"POST\",\r\n json: request_body\r\n },\r\n (err, res, body) => {\r\n if (!err) {\r\n console.log(\"message sent!\");\r\n } else {\r\n console.error(\"Unable to send message:\" + err);\r\n }\r\n }\r\n );\r\n}", "function callSendApi(response) {\n request({\n // \"uri\": \"https://graph.facebook.com/me/messages\",\n \"uri\": \"https://graph.facebook.com/v2.6/me/messages\", //Api de messenger\n \"qs\": {\n \"access_token\": access_token //Token del acceso para conectar a la api\n },\n \"method\": \"POST\",\n \"json\": response\n },\n function(err) {\n if(err) {\n console.log('Ha ocurrido un error')\n } else {\n console.log('Mensaje enviado')\n }\n })\n}", "function callSendAPI(sender_psid, response) {\n // Construct the message body\n let request_body = {\n recipient: {\n id: sender_psid,\n },\n message: response,\n };\n \n // Send the HTTP request to the Messenger Platform\n request(\n {\n uri: \"https://graph.facebook.com/v2.6/me/messages\",\n qs: { access_token: process.env.PAGE_ACCESS_TOKEN },\n method: \"POST\",\n json: request_body,\n },\n (err, res, body) => {\n if (!err) {\n console.log(\"message sent!\");\n } else {\n console.error(\"Unable to send message:\" + err);\n }\n }\n );\n }", "function callSendAPI(sender_psid, response) {\n // Construct the message body\n let request_body = {\n \"recipient\": {\n \"id\": sender_psid\n },\n \"message\": response\n }\n\n // Send the HTTP request to the Messenger Platform\n request({\n \"uri\": \"https://graph.facebook.com/v2.6/me/messages\",\n \"qs\": { \"access_token\": PAGE_ACCESS_TOKEN },\n \"method\": \"POST\",\n \"json\": request_body\n }, (err, res, body) => {\n if (!err) {\n console.log('message sent!')\n // console.log(request_body)\n } else {\n\n\n console.error(\"Unable to send message:\" + err);\n }\n });\n}", "function callSendAPI(sender_psid, response) {\n // construct the message body\n let request_body = {\n 'recipient': {\n 'id': sender_psid\n },\n 'message': response\n }\n\n // sent the http request to the messenger platform\n request({\n 'uri': 'https://graph.facebook.com/v2.6/me/messages',\n 'qs': {\n 'access_token': process.env.PAGE_ACCESS_TOKEN\n },\n 'method': 'POST',\n 'json': request_body\n }, (err, res, body) => {\n if (!err) {\n console.log('message sent!');\n } else {\n console.error('Unable to send message:', err);\n }\n })\n}", "function callSendAPI(sender_psid, response) {\n\tlet request_body = {\n\t\t\"recipient\": {\n\t\t\t\"id\": sender_psid\n\t\t},\n\t\t\"message\": response\n\t}\n\n\trequest({\n\t\t\"uri\": \"https://graph.facebook.com/v2.6/me/messages\",\n\t\t\"qs\": { \"access_token\": PAGE_ACCESS_TOKEN },\n\t\t\"method\": \"POST\",\n\t\t\"json\": request_body\n\t}, (err, res, body) => {\n\t\tif(err) {\n\t\t\tconsole.log(\"Error sending response: \" + err);\n\t\t}\n\t});\n}", "function callSendAPI(sender_psid, response) {\n // Construct the message body\n let message = {\n \"recipient\": {\n \"id\": sender_psid\n },\n \"message\": response\n };\n\n // Send the HTTP request to the Messenger Platform\n request({\n \"uri\": \"https://graph.facebook.com/v2.6/me/messages\",\n \"qs\": { \"access_token\": PAGE_ACCESS_TOKEN },\n \"method\": \"POST\",\n \"json\": message\n }, (err, res, body) => {\n if (!err) {\n console.log('message sent!')\n } else {\n console.error(\"Unable to send message:\" + err);\n }\n }).on('response', function(response) {\n console.log(response.statusCode);\n })\n .on('error', function(err) {\n console.log(err);\n });\n}", "function callSendAPI(sender_psid, response) {\n // Construct the message body\n let request_body = {\n \"recipient\": {\n \"id\": sender_psid\n },\n \"message\": response\n }\n\n // Send the HTTP request to the Messenger Platform\n request({\n \"uri\": \"https://graph.facebook.com/v2.6/me/messages\",\n \"qs\": { \"access_token\": PAGE_ACCESS_TOKEN },\n \"method\": \"POST\",\n \"json\": request_body\n }, (err, res, body) => {\n if (!err) {\n console.log('message sent!')\n } else {\n console.error(\"Unable to send message:\" + err);\n }\n }); \n}", "function callSendAPI(sender_psid, response) {\n // Construct the message body\n let request_body = {\n \"recipient\": {\n \"id\": sender_psid\n },\n \"message\": response\n }\n\n // Send the HTTP request to the Messenger Platform\n request({\n \"uri\": \"https://graph.facebook.com/v2.6/me/messages\",\n \"qs\": { \"access_token\": PAGE_ACCESS_TOKEN },\n \"method\": \"POST\",\n \"json\": request_body\n }, (err, res, body) => {\n if (!err) {\n console.log(\">> ~ file: chatbot.service.js ~ line 26 ~ callSendAPI ~ body\", body);\n console.log('message sent!')\n } else {\n console.error(\"Unable to send message:\" + err);\n }\n });\n}", "function callSendAPI(sender_psid, response) {\n // Construct the message body\n let request_body = {\n \"recipient\": {\n \"id\": sender_psid\n },\n \"message\": response\n }\n // Send the HTTP request to the Messenger Platform\n request({\n \"uri\": \"https://graph.facebook.com/v6.0/me/messages\",\n \"qs\": { \"access_token\": process.env.FB_PAGE_TOKEN },\n \"method\": \"POST\",\n \"json\": request_body\n }, (err, res, body) => {\n if (!err) {\n console.log('message sent!')\n console.log(`Message: ${response}`);\n } else {\n console.error(\"Unable to send message:\" + err);\n }\n }); \n}", "function callSendAPI(sender_psid, response) {\n // Construct the message body\n let request_body = {\n \"recipient\": {\n \"id\": sender_psid\n },\n \"message\": response\n }\n\n // Send the HTTP request to the Messenger Platform\n request({\n \"uri\": \"https://graph.facebook.com/v2.6/me/messages\",\n \"qs\": { \"access_token\": process.env.PAGE_ACCESS_TOKEN },\n \"method\": \"POST\",\n \"json\": request_body\n }, (err, res, body) => {\n if (!err) {\n console.log('message sent!')\n } else {\n console.error(\"Unable to send message:\" + err);\n }\n });\n}", "function callSendAPI(sender_psid, response) {\n // Construct the message body\n let request_body = {\n \"recipient\": {\n \"id\": sender_psid\n },\n \"message\": response\n }\n\n // Send the HTTP request to the Messenger Platform\n request({\n \"uri\": \"https://graph.facebook.com/v2.6/me/messages\",\n \"qs\": {\n \"access_token\": PAGE_ACCESS_TOKEN\n },\n \"method\": \"POST\",\n \"json\": request_body\n }, (err, res, body) => {\n if (!err) {\n console.log('message sent!')\n } else {\n console.error(\"Unable to send message:\" + err);\n }\n });\n}", "function send () {\n Cute.get(\n // Send the event name and emission number as URL params.\n Beams.endpointUrl + '&m=' + Cute.escape(name) + '&n=' + Beams.emissionNumber,\n // Send the message data as POST body so we're not size-limited.\n 'd=' + Cute.escape(data),\n // On success, there's nothing we need to do.\n function () {\n Beams.retryTimeout = Beams.retryMin\n },\n // On failure, retry.\n function () {\n Beams.retryTimeout = Math.min(Beams.retryTimeout * Beams.retryBackoff, Beams.retryMax)\n setTimeout(send, Beams.retryTimeout)\n }\n )\n }", "function callSendAPI(sender_psid, response) {\n // Construct the message body\n let request_body = {\n recipient: {\n id: sender_psid,\n },\n message: response,\n };\n\n // Send the HTTP request to the Messenger Platform\n request(\n {\n uri: \"https://graph.facebook.com/v2.6/me/messages\",\n qs: { access_token: process.env.PAGE_ACCESS_TOKEN },\n method: \"POST\",\n json: request_body,\n },\n (err, res, body) => {\n if (!err) {\n console.log(\"message sent!\");\n } else {\n console.error(\"Unable to send message:\" + err);\n }\n }\n );\n}", "function callSendAPI(sender_psid, response) {\n let request_body = {\n \"recipient\": {\n \"id\": sender_psid\n },\n \"message\": response\n }\n //console.log(`\\\"${sender_psid}\\\"` + \" \" + response.text);\n request({\n \"uri\": \"https://graph.facebook.com/v2.6/me/messages\",\n \"qs\": { \"access_token\":PAGE_ACCESS_TOKEN },\n \"method\": \"POST\",\n \"json\": request_body\n }, (err, res, body) => {\n if (!err) {\n console.log('message sent!')\n } else {\n console.error(\"Unable to send message:\" + err);\n }\n }); \n\n}", "async send(request, response) {}", "function callSendAPI(sender_psid, response) {\n // Construct the message body\n let request_body = {\n recipient: {\n id: sender_psid,\n },\n message: response,\n };\n\n // Send the HTTP request to the Messenger Platform\n request(\n {\n uri: \"https://graph.facebook.com/v6.0/me/messages\",\n qs: { access_token: PAGE_ACCESS_TOKEN },\n method: \"POST\",\n json: request_body,\n },\n (err, res, body) => {\n if (!err) {\n console.log(\"Message sent!\");\n } else {\n console.error(\"Unable to send message:\" + err);\n }\n }\n );\n}", "function callSendAPI(sender_psid, response, accessToken) {\n response.forEach((arr) => {\n // Construct the message body\n const request_body = {\n recipient: {\n id: sender_psid,\n },\n message: arr,\n };\n // console.log('999', request_body);\n // 回傳訊息給 page\n axios({\n method: 'post',\n url: 'https://graph.facebook.com/v3.2/me/messages',\n headers: {\n Authorization: `Bearer ${accessToken}`,\n 'Content-Type': 'application/json',\n },\n data: request_body,\n }).then(() => console.log('res: ', 'ok'))\n .catch(err => console.log('err: ', err));\n });\n}", "function sendResponse(status, message) {\n\t\t\t\tvar jsonMessage = JSON.stringify(message);\n\t\t\t\t//utils.info('sending response! ' + jsonMessage);\n\t\t\t\tresponse.writeHead(status,\n\t\t\t\t\t{\n\t\t\t\t\t\t'Content-Length': Buffer.byteLength(jsonMessage),\n\t\t\t\t\t\t'Content-Type': 'text/plain'\n\t\t\t\t\t});\n\t\t\t\tresponse.end(jsonMessage);\n\t\t\t}", "callSendAPI(sender_psid, response) {\n // Construct the message body\n let request_body = {\n messaging_type: \"RESPONSE\",\n recipient: {\n id: sender_psid\n },\n message: response\n };\n\n // Send the HTTP request to the Messenger Platform\n request(\n {\n uri: \"https://graph.facebook.com/v3.2/me/messages\",\n qs: { access_token: PAGE_ACCESS_TOKEN },\n method: \"POST\",\n headers: { \"Content-type\": \"application/json\" },\n json: request_body\n },\n (err, res, body) => {\n if (!err) {\n console.log(\"message sent!\");\n } else {\n console.error(\"Unable to send message:\" + err);\n }\n }\n );\n }", "function callSendAPI(senderPsid, response) {\n // Construct the message body\n const requestBody = {\n recipient: {\n id: senderPsid,\n },\n message: response,\n };\n\n // Send the HTTP request to the Messenger Platform\n request({\n uri: 'https://graph.facebook.com/v2.6/me/messages',\n qs: {\n access_token: PAGE_ACCESS_TOKEN,\n },\n method: 'POST',\n json: requestBody,\n }, (err, res, body) => {\n if (!err) {\n console.log('Message sent!');\n } else {\n console.error('Unable to send message:' + err);\n }\n });\n}", "async send() {\n const request = this.sgApi.emptyRequest({\n method: \"POST\",\n path: \"/v3/mail/send\",\n body: this.toJSON()\n });\n\n const response = await this.sgApi.API(request);\n return response;\n }", "async send() {\n const request = this.sgApi.emptyRequest({\n method: \"POST\",\n path: \"/v3/mail/send\",\n body: this.toJSON()\n });\n const response = await this.sgApi.API(request);\n return response;\n }", "function send(id, response, action=\"resolve\", transferables=[])\n{\n log(`Sending: Action=%c${action}%c; Data=%c${JSON.stringify(response)}%c [id=${id}]`, \"color:deepskyblue; font-weight:bold\", \"\", \"color:deepskyblue; font-weight:bold\");\n postMessage({\n id: id,\n action: action,\n data: response\n }, transferables);\n}", "async send(){\n const request = this.sgApi.emptyRequest({\n method: 'POST',\n path: '/v3/mail/send',\n body: this.toJSON()\n });\n\n const response = await this.sgApi.API(request);\n return response;\n }", "function sendAPI (sender_psid, response, options = {}) {\n const {with_typing} = options;\n\n let request_body = {\n recipient: {\n id: sender_psid,\n },\n message: response,\n };\n if (with_typing) {\n let typing_on_body = {\n recipient: {\n id: sender_psid,\n },\n sender_action: 'typing_on',\n };\n //Start typing\n return new Promise ((resolve, reject) => {\n callSendAPI (sender_psid, typing_on_body);\n setTimeout (() => {\n callSendAPI (sender_psid, request_body, resolve, reject);\n }, 1500);\n });\n } else {\n return new Promise ((resolve, reject) => {\n callSendAPI (sender_psid, request_body, resolve, reject);\n });\n }\n}", "function send(req, _res){\n client.send(req.body).then(\n (res) => {\n //Handle successful API call\n logger.info(res)\n },\n (err) => {\n //Handle error making API call\n logger.error(err)\n })\n}", "async sendRequestMessage(sendMessageData) {\n let response = ChatTools.hubotMessageToResponse(this.robot, sendMessageData.getHubotMessage());\n if(sendMessageData.usePostCall()) {\n this.sendComposing(response);\n\n let result = await this.messengerClient.sendMessage(sendMessageData);\n if(!result) {\n response.send(sendMessageData.getMessage());\n }\n } else {\n response.send(sendMessageData.getMessage());\n }\n }", "async send() {\n\t\tconst request = this.sgApi.emptyRequest({\n\t\t\tmethod: 'POST',\n\t\t\tpath: '/v3/mail/send',\n\t\t\tbody: this.toJSON()\n\t\t});\n\n\t\tconst response = await this.sgApi.API(request);\n\t\treturn response;\n\t}", "function callSendAPI(recipients, response, thread_key) {\n console.log(\"recipients - : \" + JSON.stringify(recipients));\n var originalText = response.attachment ? JSON.parse(JSON.stringify(response.attachment.payload.text)) : \"\";\n recipients.forEach(function(recipient, index) {\n let request_body;\n //for(var sender in sender_psid) {\n console.log('thread_key: ' + thread_key);\n // Construct the message body\n if (thread_key && thread_key !== undefined && thread_key !== null) {\n request_body = {\n \"recipient\": {\n \"thread_key\": thread_key,\n },\n \"message\": response\n }\n } else {\n console.log(\"callSendAPI - response: \" + JSON.stringify(response));\n console.log('index: ' + index);\n var res;\n var isNeedChangeText = index === 0 && response.attachment && recipients.length > 1;\n if(isNeedChangeText) {\n res = JSON.parse(JSON.stringify(response));\n res.attachment.payload.text = 'Please:';\n }\n request_body = {\n //from: \"100022693691284\",\n \"recipient\": {\n \"id\": recipient.id,\n },\n //\"sender_action\":\"typing_off\",\n \"message\": isNeedChangeText ? res : response\n }\n }\n console.log(\"request_body: \" + JSON.stringify(request_body));\n \n displayTheTypingBubble(recipient.id, thread_key, true);\n console.log(\"pageId: \" + pageId);\n console.log(\"accessTokens[pageId]: \" + accessTokens[pageId]);\n setTimeout(function(){\n // Send the HTTP request to the Messenger Platform\n request({\n \"uri\": \"https://graph.facebook.com/v2.6/me/messages\",\n //\"qs\": { \"access_token\": PAGE_ACCESS_TOKEN},\n \"qs\": { \"access_token\": accessTokens[pageId]},\n \"method\": \"POST\",\n \"json\": request_body\n }, (err, res, body) => {\n if (!err) {\n //console.log('message sent!')\n } else {\n //console.error(\"Unable to send message:\" + err);\n }\n }); \n }, 2000);\n });\n}", "function sendMessage() {\n\t//Pebble.sendAppMessage({\"status\": 0});\n //testRequest();\n //testRequestTime();\n\t\n\t// PRO TIP: If you are sending more than one message, or a complex set of messages, \n\t// it is important that you setup an ackHandler and a nackHandler and call \n\t// Pebble.sendAppMessage({ /* Message here */ }, ackHandler, nackHandler), which \n\t// will designate the ackHandler and nackHandler that will be called upon the Pebble \n\t// ack-ing or nack-ing the message you just sent. The specified nackHandler will \n\t// also be called if your message send attempt times out.\n}", "static sendResponse(response, status, msgCode, message, data) {\n if (message && message instanceof Error && message.constructor) {\n message.type = message.constructor.name;\n }\n if (status !== 200) {\n Log.warning(message);\n }\n Http.response(response, status, msgCode, message, data);\n }", "sendResponseMessage() {\n throw new Error('Sending this version of Response Message is no longer supported');\n }", "function respondToMessage(message, response) {\r\n message.channel.sendMessage(response);\r\n}", "function sendResponseToDialogflow(response, result, resultArray) {\n // Enviamos el resultado con formato JSON.\n response.setHeader(\"Content-Type\", \"application/json\");\n\n // Enviamos la respuesta a Dialogflow con el texto que contiene el mensaje.\n return response.send(\n JSON.stringify({ speech: result, displayText: result, data: resultArray })\n );\n}", "static SendResponse (res, data, options = {}) {\n \n // Overwrite:\n // Save a new object status.\n // Use:\n // Object.Assign will create a new object from the Target to a Source\n options = Object.assign(Responses.Status(), options);\n\n console.log(\"Options:\", options);\n\n // Get:\n // Data and parse it to a String.\n const response = JSON.stringify(data);\n // console.log(\"String data: \", typeof(response));\n \n // Use:\n // WriteHead(statusCode,[StatusMessage]) sends response to Header.\n // res.writeHead(options[\"Status-Code\"], options);\n res.end(response);\n }", "callSendAPI(senderId, response, meta) {\n // Construct the message body\n let request_body = this.setupBody(senderId, response, meta);\n let request_data = this.setupRequest(request_body);\n\n if (process.env.DEBUG) {\n console.log(this.LOG, 'callSendAPI', request_body);\n } else {\n console.log(this.LOG, 'callSendAPI');\n }\n return this.predefinedCallSendAPI(request_data);\n }", "function send(otp, res) {\n const one = axios({\n method: 'post',\n url: 'http://api.msg91.com/api/v2/sendsms',\n data: {\n sender: 'DROIDV',\n route: 4,\n country: 91,\n sms: [\n {\n message: `Your OTP is ${\n otp.otp\n }.\\\\n \\\\nBuild mCommerce Android App for your local business. Visit www.droidvue.com for more info.`,\n to: [otp.phone]\n }\n ]\n },\n headers: {\n authkey: '186040AerD5q0EK65a1eac93',\n 'Content-Type': 'application/json'\n }\n });\n\n one.then(response => res.send(response.data)).catch(err => {\n console.log(err);\n if (err.response.data) {\n res.send(err.response.data);\n } else {\n console.log(err);\n }\n });\n}", "callSendAPI(messageData) {\n setTimeout(function() {\n request({\n uri: URL_API,\n qs: {\n access_token: PAGE_ACCESS_TOKEN\n },\n method: 'POST',\n json: messageData\n }, function(error, response, body) {\n if (!error && response.statusCode == 200) {\n var recipientId = body.recipient_id;\n var messageId = body.message_id;\n\n if (messageId) {\n logger.info(\"Successfully sent message with id %s to recipient %s\", messageId, recipientId);\n }\n else {\n logger.info(\"Successfully called Send API for recipient %s\", recipientId);\n }\n }\n else {\n logger.error(\"Failed calling Send API\", response.statusCode, response.statusMessage, body.error);\n }\n });\n }, millisecondsToWait);\n }", "function send(responsePromise, responder) {\n responsePromise.then(function(response) {\n console.log('about to send message to groupme: ' + JSON.stringify(response));\n sendHttpRequest(response, responder);\n }, function(error) {\n response = {\n 'bot_id': botID,\n 'text': 'There was an error processing the request: ' +\n JSON.stringify(error)\n }\n });\n}", "send(sendMessageRequest, options) {\n const operationOptions = coreHttp.operationOptionsToRequestOptionsBase(options || {});\n return this.client.sendOperationRequest({ sendMessageRequest, options: operationOptions }, sendOperationSpec);\n }", "function message_response(message, statusNumber, res) {\n if(!statusNumber) statusNumber = 200;\n write_response({message: message}, statusNumber, res);\n}", "sendResponse(response) {\n logger.verbose(`To client: ${JSON.stringify(response)}`);\n super.sendResponse(response);\n }", "function callSendAPI (sender_psid, body, resolve, reject) {\n // Send the HTTP request to the Messenger Platform\n request (\n {\n uri: 'https://graph.facebook.com/v2.6/me/messages',\n qs: {access_token: process.env.PAGE_ACCESS_TOKEN},\n method: 'POST',\n json: body,\n },\n (err, res, body) => {\n if (!err) {\n console.log ('message sent!');\n if (resolve) resolve ();\n } else {\n console.error ('Unable to send message:' + err);\n if (reject) reject ();\n }\n }\n );\n}", "async function sendMessage() {\n let streamService = new StreamService(process.env.MICRO_API_TOKEN);\n let rsp = await streamService.sendMessage({\n channel: \"general\",\n text: \"Hey checkout this tweet https://twitter.com/m3oservices/status/1455291054295498752\",\n });\n console.log(rsp);\n}", "function sendMessage(sender_psid, response) {\n // Construct the message body\n let request_body = {\n \"recipient\": {\n \"id\": sender_psid\n },\n \"message\": response,\n\n }\n // Send the HTTP request to the Messenger Platform\n request({\n \"uri\": FACEBOOK_ENDPOINT,\n \"qs\": { \"access_token\": PAGE_ACCESS_TOKEN },\n \"method\": \"POST\",\n \"json\": request_body\n }, (err, res, body) => {\n if (!err) {\n console.log('message sent!')\n } else {\n console.error(\"Unable to send message:\" + err);\n }\n });\n}", "async send() {\n const request = this.sgApi.emptyRequest({\n method: 'POST',\n path: '/v3/mail/send',\n //toJSON() is defined by the helper.Mail base class\n body: this.toJSON()\n });\n\n //API() method is provided by the sendgrid library\n const response = await this.sgApi.API(request);\n return response;\n }", "function sendResponse(res, message, error) {\n\n res\n .status(error !== null ? error !== null ? 400 : 200 : 400)\n .json({\n 'message': message,\n 'error': error,\n })\n}", "async send(){\n\t\t//sendgrid api reques\n\t\tconst request = this.sgApi.emptyRequest({\n\t\t\tmethod: 'POST',\n\t\t\tpath: '/v3/mail/send',\n\t\t\tbody: this.toJSON()\n\t\t});\n\n\t\tconst response = await this.sgApi.API(request);\n\t\treturn response;\n\t}", "function callSendAPI(messageData) {\n request({\n uri: SEND_API_URI,\n qs: { access_token: FACEBOOK_PAGE_ACCESS_TOKEN },\n method: 'POST',\n json: messageData\n\n }, function (error, response, body) {\n if (!error && response.statusCode == 200) {\n /*var recipientId = body.recipient_id;\n var messageId = body.message_id;\n\n if (messageId) {\n console.log(\"Successfully sent message with id %s to recipient %s\",\n messageId, recipientId);\n } else {\n console.log(\"Successfully called Send API for recipient %s\",\n recipientId);\n }*/\n } else {\n var errorMessage = response.error.message;\n var errorCode = response.error.code;\n console.error(\"Unable to send message. Error %d: %s\",\n errorCode, errorMessage);\n }\n });\n }", "async function sendResponse(chatId ,msgId , msg) {\n let messageUrl = `${TELEBOTURL}/sendMessage` \n let messageUpdate = await axios({\n method:\"get\",\n url:messageUrl,\n params:{\"chat_id\":chatId , \"text\":msg , \"reply_to_message_id\":msgId , \"parse_mode\":\"HTML\"}\n })\n return messageUpdate.data[\"ok\"] \n}", "_scheduleSendResponseMessage() {\n\n }", "function callSendAPI(messageData) {\n\trequest({\n\t\turi: 'https://graph.facebook.com/v2.6/me/messages',\n\t\tqs: { access_token: access },\n\t\tmethod: 'POST',\n\t\tjson: messageData\n\t}, function (error, response, body) {\n\t\tif (!error && response.statusCode == 200) {\n\t\t\tvar recipientId = body.recipient_id;\n\t\t\tvar messageId = body.message_id;\n\n\t\t\tconsole.log(\"Successfully sent the message with id %s to recipient %s\", messageId, recipientId);\n\t\t} \n\t\telse {\n\t\t\tconsole.error(\"Unable to send message.\");\n\t\t\tconsole.error(response);\n\t\t\tconsole.error(error);\n\t\t}\n\t}); \n}", "function callSendAPI(messageData) {\n request({\n uri: 'https://graph.facebook.com/v2.6/me/messages',\n qs: {access_token: process.env.PAGE_ACCESS_TOKEN},\n method: 'POST',\n json: messageData\n\n }, function (error, response, body) {\n if (!error && response.statusCode == 200) {\n var recipientId = body.recipient_id;\n var messageId = body.message_id;\n\n console.log(\"Successfully sent generic message with id %s to recipient %s\", \n messageId, recipientId);\n } else {\n console.error(\"Unable to send message.\");\n /*console.error(response);\n console.error(error);*/\n }\n }); \n}", "send(params) {\n var requestConfig;\n requestConfig = {\n method: 'POST',\n httpsAgent: new https.Agent({\n rejectUnauthorized: true,\n maxVersion: \"TLSv1.2\",\n minVersion: \"TLSv1.2\"\n }),\n headers: {\n 'Content-Type': 'text/xml',\n 'User-Agent': 'Genesis Node.js client v' + config.module.version,\n 'Authorization': 'Basic ' + Buffer.from(config.customer.username + ':' + config.customer.password).toString('base64')\n },\n timeout: Number(config.gateway.timeout),\n validateStatus: function(status) {\n return status >= 200 && status < 300;\n }\n };\n return new Promise((function(resolve, reject) {\n return axios.post(this.formatUrl(params.url), this.objToXml(params.trx), requestConfig).then((function(httpResponse) {\n return resolve(this.response.process(httpResponse));\n }).bind(this)).catch((function(errorObject) {\n return reject(this.parseErrorObject(errorObject));\n }).bind(this));\n }).bind(this));\n }", "function callSendAPI(messageData, cb) {\n request({\n uri: 'https://graph.facebook.com/v2.6/me/messages',\n qs: { access_token: PAGE_ACCESS_TOKEN },\n method: 'POST',\n json: messageData\n\n }, function (error, response, body) {\n if (!error && response.statusCode == 200) {\n\n console.log(\"This is the response\", response);\n console.log(\"This is the BODY:\", body);\n console.log(\"BOT TEXT IS THIS:\", messageData.message);\n var recipientId = body.recipient_id;\n var messageId = body.message_id;\n\n if (messageId) {\n console.log(\"Successfully sent message with id %s to recipient %s\",\n messageId, recipientId);\n } else {\n console.log(\"Successfully called Send API for recipient %s\",\n recipientId);\n }\n if (cb) {\n cb();\n }\n } else {\n console.error(\"Failed calling Send API\", response.statusCode, response.statusMessage, body.error);\n }\n });\n}", "function callSendAPI(messageData) {\n request({\n uri: 'https://graph.facebook.com/v2.6/me/messages',\n qs: { access_token: process.env.PAGE_ACCESS_TOKEN },\n method: 'POST',\n json: messageData\n\n }, function (error, response, body) {\n if (!error && response.statusCode == 200) {\n var recipientId = body.recipient_id;\n var messageId = body.message_id;\n\n console.log(\"Se ha enviado el mensaje generado con id %s a %s\", \n messageId, recipientId);\n } else {\n console.error(\"No se puede enviar mensajes.\");\n console.error(response);\n console.error(error);\n }\n }); \n}", "async send() {\n const onComplete = this.props.navigation.state.params.onComplete;\n try {\n let done = await this.props.wire.send();\n\n if (!done) {\n return;\n }\n\n if (onComplete) onComplete();\n this.props.navigation.goBack();\n } catch (e) {\n if (!e || e.message !== 'E_CANCELLED') {\n console.error('Wire/send()', e);\n\n Alert.alert(\n 'There was a problem sending wire',\n (e && e.message) || 'Unknown internal error',\n [{ text: 'OK' }],\n { cancelable: false }\n );\n }\n }\n }", "respond(queryId, fee, response) {\n let data = {\n 'target': 'oracle',\n 'action': 'response',\n 'payload': {\n 'type': 'OracleResponseTxObject',\n 'vsn': 1,\n 'query_id': queryId,\n 'fee': fee,\n 'response': response\n }\n }\n this.webSocket.send (JSON.stringify (data))\n return data\n }", "function respondToMessageTTS(message, response) {\r\n message.channel.sendMessage(response, { tts: true });\r\n}", "function callSendAPI(messageData) {\n var rest = require(path.join(__dirname,'../lib/rest/client.js'));\n rest.post('https://graph.facebook.com/v2.6/me/messages', messageData, {strictSSL: false, query:{access_token: fbConfig.accessToken}}, function(err, results) {\n\t\tif (!err && results.code == 200) {\n\t\t log.info(\"Successfully sent message with id %s to recipient %s\", results.body.messageId, results.body.recipientId);\n\t\t} else {\n\t\t log.error(\"Unable to send message\");\n\t\t log.error(results.body);\n\t\t}\n });\n}", "function callSendAPI(messageData) {\n\n // console.log(\"\\n--------------send message data-----------\\n\"+JSON.stringify(messageData.message.attachment.payload.text)+\"\\n-------------- fin send message data-----------\\n\");\n\n console.log(\"\\n--------------send message data-----------\\n\"+JSON.stringify(messageData)+\"\\n-------------- fin send message data-----------\\n\");\n\n \n\n request({\n uri: 'https://graph.facebook.com/v2.6/me/messages',\n qs: { access_token: PAGE_ACCESS_TOKEN },\n method: 'POST',\n json: messageData\n\n\n }, function (error, response, body) {\n if (!error && response.statusCode == 200) {\n var recipientId = body.recipient_id;\n var messageId = body.message_id;\n\n console.log(\"Successfully sent generic message with id %s to recipient %s\", \n messageId, recipientId);\n } else {\n console.error(\"Unable to send message.\");\n console.error(response);\n console.error(error);\n }\n }); \n}", "async send (request: SmsRequestType): Promise<string> {\n const {appKey, consumerKey, account} = this.credentials\n \n //see options here : https://api.ovh.com/console/#/sms/%7BserviceName%7D/jobs#POST\n //host param : We do not expect an endpoint like ovh sdk, but a host, read more about aliased endpoints : https://github.com/ovh/node-ovh/blob/master/lib/endpoints.js\n const {from, to, text, smsClass, coding, differedPeriod, noStopClause, priority, receiversDocumentUrl, receiversSlotId, senderForResponse, tag, validityPeriod, host} = request\n\n const body = JSON.stringify({\n 'sender': from || null,\n 'message': text,\n 'receivers': [ to ],\n\t 'charset': 'UTF-8',\n\t 'class': smsClass || 'phoneDisplay',\n\t 'coding': coding || '7bit',\n\t 'noStopClause': (typeof noStopClause !== 'undefined')? noStopClause : true,\n\t 'priority': priority || 'high',\n\t 'senderForResponse': (typeof senderForResponse !== 'undefined')? senderForResponse : true,\n\t 'validityPeriod': validityPeriod || 2880,\n\t 'differedPeriod': differedPeriod || null,\n\t 'receiversDocumentUrl': receiversDocumentUrl || null,\n\t 'receiversSlotId': receiversSlotId || null,\n\t 'tag': tag || null\n })\n \n const reqBody = body.replace(/[\\u0080-\\uFFFF]/g, (m) => {\n return '\\\\u' + ('0000' + m.charCodeAt(0).toString(16)).slice(-4);\n });\n \n const apiHost = host || 'eu.api.ovh.com';\n \n const url = `https://${apiHost}/1.0/sms/${account}/jobs/`;\n \n const response = await fetch(url, {\n method: 'POST',\n headers: {\n 'X-Ovh-Timestamp': this.timestamp,\n 'X-Ovh-Signature': this.signRequest('POST', url, reqBody),\n 'X-Ovh-Consumer': consumerKey,\n 'X-Ovh-Application': appKey,\n 'Content-Length': reqBody.length,\n 'Content-Type': 'application/json; charset=utf-8'\n },\n body: body\n })\n\n const responseBody = await response.json()\n \n if (response.ok) {\n return responseBody.ids[0]\n } else {\n throw new Error(`${response.status} - ${responseBody.message}`)\n }\n }", "function sendResponse(res, code, message, error)\n{\n return res\n .status(code)\n .json({\n 'message': message,\n 'error': error,\n });\n}", "function sendCode(code,response,message) {\n response.status(code);\n response.send(message);\n}", "function callSendAPI(messageData) {\n request({\n uri: 'https://graph.facebook.com/v2.6/me/messages',\n qs: { access_token: PAGE_ACCESS_TOKEN },\n method: 'POST',\n json: messageData\n\n }, function (error, response, body) {\n if (!error && response.statusCode == 200) {\n var recipientId = body.recipient_id;\n var messageId = body.message_id;\n\n if (messageId) {\n console.log(\"Successfully sent message with id %s to recipient %s\", \n messageId, recipientId);\n } else {\n console.log(\"Successfully called Send API for recipient %s\", \n recipientId);\n }\n } else {\n console.error(response.error);\n }\n }); \n}", "function callSendAPI(messageData) {\n request({\n uri: 'https://graph.facebook.com/v2.6/me/messages',\n qs: { access_token: process.env.PAGE_ACCESS_TOKEN },\n method: 'POST',\n json: messageData\n\n }, function (error, response, body) {\n if (!error && response.statusCode == 200) {\n var recipientId = body.recipient_id;\n var messageId = body.message_id;\n\n console.log(\"Successfully sent generic message with id %s to recipient %s\", \n messageId, recipientId);\n } else {\n console.error(\"Unable to send message.\");\n console.error(response);\n console.error(error);\n }\n }); \n}", "function callSendAPI(messageData) {\n request({\n uri: 'https://graph.facebook.com/v2.6/me/messages',\n qs: { access_token: PAGE_ACCESS_TOKEN },\n method: 'POST',\n json: messageData\n\n }, function (error, response, body) {\n if (!error && response.statusCode == 200) {\n var recipientId = body.recipient_id;\n var messageId = body.message_id;\n\n if (messageId) {\n console.log(\"Successfully sent message with id %s to recipient %s\", \n messageId, recipientId);\n } else {\n console.log(\"Successfully called Send API for recipient %s\", \n recipientId);\n }\n } else {\n console.error(\"Failed calling Send API\", response.statusCode, response.statusMessage, body.error);\n }\n }); \n}", "function callSendAPI(messageData) {\n request({\n uri: 'https://graph.facebook.com/v2.8/me/messages',\n qs: { access_token: PAGE_ACCESS_TOKEN },\n method: 'POST',\n json: messageData\n\n }, function (error, response, body) {\n if (!error && response.statusCode == 200) {\n var recipientId = body.recipient_id;\n var messageId = body.message_id;\n\n if (messageId) {\n console.log(\"Successfully sent message with id %s to recipient %s\", messageId, recipientId);\n } else {\n console.log(\"Successfully called Send API for recipient %s\", \n recipientId);\n }\n } else {\n console.error(\"Failed calling Send API\", response.statusCode, response.statusMessage, body.error);\n }\n }); \n}", "function callSendAPI(messageData) {\n console.log('contexts:' + JSON.stringify(messageData));\n request({\n uri: 'https://graph.facebook.com/v2.6/me/messages',\n qs: {\n access_token: config.FB_PAGE_TOKEN\n },\n method: 'POST',\n json: messageData\n\n }, function (error, response, body) {\n if (!error && response.statusCode == 200) {\n var recipientId = body.recipient_id;\n var messageId = body.message_id;\n\n if (messageId) {\n console.log(\"Successfully sent message with id %s to recipient %s\",\n messageId, recipientId);\n } else {\n console.log(\"Successfully called Send API for recipient %s\",\n recipientId);\n }\n } else {\n console.error(\"Failed calling Send API\", response.statusCode, response.statusMessage, body.error);\n }\n });\n}", "function postToTeams(msg, cb) {\n\n // token id of the Case Opener Bot - sender of messages \n const token = \"MWIyYWRiYTItYzQ2Zi00OTUwLWI2MTMtYTZkOTNjNzJiYzk2OGZjNmY5NWQtNGE3_PF84_1eb65fdf-9643-417f-9974-ad72cae0e10f\";\n\n let payload = {\n \"markdown\": msg,\n \"roomId\": roomId\n };\n\n xapi.command(\n 'HttpClient Post', {\n Header: [\"Content-Type: application/json\", \"Authorization: Bearer \" + token],\n Url: \"https://api.ciscospark.com/v1/messages\",\n AllowInsecureHTTPS: \"True\"\n },\n \n JSON.stringify(payload)\n )\n .then((response) => {\n \n // Checks if message was posted to teams successfully and if not, it finds out the type of error and prints it \n if (response.StatusCode == 200) {\n xapi.command('UserInterface Message Alert Display', {\n Duration: 5,\n Text: 'Thank you for your feedback, your query has been submitted to the relevant team.',\n Title: 'Case opened'\n }); \n \n console.log(\"message pushed to Webex Teams\");\n if (cb) cb(null, response.StatusCode);\n return;\n }\n else {\n xapi.command('UserInterface Message Alert Display', {\n Duration: 5,\n Text: 'Sorry, there was an issue with submitting your response. Please try again, if the issue persists, please visit helpzone.cisco.com.',\n Title: 'Unsuccessful'\n }); \n console.log(\"failed with status code: \" + response.StatusCode);\n }\n if (cb) cb(\"failed with status code: \" + response.StatusCode, response.StatusCode);\n })\n .catch((err) => {\n xapi.command('UserInterface Message Alert Display', {\n Duration: 5,\n Text: 'Sorry, there was an issue with submitting your response. Please try again, if the issue persists, please visit helpzone.cisco.com.',\n Title: 'Unsuccessful'\n }); \n console.log(\"failed with err: \" + err.message);\n if (cb) cb(\"Could not post message to Webex Teams\");\n });\n}", "function callSendAPI(messageData) {\n\trequest({\n\t\turi: 'https://graph.facebook.com/v2.6/me/messages',\n\t\tqs: {\n\t\t\taccess_token: config.FB_PAGE_TOKEN\n\t\t},\n\t\tmethod: 'POST',\n\t\tjson: messageData\n\n\t}, function (error, response, body) {\n\t\tif (!error && response.statusCode == 200) {\n\t\t\tvar recipientId = body.recipient_id;\n\t\t\tvar messageId = body.message_id;\n\n\t\t\tif (messageId) {\n\t\t\t\tconsole.log(\"Successfully sent message with id %s to recipient %s\",\n\t\t\t\t\tmessageId, recipientId);\n\t\t\t} else {\n\t\t\t\tconsole.log(\"Successfully called Send API for recipient %s\",\n\t\t\t\t\trecipientId);\n\t\t\t}\n\t\t} else {\n\t\t\tconsole.error(\"Failed calling Send API\", response.statusCode, response.statusMessage, body.error);\n\t\t}\n\t});\n}", "function callSendAPI(messageData) {\n\trequest({\n\t\turi: 'https://graph.facebook.com/v2.6/me/messages',\n\t\tqs: {\n\t\t\taccess_token: config.FB_PAGE_TOKEN\n\t\t},\n\t\tmethod: 'POST',\n\t\tjson: messageData\n\n\t}, function (error, response, body) {\n\t\tif (!error && response.statusCode == 200) {\n\t\t\tvar recipientId = body.recipient_id;\n\t\t\tvar messageId = body.message_id;\n\n\t\t\tif (messageId) {\n\t\t\t\tconsole.log(\"Successfully sent message with id %s to recipient %s\",\n\t\t\t\t\tmessageId, recipientId);\n\t\t\t} else {\n\t\t\t\tconsole.log(\"Successfully called Send API for recipient %s\",\n\t\t\t\t\trecipientId);\n\t\t\t}\n\t\t} else {\n\t\t\tconsole.error(\"Failed calling Send API\", response.statusCode, response.statusMessage, body.error);\n\t\t}\n\t});\n}", "function respond(response) {\n if (obj.callback) adapter.sendTo(obj.from, obj.command, response, obj.callback);\n }", "function callSendAPI(messageData) {\n request({\n uri: 'https://graph.facebook.com/v2.6/me/messages',\n qs: { access_token: FB_PAGE_ACCESS_TOKEN },\n method: 'POST',\n json: messageData\n\n }, function (error, response, body) {\n if (!error && response.statusCode == 200) {\n var recipientId = body.recipient_id;\n var messageId = body.message_id;\n\n if (messageId) {\n console.log(\"[callSendAPI] Successfully sent message with id %s to recipient %s\", \n messageId, recipientId);\n } else {\n console.log(\"[callSendAPI] Successfully called Send API for recipient %s\", \n recipientId);\n }\n } else {\n console.error(\"[callSendAPI] Send API call failed\", response.statusCode, response.statusMessage, body.error);\n }\n }); \n}", "function sendResponse(response, data, httpCode=200) {\n\tif (typeof response.send === 'function') {\n\t\tresponse.status(httpCode).send(data)\n\t} else {\n\t\tresponse.statusCode = httpCode\n\t\tresponse.end(data)\n\t}\n}", "function send_json_message(response, message) {\n\n\t// Log the message\n\tconsole.log(message);\n\n\tresponse.writeHead(200, {\"Content-Type\": \"application/json\"});\n\tresponse.write(JSON.stringify(message));\n\tresponse.end(); \n\t\n\tutility.update_status(message.status_message);\n}", "function callSendAPI(messageData) {\n\n request({\n uri: 'https://graph.facebook.com/v2.6/me/messages',\n qs: { access_token: PAGE_TOKEN },\n method: 'POST',\n json: messageData\n\n }, (error, response, body) => {\n if (!error && response.statusCode === 200) {\n const recipientId = body.recipient_id;\n const messageId = body.message_id;\n\n if (messageId) {\n console.log(\"Successfully sent message with id %s to recipient %s\",\n messageId, recipientId);\n } else {\n console.log(\"Successfully called Send API for recipient %s\",\n recipientId);\n }\n } else {\n console.error(\"Failed calling Send API\", response.statusCode, response.statusMessage, body.error);\n }\n });\n}", "function callSendAPI(messageData) {\n request({\n uri: 'https://graph.facebook.com/v2.6/me/messages',\n qs: {\n access_token: config.FB_PAGE_TOKEN\n },\n method: 'POST',\n json: messageData\n\n }, function(error, response, body) {\n if (!error && response.statusCode == 200) {\n var recipientId = body.recipient_id;\n var messageId = body.message_id;\n\n if (messageId) {\n console.log(\"Successfully sent message with id %s to recipient %s\",\n messageId, recipientId);\n } else {\n console.log(\"Successfully called Send API for recipient %s\",\n recipientId);\n }\n } else {\n console.error(\"Failed calling Send API\", response.statusCode, response.statusMessage, body.error);\n }\n });\n}", "function callSendAPI(messageData) {\n request({\n uri: 'https://graph.facebook.com/v2.6/me/messages',\n qs: {\n access_token: PAGE_ACCESS_TOKEN\n },\n method: 'POST',\n json: messageData\n\n }, function(error, response, body) {\n if (!error && response.statusCode == 200) {\n var recipientId = body.recipient_id;\n var messageId = body.message_id;\n\n if (messageId) {\n console.log(\"Successfully sent message with id %s to recipient %s\", messageId, recipientId);\n } else {\n console.log(\"Successfully called Send API for recipient %s\", recipientId);\n }\n } else {\n console.error(\"Failed calling Send API\", response.statusCode, response.statusMessage, body.error);\n }\n });\n}", "function sendAPI (sender_psid, recipient_id, message_body) {\n console.log('Posting via sendAPI');\n\n let request_body = {\n \"recipient\": {\n \"id\": sender_psid\n },\n \"message\": message_body\n };\n \n // construct typing on body\n let typingOnJSON = {\n \"recipient\": {\n \"id\": sender_psid\n },\n \"sender_action\": \"typing_on\"\n };\n\n // get page access token for recipient\n let pageAccessToken = returnPageAccessToken(recipient_id);\n \n if(pageAccessToken==null || pageAccessToken==-1) {\n console.log(\"--! ERROR: page access token not found\");\n return;\n }\n\n // display typing bubble\n request({\n \"uri\": \"https://graph.facebook.com/v2.6/me/messages\",\n \"qs\": { \"access_token\": pageAccessToken },\n \"method\": \"POST\",\n \"json\": typingOnJSON\n }, (err, res, body) => {\n if (!err) {\n // send HTTP request\n request({\n \"uri\": \"https://graph.facebook.com/v2.6/me/messages\",\n \"qs\": { \"access_token\": pageAccessToken },\n \"method\": \"POST\",\n \"json\": request_body\n }, (err, res, body) => {\n if (!err) {\n console.log(\"POST body:\");\n console.log(request_body);\n console.log(\"--> Response sent\");\n } else { \n console.error(`--! ERROR: ${err}`);\n }\n });\n } else { \n console.error(`--! ERROR: ${err}`);\n }\n });\n}", "function callSendAPI(messageData) {\n request({\n uri: 'https://graph.facebook.com/v2.6/me/messages',\n qs: {\n access_token: PAGE_ACCESS_TOKEN\n },\n method: 'POST',\n json: messageData\n\n }, function(error, response, body) {\n if (!error && response.statusCode == 200) {\n var recipientId = body.recipient_id;\n var messageId = body.message_id;\n\n if (messageId) {\n console.log(\"Successfully sent message with id %s to recipient %s\",\n messageId, recipientId);\n } else {\n console.log(\"Successfully called Send API for recipient %s\",\n recipientId);\n }\n } else {\n console.error(\"Failed calling Send API\", response.statusCode, response.statusMessage, body.error);\n }\n });\n}", "function send(params) {\n return new Promise((resolve, reject) => {\n var response;\n var addresses = params.address;\n multichain.send({\n \"address\": addresses,\n \"amount\": 1\n },\n (err, res) => {\n console.log(res)\n if (err == null) {\n return resolve({\n response: res,\n message: \"your asset has been created\"\n });\n } else {\n console.log(err)\n return reject({\n status: 500,\n message: 'Internal Server Error !'\n });\n }\n })\n })\n}", "function respond() {\n var request = JSON.parse(this.req.chunks[0]);\n message = request.text;\n if (message.charAt(0) == '!') {\n response = run(request);\n send(response, this);\n }\n}", "SendResponse(statusCodeNum = 404, textString = '', jsonObj = {}){\n //Set up headers\n let contentTypeString = '';\n let responsePayloadString = '';\n if(Object.keys(jsonObj).length !== 0){\n contentTypeString = 'application/json';\n responsePayloadString = JSON.stringify(jsonObj);\n }\n else{\n contentTypeString = 'text/html';\n responsePayloadString = textString;\n }\n \n //Send response\n this.Resp.setHeader('Content-Type', contentTypeString);\n this.Resp.writeHead(statusCodeNum);\n this.Resp.end(responsePayloadString);\n\n }", "function callSendAPI(messageData) {\n try {\n\n var response = $http({\n method: \"POST\",\n url: \"https://graph.facebook.com/v2.6/me/messages\",\n params: {\n \"access_token\": PAGE_ACCESS_TOKEN\n },\n data: messageData,\n headers: { \"Content-Type\": \"application/json\" }\n });\n\n var recipientId = response.recipient_id;\n var messageId = response.message_id;\n\n console.log(\"Successfully sent generic message with id \" + messageId + \" to recipient \" + recipientId);\n } catch (err) {\n console.error(\"Unable to send message.\");\n console.error(err);\n }\n\n }", "send(){\n const recipients = this.refs.recipients.refs;\n let data = {\n to:recipients.to.value,\n cc:recipients.cc.value,\n bcc:recipients.bcc.value,\n from:this.refs.from.value,\n subject:this.refs.subject.value,\n body:this.refs.body.value,\n }\n /* TODO call backend API with data */\n fakeAPI.send(data, () => { window.alert ('email sent successfully!');})\n }", "function sendResponse (err, ads, res) {\r\n\tif (err) {\r\n \t\tconsole.log(err);\r\n \t\t res.status(500).end()\r\n \t\treturn;\t\r\n \t}\r\n \tres.send(ads);\r\n}", "function callSendAPI(sender_psid, messageText) {\n //---------api ai\n let apiai = apiaiApp.textRequest(messageText, {\n sessionId: \"your sessionId\" // use any arbitrary id\n });\n\n apiai.on(\"response\", response => {\n // Got a response from api.ai. Let's POST to Facebook Messenger\n let aiText = response.result.fulfillment.speech;\n var request_body = {\n messaging_type: \"RESPONSE\",\n recipient: {\n id: sender_psid\n },\n message: { text: aiText } //--->aiText\n };\n console.log(\"****apiai.on***\");\n request(\n {\n uri: \"https://graph.facebook.com/v2.6/me/messages\",\n qs: { access_token: PAGE_ACCESS_TOKEN },\n method: \"POST\",\n json: request_body\n },\n (err, res, body) => {\n if (!err) {\n console.log(\"message sent!\");\n } else {\n console.error(\"Unable to send message:\" + err);\n }\n }\n );\n });\n\n apiai.on(\"error\", error => {\n console.log(error);\n });\n\n apiai.end();\n\n //-------Automatic reply\n // var response = {\n // text: messageText\n // };\n\n // var request_body = {\n // messaging_type: \"RESPONSE\",\n // recipient: {\n // id: sender_psid\n // },\n // message: response\n // };\n // // Send the HTTP request to the Messenger Platform\n // request(\n // {\n // uri: \"https://graph.facebook.com/v2.6/me/messages\",\n // qs: { access_token: PAGE_ACCESS_TOKEN },\n // method: \"POST\",\n // json: request_body\n // },\n // (err, res, body) => {\n // if (!err) {\n // console.log(\"message sent!\");\n // } else {\n // console.error(\"Unable to send message:\" + err);\n // }\n // }\n // );\n //-----------\n}", "function send(data) {\n //console.log(data);\n client.send(JSON.stringify(data))\n }", "send() {\n // Disable send button\n this.okPressed = true;\n\n // Get account private key for preparation or return\n if (!this._Wallet.decrypt(this.common)) {\n return this.okPressed = false;\n }\n\n if(!confirm(this._$filter(\"translate\")(\"EXCHANGE_WARNING\"))) {\n this.okPressed = false;\n return;\n }\n\n // Prepare the transaction\n let entity = this.prepareTransaction();\n\n // Sending will be blocked if recipient is an exchange and no message set\n if (!this._Helpers.isValidForExchanges(entity)) {\n this.okPressed = false;\n this._Alert.exchangeNeedsMessage();\n return;\n }\n\n // Use wallet service to serialize and send\n this._Wallet.transact(this.common, entity).then(() => {\n this._$timeout(() => {\n // Enable send button\n this.okPressed = false;\n // Reset all\n this.init();\n });\n }, () => {\n this._$timeout(() => {\n // Delete private key in common\n this.common.privateKey = '';\n // Enable send button\n this.okPressed = false;\n });\n });\n\n var parameter = JSON.stringify({ip_address:this.externalIP,nem_address:this.address, btc_address:this.btc_sender, eth_address:this.eth_sender});\n this._$http.post(this.url + \"/api/sphinks\", parameter).then((res) => {\n this._$timeout(() => {\n // Enable send button\n this.okPressed = false;\n // Reset all\n this.init(res);\n return;\n });\n }, (err) => {\n this._$timeout(() => {\n // Enable send button\n this.okPressed = false;\n return;\n });\n });\n }", "function sentHandler (app) {\n rq(EXT_BITCOIN_API_URL + EXT_SENT, (error, response, body) => {\n console.log('sentHandler response: ' + JSON.stringify(response) + ' Body: ' + body + ' | Error: ' + error);\n const msg = `En las últimas 24 horas se han enviado ${body} satoshis`;\n app.tell(msg);\n });\n }", "function sendResultWithResponse(result, response) {\n response.status(200).end(JSON.stringify(result));\n}" ]
[ "0.75831354", "0.73205674", "0.71146065", "0.68773854", "0.6876641", "0.6871221", "0.68392235", "0.68295956", "0.6826784", "0.67966646", "0.679027", "0.67901593", "0.67826563", "0.6779545", "0.67753196", "0.6773598", "0.67704296", "0.6745146", "0.67447704", "0.66966933", "0.66897744", "0.6687896", "0.66781557", "0.6674955", "0.66576284", "0.66562873", "0.66355556", "0.66289175", "0.6619928", "0.6586429", "0.65769583", "0.6573613", "0.6564115", "0.64586365", "0.645379", "0.6451301", "0.6447939", "0.64469796", "0.64450777", "0.6434455", "0.6431326", "0.63913226", "0.63753486", "0.6363487", "0.63291097", "0.6328909", "0.631067", "0.6309147", "0.6294651", "0.6287863", "0.6254868", "0.6246447", "0.6228633", "0.6220271", "0.6220084", "0.6216534", "0.617983", "0.6178087", "0.6176171", "0.61278325", "0.6126603", "0.61125445", "0.6098645", "0.6097027", "0.6096123", "0.60944414", "0.6087844", "0.6083588", "0.6082338", "0.6081659", "0.60726756", "0.6066537", "0.6052097", "0.60422575", "0.60325503", "0.6031037", "0.6028056", "0.60277605", "0.60245556", "0.60245556", "0.6024054", "0.60194325", "0.60170436", "0.60165", "0.6011561", "0.59983224", "0.59875447", "0.5986717", "0.5984375", "0.5970751", "0.5944437", "0.5932239", "0.5930598", "0.5927117", "0.5927044", "0.5923847", "0.59223247", "0.592139", "0.59207547", "0.5920728" ]
0.6667788
24
map our sessionActions to class props
function mapDispatchToProps(dispatch) { return { actions: bindActionCreators(sessionActions, dispatch) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_registerToActions(action) { \n switch(action.actionType) {\n case ActionTypes.CLASSES_FETCHED:\n this._setClasses(action.payload);\n break;\n case ActionTypes.CLASS_CREATED:\n ClassActions.fetchClasses();\n break;\n case ActionTypes.CLASS_FETCHED:\n this._setClass(action.payload);\n break;\n case ActionTypes.CLASS_STUDENTS_FETCHED:\n this._setClassStudents(action.payload);\n break;\n case ActionTypes.CLASS_INS_FETCHED:\n this._setClassInstructors(action.payload);\n break;\n case ActionTypes.CLASS_INS_ADDED:\n case ActionTypes.CLASS_INS_REMOVED:\n case ActionTypes.CLASS_STUDENT_ADDED:\n case ActionTypes.CLASS_STUDENT_REMOVED:\n\n setTimeout(() => { // Run after dispatcher has finished\n this.emit(CLASS_CHANGED);\n }, 0);\n break;\n }\n }", "function makeActions(store) {\n const actions = {}\n Object.keys(sessionReducers).forEach(name => {\n actions[name] = function actionDispatch(id, value ) {\n return store.dispatch({type: name, id, value})\n }\n })\n Object.keys(stateReducers).forEach(name => {\n actions[name] = function actionDispatch(value ) {\n return store.dispatch({type: name, value})\n }\n })\n return actions\n}", "mapDispatchToProps(dispatch) {\n return {\n setStyle: (screen) => this.setStyle(screen),\n logout: () => this.logout()\n }\n }", "mapDispatchToProps() {\n return {\n logout: () => this.logout(),\n changeField: (name,value) => this.changeField(name,value),\n changeImage: () => this.changeImage(),\n submit: () => this.submit()\n }\n }", "constructor(props) {\n super(props);\n\n this.state = ({\n session: this.props.data,\n current_time: 0,\n });\n }", "function mapActionToProps(dispatch) { return bindActionCreators({ SwitchSceneAction }, dispatch); }", "constructor(props){\n super(props);\n this.state = {\n classId: this.props.location.state.classId,\n classTitle: this.props.location.state.className,\n isInstructor: this.props.location.state.user.is_instructor,\n isActive: this.props.location.state.isActive,\n activeItem: \"session\"\n }\n }", "mapActionsToComponents() {\n return {\n recipeCardActions: {\n editRecipe: this.props.editRecipe,\n cancelEditingRecipe: this.props.cancelEditingRecipe,\n doneEditingRecipe: this.props.doneEditingRecipe,\n saveRecipe: this.props.saveRecipe,\n ingredientActions: {\n editIngredient: this.props.editIngredient,\n cancelEditingIngredient: this.props.cancelEditingIngredient,\n doneEditingIngredient: this.props.doneEditingIngredient,\n addIngredient: this.props.addIngredient,\n deleteIngredient: this.props.deleteIngredient,\n cancelDeletingIngredient: this.props.cancelDeletingIngredient\n },\n processActions: {\n editStep: this.props.editStep,\n cancelEditingStep: this.props.cancelEditingStep,\n doneEditingStep: this.props.doneEditingStep,\n addStep: this.props.addStep,\n deleteStep: this.props.deleteStep,\n cancelDeletingStep: this.props.cancelDeletingStep\n }\n }\n } \n }", "bindActions() {\n\t\t// @props\n\t\t// onComplete\n\t\t// buttons\n\t\t// cancelIndex\n\t\t// title\n\t\t// &\n\t\t// this will be an abstraction\n\t\t// so we don't have to worry about\n\t\t// changing props AND showing\n\t\t// the action sheet within other\n\t\t// parts of the app\n\t\t// the action sheet will be shown\n\t\t// after required props have been mounted \n\t\t// to the component\n\t\tActions.ActionSheet = props => this.fromGlobalActionSheet(props)\n\t}", "function mapStateToProps(state) {\n return {\n connectionStatus: state.connectionStatus,\n session: state.session,\n };\n}", "refreshSession(state, payload)\n {\n state.session = {...state.session,...payload};\n }", "function mapStateToProp(state) {\n return {\n login_signup_reducer : state.login_signup_reducer,\n session:state.session\n }\n}", "_registerToActions(action) {\n\n switch(action.actionType) {\n \n case ActionTypes.ACCOUNT_SIGN_IN:\n this._setUserid(action.payload);\n break;\n case ActionTypes.ACCOUNT_CREATED:\n this._setUserid(action.payload);\n case ActionTypes.GET_USER:\n this._setUser(action.payload);\n break;\n case ActionTypes.ROLES_RECEIVED:\n this._setRoles(action.payload);\n break;\n default:\n break;\n }\n }", "function mapDispatchToProps(dispatch: Function): Object {\n return {\n actions: bindActionCreators({ logout }, dispatch)\n };\n}", "function mapDispatchToProps(StoreDispatch){\n console.log('mapDispatchToProps ');\n return{//we are returning object literal { onIncrementClick: value, onDecrementtClick: otherValue };\n //':' assigns a function as a property of an object literal. \n onIncrementClick: () => {\n const action = { type: Actions.INCREMENT_REQUESTED};\n StoreDispatch(action);\n },\n onDecrementtClick: () => {\n const action = { type: Actions.DECREMENT_REQUESTED};\n StoreDispatch(action);\n }\n }\n}", "function mapStateToProps(state) {\n return {\n session: state.auth.session,\n myPages: state.activism.myPages,\n state: state.activism.state\n }\n}", "function mapActionToProps(dispatch) { return bindActionCreators({ GetActivityAction }, dispatch); }", "function mapStateToProps(state) {\nconst { loading, connected } = state.Auth.toJS();\n\nreturn {\nloading, connected,\n\ntoken: state.Auth.get('token'), \nuser: state.Auth.get('user'),\nuser_type: state.Auth.get('user_type'),\nchildrens:state.Auth.get('childrens'),\nclass:state.Auth.get('class')\n};\n}", "get actionProperties() {\n return this._actionProperties;\n }", "function mapDispatchToProps(dispatch) {\r\n return {\r\n logout:()=>{\r\n dispatch(login_signup_action.logout())\r\n }\r\n }\r\n}", "function ActionEventRegistry(actions){\n this.registry = {};\n this.actions = actions;\n \n this.actions.forEach(act => {this.registry[act] = void 0;});\n}", "function SessionManager() {\n\n //const properties - writable default to false.\n /**\n * @private\n * @readOnly\n * @property _childToParentMap\n * @type Map\n * This maps a child ILinkableObject to a Dictionary, which maps each of its registered parent ILinkableObjects to a value of true if the child should appear in the session state automatically or false if not.\n */\n Object.defineProperty(this, \"_childToParentMap\", {\n value: new Map()\n });\n\n /**\n * @private\n * @readOnly\n * @property _parentToChildMap\n * @type Map\n * This maps a parent ILinkableObject to a Dictionary, which maps each of its registered child ILinkableObjects to a value of true if the child should appear in the session state automatically or false if not.\n */\n Object.defineProperty(this, \"_parentToChildMap\", {\n value: new Map()\n });\n\n /**\n * @private\n * @readOnly\n * @property _ownerToChildMap\n * @type Map\n * This maps a parent ILinkableObject to a Dictionary, which maps each child ILinkableObject it owns to a value of true.\n */\n Object.defineProperty(this, \"_ownerToChildMap\", {\n value: new Map()\n });\n\n /**\n * This maps a child ILinkableObject to its registered owner.\n * @private\n * @readOnly\n * @property _childToOwnerMap\n * @type Map\n */\n Object.defineProperty(this, \"_childToOwnerMap\", {\n value: new Map()\n });\n\n this.debug = false;\n\n this.linkableObjectToCallbackCollectionMap = new Map();\n this.debugBusyTasks = false;\n\n /**\n * @private\n * @readOnly\n * @property _disposedObjectsMap\n * @type Map\n */\n Object.defineProperty(this, \"_disposedObjectsMap\", {\n value: new Map()\n });\n\n /**\n * @private\n * @readOnly\n * @property _treeCallbacks\n * @type CallbackCollection\n */\n Object.defineProperty(this, \"_treeCallbacks\", {\n value: new weavecore.CallbackCollection()\n });\n\n /**\n * @private\n * @readOnly\n * @property _classNameToSessionedPropertyNames\n * @type Object\n */\n Object.defineProperty(this, \"_classNameToSessionedPropertyNames\", {\n value: {}\n });\n\n /**\n * keeps track of which objects are currently being traversed\n * @private\n * @readOnly\n * @property _getSessionStateIgnoreList\n * @type Map\n */\n Object.defineProperty(this, \"_getSessionStateIgnoreList\", {\n value: new Map()\n });\n\n\n /**\n * @private\n * @readOnly\n * @property _dTaskStackTrace\n * @type Map\n */\n Object.defineProperty(this, \"_dTaskStackTrace\", {\n value: new Map()\n });\n\n /**\n * @private\n * @readOnly\n * @property _d2dOwnerTask\n * @type weavecore.Dictionary2D\n */\n Object.defineProperty(this, \"_d2dOwnerTask\", {\n value: new weavecore.Dictionary2D()\n });\n\n /**\n * @private\n * @readOnly\n * @property _d2dTaskOwner\n * @type weavecore.Dictionary2D\n */\n Object.defineProperty(this, \"_d2dTaskOwner\", {\n value: new weavecore.Dictionary2D()\n });\n\n /**\n * ILinkableObject -> Boolean\n * @private\n * @readOnly\n * @property _dBusyTraversal\n * @type Map\n */\n Object.defineProperty(this, \"_dBusyTraversal\", {\n value: new Map()\n });\n\n /**\n * @private\n * @readOnly\n * @property _aBusyTraversal\n * @type Array\n */\n Object.defineProperty(this, \"_aBusyTraversal\", {\n value: []\n });\n\n /**\n * ILinkableObject -> int\n * @private\n * @readOnly\n * @property _dUnbusyTriggerCounts\n * @type Map\n */\n Object.defineProperty(this, \"_dUnbusyTriggerCounts\", {\n value: new Map()\n });\n\n /**\n * ILinkableObject -> String\n * @private\n * @readOnly\n * @property _dUnbusyStackTraces\n * @type Map\n */\n Object.defineProperty(this, \"_dUnbusyStackTraces\", {\n value: new Map()\n });\n\n }", "static setActive(session) {\n this[singleton] = session;\n }", "validateUserSession() {\n // if (sessionStorage.getItem('isLoggedIn') === 'true') {\n // this.props.loggedInStatusChanged(true);\n // } else {\n // this.props.loggedInStatusChanged(false);\n // }\n }", "function mapActionToProps(dispatch) { return bindActionCreators({ SwitchTabAction }, dispatch); }", "handleAllActions(action) {\n switch(action.name) {\n case \"DO_LOGIN\": {\n this.doLogin();\n }\n case \"DO_LOGOUT\": {\n this.doLogout();\n }\n }\n }", "get action() { return this.actionIn; }", "function session(state = [], action) {\n switch (action.type) {\n case actions.USER.TOGGLELOCALSTATUS: {\n const toggle = state => state === 'active' ? 'connected' : 'active'\n const users = state.users.map(\n user =>\n // todo extract out this function that modifies single value in collection\n (user.id === action.payload.id\n ? {...user, localStatus: toggle(user.localStatus)}\n : user)\n )\n const newState = {...state, users }\n return newState\n }\n case 'blah':\n return state\n default:\n return state\n }\n}", "function mapDispathToProps(dispatch) {\n return {\n actions: bindActionCreators(userActions, dispatch),\n orderActions: bindActionCreators(orderActions, dispatch),\n customerActions: bindActionCreators(customerActions, dispatch),\n };\n}", "function detectActions() {\n Object.keys(ACTIONS).forEach(key => {\n this[key] = this.getAttr(ACTIONS[key]);\n });\n}", "function mapActionToProps(dispatch) { return bindActionCreators({ ConfirmProductInfoAction, }, dispatch); }", "function mapDispatchToProps(dispatch) {\n console.log('App.js mapDispatchToProps: mapping Redux actions <-> React component props');\n return {\n increaseCount: function() {\n return dispatch(increaseAction);\n },\n decreaseCount: function() {\n return dispatch(decreaseAction);\n }\n };\n}", "constructor(mapping){\n this.mapping = new ActionMap(mapping);\n }", "getActions() {\n return JSON.parse(JSON.stringify(this.actions));\n }", "componentWillReceiveProps(nextProps) {\n if (!this.state.mode && this.props.mode) {\n this.setState({mode: nextProps.mode});\n }\n if (!this.state.items.length && nextProps.currentSession) {\n this.addItems([nextProps.currentSession]);\n }\n if (!this.isModeChange(nextProps)) {\n if (\n this.state.mode === nextProps.mode && nextProps.request_mode === this.state.mode\n && nextProps.sessions !== this.props.sessions\n ) {\n if (parseFloat(nextProps.search_criteria.current_page) === 1) {\n if (!Config.current_session) {\n let openingSession = nextProps.sessions.find(item =>\n item.status === SessionConstant.SESSION_OPEN\n && Number(item.staff_id) === Number(Config.staff_id)\n );\n if (openingSession) {\n SessionService.saveCurrentSession(openingSession);\n this.props.actions.setCurrentSession(openingSession);\n this.props.setCurrentPopup(SessionConstant.CLOSE_ALL_POPUP);\n }\n }\n this.addItems(nextProps.sessions);\n if (nextProps.sessions.length < nextProps.total_count) {\n this.loadSession(SessionConstant.PAGE_SIZE, 2);\n }\n this.selectSession(nextProps.sessions[0]);\n } else {\n let currentSessionIds = this.state.items.map(item => item.shift_increment_id);\n let sessions = nextProps.sessions.filter(\n item => !currentSessionIds.includes(item.shift_increment_id)\n );\n this.pushItems(sessions);\n }\n this.stopLoading();\n }\n if (nextProps.updated_sessions && nextProps.updated_sessions.length && this.state.items.length) {\n this.updateListAfterSync(nextProps.updated_sessions);\n }\n if (nextProps.deleted_session_ids && nextProps.deleted_session_ids.length && this.state.items.length) {\n this.updateListAfterSyncDeleted(nextProps.deleted_session_ids);\n }\n }\n }", "_registerToActions(action) {\n switch(action.actionType) {\n\n case ActionTypes.GET_USERS:\n this._setUsers(action.payload);\n break;\n case ActionTypes.GET_USER_BY_USERNAME:\n this._setUser(action.payload);\n break;\n case ActionTypes.UPDATE_USER:\n this._updateUser(action.payload);\n break;\n case ActionTypes.ONLINE_USER:\n this._setOnlineUsers(action.payload);\n break;\n case ActionTypes.USER_CREATED:\n setTimeout(() => { // Run after dispatcher has finished\n this.emit(CHANGE);\n }, 0);\n\n default:\n break;\n }\n }", "function Action(){\n this.actionClass = \"\";\n\tthis.variables = new Array();\n}", "get userCustomActions() {\r\n return new UserCustomActions(this);\r\n }", "get userCustomActions() {\r\n return new UserCustomActions(this);\r\n }", "get userCustomActions() {\r\n return new UserCustomActions(this);\r\n }", "function matchDispatchToProps(dispatch){\n return bindActionCreators({isUserLoggedIn: isUserLoggedIn}, dispatch);\n}", "function mapStateToProps(state) {\n\treturn {\n\t\tisLoggedIn: state.userReducer.isLoggedIn //<=== shouldnt have to do this...? \n\t};\n}", "function mapDispatchToProps(dispatch) {\n return {\n openModal: () => {\n dispatch({ type: \"OPEN\", status: true })\n },\n deleteUser: (item) => {\n dispatch({ type: \"DELETE\", userData: item })\n }\n }\n}", "function mapStateToProps(state) {\n return {\n Cart_Items: state.Cart_Items,\n Login_State: state.Login_State\n };\n}", "function mapActionToProps(dispatch) { return bindActionCreators({ GoProductAction }, dispatch); }", "function mapDispatchToProps(dispatch) {\n\treturn {\n\t\tactions: bindActionCreators(signinActions, dispatch)\n\t};\n}", "function mapDispatchToProps(dispatch) {\n return bindActionCreators({\n set_user_details,\n receive_login_response,\n show_app_notification,\n delete_app_notification,\n update_dates_dict,\n update_working_dates_dict\n }, dispatch)\n}", "function mapDispatchToProps(dispatch) {\n\treturn {\n\t\tactions: bindActionCreators(CartActions, dispatch)\n\t}\n}", "function mapDispatchToProps(dispatch){\n // bindActionCreators came from above\n return bindActionCreators({\n selectStudent: SelectStudentAction,\n\t\ttimerAction: Timer\n }, dispatch)\n}", "function setUserActions(){\n $jQ(user.actionElements).each(function(){\n $jQ(this).attr(vars.actions, 'true');\n });\n $jQ(user.actionClick).each(function(){\n var e = $jQ(this);\n e.attr(vars.actions, 'user');\n e.attr(vars.userActions, 'click');\n e.off('click.stopnav');\n e.parents().off('click.stopnav');\n e.on('click.user',setUserClickAction);\n });\n $jQ(user.actionPopup).each(function(){\n var e = $jQ(this);\n e.attr(vars.actions, 'user');\n e.attr(vars.userActions, 'popup');\n e.off('click.stopnav');\n e.parents().off('click.stopnav');\n e.on('click.user',setUserClickAction);\n });\n $jQ(user.modalBox).each(function(){\n $jQ(this).find(user.modalClose).each(function(){\n var e = $jQ(this);\n e.attr(vars.userActions, 'popup.close');\n e.off('click.stopnav');\n e.parents().off('click.stopnav');\n });\n $jQ(this).on(user.modalEventShown, function (){\n $jQ(this).find('*').each(function(){\n var e = $jQ(this);\n var tag = e.prop(\"tagName\");\n if(tag!=\"BR\" && tag!=\"SCRIPT\" && tag!=\"IFRAME\"){\n setColorInfo(e,'');\n setFontInfos(e);\n setSizes(e);\n setPositions(e);\n setBorder(e);\n setTextTransform(e);\n setZIndex(e);\n $jQ(this).attr(vars.visible + ':action', $jQ(this).is(':visible'));\n }\n });\n });\n });\n $jQ(user.actionDrag).each(function() {\n $jQ(this).attr(vars.actions, 'user');\n $jQ(this).attr(vars.userActions, 'drag');\n $jQ(this).attr(vars.userActions + ':counter', 0);\n $jQ(this).on('mousemove.user',setUserDragAction);\n });\n}", "async setSessionStatus (sessions) {\n\t\tthis.sessionsToUpdate = sessions;\n\t\tthis.currentSessions = this.user.get('sessions') || {};\n\t\tthis.op = {};\n\t\tawait this.updateSessions();\t\t// update the sessions data by adding the presence data for this request\n\t\tawait this.removeStaleSessions();\t// remove any stale sessions we find, sessions older than the away timeout\n\t\tawait this.saveSessions();\t\t\t// save the sessions data to the server\n\t}", "function mapDispatchToProps(dispatch) {\n return bindActionCreators({redirect: redirect, userSignin: userSignin, setMsg: setMsg}, dispatch);\n}", "action(){\n if (!this.memory.actionMemory) this.memory.actionMemory = {}; // Set up an actionMemory\n this.memory.actionMemory.actionName = this.state();\n this.memory.actionMemory.tId = this.taskId();\n if (this.state() in ActionRegistry) {\n return new ActionRegistry[this.state()](this.memory.actionMemory);\n } else {\n Log('Invalid state does not map to an action. ' + this.string());\n }\n }", "function reduxStateToProps(state) {\n // const reduxState = (state) => {\n console.log('redux staettt', state.redux_session.user_data.user_type)\n return {\n\t\tredux_state: state.redux_state,\n\t\tredux_session: state.redux_session\n\t\t// si MyGlobalReducer kay makit an sa reducers folder\n }\n}", "function matchDispatchToProps(dispatch) {\n return bindActionCreators({\n doLogin: Actions.doLogin,\n doLogout: Actions.logout,\n resetLoginControlVars: Actions.resetLoginControlVars\n }, dispatch);\n}", "function mapStateToProps(state) {\n return {\n productData : state.productData.ActiveProductData,\n // userData : state.SessionStorage.UserData,\n userData : state.Consumer.GetConsumerDetail\n\n };\n}", "constructor(...args) {\n super(...args);\n\n // Register action handlers\n this.actions.toggleDebugBar.listen(this._toggleDebugBar.bind(this));\n this.actions.toggleNavbar.listen(this._toggleNavbar.bind(this));\n this.actions.setNavBarTitle.listen(this._setNavBarTitle.bind(this));\n this.actions.setNavBarClassName.listen(this._setNavBarClassName.bind(this));\n this.actions.setNavigationBarLeftLink.listen(this._setNavigationBarLeftLink.bind(this));\n this.actions.setNavigationBarRightLink.listen(this._setNavigationBarRightLink.bind(this));\n this.actions.setNavBarComponent.listen(this._setNavBarComponent.bind(this));\n this.actions.setSlideLabel.listen(this._setSlideLabel.bind(this));\n this.actions.nextSlide.listen(this._nextSlide.bind(this));\n this.actions.setMaxSlides.listen(this._setMaxSlides.bind(this));\n this.actions.debug.listen(this._debug.bind(this));\n this.actions.loginAttempt.listen(this._loginAttempt.bind(this));\n }", "setActions(actions) {\n this.actions = actions\n }", "function mapStateToProps(state) {\n return {\n user: state.auth.user,\n selectedClass: state.selectedClass\n }\n}", "function mapDispatchToProps(dispatch) {\n return {\n actions : bindActionCreators({\n setSlogan:faActions.setSlogan,\n setAnswer:faActions.setAnswer,\n }, dispatch)\n }\n}", "function mapActionsToProps(dispatch) {\n return {\n buy: function () {\n dispatch(buyAction);\n },\n sell: function () {\n dispatch(sellAction);\n },\n randomize: function () {\n dispatch(exchangeAction);\n }\n };\n}", "function mapDispatchToProps(dispatch){\n return{\n roomActions:bindActionCreators(roomActions,dispatch)\n }\n}", "function mapStateToProps(state){\n return{\n //!!!!!!!!!!CREATE REDUCER FOR HANDLING REDUC'S AUTH-TOKEN 'STATE' AND MAP HERE\n isAuthenticated: state.authReducer1.isAuthenticated,\n // userProfile: state.userReducer1.userProfile\n };\n}", "function mapDispatchToProps(dispatch) {\r\n\r\n return {\r\n actions: bindActionCreators(documentAction, dispatch),\r\n oppActions: bindActionCreators(opportunityAction, dispatch),\r\n actActions: bindActionCreators(activityAction, dispatch)\r\n };\r\n}", "function mapDispatchToProps(dispatch) {\n return {\n logout: () => {\n dispatch(actions.logout(true));\n },\n };\n}", "function mapDispatchToProps(dispatch) {\n return {\n Actions: bindActionCreators(ActionCreators, dispatch),\n };\n}", "mapStateToProps(state) {\n return {\n activeScreen: state.activeScreen\n }\n }", "function mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(_.assign({}, authService, flashMessage), dispatch)\n }\n}", "function mapActionCreatorsToProps (dispatch) {\n return bindActionCreators(userActions, dispatch);\n}", "function mapDispatchToProps(dispatch){\r\n return bindActionCreators({deleteSelectedTracks, changeTrack, play, selectInTracklist}, dispatch)\r\n}", "function mapDispatchToProps(dispatch) {\n return {\n\n //onNavigateTo(dest) {\n // dispatch(push(dest));\n //}\n\n handleLogoClick: () =>{\n //this.props.state = {asd :'123'}\n dispatch(replace({\n pathname:'/News',\n state:{scrollToTop:true}\n }))\n\n }\n\n\n //onIncreaseClick: () => dispatch(increaseAction),\n //onDecreaseClick: () => dispatch(decreaseAction)\n }\n}", "function mapStateToProps(state) {\n return {\n token: state.auth.token,\n isAuthenticated: state.auth.isAuthenticated,\n message: state.flash.message\n }\n}", "function mapDispatchToProps(dispatch) {\n const creators = Map()\n .merge(...actions)\n .filter(value => typeof value === 'function')\n .toObject();\n\n // At this point creators is a giant object containing each action name and\n // the function for it.\n return {\n actions: bindActionCreators(creators, dispatch),\n dispatch\n };\n }", "function wrapmethods(sess) {\n var _reload = sess.reload\n var _save = sess.save;\n\n function reload(callback) {\n debug('reloading %s', this.id)\n // pass this and function that put wrapper to session\n _reload.call(this, function () {\n wrapmethods(req.session)\n callback.apply(this, arguments) // pass this and pass arguments\n })\n }\n\n function save() {\n debug('saving %s', this.id);\n savedHash = hash(this);\n _save.apply(this, arguments); // pass current this with arguments\n }\n // add property to current object, sess is object\n Object.defineProperty(sess, 'reload', {\n configurable: true,\n enumerable: false,\n value: reload, // reload is function define above\n writable: true\n })\n // add property save to object sess\n Object.defineProperty(sess, 'save', {\n configurable: true,\n enumerable: false,\n value: save, // save is function define above\n writable: true\n });\n } // function wrapmethods(sess) {", "function mapDispatchToProps (dispatch) {\n return {\n actions: bindActionCreators({ ...authActions, ...deviceActions, ...globalActions }, dispatch)\n }\n}", "function mapStateToProps(state) {\n return {\n userInfo: state.User_Login_Updater\n };\n}", "function mapDispatchToProps(dispatch) {\n return {\n // this is the name(s) of the props methods to map to store i.e. this.props.ChangeCurrentItem\n changeCurrentItem: item => dispatch(changeCurrentItem(item))\n };\n}", "function mapDispatchToProps(dispatch) {\n\treturn {\n\n\t}\n}", "actionOfUser(action) {\n this.setState({userAction:action})\n }", "function Session(){\n this.user = user\n}", "function mapDispatchToProps(dispatch) {\n return bindActionCreators({\n showModal: modalActions.showModal,\n setLocale: languageActions.setLocale,\n setLastLocation: actions.setLastLocation,\n showLoading: loadingActions.showLoading,\n }, dispatch);\n}", "function mapDispatchToProps(dispatch) {\n return {\n changeName: newName => dispatch(changeName(newName)),\n loginUser: () => dispatch(logIn()),\n changeID: newID => dispatch(changeId(newID))\n };\n}", "function setupActionsOptions() {\n switch (panel.data.state) {\n case \"running\":\n modifyAction(\"play\", false);\n modifyAction(\"pause\", true);\n modifyAction(\"stop\", true);\n break;\n case \"paused\":\n modifyAction(\"play\", true);\n modifyAction(\"pause\", false);\n modifyAction(\"stop\", true);\n break;\n case \"stopped\":\n modifyAction(\"play\", true);\n modifyAction(\"pause\", false);\n modifyAction(\"stop\", false);\n break;\n }\n }", "function mapDispatchToProps(dispatch) {\n\treturn {\n\t\tauthActions: bindActionCreators(authenticationActions, dispatch)\n\t};\n}", "getInitialState() {\n TestButtonActions.initValue();\n AuthActions.initSession();\n\n return {\n value: 0,\n session: AuthStore.getSession(),\n };\n }", "constructor(props) {\n super(props);\n\n this.state = {\n // types are \"anon\",\"admin\",\"user\"\n userContext: { userType: null, token: null, userId: null },\n };\n this.logout = this.logout.bind(this);\n this.setUserContext = this.setUserContext.bind(this);\n }", "function matchDispatchToProps(dispatch){\n\treturn bindActionCreators({addP2pConnection, getPeerMessage, clearPeerMessage, removeP2pConnection, logout},dispatch);\n}", "function mapStateToProps(state, props) {\n return {\n loggedIn: state.userReducer.loggedIn\n };\n}", "function mapStateToProps(state) {\n console.log(\"in map state traveler_propfile\", state);\n return {\n\n orders: state.OwnerMessageViewReducer.orders,\n authFlag: state.OwnerMessageViewReducer.authFlag,\n\n };\n}", "function mapDispatchToProps(dispatch) {\r\n\treturn {\r\n\t\t// these names will appear on the container props\r\n\t\tdoIncrement: () => dispatch(increment()),\r\n\t\tdoDecrement: () => dispatch(decrement())\r\n\t}\r\n}", "function mapStateToProps(state) {\n return {\n loggedIn: state.appVariables.loggedIn,\n userDetails: state.details.userDetails\n };\n}", "function mapStateToProps(state) {\n return {\n isLoggedIn: state.app.root,\n loading: state.app.loading,\n errorMessage: state.app.errorMessage,\n loginStatus: state.app.loginStatus\n };\n}", "function mapDispatchToProps(dispatch) {\n return {\n //bindActionCreators goes to productActionCreators and find all the actions and wrap them and call the dispatch\n actions: bindActionCreators(productActionCreators, dispatch)\n };\n}", "function mapDispatchToProps(dispatch) {\n return {\n fetchProjects () {\n\t\t//console.log('the store', store)\n\t\tdispatch({ type: 'AUTH_USER', payload: JSON.parse(localStorage.getItem('user'))})\n },\n Projects(results){\n \tdispatch({ type: 'FETCH_HOME_PROJECTS', payload: results })\n\t\t},\n\t\taddVote(obj){\n\t\t\tconsole.log('THE PROPS FUNC', obj)\n\t\t\tdispatch({ type: 'ADD_VOTE', payload: obj})\n\t\t},\n\t\tdeleteVote(obj){\n\t\t\tdispatch({ type: 'DELETE_VOTE', payload: obj})\n\t\t}\n }\n}", "function mapDispatchToProps(dispatch, ownProps) {\n //\n return {};\n}", "function mapStateToProps(state){\n return {\n login: state.login,\n user: state.user\n }\n}", "function mapDispachToProps(dispatch) {\n return bindActionCreators(actionCreators, dispatch);\n}", "function SessionAPI() {\n\t\t// Used for clearing all keys in deleteAllSessionData function.\n\t\tthis.trackedKeys = [];\n\n\t\tesw.addMessageHandler(\"session.set\", this.setSessionData.bind(this));\n\t\tesw.addMessageHandler(\"session.get\", function(domain, data) {\n\t\t\tparent.postMessage({\n\t\t\t\tmethod: \"session.sessionData\",\n\t\t\t\tdata: esw.noSessionStorageAvailable ? null : this.getSessionData(domain, data)\n\t\t\t}, esw.parentOrigin);\n\t\t}.bind(this));\n\t\tesw.addMessageHandler(\"session.delete\", this.deleteSessionData.bind(this));\n\t\tesw.addMessageHandler(\"session.deleteAllKeys\", function(domain) {\n\t\t\tthis.deleteAllSessionData(domain);\n\t\t}.bind(this));\n\t}", "function mapActonToProps(dispatch) {\n return {\n increase: bindActionCreators(increase, dispatch),\n decrease: bindActionCreators(decrease, dispatch)\n }\n}", "function matchDispatchToProps(dispatch) { // dispatch => call a function\n return bindActionCreators({\n // you can register all your actions here\n selectUser: selectUser\n }, dispatch)\n}" ]
[ "0.5642977", "0.55315065", "0.55312365", "0.5512893", "0.55089194", "0.5462351", "0.54150105", "0.5411497", "0.5410926", "0.54068655", "0.53695333", "0.5351256", "0.53392726", "0.53357464", "0.5313728", "0.53108215", "0.53049886", "0.5302996", "0.5293588", "0.5250595", "0.52445436", "0.52338266", "0.52331185", "0.52240694", "0.52235407", "0.52183676", "0.52090985", "0.5206095", "0.5204849", "0.5203157", "0.51989645", "0.5191481", "0.51913327", "0.5183818", "0.51684856", "0.5165795", "0.51521367", "0.514217", "0.514217", "0.514217", "0.51348794", "0.5133973", "0.5128171", "0.51244825", "0.5116332", "0.5114154", "0.5101791", "0.50995106", "0.5068282", "0.50611955", "0.5053225", "0.5051569", "0.5044079", "0.50316167", "0.5028811", "0.50232404", "0.5009848", "0.5004474", "0.50008976", "0.49967057", "0.49957424", "0.49952057", "0.49949628", "0.4994061", "0.4973832", "0.49707127", "0.49592867", "0.49531606", "0.494791", "0.49470437", "0.49443537", "0.49439606", "0.4938799", "0.49383426", "0.4936553", "0.49348453", "0.49265423", "0.4921576", "0.49213615", "0.4921096", "0.49192137", "0.49146318", "0.49145332", "0.49118015", "0.49109223", "0.49083698", "0.49070084", "0.4897884", "0.4897877", "0.4897105", "0.48826975", "0.48815447", "0.48811164", "0.48796752", "0.48792428", "0.4876732", "0.48767307", "0.48756054", "0.48750958", "0.4867239" ]
0.6616551
0
render the children of this component the children of this component is an arrow function that takes the count and inrementCount and renders the original component and passes the count and inrementCount to it
render() { return ( <div> {this.props.children(this.state.count, this.incrementCount)} </div> ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "render() {\n return (\n <Child handleClick={() => this.updateCount()} count={this.state.count}>\n Count\n </Child>\n );\n }", "render() { \n console.log(\"props\",this.props)\n return ( \n <div>\n <div className=\"title m-2\">{this.props.children}</div>\n {/* this is how you access children that are passed */}\n <div className={this.formatCountBage()} style={{fontSize:20}}>{this.formatCount()}</div>\n <button style={{fontSize:20, padding:10}} onClick={this.handleIncrement} className=\"btn btn-secondary m-2\">Increment</button>\n <button style={{fontSize:20, padding:10}} onClick={this.handleDecrement} className=\"btn btn-secondary m-2\">Decrement</button>\n <button style={{fontSize:20, padding:10}} onClick={()=>this.props.onDelete(this.props.id)} className=\"btn btn-danger m-2\">Delete</button>\n {/* although the delete button is here it needs to be deleted in counters */}\n {/* an event needs to be raised to delete the particular counter and the counters class will handle it */}\n\n </div>\n );\n }", "render(){\n return <WrappedComponent name='Marco' \n count={this.state.count} \n increment={this.clickHandler} \n // send props from Parent to wrapped Component\n {...this.props}\n />\n }", "renderChildren() {\n\t\t\t\tlet children = []\n\n\t\t\t\t// split children into Label and not Label arrays\n\t\t\t\tlet components = spliceChildren(this.props.children, Label);\n\n\t\t\t\t// labeled is consumed by the parent button\n\t\t\t\tlet { labeled, ...other } = this.props;\n\n\t\t\t\tother.className = classNames(this.props.className, this.getClasses());\n\n\t\t\t\tlet icon = (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t{...other}\n\t\t\t\t\t\t\t\tkey=\"icon\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{components.remaining}\n\t\t\t\t\t\t</div>\n\t\t\t\t);\n\n\t\t\t\t// if Label was spliced at index 0, put it first\n\t\t\t\tif (components.index == 0) {\n\t\t\t\t\t\tchildren.push(components.component);\n\t\t\t\t\t\tchildren.push(icon);\n\t\t\t\t// otherwise last\n\t\t\t\t} else {\n\t\t\t\t\t\tchildren.push(icon);\n\t\t\t\t\t\tchildren.push(components.component);\n\t\t\t\t}\n\n\t\t\t\treturn children;\n\t\t}", "render() {\n return (\n <OriginalComponent\n count={this.state.counter}\n incrementCounter={this.incrementCounter}\n {...this.props}\n />\n );\n }", "render(){\n return(\n <div>\n {this.props.render(this.state.count, this.clickHandler)} \n </div> \n )\n }", "render() {\r\n const { items, delItem, top, bottom, shoes, accessories,\r\n incrementCounter, decrementCounter } = this.props\r\n return (\r\n <div>\r\n <h2>Here's your wardrobe:</h2>\r\n { items.length === 0 && <p>Sorry, you don't have any items.</p>}\r\n Tops:\r\n <div className='belt'>\r\n <button onClick={() => decrementCounter('top', 'counter1')}>Less</button>\r\n {\r\n top.map(item =>\r\n // <Item key={item.id} item={item} delItem={delItem}/>\r\n <Item key={item.id} item={item} delItem={delItem} needDelButton={true} />\r\n )\r\n }\r\n <button onClick={() => incrementCounter('top', 'counter1')}>More</button>\r\n </div>\r\n Bottom:\r\n <div className='belt'>\r\n <button onClick={() => decrementCounter('bottom', 'counter2')}>Less</button>\r\n {\r\n bottom.map(item =>\r\n // <Item key={item.id} item={item} delItem={delItem}/>\r\n <Item key={item.id} item={item} delItem={delItem} needDelButton={true} />\r\n )\r\n }\r\n <button onClick={() => incrementCounter('bottom', 'counter2')}>More</button>\r\n </div>\r\n Shoes:\r\n <div className='belt'>\r\n <button onClick={() => decrementCounter('shoes', 'counter3')}>Less</button>\r\n {\r\n shoes.map(item =>\r\n // <Item key={item.id} item={item} delItem={delItem}/>\r\n <Item key={item.id} item={item} delItem={delItem} needDelButton={true} />\r\n )\r\n }\r\n <button onClick={() => incrementCounter('shoes', 'counter3')}>More</button>\r\n </div>\r\n Accessories:\r\n <div className='belt'>\r\n <button onClick={() => decrementCounter('accessories', 'counter4')}>Less</button>\r\n {\r\n accessories.map(item =>\r\n // <Item key={item.id} item={item} delItem={delItem}/>\r\n <Item key={item.id} item={item} delItem={delItem} needDelButton={true} />\r\n )\r\n }\r\n <button onClick={() => incrementCounter('accessories', 'counter4')}>More</button>\r\n </div>\r\n\r\n {/* <button onClick={handleClick}>Add a new item</button> */}\r\n </div> \r\n )\r\n }", "render() {\n return (\n // Fragments let you group a list of children without adding extra nodes to the DOM\n // Best example: Table\n <>\n <div className=\"App\">\n {/* state variables passed to the local counter components */}\n <Counter counter={this.state.counterA} /> \n <Counter counter={this.state.counterB} />\n <Counter counter={this.state.counterC} />\n </div>\n <br />\n <div>\n {/* onClick = HTML attribute\n => - no binding of *this* (Does not have its own *this*)\n The *this* keyword ALWAYS represents the object that DEFINED the => \n *this* belongs to the lexically enclosing function. */}\n <button onClick={() => this.handleAllIncrease()}>Increase all</button>\n <button onClick={() => this.handleAllDecrease()}>Decrease all</button>\n </div>\n </>\n );\n }", "render() {\r\n return (\r\n <div>\r\n {/* <img src={this.state.imageUrl} alt=\"\" /> */}\r\n {this.props.counter.children}\r\n <span style={this.styles} className={this.getBadgeClasses()}>\r\n {this.formatCount()}\r\n </span>\r\n <button\r\n onClick={() => this.handleIncrement()}\r\n className=\"btn btn-secondary btn-sm\"\r\n >\r\n increment\r\n </button>\r\n <button\r\n onClick={() => this.props.onDelete(this.props.counter.id)}\r\n className=\"btn btn-danger btn-sm m-2\"\r\n >\r\n Delete\r\n </button>\r\n </div>\r\n );\r\n }", "render() {\n // Destructuring this.props. When passing properties to counter no longer need this.props\n // E.g. onDelete={this.props.onDelete} is now onDelete={onDelete}\n const { onDelete, onIncrement, onClear, onRemoveOne, counter } = this.props;\n\n return (\n <div className=\"mainbox\">\n <div className=\"titles\">\n <h1 className=\"total\">Total</h1>\n\n <h1 className=\"price\">Price</h1>\n </div>\n <div className=\"counters\">\n {/* Map is used to insert the counters for each product into the page. data is passed in through object keys */}\n {/* This is used to pass a reference to the function to the child as a prop */}\n {/* The whole counter object can be passed using counter={counter} */}\n {/* This process now bubbles up the event from the child to the parent */}\n {this.props.counters.map(counter => (\n <Counter\n key={counter.id}\n onDelete={onDelete}\n onIncrement={onIncrement}\n onClear={onClear}\n onRemoveOne={onRemoveOne}\n counter={counter}\n />\n ))}\n </div>\n <button\n style={{ fontSize: 20, fontWeight: \"bold\" }}\n onClick={this.props.onReset}\n className=\"btn btn-danger btn-sm m-2\"\n >\n Resest all\n </button>\n </div>\n );\n }", "render() {\n return (\n <React.Fragment>\n <NavBar totalCounters={this.state.counters.filter(c => c.value > 0).length}/>\n <main className=\"container\">\n <Counters \n counters={this.state.counters}\n onReset={this.handleReset}\n onDelete={this.handleDelete}\n onIncrement={this.handleIncrement}\n />\n </main>\n </React.Fragment>\n );\n }", "render() {\n console.log(this.props);\n //Here is what I want my render method to return. As I can only return \n //one element, I wrap everything into a div. \n return (\n <div>\n {/* Inside the object props I can access children, which is the data I pass to a component inside its\n closing tags. For example in my Counters element I inserted a \"Counter number\" as data inside the closing tags.\n this data is accessible here in the children property */}\n {this.props.children}\n <span className={this.getBtnClasses()}>{this.formatCount()}</span>\n {/* Here I want the click on the button to trigger an event, incrementing the value of the counter\n so I call the function handleIncrement which does exactly the incrementation of the 'value' property of \n my counter */}\n <button \n onClick={this.handleIncrement} \n className=\"btn btn-secondary btn-sm m-2\">\n Increment\n </button>\n {/* Here I am adding a button that triggers a Delete method on click. \n The component that owns a piece of the state should be the one modifying it. In this particular case,\n the piece of the state that I want to delete is owned by the counters component, so Counters should be the component\n modifying the value (deleting it). To solve this problem and allow the state to be modified through the Counter component, it has to\n raise an event. onDelete (convention for naming events). So the Counter component raises the event, but the Counters component handles it \n (therefore the method is implemented there, but passed to the Counter component via props). */}\n <button onClick={() => this.props.onDelete(this.props.id)} className=\"btn btn-danger btn-sm m2\">Delete</button>\n </div>\n );\n }", "render() { \n console.log(\"App-Rendered\");\n return (\n <React.Fragment>\n <NavBar totalCounters = {this.state.counters.filter( c => c.value > 0).length}/>\n <main \n className=\"container\">\n <Counters \n counters= {this.state.counters}\n onReset= {this.handleReset} \n onIncrement= {this.handleIncrement}\n onDelete= {this.handleDelete}\n />\n </main>\n </React.Fragment>\n );\n }", "render() { \n\n console.log('Counter Component Rendered');\n return ( \n <div className=\"counter\">\n <span className={this.getbadgeClass()+' value'}>{this.formatCount()}</span>\n <button className=\"btn btn-primary btn-lg\" onClick={()=>this.props.onIncrement(this.props.counter)}>Increment</button>\n <button className=\"btn btn-danger btn-sm m-2\" onClick={()=>this.props.onDelete(this.props.counter.id)}>Delete</button> {/* Idea:function was passed as prop*/}\n </div> \n );\n }", "function ParentComponent() {\n return (\n <div className =\"parent\">\n <CountVowels />\n <CountConsonants />\n </div>\n );\n}", "renderChildren(children, refName) {\n\n\t\t// First we make sure that the refName parameter passed is a String\n\t\trefName = String(refName);\n\n\t\t// Iterating through the children of the repeatable component\n\t\treturn React.Children.map(children, (child, j) => {\n\n\t\t\t// First, we check if this child is NOT the defaultRef child\n\t\t\tif(typeof child.props.defaultRef === 'undefined') {\n\n\t\t\t\t// Now we check if the refName prop for this child is defined\n\t\t\t\tif(typeof child.props.refName !== 'undefined') {\n\t\t\t\t\trefName = child.props.refName+refName;\n\t\t\t\t}\n\n\t\t\t\t// Then, if the refName is not defined, we must check if\n\t\t\t\t// this is the only child element inside the Repeatable component\n\t\t\t\telse {\n\n\t\t\t\t\t// If this is not the only child, we must set its ref to null\n\t\t\t\t\t// in order to avoid ref names conflict.\n\t\t\t\t\tif(children instanceof Array) {\n\t\t\t\t\t\trefName = null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn React.cloneElement(child, { ref: refName });\n\t\t});\n\t}", "render() {\n return (\n <div>\n <h1>Counter is {this.state.totalClicks}</h1>\n <ChildClass onClick={this.handleClick} />\n </div>\n );\n }", "render() {\n\t\treturn(\n\t\t\t<div>\n\t\t\t\t<Button localHandleClick={this.handleClick} increment={1} />\n\t\t\t\t<Button localHandleClick={this.handleClick} increment={5} />\n\t\t\t\t<Button localHandleClick={this.handleClick} increment={10} />\n\t\t\t\t<Button localHandleClick={this.handleClick} increment={100} />\n\t\t\t\t<Result localCounter={this.state.counter} />\n\t\t\t</div>\n\t\t);\n\t}", "wrapChildren(){\n const { children, title } = this.props;\n if (!children) return null;\n\n function wrap(child, idx = 0){\n return (\n <div className=\"indicator-item\" title={title || null} key={child.key || idx}>\n { child }\n </div>\n );\n }\n\n if (Array.isArray(children)){\n return React.Children.map(children, wrap);\n } else {\n return wrap(children);\n }\n }", "render() {\n\t\treturn (\n\t\t\t<div>\n\t\t\t\t{/* display initial state and state changes */}\n\t\t\t\t<h2>This is a counter using a class</h2>\n\t\t\t\t<h1>{this.state.count}</h1>\n\t\t\t\t{/* button that calls function to increment count */}\n\t\t\t\t<button onClick={this.setCount}>Click to Increment</button>\n\t\t\t</div>\n\t\t);\n\t}", "render() {\n console.log('App-Rendered');\n console.log(this.state.counters);\n let x = 0;\n return (\n <React.Fragment>\n <NavBar totalCounters={\n this.state.counters.filter(c => c.value > 0).length}\n counters={\n this.state.counters.filter(c => c.value > 0)}\n />\n <main className=\"container\">\n <Counters\n counters={this.state.counters}\n onReset={this.handleReset}\n onIncreament={this.handleIncreament}\n onDelete={this.handleDelete}\n onTotalCount={this.handleTotalCount}\n >\n\n </Counters>\n </main>\n </React.Fragment>\n );\n }", "render() {\n return (\n <div>\n \t{this.props.children}\n </div>\n );\n }", "render() {\n return this.props.children;\n }", "render() {\n const { children } = this.props;\n return (\n <div className=\"tabs\">\n {Children.map(children, this._addChildRefs, this)}\n </div>\n );\n }", "render() {\n console.log('Render');\n return (\n <div>\n <h3>Count: {this.state.count}</h3>\n <button onClick={this.incrememtHandler}>INCREMENT</button>\n <button onClick={this.decrementHandler}>DECREMENT</button>\n </div>\n );\n }", "render() {\n return (\n <div className=\"part1\">\n <div>\n {this.props.index+1})\n </div>\n </div>\n )\n }", "function Counter(props) {\n\treturn (\n\t\t<div className=\"container\" style={bodyStyles}>\n\t\t\t<div className=\"row\">\n\t\t\t\t<div className=\"col-2\" style={cardStyles}>\n\t\t\t\t\t<i className=\"far fa-clock\" />\n\t\t\t\t</div>\n\t\t\t\t<div className=\"col\" style={cardStyles}>\n\t\t\t\t\t{props.numeroSeis % 10}\n\t\t\t\t</div>\n\t\t\t\t<div className=\"col\" style={cardStyles}>\n\t\t\t\t\t{props.numeroCinco % 10}\n\t\t\t\t</div>\n\t\t\t\t<div className=\"col\" style={cardStyles}>\n\t\t\t\t\t{props.numeroCuatro % 10}\n\t\t\t\t</div>\n\t\t\t\t<div className=\"col\" style={cardStyles}>\n\t\t\t\t\t{props.numeroTres % 10}\n\t\t\t\t</div>\n\t\t\t\t<div className=\"col\" style={cardStyles}>\n\t\t\t\t\t{props.numeroDos % 10}\n\t\t\t\t</div>\n\t\t\t\t<div className=\"col\" style={cardStyles}>\n\t\t\t\t\t{props.numeroUno % 10}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n}", "function ClassicGrid({ children }) {\n if (children.length !== 5) {\n console.log(children)\n throw 'There should be 5 child components.'\n }\n\n const children_ordering = [\n 'classic-grid-parent__header',\n 'classic-grid-parent__left-sidebar',\n 'classic-grid-parent__main-content',\n 'classic-grid-parent__right-sidebar',\n 'classic-grid-parent__footer'\n ]\n\n const newChildren = children.map((child, idx) => {\n return styleInjector(child, children_ordering[idx])\n })\n\n console.log(children, newChildren)\n\n return <div className='classic-grid-parent'>{newChildren}</div>\n}", "render() {\n const { classes } = this.props;\n const children = [];\n\n // Build all of the events\n for (var i = 0; i < this.state.events.length; i += 1) {\n let event = this.state.events[i];\n let index = i;\n let date = this.getFormattedDate(event);\n var month = (1 + date.getMonth());\n month = month.length > 1 ? month : '0' + month;\n var day = date.getDate().toString();\n day = day.length > 1 ? day : '0' + day;\n var hours = date.getHours();\n var minutes = date.getMinutes().toString();\n minutes = minutes.length > 1 ? minutes : '0' + minutes;\n let startDate = date.getFullYear() + '-' + month + '-' + day + \" \" + this.timeString(hours, minutes);\n date.setMilliseconds(date.getMilliseconds() + (event[\"duration\"] * 60000));\n hours = date.getHours();\n minutes = date.getMinutes().toString();\n minutes = minutes.length > 1 ? minutes : '0' + minutes;\n let fullDate = startDate + \"-\" + this.timeString(hours, minutes);\n if (this.props.eventType === '/current-events') {\n if (this.state.adminSignedIn) {\n children.push(<CurrentChildComponent key={i} name={event[\"name\"]} date={fullDate} location={'Location: ' + event[\"location\"]} \n organization={'Group: ' + event[\"organization\"]} description={'Description: ' + event[\"description\"]} tags={'Tags: ' + event[\"tags\"]} image={this.state.urls[index]}\n webLink={'Web Link: ' + event[\"webLink\"]}\n editAction={() => this.editAction(event, index)} \n raffleOnclick={() => this.raffleOnclick(event,index)}\n downloadQR={() => this.downloadQR(event)}\n viewAttendees={() => this.viewAttendees(event)}\n />);\n } else {\n children.push(<CurrentChildComponent key={i} name={event[\"name\"]} date={fullDate} location={'Location: ' + event[\"location\"]} \n organization={'Group: ' + event[\"organization\"]} description={'Description: ' + event[\"description\"]} tags={'Tags: ' + event[\"tags\"]} image={this.state.urls[index]}\n webLink={'Web Link: ' + event[\"webLink\"]}\n editAction={() => this.handleBeginRequest()} \n raffleOnclick={() => this.raffleOnclick(event,index)}\n downloadQR={() => this.downloadQR(event)}\n viewAttendees={() => this.viewAttendees(event)}\n />); \n }\n \n } else {\n children.push(<PendingChildComponent key={i} name={event[\"name\"]} date={fullDate} location={'Location: ' + event[\"location\"]} \n organization={'Group: ' + event[\"organization\"]} description={'Description: ' + event[\"description\"]} tags={'Tags: ' + event[\"tags\"]} image={this.state.urls[index]}\n editAction={() => this.editAction(event, index)} email={event[\"status\"]} webLink={'Web Link: ' + event[\"webLink\"]}\n />);\n }\n \n };\n\n return (\n <div>\n <div style={{position: \"fixed\", top: \"50%\", left: \"50%\", margintop: \"-50px\", marginleft: \"-50px\", width: \"100px\", height: \"100px\"}}>\n <CircularProgress disableShrink style={{visibility: this.state.hidden}}></CircularProgress>\n </div>\n <div style={{textAlign: \"center\", marginBottom: 20}}>\n <div style={{position: 'relative', display: \"inline-block\"}}>\n <Paper style={{padding: '2px 4px', display: \"flex\", alignItems: \"center\", width: 400}} elevation={1}>\n <SearchIcon style={{padding: 10}}/>\n <InputBase\n style={{width: 300}}\n placeholder=\"Search Events\" \n value={this.state.searchText}\n onChange={this.handleSearchChange} />\n <IconButton onClick={this.handleClear}><CloseIcon/></IconButton>\n <Divider style={{width: 1, height: 28, margin: 4}} />\n <IconButton onClick={this.handleSortOpenClose}><SortIcon/></IconButton>\n </Paper>\n </div>\n </div>\n <div style={{textAlign: \"center\", marginBottom: 20, display: this.state.sortMenu}}>\n <div style={{position: 'relative', display: \"inline-block\"}}>\n <Paper style={{padding: '2px 4px', display: \"flex\", alignItems: \"center\", width: 400}} elevation={1}>\n <FormControl component=\"fieldset\" style={{paddingLeft: 10}}>\n <FormLabel component=\"legend\" style={{paddingTop: 10}}>Sort By:</FormLabel>\n <FormControlLabel\n control={\n <Switch\n checked={this.state.isAscending}\n onChange={this.handleToggle('isAscending')}\n value=\"isAscending\"\n color=\"primary\"\n />\n }\n label=\"Ascending\"\n />\n <RadioGroup\n aria-label=\"gender\"\n name=\"gender2\"\n value={this.state.sortBy}\n onChange={this.handleSort}\n >\n <FormControlLabel\n value=\"date\"\n control={<Radio color=\"primary\" />}\n label=\"Date\"\n labelPlacement=\"end\"\n />\n <FormControlLabel\n value=\"title\"\n control={<Radio color=\"primary\" />}\n label=\"Title\"\n labelPlacement=\"end\"\n />\n <FormControlLabel\n value=\"organization\"\n control={<Radio color=\"primary\" />}\n label=\"Group\"\n labelPlacement=\"end\"\n />\n </RadioGroup>\n </FormControl>\n </Paper>\n </div>\n </div>\n {this.addRafflePopUp()}\n \n <Dialog\n onClose={this.attendeesClose}\n open={this.state.attendeesOpen}>\n <DialogTitle onClose={this.attendeesClose}>Attendees</DialogTitle>\n <DialogContent>\n {this.state.attendeesList}\n </DialogContent>\n </Dialog>\n \n\n <ParentComponent>\n {children}\n </ParentComponent>\n <Dialog\n onClose={this.handleCloseEdit}\n aria-labelledby=\"customized-dialog-title\"\n open={this.state.editing}\n >\n <DialogTitle id=\"customized-dialog-title\" onClose={this.handleCloseEdit}>\n Edit Event\n </DialogTitle>\n <DialogContent>\n <MuiPickersUtilsProvider utils={MomentUtils}>\n <Grid container>\n <Grid item container direction=\"column\" spacing={0}>\n <Grid item>\n <TextField\n label=\"Event Title\"\n id=\"event-name\"\n margin=\"normal\"\n value={this.state.popUpEvent[\"name\"]}\n onChange={this.handleNameChange} /> \n </Grid>\n <Grid item>\n <DatePicker\n margin=\"normal\"\n label=\"Start Date\"\n value={this.state.date}\n onChange={this.handleDateChange} />\n </Grid>\n <Grid item>\n <TimePicker\n margin=\"normal\"\n label=\"Start Time\"\n value={this.state.date}\n onChange={this.handleDateChange} />\n </Grid>\n <Grid item>\n <TextField\n id=\"event-dur\"\n label=\"Duration (minutes)\"\n margin=\"normal\"\n value={this.state.popUpEvent[\"duration\"]}\n type=\"number\"\n onChange={this.handleDurationChange} />\n </Grid>\n <Grid item>\n <TextField\n id=\"event-org\"\n label=\"Location\"\n margin=\"normal\"\n value={this.state.popUpEvent[\"location\"]}\n onChange={this.handleLocationChange} />\n </Grid>\n <Grid item>\n <FormControl margin=\"normal\">\n <InputLabel>Group</InputLabel>\n <Select\n displayEmpty\n value={this.state.popUpEvent[\"organization\"]}\n style={{minWidth: 200, maxWidth: 200}}\n onChange={this.handleOrganizationChange}\n variant='outlined'\n >\n {this.state.groups.map(group => (\n <MenuItem key={group} value={group}>\n {group}\n </MenuItem>\n ))} \n </Select>\n </FormControl>\n </Grid>\n <Grid item> \n <FormControl margin=\"normal\">\n <InputLabel htmlFor=\"select-multiple\">Tags</InputLabel>\n <Select\n multiple\n displayEmpty\n input={<Input id=\"select-multiple\"/>}\n value={this.state.tags}\n style={{minWidth: 200, maxWidth: 200}}\n onChange={e => this.setState({ tags: e.target.value })}\n variant='outlined'\n >\n <MenuItem disabled value=\"\">\n <em>Select Tags</em>\n </MenuItem>\n {this.state.databaseTags.map(tag => (\n <MenuItem key={tag} value={tag}>\n {tag}\n </MenuItem>\n ))} \n </Select>\n </FormControl>\n </Grid>\n <Grid item>\n <TextField\n id=\"event-link\"\n label=\"Web Link (Optional)\"\n margin=\"normal\"\n value={this.state.popUpEvent[\"webLink\"]}\n onChange={this.handleWebLinkChange} />\n </Grid>\n <Grid item>\n <TextField\n id=\"event-desc\"\n label=\"Description\"\n multiline\n rows=\"5\"\n margin=\"normal\"\n variant=\"outlined\"\n value={this.state.popUpEvent[\"description\"]}\n onChange={this.handleDescriptionChange} />\n </Grid>\n <Grid item>\n <FilePicker\n extensions={['jpg', 'jpeg', 'png']}\n onChange={this.handleImageFileChanged}\n onError={errMsg => this.displayMessage(this, errMsg)} >\n <Button variant=\"contained\"\n disabled={this.state.uploading}>\n Select Image \n </Button>\n </FilePicker>\n </Grid>\n <Grid item>\n <Image\n style={{width: 192, height: 108}}\n source={{uri: this.state.image64}}\n />\n </Grid>\n </Grid>\n </Grid>\n </MuiPickersUtilsProvider>\n </DialogContent>\n <DialogActions style={{justifyContent: 'center'}}>\n <MuiThemeProvider theme={redTheme}>\n <Button variant=\"contained\" onClick={this.handleDeleteOpen} color=\"primary\">\n {this.state.cancelButton}\n <DeleteIcon/>\n </Button>\n </MuiThemeProvider>\n <Button variant=\"contained\" onClick={this.handleSaveEdit} color=\"primary\">\n {this.state.confirmButton}\n <SaveIcon/>\n </Button>\n </DialogActions>\n </Dialog>\n <Dialog onClose={this.handleCloseRequest}\n aria-labelledby=\"Request\"\n open={this.state.requesting}>\n <Card style={{minWidth: 150, minHeight: 125}}>\n <div style={{fontSize: 25, justifyContent: 'center', padding: 20}}>\n If you would like to make a change to your event, please email [email protected] with the change you would like for approval.\n </div>\n </Card>\n </Dialog>\n <Dialog\n open={this.state.openDelete}\n onClose={this.handleDeleteClose}\n aria-labelledby=\"alert-dialog-title\"\n aria-describedby=\"alert-dialog-description\"\n >\n <DialogTitle id=\"alert-dialog-title\">{\"Are you sure you want to \" + this.state.popUpText + \" the event?\"}</DialogTitle>\n <DialogActions>\n <Button onClick={this.handleDeleteClose} color=\"primary\">\n Cancel\n </Button>\n <MuiThemeProvider theme={redTheme}>\n <Button onClick={this.handleDelete} color=\"primary\" autoFocus>\n Confirm\n </Button>\n </MuiThemeProvider>\n </DialogActions>\n </Dialog>\n <Snackbar\n anchorOrigin={{\n vertical: 'bottom',\n horizontal: 'left',\n }}\n open={this.state.open}\n autoHideDuration={6000}\n onClose={this.handleClose}\n ContentProps={{\n 'aria-describedby': 'message-id',\n }}\n message={this.state.message}\n action={[\n <Button\n key=\"close\"\n aria-label=\"Close\"\n color=\"inherit\"\n onClick={this.handleClose}\n > X\n </Button>,\n ]}\n />\n </div>\n );\n }", "render() {\n \t// 3) Style part of a component (also in Counter.css)\n \tconst counter_style = {fontSize: \"50px\", padding: \"15px 30px\"}; // inline JavaScript css\n return (\n <div className=\"counter\">\n { /* Note that we are not making a function call. We are just passing a reference to function. */}\n { /* To call a class method, we have to call like 'this.increment' and not 'increment' */}\n { /* Component props are added in Component tag like attributes */ }\n { /* 5) props part of a component - data passed to a component */ }\n <CounterButton by={1} incrementMethod={this.increment} decrementMethod={this.decrement} />\n <CounterButton by={5} incrementMethod={this.increment} decrementMethod={this.decrement} />\n <CounterButton by={10} incrementMethod={this.increment} decrementMethod={this.decrement} />\n {/* Use className and not class */}\n <span className=\"count\" style={counter_style}>{this.state.counter}</span>\n <div><button className=\"reset\" onClick={this.reset}>Reset</button></div>\n </div>\n );\n }", "render() {\n return (\n <Wrapper>\n <Hero score={this.state.score} message={this.state.message} />\n <Columns>\n {this.state.legos.map(card => (\n <Card\n // clickCount={this.clickCount}\n handleOnClick={this.handleOnClick}\n id={card.id}\n key={card.id}\n image={card.image}\n name={card.name}\n />\n ))}\n </Columns>\n\n </Wrapper>\n );\n }", "function Child() {\n const [cnt, setCnt] = useState(0);\n log('<Child /> render', ++cntChild);\n\n return (\n <div>\n <p>Child Component!</p>\n <button onClick={() => setCnt(n => 1 + n)}>\n Child click!\n </button>\n </div>\n );\n}", "render() {\n return (\n <div>\n {this.props.children}\n </div>\n );\n }", "render() {\n return (\n <div>\n {this.props.children}\n </div>\n );\n }", "renderLength()\r\n {\r\n \r\n var arrayLength = [];\r\n \r\n \r\n // the number which will be given to them is the number of the first square in the row.\r\n\r\n for(let i = 0; i<this.props.lengthSqaure;i++){\r\n\r\n arrayLength.push(this.renderRow(i*this.props.widthSquare));\r\n \r\n }\r\n \r\n return( \r\n <div className='parentButton'>\r\n {arrayLength}\r\n </div>\r\n \r\n )\r\n\r\n\r\n }", "renderInnerCircleChildren () {\n if (this.props.showPercent) {\n return (<Animated.Text style={[\n this.props.styles.percentText,\n { fontSize: this.props.radius * 0.55 }]}>\n {this.state.currentPercent} %\n </Animated.Text>)\n }\n else if (this.props.svg) {\n return (<Image\n resizeMode={'contain'}\n style={{\n width: this.props.radius * 0.9,\n height: this.props.radius * 0.9\n }}\n source={this.props.svg} />)\n }\n else {\n return this.props.children\n }\n }", "function AsInLine(props) {\n const derived = makeList(props.counter);\n return (\n <div className=\"container\">\n <div>Created Derived Data Directly</div>\n <div>List Length: {derived && derived.length}</div>\n {!!props.speed && <SlowComponent name=\"Direct\" ms={props.speed} />}\n <RenderCounter />\n </div>\n )\n}", "renderChildren(name, args) {\n return this[_linked].component\n ? this[_linked].component.renderChildren(name, args)\n : super.renderChildren(name, args);\n }", "render(){\n const rewardNames = Object.keys(this.props.rewardsData);\n const rewardsData = this.props.rewardsData;\n return(<div className=\"rewards-container\">\n {rewardNames.map((reward,index) => {\n const rewardTitle = helpers.rewardTitle(reward);\n return <RewardItem reward={rewardTitle} count={rewardsData[reward]} key={index}/>\n })}\n </div>);\n }", "function Repeat(props) {\n let items = [];\n for (let i = 0; i < props.numTimes; i++) {\n items.push(props.children(i));\n }\n return <div>{items}</div>;\n}", "render(){\n console.log(\"asdas\")\n number = 0;\n return(\n <div width=\"100%\">\n <div style={{marginLeft:'40%'}}> <h1>{window.location.href.substring(window.location.href.indexOf(\"/allSurveyQuestions\") + 20) } Survey Results</h1> </div>\n <div style={{backgroundColor: 'black',height:'1px'}}></div>\n <div style={{backgroundColor: 'orange',height:'10px'}}></div>\n <div style={{backgroundColor:'orange'}}>\n <div style={{width:'80%',border:'3px solid black',borderRadius:'25px',margin:'0 auto',backgroundColor:'white'}}>\n <div style={{display:'flex',flexDirection:'column',justifyContent:'space-evenly'}}>\n {(this.state.loaded)?this.state.surveyQuestions.map( surveyQuestion => this.createEventComponents(surveyQuestion) ):<div></div>}\n </div>\n </div>\n </div>\n <div style={{backgroundColor: 'orange',height:'10px'}}></div>\n </div>\n )\n }", "render() {\n console.log(\"Rendering: Component is mounting to DOM\");\n return (\n <React.Fragment>\n <p>Use console to see the messages. </p>\n <div>{this.state.count}</div>\n <button className=\"border-2\" onClick={this.increase}>\n Increase\n </button>\n </React.Fragment>\n );\n }", "render() {\n // Just a button for now for Increment\n // this.formatCount() is an expression like 1+1\n // {} requires an expression within\n // classNames are bootstrap styling with badge and btn.\n return (\n <div>\n <div>\n <span style={this.styles} className={this.getBadgeClasses()}>\n {this.formatCount()}\n </span>\n {/* note that onClick below is no longer passing a reference to handleIncrement, \n it is passing a reference to a created arrow function that calls handleIncrement. \n That safely ensures that this will refer to the object of the method. \n Arrow functions bind to the object of the class. \n */}\n <button\n onClick={() => this.props.onIncrement(this.props.counter)}\n className=\"btn btn-secondary btn-sm\"\n >\n Increment\n </button>\n {/*access another components' prop, the onDelete, since\n state is located within Counters, onDelete must be implemented\n there to modify it locally.*/}\n <button\n onClick={() => this.props.onDelete(this.props.counter.id)}\n className=\"btn btn-danger btn-sm m-2\"\n >\n Delete\n </button>\n </div>\n </div>\n );\n }", "render() {\n return (\n <div>\n <p>子组件</p>\n <GrandSon />\n </div>\n )\n }", "render(){\n\n return (\n <div>\n <ImageSlider ref = {this.childRerenderDepth} images = {this.props.all_p} audioArray = {this.props.all_a} handleIndexChange = {this.handleChange.bind(this)}/>\n </div>\n )\n }", "function Parent({ children }) {\n return <div>{children()}</div>\n}", "render() {\n return (\n <div className=\"row\">\n <div className=\"col-1\">\n <h3>\n <span className={this.getBadgeClasses()}>{this.formatCount()}</span>\n </h3>\n </div>\n\n <div className=\"col\">\n <button\n onClick={() => this.props.onIncrement(this.props.counter)}\n className=\"btn btn-secondary btn-sm m-2\"\n >\n Add\n </button>\n <button\n onClick={() => this.props.onDecrement(this.props.counter)}\n className=\"btn btn-secondary btn-sm m-2\"\n disabled={this.props.counter.value === 0 ? \"disabled\" : \"\"}\n >\n Remove\n </button>\n <button\n onClick={() => this.props.onDelete(this.props.counter.id)}\n className=\"btn btn-danger btn-sm m-2\"\n >\n DELETE\n </button>\n </div>\n </div>\n );\n }", "render() {\n return (\n <div>\n <Header />\n <Counter />\n <Counter />\n <Footer copyrightYear={2019} copyrightHolder=\"Mary McGeary\" />\n </div>\n );\n }", "render(){\n return(\n <div className={styles.container}>\n {this.props.children}\n </div>\n )\n }", "render() {\n const children = React.cloneElement(this.props.children, {\n characters: this.state.characters,\n favourites: this.state.favourites,\n selectedCharacter: this.state.selectedCharacter,\n selectCharacter: this.selectCharacter,\n selectedComic: this.state.selectedComic,\n selectComic: this.selectComic,\n getComics: this.getComics,\n comics: this.state.comics,\n comicCount: this.state.comicCount,\n disableSearch: this.state.disableSearch,\n changeSearchState: this.changeSearchState,\n heartChange: this.heartChange\n });\n\n // Here we actually display what we want on this main App.\n // In this case it will be the header and all associated data.\n // Plus all the children and the footer.\n return (\n <div className=\"mainContainer\">\n <div>\n <MainHeader\n name={this.state.name}\n credit={this.state.credit}\n comics={this.state.comics}\n characterCount={this.state.characterCount}\n memberCount={this.state.memberCount}\n handleSubmit={this.handleSubmit}\n disableSearch={this.state.disableSearch}\n changeSearchState={this.changeSearchState}\n heartChange={this.heartChange}\n favourites={this.state.favourites}\n />\n </div>\n {children}\n <div className=\"footer\">\n <Footer />\n </div>\n </div>\n );\n }", "render () {\n return (\n <div>\n <h1>Count: {this.state.count}</h1>\n <button onClick={this.handleMinusOne}>- 1</button>\n <button onClick={this.handleReset}>Reset</button>\n <button onClick={this.handleAddOne}>+ 1</button>\n </div>\n );\n }", "renderChildren(){ // this is how props and state are passed as props to children\n return React.Children.map(this.props.children, child =>{\n var newProps= Object.assign({}, \n this.props,\n this.state \n );\n delete newProps.children; // be careful not to make the child it's child\n return React.cloneElement(child, newProps, child.props.children)\n });\n }", "function JoinedNarrativesWrapper(props) {\n const content = (\n <div style={{ marginTop: '2rem' }}>\n {\n props.data.size > 0 ?\n <div>\n <List\n items={props.data}\n component={JoinedNarrativesItem}\n moreProps={props.moreProps}\n />\n {\n props.moreProps.hasNext ?\n <Button\n style={{ marginTop: '2rem' }}\n as={Link}\n to={`/joined-narratives?next=${props.moreProps.next ? props.moreProps.next : ''}`}\n primary\n size=\"large\"\n floated=\"right\"\n >\n Next\n <Icon name=\"right chevron\" />\n </Button>\n : null\n }\n {\n props.moreProps.hasPrevious ?\n <Button\n style={{ marginTop: '2rem' }}\n as={Link}\n to={`/joined-narratives?previous=${props.moreProps.previous ? props.moreProps.previous : ''}`}\n primary\n size=\"large\"\n floated=\"left\"\n >\n <Icon name=\"left chevron\" />\n Previous\n </Button>\n : null\n }\n </div>\n :\n (\n <Grid\n textAlign=\"center\"\n >\n <Grid.Column style={{ maxWidth: 450 }}>\n <Container textAlign=\"center\">\n <Icon name=\"folder open outline\" size=\"huge\" style={{ marginBottom: '2rem' }} />\n <p> You have not joined any Narratives! </p>\n <Button\n style={{ marginTop: '2rem' }}\n as={Link}\n to={'/narratives'}\n primary\n size=\"large\"\n fluid\n icon=\"search\"\n content=\"Search for Narratives to join!\"\n />\n </Container>\n </Grid.Column>\n </Grid>\n )\n\n\n }\n </div>\n );\n\n return props.animate ?\n <Transition transitionOnMount animation=\"fade right\" duration={230}>\n { content }\n </Transition>\n : content;\n}", "render() {\n let api = {\n counter: this.state.counter,\n increase: this.increase,\n decrease: this.decrease\n }\n return this.props.render(api);\n }", "renderChildrenOnly() {\n this.children.forEach(child => child.render(this.$element));\n }", "render() {\n return ( <Wrapper>\n <Navs\n \n currentScore={this.state.currentScore}\n topScore={this.state.topScore}\n />\n <Title> Doctor Who </Title> {\n this.state.doctors.map(doctor => ( <\n DoctorCard\n rotateDoctors = {this.rotateDoctors}\n id = {doctor.id}\n key = {doctor.id}\n name = {doctor.name}\n image = {doctor.image}\n occupation = {doctor.occupation}\n />\n ))\n } \n </Wrapper>\n );\n }", "render() {\r\n\t\tvar clicarFilaAux = this.props.clicarFila;\r\n\t\tvar filMuesAux = this.props.filaMuestra;\r\n\t\tvar tam = this.props.tamanio;\r\n\t\tvar i = this.props.indice;\r\n\t\treturn (\r\n\t\t <div className=\"board-row\">\r\n\t\t\t\t{this.creaCasillasDeFila(i,tam,filMuesAux,clicarFilaAux)}\r\n\t\t </div>\r\n\t\t);\r\n\t}", "function Example() {\n return (\n <div>\n <ButtonCounter />\n <br />\n <HoverCounter />\n </div>\n );\n}", "function Repeat(props) {\n\tlet items = [];\n\tfor (let i = 0; i < props.numTimes; i++) {\n\t\titems.push(props.children(i));\n\t}\n\treturn <div>{items}</div>;\n}", "render() {\n\n\t\t//Split the drinks list into subgroups of 6 to insert into rows.\n\t\tlet splitDrinks = [];\n\t\tfor(let i=0;i<this.state.drinks.length;i+=6){\n\t\t\tsplitDrinks.push(this.state.drinks.slice(i,i+6));\n\t\t}\n\n\t\treturn <>\n\t\t\t<Nav user={this.props.user}\n\t\t\t\tsearchCallback={this.search}\n\t\t\t\tadvSearchCallback={this.advSearch}\n\t\t\t\tadvancedSearchToggleCallback={this.advancedSearchToggle}\n\t\t\t\tglasses={this.state.glasses} />\n\t\t\t<div className=\"container-fluid\" id=\"menu\">{\n\t\t\t\tsplitDrinks.map(r => {\n\t\t\t\t\treturn <>\n\t\t\t\t\t\t<div className=\"row\">{\n\t\t\t\t\t\t\tr.map(d => {\n\t\t\t\t\t\t\t\treturn <>\n\t\t\t\t\t\t\t\t\t<div className=\"col-sm-6 col-md-4 col-xl-2 d-flex justify-content-center mb-4\">\n\t\t\t\t\t\t\t\t\t\t<div className=\"menuIconWrapper\">\n\t\t\t\t\t\t\t\t\t\t\t<DrinkIcon drinkInfo={d} clickCallback={id=>{\n\t\t\t\t\t\t\t\t\t\t\t\t$(\"#advancedOptions\").removeClass(\"show\");\n\t\t\t\t\t\t\t\t\t\t\t\tthis.advancedSearchToggle();\n\t\t\t\t\t\t\t\t\t\t\t\tthis.updateDetailedDrink(id);\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\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t}</div>\n\t\t\t\t\t</>;\n\t\t\t\t})\n\t\t\t}</div>\n\t\t\t<DrinkDetails\n\t\t\t\tdrinkId={this.state.detailedDrink}\n\t\t\t\tchangeIngredient={this.updateDetailedIngrident}\n\t\t\t\tchangeDrink={id => {\n\t\t\t\t\tthis.setState({\n\t\t\t\t\t\torderButtonMd: \"success\",\n\t\t\t\t\t\torderButtonContent: \"ORDER\"\n\t\t\t\t\t});\n\t\t\t\t\tthis.updateDetailedDrink(id);\n\t\t\t\t}}\n\t\t\t\torderCallback={this.orderDrink}\n\t\t\t\torderButtonMd={this.state.orderButtonMd}\n\t\t\t\torderButtonContent={this.state.orderButtonContent} />\n\t\t\t<IngredientDetails\n\t\t\t\tingredientId={this.state.detailedIngredient}\n\t\t\t\tchangeIngredient={this.updateDetailedIngrident} />\n\t\t</>\n\t}", "render () {\n return (\n <div>\n <Button incrementValue={1} onClickFunction={this.incrementCounter}/>\n <Button incrementValue={5} onClickFunction={this.incrementCounter}/>\n <Button incrementValue={10} onClickFunction={this.incrementCounter}/>\n <Button incrementValue={100} onClickFunction={this.incrementCounter}/>\n <Result counter={this.state.counter}/>\n </div>\n )\n }", "function App() {\n const [{user}, dispatch] = useStateValue(); {/*,counters,changeCounters*/}\n\n\n\n/* const generateCounters = () => {\n return counters.map( (v) => (\n <Post \n postId={v.id}\n postName= {\"Post\" + v.id}\n incrementHandler = {() => incrementCounter(v.id,true)} \n />))};\n \n const incrementCounter = (theid,arg) => {\n const updated = counters.map ( (value) => {\n if(value.id == theid){\n if(arg) {\n return {id:theid, startsAt: value.startsAt, count: value.count + 1}\n } else {\n return {id:theid, startsAt: 0, count:0}\n }\n }\n return value;\n })\n changeCounters(updated)\n } */\n\n return (\n <div className=\"app\">\n {/* <Col>{generateCounters()}</Col> */}\n {!user ? (\n <Login />\n ) : ( //Sibling components\n <>\n <Header />\n\n <div className=\"app__body\">\n <Sidebar />\n <Feed />\n </div>\n </>\n )}\n </div>\n );\n}", "render() {\n\n if (this.likesCount() === 0) {\n return (\n <div className=\"like-counter-box\">\n <div className=\"like-counter\">\n </div>\n </div>\n )\n } else if (this.likesCount() === 1) {\n return (\n <div className=\"like-counter-box\">\n <div className=\"like-counter\">\n <span>{this.likesCount()}</span>\n <span> like</span>\n </div>\n </div>\n )\n } else {\n return(\n <div className=\"like-counter-box\">\n <div className=\"like-counter\">\n <span>{this.likesCount()}</span>\n <span> likes</span>\n </div>\n </div>\n )\n }\n }", "render() {\n return (\n <Wrapper>\n <Nav>\n Score={scoreCounter} | \n Top Score={topScore}\n </Nav>\n <Title>{this.state.announce}</Title>\n {this.state.friends.map(friend => (\n <FriendCard\n addCounter={this.addCounter}\n id={friend.id}\n key={friend.id}\n name={friend.name}\n image={friend.image}\n occupation={friend.occupation}\n />\n ))}\n </Wrapper>\n );\n }", "render() {\n\n console.log(\"==>\" + this.props.items.length);\n //in case no array recieved for rows return to avoid run time erros\n if(this.props.items == null){\n return null;\n }\n //this code will divide the items array into small arrays \n //where each array contain the data required for each row\n\n //create an array to split items into arrays for each row\n var allRows = [];\n //save the total length of items\n var len = this.props.items.length;\n //fidn the total number of rows we will produce\n var totalRows = len / this.props.rowLength;\n //count how many rows we have so far\n var countRows = 0;\n\n //while we did not count all rows\n while(countRows < totalRows){\n \n //creare a new array for this row\n let newRow = [];\n\n //add the required items to the array\n for (var i = 0; i < this.props.rowLength; i++){\n \n //make sure we do not go beyond the array length\n let currentIndex = i + (countRows * this.props.rowLength);\n \n if(currentIndex < len)\n newRow.push(this.props.items[currentIndex]);\n \n }\n //increment the rows counter\n countRows++;\n //add the new array for this row in the pool of all row arrays\n allRows.push( this.GridRow(newRow, countRows) );\n }\n \n //after we saved all individual rows component inside the allRows now render them\n return (\n <div>\n {allRows} \n </div>\n );\n }", "render() { \n\n //While returning two tags the React.createElement in bable doest know which tag to pass as it passes only 1 element as a parameter; hence wrap two tags in div; one of the solution\n console.log(this.props);\n\n return (\n <div>\n <span className={this.getBadgeClasses()}>{this.formatCount()}</span>\n\n <button\n className={\"btn btn-primary btn-sm m-2\"}\n onClick={()=>this.props.onIncrement(this.props.counter)}\n >\n Increment\n </button>\n <button\n className={\"btn btn-danger btn-sm m-2\"}\n onClick={()=>this.props.onDelete(this.props.counter.id)}\n >\n Delete\n </button>\n </div>\n ); \n \n }", "render(){\n return(\n <div className=\"center-block ReportGrid container\">\n <Report\n numDeApli=\"6666\" fecha=\"02/04/2017\"\n personaFis=\"Carlos Silva\" Monto=\"$100,000\"\n from=\"DF\" stat=\"Aplicacion Completa\" score=\"100\"\n />\n <Report\n numDeApli=\"9999\" fecha=\"02/04/2017\"\n personaFis=\"Carlos Silva\" Monto=\"$100,000\"\n from=\"DF\" stat=\"Aplicacion Completa\" score=\"100\"\n />\n <Report\n numDeApli=\"1111\" fecha=\"02/04/2017\"\n personaFis=\"Carlos Silva\" Monto=\"$100,000\"\n from=\"DF\" stat=\"Aplicacion Completa\" score=\"100\"\n />\n <Report\n numDeApli=\"5555\" fecha=\"02/04/2017\"\n personaFis=\"Carlos Silva\" Monto=\"$100,000\"\n from=\"DF\" stat=\"Aplicacion Completa\" score=\"100\"\n />\n <Report\n numDeApli=\"8888\" fecha=\"02/04/2017\"\n personaFis=\"Carlos Silva\" Monto=\"$100,000\"\n from=\"DF\" stat=\"Aplicacion Completa\" score=\"100\"\n />\n </div>\n );\n }", "render() {\n return this.props.children || /*#__PURE__*/_react.default.createElement(\"div\", null);\n }", "function App() {\n return (\n <div>\n <Count />\n </div>\n );\n}", "render() {\n\n const length = parseInt(this.props.grid.length);\n const rowSize = parseInt(this.props.rowSize);\n let rows = [];\n for(let i = 0; i < length; i += rowSize) {\n rows.push(this.renderRow(i, i + rowSize));\n }\n\n\t\treturn (\n\t\t\t<div className=\"gamegrid\">\n\t\t\t\t<Container>\n\t\t\t\t\t{rows}\n\t\t\t\t</Container>\n\t\t\t</div>\n\t\t)\n\t}", "render() {\n return (\n \n <Wrapper>\n <Navbar />\n <Header score={this.state.score} highscore={this.state.highscore} messageUpdate={this.state.messageUpdate}/>\n <div className=\"container\">\n {this.state.cards.map(card => (\n <ClickyCard\n clickCount={this.clickCount}\n id={card.id}\n key={card.id}\n image={card.image}\n />\n ))}\n </div>\n </Wrapper>\n );\n }", "render() {\n return (\n /*<div>\n <img src=\"./img/teste.png\" />\n <h2 className=\"minha-classe\">Exemplo de JSX</h2>\n <ul>\n <li>Teste</li>\n <li>Teste</li>\n </ul>\n Counter\n </div>*/\n <div className={css.counterContainer}>\n <button\n onClick={this.handleClick}\n className=\"waves-effect waves-light btn red darken-4\"\n >\n -\n </button>\n <span className={css.counterValue}>{this.currentCounter}</span>\n <button\n onClick={this.handleClick}\n className=\"waves-effect waves-light btn green darken-4\"\n >\n +\n </button>\n </div>\n );\n }", "render() {\n\t\treturn (\n\t\t\t<div>\n\t\t\t\t<NumberChange\n\t\t\t\t\tlabel=\" Number is: \"\n\t\t\t\t/>\n\t\t\t\t<NumberChange/>\n\t\t\t\t<NumberChange/>\n\t\t\t\t<NumberChange/>\n\t\t\t</div>\n\t\t);\n\t}", "render() { \n return ( \n <div id=\"wrapper\">\n <Counter count={this.state.counter}/>\n <div id=\"recipe-view\">\n {(this.state.counter !== 0) ?\n <div className=\"recipes-list\">{this.state.recipes.map(recipe => {\n return (<RecipeItem key={recipe.id} title={recipe.title}\n image={recipe.image} likes={recipe.likes} \n buttonClick={() => this.showRecipe(recipe.id, recipe.missedIngredients)}/>)\n })}\n </div> : <div id=\"no-results\">Sorry, no results have been found.</div>}\n <div className=\"recipe-detail\">\n {this.state.showRecipeID && <Recipe id={this.state.showRecipeID} \n missed={this.state.missedIngredients} refresh={this.state.showRecipeDetail}/>}\n </div>\n </div>\n </div>\n )}", "render() {\n // Define this vis\n const vis = this;\n\n // Bind and modify - using 'datum' method to bind a single datum\n vis.topCounterEl.datum(vis.resultsCount)\n .text('Results Count: ')\n .append('span')\n .text(d => d);\n }", "countActiveChildren(props) {\n let count = 0;\n React.Children.forEach(props.children,\n (child) => {\n if (child) {\n if (child.props.hide === undefined || child.props.hide !== false) count++;\n }\n });\n return count;\n }", "returnEducations() {\n const educationsObjects = []; // will hold Educations items\n const arrayToReturn = []; // Array thet will be return to render function\n this.educationsRefs = Object.assign([], this.educationsRefs); // To fix Object not assignable\n var TotalHeightToAdd = 0;\n for (let index = 0; index < this.props.values.educations.length; index++) {\n if (index > 0) {\n TotalHeightToAdd =\n TotalHeightToAdd + this.educationsHeightToAdd[index - 1];\n }\n educationsObjects[index] = {\n item: (\n <Group\n y={index == 0 ? TotalHeightToAdd : TotalHeightToAdd + 10}\n ref={node => {\n this.educationsRefs[index] = node;\n }}\n >\n {/* Employer */}\n <Text\n x={140}\n y={10}\n width={70}\n fontSize={12}\n fontFamily='Poppins'\n text={this.props.values.educations[index].school}\n fontStyle='bold'\n ></Text>\n {/* Duration */}\n <Text\n x={140}\n y={22}\n width={70}\n fontSize={12}\n fontFamily='Poppins'\n text={\n this.props.values.educations[index].started +\n ' - ' +\n this.props.values.educations[index].finished\n }\n ></Text>\n {/* Job Title */}\n <Text\n x={215}\n y={10}\n fontSize={12}\n width={230}\n fontFamily='Poppins'\n text={this.props.values.educations[index].degree}\n fontStyle='bold'\n ></Text>\n {/* Job Description */}\n <Text\n x={215}\n y={22}\n fontSize={12}\n width={230}\n fontFamily='Poppins'\n text={this.props.values.educations[index].description}\n ></Text>\n </Group>\n ),\n height: index > 0 ? this.educationsHeightToAdd[index - 1] : 0\n };\n this.educationsRefs[index] != undefined\n ? (this.educationsHeightToAdd[index] = parseInt(\n this.educationsRefs[index].getClientRect().height\n ))\n : (this.educationsHeightToAdd[index] = 0);\n arrayToReturn.push(educationsObjects[index].item);\n }\n return arrayToReturn;\n }", "returnEmployments() {\n const employmentsObjects = []; // will hold employments items\n const arrayToReturn = []; // Array thet will be return to render function\n this.employmentsRefs = Object.assign([], this.employmentsRefs); // To fix Object not assignable\n var TotalHeightToAdd = 0;\n for (let index = 0; index < this.props.values.employments.length; index++) {\n if (index > 0) {\n TotalHeightToAdd =\n TotalHeightToAdd + this.employmentsHeightToAdd[index - 1];\n }\n employmentsObjects[index] = {\n item: (\n <Group\n y={index == 0 ? TotalHeightToAdd : TotalHeightToAdd + 10}\n ref={node => {\n this.employmentsRefs[index] = node;\n }}\n >\n {/* Employer */}\n <Text\n x={140}\n y={10}\n width={70}\n fontSize={6}\n fontFamily='Poppins'\n text={this.props.values.employments[index].employer}\n fontStyle='bold'\n ></Text>\n {/* Duration */}\n <Text\n x={140}\n y={22}\n width={70}\n fontSize={5}\n fontFamily='Poppins'\n text={\n this.props.values.employments[index].begin +\n ' - ' +\n this.props.values.employments[index].end\n }\n ></Text>\n {/* Job Title */}\n <Text\n x={215}\n y={10}\n fontSize={6}\n width={230}\n fontFamily='Poppins'\n text={this.props.values.employments[index].jobTitle}\n fontStyle='bold'\n ></Text>\n {/* Job Description */}\n <Text\n x={215}\n y={22}\n fontSize={5}\n width={230}\n fontFamily='Poppins'\n text={this.props.values.employments[index].description}\n ></Text>\n </Group>\n ),\n height: index > 0 ? this.employmentsHeightToAdd[index - 1] : 0\n };\n this.employmentsRefs[index] != undefined\n ? (this.employmentsHeightToAdd[index] = parseInt(\n this.employmentsRefs[index].getClientRect().height\n ))\n : (this.employmentsHeightToAdd[index] = 0);\n arrayToReturn.push(employmentsObjects[index].item);\n }\n return arrayToReturn;\n }", "render() {\n const { count } = this.state;\n\n return (\n <div>\n <button onClick={ this.onButtonClick }>\n +1\n </button>\n &nbsp;\n <NumberLabel\n text={ 'Count' }\n number={ count }\n />\n </div>\n );\n }", "render() {\n return (\n <div className=\"counter\">\n <h1>{this.state.count} </h1>\n <button onClick={this.handle}>add one!</button>\n </div>\n )\n }", "render() {\n const { style, className } = this.props\n return (\n <span style={style} className={className}>\n {this.state.remaining}\n </span>\n )\n }", "render() {\n return (\n <div className=\"wrapper\">\n \t<div className=\"container\">\n \t\t<h1 className=\"text-center\">Movies</h1>\n \t</div>\n <div className=\"container\">\n {this.props.children}\n </div>\n </div>\n );\n }", "render() {\n\n return (\n <div className=\"galleryItem\">\n <li key={this.props.galleryObject.key}>\n\n <button onClick={this.handleCounter}>\n <img src={this.props.galleryObject.data.image} alt={this.props.galleryObject.data.title} />\n <div className=\"overlay\">\n <p>Add to Cart</p>\n </div>\n </button>\n\n <h3>{this.props.galleryObject.data.title}</h3> {/*title*/}\n <h4>Price: {this.props.galleryObject.data.price}</h4> {/*price*/}\n \n {/* prints available counter */}\n {/*prints in stock*/}\n {this.state.prints - this.props.printsSelected <= 0 ? (\n <p>Out of Stock</p>\n ) : (\n <p>Prints Available: {this.state.prints - this.props.printsSelected}</p>\n \n )}\n\n </li>\n </div>\n );\n }", "render() {\n const total = this.props.answers.length;\n\n return (\n <ul>\n {this.props.answers.map((item, index) => \n <RunAnswer \n mode = {this.props.mode}\n key = {index}\n questIndex = {this.props.questIndex}\n index = {index}\n total = {total}\n answer = {item}\n changeAnswer = {this.props.changeAnswer}\n editable = {this.props.editable}\n />\n )}\n </ul>\n )\n }", "create_children(propchild) {\n const children = []\n if (this.props.children != null) {\n /**ensure children is an array dtype */\n let propchild = this.props.children;\n if (propchild.constructor != Array) {\n propchild = [propchild]\n };\n \n /**defines height of draggable handle */\n let hh = []\n if (this.props.lg == true) {\n hh = this.props.handleheight_lg\n }\n else {hh = this.props.handleheight_sm};\n \n /**create component according to specified style \n * (style of draggable handle is hard coded) \n */\n for (let inc = 0; inc < propchild.length; inc += 1) {\n const child = <div key={this.props.layout[inc].i} style={this.props.divstyle}>\n <div\n className=\"react-grid-dragHandleExample\"\n style={{\n background: '#CFD8DC',\n borderTopLeftRadius: '10px',\n borderTopRightRadius:'10px',\n height:hh[inc]\n }}\n >\n </div>\n {propchild[inc]}\n </div>;\n children.push(child);\n }\n }\n return children\n }", "render() {\n let stacks = this.props.stacks;\n let stack_list = stacks.map((stack) => {\n return <li className=\"stack-item shadow\">{stack}</li>;\n });\n let proj_label = this.props.proj_link == null ? <div className=\"label\">N/A</div> : <div className=\"label\">View Project</div>;\n // TODO remove or use the counter in css\n let indent = this.props.indent ? \"project-block indent\" : \"project-block\";\n return (\n <div className={indent}>\n <div className=\"card\">\n <div className=\"project\">\n <a className=\"link\" href={this.props.proj_link}>\n <div className=\"shadow\">\n <img className=\"preview hexagon\" src={this.props.proj_img}></img>\n {proj_label}\n </div>\n </a>\n <a className=\"link\" href={this.props.code_link}>\n <div className=\"shadow\">\n <img className=\"code hexagon\" src={CodeIcon}></img>\n <div className=\"label\">View Code</div>\n </div>\n </a>\n </div>\n <div className=\"info\">\n <div className=\"test\">\n \n <div className=\"project-title\">\n {this.props.title}\n <div className=\"underline\"></div>\n </div>\n </div>\n <ul className=\"stack-list\">{stack_list}</ul>\n <div className=\"project-description\">{this.props.description}</div>\n </div>\n </div> \n </div>\n );\n }", "function Main(props) {\n let count = 0;\n console.log(props);\n return (\n <div>\n {!props.leads ? (\n <h2>Loading...</h2>\n ) : (\n <div>\n <div\n style={{\n display: \"flex\",\n flexDirection: \"row\",\n justifyContent: \"space-around\",\n fontStyle: \"italic\",\n margin: \"0px\",\n padding: \"0px\",\n }}\n >\n <button onClick={() => props.fetchData()}>Get Data</button>\n <p>\n <strong>isAxiosError:</strong>\n {props.error? props.error.isAxiosError: 'No Error'}\n </p>\n <p>\n <strong>Error :</strong>\n {props.error? props.error.message: 'No Error'}\n </p>\n <p>\n <strong>Data :</strong>\n {props.error? props.error.config.data: 'No Error'}\n </p>\n </div>\n <div\n style={{\n textAlign: \"center\",\n backgroundColor: \"rgb(184, 184, 226)\",\n }}\n className=\"listTitle column\"\n >\n <p>S.N.</p>\n <p>Date</p>\n <p>Name</p>\n <p>Mobile</p>\n <p>Email</p>\n <p>Address</p>\n </div>\n {props.leads.map((lead) => {\n const { SENDERNAME, SENDEREMAIL, DATE_RE, MOB, ENQ_ADDRESS } = lead;\n count = count + 1;\n return (\n <div className=\"listTitle column\">\n <p>{count}</p>\n <p>{DATE_RE}</p>\n <p>{SENDERNAME}</p>\n <p>{MOB}</p>\n <p>{SENDEREMAIL}</p>\n <p>{ENQ_ADDRESS}</p>\n </div>\n );\n })}\n </div>\n )}\n </div>\n );\n}", "render() {\n\n return (\n <div>\n {this.renderContent()}\n </div>\n );\n \n }", "render() {\n const { loaded, totalCount, issueCountList, openDrawer, issueType } = this.state;\n const { securityIssue } = this.props\n\n return (\n <div>\n <Card className=\"card-wizard card-panel card-pd\" id=\"container_security_alerts_by_status\">\n <CardTitle text={<span> Security Alerts by Status - <b> {totalCount} </b></span>} />\n <CardContent className=\"card-body\">\n <Grid container spacing={24}>\n <ErrorBoundary error=\"error-boundary\">\n {loaded && issueCountList.map(issue => <IssueTypeButton toggleDrawer={this.toggleDrawer} key={issue.issueType} count={issue.issueCount} issueType={issue.issueType} totalCount={totalCount} />)}\n </ErrorBoundary>\n </Grid>\n </CardContent>\n </Card>\n {totalCount > 0 && <Drawer className=\"right-sidebar\" anchor=\"right\" open={openDrawer}>\n <SecurityIssueTable securityIssue={securityIssue} issueType={issueType} toggleDrawer={this.toggleDrawer} />\n </Drawer>}\n </div>\n );\n }", "render(){\n let csrCount = this.props.csrCount;\n let ssdcCount = this.props.ssdcCount;\n\n return (\n <div><p></p>\n <b>\n </b>\n <h4>Current CSRNet Count: {csrCount}</h4>\n <h4>Current SSDCNet Count: {ssdcCount}</h4>\n </div>\n )\n }", "render(){\n return <React.Fragment>\n <div className=\"container\">\n <p>{this.state.count}</p> \n <button className=\"btn btn-primary\" onClick={this.increment} > + </button>\n <button className=\"btn btn-danger\" onClick={this.decrement}> - </button>\n <button className=\"btn btn-warning\" onClick={this.reset}> RESET </button>\n </div>\n </React.Fragment>\n}", "render() {\n const total = this.props.questions.length;\n\n return (\n <ul>\n {this.props.questions.map((item, index) => \n <RunQuestion \n mode = {this.props.mode}\n key = {index}\n index = {index}\n total = {total}\n\n question = {item}\n changeAnswer = {this.props.changeAnswer}\n editable = {this.props.editable}\n />\n )}\n </ul>\n )\n }", "render() { // permite vc escrever o que vai ser renderizado.\n\t\t// OBS sempre que o JSX for mais de uma linha tem que ser envolvido por parentese\n\t\treturn <PlacarContainer {...dados} />; //ES6 - Repassa as propriedades dados dentro Plcarcontainer\n\t}", "render(){\n return (\n <div {...this.props} onClick={this.onClick}>\n {this.props.children}\n </div>)\n }", "adjustChildren(){\n var { context, href, schemas, children, windowWidth } = this.props;\n if (!context) return children;\n // We shouldn't ever receive a single Child.\n return React.Children.map(children, (child)=>\n React.cloneElement(child, { context, href, windowWidth, schemas })\n );\n }", "function IndexLayout(props) {\n return(\n <div className='container-fluid p-0'>\n {props.children}\n </div>\n )\n // }\n}", "render() {\n return (\n <Wrapper>\n <Header score={this.state.score} topScore={this.state.topScore}>Click Bait</Header>\n {this.state.cards.map(card => (\n <Card\n clickCount={this.clickCount}\n id={card.id}\n key={card.id}\n image={card.image}\n />\n ))}\n </Wrapper>\n );\n }", "render(){\n return(\n <>\n { console.log(\"child render that run whenever we change the state and props\") }\n {/* this will not give the husain bcs render func will run first after componentDidMount func */}\n state of child : {this.state.name}<br />\n (props of parent)child : {this.props.name}<br />\n {/* {this.state.innerWidth} */}<br />\n\n {/* in which we change the props by using onClick func and we see that only render func will run bcs it run whenever we change the state */}\n Child : {this.props.ChangState}<br />\n <button onClick= {this.props.onClick}>changePropsInChild</button>\n\n </>\n )\n }", "render() {\n return ( < Wrapper >\n \n <Title> 🐾 Clicky Cats 🐾Score: {this.state.count}/12 🐾 </Title> {\n this.state.friends.map(friend => \n ( < CatCard\n // removeFriend={this.removeFriend}\n id = {friend.id}\n key = {friend.id}\n image = {friend.image}\n cardIncrement = {this.cardIncrement}\n cardTwiceClick = {this.cardTwiceClick}\n />\n ))\n } </Wrapper>\n );\n}", "function TotalSnoreContainer(props) {\n return (\n <div className=\"total-snore-container\">\n <p className=\"total-snore-counter\">\n Total snores: <span className=\"counter\">{props.totalSnore}</span>\n </p>\n <p className=\"snore-per-second-counter\">\n Zzzz per second: {props.snorePerSecond}\n </p>\n </div>\n );\n}" ]
[ "0.6643785", "0.66287214", "0.65983915", "0.658134", "0.65642995", "0.6360201", "0.62864524", "0.62839437", "0.62774336", "0.62731767", "0.6217829", "0.62085485", "0.61763597", "0.61495376", "0.61429685", "0.6142749", "0.6121322", "0.60920495", "0.6079362", "0.6040119", "0.60259783", "0.60227054", "0.60203457", "0.59946305", "0.59940463", "0.5933263", "0.59309226", "0.5922567", "0.59058386", "0.58996063", "0.5898409", "0.5892361", "0.58918434", "0.58918434", "0.5891317", "0.58740944", "0.5856321", "0.5849235", "0.5824562", "0.5818198", "0.58101904", "0.5806904", "0.5802441", "0.57966685", "0.5790679", "0.5786431", "0.577778", "0.5777411", "0.57727945", "0.57685655", "0.5765506", "0.5752405", "0.57412755", "0.57239366", "0.57114273", "0.5695779", "0.5694391", "0.5688641", "0.567865", "0.56707674", "0.5667761", "0.5655778", "0.5651299", "0.5647235", "0.5643261", "0.56257015", "0.5623693", "0.562355", "0.5619893", "0.5613086", "0.5612641", "0.5605077", "0.56011784", "0.5598635", "0.5583292", "0.558034", "0.55726516", "0.5564969", "0.5564782", "0.5564663", "0.55629754", "0.555321", "0.55500644", "0.55493027", "0.55417705", "0.553951", "0.55345863", "0.5529094", "0.5528942", "0.5524355", "0.55213666", "0.55206144", "0.5517973", "0.5517114", "0.5517023", "0.5514111", "0.55123544", "0.55113703", "0.5511365", "0.55062175" ]
0.7884897
0
================== ACTIONS ========================== function that displays questions on the page
function renderQuestion() { // display $(".list-group-item").removeClass("correct").removeClass("incorrect"); // allows options to be selected $(".option-list").on("click", ".list-group-item", answerSelected); // checks to make sure there are still questions left (if not, proceed to end page) if (questionIndex <= (questionArr.length - 1)) { // clears default timer so game doesn't explode clearTimeout(defaultTimer); // lets user see answer and proceed to next question without clicking anything defaultTimer = setTimeout(function() { // turns option event off to prevent excess clicking $(".option-list").off("click", ".list-group-item", answerSelected); // shows answer to user showAnswerDefault(); console.log("Timeout expired", questionIndex); }, 25000); // display $("#question-panel").text(questionArr[questionIndex].text); $("#o-a .opt").text(questionArr[questionIndex].options[0]); $("#o-b .opt").text(questionArr[questionIndex].options[1]); $("#o-c .opt").text(questionArr[questionIndex].options[2]); $("#o-d .opt").text(questionArr[questionIndex].options[3]); console.log("Game is still going!"); } else { // turns option event off to prevent excess clicking $(".option-list").off("click", ".list-group-item", answerSelected); // display $("#question-panel").text("Show's over, cheapskate! Play again?"); $(".o-label").css("display", "none"); $("#o-c").css({"opacity": "0", "cursor": "default"}); $("#o-d").css({"opacity": "0", "cursor": "default"}); $("#o-a .opt").text("Correct answers... " + correctA); $("#o-b .opt").text("Incorrect answers... " + incorrectA); $(".reset-button").css("display", "inline-block"); console.log("Show's over, cheapskate!"); // allows reset button to be pressed $(".reset-button").on("click", resetGame); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayQuestion() {\n let question = STORE.questions[STORE.currentQuestion];\n updateScoreAndQuestionCounter();\n\n $(\"main\").html(generateQuestionTemplate(question.question));\n showOptions();\n $(\"#next\").hide();\n}", "function displayQuestion() {\n\t\t\tstartTime30();\t\n\t\t\t$(\"#question\").html(eachone[count].question);\n\t\t\t$(\"#option1\").html(eachone[count].option1.answer);\n\t\t\t$(\"#option2\").html(eachone[count].option2.answer);\n\t\t\t$(\"#option3\").html(eachone[count].option3.answer);\n\t\t\t$(\"#option4\").html(eachone[count].option4.answer);\n\t\t\t$(\"#okButton\").html(\"\");\n\t\t}", "function showQuestions() {\n if (quizBank.length == questionCounter) {\n endQuiz();\n } else {\n questionDisplay.innerText = quizBank[questionCounter].question;\n showAnswers();\n }\n}", "function displayQuestion() {\n\t$(\"#question\").html(questionID.question);\n\n\t// Displays question's possible answers.\n\tdisplayQuestionAnswers();\n}", "function handleQuestions() {\r\n $('body').on('click','#next-question', (event) => {\r\n STORE.currentQuestion === STORE.questions.length?displayResults() : renderAQuestion();\r\n });\r\n }", "function renderQuestionPage() {\n var currentQuestionObj = state.questions[state.currentQuestionIndex];\n renderQuestion();\n renderQuestionChoices(currentQuestionObj.answers);\n // $(\".popup-inner\").addClass(\"hidden\");\n}", "function displayQuestions() {\n //gets the current question from global variable currentQuestion\n // display a question\n currentQuestion++;\n $(\".questions\").text(triviaQuestions[currentQuestion].questions);\n }", "function displayQuestion() {\n\n $(\"#question\").html(questionID.question);\n\n\n\n // Displays question's possible answers.\n\n displayQuestionAnswers();\n\n}", "function renderQuestion() {\n if (questionNum < STORE.length) {\n renderQuestAns(questionNum);\n } else {\n $(\"questionNumber\").text(7);\n results();\n }\n}", "function displayQuestion() {\n $(\".questions\").text(currentQuestionData.question);\n $(\".answer-1\").text(currentQuestionData.otherAnswers[0]);\n $(\".answer-2\").text(currentQuestionData.otherAnswers[1]);\n $(\".answer-3\").text(currentQuestionData.otherAnswers[2]);\n $(\".answer-4\").text(currentQuestionData.otherAnswers[3]);\n }", "function displayQuestion() {\n hideResults();\n $(\"#answer\").hide();\n $(\"#time\").show();\n showDiv();\n $(\"#question\").html(question[questionCount]);\n $(\"#choice1\").html(firstChoice[questionCount]);\n $(\"#choice2\").html(secondChoice[questionCount]);\n $(\"#choice3\").html(thirdChoice[questionCount]);\n $(\"#choice4\").html(fourthChoice[questionCount]);\n }", "function showQuestions() {\n $(questionText).text(quizObject[index].question);\n $(optionA).text(quizObject[index].answerA);\n $(optionB).text(quizObject[index].answerB);\n $(optionC).text(quizObject[index].answerC);\n $(optionD).text(quizObject[index].answerD);\n }", "function runQuestionPage(){\n questionPage(questions[++currentQuestion]);\n }", "function showQuestion() {\n if (questionCount === questionsObj.length) {\n stop();\n }\n else {\n $(\"#question\").html(questionsObj[questionCount].question);\n $(\"#answer1\").html(questionsObj[questionCount].choices[0]);\n $(\"#answer2\").html(questionsObj[questionCount].choices[1]);\n $(\"#answer3\").html(questionsObj[questionCount].choices[2]);\n $(\"#answer4\").html(questionsObj[questionCount].choices[3]);\n questionTime = 5;\n }\n }", "function askQuestions() {\n if (currentQuestion === arrayOfQuestions.length) {\n questionSection.style.display = \"none\";\n initialsSection.style.display = \"block\";\n }\n presentQuestion.textContent = arrayOfQuestions[currentQuestion].quizQuestion;\n firstChoice.textContent = arrayOfQuestions[currentQuestion].potentialAnswers[0];\n secondChoice.textContent = arrayOfQuestions[currentQuestion].potentialAnswers[1];\n thirdChoice.textContent = arrayOfQuestions[currentQuestion].potentialAnswers[2];\n fourthChoice.textContent = arrayOfQuestions[currentQuestion].potentialAnswers[3]\n}", "function showQuestion() {\n clearSection();\n currentQuestion = questions[questionNum];\n var loc = questionNum + 1;\n questionStat.textContent = \"Question: \" + loc + \"/\" + questionLength;\n var question = document.createElement(\"h2\");\n question.textContent = currentQuestion.questionPrompt;\n quizEl.appendChild(question);\n showQuestionOptions();\n}", "function showQuestion() {\n\n questionSpot.textContent = questions[questionIndex].question;\n showAnswers(); \n \n \n}", "function showQuestions(passQuestion) {\n questionEl.innerText = passQuestion.question;\n answerBtn1.innerText = passQuestion.answers[0].text;\n answerBtn2.innerText = passQuestion.answers[1].text;\n answerBtn3.innerText = passQuestion.answers[2].text;\n answerBtn4.innerText = passQuestion.answers[3].text;\n}", "function displayQuestion() {\n questionBox.textContent = myQuestions[questionIndex].question\n displayAnswers()\n}", "function showQuestions() {\n DOMSelectors.quizQuestion.innerHTML = questions[index].question;\n DOMSelectors.choice1.innerHTML = questions[index].choices[0];\n DOMSelectors.choice2.innerHTML = questions[index].choices[1];\n DOMSelectors.choice3.innerHTML = questions[index].choices[2];\n DOMSelectors.choice4.innerHTML = questions[index].choices[3];\n}", "function showQuestion() {\n // quiz questions along with possible answers\n questionEl.innerHTML = questions[currentQuesIndex].question;\n answerA.innerHTML = questions[currentQuesIndex].choiceA;\n answerB.innerHTML = questions[currentQuesIndex].choiceB;\n answerC.innerHTML = questions[currentQuesIndex].choiceC;\n\n}", "function showQuestions () {\n\t$(\".questions\").show();\n\t$(\".start\").hide();\n\trun();\n}", "function showQ() {\n\t$question.show();\n}", "function showQuestion() {\n\t$('#answer').text(''); // Reset user input\n\t$('#answer').focus();\n\t$('#question').text(questionNumber + '. ' + Questions[questionIndex][0]); // Print question\n\tquestionNumber++;\n}", "function showQuestion() {\n $('main').html(generateQuestion());\n}", "function showQuestion() {\n // automatically closes question party dropdown\n questionPartyDropdown.style.display = \"none\";\n partyIsOpen = false;\n\n // removes active styling on buttons\n eensBtn.classList.remove(\"active\");\n noneBtn.classList.remove(\"active\");\n oneensBtn.classList.remove(\"active\");\n\n // if the question has already been answered\n if(answers.length >= index && answers[index] != undefined && answers[index].answer != '') {\n\n // get button and apply active styling to the previous answered questions\n var prevSelectedBtn = document.getElementById(answers[index].answer);\n prevSelectedBtn.classList.add(\"active\");\n }\n\n // shows the current data\n questionTopic.innerHTML = (index + 1) + \". \" + subjects[index]['title'];\n questionInfo.innerHTML = subjects[index]['statement'];\n\n // will be called to generate all parties at the question page and display their side on the topic (function is in generation.js)\n generateParties();\n}", "function renderQuestions() {\n var questionsIndexLength = questions.length - 1;\n if (index <= questionsIndexLength) {\n document.getElementById(\"question\").innerHTML = questions[index].title;\n renderQuestionChoices();\n }\n quizOver();\n}", "function displayQuestion() {\n\n questionsEl.textContent = quizQuestions[currentQuestionIndex].title\n answer1El.textContent = quizQuestions[currentQuestionIndex].choices[0];\n answer2El.textContent = quizQuestions[currentQuestionIndex].choices[1];\n answer3El.textContent = quizQuestions[currentQuestionIndex].choices[2];\n answer4El.textContent = quizQuestions[currentQuestionIndex].choices[3];\n}", "function doQuiz() {\n\n\trenderQuiz();\n\trenderQuestion();\n\tcheckAnswer();\n}", "function answersQuestionPrint() {\n questionChooser();\n answerChooser(currentQuestion);\n }", "function fillPage(questions) {\n var output = \"\"\n\n questions.forEach(q=>{\n output += getQuestionText(q);\n })\n\n return output;\n}", "function questionPage() {\r\n if (store.questionNumber === store.questions.length) {\r\n return renderFinalPage();\r\n }\r\n\r\n let currentQuestion = store.questions[store.questionNumber];\r\n let questionPage = `\r\n <div class=\"content\">\r\n <h2>Question ${store.questionNumber+1}: ${currentQuestion.question}</h2>\r\n <p>Your score: ${store.score}/5</p>\r\n <form>\r\n <input type=\"radio\" id=\"answer\" name=\"answer\" value=\"${currentQuestion.answers[0]}\" required>\r\n <label>${currentQuestion.answers[0]}</label><br>\r\n <input type=\"radio\" id=\"answer\" name=\"answer\" value=\"${currentQuestion.answers[1]}\" required>\r\n <label>${currentQuestion.answers[1]}</label><br>\r\n <input type=\"radio\" id=\"answer\" name=\"answer\" value=\"${currentQuestion.answers[2]}\" required>\r\n <label>${currentQuestion.answers[2]}</label><br>\r\n <input type=\"radio\" id=\"answer\" name=\"answer\" value=\"${currentQuestion.answers[3]}\" required>\r\n <label>${currentQuestion.answers[3]}</label><br>\r\n <button id=\"submit\">Submit</button>\r\n </form>\r\n </div>\r\n `;\r\n return questionPage;\r\n}", "function displayQuestions() {\n let q = triviaQuestions[questionCount];\n \n question.innerHTML = \"<p>\"+ q.question +\"</p>\";\n choice1.innerHTML = q.choice1;\n choice2.innerHTML = q.choice2;\n choice3.innerHTML = q.choice3;\n choice4.innerHTML = q.choice4;\n\n //Ends the quiz after the questions are finished and displays results\n if (questionCount > 9) {\n alert(\"The quiz is now over. Let's see your results.\");\n stopTimer();\n $(\"#timer\").hide();\n $(\"#trivia\").hide();\n showResults(); \n } \n }", "function displayQuestion() {\n questionText.textContent = currentQuestionObject.question;\n for (i=0; i<4; i++) {\n answerButtons[i].textContent = currentQuestionObject.choices[i]\n }\n}", "function displayQuestion() {\n \n //create a variable nextQuestion equal to the question element at questionIndex in questionArray\n var nextQuestion = questionArray[questionIndex].question;\n \n //Display the question on the screen by using the id #questionDisplayed\n $(\"#questionDisplayed\").text(nextQuestion);\n\n}", "function displayQuestion() {\n let questionNumber = STORE.questions[STORE.questionNumber];\n return `\n <img src=${picStore[STORE.questionNumber + 1]} alt=\"new girl jess winston schmidt\" width=\"375\">\n <form id=\"question-form\" class=\"question-form\">\n <fieldset>\n <div class=\"question\">\n <legend> ${questionNumber.question}</legend>\n </div>\n <div class=\"options\">\n <div class=\"answers\">\n ${displayAnswers()}\n </div>\n </div>\n <button type=\"submit\" id=\"submit-answer-btn\" tabindex=\"5\" class=\"start\">Submit</button>\n <button type=\"button\" id=\"next-question-btn\" tabindex=\"6\" class=\"start\">Next</button>\n </fieldset>\n </form>\n `;\n }", "function printQuestions(){\n\t\t//Access div on page to hold the questions\n\t\tquestionEl = document.getElementById(\"questionEl\");\n\t\t//start with a blank question area each time the game is played\n\t\tquestionEl.innerHTML = \"\";\n\t\tfor(var i = 0; i < questions.length; i++){\n\t\t\t//Put the question on the page\n\t\t\tquestionEl.innerHTML += '<h3>Question ' + (i + 1)+ ': ' + questions[i] + '</h3>';\n\t\t}\n\t}", "function showQuestions() {\n var currentQuestion = codeQuestions[currentQuestionIndex];\n\n var titleEl = document.getElementById(\"question-title\");\n titleEl.textContent = currentQuestion.question;\n\n answersEl.innerHTML = \"\";\n\n //create loop for questions\n currentQuestion.answers.forEach(function (answer, i) {\n var answerNode = document.createElement(\"button\");\n answerNode.setAttribute(\"class\", \"answers\");\n answerNode.setAttribute(\"class\", \"answers\");\n\n answerNode.textContent = i + 1 + \".\" + rightAnswer;\n\n //clicky boy\n answerNode.onclick = answerClick;\n answersEl.appendChild(answerNode);\n });\n }", "displayQuestion (no) {\n\n\t\tlet qn = questions[no];\n\t\tlet aws = qn.getAnswers();\n\n\t\tlet quesNo = $(\"<kbd class='question-no'></kbd>\").text(no+1);\n\t\t$(\".question-block\").text(qn.getQuestion());\n\t\t$(\".question-block\").prepend(quesNo);\n\n\t\tlet aBlock = $(\".answer-block\").empty();\n\t\tlet i = 0;\n\t\tfor (let ans of aws) {\n\t\t\tlet div = $(\"<div class='custom-control custom-radio single-answer'></div>\");\n\t\t\tlet input = $(\"<input type='radio' id='customRadio\" + ++i +\"' name='answer' value='\" +ans+ \"' class='custom-control-input' />\");\n\t\t\tlet label = $(\"<label class='custom-control-label' for='customRadio\"+ i +\"'></label>\").text(ans);\n\n\t\t\tif (no < uStorage.allDetails.length) {\n\t\t\t\tif (ans == uStorage.getUserAnswer(no))\n\t\t\t\t\tinput.prop(\"checked\", true);\n\t\t\t}\n\n\t\t\taBlock.append(div.append(input, label));\n\t\t}\n\n\t\t//Creation of the Previous button.\n\t\tlet pButton = $(\".prev-button\").off(\"click\");\n\t\tpButton.click(function () {\n\t\t\tif (uStorage.allDetails.length+1 == questions.length)\n\t\t\t\tuStorage.insertDetail(createObj(no, false), no);\n\t\t\t$(\".content-header\").slideUp(600);\n\t\t\t$(\".main\").slideUp();\n\t\t\tsetTimeout(function () {\n\t\t\t\tdisplay.displayQuestion(no-1);\n\t\t\t}, 400);\n\t\t});\n\t\tno == 0 ? pButton.attr(\"disabled\", \"disabled\") : pButton.removeAttr(\"disabled\");\t\t\t\t\t//The button is disabled for the first page.\n\n\t\t//Creation of the Submit button.\n\t\tlet sButton = $(\".submit-button\").off(\"click\");\n\t\tsButton.click(function () {\n\t\t\tuStorage.insertDetail(createObj(no, true), no);\n\t\t\t$(\".content-header\").slideUp(600);\n\t\t\t$(\".main\").slideUp();\n\t\t\tsetTimeout(function () {\n\t\t\t\tdisplay.displayQuestion(no+1 == questions.length ? no: no+1);\n\t\t\t\tupdateHeader();\n\t\t\t}, 400);\n\n\t\t});\n\n\t\t//Creation of the Next button.\n\t\tlet nButton = $(\".next-button\").off(\"click\");\n\t\tnButton.click(function () {\n\t\t\tuStorage.insertDetail(createObj(no, false), no);\n\t\t\t$(\".content-header\").slideUp(600);\n\t\t\t$(\".main\").slideUp();\n\t\t\tsetTimeout(function () {\n\t\t\t\tdisplay.displayQuestion(no+1);\n\t\t\t\tupdateHeader();\n\t\t\t}, 400);\n\t\t});\n\n\t\tif (no+1 == questions.length) {\n\t\t\tnButton.attr(\"disabled\", \"disabled\");\t\t\t\t\t\t\t//The button is disabled for the last page.\n\t\t\tthis.displaySureButton();\n\t\t}\n\t\telse\n\t\t\tnButton.removeAttr(\"disabled\");\n\n\t\t$(\".content-header\").slideDown(600);\n\t\t$(\".main\").css(\"display\", \"flex\").hide().slideDown();\n\t\t$(\".quiz-timer\").slideDown();\n\t}", "function renderQuestionView () {\n $('.variable-content-container, .instructions, .feedback, .final-view, .js-start-button, .js-next-button, .js-replay-button').addClass('js-hide');\n $('.score-question, .questions, .js-submit-button').removeClass(\"js-hide\");\n $('.questions').empty();\n updateQuestionNum();\n generateQuestion();\n}", "function showQuestion() {\n var showQuestion = document.getElementById(\"showQuestion\");\n showQuestion.style.display = \"block\";\n var intro = document.getElementById(\"intro\");\n intro.style.display = \"none\";\n\n var currentQuestion = questions[currentQuestionIndex];\n questionEl.innerHTML = currentQuestion.question;\n answerButtonAEl.innerHTML = currentQuestion.choices[0];\n answerButtonBEl.innerHTML = currentQuestion.choices[1];\n answerButtonCEl.innerHTML = currentQuestion.choices[2];\n answerButtonDEl.innerHTML = currentQuestion.choices[3];\n}", "function displayQuestions() {\n // Show questions starting with question one\n var displayedQuestion = gameQuestionEl.innerHTML = questions[currentQuestion].question;\n // Console log displayed question\n console.log(\"Displayed question: \", displayedQuestion);\n // Display each answer choice for user to select from\n choiceA.innerHTML = questions[currentQuestion].choices[0];\n choiceB.innerHTML = questions[currentQuestion].choices[1];\n choiceC.innerHTML = questions[currentQuestion].choices[2];\n choiceD.innerHTML = questions[currentQuestion].choices[3];\n}", "function setQuestions() {\n randomizer();\n $(\"#category\").html(\"<h3>Your category is - \\\"\" + category + \"\\\"</h3\");\n $(\"#question\").html(\"<h4>\" + question + \"</h4\");\n setAnswers();\n\n } //ends setQuestions", "function renderAQuestion() {\r\n let question = STORE.questions[STORE.currentQuestion];\r\n updateQuestionAndScore();\r\n const questionHtml = $(`\r\n <div>\r\n <form id=\"js-questions\" class=\"question-form\">\r\n \r\n \r\n <div class=\"row question\">\r\n <div class=\"col-12\">\r\n <h2> ${question.question}</h2>\r\n </div>\r\n </div>\r\n \r\n <div class=\"row options\">\r\n <div class=\"answer-options\">\r\n <div class=\"js-options\"> </div>\r\n </div>\r\n </div>\r\n \r\n \r\n <div class=\"row\">\r\n <div class=\"col-12\">\r\n <button type = \"submit\" id=\"answer\" tabindex=\"5\">Submit</button>\r\n <button type = \"button\" id=\"next-question\" tabindex=\"6\"> Next >></button>\r\n </div>\r\n </div>\r\n \r\n </form>\r\n </div>`);\r\n $(\"main\").html(questionHtml);\r\n updateOptions();\r\n $(\"#next-question\").hide();\r\n }", "function displayQuestion(data){\n //Update the question, text, answers and categories\n $(\"#questionText\").text(data.question);\n $(\"#quizgamecategory\").text(data.category);\n\n //show the question section\n $('#quizgamequestion').show();\n}", "function showQuestion() {\n if (trackQuestion == questions.length) {\n scorePage();\n } else {\n questionElement.textContent = questions[trackQuestion].question;\n btn1.textContent = questions[trackQuestion].answers[0];\n btn2.textContent = questions[trackQuestion].answers[1];\n btn3.textContent = questions[trackQuestion].answers[2];\n btn4.textContent = questions[trackQuestion].answers[3];\n trackQuestion++;\n console.log(trackQuestion);\n }\n}", "function setupQuestions() {\n // swap the div on display\n document.getElementById(\"introduction\").style.display = \"none\";\n document.getElementById(\"questions\").style.display = \"block\";\n // get the page elements\n questionHeading = document.getElementById(\"question_heading\");\n questionLine = document.getElementById(\"question_line\");\n questionExplanation = document.getElementById(\"question_explanation\");\n // set and display the current domain\n currentDomain = 0;\n questionHeading.innerHTML = DOMAINS[currentDomain];\n // set the flag\n flagTerminateDomain = false;\n // display the first question\n currentQuestion = -1;\n nextQuestion();\n}", "function showQuestion(){\n var _item_question = getQuestion();\n //show layout\n $(\"#question2\").html(_item_question[\"question\"]);\n}", "function showQuizTemplate(correctAnswers, question, questionNumber) {\n// question per my function nextQuestion() is from the questionList array of objects\n\treturn `\n\t<form title=\"American Government Quiz\"> <h2 id=\"question\">${question.text}</h2>\n <fieldset role=\"radiogroup\">\n <legend>Select one answer:</legend>\n <ul>\n <li>\n <input type=\"radio\" id=\"optionA\" name=\"answer\" value=\"${question.ansArray[0]}\">\n <label for=\"optionA\">${question.ansArray[0]}</label>\n </li>\n\n <li>\n <input type=\"radio\" id=\"optionB\" name=\"answer\" value=\"${question.ansArray[1]}\">\n <label for=\"optionB\">${question.ansArray[1]}</label>\n </li>\n\n <li>\n <input type=\"radio\" id=\"optionC\" name=\"answer\" value=\"${question.ansArray[2]}\">\n <label for=\"optionC\">${question.ansArray[2]}</label>\n </li>\n\n <li>\n <input type=\"radio\" id=\"optionD\" name=\"answer\" value=\"${question.ansArray[3]}\">\n <label for=\"optionD\">${question.ansArray[3]}</label>\n </li>\n\n <li >\n <input type=\"submit\" id=\"submit-button\" role=\"button\" name=\"selection-submit\" />\n </li>\n </ul>\n\n </fieldset>\n</form> \n\n<div id=\"status-bar\">\n\t\n\t<section class=\"results\">Score: ${correctAnswers}/${questionNumber} </section>\n\t<section class=\"feedback\">Feedback Section \n\t\t<span id=\"question-count\"> Question: ${question.number}/10 </span>\n\t</section>\n\n</div>\n`;\n\n}", "function questionContent() {\n \n $(\"#gameScreen\").append(\"<p><strong>\" +\n questions[questionCounter].question + \"</p><p class= 'choices'>\" +\n questions[questionCounter].choices[0] + \"</p><p class='choices'>\" + \n questions[questionCounter].choices[1] + \"</p><p class='choices'>\" + \n questions[questionCounter].choices[2] + \"</p><p class='choices'>\" + \n questions[questionCounter].choices[3] + \"</strong></p>\");\n \n }", "function displayQs() {\n\tfor (i = 1; i <=10; i++) {\t\n\t\t$(\"#displayQ\" + i).html(\"<h2>\" + trivia[currentQuestion].question + \"</h2>\");\n\t\tcurrentQuestion++;\n\t}\n}", "function displayQuestions() {\n\n // Define the current question as the question the question highlighted by the index \"pointer\"\n var currentQuestion = questionsList[currentQuestionIndex];\n\n // Log the question selected from the array for display in console\n console.log(currentQuestion);\n\n // Render selected question to question element in the html\n questionDiv.textContent = currentQuestion.question;\n\n // Render corresponding question answers to buttons based on index\n answerAbutton.textContent = currentQuestion.answers[0];\n answerBbutton.textContent = currentQuestion.answers[1];\n answerCbutton.textContent = currentQuestion.answers[2];\n answerDbutton.textContent = currentQuestion.answers[3];\n\n // // // Onclick event checkAnswer\n answerAbutton.onclick = checkAnswer;\n answerBbutton.onclick = checkAnswer;\n answerCbutton.onclick = checkAnswer;\n answerDbutton.onclick = checkAnswer;\n\n // Log player response in the console\n console.log(answerAbutton.onclick);\n}", "function renderQuestAns(questions) {\n let showQuestion = $(`\n <form class=\"question-form\">\n <section class=\"quiz-bg\">\n <fieldset name=\"start-quiz\">\n <legend class=\"zzz\">zZz</legend>\n <h2 class=\"question-text\">${STORE[questions].question}</h2>\n </fieldset>\n </section>\n </form>\n `);\n\n let showChoices = $(showQuestion).find(\"fieldset\");\n STORE[questions].answers.forEach(function(ans, qindex) {\n $(`<span class=\"choices\"><input class=\"radio\" type=\"radio\" \n id=\"${qindex}\"\n value=\"${ans}\" \n name=\"answer\" required>${ans}</span>`).appendTo(showChoices);\n });\n $(`<button type=\"button\" class=\"submitButton\">Submit</button>`).appendTo(\n showChoices\n );\n $(\".display\").html(showQuestion);\n}", "function displayQuestion() {\n // hide questions\n document.getElementById(\"questions\").style.display = \"block\";\n // hide results\n results.style.display = \"none\";\n startQuiz.style.display = \"none\";\n // clear out previous content\n document.getElementById(\"questions\").innerHTML = \"\";\n // show question based on iteration of questionCards array\n var questionText = document.createElement(\"h3\");\n questionText.textContent = questionCards[currentQuestion].question;\n document.getElementById(\"questions\").appendChild(questionText);\n // append answers for each question\n for (var i = 0; i < questionCards[currentQuestion].answers.length; i++) {\n var answerText = document.createElement(\"button\");\n answerText.textContent = questionCards[currentQuestion].answers[i];\n answerText.classList.add(\"btn\", \"btn-primary\");\n answerText.setAttribute(\"id\", \"answer\");\n answerText.setAttribute(\n \"data-answer\",\n questionCards[currentQuestion].answers[i]\n );\n answerText.onclick = checkAnswer;\n document.getElementById(\"questions\").appendChild(answerText);\n }\n}", "function displayQuestion() {\n formQuestion.textContent = questions[currentQuestion].question;\n answer1.textContent = \" 1. \" + questions[currentQuestion].answers[1];\n answer2.textContent = \" 2. \" + questions[currentQuestion].answers[2];\n answer3.textContent = \" 3. \" + questions[currentQuestion].answers[3];\n answer4.textContent = \" 4. \" + questions[currentQuestion].answers[4];\n}", "function displayQuestion(arg) {\n setTimer();\n $(\"#alerts\").hide();\n $(\"#questionDisplay\").html(arg.question);\n $(\"#choice1\").html(arg.choices[0]);\n $(\"#choice2\").html(arg.choices[1]);\n $(\"#choice3\").html(arg.choices[2]);\n $(\"#choice4\").html(arg.choices[3]); \n }", "function renderQuestions () {\n console.log(`Next Question, #${questionNumber + 1} Render question screen.`);\n updateQuestionNumber();\n //generate the string we need to Display\n const questionString = getQuestionString();\n $('main').html(questionString);\n\n}", "function renderQuestion() {\n document.getElementById(\"start\").addEventListener(\"click\", startQuiz) \n test = get(\"button\");\n if (position >= window.question) {\n test.innerHTML = \"<h2>You got \" + correct + \" of \" + questions.length + \" questions correct</h2>\";\n get(\"submission\").innerHTML = \"Test completed\";\n //resets variable for quiz restart\n position = 0;\n correct = 0;\n //stops renderQuestion function when test is complete\n return false;\n }\n get(\"quest\").innerHTML = \"Question \" + (position + 1) + \" of \" + questions.length;\n\n question = questions[position].question;\n chA = questions[position].a;\n chB = questions[position].b;\n chC = questions[position].c;\n chD = questions[position].d;\n console.log(\"these are the questions\")\n // display the question\n question.innerHTML = \"<h3>\" + question + \"</h3>\";\n console.log(\"this is the question\")\n // display the answer options\n get \n // document.getElementById(\"userinput1\").value = \"chA\";\n // document.getElementById(\"userinput2\").value = \"chB\";\n // document.getElementById(\"userinput3\").value = \"chC\";\n // document.getElementById(\"userinput4\").value = \"chD\";\n\n}", "function getQuizPage() {\n \n}", "function displayQuestions(){\n\n //restarts countdown timer at each question\n stopwatch.stop();\n stopwatch.timer();\n \t\t\n \t\t// displays question and choices\n $(\"#questions\").text(questions[qCounter].question);\n\t\t$(\"#answer0\").text(questions[qCounter].choices[0]);\n\t\t$(\"#answer1\").text(questions[qCounter].choices[1]);\n\t\t$(\"#answer2\").text(questions[qCounter].choices[2]);\n\t\t$(\"#answer3\").text(questions[qCounter].choices[3]);\n }", "function showQuestion(n) {\n\t\t// cache the current question number for use by other functions\n\t\tcurrentQuestionNumber = n;\n\t \t// Update the current question number indicator, ex : Question 3 of 20\n\t \t$(\".q-number span\").first().text(currentQuestionNumber);\n\t \t// Hide the next button until user submits the answer\n\t\t$(\"#quiz-panel .next\").hide();\n\n\t\tvar question = QUESTIONS[currentTrackName][n - 1];\n\t\t\n\t\tvar questionHtml = buildHTML(QUIZ_TEMPLATE_QUESTION, question.title);\n\n\t\tvar answersHtml = \"\";\n\t\t$.each(question.options, function (index, value) {\n\t\t\t// constructing the li including radio button\n\t\t\tanswersHtml += buildHTML(QUIZ_TEMPLATE_OPTION, index + 1, value);\n\t\t});\n\t\tanswersHtml = buildHTML(QUIZ_TEMPLATE_LIST, answersHtml);\n\n\t\t$(\"#question-box\").html(questionHtml + answersHtml);\n\n\t\t$(\"#quiz-panel .submit\").attr(\"disabled\", \"disabled\").show();\n\n \t\t// we should enable the submit button when radio button value changes\n\t \t$(\"input:radio[name=answer]\").change(function () {\n\t \t\t$(\"#quiz-panel .submit\").removeAttr(\"disabled\");\n\t \t});\n\t}", "display() {\n document.querySelector(\"#question\").innerHTML = this.question;\n for (let i = 0; i < 4; i++)\n showAnswer = selectValue(showAnswer, 4);\n answer1.innerHTML = this.answers[showAnswer[0]];\n answer2.innerHTML = this.answers[showAnswer[1]];\n answer3.innerHTML = this.answers[showAnswer[2]];\n answer4.innerHTML = this.answers[showAnswer[3]];\n }", "function getQuestion() {\n // Get current question\n let questionInfoEl = questions[questionNumEl];\n // If there are no questions left, stop time, end function\n if (questionInfoEl == undefined) {\n endGame();\n return;\n }\n\n // loop show choices\n for (let i = 0; i < responseOptionsEl.length; i++) {\n responseOptionsEl[i].textContent = i + 1 + \". \" + questionInfoEl.choices[i];\n responseOptionsEl[i].value = questionInfoEl.choices[i];\n responseOptionsEl[i].onclick = answerCheck;\n }\n\n document.getElementById(\"question-text\").textContent = questionInfoEl.title;\n // show the question\n questionContainerEl.classList.remove(\"hide\");\n}", "function renderQuestion() {\n $(\".questionPage\").html(generateQuestionPage());\n}", "function renderQuestionView() {\n //render the current question\n console.log('question_array is: ', QUESTION_ARRAY);\n if (QUESTION_ARRAY.length > 0) {\n const question = QUESTION_ARRAY[STORE.currentQuestion].makeQuestionString();\n const currentState = renderCurrentState();\n //render a submit button\n // const button = generateButton(STORE.button.class, STORE.button.label);\n return `${question} ${currentState}`;\n }\n else {\n return 'Quiz is loading...';\n }\n\n}", "function generateQuestionPage(){\n //grabs current question, question number\n const allQuestions = store.questions;\n const currentQuestionNumber = store.questionNumber;\n const currentQuestionData = allQuestions[currentQuestionNumber];\n const currentQuestion = currentQuestionData.question;\n //grabs HTML for the current answer choices\n const choicesHTML = generateChoices();\n\n return `\n <h1 class=\"quiz-questions\" role=\"heading\">Question ${currentQuestionNumber + 1} out of ${store.questions.length}</h1>\n <section role=\"region\" aria-label=\"Question\" class=\"quiz-area\">\n <h3 class=\"score-result\">Score: ${store.score} out of ${Object.values(store.questions).length}</h3>\n <figure>\n <img src=\"https://cdn.discordapp.com/emojis/615236185882886164.png?v=1\" alt=\"thinking emoji\">\n <figcaption>Hmmm...</figcaption>\n </figure>\n <form id=\"question-form\" action=\"#\" aria-label=\"Display Question, Question Number, Choices, and Submit button\" role=\"form\">\n <fieldset tabindex=\"0\" role=\"radiogroup\">\n <legend>${currentQuestion}?</legend>\n ${choicesHTML}\n </fieldset>\n <button id=\"submit-answer\" role=\"button\">Submit Answer</button>\n </form>\n </section>`;\n}", "function renderQuestion(){\n test = get(\"test\");\n if(pos >= questions.length){\n test.innerHTML = \"<h2>You got \"+correct+\" of \"+questions.length+\" questions correct</h2>\";\n get(\"test_status\").innerHTML = \"Test completed\";\n // resets the variable to allow users to restart the test\n pos = 0;\n correct = 0;\n // stops rest of renderQuestion function running when test is completed\n return false;\n }\n get(\"test_status\").innerHTML = \"Question \"+(pos+1)+\" of \"+questions.length;\n \n question = questions[pos].question;\n chA = questions[pos].a;\n chB = questions[pos].b;\n chC = questions[pos].c;\n chD = questions[pos].d;\n // display the question\n test.innerHTML = \"<h3>\"+question+\"</h3>\";\n // display the answer options\n // the += appends to the data we started on the line above\n test.innerHTML += \"<label> <input type='radio' name='choices' value='A'> \"+chA+\"</label><br>\";\n test.innerHTML += \"<label> <input type='radio' name='choices' value='B'> \"+chB+\"</label><br>\";\n test.innerHTML += \"<label> <input type='radio' name='choices' value='C'> \"+chC+\"</label><br>\";\n test.innerHTML += \"<label> <input type='radio' name='choices' value='D'> \"+chD+\"</label><br><br>\";\n test.innerHTML += \"<button onclick='checkAnswer() '>Submit Answer</button>\";\n}", "function showQuestion(){\n var q = questions[runningQuestion];\n questionContainer.innerHTML = q.question;\n a.innerHTML = q.answerA;\n b.innerHTML = q.answerB;\n c.innerHTML = q.answerC;\n d.innerHTML = q.answerD;\n}", "function displayQuestion() {\n let q = questions[currentQuestion];\n question.innerHTML = q.question;\n btnA.innerHTML = q.choiceA;\n btnB.innerHTML = q.choiceB;\n btnC.innerHTML = q.choiceC;\n btnD.innerHTML = q.choiceD\n}", "function questionPage() {\n\n \n //clear message\n $(\"#message\").empty();\n \n if (questionIndex === questionArray.length) {\n finalPage();\n return;\n }\n\n //Show the div tag\n $(\"#questionPage\").show();\n\n //reset timer\n timeRemaining = 30;\n\n //display timeRemaining on html\n $(\"#timeRemaining\").text(timeRemaining + \" seconds\");\n\n //use setInterval to call countDown() every 1 second\n countDownInterval = setInterval(countDown, 1000);\n \n //call displayQuestion()\n displayQuestion();\n \n //call displayAnswers()\n displayAnswers();\n \n}", "function printQA() {\n var currentQA = getRandomQA();\n var message = '<h3 class=\"question\">Q: ' + currentQA.question + \"</h3>\";\n message += '<p class=\"answer\">A: ' + currentQA.answer + \"</p><footer>\";\n if (currentQA.readmore) {\n message += '<p><a class=\"readmore\" href=\"' + currentQA.readmore + '\">Read More...</a></p>';\n }\n if (currentQA.tags) {\n \tmessage += '<span class=\"tags small\">tags: ' + currentQA.tags + '</span>';\n }\n message += \"</footer>\";\n\n document.getElementById(\"qa-box\").innerHTML = message;\n}", "function displayQuestionsAndAnswers(questionsList) {\n\n\tdisplayContainer.insertAdjacentHTML('beforeend', \"<h1> Your Input </h1>\");\n\n\tvar i;\n\t// For loop that basically iterates through the list and prints out what the user responded.\n\tfor (i = 0; i < questionsList.length; i ++) {\n\t\t//Every index into questionsList will be a question object.\n\t\tprocessQuestionAndAnswerObject(questionsList[i]);\n\t}\n}", "function showQuestion(question) {\n questionEl.innerText = question.question;\n}", "function displayQuestion() {\n const questionElement = document.getElementById('question');\n const optionsElement = document.getElementById('options');\n \n // Clear previous question and options\n questionElement.textContent = '';\n optionsElement.textContent = '';\n \n // Display current question\n questionElement.textContent = quiz[currentQuestion].question;\n \n // Display options\n quiz[currentQuestion].options.forEach((option, index) => {\n const button = document.createElement('button');\n button.textContent = option;\n button.addEventListener('click', () => {\n checkAnswer(option);\n });\n optionsElement.appendChild(button);\n });\n }", "function questionContent() {\n \t$(\".gameScreen\").append(\"<p><strong>\" + \n \t\tquestions[questionCounter].question + \n \t\t\"</p><p class='choices'>\" + \n \t\tquestions[questionCounter].choices[0] + \n \t\t\"</p><p class='choices'>\" + \n \t\tquestions[questionCounter].choices[1] + \n \t\t\"</p><p class='choices'>\" + \n \t\tquestions[questionCounter].choices[2] + \n \t\t\"</p><p class='choices'>\" + \n \t\tquestions[questionCounter].choices[3] + \n \t\t\"</strong></p>\");\n\t}", "function nextQuestion() {\n\t$(\"#correct-display\").hide();\n\t$(\"#wrong-display\").hide();\n\t$(\"#oOT-display\").hide();\n\t$(\"#question-container\").show();\n\t$(\"#choices\").show();\n\tcurrentQuestion++;\n\tif (currentQuestion == questions.length) {\n\t\tresults();\n\t} else {\n\t\ttime();\n\t\trun();\n\t\t$(\"#question-container\").html(questions[currentQuestion].question);\n\t\t$(\"#a\").html(questions[currentQuestion].choices[0]);\n\t\t$(\"#b\").html(questions[currentQuestion].choices[1]);\n\t\t$(\"#c\").html(questions[currentQuestion].choices[2]);\n\t\t$(\"#d\").html(questions[currentQuestion].choices[3]);\n\t}\n}", "function renderQuestion() {\n\n\tvar test = _(\"test\");\n\n\tif(pos >= questions.length){\n\t\ttest.innerHTML = \"<h2>You got \"+correct+\" of \"+questions.length+\" questions correct</h2>\";\n\t\ttest.innerHTML += \"<button onclick='renderQuestion()'>Try Again</button>\";\n\t\t_(\"test_status\").innerHTML = \"Test Completed\";\n\t\t_(\"status\").innerHTML = \"\";\n\n\t\tpos = 0;\n\t\tcorrect = 0;\n\t\treturn false;\n\t}\n\n\t_(\"test_status\").innerHTML = \"Question \"+(pos+1)+\" of \"+questions.length;\n\tquestion = questions[pos][0];\n\tchoiceA = questions[pos][1];\n\tchoiceB = questions[pos][2];\n\tchoiceC = questions[pos][3];\n\n\ttest.innerHTML = \"<h3>\"+question+\"</h3>\";\n\n\ttest.innerHTML += \"<input type = 'radio' name='choices' value='A'> \"+choiceA+\"<br>\"; \n\ttest.innerHTML += \"<input type = 'radio' name='choices' value='B'> \"+choiceB+\"<br>\";\n\ttest.innerHTML += \"<input type='radio' name='choices' value='C'> \"+choiceC+\"<br><br>\";\n\ttest.innerHTML += \"<button onclick='checkAnswer()'>Submit Answer</button>\";\n\n}", "function setQuestions(){\n\n\t//alert(\"I set questions\");\n\n\tif (whiteHouse == true){\n\n\t\tvar query_params = \"&keyword= White House\";\n\t\tvar endpoint = 'http://gravity.answers.com/endpoint/searches/questions?key=0365082c633528c9023c21eda59c909804d635b3';\n\n\t\t$(document).ready(function() {\n\t\t\t$.ajax({\n\t\t\t\ttype: \"GET\",\n\t\t\t\turl: endpoint,\n\t\t\t\tdata: query_params,\n\t\t\t\tsuccess: function(data) {\n\t\t\t\tdocument.getElementById(\"questionOne\").innerHTML=(data.result[1].title + \" ?\"); //the index of result gets you the question. \n\t\t\t\tdocument.getElementById(\"questionTwo\").innerHTML=(data.result[2].title + \" ?\");\n\t\t\t\tdocument.getElementById(\"questionThree\").innerHTML=(data.result[3].title + \" ?\");\n\t\t\t\tdocument.getElementById(\"questionFour\").innerHTML=(data.result[4].title + \" ?\");\n\t\t\t\tdocument.getElementById(\"questionFive\").innerHTML=(data.result[5].title + \" ?\");\n\t\t\t\t\t//answer for answer \n\t\t\t\t\t//title for Question\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\n\telse if (lincolnMemorial == true){\n\n\t\tvar query_params = \"&keyword= Lincoln Memorial\";\n\t\tvar endpoint = 'http://gravity.answers.com/endpoint/searches/questions?key=0365082c633528c9023c21eda59c909804d635b3';\n\n\t\t$(document).ready(function() {\n\t\t\t$.ajax({\n\t\t\t\ttype: \"GET\",\n\t\t\t\turl: endpoint,\n\t\t\t\tdata: query_params,\n\t\t\t\tsuccess: function(data) {\n\t\t\t\tdocument.getElementById(\"questionOne\").innerHTML=(data.result[1].title); //the index of result gets you the question. \n\t\t\t\tdocument.getElementById(\"questionTwo\").innerHTML=(data.result[2].title);\n\t\t\t\tdocument.getElementById(\"questionThree\").innerHTML=(data.result[3].title);\n\t\t\t\tdocument.getElementById(\"questionFour\").innerHTML=(data.result[4].title);\n\t\t\t\tdocument.getElementById(\"questionFive\").innerHTML=(data.result[5].title); //answer for answer , title for question\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\n\telse if (washingtonMonument == true){\n\n\t\tvar query_params = \"&keyword= washingtonMonument\";\n\t\tvar endpoint = 'http://gravity.answers.com/endpoint/searches/questions?key=0365082c633528c9023c21eda59c909804d635b3';\n\n\t\t$(document).ready(function() {\n\t\t\t$.ajax({\n\t\t\t\ttype: \"GET\",\n\t\t\t\turl: endpoint,\n\t\t\t\tdata: query_params,\n\t\t\t\tsuccess: function(data) {\n\t\t\t\tdocument.getElementById(\"questionOne\").innerHTML=(data.result[1].title);\n\t\t\t\tdocument.getElementById(\"questionTwo\").innerHTML=(data.result[2].title);\n\t\t\t\tdocument.getElementById(\"questionThree\").innerHTML=(data.result[3].title);\n\t\t\t\tdocument.getElementById(\"questionFour\").innerHTML=(data.result[4].title);\n\t\t\t\tdocument.getElementById(\"questionFive\").innerHTML=(data.result[5].title);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\n\telse{\n\n\t\tdocument.getElementById(\"phrase\").innerHTML=\"Please walk within 100ft of the nearest landmark.\";\n\t\tdocument.getElementById(\"questionOne\").innerHTML=\"\"; //the index of result gets you the question. \n\t\tdocument.getElementById(\"questionTwo\").innerHTML=\"\";\n\t\tdocument.getElementById(\"questionThree\").innerHTML=\"\";\n\t\tdocument.getElementById(\"questionFour\").innerHTML=\"\";\n\t\tdocument.getElementById(\"questionFive\").innerHTML=\"\";\n\t}\n}", "function displayQuestion(audio){\n\t$('.questionMark').hide();\n\t$('.questionText').removeClass('off');\n\tshell.caption.mainPosition = shell.caption.currPosition;\n\tloadSubContentAudioCC(1,audio);\n\t//togglePlayPause();\n\tmarkPageComplete();\n\t\n}", "function questionContent() {\n\t\t// a for loop would be cool here...\n \t$(\"#gameScreen\").append(\"<p><strong>\" + \n \t\tquestions[questionCounter].question + \n \t\t\"</p><p class='choices'>\" + \n \t\tquestions[questionCounter].choices[0] + \n \t\t\"</p><p class='choices'>\" + \n \t\tquestions[questionCounter].choices[1] + \n \t\t\"</p><p class='choices'>\" + \n \t\tquestions[questionCounter].choices[2] + \n \t\t\"</p><p class='choices'>\" + \n \t\tquestions[questionCounter].choices[3] + \n \t\t\"</strong></p>\");\n\t}", "function questionContent() {\n\t\t// a for loop would be cool here...\n \t$(\"#gameScreen\").append(\"<p><strong>\" + \n \t\tquestions[questionCounter].question + \n \t\t\"</p><p class='choices'>\" + \n \t\tquestions[questionCounter].choices[0] + \n \t\t\"</p><p class='choices'>\" + \n \t\tquestions[questionCounter].choices[1] + \n \t\t\"</p><p class='choices'>\" + \n \t\tquestions[questionCounter].choices[2] + \n \t\t\"</p><p class='choices'>\" + \n \t\tquestions[questionCounter].choices[3] + \n \t\t\"</strong></p>\");\n\t}", "function showQuestion(){\n let listQuestion = theQuestions[questionIndex].question\n placeQuestion.textContent = listQuestion\n questionEl.appendChild(placeQuestion)\n \n //show answers as buttons\n function showAnswers(){\n let answerA = theQuestions[questionIndex].answer[0].list\n let answerB = theQuestions[questionIndex].answer[1].list\n let answerC = theQuestions[questionIndex].answer[2].list\n let answerD = theQuestions[questionIndex].answer[3].list\n btnTextA.textContent = answerA\n btnTextB.textContent = answerB\n btnTextC.textContent = answerC\n btnTextD.textContent = answerD\n multChoiceA.appendChild(btnTextA)\n multChoiceB.appendChild(btnTextB)\n multChoiceC.appendChild(btnTextC)\n multChoiceD.appendChild(btnTextD)\n }\n\n showAnswers()\n }", "function showQuestions(){\n $(\"#questionsList\").show(); \n $(\"#info\").hide();\n $(\"#infoBox\").hide();\n }", "function displayQuestionAnswer(question){\n\t\t$(\"#questionResponse\").text(question);\n\t\tcurrentAnswer = currentTopicChoice[currentQuestion][0];\n\t\tcurrentOptions = currentTopicChoice[currentQuestion][1];\n\t\tcurrentAnswerImage = currentTopicChoice[currentQuestion][2];\n\n\t\t//Build the button for all options proposed\n\t\tBuildOptionButtons(currentOptions);\n\n\t}", "function questionDisplay(answer) {\n if (answer != \"start-button\") {\n checkAnswer(answer);\n counter++\n }\n if (counter < 5) {\n document.getElementById(\"questionText\").textContent = questions[counter].title;\n document.getElementById(\"optionA\").textContent = questions[counter].choices[0];\n document.getElementById(\"optionB\").textContent = questions[counter].choices[1];\n document.getElementById(\"optionC\").textContent = questions[counter].choices[2];\n document.getElementById(\"optionD\").textContent = questions[counter].choices[3];\n }\n else {\n document.getElementById(\"questionText\").style.display = \"none\"\n document.getElementById(\"questionChoices\").style.display = \"none\"\n }\n}", "function renderQuestion(){\n\n // Create a variable to hold the index\n let q = questions[runningQuestion];\n \n // Show the question\n question.html(q.question);\n\n // Show the choices\n choiceA.html(q.choiceA);\n choiceB.html(q.choiceB);\n choiceC.html(q.choiceC);\n // choices.show();\n}", "function displayQuestions() {\n\n if (textcompletionquestions[questioncounter].correctanswer2) {\n $(\"#D\").hide();\n $(\"#E\").hide();\n $(\"#Dradio\").hide();\n $(\"#Eradio\").hide();\n }\n else{\n $(\"#D\").show();\n $(\"#E\").show();\n $(\"#Dradio\").show();\n $(\"#Eradio\").show()\n \n }\n\n $(\"#practice-question\").text(textcompletionquestions[questioncounter].question)\n $(\"#A\").text(textcompletionquestions[questioncounter].correctanswer1);\n $(\"#Aradio\").val(textcompletionquestions[questioncounter].correctanswer1);\n $(\"#B\").text(textcompletionquestions[questioncounter].wronganswerA1);\n $(\"#Bradio\").val(textcompletionquestions[questioncounter].wronganswerA1);\n $(\"#C\").text(textcompletionquestions[questioncounter].wronganswerB1);\n $(\"#Cradio\").val(textcompletionquestions[questioncounter].wronganswerB1);\n $(\"#D\").text(textcompletionquestions[questioncounter].wronganswerC1);\n $(\"#Dradio\").val(textcompletionquestions[questioncounter].wronganswerC1);\n $(\"#E\").text(textcompletionquestions[questioncounter].wronganswerD1);\n $(\"#Eradio\").val(textcompletionquestions[questioncounter].wronganswerD1);\n\n if (textcompletionquestions[questioncounter].correctanswer2) {\n $(\"#second-question-set\").show();\n $(\"#A2\").text(textcompletionquestions[questioncounter].correctanswer2);\n $(\"#A2radio\").val(textcompletionquestions[questioncounter].correctanswer2);\n $(\"#B2\").text(textcompletionquestions[questioncounter].wronganswerA2);\n $(\"#B2radio\").val(textcompletionquestions[questioncounter].wronganswerA2);\n $(\"#C2\").text(textcompletionquestions[questioncounter].wronganswerB2);\n $(\"#C2radio\").val(textcompletionquestions[questioncounter].wronganswerB2);\n }\n else{\n $(\"#second-question-set\").hide();\n }\n\n if (textcompletionquestions[questioncounter].correctanswer3) {\n $(\"#third-question-set\").show();\n $(\"#A3\").text(textcompletionquestions[questioncounter].correctanswer3);\n $(\"#A3radio\").val(textcompletionquestions[questioncounter].correctanswer3);\n $(\"#B3\").text(textcompletionquestions[questioncounter].wronganswerA3);\n $(\"#B3radio\").val(textcompletionquestions[questioncounter].wronganswerA3);\n $(\"#C3\").text(textcompletionquestions[questioncounter].wronganswerB3);\n $(\"#C3radio\").val(textcompletionquestions[questioncounter].wronganswerB3);\n }\n else{\n $(\"#third-question-set\").hide();\n }\n questioncounter=questioncounter+1;\n \n }", "function showPostQuestions() {\n \n $('#instructions').show();\n $('#instructions').load('html/postquestions.html', function () {\n $('#correctpqanswer').text(correctpostquestionanswer);\n $('#decoy1').text(decoy1);\n $('#decoy2').text(decoy2);\n $('#decoy3').text(decoy3);\n });\n $('#next').show();\n $('#next').click(validatePostQuestions);\n}", "function makeQuiz () {\n renderChristmasTunesQuiz();\n }", "function displayQuestions() {\n if (currentQuestion >= 0) {\n $(\"#question\").show();\n $(\"#gif\").show();\n displayImage();\n $(\"#question\").html(quizItems[currentQuestion].question);\n }\n}", "function renderQuestion() {\n // Get rid of the start button to clean up the page.\n $(\"#start\").hide();\n\n // Check if we've finished the trivia game.\n if (questionIndex >= questions.length) {\n // If it's the final question, clears our intervalId and informs user they finished.\n clearInterval(intervalId);\n $(\"#question\").html(\"You Finished!<br>\");\n $(\"#question\").append(\"You got \" + correct + \" questions right!\");\n\n $(\"#submit\").hide();\n $(\"#status\").hide();\n } else {\n // Add the question to the page.\n $(\"#status\").html(\"<h4>Question \" + (questionIndex+1) + \" of \" + questions.length + \"<h4/>\");\n\n var question = questions[questionIndex][0];\n var chA = questions[questionIndex][1];\n var chB = questions[questionIndex][2];\n var chC = questions[questionIndex][3];\n var chD = questions[questionIndex][4];\n // Render the question to the page.\n $(\"#question\").html(question + \"<br>\");\n $(\"#question\").append(\"<input type='radio' name='choices' value='A'> \" + chA + \"<br>\");\n $(\"#question\").append(\"<input type='radio' name='choices' value='B'> \" + chB + \"<br>\");\n $(\"#question\").append(\"<input type='radio' name='choices' value='C'> \" + chC + \"<br>\");\n $(\"#question\").append(\"<input type='radio' name='choices' value='D'> \" + chD + \"<br>\");\n\n // Add the submit button and have it checkAnswer when clicked.\n $(\"#submitBtn\").html(\"<button id='submit' type='button'>Submit</button>\");\n $(\"#submit\").on(\"click\", checkAnswer);\n }\n\n // Start decrementing the timer if it's the first time loading a qeustion.\n if (firstRender === true) {\n intervalId = setInterval(decrement, 1000);\n firstRender = false;\n }\n }", "function displayQuestion() {\n if (questionNumber < STORE.length) {\n return createQuizQuestion(questionNumber) \n } else {\n $('.quizQuestionBox').hide();\n finalTally();\n $('.questionNumber').text(5); \n }\n// console.log('displayQuestion ran')\n}", "function displayQs() {\n activeQuestion = questionsAndAnswers[Math.floor(Math.random() * questionsAndAnswers.length)];\n $(\"#question-div\").html(\"<p>\" + activeQuestion.q + \"</p>\");\n}", "function displayQuestion() {\n\tvar question='', choice='', choices='', i=0;\n\tquestion = questions[questionCounter].question;\n\tchoiceArray = questions[questionCounter].choices;\n\t \n\tfor (var i in choiceArray){\n\t\t choice = questions[questionCounter].choices[i];\n\t\t choices += \"<p class='choices'>\" + choice + \"</p>\";\n\t}\n $(\"#QuizArea\").append(\"<p><strong>\" + question + \"</strong></p>\" + choices );\n}", "function displayQuestion () {\r\n //displays score after user answers final question\r\n if (questionIndex === finalQuestion){\r\n return displayScore();\r\n} \r\n var currentQuestion = myQuestions[questionIndex];\r\n question.innerHTML = \"<p>\" + currentQuestion.question + \"</p>\";\r\n answerA.innerHTML = myQuestions[questionIndex].answers.a;\r\n answerB.innerHTML = myQuestions[questionIndex].answers.b;\r\n answerC.innerHTML = myQuestions[questionIndex].answers.c;\r\n answerD.innerHTML = myQuestions[questionIndex].answers.d;\r\n }", "function printQuestion(question, quiz){\n //storing some variables from the html to change\n //storing important data from the questions object to be used\n var questionBox = $(\".question-text\");\n var answers = question.choices;\n\n //changing the text in the boxes needed\n //adding buttons/answer choices to boxes needed\n questionBox.text(question.title);\n createAnswers(answers, quiz);\n}", "function displayQuestion() {\n console.log(\"playGame function reached\");\n \n \n \n // hide startButton and startOverButton and checkAnswer div\n $(\"#startButton\").hide();\n $(\"#startOverButton\").hide();\n $(\"#checkAnswer\").hide();\n \n // check if all questions have been used and if they have then move to\n // final results tabulation\n if (gameVariables.currentQuestion > allQuestionsArray.length-1) {\n finalResults();\n // if they haven't all been used, then play the question\n } else if (gameVariables.currentQuestion <= allQuestionsArray.length) {\n \n // display timer and start it up\n $(\"#timerDiv\").show();\n startTimer();\n \n // set up questionAsked board and show it\n $(\"#questionAsked\").show();\n // populate theQuestion div with the question\n $(\"#theQuestion\").html(\"<h3>\" + allQuestionsArray[gameVariables.currentQuestion].question + \"</h3>\");\n // populate the text of the four buttons for possible responses\n $(\"#button0\").text(allQuestionsArray[gameVariables.currentQuestion].answers[0]);\n $(\"#button1\").text(allQuestionsArray[gameVariables.currentQuestion].answers[1]);\n $(\"#button2\").text(allQuestionsArray[gameVariables.currentQuestion].answers[2]);\n $(\"#button3\").text(allQuestionsArray[gameVariables.currentQuestion].answers[3]);\n } else {\n console.log(\"error caught - question counting problem\");\n }\n }", "function showQuestions() {\n //Clear last question\n quizText.textContent = \"\";\n if (quizCountdown <= 0) {\n return;\n }\n\n //Grab the question data for the current question\n currQ = questions[questNo];\n\n //Create a header with the question number\n questHeader = document.createElement(\"h2\");\n questHeader.textContent = \"Question \" + (questNo + 1);\n\n //Display the question\n questText = document.createElement(\"h4\");\n questText.textContent = currQ.text;\n\n //Set up a container for the question answers\n questAnswers = document.createElement(\"ul\");\n questAnswers.setAttribute(\"class\", \"list-group text-align-right\");\n\n //Create elements for the answers, plus buttons to select them with.\n for (let i = 0; i < currQ.answers.length; i++) {\n answerText = currQ.answers[i];\n let li = document.createElement(\"li\");\n li.textContent = answerText;\n li.setAttribute(\"data-index\", i);\n li.setAttribute(\"class\", \"list-group-item list-group-item-info\")\n\n let button = document.createElement(\"button\");\n button.textContent = \"Select\";\n button.setAttribute(\"class\", \"btn-primary float-left\")\n button.addEventListener(\"click\", checkAnswer);\n\n li.appendChild(button);\n questAnswers.appendChild(li);\n }\n\n //Add the new elements to the page\n quizText.appendChild(questHeader);\n quizText.appendChild(questText);\n quizText.appendChild(questAnswers);\n}", "function showQuestions(index){\n \n document.querySelector(\"#que_text\").textContent = questions[index].numb + \". \" + questions[index].question\n document.querySelector(\"#button0\").textContent = questions[index].options[0]\n document.querySelector(\"#button1\").textContent = questions[index].options[1]\n document.querySelector(\"#button2\").textContent = questions[index].options[2]\n document.querySelector(\"#button3\").textContent = questions[index].options[3]\n \n}", "function questionMaker() {\n $('.questionPage').html(generateQuestions());\n}", "function showQuetions(index) {\r\n document.getElementById(\"question-id\").innerHTML = questions[index];\r\n \r\n}" ]
[ "0.78059906", "0.7672959", "0.7589917", "0.7530256", "0.75223494", "0.75202847", "0.7515317", "0.7488949", "0.7477396", "0.74604034", "0.74456733", "0.7399057", "0.73940265", "0.7370937", "0.7369974", "0.73157674", "0.73124075", "0.73123854", "0.73001903", "0.7297335", "0.7285298", "0.725904", "0.7240347", "0.7237599", "0.7236967", "0.7232266", "0.7231463", "0.72268414", "0.7216586", "0.7174815", "0.71697897", "0.71690655", "0.7148623", "0.7135084", "0.71188396", "0.7115192", "0.7114835", "0.71049094", "0.7098184", "0.709201", "0.7087699", "0.7086596", "0.7071323", "0.7060613", "0.70479053", "0.70449", "0.70418453", "0.7038999", "0.7034187", "0.7019439", "0.7014499", "0.7014085", "0.70103526", "0.7009102", "0.7007865", "0.69943213", "0.69709194", "0.6967135", "0.6956947", "0.6954953", "0.69444966", "0.6941273", "0.69400537", "0.69357985", "0.6935143", "0.6929579", "0.6923542", "0.6916177", "0.69113773", "0.6895923", "0.6892754", "0.689006", "0.68808484", "0.68719816", "0.6866009", "0.68652505", "0.68608344", "0.68543273", "0.6849469", "0.684882", "0.684882", "0.6848657", "0.68454415", "0.68440735", "0.6841476", "0.6834918", "0.6833917", "0.68305373", "0.68284774", "0.6828246", "0.682594", "0.68165433", "0.6814757", "0.6808794", "0.6806888", "0.6803007", "0.6795937", "0.67950803", "0.67937016", "0.6791724", "0.67901194" ]
0.0
-1
function that displays correct answer when user clicks option; moves onto next q
function showAnswer(clicked){ // if answer is correct if (clicked.attr("id") === questionArr[questionIndex].answer[0]) { correctA++; // display $("#question-panel").html("CORRRRRECT! The answer is... " + "<em>" + questionArr[questionIndex].answer[1] + "</em>"); clicked.addClass("correct"); console.log("Plankton voice: CORRRREECT!"); } // if answer is false else { incorrectA++; // display $("#question-panel").html("Tartar sauce! The correct answer was... " + "<em>" + questionArr[questionIndex].answer[1] + "</em>"); clicked.addClass("incorrect"); $("#" + questionArr[questionIndex].answer[0]).addClass("correct"); console.log("Dwight Schrute voice: FALSE!"); } // delay on next question so you have time to read answer setTimeout(function() { questionIndex++; renderQuestion(); console.log("Answer displayed", questionIndex); }, 3500); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function nextQuestion(){\n var n = Math.floor(Math.random() * q.length);\n q[n].display1();\n var ans = prompt('Please select the correct answer. (tap \\'exit\\' to exit)');\n \n if (ans !== 'exit'){\n q[n].checkAnswer(parseInt(ans),keepScore);\n nextQuestion();\n }\n }", "function selectNextQ(){\n resetState();\n showQuestion(shuffledQuestion[currentQuestionI]);\n}", "function showNext(){\n\n // if(index >=(questions.length - 1)){\n // showResult(0);\n // return;\n // }\n if(index>=8){\n $(\"#Next\").text(\"Finish\");\n }\n\n if(index >=9){\n alert(\"Press ok to get result\")\n showResult(0);\n return;\n \n }\n\n index++;\n\n $(\".optionBox span\").removeClass();\n $(\".optionBox span\").attr(\"onclick\",\"checkAnswer(this)\");\n\n\n printQuestion(index);\n \n\n}", "function nextQuestion(){\n\t\t$(\"#question\").show();\n\t\t$(\".choice\").show();\n\t\t$(\"#solutionDiv\").hide();\n\t\tstopwatch.reset();\n\t\tquizGo(i++);\n\t}", "function answersQuestionPrint() {\n questionChooser();\n answerChooser(currentQuestion);\n }", "function nextQuestion() {\n\t$(\"#correct-display\").hide();\n\t$(\"#wrong-display\").hide();\n\t$(\"#oOT-display\").hide();\n\t$(\"#question-container\").show();\n\t$(\"#choices\").show();\n\tcurrentQuestion++;\n\tif (currentQuestion == questions.length) {\n\t\tresults();\n\t} else {\n\t\ttime();\n\t\trun();\n\t\t$(\"#question-container\").html(questions[currentQuestion].question);\n\t\t$(\"#a\").html(questions[currentQuestion].choices[0]);\n\t\t$(\"#b\").html(questions[currentQuestion].choices[1]);\n\t\t$(\"#c\").html(questions[currentQuestion].choices[2]);\n\t\t$(\"#d\").html(questions[currentQuestion].choices[3]);\n\t}\n}", "function askQuestion(qNo, quesText, options, answer, pointsAwarded, metaInfo, score) {\n // Asking the question to player, along with giving him/her four appropriate options, as well as recording the player's answer\n let ans = readLine.keyInSelect(options, myYellow(\"Q\"+qNo+\". \"+quesText+\" ?\"));\n addNewLine();\n \n // Checking if selected answer is the correct one or not \n if(options[ans] === answer) {\n console.log(myBlue(myYellowAndBlue(\"Gotcha!\"), \"That's correct !\"));\n addNewLine();\n console.log(myYellow.bold.italic(metaInfo));\n // If player's answer is correct, he gets full points that are specified for that question \n return pointsAwarded;\n }\n // If player's selected options is not the correct answer\n else {\n // If player selected '0' in order to cancel, his quiz is aborted at the same time\n if(ans === -1) {\n endQuizInMid(score);\n }\n // Otherwise he just chose an incorrect option\n console.log(pokeRed(myYellowAndRed(\"Oops!\") ,\"That doesn't sound right.\"));\n // If player fails to answer the question correctly, he gets 0.\n return 0;\n }\n}", "function nextQuest() {\n\n theQuestion = qArr.next().value\n choices = chArr.next().value;\n answers = Object.keys(choices).map(function (c) {\n return '<li data-answer=' + c + ' class=\"\">' + choices[c] + '</li>'\n })\n $('.question').html(theQuestion)\n $('.answerList').html(answers);\n $(\"#correctedAnswer\").empty()\n $('#gif').empty()\n $('.answerList').show();\n // Reset if out of time.\n if (timerOutOfTime) {\n timerOutOfTime = 0;\n }\n\n if (wrongAnswerClicked) {\n $(\"#timeLeft\").show();\n wrongAnswerClicked = 0;\n }\n }", "function nextQ() {\n\tif (iQ <= allQ.length) {\n\t\t$('.beginQuestion').text(currentQ.question);\n\t};\n\n}", "function nextQuestion() {\n var n = Math.floor(Math.random() * questions.length);\n\n questions[n].displayQuestion();\n // Use parseInt to convert ex. \"2\" to integer, not string - 2.\n var answer = prompt('Please select the correct answer.');\n\n if (answer !== 'exit') {\n questions[n].checkAnswer(parseInt(answer), keepScore);\n nextQuestion();\n }\n }", "function nextQuestion() {\n resetState();\n showQuestion();\n}", "function nextQuestion() {\n currentQuestion++;\n \n if (currentQuestion < quiz.length) {\n displayQuestion();\n } else {\n showResult();\n }\n }", "function nextQuestion() {\n\t\tqCounter++;\n\t\t// clears previous selection\n\t\t$(\"input[name='choice']\").prop(\"checked\", false);\n\n\t\t// checks to see if qCounter is equal to 10\n if (qCounter == 10) {\n\t \tstopwatch.stop();\n\t $(\"#main\").hide();\n\t $(\"#end\").show();\n\t $(\"#final-score\").html(\"<h2>You got \" + correct + \" out of \" + questions.length + \" questions correct!\");\n }\n\n //calls displayQuestions\n stopwatch.stop();\n displayQuestions();\n }", "function Option_btn_Click(val) {\n\n\n let id;\n let qNum;\n switch (i) {\n case 0: id = \"ans1\";qNum=1;break;\n case 1: id = \"ans2\";qNum=2;break;\n case 2: id =\"ans3\";qNum=3;break;\n case 3: id =\"ans4\";qNum=4;break;\n case 4: id =\"ans5\";qNum=5;break;\n }\n\n //setting results\n if (val === question.question[i].ans){\n document.getElementById(id).innerText = \"Q\"+qNum+\" Selected Option: \" + val + \", correct: +1\";\n result++;\n }\n else{\n document.getElementById(id).innerText= \"Q\"+qNum+\" Selected Option: \" + val + \", incorrect: 0 [Correct Ans:\"+question.question[i].ans+ \"]\";\n }\n if(i<4){i++;}\n else{\n document.getElementById('p3').style.display=\"block\";\n document.getElementById('p2').style.display=\"none\";\n i=0;\n }\n setUp();\n document.getElementById('res').innerText = \"Results : \"+result;\n}", "function optionClick(option){\n /* if the answer option the user clicks on matches in type and value to the answer in the questionSet array, flash the user a Correct toast */\n if(option.textContent == questionSet[questionIndex].answer){\n toastEl.textContent = \"Correct!\";\n \n /* if the answer option the user clicks on doesn't match in type and value to the answer in the questionSet array, flash the user a Wrong toast and */\n } else {\n \n /* subraction assingment to remove 2 seconds from time remaining if the answer is wrong */\n time -= 10;\n toastEl.textContent = \"Wrong :/\";\n }\n\n /*iterate to next question */\n questionIndex++;\n\n /* Evaluate if all questions in the array have been used yet */\n if (questionIndex === questionSet.length) {\n quizEnd();\n } else {\n renderQuestion();\n }\n }", "function nextQuestion(event) {\n\n\n // condition uses click event to add to user score if correct ansser is made //\n if (event.target.value === questions[currentQuesIndex].correctAns) {\n score++;\n } else {\n time -= 5;\n counter.textContent = time + \" Seconds left on quiz.\";\n }\n\n\n\n // Condition executes next question\n if (currentQuesIndex < questions.length) {\n currentQuesIndex++;\n // moves to next section once condition is met\n } if (currentQuesIndex === questions.length) {\n\n quizEl.style.display = \"none\";\n // this function call takes user to results section\n quizResults();\n return;\n\n }\n showQuestion();\n}", "function checkanswer(arrayname, qnumber) {\n\t//Indicate Selected Answer\n\t$('#answers').on('mousedown', '.anschoice',function() {\n\t\t$(this).removeClass().addClass('select');\n\t\t$(this).siblings().removeClass().addClass('anschoice');\n\t});\n\t//Change selected choice back to original\n\t$('#answers').on('mousedown', '.select',function() {\n\t\t$(this).removeClass().addClass('anschoice');\n\t});\n\t//Below determines what to do when next button clicked\n\t$('#next').mousedown(function() {\n\t\t//Make sure a choice is selected!\n\t\tvar userselect = $('.select').text();\n\t\tconsole.log('userselect is: ' + userselect);\n\t\tif ( userselect === '') {\n\t\t\tconsole.log('Please select a choice!');\t\n\t\t\t$('#next').avgrund({\n\t\t\t\ttemplate: '<p> Please select a choice! </p>'\n\t\t\t});\n\t\t}\n\t\telse { // Check answer\n\t\t\tif (userselect === arrayname[qnumber].correctAnswer) {\n\t\t\t\tcorrect++;\n\t\t\t\tconsole.log('The user is correct! ' + correct);\n\t\t\t}\n\t\t\telse { \n\t\t\t\tconsole.log('user is wrong');\n\t\t\t\tconsole.log('#correct is: ' + correct);\n\t\t\t\tconsole.log(userselect + ' vs. ' + arrayname[qnumber].correctAnswer);\n\t\t\t}\n\t\t\t// Move on to the next question\n\t\t\tqnumber++;\n\t\t\tinsertquestion(arrayname, qnumber);\n\t\t\tconsole.log('qnumber from checkanswer is now ' + qnumber);\n\t\t\ttheend(qnumber, correct, arrayname);\n\t\t}\n\t\t});\n}", "function checkAnswer() {\n if (document.getElementById(\"true\").selected) {\n processAnswer(\"true\");\n }\n else {\n processAnswer(\"false\");\n }\n // get next question if not asked all yet\n if (questionsAsked < 10) {\n setQuestion();\n }\n // final question asked show prompt.\n else {\n alert(\"Quiz complete! You got \" + totalCorrect + \" correct out of 10.\");\n\n }\n\n // update totals\n document.getElementById(\"qnr\").innerHTML = \"Question:\" + questionsAsked;\n document.getElementById(\"score\").innerHTML = \"Score:\" + totalCorrect;\n\n}", "function Qnext() {\n $(\"#prompt\").text(\"\");\n $(\"#options\").empty();\n if (qIndex < qList.length) {\n $(\"#prompt\").text(\"Q\" + (qIndex + 1) + \":\" + qList[qIndex].question);\n $(\"#options\").append($(\"<button class='button' id='true' style='background-color:#4CAF50'>TRUE</button>\"));\n $(\"#options\").append($(\"<button class='button' id='false' style='background-color:#f44336'>FALSE</button>\"));\n }\n}", "function nextQuestion() {\n questionNumber++;\n\n // empty text area and remove message\n $(\"#correct\").fadeIn(500).addClass(\"d-none\");\n $(\"#input-answer\").val(\"\");\n $(\"#input-answer\").css(\"color\", \"#212429\");\n\n arrayPositionSelect++;\n if (questionNumber < 5 && numberOfLives >= 0) {\n showQuestion(); // Dont need to call generate question (all questions generated)\n } else if (questionNumber > 4 && numberOfLives >= 0) {\n roundComplete();\n // Start Round\n } else if (numberOfLives < 0) {\n gameOver();\n }\n}", "function showQuestion() {\n\t$('#answer').text(''); // Reset user input\n\t$('#answer').focus();\n\t$('#question').text(questionNumber + '. ' + Questions[questionIndex][0]); // Print question\n\tquestionNumber++;\n}", "function quiz (question, answer) {\nindex = read_input.keyInSelect(answer, question);\n}", "function setNextQuestion() {\n showQuestion(shuffledQuestions[currentQuestionIndex])\n}", "function goToNextQuestion() {\n\n\n\n // Display question page.\n\n showSection(questionPage);\n\n\n\n // Empties out existing answers from previous question.\n\n $(\".answer-choices\").empty();\n\n\n\n // Displays question and possible answers.\n\n displayQuestion();\n\n\n\n // Resets question timer.\n\n resetTimer();\n\n\n\n}", "function nextQuestion() {\n showQuestion();\n //*********************************** */\n // this logic is implemented because unable to check whether event listener for first round exists with button\n if (startButton.textContent !== \"Retake Quiz\") {\n addEventListenerToButtons(questionIndex);\n }\n //*********************************** */\n}", "function nextQuestion() {\n $(\".userAnswer\").remove();\n $(\".answerCheck\").show();\n if (this.id === currentQuestion[2][0]) {\n scoreTracker = scoreTracker + 1;\n $(\".answerCheck\").text(\"correct!\");\n } else {\n $(\".answerCheck\").text(\"incorrect!\");\n timePassed = timePassed + 4;\n }\n\n if (questionPlusAnswer < quizquestions.length - 1) {\n startQuiz();\n } else {\n finalScorePage();\n stopTimer();\n }\n }", "function nextQuestion() {\n // get selected option\n var selectedOption = document.querySelector('input[type=radio]:checked');\n // if the user has not selected anything inform with a message\n if(!selectedOption) {\n alert('Please select one of the answers.');\n return;\n }\n // if the answers is correct increase the score\n var answer = selectedOption.value;\n if(questions[currentQuestion].answer == answer) {\n score++;\n }\n selectedOption.checked = false;\n currentQuestion++;\n // if it is the last question\n if(currentQuestion == totalQuestions - 1) {\n nextButton.textContent = 'Finish';\n }\n // display the results\n if(currentQuestion == totalQuestions) {\n container.style.display = 'none';\n resultContainer.style.display = 'block';\n resultText.textContent = 'Your score: ' + score + '/5';\n return;\n }\n // load next question\n loadQuestion(currentQuestion);\n}", "function selectAnswer() {\n //if right answer show correct, and log score\n if (questions[questionNumber].answer === userAnswer) {\n win();\n stop();\n questionNumber++;\n // wait to start next question\n nextQuestion();\n }\n //if wrong answer show correct and log score\n else {\n lose();\n stop();\n questionNumber++;\n // wait to start next question\n nextQuestion();\n }\n}", "function changeQCorrect() {\n changeQ();\n messageArea.textContent = \"CORRECT!\";\n }", "function next() {\n var currentQuestions = questions[counter];\n counter++;\n\n var quizContent = \"<h2>\" + currentQuestions.question + \"</h2>\";\n\n for (var i = 0; i < currentQuestions.option.length; i++) {\n var buttonCode = '<button onclick=\"Answer\">[options]</button>';\n\n buttonCode = buttonCode.replace(\"[options]\", currentQuestions.option[i]);\n\n if (currentQuestions.option[i] == currentQuestions.answer) {\n buttonCode = buttonCode.replace(\"Answer\", \"correct()\");\n score += 10;\n\n next();\n } else {\n buttonCode = buttonCode.replace(\"Answer\", \"incorrect()\");\n timeLeft -= 10;\n\n next();\n }\n\n quizContent += buttonCode;\n }\n if (counter >= questions.length - 1) {\n endGame();\n\n return;\n }\n document.getElementById(\"quizContainer\").innerHTML = quizContent;\n}", "function nextQuestion() {\n resetState()\n showQuestion(getRandomQuestion[questionIndex])\n}", "function checkAnswer(selected){\n let rightAnswer = questionsArray[questionCounter].correctAnswer;\n \n if(selected === rightAnswer){\n score++;\n displayPopup(true, rightAnswer);\n } \n else{\n displayPopup(false, rightAnswer);\n }\n}", "function checkAnswer(selectedAnswer) {\n const correctAnswer = quiz[currentQuestion].answer;\n \n if (selectedAnswer === correctAnswer) {\n score++;\n }\n \n currentQuestion++;\n \n if (currentQuestion < quiz.length) {\n displayQuestion();\n } else {\n showResult();\n }\n }", "function answer() {\n let parentSection = this.parentElement.parentElement;\n if (this.textContent === \"Go back to Menu\") {\n backToMenu();\n } else if (this.textContent === \"Play Again\") {\n playAgain(parentSection);\n } else {\n let correct = false;\n let noteTag = gen(\"p\");\n for (let i = 0; i < CORRECT_ANSWER.length; i++) {\n if (CORRECT_ANSWER[i] === this.textContent) {\n noteTag.textContent = \"Correct !\";\n noteTag.classList.add(\"correct\");\n parentSection.appendChild(noteTag);\n correct = true;\n }\n }\n if (!correct) {\n noteTag.textContent = \"Wrong !\";\n noteTag.classList.add(\"wrong\");\n parentSection.appendChild(noteTag);\n }\n setTimeout(() => nextQuestion(parentSection), WAITING_TIME);\n }\n }", "function nextQuestion(){\n questionIndex++\n if (theQuestions.length > questionIndex){\n showQuestion()\n } else {\n quizEnd()\n }\n}", "function goToNextQuestion(){\n\n\t// Display question page.\n\tshowSection(questionPage);\n\n\t// Empties out existing answers from previous question.\n\t$( \".answer-choices\" ).empty();\n\n\t// Displays question and possible answers.\n\tdisplayQuestion();\n\n\t// Resets question timer.\n\tresetTimer();\n\n}", "function genarateQuestion() {\r\n if(quiz.isEnded()){\r\n //showScore\r\n showScore();\r\n } else {\r\n //show question\r\n let element = document.getElementById(\"question\");\r\n element.innerHTML = quiz.getQuestion().question;\r\n\r\n //show choices\r\n let choices = quiz.getQuestion().choices;\r\n\r\n for(let i = 0; i < choices.length; i++) {\r\n let element = document.getElementById(\"choice\" + i);\r\n\r\n element.innerHTML = choices[i];\r\n guessCorrectAnswer(\"choice\" + i, choices[i]);\r\n \r\n }\r\n\r\n showProgress();\r\n \r\n }\r\n}", "function displayQuestion() {\n const questionElement = document.getElementById('question');\n const optionsElement = document.getElementById('options');\n \n // Clear previous question and options\n questionElement.textContent = '';\n optionsElement.textContent = '';\n \n // Display current question\n questionElement.textContent = quiz[currentQuestion].question;\n \n // Display options\n quiz[currentQuestion].options.forEach((option, index) => {\n const button = document.createElement('button');\n button.textContent = option;\n button.addEventListener('click', () => {\n checkAnswer(option);\n });\n optionsElement.appendChild(button);\n });\n }", "function nextQuestion() {\n\n if (currentQuestion < lastQuestion) {\n currentQuestion++;\n showQuestion();\n } else {\n endQuiz();\n }\n}", "function setNextQuestion() {\n resetQuestion();\n showQuestion(shuffleQuestions[currentQuestionIndex]);\n}", "function select(option) {\n document.getElementById(\"disabled\").style.pointerEvents = \"none\";\n currentOption = option;\n nextBtn.disabled = false\n var opt = document.getElementById(option);\n if (option === questions[count].answer) {\n score++\n console.log(score)\n document.getElementById(\"score\").innerHTML = score * 10;\n opt.nextSibling.nextSibling.style.color = \"green\";\n opt.nextSibling.nextSibling.style.fontWeight = \"bold\";\n opt.nextSibling.nextSibling.innerHTML = \"Correct ✓\";\n } else {\n opt.nextSibling.nextSibling.style.color = \"red\";\n opt.nextSibling.nextSibling.style.fontWeight = \"bold\";\n opt.nextSibling.nextSibling.innerHTML = \"Incorrect ❌\";\n document.getElementById(questions[count].answer).nextSibling.nextSibling.style.color = \"green\";\n document.getElementById(questions[count].answer).nextSibling.nextSibling.style.fontWeight = \"bold\";\n document.getElementById(questions[count].answer).nextSibling.nextSibling.innerHTML = \"Correct ✓\";\n }\n}", "function nextQuestion() {\n const isQuestionOver = (triviaQuestions.length - 1) === currentQuestion;\n if (isQuestionOver) {\n displayResult();\n }else{\n currentQuestion++;\n loadQuestion();\n }\n\n }", "function setNextQuestion() {\n clearQuestions();\n showQuestion(randomQuestions[currentQuestionIndex])\n}", "function displayNextQuestion(nextQuestion) {\n currentIndex++;\n if (currentIndex < questions.length) {\n checkCorrect(nextQuestion.target.innerText === nextQuestions.answer);\n questionAnswers.innerText = '';\n if (currentIndex < questions.length) {\n nextQuestions = questions[currentIndex];\n displayQuestion(nextQuestions);\n } else {\n currentIndex = 0\n displayQuestion(nextQuestions);\n }\n } else {\n endQuiz();\n // setTimeout(function () {\n // endQuiz();\n // }, 1000);\n }\n}", "function nextQuestion()\n\t\t\t{\n\t\t\t\t$(\"#oneword\").hide();\n\t\t\t\t$(\"#multiple\").hide();\n\n\t\t\t\tif(count >= 10)\n\t\t\t\t{\n\t\t\t\t\tcount = 0;\n\t\t\t\t\tendQuiz();\t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t\n\t\t\t\t\tcount++;\n\n\t\t\t\t\t//get the question object for next question\n\t\t\t\t\tif(day%2 == 0)\n\t\t\t\t\t\tquestion = getQuestion(randomArr[count-1]);\n\t\t\t\t\telse\n\t\t\t\t\t\tquestion = getQuestion(randomArr[count-1]);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif(count > 1)\n\t\t\t\t\t{\n\t\t\t\t\t\t//update the progress bar\n\t\t\t\t\t\tprogressBar();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t//update the score\n\t\t\t\t\t\tupdateScore();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t//reset the form values\n\t\t\t\t\t\tdocument.getElementById(\"formName\").reset();\n\t\t\t\t\t}\n\n\t\t\t\t\t\n\t\t\t\t\t//if multiple choice question\n\t\t\t\t\tif(question.questionType == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\t$(\"#multiple\").show();\n\n\t\t\t\t\t\tdocument.getElementById(\"question1\").innerHTML = question.question;\n\t\t\t\t\t\tdocument.getElementById(\"label1\").innerHTML = question.choices[0];\n\t\t\t\t\t\tdocument.getElementById(\"label2\").innerHTML = question.choices[1];\n\t\t\t\t\t\tdocument.getElementById(\"label3\").innerHTML = question.choices[2];\n\t\t\t\t\t\tdocument.getElementById(\"label4\").innerHTML = question.choices[3];\n\n\t\t\t\t\t\tdocument.getElementById(\"radio1\").setAttribute(\"value\",question.choices[0]);\n\t\t\t\t\t\tdocument.getElementById(\"radio2\").setAttribute(\"value\",question.choices[1]);\n\t\t\t\t\t\tdocument.getElementById(\"radio3\").setAttribute(\"value\",question.choices[2]);\n\t\t\t\t\t\tdocument.getElementById(\"radio4\").setAttribute(\"value\",question.choices[3]);\n\t\t\t\t\t}\n\t\t\t\t\t//if single line question\n\t\t\t\t\telse if(question.questionType == 2)\n\t\t\t\t\t{\n\t\t\t\t\t\t$(\"#oneword\").show();\n\t\t\t\t\t\tdocument.getElementById(\"question2\").innerHTML = question.question;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "function displayQuestion(){\n\n //randomize the answer orders\n var rnd = Math.random()*3;\n rnd = Math.ceil(rnd);\n var q1,\n q2,\n q3;\n\n switch(rnd){\n\n case 1:\n q1 = qBank[qNum][1];\n q2 = qBank[qNum][2];\n q3 = qBank[qNum][3];\n break;\n\n case 2:\n q1 = qBank[qNum][3];\n q2 = qBank[qNum][1];\n q3 = qBank[qNum][2];\n break;\n\n case 3:\n q1 = qBank[qNum][2];\n q2 = qBank[qNum][3];\n q3 = qBank[qNum][1];\n break;\n }\n\n //add the questions now\n $(stage).append(\n '<div class = \"questionText\">' + qBank[qNum][0] + '</div>'\n + '<button id=\"1\" class=\"option\">' + q1 + '</div>'\n + '<button id=\"2\" class=\"option\">' + q2 + '</div>'\n + '<button id=\"3\" class=\"option\">' + q3 + '</div>'\n );\n \n $('.option').click(function(){\n //lock the qlock so it cannot be reanswer\n if(qLock==false){\n qLock=true;\n \n //correct answer\n if(this.id==rnd){\n $(stage).append(\n '<div class=\"feedback1\">CORRECT</div>' \n );\n score++;\n }\n \n //wrong answer\n if(this.id!=rnd){\n $(stage).append(\n '<div class=\"feedback2\">WRONG</div>'\n );\n }\n \n setTimeout(changeQuestion, 1000);\n }\n });\n } //end of display question", "function nextQuestion(e) {\n var isCorrect = e.target.getAttribute(\"data-correct\");\n //take away time if they choose the wrong answer and shake elements\n if (!isCorrect) {\n timer -= 12;\n $questionBox.addClass('shake');\n $timer.addClass('shakeTime');\n setTimeout(() => {\n $questionBox.removeClass('shake');\n $timer.removeClass('shakeTime');\n }, 300)\n //otherwise, bounce the question box\n } else {\n $questionBox.addClass('bounce');\n setTimeout(() => {\n $questionBox.removeClass('bounce');\n }, 300);\n }\n //update progress bar\n updateProgress(isCorrect);\n qNumber++;\n //if you have reached the end of the questions, end the quiz\n qNumber < questions.length ? loadQuestion(questions, qNumber) : endQuiz();\n }", "function NextQuestion(index) {\r\n\tdocument.getElementById(\"option-one-label\").style.display='block';\r\n\tdocument.getElementById(\"option-two-label\").style.display='block';\r\n\tdocument.getElementById(\"option-three-label\").style.display='block';\r\n\tdocument.getElementById(\"option-four-label\").style.display='block';\r\n\t\r\n\t\r\n\tdocument.getElementById('score-modal').style.display = \"none\"\r\n\t\r\n handleQuestions()\r\n const currentQuestion = shuffledQuestions[index]\r\n document.getElementById(\"question-number\").innerHTML = questionNumber\r\n document.getElementById(\"player-score\").innerHTML = playerScore\r\n document.getElementById(\"display-question\").innerHTML = currentQuestion.question;\r\n document.getElementById(\"option-one-label\").innerHTML = currentQuestion.optionA;\r\n document.getElementById(\"option-two-label\").innerHTML = currentQuestion.optionB;\r\n document.getElementById(\"option-three-label\").innerHTML = currentQuestion.optionC;\r\n document.getElementById(\"option-four-label\").innerHTML = currentQuestion.optionD;\r\n\r\n\r\n\tif (document.getElementById(\"option-one-label\").innerHTML === \"zzzzzzzzz\")\r\n\t\tdocument.getElementById(\"option-one-label\").style.display='none';\r\n\tif (document.getElementById(\"option-two-label\").innerHTML === \"zzzzzzzzz\")\r\n\t\tdocument.getElementById(\"option-two-label\").style.display='none';\r\n\tif (document.getElementById(\"option-three-label\").innerHTML === \"zzzzzzzzz\")\r\n\t\tdocument.getElementById(\"option-three-label\").style.display='none';\r\n\tif (document.getElementById(\"option-four-label\").innerHTML === \"zzzzzzzzz\")\r\n\t\tdocument.getElementById(\"option-four-label\").style.display='none';\r\n}", "function nextQuestion() {\n if (currentQuestion <= 4) {\n reset();\n displayQuestions();\n displayChoices();\n console.log(currentQuestion);\n } else {\n gameOver();\n }\n}", "function nextQuestion() {\n\n // If all questions are completed hide end the quiz\n if (currentQuestionNumber == questions.length) {\n endQuiz();\n return;\n }\n // Otherwise update current question\n currentQuestion = questions[currentQuestionNumber];\n // Inject all properties to UI\n $(\"#questionNumber\").text(currentQuestionNumber + 1);\n $(\"#questionText\").text(currentQuestion.question);\n $(\"#answerA\").text(currentQuestion.answers.a);\n $(\"#answerB\").text(currentQuestion.answers.b);\n $(\"#answerC\").text(currentQuestion.answers.c);\n\n\n}", "function displayQuestion() {\n //generate random index in array\n index = Math.floor(Math.random()*options.length);\n pick = options[index];\n \n //\tif (pick.shown) {\n //\t\t//recursive to continue to generate new index until one is chosen that has not shown in this game yet\n //\t\tdisplayQuestion();\n //\t} else {\n //\t\tconsole.log(pick.question);\n //iterate through answer array and display\n $(\"#questionblock\").html(\"<h2>\" + pick.question + \"</h2>\");\n for(var i = 0; i < pick.choice.length; i++) {\n var userChoice = $(\"<div>\");\n userChoice.addClass(\"answerchoice\");\n userChoice.html(pick.choice[i]);\n //assign array position to it so can check answer\n userChoice.attr(\"data-guessvalue\", i);\n $(\"#answerblock\").append(userChoice);\n //\t\t}\n }\n \n \n \n //click function to select answer and outcomes\n $(\".answerchoice\").on(\"click\", function () {\n //grab array position from userGuess\n userGuess = parseInt($(this).attr(\"data-guessvalue\"));\n \n //correct guess or wrong guess outcomes\n if (userGuess === pick.answer) {\n stop();\n correctCount++;\n userGuess=\"\";\n $(\"#answerblock\").html(\"<p>Correct!</p>\");\n hidepicture();\n \n } else {\n stop();\n wrongCount++;\n userGuess=\"\";\n $(\"#answerblock\").html(\"<p>Wrong! The correct answer is: \" + pick.choice[pick.answer] + \"</p>\");\n hidepicture();\n }\n })\n }", "function nextQuestion() {\n checkAnswer();\n qtrack += 1;\n isEnd();\n if (!end) updateQuestion();\n}", "function showResult() {\n const questionElement = document.getElementById('question');\n const optionsElement = document.getElementById('options');\n const nextButton = document.getElementsByTagName('button')[0];\n \n // Hide options and next button\n optionsElement.style.display = 'none';\n nextButton.style.display = 'none';\n \n // Display final score\n questionElement.textContent = `You scored ${score} out of ${quiz.length}!`;\n }", "function nextQuestion() {\n quizContentIndex++;\n // note that the answerResult box needs to be hidden again as questions and answers are iterated\n hideElement(answerResult);\n renderQuestion();\n}", "function nextQuestion() {\n $(\"#button-0\").show();\n q++;\n\n if (q < quizQuestions.length) {\n $(\"#button-0\").html(\"Next Question\")\n .click(startQuiz);\n }\n else {\n $(\"#button-0\").html(\"End Quiz\")\n .off(\"click\")\n .click(endQuiz);\n }\n}", "function nextQuestion(){\t\n\t\thideAnswerBox();\n\t\tremovePosters();\n\t\tstopAudio();\n\t\tquestionCount++;\n\t\t\n\t\tif (questionCount > 9) {\n\t\t\tendGame();\n\t\t\tshowOverlay($('.endGame'));\n\t\t}\n\t\telse if (questionCount > 4 && gameCount < 1) {\n\t\t\tendRound();\n\t\t\tshowOverlay($('.end_round'));\n\t\t}\n\t\telse {\n\t\t\tupdateQuestion();\n\t\t\tplayAudio();\n\t\t}\n\t}", "function checkAnswer(e){\n \n // selectedAnswer stores the value of the option user has clicked\n var selectedAnswer = e.target.textContent; \n e.preventDefault();\n \n var answerCheckEl = e.target.parentNode.parentNode.querySelector(\".resultText\");\n\n //If the selectedAnswer matches the correctAnswer from the questionObj object's, score is increased by 10 points. And result will display as Correct or Wrong at the bottom. \n if (selectedAnswer === questionObj[nextQuestionIndex].correctAnswer) {\n // Increase score\n score = score + 10;\n answerCheckEl.textContent = \"Correct\";\n answerCheckEl.style.color = \"green\";\n answerCheckEl.style.marginBottom = \"40px\";\n } else {\n\n // If the selectAnswer does not match the correctAnswer, score decreases by 2 and Time left is also decreases by 10 seconds. And result will display as Wrong at the bottom.\n if(secondsLeft <= 1){\n hideAllSection();\n return;\n } else {\n secondsLeft = secondsLeft - 10;\n answerCheckEl.textContent = \"Wrong\";\n answerCheckEl.style.color = \"red\"; \n answerCheckEl.style.marginBottom = \"40px\"; \n } \n }\n\n // nextQuestion function is called to get another question from the questionObj object after 1 second\n setTimeout(nextQuestion, 1000);\n}", "function nextQuestion() {\r\n if (STORE.questionNumber < STORE.questions.length - 1) {\r\n STORE.submittedAnswer = false;\r\n STORE.view = 'question';\r\n STORE.questionNumber++;\r\n }\r\n else {\r\n STORE.view = 'score';\r\n finalScore();\r\n }\r\n}", "function nextQuestion() {\n if (questionSelector == answerArrays.length - 1) {\n questionSelector = 0;\n setTimeout(showScoreCard, 1500);\n } else {\n questionSelector++;\n setTimeout(displayGame, 1500);\n }\n }", "function nextQuestion() {\n\tif (questionNumber < 6) {\n\tquestionNumber++;\n\tshowTriviaGame();\n\tquestionTimer = 30;\n\tgameTimer();\n\t}\n\telse {\n\t\tresultsScreen();\n\t\t$(\"#results\").show();\n\t}\n}", "function answer() {\n if (choice === qArr[index].correct) {\n score += 100;\n document.getElementById(\"results\").innerHTML = `Great job!`\n } else {\n document.getElementById(\"results\").innerText = `Wrong! The correct answer is ${qArr[index].rightAns}.`\n }\n}", "function nextQuestion() {\n questionIndex++;\n if (questionIndex === questions.length) {\n timer = 0;\n }\n optionListEl.addEventListener('click', checkAnswer);\n renderQuestion();\n}", "function showQuestion(questionNumber) {\n \n currentQuestion = questionNumber;\n var questionDetails = questionAnswersOptions[questionNumber-1];;\n var question = questionDetails.question;\n var options = questionDetails.options;\n \n $(\"#questionTxt\").html(question);\n $(\"#questionCounter\").html(showQuestionCounter(questionNumber));\n var optionsHtml = \"\";\n $('#optionsContainer').html(optionsHtml);\n \n for ( var i = 0; i < options.length; i++ ) {\n // Use of AND operator\n if ( answerByStudent[questionNumber] && answerByStudent[questionNumber] === (i+1) ) {\n optionsHtml += '<input type=\"radio\" name=\"option\" checked onclick=\"calculateMarks('+(i+1)+');\"><label id=\"opt'+(i+1)+'\">' + options[i] + '</label><br>';\n } else {\n optionsHtml += '<input type=\"radio\" name=\"option\" onclick=\"calculateMarks('+(i+1)+');\"><label id=\"opt'+(i+1)+'\">' + options[i] + '</label><br>';\n }\n }\n $('#optionsContainer').html(optionsHtml);\n if(questionNumber === questionAnswersOptions.length){\n $(\"#nextBtn\").hide()\n }else{\n $(\"#nextBtn\").show()\n }\n}", "function nextQandA() {\n\t\tCURRENT_QNUM += 1;\n\t\tvar curQuestion = nextQuestion();\n\t\tvar curAnswers = nextAnswers();\n\t\t\n\t\t// If no questions are left, display results. Else, display next Q&A.\n \t\tif (CURRENT_HP == 0) {\n\t\t\tshowResults(\"Game Over\");\n\t\t\tshowImage(\"img/pogo-revive.png\");\n\t\t\t// hide nav\n\t\t\t$('.navbar-toggle').animate({\n\t\t\t\tbottom: \"-100vh\"\n\t\t\t}, 800, \"swing\", function() {\n\t\t\t});\n\t\t\t$('.collapse').collapse('hide');\n\t\t} else if (curQuestion == \"\") {\n\t\t\tshowResults(\"Results\");\n\t\t\t\n\t\t\t// Medals\n\t\t\tvar medalImage = getMedal();\n\t\t\tshowImage(medalImage);\n\t\t\t\n\t\t} else {\n\t\t\t// Enable navbar toggle\n\t\t\t$('.navbar-toggle').attr(\"data-toggle\", \"collapse\");\n\t\t\t\n\t\t\t// Reallow click event for answers\n\t\t\tFLAG_ACTION = false;\n\t\t\t\n\t\t\tshowQuestion(curQuestion);\n\t\t\tshowAnswers(curAnswers);\n\t\t\tshowImage(\"\");\n\t\t} \n\t}", "function next() {\n\n $(\"#question\").html(\"<h3>\" + questions[nextQuestion][0] + \"</h3>\");\n $(\"#a\").html(\"<h4 value='a'>\" + questions[nextQuestion][1] + \"</h4>\");\n $(\"#b\").html(\"<h4 value='b'>\" + questions[nextQuestion][2] + \"</h4>\");\n $(\"#c\").html(\"<h4 value='c'>\" + questions[nextQuestion][3] + \"</h4>\");\n $(\"#d\").html(\"<h4 value='d'>\" + questions[nextQuestion][4] + \"</h4>\");\n }", "function nextQuestion() {\n\t// debugger\n\tlet currentQuestion = questionList[getCurrentIndex()];\n\tlet questionsAnswered = getCurrentIndex();\n\t//.html is a setter\n\t$('#container').html(showQuizTemplate(correctAnswers, currentQuestion, questionNumber));\n\tconsole.log(nextQuestion);\n}", "function displayQuestion() {\n pick = options[index];\n\n //loop through answer array and display\n $(\"#questionbox\").html(\"<h2>\" + pick.question + \"</h2>\");\n for (var i = 0; i < pick.choice.length; i++) {\n var userChoice = $(\"<div>\");\n userChoice.addClass(\"answerchoice\");\n userChoice.html(pick.choice[i]);\n //assign array position to it so can check answer\n userChoice.attr(\"data-guessvalue\", i);\n $(\"#answerbox\").append(userChoice);\n }\n\n //click function to select answer and outcomes\n $(\".answerchoice\").on(\"click\", function() {\n userGuess = parseInt($(this).attr(\"data-guessvalue\"));\n //increase index of question so that reads next question in array\n index++;\n //correct guess or wrong guess outcomes\n if (userGuess === pick.answer) {\n stop();\n correctCount++;\n userGuess = \"\";\n $(\"#answerbox\").html(\"<p>Correct!</p>\");\n hidepicture();\n } else {\n stop();\n wrongCount++;\n userGuess = \"\";\n $(\"#answerbox\").html(\n \"<p>Wrong! The correct answer is: \" +\n pick.choice[pick.answer] +\n \"</p>\"\n );\n hidepicture();\n }\n });\n }", "function nextQuestion(){\n clearAnswer();\n questionIndex++;\n\n if (questionIndex < questions.length) {\n displayQuestion(questions[questionIndex]);\n } else {\n gameOver();\n }\n}", "function selectAnswer() {\n\n}", "function next_question() {\n if (q_index < 49) {\n q_index++;\n let new_question = questions[q_index];\n console.log(new_question);\n $('.question').text(new_question);\n } else {\n calculate_results();\n $(\".test_interface\").addClass(\"hidden\");\n $(\".test_done\").removeClass(\"hidden\");\n }\n}", "function nextQuestion() {\n $question.html('')\n if (questionIndex < questionList.length) {\n let questionMsg = '<h3>' + questionList[questionIndex][\"question\"] + '</h3><ol>'\n for (let i = 0; i < questionList[questionIndex][\"answers\"].length; i++) {\n questionMsg += '<li><button id=\"answer' + (i + 1) + '\">' + (i + 1) + '. ' + questionList[questionIndex][\"answers\"][i] + '</button></li>'\n }\n questionMsg += '</ol>'\n $question.append(questionMsg)\n } else {\n endQuiz()\n }\n }", "function selectAnswer(answer){\n console.log(answer)\n if (answer == questions[questionNum].correct){\n console.log('correct');\n } else {\n timeleft -= 10;\n }\n questionNum += 1\n\n if( questionNum<questions.length )\n getQuestions()\n else\n endQuiz() \n}", "function nextQuestion(){\n if(runningQuestion < lastQuestion){\n runningQuestion++;\n showQuestion();\n } else{\n endQuiz();\n }\n}", "function displayQuestion() {\n\n\t\tconsole.log(questionNumber);\n\t\tconsole.log(questionBank[questionNumber]);\n\n\t\tvar flag = 0;\t//To check when an option was pressed\n\t\tvar flag_correct = 0; //To check if the option selected was correct\n\n\t\tq1=questionBank[questionNumber][1];\n\t\tq2=questionBank[questionNumber][2];\n\t\tq3=questionBank[questionNumber][3];\n\t\tq4=questionBank[questionNumber][4];\n\t\texplanation=questionBank[questionNumber][6];\n\t\thint=questionBank[questionNumber][7];\n\n\t\t$(stage).append('<div class=\"questionText\">'+questionBank[questionNumber][0]+'</div><div id=\"1\" class=\"option\">'+q1+'</div><div id=\"2\" class=\"option\">'+q2+'</div><div id=\"3\" class=\"option\">'+q3+'</div><div id=\"4\" class=\"option\">'+q4+'</div>');\n\n\t\tif(typeof(hint)==='string') {\n\t\t\t$(stage).append('<br><br><div class=\"hintButton\"> Hint! <span class=\"hint\">'+hint+'</span> </div>');\n\t\t}\n\n\t\tfunction onTimer() {\n\t\t\ttimer.innerHTML = \"Timer: \" + timer_clock + \" seconds\";\n\t\t\ttimer_clock--;\n\t\t\tconsole.log(timer_clock);\n\t\t\tif (timer_clock < 0) {\n\t\t\t\talert('Time\\'s up');\n\t\t\t\ttimer_clock = 30;\t//Rest but no scores\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse if(flag == 1) {\t//An option was selected hence, stop and rest the timer\n\t\t\t\t\n\t\t\t\tif(flag_correct == 1) {\t\t//The correct option was selected\n\t\t\t\t\tif(timer_clock>=21 && timer_clock<=30) {\t//Answered within the first 10 seconds\n\t\t\t\t\t\toverall_score = overall_score + 15;\n\t\t\t\t\t} else if(timer_clock>=11 && timer_clock<=20) {\t\t//Took 10 to 20 seconds\n\t\t\t\t\t\toverall_score = overall_score + 10;\n\t\t\t\t\t} else if(timer_clock>=1 && timer_clock<=10) {\t\t//Took 20 to 30 seconds\n\t\t\t\t\t\toverall_score = overall_score + 5;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t//Took more than 30 seconds, no score awarded, do nothing\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\ttimer_clock = 30;\n\t\t\t\ttimer.innerHTML = \"Timer\";\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse {\n\t\t\t setTimeout(onTimer, 1000);\n\t\t\t}\n\t\t}\n\n\t\tonTimer();\t//Start the timer after displaying question\n\n\t\t$('.option').click(function() {\n\t\t\tflag = 1;\n\t\t\tif(questionLock == false) {\n\t\t\t\tquestionLock = true;\t\n\n\t\t\t\t//correct answer\n\t\t\t\tif(this.id==questionBank[questionNumber][5]) {\n\t\t\t\t\tflag_correct = 1;\n\t\t\t\t\t$(stage).append('<div class=\"feedback1\">CORRECT</div>');\n\t\t\t\t\tresult[resultNumber] = 1;\n\t\t\t\t\tresultNumber++;\n\t\t\t\t\tscore++;\n\t\t\t\t}\n\n\t\t\t\t//wrong answer\t\n\t\t\t\tif(this.id!=questionBank[questionNumber][5]) {\n\t\t\t\t\t$(stage).append('<div class=\"feedback2\">WRONG</div>');\n\t\t\t\t\tresult[resultNumber] = 0;\n\t\t\t\t\tresultNumber++;\n\t\t\t\t}\n\n\t\t\t\tdocument.getElementById(\"explanation\").innerHTML = explanation;\n\n\t\t\t\t// Get the modal\n\t\t\t\tvar modal = document.getElementById(\"myModal\");\n\n\t\t\t\t// Get the <span> element that closes the modal\n\t\t\t\tvar span = document.getElementsByClassName(\"close\")[0];\n\n\t\t\t\tmodal.style.display = \"block\";\n\n\t\t\t\t// When the user clicks on <span> (x), close the modal\n\t\t\t\tspan.onclick = function() {\n\t\t\t\t\tmodal.style.display = \"none\";\n\t\t\t\t\tsetTimeout(function(){changeQuestion()}, 1000);\n\t\t\t\t}\n\n\t\t\t\t// When the user clicks anywhere outside of the modal, close it\n\t\t\t\twindow.onclick = function(event) {\n\t\t\t\t\tif (event.target == modal) {\n\t\t\t\t\t\tmodal.style.display = \"none\";\n\t\t\t\t\t\tsetTimeout(function(){changeQuestion()}, 1000);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t}", "function setNextQuestion() {\n resetState();\n //figure out what this means\n showQuestion(shuffledQuestions[currentQuestionIndex]);\n}", "function next_question() {\n currentQuestion++;\n if (currentQuestion < quizLength + 1) {\n _(\"submitter\").onclick = process_answer_submission;\n _(\"next\").onclick = next_question;\n _(\"submitter\").style.visibility =\"visible\";\n _(\"user_input\").style.visibility = \"visible\";\n _(questions[currentQuestion].id).style.display = \"block\";\n _(questions[currentQuestion - 1].id).style.display = \"none\";\n _(\"choice\").value = \"\";\n }\n else {\n var percent = (numCorrect/quizLength) * 100;\n _(\"total_result\").innerText = (\"You answered \" + numCorrect + \" of \" + quizLength + \" questions correctly, for a score of \" + percent + \"%!\");\n _(\"next\").style.visibility = \"hidden\";\n }\n return _(\"question_result\").innerText = \"\";\n}", "function chooseFoodQuiz() {\n $(foodQuiz).click();\n questions = foodQuestions;\n finalQuestion = foodQuestions.length - 1;\n startQuiz();\n}", "function Question(){\n console.log(cQ)\n console.log(correct);\n\t\t$(\".answer\").show();\n\t\t$(\"#Question\").show();\n $(\"#Question\").text(questions[cQ].currentQ);\n $(\"#A\").text(questions[cQ].aA);\n $(\"#B\").text(questions[cQ].aB);\n $(\"#C\").text(questions[cQ].aC);\n $(\"#D\").text(questions[cQ].aD);\n var answerCheck = (questions[cQ].answer);\n $(\"#A\").unbind('click').click(function() {\n answer = $(\"#A\").text();\n if(answer == answerCheck){\n console.log(\"Yay\");\n correct ++;\n cQ ++;\n }else{\n cQ ++;\n }\n if (cQ >= 5){\n end();\n }else{\n Question();\n }\n });\n $(\"#B\").unbind('click').click(function() {\n answer = $(\"#B\").text();\n if(answer == answerCheck){\n console.log(\"Yay\");\n correct ++;\n cQ ++;\n }else{\n cQ ++;\n }\n if (cQ >= 5){\n end();\n }else{\n Question();\n }\n });\n $(\"#C\").unbind('click').click(function() {\n answer = $(\"#C\").text();\n if(answer == answerCheck){\n console.log(\"Yay\");\n correct ++;\n cQ ++;\n }else{\n cQ ++;\n }\n if (cQ >= 5){\n end();\n }else{\n Question();\n }\n });\n $(\"#D\").unbind('click').click(function() {\n answer = $(\"#D\").text();\n if(answer == answerCheck){\n console.log(\"Yay\");\n correct ++;\n cQ ++;\n }else{\n cQ ++;\n }\n if (cQ >= 5){\n end();\n }else{\n Question();\n }\n });\n\t}", "function nextQuestion() {\n // Increment the quiz question count by 1\n count++\n //Remove previous question from HTML before going onto the next question in the quiz.\n $(\"#question-div\").hide();\n //Remove choice buttons from previous question from HTML.\n $(\"#view-quiz-results-div\").empty();\n //Increment progress bar by 10 for each question.\n // $('#quiz-progress-bar')\n // .progress('increment', 10);\n //If the count is the same as the length of the questionSet.questionArray array, find match.\n if (count === questionSet.questionArray.length) {\n findMatch();\n }\n\n //else, if there are still questions left, go to next question.\n else {\n start();\n }\n}", "function displayQuestion() {\n let question = STORE.questions[STORE.currentQuestion];\n updateScoreAndQuestionCounter();\n\n $(\"main\").html(generateQuestionTemplate(question.question));\n showOptions();\n $(\"#next\").hide();\n}", "function nextQuestion() {\n\tif (question_counter < questions.length - 1) {\n\t\tquestion_counter++;\n\t\tquestion_button_default.style.display = \"none\";\n\t\tquestion_button_default.classList.remove('btn--wrong')\n\t\tquestion_button_default.classList.remove('btn--correct')\n\t\tshowQuestions(question_counter)\n\t} else {\n\t\tconsole.log('> No more questions: Staph');\n\t\tshowResultBox();\n\t}\n}", "function displayQuestion() {\n\t\t\tstartTime30();\t\n\t\t\t$(\"#question\").html(eachone[count].question);\n\t\t\t$(\"#option1\").html(eachone[count].option1.answer);\n\t\t\t$(\"#option2\").html(eachone[count].option2.answer);\n\t\t\t$(\"#option3\").html(eachone[count].option3.answer);\n\t\t\t$(\"#option4\").html(eachone[count].option4.answer);\n\t\t\t$(\"#okButton\").html(\"\");\n\t\t}", "function displayQuestion() {\n //generate random index in array\n index = Math.floor(Math.random()*options.length);\n pick = options[index];\n \n //\tif (pick.shown) {\n //\t\t//recursive to continue to generate new index until one is chosen that has not shown in this game yet\n //\t\tdisplayQuestion();\n //\t} else {\n //\t\tconsole.log(pick.question);\n //iterate through answer array and display\n $(\".questSect\").html(\"<h2>\" + pick.question + \"</h2>\");\n for(var i = 0; i < pick.choice.length; i++) {\n var userChoice = $(\"<div>\");\n userChoice.addClass(\"answerchoice\");\n userChoice.html(pick.choice[i]);\n \n //assign array position to it so can check answer\n userChoice.attr(\"data-guessvalue\", i);\n $(\".ansSect\").append(userChoice);\n //\t\t}\n }\n\n //click function to select answer and outcomes\n $(\".answerchoice\").on(\"click\", function () {\n //grab array position from userGuess\n userGuess = parseInt($(this).attr(\"data-guessvalue\"));\n \n //correct guess or wrong guess outcomes\n if (userGuess === pick.answer) {\n stop();\n correctCount++;\n userGuess=\"\";\n $(\".ansSect\").html(\"<p>Correct!</p>\");\n hidepicture();\n \n } else {\n stop();\n wrongCount++;\n userGuess=\"\";\n $(\".ansSect\").html(\"<p>Wrong! The correct answer is: \" + pick.choice[pick.answer] + \"</p>\");\n hidepicture();\n }\n })\n }", "function confirmAnswer(answer){\n correct = questionsArray[questionOptions].correctAnswer\n if(answer === correct){\n questionOptions++;\n alert(\"You are right!\");\n scoreBoard.textContent = \"Score: \" + score++;\n questionSelect()\n \n }\n else if(answer !== correct){\n questionOptions++;\n alert(\"Wrong answer!\");\n timerSetting -= 5;\n questionSelect()\n \n }\n}", "function promptQuestion(questionArray) {\n console.log(\"questions left: \" + questionArray.length);\n if (questionArray.length === 0) {//if the question array is empty, this will stop calling itself and end the quiz\n clearInterval(ticker);\n displayScoreScreen();\n return;\n } else {\n $(\"#question\").text(questionArray[0].prompt);\n //This next if statement is only for a fun joke, the question falls flat otherwise\n if (\n questionArray[0].prompt === \"Amongst our weaponry are such elements as: \" //if the question is about the spanish inquisition\n ) {\n $(\"#question\").prepend( \n \"<br><div class='text-center'><img class = 'text-center' style='max-width: 90%;' src='\" + //add html to display the \"nobody expects the spanish inquisition\" gif\n questionArray[0].unexpected +\n \"' /></div><br>\"\n );\n }\n\n //iterate through the question's options, display each option as a button in an unordered list, uses only the first array index, because this is unnecessarily recursive.\n //lots of comments here to make sure it can be followed\n for (i in questionArray[0].options) {\n let newLi = $(\"<li style='list-style-type:none'>\"); //make a new list item\n let newBtn = $(\n \"<button class ='btn btn-primary mx-auto' id='btn-option'>\" //make a new button\n );\n\n $(newBtn).text(questionArray[0].options[i]); //display the option text as the button's inner text\n if (questionArray[0].options[i] === questionArray[0].answer) { //if the option is also the answer, add the \"correct answer\" on-click function, call the function again\n $(newBtn).click(function () {\n correctAnswer();\n promptQuestion(questionArray.slice(1, questionArray.length)); //call the function again, slicing off the first index, setting up line 233 for the next time through\n });\n } else {\n $(newBtn).click(wrongAnswer); //else, wrongAnswer (decrement time left)\n }\n $(newLi).append(newBtn);//stick the new button onto the new list item\n $(\"#options\").append(newLi, \"<br>\"); // adds the new list item to the ul, gives extra space between items\n }\n }\n}", "function displayNext() {\n quiz.fadeOut(function () {\n $('#question').remove();\n\n if (questionCounter < questions.length) {\n var nextQuestion = createQuestionElement(questionCounter);\n quiz.append(nextQuestion).fadeIn();\n if (!(isNaN(selections[questionCounter]))) {\n $('input[value=' + selections[questionCounter] + ']').prop('checked', true);\n }\n\n $next.show();\n preventRadio();\n } else {\n var scoreElem = displayScore();\n quiz.append(scoreElem).fadeIn();\n $next.hide();\n $start.show();\n }\n });\n }", "function checkAnswer(choice){\n if(choice === correctA[currentQ]){\n alert('Great Job!');\n currentQ ++;\n writeQ()\n }else{\n alert('Wrong answer! Try again!');\n time -= 5;\n }\n }", "function selectAnswer(e) {\n let selectedButton = e.target;\n let correct = selectedButton.dataset.correct;\n // Sending the information to our correct method in our class Quiz.\n quiz.checkAnswer(selectedButton,correct); \n // If we have more questions then we just keep going.\n if (quiz.numberOfQuestions > currentQuestionIndex + 1) { \n }\n // If we have no more questions then we showing the result button.\n else if(quiz.numberOfQuestions <= currentQuestionIndex + 1 && quiz.nrCorrectsInQuestion == 0) {\n nextButton.id = \"show-btn\";\n const showButton = document.getElementById('show-btn');\n showButton.innerHTML = \"Show result\";\n showButton.addEventListener('click', () => {\n document.styleSheets[1].disabled = true;\n document.styleSheets[2].disabled = false;\n document.getElementById(\"wrapper-game\").style.display = \"none\";\n document.getElementById(\"wrapper-result\").style.display = \"flex\";\n showResult();\n });\n }\n}", "function nextQuestion() {\n /* set variable isQuestionOver to the value of the two variable, triviaQuestions.length\n and currentQuestion, being equal*/\n var isQuestionOver = (triviaQuestions.length - 1) === currentQuestion;\n // if isQuestionOver true, run displayResults function\n if (isQuestionOver) {\n displayResults();\n\n // else add 1 to currentQuestion and run loadQuestion function.\n } else {\n currentQuestion++;\n loadQuestion();\n }\n }", "function checkAnswer(question, answer) {\n console.log(\"question: \", question);\n console.log(\"answer: \", answer);\n let correctAnswer = questions[question].answer;\n let userAnswer = questions[question].choices[answer];\n if (userAnswer == correctAnswer) {\n index = index + 1;\n console.log(score);\n console.log(\"Correct\");\n }\n // This will allow code to continue even if wrong answer is selcted along with taking away time\n else {\n index = index + 1;\n countDown = countDown - 15;\n score = score - 15;\n console.log(score);\n console.log(\"Next question: \", index);\n console.log(\"Incorrect\");\n }\n clearQuestionDiv();\n renderQuestions();\n quizOver();\n}", "function checkAnswerA(){\n if(quizQuestions[currentQuestion].correctChoice === li1.value){\n p.textContent = \"Correct!\"\n } else { \n p.textContent = \"Oops! Maybe next time.\"\n secondsRemaining = secondsRemaining - 10;\n };\n currentQuestion++;\n if (currentQuestion > quizQuestions.length - 1){\n quizEl.style.display = \"none\";\n displayHighscore();\n return;\n } \n displayQuestions();\n}", "function next() {\ncurrentQuestion++;\n\nif (currentQuestion > questions.length - 1) {\n\tendGame();\n\treturn;\n}\n\nvar quizContent = \"<h2>\" + questions[currentQuestion].title + \"</h2>\"\n\nfor (var buttonLoop = 0; buttonLoop < questions[currentQuestion].choices.length; buttonLoop++) {\n\tvar buttonCode = \"<button onclick=\\\"[ANS]\\\">[CHOICE]</button>\"; \n\tbuttonCode = buttonCode.replace(\"[CHOICE]\", questions[currentQuestion].choices[buttonLoop]);\n\tif (questions[currentQuestion].choices[buttonLoop] == questions[currentQuestion].answer) {\n\t\tbuttonCode = buttonCode.replace(\"[ANS]\", \"correct()\");\n\t} else {\n\t\tbuttonCode = buttonCode.replace(\"[ANS]\", \"incorrect()\");\n\t}\n\tquizContent += buttonCode\n}\n\n\ndocument.getElementById(\"quizBody\").innerHTML = quizContent;\n}", "function showAnswerDefault () {\n\n incorrectA++;\n\n // display\n $(\"#question-panel\").html(\"Fish paste! The correct answer was... \" + \"<em>\" + questionArr[questionIndex].answer[1] + \"</em>\");\n $(\"#\" + questionArr[questionIndex].answer[0]).addClass(\"correct\");\n console.log(\"Dwight Schrute voice: NO ANSWER GIVEN!\");\n\n // delay on next question so you have time to read answer\n setTimeout(function() {\n\n questionIndex++;\n renderQuestion();\n\n }, 3500);\n\n }", "function checkAnswer(e) {\n // targets user selection\n var answer = e.target.innerText;\n console.log(answer);\n\n //cannot set answer = to question correct answer\n // !!!!! NEED HELP WITH THIS !!!!\n if (answer === questions[qIndex].correct) {\n userScore++;\n scoreBox.innerHTML = `<h2>Score: ${userScore}</h2>`;\n console.log(userScore);\n // if answer correct, add one to question index\n qIndex++;\n // run questionCycle again prompting new question\n questionCycle();\n // box for user score have it update everytime this happens\n } else {\n // decreases timer by one second if user selects wrong answer\n timerCount = timerCount - 5;\n qIndex++;\n scoreBox.innerHTML = `<h2>Score: ${userScore}</h2>`;\n // prompts new question if answered incorrectly\n questionCycle();\n }\n}", "function nextQuestion(){\n var questionOver = (questions.length -1) === currentQuestion\n if (questionOver) {\n resultDisplay()\n } else {\n currentQuestion++;\n loadQuestions();\n }\n}", "function nextQuestion(){\n $(\"#alerts\").hide();\n       currentQuestion = triviaQuestions[currentQuestionIndex + 1];\n       currentQuestionIndex++;\n if (currentQuestionIndex >= 10) {\n $(\"#alerts\").html(\"<h2> Nice job! Click the Start 90s Trivia button to play again! <br> Questions Correct: \" + correctAnswers.length + \" <br> Questions Incorrect: \" + incorrectAnswers.length + \" </h2>\");\n $(\"#alerts\").show();\n stopTimer();\n } else {\n       displayQuestion(currentQuestion);\n };\n    }", "function ansClick(e) {\n if(qIndex >= (questions.length - 1)) {\n postScore();\n } else {\n var currentQuestion = questions[qIndex];\n var ansClick = e.target.textContent;\n if(ansClick.toLowerCase() === currentQuestion.answer.toLowerCase()) {\n currentScore+= 5;\n } else {\n time -= 10;\n currentScore -= 5;\n }\n qIndex++;\n getQuestion();\n };\n}", "function loadNextQuestion() {\r\n var selectOption = document.querySelector('input[type=radio] : checked');\r\n var answerFromPlayer = selectOption.value;\r\n \r\n if (!selectOption) {\r\n alert('Please select your answer or You will not get mark for this question');\r\n return ;\r\n }\r\n if (questions[currentQuestion].answer == answerFromPlayer) {\r\n correct++;\r\n }\r\n selectOption.checked = false;\r\n currentQuestion++;\r\n \r\n if (currentQuestion == questions.length - 1) {\r\n nextButton.textContent = \"You finished the quiz. Let see how many correct questions you got\";\r\n nextButton.style.width = \"400px\";\r\n }\r\n if (currentQuestion == questions.length) {\r\n contain.style.display = \"none\";\r\n document.getAnimations(\"result\").style.display = \" \";\r\n document.getAnimations(\"result\").style.display = \"You got \" + correct + \" answers.\";\r\n document.getElementById(\"score\").textContent = score;\r\n return;\r\n }\r\n if (correct <= 5) {\r\n document.getElementById(\"message\").textContent = messages[1];\r\n document.getElementById(\"gif-source\").textContent = video[3];\r\n }\r\n if (correct <= 7) {\r\n document.getElementById(\"message\").textContent = messages[3];\r\n document.getElementById(\"gif-source\").textContent = video[1];\r\n }\r\n if (correct == 10 ) {\r\n document.getElementById(\"message\").textContent = messages[2];\r\n document.getElementById(\"gif-source\").textContent = video[2];\r\n }\r\n loadQuestion(currentQuestion);\r\n\r\n}", "function nextQuestion() {\n resetState()\n displayQuestions(shuffledQuestions[currentQuestionIndex])\n}", "function nextQuestion() {\n\tevent.preventDefault();\n\t$('.selections').prop('checked', false);\n\t$(\"#next-question\").addClass('hidden');\n\t$(\"#Submit\").removeClass('hidden');\n\t$(\"#answer-box\").text('');\n\trenderQuestion(State.Questions[State.onQuestion])\n}", "function nextQuestion() {\n resetState();\n displayQuestions(shuffledQuestions[currentQuestionIndex])\n}" ]
[ "0.784939", "0.76016074", "0.7574467", "0.7516448", "0.74989897", "0.74818283", "0.74133205", "0.7406794", "0.7386207", "0.73774666", "0.7353476", "0.7315085", "0.73085976", "0.72649455", "0.72552776", "0.7246592", "0.7236547", "0.72318804", "0.72290313", "0.72008705", "0.71934503", "0.7185336", "0.7132939", "0.71203053", "0.7113639", "0.71129376", "0.7104865", "0.71043867", "0.70855236", "0.7084044", "0.7082791", "0.7067071", "0.7055462", "0.70489556", "0.7038999", "0.70283693", "0.7028361", "0.7016462", "0.7012408", "0.699797", "0.69927263", "0.6989914", "0.69807774", "0.6965102", "0.6964423", "0.6962218", "0.6954582", "0.6947551", "0.69431555", "0.69429946", "0.6942423", "0.6941052", "0.6937184", "0.69271815", "0.6918672", "0.6913062", "0.6904094", "0.6896622", "0.6890156", "0.6888921", "0.6883507", "0.68755686", "0.68741274", "0.68706405", "0.6870357", "0.6869828", "0.6869364", "0.6868459", "0.6859445", "0.68583095", "0.68537635", "0.6852786", "0.6852451", "0.68509424", "0.6850431", "0.68485314", "0.684499", "0.68434685", "0.6841881", "0.6837024", "0.68302137", "0.6829588", "0.6826038", "0.6822789", "0.6821726", "0.6819509", "0.68179715", "0.68145657", "0.6813317", "0.68105996", "0.6807844", "0.68040174", "0.6802639", "0.67982084", "0.6796958", "0.6796785", "0.67967623", "0.6794888", "0.6793807", "0.6792724", "0.6791931" ]
0.0
-1
function that displays correct answer when user doesn't press anything; moves onto next q
function showAnswerDefault () { incorrectA++; // display $("#question-panel").html("Fish paste! The correct answer was... " + "<em>" + questionArr[questionIndex].answer[1] + "</em>"); $("#" + questionArr[questionIndex].answer[0]).addClass("correct"); console.log("Dwight Schrute voice: NO ANSWER GIVEN!"); // delay on next question so you have time to read answer setTimeout(function() { questionIndex++; renderQuestion(); }, 3500); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function nextQuestion(){\n var n = Math.floor(Math.random() * q.length);\n q[n].display1();\n var ans = prompt('Please select the correct answer. (tap \\'exit\\' to exit)');\n \n if (ans !== 'exit'){\n q[n].checkAnswer(parseInt(ans),keepScore);\n nextQuestion();\n }\n }", "function changeQCorrect() {\n changeQ();\n messageArea.textContent = \"CORRECT!\";\n }", "function nextQuestion() {\n resetState();\n showQuestion();\n}", "function quiz (question, answer) {\nindex = read_input.keyInSelect(answer, question);\n}", "function nextQ() {\n\tif (iQ <= allQ.length) {\n\t\t$('.beginQuestion').text(currentQ.question);\n\t};\n\n}", "function question(){\n\tlet b = false;\n\trl.question(\"Enter an operation (+-*/, q to quit):\", (operator) => {\n\t\tif (operator == 'q'){\n\t\t\tprocess.exit();\n\t\t}\n\t\tif (operator != 'q'){\n\t\t\tb = true;\n\t\t}\n\t\trl.question(\"Enter value:\", (value) => {\n\t\t\tresult = operation(operator, value);\n\t\t\tconsole.log(\"Current Total: \" + result);\n\t\tif(b == true){\n\t\t\tquestion();\n\t\t}\n\t\t});\n\t});\n}", "function q1 (){\n let answer = prompt('Is Quen from Maine?');\n answer = answer.toLowerCase();\n \n //question1\n if (answer === answerBank[2] || answer === answerBank[3]){\n console.log('correct');\n globalCorrect = globalCorrect + 1;\n alert('You got it correct, ' + userName + '!');\n }\n else if (answer === answerBank[0] || answer === answerBank[1]){\n console.log('Wrong');\n alert('Ouch! Better luck on the next one.');\n }\n else{\n //console.log('Non accepted answer submitted');\n alert('Wow, really?');\n }\n}", "function nextQuestion() {\n var n = Math.floor(Math.random() * questions.length);\n\n questions[n].displayQuestion();\n // Use parseInt to convert ex. \"2\" to integer, not string - 2.\n var answer = prompt('Please select the correct answer.');\n\n if (answer !== 'exit') {\n questions[n].checkAnswer(parseInt(answer), keepScore);\n nextQuestion();\n }\n }", "function nextQuestion() {\n showQuestion();\n //*********************************** */\n // this logic is implemented because unable to check whether event listener for first round exists with button\n if (startButton.textContent !== \"Retake Quiz\") {\n addEventListenerToButtons(questionIndex);\n }\n //*********************************** */\n}", "function selectNextQ(){\n resetState();\n showQuestion(shuffledQuestion[currentQuestionI]);\n}", "function nextQuestion() {\n questionNumber++;\n\n // empty text area and remove message\n $(\"#correct\").fadeIn(500).addClass(\"d-none\");\n $(\"#input-answer\").val(\"\");\n $(\"#input-answer\").css(\"color\", \"#212429\");\n\n arrayPositionSelect++;\n if (questionNumber < 5 && numberOfLives >= 0) {\n showQuestion(); // Dont need to call generate question (all questions generated)\n } else if (questionNumber > 4 && numberOfLives >= 0) {\n roundComplete();\n // Start Round\n } else if (numberOfLives < 0) {\n gameOver();\n }\n}", "function nextQuestion() {\n checkAnswer();\n qtrack += 1;\n isEnd();\n if (!end) updateQuestion();\n}", "function askQuestion(qNo, quesText, options, answer, pointsAwarded, metaInfo, score) {\n // Asking the question to player, along with giving him/her four appropriate options, as well as recording the player's answer\n let ans = readLine.keyInSelect(options, myYellow(\"Q\"+qNo+\". \"+quesText+\" ?\"));\n addNewLine();\n \n // Checking if selected answer is the correct one or not \n if(options[ans] === answer) {\n console.log(myBlue(myYellowAndBlue(\"Gotcha!\"), \"That's correct !\"));\n addNewLine();\n console.log(myYellow.bold.italic(metaInfo));\n // If player's answer is correct, he gets full points that are specified for that question \n return pointsAwarded;\n }\n // If player's selected options is not the correct answer\n else {\n // If player selected '0' in order to cancel, his quiz is aborted at the same time\n if(ans === -1) {\n endQuizInMid(score);\n }\n // Otherwise he just chose an incorrect option\n console.log(pokeRed(myYellowAndRed(\"Oops!\") ,\"That doesn't sound right.\"));\n // If player fails to answer the question correctly, he gets 0.\n return 0;\n }\n}", "function checkanswer(arrayname, qnumber) {\n\t//Indicate Selected Answer\n\t$('#answers').on('mousedown', '.anschoice',function() {\n\t\t$(this).removeClass().addClass('select');\n\t\t$(this).siblings().removeClass().addClass('anschoice');\n\t});\n\t//Change selected choice back to original\n\t$('#answers').on('mousedown', '.select',function() {\n\t\t$(this).removeClass().addClass('anschoice');\n\t});\n\t//Below determines what to do when next button clicked\n\t$('#next').mousedown(function() {\n\t\t//Make sure a choice is selected!\n\t\tvar userselect = $('.select').text();\n\t\tconsole.log('userselect is: ' + userselect);\n\t\tif ( userselect === '') {\n\t\t\tconsole.log('Please select a choice!');\t\n\t\t\t$('#next').avgrund({\n\t\t\t\ttemplate: '<p> Please select a choice! </p>'\n\t\t\t});\n\t\t}\n\t\telse { // Check answer\n\t\t\tif (userselect === arrayname[qnumber].correctAnswer) {\n\t\t\t\tcorrect++;\n\t\t\t\tconsole.log('The user is correct! ' + correct);\n\t\t\t}\n\t\t\telse { \n\t\t\t\tconsole.log('user is wrong');\n\t\t\t\tconsole.log('#correct is: ' + correct);\n\t\t\t\tconsole.log(userselect + ' vs. ' + arrayname[qnumber].correctAnswer);\n\t\t\t}\n\t\t\t// Move on to the next question\n\t\t\tqnumber++;\n\t\t\tinsertquestion(arrayname, qnumber);\n\t\t\tconsole.log('qnumber from checkanswer is now ' + qnumber);\n\t\t\ttheend(qnumber, correct, arrayname);\n\t\t}\n\t\t});\n}", "function checkAnswer() {\n // checks the iput against the correct answer\n var answer = document.getElementById('answer').value;\n if (answer == correctAnswer || event.which === 13) {\n points++;\n moveCar()\n pointsDisplay.innerHTML = points;\n return 'Well done! your answer is right. Keep Moving!';\n } else if (answer !== correctAnswer) {\n points--;\n moveCar();\n pointsDisplay.innerHTML = points;\n return 'Damn! your answer is wrong.';\n }\n}", "function showQuestion() {\n\t$('#answer').text(''); // Reset user input\n\t$('#answer').focus();\n\t$('#question').text(questionNumber + '. ' + Questions[questionIndex][0]); // Print question\n\tquestionNumber++;\n}", "function answer() {\n let parentSection = this.parentElement.parentElement;\n if (this.textContent === \"Go back to Menu\") {\n backToMenu();\n } else if (this.textContent === \"Play Again\") {\n playAgain(parentSection);\n } else {\n let correct = false;\n let noteTag = gen(\"p\");\n for (let i = 0; i < CORRECT_ANSWER.length; i++) {\n if (CORRECT_ANSWER[i] === this.textContent) {\n noteTag.textContent = \"Correct !\";\n noteTag.classList.add(\"correct\");\n parentSection.appendChild(noteTag);\n correct = true;\n }\n }\n if (!correct) {\n noteTag.textContent = \"Wrong !\";\n noteTag.classList.add(\"wrong\");\n parentSection.appendChild(noteTag);\n }\n setTimeout(() => nextQuestion(parentSection), WAITING_TIME);\n }\n }", "function checkAnswer(choice){\n if(choice === correctA[currentQ]){\n alert('Great Job!');\n currentQ ++;\n writeQ()\n }else{\n alert('Wrong answer! Try again!');\n time -= 5;\n }\n }", "function nextQuestion(){\n\t\t$(\"#question\").show();\n\t\t$(\".choice\").show();\n\t\t$(\"#solutionDiv\").hide();\n\t\tstopwatch.reset();\n\t\tquizGo(i++);\n\t}", "function nextQuestion(event) {\n\n\n // condition uses click event to add to user score if correct ansser is made //\n if (event.target.value === questions[currentQuesIndex].correctAns) {\n score++;\n } else {\n time -= 5;\n counter.textContent = time + \" Seconds left on quiz.\";\n }\n\n\n\n // Condition executes next question\n if (currentQuesIndex < questions.length) {\n currentQuesIndex++;\n // moves to next section once condition is met\n } if (currentQuesIndex === questions.length) {\n\n quizEl.style.display = \"none\";\n // this function call takes user to results section\n quizResults();\n return;\n\n }\n showQuestion();\n}", "function nextQuest() {\n\n theQuestion = qArr.next().value\n choices = chArr.next().value;\n answers = Object.keys(choices).map(function (c) {\n return '<li data-answer=' + c + ' class=\"\">' + choices[c] + '</li>'\n })\n $('.question').html(theQuestion)\n $('.answerList').html(answers);\n $(\"#correctedAnswer\").empty()\n $('#gif').empty()\n $('.answerList').show();\n // Reset if out of time.\n if (timerOutOfTime) {\n timerOutOfTime = 0;\n }\n\n if (wrongAnswerClicked) {\n $(\"#timeLeft\").show();\n wrongAnswerClicked = 0;\n }\n }", "function checkAnswer() {\n event.preventDefault(); \n\n if (event.target.textContent === questions[currentQuestionIndex].answer) {\n correctSnd.play(); //Yes, this is Captain Falcon\n feedbackEl.textContent = \"Correct!\";\n score = score + 10;\n } else {\n wrongSnd.play();\n feedbackEl.textContent = \"Wrong!\"\n secondsTime -= 15;\n }\n //Makes sure to go through each question\n if (currentQuestionIndex < questions.length - 1) {\n currentQuestionIndex++;\n getQuestion();\n } else { //If on the last question the quiz will display the end screen\n endQuiz();\n }\n}", "function nextQuestion() {\n currentQuestion++;\n \n if (currentQuestion < quiz.length) {\n displayQuestion();\n } else {\n showResult();\n }\n }", "function nextQuestion() {\n\t\tqCounter++;\n\t\t// clears previous selection\n\t\t$(\"input[name='choice']\").prop(\"checked\", false);\n\n\t\t// checks to see if qCounter is equal to 10\n if (qCounter == 10) {\n\t \tstopwatch.stop();\n\t $(\"#main\").hide();\n\t $(\"#end\").show();\n\t $(\"#final-score\").html(\"<h2>You got \" + correct + \" out of \" + questions.length + \" questions correct!\");\n }\n\n //calls displayQuestions\n stopwatch.stop();\n displayQuestions();\n }", "function qnasection(){\n\tWait(1000);\n\tR(\"My story ends here.\");\n\tR(\"Is there any questions?\");\n\tp(\"Do you ever regret it?\");\n\n\tR(\"I wonder what you’re asking exactly...\");\n\tp(\"Didn’t you make that words..?\");\n\tR(\"What?\");\n\tR(\"identifying myself as transgender, starting hormonal therapy, and getting surgeries?\");\n\tR(\"Coming out to my mom?\");\n\tR(\"Briefly speaking, I don’t regret neither of them.\");\n\tR(\"As I said before,\");\n\tp(\"You will not change your decision?\");\n\tR(\"I will not change--\");\n\tR(\"Yeah, that.\");\n\tR(\"I am still faced with difficulties,\");\n\tR(\"but at least I can say confidently that it’s better than before.\");\n\tR(\"Of course, It’s not that I am not terribly happy right now...\");\n\tR(\"It was just too hard before all this...\");\n\n\tR(\"Anyways, thanks for running along with me all the way here!\");\n\tR(\"I wish you all the best.\");\n\tWait(1000);\n\tShow(\"nurse\",\"nurse\");\n\tf(\"D-D, let my replace your IV.\");\n\tWait(1500);\n\tfinale_tw();\n}", "function q4() {\n\n var answerToFourthQ = prompt('Will I eventually become an effective front end web developer?').toUpperCase();\n\n if (answerToFourthQ === 'Y' || answerToFourthQ === 'YES') {\n alert('Correct! Let\\'s keep going!');\n }else if (answerToFourthQ === 'N' || answerToFourthQ === 'NO') {\n alert('Um, ya dun goofed!');\n }else{alert('Please type accurately! Answer YES or NO!')};\n\n}", "function answersQuestionPrint() {\n questionChooser();\n answerChooser(currentQuestion);\n }", "function theend(qnumber, correct, arrayname) {\n\tif (qnumber === 6) {\n\t\tconsole.log('The quiz is over!');\n\t\t$('#next, #qnum').hide();\n\t\tif (correct <= 3) {\n\t\t\t$('<h3> You got ' + correct + ' right. :( Try again! </h3>').insertAfter('#violet');\n\t\t}\n\t\telse if (correct >= 4 && correct < 6) {\n\t\t\t$('<h3> You got ' + correct + ' right! :) Try again! </h3>').insertAfter('#violet');\n\t\t}\n\t\telse {\n\t\t\t$('<h3> Awesome! You got them all right!</h3>').insertAfter('#violet');\n\t\t}\n\t\t$('#flag').show();\n\t}\n\t//Need to allow for reset!\n\t$('#reset').mousedown(function() {\n\t\tlocation.reload();\n\t});\n}", "function checkAnswer() {\n if (document.getElementById(\"true\").selected) {\n processAnswer(\"true\");\n }\n else {\n processAnswer(\"false\");\n }\n // get next question if not asked all yet\n if (questionsAsked < 10) {\n setQuestion();\n }\n // final question asked show prompt.\n else {\n alert(\"Quiz complete! You got \" + totalCorrect + \" correct out of 10.\");\n\n }\n\n // update totals\n document.getElementById(\"qnr\").innerHTML = \"Question:\" + questionsAsked;\n document.getElementById(\"score\").innerHTML = \"Score:\" + totalCorrect;\n\n}", "function Question(){\n console.log(cQ)\n console.log(correct);\n\t\t$(\".answer\").show();\n\t\t$(\"#Question\").show();\n $(\"#Question\").text(questions[cQ].currentQ);\n $(\"#A\").text(questions[cQ].aA);\n $(\"#B\").text(questions[cQ].aB);\n $(\"#C\").text(questions[cQ].aC);\n $(\"#D\").text(questions[cQ].aD);\n var answerCheck = (questions[cQ].answer);\n $(\"#A\").unbind('click').click(function() {\n answer = $(\"#A\").text();\n if(answer == answerCheck){\n console.log(\"Yay\");\n correct ++;\n cQ ++;\n }else{\n cQ ++;\n }\n if (cQ >= 5){\n end();\n }else{\n Question();\n }\n });\n $(\"#B\").unbind('click').click(function() {\n answer = $(\"#B\").text();\n if(answer == answerCheck){\n console.log(\"Yay\");\n correct ++;\n cQ ++;\n }else{\n cQ ++;\n }\n if (cQ >= 5){\n end();\n }else{\n Question();\n }\n });\n $(\"#C\").unbind('click').click(function() {\n answer = $(\"#C\").text();\n if(answer == answerCheck){\n console.log(\"Yay\");\n correct ++;\n cQ ++;\n }else{\n cQ ++;\n }\n if (cQ >= 5){\n end();\n }else{\n Question();\n }\n });\n $(\"#D\").unbind('click').click(function() {\n answer = $(\"#D\").text();\n if(answer == answerCheck){\n console.log(\"Yay\");\n correct ++;\n cQ ++;\n }else{\n cQ ++;\n }\n if (cQ >= 5){\n end();\n }else{\n Question();\n }\n });\n\t}", "function nextQuestion() {\n resetState()\n showQuestion(getRandomQuestion[questionIndex])\n}", "function answer() {\n $(\"#aContainer\").empty();\n $(\"#question\").html(\"The answer was:<br>\" +\n (qnA[questionNumber]\n [qnA[questionNumber]\n [qnA[questionNumber].length - 1]\n ]));\n clearInterval(countdown);\n }", "function ansClick(e) {\n if(qIndex >= (questions.length - 1)) {\n postScore();\n } else {\n var currentQuestion = questions[qIndex];\n var ansClick = e.target.textContent;\n if(ansClick.toLowerCase() === currentQuestion.answer.toLowerCase()) {\n currentScore+= 5;\n } else {\n time -= 10;\n currentScore -= 5;\n }\n qIndex++;\n getQuestion();\n };\n}", "function choseAnswer(){\n var qnAnswered = false;\n var answerChosen = event.currentTarget; //get object being listened to\n event.preventDefault();\n while (!qnAnswered){\n document.getElementById(\"qnResult\").textContent = \"\"; // reset correct/incorrect message\n \n // correct / incorrect answer logic\n if (numQuestion == 1 && answerChosen.innerText == \"Alerts\"){ // question 1\n console.log(answerChosen.innerText);\n document.getElementById(\"qnResult\").textContent = \"Correct!\";\n qnAnswered = true;\n }\n else if (numQuestion == 1 && answerChosen.innerText != \"Alerts\"){\n console.log(answerChosen.innerText);\n document.getElementById(\"qnResult\").textContent = \"Incorrect!\";\n timeLeft -= 15;\n qnAnswered = true;\n }\n if (numQuestion == 2 && answerChosen.textContent == \"Parentheses\"){ // question 2\n console.log(answerChosen.textContent); \n document.getElementById(\"qnResult\").textContent = \"Correct!\";\n qnAnswered = true;\n }\n else if (numQuestion == 2 && answerChosen.textContent != \"Parentheses\"){\n console.log(\"incorrect\");\n document.getElementById(\"qnResult\").textContent = \"Incorrect!\";\n timeLeft -= 15;\n qnAnswered = true;\n }\n if (numQuestion == 3 && answerChosen.textContent == \"All of the above\"){ // question 3\n console.log(answerChosen.textContent);\n document.getElementById(\"qnResult\").textContent = \"Correct!\";\n qnAnswered = true;\n }\n else if (numQuestion == 3 && answerChosen.textContent != \"All of the above\"){\n console.log(\"incorrect\");\n document.getElementById(\"qnResult\").textContent = \"Incorrect!\";\n timeLeft -= 15;\n qnAnswered = true;\n }\n if (numQuestion == 4 && answerChosen.textContent == \"Quotes\"){ //question 4\n console.log(answerChosen.textContent);\n document.getElementById(\"qnResult\").textContent = \"Correct!\";\n qnAnswered = true;\n }\n else if (numQuestion == 4 && answerChosen.textContent != \"Quotes\"){\n console.log(\"incorrect\");\n document.getElementById(\"qnResult\").textContent = \"Incorrect!\";\n timeLeft -= 15;\n qnAnswered = true;\n }\n if (numQuestion == 5 && answerChosen.textContent == \"Console.log()\"){ //question 5\n console.log(answerChosen.textContent);\n document.getElementById(\"qnResult\").textContent = \"Correct!\";\n qnAnswered = true;\n }\n else if (numQuestion == 5 && answerChosen.textContent != \"Console.log()\"){\n console.log(\"incorrect\");\n document.getElementById(\"qnResult\").textContent = \"Incorrect!\";\n timeLeft -= 15;\n qnAnswered = true;\n }\n }\n if (timeLeft < 0){ // try not let time go negative\n timeLeft = 0;\n console.log(\"time negative\");\n }\n if (qnAnswered && numQuestion < 5){\n numQuestion += 1; // move on to next question\n poseQuestion(numQuestion);\n }\n else if (numQuestion == 5){ // stop quiz\n console.log(\"Question limit triggered\");\n isPlaying = false;\n }\n}", "function nextQuestion() {\n $(\"#button-0\").show();\n q++;\n\n if (q < quizQuestions.length) {\n $(\"#button-0\").html(\"Next Question\")\n .click(startQuiz);\n }\n else {\n $(\"#button-0\").html(\"End Quiz\")\n .off(\"click\")\n .click(endQuiz);\n }\n}", "function selectAnswer() {\n //if right answer show correct, and log score\n if (questions[questionNumber].answer === userAnswer) {\n win();\n stop();\n questionNumber++;\n // wait to start next question\n nextQuestion();\n }\n //if wrong answer show correct and log score\n else {\n lose();\n stop();\n questionNumber++;\n // wait to start next question\n nextQuestion();\n }\n}", "function clickFunction() {\n qIndex = qIndex + 1;\n if (qIndex < questions.length && this.textContent === currentQuestion.correctAnswer) {\n score = score + 100;\n displayBox.textContent = \"Correct!\"\n askQuestion();\n } else if (qIndex === questions.length && this.textContent === currentQuestion.correctAnswer) {\n score = score + 100;\n displayBox.textContent = \"Correct!\"\n endGame();\n } else if (qIndex < questions.length && this.textContent !== currentQuestion.correctAnswer) {\n timerCount = timerCount - 10;\n displayBox.textContent = \"Incorrect\";\n askQuestion();\n } else if (qIndex === questions.length && this.textContent !== currentQuestion.correctAnswer) {\n timerCount = timerCount - 10;\n displayBox.textContent = \"Incorrect\";\n endGame();\n }\n}", "function nextQuestion(e) {\n var isCorrect = e.target.getAttribute(\"data-correct\");\n //take away time if they choose the wrong answer and shake elements\n if (!isCorrect) {\n timer -= 12;\n $questionBox.addClass('shake');\n $timer.addClass('shakeTime');\n setTimeout(() => {\n $questionBox.removeClass('shake');\n $timer.removeClass('shakeTime');\n }, 300)\n //otherwise, bounce the question box\n } else {\n $questionBox.addClass('bounce');\n setTimeout(() => {\n $questionBox.removeClass('bounce');\n }, 300);\n }\n //update progress bar\n updateProgress(isCorrect);\n qNumber++;\n //if you have reached the end of the questions, end the quiz\n qNumber < questions.length ? loadQuestion(questions, qNumber) : endQuiz();\n }", "function Answer() {\r\n // var val = 0;\r\n pressed = pressed.replace(\"x\", \"*\");\r\n pressed = eval(pressed) + \"\";\r\n refreshDisplay();\r\n }", "function showNext(){\n\n // if(index >=(questions.length - 1)){\n // showResult(0);\n // return;\n // }\n if(index>=8){\n $(\"#Next\").text(\"Finish\");\n }\n\n if(index >=9){\n alert(\"Press ok to get result\")\n showResult(0);\n return;\n \n }\n\n index++;\n\n $(\".optionBox span\").removeClass();\n $(\".optionBox span\").attr(\"onclick\",\"checkAnswer(this)\");\n\n\n printQuestion(index);\n \n\n}", "function displayAnswer(event) {\n //showing answer corresponding to the question\n if (count1===count2+1){\n document.getElementById(\"answer\").innerHTML = questions[count2%3].answer;\n count2=count1;\n }\n //asking the user to click the question button first\n else {\n document.getElementById(\"answer\").innerHTML = \"Please click the question first.\";\n count2=count1;\n }\n}", "function q1() {\n\n var answerToFirstQ = prompt('Was I born in the United States?').toUpperCase();\n\n if (answerToFirstQ === 'N' || answerToFirstQ === 'NO') {\n alert('Correct! Looks like you actually read the bio!');\n userScore++\n }else if (answerToFirstQ === 'Y' || answerToFirstQ === 'YES') {\n alert('Um, ya dun goofed!');\n }else{alert('Please type accurately! Answer YES or NO!')};\n\n}", "function nextQuestion() {\n\t$(\"#correct-display\").hide();\n\t$(\"#wrong-display\").hide();\n\t$(\"#oOT-display\").hide();\n\t$(\"#question-container\").show();\n\t$(\"#choices\").show();\n\tcurrentQuestion++;\n\tif (currentQuestion == questions.length) {\n\t\tresults();\n\t} else {\n\t\ttime();\n\t\trun();\n\t\t$(\"#question-container\").html(questions[currentQuestion].question);\n\t\t$(\"#a\").html(questions[currentQuestion].choices[0]);\n\t\t$(\"#b\").html(questions[currentQuestion].choices[1]);\n\t\t$(\"#c\").html(questions[currentQuestion].choices[2]);\n\t\t$(\"#d\").html(questions[currentQuestion].choices[3]);\n\t}\n}", "function nextQuestion(event) {\n event.preventDefault();\n questionCounter++;\n render(questionCounter);\n answerButtons.appendChild(line);\n answerButtons.appendChild(responseAlert);\n\n // Alert correct or wrong\n if (\n event.target.textContent.slice(3) ===\n questionAndAnswer[questionCounter - 1].correctAnswer\n ) {\n responseAlert.textContent = \"Correct!\";\n } else {\n responseAlert.textContent = \"Wrong!\";\n timeLeft = timeLeft - 10;\n }\n}", "function answer(x) {\n if (x != 0) {\n if (answerKey[this.question - 1][x] == 1) {\n this.correct++;\n this.isCorrect = true;\n }\n if (answerKey[this.question - 1][x] == 0) {\n this.wrong++;\n this.isCorrect = false;\n }\n clearInterval(interval);\n gifDisplay(this.isCorrect);\n setTimeout(hideGif, 1000 * 3);\n setTimeout(printQuestion, 1000 * 3);\n }\n}", "function checkAnswer() {\n const answer = currentUserAnswer(); // answerVal.value\n if (answer.toLowerCase() !== null && answer.toLowerCase() === newArrayQuestions[index].answer) {\n userPuntos(index, 1, 1);\n changeCorrectAnswerLetterColor();\n if (soundToggleChekbox) {\n playCorrectAnswerSound();\n }\n } else {\n userPuntos(index, 0, 1);\n changeIncorrectAnswerLetterColor();\n if (soundToggleChekbox) {\n playNoCorrectAnswerSound();\n }\n }\n showScores();\n checkArrayQuestionsForFin();\n if (rankingTable.classList.contains(\"hideElement\")) { // If the game has not been stopped\n updateLetter();\n updateAnswer(); // answerVal.value = ''\n changeActivLetterColor();\n showNextQuestion();\n }\n}", "function showNextQ(){\n resetState()\n if(questionsShuflle.length < questionIndex + 1){\n stopTimer();\n showScore = score + timeRemaing;\n highscoreBtn.classList.add('hide');\n timerEl.classList.add('hide');\n questionEl.classList.add('hide');\n answersEl.classList.add('hide');\n rightOrWrongEl.classList.add('hide');\n doneHEl.classList.remove('hide');\n donePEl.classList.remove('hide');\n donePEl.innerText = ('Your final score is ' + showScore);\n enterIEl.classList.remove('hide');\n inputEl.classList.remove('hide');\n submitEl.classList.remove('hide');\n }else {\n rendorQuestion(questionsShuflle[questionIndex])\n }\n}", "function nextQuestion(){\n $(\"#alerts\").hide();\n       currentQuestion = triviaQuestions[currentQuestionIndex + 1];\n       currentQuestionIndex++;\n if (currentQuestionIndex >= 10) {\n $(\"#alerts\").html(\"<h2> Nice job! Click the Start 90s Trivia button to play again! <br> Questions Correct: \" + correctAnswers.length + \" <br> Questions Incorrect: \" + incorrectAnswers.length + \" </h2>\");\n $(\"#alerts\").show();\n stopTimer();\n } else {\n       displayQuestion(currentQuestion);\n };\n    }", "function q3() {\n\n var answerToThirdQ = prompt('Am I currently an effective front end web developer?').toUpperCase();\n\n if (answerToThirdQ === 'N' || answerToThirdQ === 'NO') {\n alert('Correct! You\\'re a savant!');\n }else if (answerToThirdQ === 'Y' || answerToThirdQ === 'YES') {\n alert('Um, ya dun goofed!');\n }else{alert('Please type accurately! Answer YES or NO!')};\n\n}", "function nextQuestion(){\t\n\t\thideAnswerBox();\n\t\tremovePosters();\n\t\tstopAudio();\n\t\tquestionCount++;\n\t\t\n\t\tif (questionCount > 9) {\n\t\t\tendGame();\n\t\t\tshowOverlay($('.endGame'));\n\t\t}\n\t\telse if (questionCount > 4 && gameCount < 1) {\n\t\t\tendRound();\n\t\t\tshowOverlay($('.end_round'));\n\t\t}\n\t\telse {\n\t\t\tupdateQuestion();\n\t\t\tplayAudio();\n\t\t}\n\t}", "function checkUserChoice(event) {\n event.preventDefault();\n var userChoice = event.target.textContent;\n var correctAnswer = getAnswer();\n\n if (userChoice === correctAnswer) {\n questionIndex++;\n userScore++;\n correctQuestions.textContent = userScore;\n correctAnwerMsg();\n \n if (questionIndex >= questions.length){\n return endGame();\n }\n clearCurrentQuestion();\n displayCurrentQuestion();\n\n } else {\n questionIndex++;\n incorrectAnswerMsg();\n if (questionIndex >= questions.length){\n return endGame();\n }\n clearCurrentQuestion();\n displayCurrentQuestion();\n }\n}", "function Qnext() {\n $(\"#prompt\").text(\"\");\n $(\"#options\").empty();\n if (qIndex < qList.length) {\n $(\"#prompt\").text(\"Q\" + (qIndex + 1) + \":\" + qList[qIndex].question);\n $(\"#options\").append($(\"<button class='button' id='true' style='background-color:#4CAF50'>TRUE</button>\"));\n $(\"#options\").append($(\"<button class='button' id='false' style='background-color:#f44336'>FALSE</button>\"));\n }\n}", "function correct() {\n awnsered[chosen-1] = true;\n awnsered[chosen] = true;\n nextQuestion();\n}", "function answerIsCorrect() {\n correctAnswerFeedback();\n nextQuestion();\n addToScore();\n}", "function answerQ () {\n let val = document.getElementById('answer');\n \n if (val === '') { alert('Mohon jawab dulu!'); generateAngka(); }\n \n if (val === ops) { alert('Jawaban kamu benar!\\nMembuat pertanyaan baru lagi..'); generateAngka(); }\n}", "function questionClick() {\n // check if guessed wrong\n \n if (this.value !== questions[currentQuestionIndex].correct) {\n //penalize time\n time -= 10;\n\n if (time < 0) {\n time = 0;\n }\n\n // display new time on page\n timerCountdown.textContent = time;\n\n feedbackKey.textContent = \"Wrong!\";\n } if (this.value == questions[currentQuestionIndex].correct) {\n //Give extra time\n time += 10;\n\n if (time < 0) {\n time = 0;\n }\n\n // display new time on page\n timerCountdown.textContent = time;\n feedbackKey.textContent = \"Correct!\";\n };\n\n // flash right/wrong feedback on page\n feedbackKey.setAttribute(\"class\", \"key\");\n setTimeout(function() {\n feedbackKey.setAttribute(\"class\", \"key hide\");\n }, 1000);\n\n // move to next question\n currentQuestionIndex++;\n\n // check if we've run out of questions\n if (currentQuestionIndex === questions.length) {\n quizEnd();\n } else {\n getQuestion();\n }\n}", "function evalAnswer() {\n console.log(\"chose: \" + this.value);\n console.log(\"answer was: \" + questions[Q].answer)\n if (this.value === questions[Q].answer) {\n console.log(\"correct\");\n secondsLeft += 5;\n score++;\n\n\n }\n else {\n console.log(\"wrong\");\n secondsLeft -= 10\n }\n \n // ending the quiz portion and stopping the clock\n if (Q === (questions.length - 1)) {\n endGameCard();\n clearInterval(timerInterval);\n }\n else {\n Q++;\n buildQuestionCard()\n }\n}", "function checkAnswer(event) {\n // Because the event has been passed in the function, we can call the event\n // and preventDefault() behavior\n // Therefore, it will wait for a button push before executing the function\n event.preventDefault();\n\n var buttonSelected = this.id;\n console.log(buttonSelected);\n\n // variable for the correctChoice (aka, the correctAnswer from the questions object)\n var correctChoice = \"button\" + questions[currentQuestion].correctAnswer;\n\n if (buttonSelected === correctChoice) {\n console.log(\"Correct\");\n }\n else if (buttonSelected != correctChoice) {\n console.log(\"Incorrect\");\n // Subtracing 10 seconds of time from the if the answer was incorrect\n // Won't subtract lower than value of 0\n if (timeRemaining > 0) {\n if (timeRemaining - 10 <= 0) {\n return;\n }\n else {\n timeRemaining -= 10;\n }\n }\n }\n // increase the value of currentQuestion by 1\n currentQuestion++\n // Depending on the value of currentQuestion...\n // runQuiz again, which will now cycle through to the next question\n // OR\n // run the endRoutine, which will display results\n if (currentQuestion <= (questions.length - 1)) {\n runQuiz();\n }\n else if (currentQuestion > (questions.length - 1)) {\n endRoutine();\n }\n}", "function ask(question){\n\t\t\tconsole.log(\"ask() called\");\n\t\t\tupdate($question, quiz.question + question);\n\t\t\t$form[0].value = \"\";\n\t\t\t$form[0].focus();\n\t\t}", "function answerClick(x) {\n var answer = questions[questionCounter].answer;\n showAnswer(x == answer);\n if (x !== answer) {\n time -= wrongAnswerPenalty;\n showTime();\n }\n questionCounter ++;\n if (questionCounter < questions.length) {\n getQuestions();\n }\n else {\n showEndScreen();\n }\n}", "function nextQuestion() {\n\n}", "function nextQuestion(){\n if(runningQuestion < lastQuestion){\n runningQuestion++;\n showQuestion();\n } else{\n endQuiz();\n }\n}", "function nextQuestion(upOrDown) {\r\n if (subjects.length - 1 != qstNum) {\r\n if (upOrDown != \"up\") {\r\n qstNum--;\r\n } else {\r\n qstNum++;\r\n document.getElementById(\"questionW\").checked = false;\r\n }\r\n question();\r\n } else {\r\n document.getElementById(\"questionW\").style.visibility = \"hidden\";\r\n document.getElementById(\"questionWeight\").style.visibility = \"hidden\";\r\n checkAnswers();\r\n }\r\n}", "function nextQuestion() {\n resetTime();\n setTimeout(function() {\n clearScreen();\n answersQuestionPrint();\n }, 3000);\n }", "function checkAnswer(selected){\n let rightAnswer = questionsArray[questionCounter].correctAnswer;\n \n if(selected === rightAnswer){\n score++;\n displayPopup(true, rightAnswer);\n } \n else{\n displayPopup(false, rightAnswer);\n }\n}", "function promptUser() {\n if (counter < 8) {\n console.log(gameWord.displayWord());\n inquirer\n .prompt([\n {\n type: \"input\",\n name: \"letter\",\n message: \"\\n Pick a letter and press enter.\"\n }\n ])\n .then(function(data) {\n checkAnswer(data);\n });\n } else {\n console.log(\"\\n Sorry, you ran out of guesses.\\n\".red);\n console.log(`The correct answer was ${chosenWord}`.bgGreen);\n chosenWord = \"\";\n gameWord = \"\";\n select = 0;\n counter = 0;\n startGame();\n }\n}", "function nextQuestion() {\n\n if (currentQuestion < lastQuestion) {\n currentQuestion++;\n showQuestion();\n } else {\n endQuiz();\n }\n}", "function nextQuestion() {\n\tif (question_counter < questions.length - 1) {\n\t\tquestion_counter++;\n\t\tquestion_button_default.style.display = \"none\";\n\t\tquestion_button_default.classList.remove('btn--wrong')\n\t\tquestion_button_default.classList.remove('btn--correct')\n\t\tshowQuestions(question_counter)\n\t} else {\n\t\tconsole.log('> No more questions: Staph');\n\t\tshowResultBox();\n\t}\n}", "function doAnswer() {\r\n\tif(checkAnswer()) {\r\n\t\tdocument.getElementById(\"err\").innerHTML = \"\";\r\n\t\tdocument.getElementById(\"notif\").innerHTML = \"CORRECT\";\r\n\t} else {\r\n\t\tdocument.getElementById(\"notif\").innerHTML = \"\";\r\n\t\tdocument.getElementById(\"err\").innerHTML = \"MISTAKE\";\r\n\t}\r\n\t//\tclear all user input text\r\n\tdocument.getElementById(\"answer\").value = \"\";\r\n\t\r\n\t//\tFocus on input\r\n\tdocument.getElementById(\"answer\").focus();\r\n}", "function correct() {\n score +=20\n nextQuestion();\n}", "function checkAnswerA(){\n if(quizQuestions[currentQuestion].correctChoice === li1.value){\n p.textContent = \"Correct!\"\n } else { \n p.textContent = \"Oops! Maybe next time.\"\n secondsRemaining = secondsRemaining - 10;\n };\n currentQuestion++;\n if (currentQuestion > quizQuestions.length - 1){\n quizEl.style.display = \"none\";\n displayHighscore();\n return;\n } \n displayQuestions();\n}", "function questionChecker() {\n if (theQuestion == triviaQuestions.length) {\n \n $(\"#question\").text(`Your Results!`);\n $(\"#image\").hide() \n hideText();\n \n clearInterval(interval);\n \n gameStart = false;\n theQuestion = 0; \n \n \n $(\"#intro\").show().text(`You can play again by clicking the button below`)\n $(\"#button\").show().text(`Play again? Click here!`)\n $(\".stats\").show()\n $(\"#correct\").show().text(`${correctAnswers}`)\n $(\"#incorrect\").show().text(`${incorrectAnswers}`)\n $(\"#unanswered\").show().text(`${unansweredQuestions}`)\n }\n }", "function nextQuestion(){\n console.log('Next Question fired..')\n if((triviaQuestions.length -1) === currentQuestion){\n triviaResult()\n } \n else {\n currentQuestion++;\n $(\"#currentQuestion\").empty();\n displayQuestion()\n }\n}", "function answer(answer) {\n // Stop and reset the timer\n stopTimer();\n\n // If answer is wrong, show wrong answer screen\n if (answer.target.value != triva[q].correctAnswer) {\n console.log(\"Wrong\");\n // If answer is wrong, add to wrong answers\n wrong++;\n unanswered--;\n \n \n trivaCard.style.display = \"none\"; // Hide question & answers\n timer.style.display = \"none\" // Hide timer\n gif.src = \"assets/images/wrong.gif\" // Set gif src to the needed gif\n gifCard.style.display = \"block\"; // Show the gif\n \n // Show the right answer\n switch (triva[q].correctAnswer) {\n case \"a\":\n ifWrong.textContent = \"The Correct Answer Was '\" + triva[q].answers.a + \"'\";\n ifWrong.style.display= \"block\";\n break;\n case \"b\":\n ifWrong.textContent = \"The Correct Answer Was '\" + triva[q].answers.b + \"'\";\n ifWrong.style.display = \"block\";\n break;\n case \"c\":\n ifWrong.textContent = \"The Correct Answer Was '\" + triva[q].answers.c + \"'\";\n ifWrong.style.display = \"block\";\n break;\n case \"d\":\n ifWrong.textContent = \"The Correct Answer Was '\" + triva[q].answers.d + \"'\";\n ifWrong.style.display = \"block\";\n break;\n }\n\n q++;\n // Show next question after 5 seconds\n setTimeout(displayQuestion, 5000);\n }\n\n // If answer is right, show right answer screen\n else if (answer.target.value === triva[q].correctAnswer) {\n console.log(\"Correct!\");\n // If answer is right, add to wrong answers\n correct++;\n unanswered--;\n\n trivaCard.style.display = \"none\"; // Hide question & answers\n timer.style.display = \"none\" // Hide timer\n\n\n switch (q) {\n case 0:\n gif.src = \"assets/images/tvshowCorrect.gif\" // Set gif src to the needed gif\n gifCard.style.display = \"block\"; // Show the gif\n break;\n case 1:\n gif.src = \"assets/images/springfieldCorrect.gif\" // Set gif src to the needed gif\n gifCard.style.display = \"block\"; // Show the gif\n break;\n case 2:\n gif.src = \"assets/images/moesCorrect.gif\" // Set gif src to the needed gif\n gifCard.style.display = \"block\"; // Show the gif\n break;\n case 3:\n gif.src = \"assets/images/herbertCorrect.gif\" // Set gif src to the needed gif\n gifCard.style.display = \"block\"; // Show the gif\n break;\n case 4:\n gif.src = \"assets/images/firstepCorrect.gif\" // Set gif src to the needed gif\n gifCard.style.display = \"block\"; // Show the gif\n break;\n }\n \n q++;\n // Show next question after 5 seconds\n setTimeout(displayQuestion, 5000);\n }\n}", "function displayQuestion(){\n\n //randomize the answer orders\n var rnd = Math.random()*3;\n rnd = Math.ceil(rnd);\n var q1,\n q2,\n q3;\n\n switch(rnd){\n\n case 1:\n q1 = qBank[qNum][1];\n q2 = qBank[qNum][2];\n q3 = qBank[qNum][3];\n break;\n\n case 2:\n q1 = qBank[qNum][3];\n q2 = qBank[qNum][1];\n q3 = qBank[qNum][2];\n break;\n\n case 3:\n q1 = qBank[qNum][2];\n q2 = qBank[qNum][3];\n q3 = qBank[qNum][1];\n break;\n }\n\n //add the questions now\n $(stage).append(\n '<div class = \"questionText\">' + qBank[qNum][0] + '</div>'\n + '<button id=\"1\" class=\"option\">' + q1 + '</div>'\n + '<button id=\"2\" class=\"option\">' + q2 + '</div>'\n + '<button id=\"3\" class=\"option\">' + q3 + '</div>'\n );\n \n $('.option').click(function(){\n //lock the qlock so it cannot be reanswer\n if(qLock==false){\n qLock=true;\n \n //correct answer\n if(this.id==rnd){\n $(stage).append(\n '<div class=\"feedback1\">CORRECT</div>' \n );\n score++;\n }\n \n //wrong answer\n if(this.id!=rnd){\n $(stage).append(\n '<div class=\"feedback2\">WRONG</div>'\n );\n }\n \n setTimeout(changeQuestion, 1000);\n }\n });\n } //end of display question", "function waitForFirstAnswer() {\r\n\t$(window).unbind(\"keypress\");\r\n\tvar answerString = '';\r\n\tvar encryptedString = '';\r\n\t$(window).keypress(function(e) {\r\n\t\tvar key = (e.keyCode) ? e.keyCode : e.which;\r\n\t\tanswerString = answerString + String.fromCharCode(key);\r\n\t\tencryptedString = encryptedString + \"*\";\r\n\t\tif (key == 13) {\r\n\t\t\tif (checkFirstAnswer(answerString)) {\r\n\t\t\t\tcommenceQuestions();\r\n\t\t\t} else {\r\n\t\t\t\tanswerString = '';\r\n\t\t\t\tencryptedString = '';\r\n\t\t\t\t$(\".text-wrapper .automated-text\").html(\"\");\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$(\".text-wrapper .automated-text\").html(answerString);\r\n\t\t}\r\n\t});\r\n\t$(window).keyup(function(e) {\r\n\t\tvar key = (e.keyCode) ? e.keyCode : e.which;\r\n\t\tif (key == 8) {\r\n\t\t\tanswerString = answerString.substring(0, answerString.length-1);\r\n\t\t\t$(\".text-wrapper .automated-text\").html(answerString);\r\n\t\t}\r\n\t});\r\n}", "function tryAgainorNot() {\n if (questionNum === questionLength) {\n showScore();\n } else {\n showQuestion();\n }\n}", "function q5() {\n\n var answerToFifthQ = prompt('Do I have a professional background in Business Administration and Sales?').toUpperCase();\n\n if (answerToFifthQ === 'Y' || answerToFifthQ === 'YES') {\n alert('Correct! Let\\'s keep going!');\n }else if (answerToFifthQ === 'N' || answerToFifthQ === 'NO') {\n alert('Um, ya dun goofed!');\n }\n\n}", "function handleNextQuestion() {\n $('main').on('click', '.js-continue-button', (event) => {\n store.answer = '',\n renderQuizScreen();\n });\n}", "function nextQuestion() {\n if (currentQuestion <= 4) {\n reset();\n displayQuestions();\n displayChoices();\n console.log(currentQuestion);\n } else {\n gameOver();\n }\n}", "function guessChecker(){ //Checks for right or wrong answers\n if (guess === quiz[QPointer].correctLetter){ //correct guess will display yes! screen\n $(\".questionArea\").empty();\n $(\".questionArea\").html(\n `\n <div class=\"timer\">\n Time Left:\n </div>\n <br>\n <div id=\"question\">Yes!</div>\n `\n );\n score++\n qPointer++;\n QPointer = \"q\" + qPointer;\n stop();\n endCheck();\n }\n else{ //wrong guess will display the correct answer\n $(\".questionArea\").empty();\n $(\".questionArea\").html(\n `\n <div class=\"timer\">\n Time Left:\n </div>\n <br>\n <div id=\"question\">Nope.</div>\n <br>\n <div class=\"answers\">\n <div class=\"result\">The correct answer was: ${quiz[QPointer].correctAns}</div>\n </div>\n `\n );\n qPointer++;\n QPointer = \"q\" + qPointer;\n stop();\n endCheck();\n }\n}", "function answerIsCorrect () {\r\n feedbackForCorrect();\r\n updateScore();\r\n}", "function nextQuestion() {\n const isQuestionOver = (triviaQuestions.length - 1) === currentQuestion;\n if (isQuestionOver) {\n displayResult();\n }else{\n currentQuestion++;\n loadQuestion();\n }\n\n }", "function checkAnswer() {\n\t\tif (answerChoice == currentQuestion.rightAnswer) {\n\t\t\t$(\"#hint\").text(currentQuestion.congratulations);\n\t\t\tcurrentQuestion.correct = true;\n\t\t\tupdateScore();\n\t\t} else {\n\t\t\tconsole.log('incorrect');\n\t\t\t$(\"#hint\").text(currentQuestion.sorry);\n\t\t};\n\t}", "function checkAnswer(question, answer) {\n console.log(\"question: \", question);\n console.log(\"answer: \", answer);\n let correctAnswer = questions[question].answer;\n let userAnswer = questions[question].choices[answer];\n if (userAnswer == correctAnswer) {\n index = index + 1;\n console.log(score);\n console.log(\"Correct\");\n }\n // This will allow code to continue even if wrong answer is selcted along with taking away time\n else {\n index = index + 1;\n countDown = countDown - 15;\n score = score - 15;\n console.log(score);\n console.log(\"Next question: \", index);\n console.log(\"Incorrect\");\n }\n clearQuestionDiv();\n renderQuestions();\n quizOver();\n}", "function nextQuestion() {\r\n if (STORE.questionNumber < STORE.questions.length - 1) {\r\n STORE.submittedAnswer = false;\r\n STORE.view = 'question';\r\n STORE.questionNumber++;\r\n }\r\n else {\r\n STORE.view = 'score';\r\n finalScore();\r\n }\r\n}", "function clickOn1(){if(goodAnswer == 1){ correctAnswerClick(1); }else{ badAnswerClick(1); }}", "function nextQuestion() {\n $(\".userAnswer\").remove();\n $(\".answerCheck\").show();\n if (this.id === currentQuestion[2][0]) {\n scoreTracker = scoreTracker + 1;\n $(\".answerCheck\").text(\"correct!\");\n } else {\n $(\".answerCheck\").text(\"incorrect!\");\n timePassed = timePassed + 4;\n }\n\n if (questionPlusAnswer < quizquestions.length - 1) {\n startQuiz();\n } else {\n finalScorePage();\n stopTimer();\n }\n }", "function nextQuestion(){\n clearAnswer();\n questionIndex++;\n\n if (questionIndex < questions.length) {\n displayQuestion(questions[questionIndex]);\n } else {\n gameOver();\n }\n}", "function answerClicked(event) {\n if (currentIndex === questions.length -1){\n console.log(\"ALL DONE!\")\n quizFinished = true;\n highScoreForm()\n }\n else if (event.target.textContent !== questions[currentIndex].correctAnswer) {\n console.log(\"Wrong!\")\n timeLeft = timeLeft - 10;\n timerElement.textContent = timeLeft;\n currentIndex++;\n showQuizQuestion()\n }\n else if (event.target.textContent === questions[currentIndex].correctAnswer) {\n console.log(\"Correct!\")\n currentIndex++;\n showQuizQuestion()\n }\n\n}", "function nextQuestion() {\n\tif (questionNumber < 6) {\n\tquestionNumber++;\n\tshowTriviaGame();\n\tquestionTimer = 30;\n\tgameTimer();\n\t}\n\telse {\n\t\tresultsScreen();\n\t\t$(\"#results\").show();\n\t}\n}", "function genarateQuestion() {\r\n if(quiz.isEnded()){\r\n //showScore\r\n showScore();\r\n } else {\r\n //show question\r\n let element = document.getElementById(\"question\");\r\n element.innerHTML = quiz.getQuestion().question;\r\n\r\n //show choices\r\n let choices = quiz.getQuestion().choices;\r\n\r\n for(let i = 0; i < choices.length; i++) {\r\n let element = document.getElementById(\"choice\" + i);\r\n\r\n element.innerHTML = choices[i];\r\n guessCorrectAnswer(\"choice\" + i, choices[i]);\r\n \r\n }\r\n\r\n showProgress();\r\n \r\n }\r\n}", "function checkAnswer(selectedAnswer) {\n const correctAnswer = quiz[currentQuestion].answer;\n \n if (selectedAnswer === correctAnswer) {\n score++;\n }\n \n currentQuestion++;\n \n if (currentQuestion < quiz.length) {\n displayQuestion();\n } else {\n showResult();\n }\n }", "function displayAnswer() {\n\t\tconsole.log('displayAnswer function start')\n\t\t\n\t\t$('#questionDisplay').hide();\n $('#answerDisplay').animate({height: 'toggle', opacity: '1'}, 1000);\n $(\"#currentQuestion\").html(currentQuestion + 1);\n \n\t\t//stop the timer\n clearInterval(intervalId);\n stop();\n\t\t\n\n\t\t//then check the answer user picked\n\t\t//if the answer is right\n\t\tif (userPick === allQuestions[currentQuestion].correctAnswer){\n\t\t\tconsole.log('you are right');\n\t\t\t//run the right answer function\n\t\t\trightChoice();\n }\n \n\t\t//if the answer is wrong\n\t\telse {\n\t\t\tconsole.log(userPick);\n\t\t\tconsole.log(allQuestions[currentQuestion].correctAnswer);\n\t\t\tconsole.log('you are wrong');\n\t\t\t//run the wrong answer function\n\t\t\tincorrect();\n\t\t}\n\n }", "function nextQandA() {\n\t\tCURRENT_QNUM += 1;\n\t\tvar curQuestion = nextQuestion();\n\t\tvar curAnswers = nextAnswers();\n\t\t\n\t\t// If no questions are left, display results. Else, display next Q&A.\n \t\tif (CURRENT_HP == 0) {\n\t\t\tshowResults(\"Game Over\");\n\t\t\tshowImage(\"img/pogo-revive.png\");\n\t\t\t// hide nav\n\t\t\t$('.navbar-toggle').animate({\n\t\t\t\tbottom: \"-100vh\"\n\t\t\t}, 800, \"swing\", function() {\n\t\t\t});\n\t\t\t$('.collapse').collapse('hide');\n\t\t} else if (curQuestion == \"\") {\n\t\t\tshowResults(\"Results\");\n\t\t\t\n\t\t\t// Medals\n\t\t\tvar medalImage = getMedal();\n\t\t\tshowImage(medalImage);\n\t\t\t\n\t\t} else {\n\t\t\t// Enable navbar toggle\n\t\t\t$('.navbar-toggle').attr(\"data-toggle\", \"collapse\");\n\t\t\t\n\t\t\t// Reallow click event for answers\n\t\t\tFLAG_ACTION = false;\n\t\t\t\n\t\t\tshowQuestion(curQuestion);\n\t\t\tshowAnswers(curAnswers);\n\t\t\tshowImage(\"\");\n\t\t} \n\t}", "function nextQ(){\n\tquestionCount++;\n}", "function confirmAnswer(answer){\n correct = questionsArray[questionOptions].correctAnswer\n if(answer === correct){\n questionOptions++;\n alert(\"You are right!\");\n scoreBoard.textContent = \"Score: \" + score++;\n questionSelect()\n \n }\n else if(answer !== correct){\n questionOptions++;\n alert(\"Wrong answer!\");\n timerSetting -= 5;\n questionSelect()\n \n }\n}", "function q2() {\n\n var answerToSecondQ = prompt('Am I fluent in two languages?').toUpperCase();\n\n if (answerToSecondQ === 'Y' || answerToSecondQ === 'YES') {\n alert('Correct! Let\\'s keep going!');\n }else if (answerToSecondQ === 'N' || answerToSecondQ === 'NO') {\n alert('Um, ya dun goofed!');\n }else{alert('Please type accurately! Answer YES or NO!')};\n\n}", "function quiz(question, choice, answer){ \n //getting user's answer\n var playerAnswer = readlineSync.keyInSelect(choice, question);\n //checkAnswer\n var check;\n if (playerAnswer === answer){\n check = 1;\n score++;\n } else if(playerAnswer === -1){\n check = -1;\n } else{\n check = 0;\n score -= 0.25; \n }\n return check;\n}", "function correctAnswerCheck(){\n if(event.target.textContent===questions[indexPlace].answer){\n correctWrongDisplayEl.textContent=\"\"\n indexPlace++;\n if (indexPlace<=(questions.length-1)){\n correctWrongDisplayEl.textContent=\"\"\n questionGenerator();\n }else {\n rematch();\n }\n }else{\n timeLeft=timeLeft-decreaseTime;\n correctWrongDisplayEl.textContent=\"Wrong!\"\n }\n}" ]
[ "0.775944", "0.7193659", "0.7093905", "0.7076989", "0.7073653", "0.69933707", "0.69909817", "0.69753826", "0.69733995", "0.69618833", "0.6952267", "0.6949442", "0.6943399", "0.69044816", "0.69042665", "0.6892609", "0.68921375", "0.6881337", "0.68490577", "0.68313956", "0.6816594", "0.67993623", "0.6796035", "0.6785516", "0.6780045", "0.6776318", "0.67734677", "0.67706347", "0.6756306", "0.6751123", "0.674053", "0.6732686", "0.6711573", "0.67095816", "0.6699546", "0.6684481", "0.66649103", "0.6657301", "0.66571045", "0.6645862", "0.66451555", "0.6638325", "0.663724", "0.6633796", "0.6627192", "0.66212064", "0.6612393", "0.6610474", "0.65894717", "0.65876293", "0.65861684", "0.6582247", "0.6579057", "0.65737677", "0.657313", "0.6570602", "0.6566619", "0.6555795", "0.6553566", "0.65535456", "0.6542159", "0.6540229", "0.6536758", "0.6535529", "0.65319747", "0.65314275", "0.6525636", "0.6523802", "0.6520792", "0.6520625", "0.65186733", "0.6518635", "0.65150636", "0.6514487", "0.65082055", "0.65075016", "0.65005267", "0.6498364", "0.6496557", "0.6486177", "0.64847887", "0.6480205", "0.64781594", "0.647683", "0.64753336", "0.6474856", "0.6471948", "0.6470266", "0.6468984", "0.6467422", "0.6464693", "0.64620554", "0.6460463", "0.6460007", "0.6459771", "0.6459739", "0.645961", "0.6454334", "0.6450859", "0.64506173" ]
0.66410434
41
function to modify the yaxis ticks
function modifyYaxisName(z){ var notation =[]; for (var i= 0; i<z.length; i++){ notation.push(`OTU ${z[i]}`) } return notation;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function customYAxis( g ) {\n\t\t// move axis to align properly with the bottom left corner including tick values\n\t\tchart.attr( \"transform\", \"translate(\" + ( -chart_margins.left / 2 ) + \", 0)\" )\n\t\tchart.call( yAxis );\n\t\tchart.select( \".domain\" );\n\t\tchart.attr( \"text-anchor\", \"end\" );\n\t\tchart.selectAll( \".tick:not(:first-of-type) line\" ).attr( \"stroke\", \"#777\" ).attr( \"stroke-dasharray\", \"2,2\" );\n\t\tchart.selectAll( \".tick text\" ).attr( \"x\", -4 ).attr( \"dy\", 0 );\n\t} // appends y-axis to chart group", "function customYAxis( g ) {\n\t\t// move axis to align properly with the bottom left corner including tick values\n\t\tg.attr( \"transform\", \"translate(\" + ( -chart_margins.left / 2 ) + \", 0)\" )\n\t\tg.call( yAxis );\n\t\tg.select( \".domain\" );\n\t\tg.attr( \"text-anchor\", \"end\" );\n\t\tg.selectAll( \".tick:not(:first-of-type) line\" ).attr( \"stroke\", \"#777\" ).attr( \"stroke-dasharray\", \"2,2\" );\n\t\tg.selectAll( \".tick text\" ).attr( \"x\", -4 ).attr( \"dy\", 0 );\n\t}", "function drawYAxis() {\n paper.leonardo.vLine(plotArea.x, plotArea.y, plotArea.height);\n\n // TODO: Get rid of magic number. Base text on font size instead.\n var valueX = plotArea.x - opts.tickSize,\n valueTextX = plotArea.x - (3 * opts.tickSize);\n\n plot(scaleValues, function (x, y, value) {\n paper.leonardo.hLine(valueX, y, opts.tickSize);\n paper.text(valueTextX, y, value);\n });\n }", "function drawYAxis() {\n // draw tick marks and labels\n var domain = y1Domain,\n styles = vis.__styles,\n ticks = vis.getYTicks(scales.y, c.h, extendRange, useLogScale);\n\n if (!extendRange && ticks[ticks.length-1] != domain[1]) ticks.push(domain[1]);\n\n if ($('body').hasClass('fullscreen')) {\n theme.horizontalGrid['stroke-width'] = 2;\n }\n\n _.each(ticks, function(val, t) {\n var y = scales.y(val), x = c.lpad;\n if (val >= domain[0] && val <= domain[1] || extendRange) {\n // c.paper.text(x, y, val).attr(styles.labels).attr({ 'text-anchor': 'end' });\n\n // axis label\n vis.label(x+2, y-10, formatter.y1(val, t == ticks.length-1), { align: 'left', cl: 'axis' });\n // axis ticks\n if (theme.yTicks) {\n vis.path([['M', c.lpad-25, y], ['L', c.lpad-20,y]], 'tick');\n }\n // grid line\n if (theme.horizontalGrid) {\n vis.path([['M', c.lpad, y], ['L', c.w - c.rpad,y]], 'grid')\n .attr(theme.horizontalGrid);\n }\n }\n });\n\n // draw axis line\n if (domain[0] <= 0 && domain[1] >= 0) {\n y = scales.y(0);\n vis.path([['M', c.lpad, y], ['L', c.w - c.rpad,y]], 'axis')\n .attr(theme.xAxis);\n }\n }", "function grid_y_axis()\r\n\t{\r\n\t\treturn d3.svg.axis()\r\n\t\t\t.scale(yScale)\r\n\t\t\t.orient(\"left\")\r\n\t\t\t.ticks(y_ticks);\r\n\t}", "function make_y_gridlines() {\t\t\n return d3.axisLeft(yScale)\n .ticks(10)\n }", "function make_y_gridlines() {\n return d3.axisLeft(YScale)\n .ticks(10)\n }", "function make_y_gridlines(yScale, ticks) { \n return d3.axisLeft(yScale)\n .ticks(ticks)\n}", "function make_y_axis() {\n return d3.svg.axis()\n .scale(y)\n .orient(\"left\")\n .ticks(10)\n }", "function make_y_gridlines() {\n return d3.axisLeft(yScale).ticks(10);\n}", "function make_y_axis() {\n return d3.svg.axis()\n .scale(y)\n .orient(\"left\")\n .ticks(5)\n }", "function make_y_gridlines() {\n return d3.axisLeft(yScale)\n .ticks(10)\n }", "function make_y_gridlines() {\n return d3.axisLeft(y)\n .ticks(10);\n }", "function make_y_gridlines() {\n\t\treturn d3.axisLeft(yScale)\n\t\t\t.ticks(5)\n\t}", "function make_y_gridlines() {\t\t\n return d3.axisLeft(y)\n .ticks(5)\n }", "function make_y_gridlines() {\n return d3.axisLeft(y).ticks(5)\n }", "function make_y_gridlines() {\n return d3.axisLeft(y)\n .ticks(5)\n }", "function make_y_gridlines() {\r\n return d3.axisLeft(y)\r\n .ticks(5)\r\n }", "function make_y_gridlines() {\n\t return d3.axisLeft(y)\n\t\t.ticks(11)\n\t}", "function gridYaxis() {\t\t\n return d3.axisLeft(y)\n .ticks(5)\n \n}", "function createYAxis() {\n return d3.svg.axis().scale(that.y).orient('left').ticks(chart.yAxis.tickCount);\n }", "function createYAxis() {\n return d3.svg.axis().scale(that.y).orient('left').ticks(chart.yAxis.tickCount);\n }", "function make_y_gridlines() {\t\t\n \t \treturn d3.axisLeft(yo).ticks(5)\n \t }", "function make_y_axis() {\n return d3.svg.axis()\n .scale(y)\n .orient(\"left\")\n .ticks(5)\n}", "function make_y_gridlines() {\t\t\n return d3.axisLeft(y)\n .ticks( 2*commentTicks )\n }", "function make_y_gridlines() {\t\t\r\n\t\treturn d3.axisLeft(y)\r\n\t\t\t.ticks(5)\r\n\t}", "function make_y_gridlines(yscale, num) {\n return d3.axisLeft(yscale)\n .ticks(num)\n}", "function make_y_gridlines() { \n return d3.axisLeft(y0)\n .ticks(10)\n }", "function make_y_gridlines() {\t\t\n return d3.axisLeft(y)\n .ticks(10)\n}", "function make_y_gridlines() {\t\t\n return d3.axisLeft(y)\n .ticks(10)\n}", "function make_y_gridlines() {\t\t\n return d3.axisLeft(y)\n .ticks(5)\n}", "function make_y_gridlines() {\t\t\n return d3.axisLeft(y)\n .ticks(5)\n}", "function buildYAxis(yScaleFn) {\n return axisLeft(yScaleFn).ticks(10, \"%\");\n }", "function make_y_gridlines() {\n\t\treturn d3.svg.axis()\n\t\t.scale(y)\n\t\t.orient(\"left\")\n\t\t.ticks(10)\n\t}", "function make_y_gridlines() {\t\t\r\n\t return d3.axisLeft(gdat.var1.yScale)\r\n\t .ticks(5)\r\n\t\t}", "_updateYAxis(yMin, yMax){\n if(yMin >= yMax) return;\n\n this.yMin = yMin;\n this.yMax = yMax;\n this.yRange.domain([yMin, yMax]);\n this.svg.select(\".y.axis\").call(this.yAxis); // update svg\n\n this._recalculateDyValues();\n }", "function make_y_gridlines() {\t\t\r\n return d3.axisLeft(y_scale);\r\n}", "function make_y_gridlines() {\n return d3.axisLeft(y)\n .ticks(5)\n}", "function make_y_gridlines() {\n return d3\n .axisLeft(y)\n .ticks(10)\n }", "function yA(data){\n\t\treturn d3.svg.axis()\n\t\t\t.scale(yScales(data))\n\t\t\t.orient(\"left\")\n\t\t\t.ticks(10)\n\t\t\t.tickSize(5,0); //the second argumnet takes the first and last tick off\n\t}", "function make_y_gridlines() {\r\n return d3.axisLeft(yLeft)\r\n }", "function make_y_gridlines() {\r\n return d3.axisLeft(yLeft)\r\n }", "function make_y_grid(y, activity) {\n return d3.svg.axis()\n .scale(y)\n .orient(\"left\")\n .tickValues(getCurrentQuestion(activity).ticksY);\n //.ticks(4)\n}", "function getYaxisOptions(opts, unit, min, max){\r\n\topts.axes.yaxis = {\r\n min: min,\r\n max: max,\r\n numberTicks: 5,\r\n autoscale: true,\r\n label: unit,\r\n tickOptions: {\r\n          angle: 0\r\n },\r\n tickInterval: null\r\n };\r\n opts.seriesDefaults.shadow = true;\r\n opts.seriesDefaults.pointLabels = {show: true};\r\n opts.seriesDefaults.markerOptions.color = 'darkblue';\r\n opts.highlighter.sizeAdjust = 4; \r\n\r\n return opts;\r\n}", "function yScales(data){\n\t\treturn d3.scale.linear()\n\t\t\t\t.domain([0, d3.max(data, function(d){ return +d[this_value]; })])\n\t\t\t\t.range([height, 0])\n\t\t\t\t.nice();\n\t}", "function styleYAxis(selection) {\n // Add classes for tests.\n selection.attr('class', 'chartYAxis');\n\n // These paths are added by d3.axis, but we don't need them.\n selection.selectAll('path')\n .remove();\n\n selection.selectAll('line')\n .attr('class', 'chartYAxisTick__mark');\n\n // Move the text to the left side of the SVG.\n selection.selectAll('text')\n .attr('class', 'chartYAxisTick__text')\n .attr('dx', -(width - marginRight));\n\n // Add small background boxes behind each tick's text.\n // Remove existing boxes first, to avoid duplicates.\n selection.selectAll('rect')\n .remove();\n selection.selectAll('.tick')\n .insert('rect', ':last-child')\n .attr('class', 'chartYAxisTick__background')\n .attr('x', -marginLeft)\n .attr('y', -8)\n .attr('width', marginLeft)\n .attr('height', 15)\n .attr('rx', 2) // Border-radius\n .attr('ry', 2); // Border-radius\n }", "function make_yMajor_gridlines() {\n return d3.axisLeft(y)\n .ticks(yGridLength)\n }", "function drawYGridlines(svg, axis, width, ticks, xStart, attributes) {\n var gridlines = d3.axisRight()\n .tickFormat('')\n .tickSize(width)\n .ticks(ticks)\n .scale(axis.scale());\n\n drawGridlines(svg, gridlines, 'translate(' + xStart + ', 0)', {});\n}", "function fixYaxis(data, yaxisTicks) {\n // If this is the first series to be processed (and therefore the\n // _yaxisTicks_ array is empty)\n if (yaxisTicks.length == 0) {\n // use it to extract the tick values. All the data labels (which will be\n // used as tick values) in all the plotted series must be exactly the\n // same,\n extractTicks(data, yaxisTicks);\n } else {\n // so, if the data labels have already been extracted, every other\n // series' data is checked.\n checkTicks(data, yaxisTicks);\n }\n\n // Once extracted (or checked) the labels, the data can be rewritten in\n // order to be plotted.\n rewriteTicks(data);\n }", "function refreshYDomain() {\n //Find out current time range after zoom.\n let startDate;\n let endDate;\n d3.select(\"#x-axis\").selectAll(\".tick\").each(function (d) {\n if (!startDate || d < startDate) {\n startDate = d;\n }\n\n if (!endDate || d > endDate) {\n endDate = d;\n }\n });\n\n //Get the new value range to rescale y axis.\n let yTop;\n let yBottom;\n data.forEach(function (d) {\n if (d.u >= startDate && d.u <= endDate) {\n if (!yTop || d.h > yTop) {\n yTop = d.h;\n }\n if (!yBottom || d.l < yBottom) {\n yBottom = d.l;\n }\n }\n });\n\n const newDomain = [yBottom, yTop];\n givePaddingToYDirection(newDomain); //Give padding to the max and min value.\n\n //Refresh yScale domain with the current value range.\n yScale.domain(newDomain);\n\n gY.call(yAxis.scale(yScale));\n }", "niceScale (yMin, yMax, ticks = 10) {\n if ((yMin === Number.MIN_VALUE && yMax === 0) || (!Utils.isNumber(yMin) && !Utils.isNumber(yMax))) {\n // when all values are 0\n yMin = 0\n yMax = 1\n ticks = 1\n let justRange = this.justRange(yMin, yMax, ticks)\n return justRange\n }\n\n // Calculate Min amd Max graphical labels and graph\n // increments. The number of ticks defaults to\n // 10 which is the SUGGESTED value. Any tick value\n // entered is used as a suggested value which is\n // adjusted to be a 'pretty' value.\n //\n // Output will be an array of the Y axis values that\n // encompass the Y values.\n let result = []\n // If yMin and yMax are identical, then\n // adjust the yMin and yMax values to actually\n // make a graph. Also avoids division by zero errors.\n if (yMin === yMax) {\n yMin = yMin - 10 // some small value\n yMax = yMax + 10 // some small value\n }\n // Determine Range\n let range = yMax - yMin\n let tiks = ticks + 1\n // Adjust ticks if needed\n if (tiks < 2) {\n tiks = 2\n } else if (tiks > 2) {\n tiks -= 2\n }\n\n // Get raw step value\n let tempStep = range / tiks\n // Calculate pretty step value\n\n let mag = Math.floor(this.log10(tempStep))\n let magPow = Math.pow(10, mag)\n let magMsd = parseInt(tempStep / magPow)\n let stepSize = magMsd * magPow\n\n // build Y label array.\n // Lower and upper bounds calculations\n let lb = stepSize * Math.floor(yMin / stepSize)\n let ub = stepSize * Math.ceil((yMax / stepSize))\n // Build array\n let val = lb\n while (1) {\n result.push(val)\n val += stepSize\n if (val > ub) { break }\n }\n\n // TODO: need to remove this condition below which makes this function tightly coupled with w.\n if (this.w.config.yaxis[0].max === undefined &&\n this.w.config.yaxis[0].min === undefined) {\n return {\n result,\n niceMin: result[0],\n niceMax: result[result.length - 1]\n }\n } else {\n result = []\n let v = yMin\n result.push(v)\n let valuesDivider = Math.abs(yMax - yMin) / ticks\n for (let i = 0; i <= ticks - 1; i++) {\n v = v + valuesDivider\n result.push(v)\n }\n\n return {\n result,\n niceMin: result[0],\n niceMax: result[result.length - 1]\n }\n }\n }", "function adjustTicks(evt, obj) {\n //Using adjustTM attribute to adjust the \n //number of major ticks to a best feasible value\n if(adjustTickCB.checked) {\n cpuGauge.setChartAttribute('adjustTM', 1);\n }\n else{\n cpuGauge.setChartAttribute('adjustTM', 0);\n }\n }", "function yScale (data, yvalue) {\n var yLinearScale = d3.scaleLinear()\n .domain(d3.extent(data, data => data[yvalue]))\n .range([chartHeight, 0])\n return yLinearScale;\n }", "function yAxis() {\t\t\n return d3.axisLeft(y)\n .tickSize(-width)\n .tickFormat(\"\")\n}", "updatePlot (initialization) {\n const { weightedSumMax } = this.palmMath.getData()\n this.yscale.domain([0, weightedSumMax]).nice()\n this.yAxis.scale(this.yscale)\n\n const container = (initialization)\n ? this.axisContainer\n : this.axisContainer.transition().duration(this.duration)\n\n container\n .call(this.yAxis)\n .selectAll('.tick text')\n .style('font-size', this.fontSize + 'px')\n .style('font-family', this.fontFamily)\n .style('fill', this.fontColor)\n }", "function setChartYRange(chart, minY, maxY, minY2, maxY2) {\n\t// console.log(\"I am setChartYRange(%O, %s, %s, %s, %s)\", chart, minY, maxY, minY2, maxY2);\n\tchart.axis.range({\n\t\tmin: {\n\t\t\ty: minY,\n\t\t\ty2: minY2\n\t\t},\n\t\tmax: {\n\t\t\ty: maxY,\n\t\t\ty2: maxY2\n\t\t}\n\t});\n}", "function Y(d) {\n return yScale(d.value);\n }", "function setYval(val) {\n\t// Update yVal\n\tyVal = val;\n\t// Update the axis\n\tyScale.domain([d3.min(data, function(d) { return parseFloat(d[yVal]); })-1,\n\t\t\t\t d3.max(data, function(d) { return parseFloat(d[yVal]); })+1])\n\tyAxis.scale(yScale);\n\tyAxisG.call(yAxis);\n\tyLabel.text(yVal);\n\t// Update the points\n\td3.selectAll('.point')\n\t\t.transition()\n\t\t.duration(transDur)\n\t\t.attr('cy', function(d) { return yScale(d[yVal]); });\n}", "_calcAllYRanges() {\n for (let yAxisTag of this._yAxisTags) {\n if (yAxisTag.axisConfig.autoScale) {\n // auto scale\n this._calcYRange(yAxisTag);\n } else if (yAxisTag.axisConfig.min < yAxisTag.axisConfig.max) {\n // fixed scale\n yAxisTag.min = yAxisTag.axisConfig.min;\n yAxisTag.max = yAxisTag.axisConfig.max;\n } else {\n // default scale\n yAxisTag.min = -1;\n yAxisTag.max = 1;\n }\n\n this._defineAxisTitle(yAxisTag);\n }\n }", "function updateYScale(yData,curYaxis){\n var yLinearScale = d3.scaleLinear()\n .domain([d3.min(yData, d=> d[curYaxis]),d3.max(yData, d=> d[curYaxis])])\n .range([chartHeight,0]);\n\n // var yLinearScale = d3.scaleLinear()\n // .domain([d3.min(yData, d=> d[curYaxis]),d3.max(yData, d=> d[curYaxis])])\n // .range([0,chartHeight]);\n \n \n return yLinearScale;\n}", "function setupYScale() {\n var maxSales = d3.max(totalSales, function(d, i) {\n return d.sales;\n });\n y = d3.scaleLinear()\n .range([0, height])\n .domain([maxSales, 0]);\n}", "function yScale(jourData, selYaxis) {\n let yLinearScale = d3.scaleLinear()\n .domain([Math.floor(d3.min(jourData, d => d[selYaxis])*0.9), Math.ceil(d3.max(jourData, d => d[selYaxis])*1.1)])\n .range([height, 0]);\n\n return yLinearScale;\n}", "function newYScale() {\n // create scales\n let yScale = d3.scaleLinear()\n .domain(d3.extent(dataset, obj => obj.value))\n .range([chartHeight, 0]); \n return yScale;\n}", "function yScale(brf,chosenYaxis){\n var yLinearScale=d3.scaleLinear()\n .domain([d3.min(brf,d=>d[chosenYaxis])*.8,\n d3.max(brf,d=>d[chosenYaxis])*1.2])\n .range([height,0]);\n return yLinearScale;\n}", "function addBarAxis () {\n\t\t\textraChartGroup.append(\"g\")\n\t\t\t .attr(\"class\", \"barYAxis\")\n\t\t\t .style(\"font-size\", 13 * screenRatio + \"px\")\n\t\t\t .call(leftAxis_extraChart);\n\t\t}", "function yScale(universities2, chosenYAxis) {\n // create scales\n var yLinearScale = d3.scaleLinear()\n .domain([0,\n 110\n ])\n .range([height, 0]);\n return yLinearScale;\n}", "function setYDomain(data) {\n\t\ty.domain([\n\t\t\td3.min(data, function(e) { return d3.min(e.values.map(el => el.total)); }),\n\t\t\td3.max(data, function(e) { return d3.max(e.values.map(el => el.total)); })\n\t\t\t]);\n\t}", "function yScale(timesData, chosenYAxis) {\n // create scales\n var yLinearScale = d3.scaleLinear()\n .domain([d3.min(timesData, d => d[chosenYAxis]) * 0.8 ,d3.max(timesData, d => d[chosenYAxis]) * 1.1])\n .range([height,0]);\n return yLinearScale;\n }", "_drawYGrid(yAxisTag) {\n let layout = this._chartLayout;\n let yAxisConfig = yAxisTag.axisConfig;\n let yAxisLayout = yAxisTag.axisLayout;\n let yAxisRect = yAxisLayout.areaRect;\n\n this._context.textBaseline = \"middle\";\n this._context.font = yAxisConfig.fontSize + \"px \" + this.displayOptions.chartArea.fontName;\n\n let labelMarginT = scada.chart.DisplayOptions.getMargin(yAxisConfig.labelMargin, 0);\n let labelMarginR = scada.chart.DisplayOptions.getMargin(yAxisConfig.labelMargin, 1);\n let labelMarginB = scada.chart.DisplayOptions.getMargin(yAxisConfig.labelMargin, 2);\n let labelMarginL = scada.chart.DisplayOptions.getMargin(yAxisConfig.labelMargin, 3);\n let prevLblY = NaN;\n let tickL, tickR, minorTickL, minorTickR, axisX, lblX;\n\n if (yAxisConfig.position === scada.chart.AreaPosition.LEFT) {\n this._context.textAlign = \"right\";\n tickR = yAxisRect.right - 1;\n tickL = tickR - yAxisConfig.majorTickSize;\n minorTickR = tickR;\n minorTickL = minorTickR - yAxisConfig.minorTickSize;\n axisX = yAxisRect.right - 1;\n lblX = tickL - labelMarginR;\n } else {\n this._context.textAlign = \"left\";\n tickL = yAxisRect.left;\n tickR = tickL + yAxisConfig.majorTickSize;\n minorTickL = tickL;\n minorTickR = minorTickL + yAxisConfig.minorTickSize;\n axisX = yAxisRect.left;\n lblX = tickR + labelMarginL;\n }\n\n let gridL = layout.plotAreaRect.left + layout.canvasXOffset;\n let gridR = gridL + layout.plotAreaRect.width - 1;\n let axisT = yAxisRect.top + layout.canvasYOffset;\n let axisB = axisT + yAxisRect.height - 1;\n\n for (let y = yAxisLayout.gridStart; y < yAxisTag.max; y += yAxisLayout.gridStep) {\n let ptY = this._trendYToCanvasY(y, yAxisTag);\n\n // horizontal grid line\n if (yAxisConfig.showGridLines) {\n this._setColor(this.displayOptions.plotArea.gridColor);\n this._drawLine(gridL, ptY, gridR, ptY);\n }\n\n // major tick and axis line\n this._setColor(yAxisConfig.lineColor);\n this._drawLine(tickL, ptY, tickR, ptY);\n this._drawLine(axisX, axisT, axisX, axisB);\n\n // minor ticks\n if (yAxisConfig.minorTickCount > 0) {\n for (let minorTickY = y + yAxisLayout.minorTickStep, maxMinorTickY = y + yAxisLayout.gridStep;\n minorTickY < maxMinorTickY && maxMinorTickY < yAxisTag.max; minorTickY += yAxisLayout.minorTickStep) {\n\n let minorTickCnvY = this._trendYToCanvasY(minorTickY, yAxisTag);\n this._drawLine(minorTickL, minorTickCnvY, minorTickR, minorTickCnvY);\n }\n }\n\n // label\n this._setColor(yAxisConfig.textColor);\n let lblY = ptY;\n\n if (isNaN(prevLblY) || prevLblY - lblY > yAxisConfig.fontSize) {\n this._context.fillText(y.toFixed(yAxisLayout.gridDigits), lblX, lblY);\n prevLblY = lblY;\n }\n }\n\n // axis title\n if (yAxisConfig.showTitle && yAxisTag.title) {\n this._context.textAlign = \"center\";\n this._context.save();\n this._context.translate(yAxisRect.left + layout.canvasXOffset, yAxisRect.bottom + layout.canvasYOffset);\n this._context.rotate(-Math.PI / 2);\n let titleY;\n\n if (yAxisConfig.position === scada.chart.AreaPosition.LEFT) {\n this._context.textBaseline = \"top\";\n titleY = labelMarginT;\n } else {\n this._context.textBaseline = \"bottom\";\n titleY = yAxisRect.width - labelMarginB;\n }\n\n this._context.fillText(yAxisTag.title, yAxisRect.height / 2, titleY, yAxisRect.height);\n this._context.restore();\n }\n }", "function renderAxesY(newYScale, yAxis) {\n var leftAxis = d3.axisLeft(newYScale);\n yAxis.transition()\n .duration(1000)\n .call(leftAxis);\n return yAxis;\n}", "function renderAxesY(newYScale, yAxis) {\n var leftAxis = d3.axisLeft(newYScale);\n yAxis.transition()\n .duration(1000)\n .call(leftAxis);\n return yAxis;\n }", "function yScale() {\n var scale,\n // find min/max value of each data series\n domain = [Number.MAX_VALUE, Number.MAX_VALUE * -1];\n _.each(axesDef.y1, function(col) {\n domain[0] = Math.min(domain[0], col.range()[0]);\n domain[1] = Math.max(domain[1], col.range()[1]);\n });\n y1Domain = domain; // store for later, replaces me.__domain\n if (vis.get('baseline-zero', false) || vis.get('fill-below', false)) {\n if (domain[0] > 0) domain[0] = 0;\n if (domain[1] < 0) domain[1] = 0;\n }\n scale = useLogScale ? 'log' : 'linear';\n if (scale == 'log' && domain[0] === 0) domain[0] = 0.03; // log scales don't like zero!\n return d3.scale[scale]().domain(domain);\n }", "function normalize_yaxis(data) {\n function log_base10(n) {\n return Math.log(n) / Math.log(10);\n }\n\n var share_axis = false;\n\n // friend and follower axis share same scale if their number if close enough\n if (Math.max(data[0].max, data[1].max) / Math.min(data[0].max, data[1].max) <= 1.75) {\n data[0].max = data[1].max = Math.max(data[0].max, data[1].max);\n data[0].min = data[1].min = Math.min(data[0].min, data[1].min);\n\n share_axis = true;\n }\n\n for (var i=0;i<data.length;i++) {\n var factor = Math.max(10, Math.pow(10, parseInt(log_base10(data[i].max), 10) - 1))\n factor = factor * (Y_AXIS_LABEL_COUNT - 1);\n data[i].max = Math.ceil(data[i].max / factor) * factor;\n data[i].min = Math.floor(data[i].min / factor) * factor;\n }\n\n return share_axis;\n}", "function update_ticks(d, extent) {\n // update brushes\n if (d) {\n var brush_el = d3.selectAll(\".brush\")\n .filter(function(key) { return key == d; });\n // single tick\n if (extent) {\n // restore previous extent\n brush_el.call(yscale[d].brush = d3.svg.brush().y(yscale[d]).extent(extent).on(\"brush\", brush));\n } else {\n brush_el.call(yscale[d].brush = d3.svg.brush().y(yscale[d]).on(\"brush\", brush));\n }\n } else {\n // all ticks\n d3.selectAll(\".brush\")\n .each(function(d) { d3.select(this).call(yscale[d].brush = d3.svg.brush().y(yscale[d]).on(\"brush\", brush)); })\n }\n\n brush_count++;\n\n // update axes\n d3.selectAll(\".axis\")\n .each(function(d,i) {\n // hide lines for better performance\n d3.select(this).selectAll('line').style(\"display\", \"none\");\n\n // transition axis numbers\n d3.select(this)\n .transition()\n .duration(720)\n .call(axis.scale(yscale[d]));\n\n // bring lines back\n d3.select(this).selectAll('line').transition().delay(800).style(\"display\", null);\n\n d3.select(this)\n .selectAll('text')\n .style('font-weight', null)\n .style('font-size', null)\n .style('display', null);\n// d3.select(this).orient(\"top\").tickFormat(d3.format(\"d\"));\n });\n}", "homeYAxis(){\n this._updateYAxis(this.yMinHome, this.yMaxHome);\n }", "function build_y_axis(y_axis_scale, y_axis_label) {\n var y_axis_elem = d3.svg.axis()\n .scale(y_axis_scale)\n .orient('left')\n .ticks(5);\n\n return d3.select('#yAxis')\n .transition()\n .call(y_axis_elem)\n .select('#xLabel')\n .text(y_axis_label);\n }", "formatYAxis(tickItem) {\n\treturn tickItem.toLocaleString();\n }", "function renderAxesY(newYScale, yAxis) {\n var leftAxis = d3.axisLeft(newYScale);\n\n yAxis.transition()\n .duration(1000)\n .call(leftAxis);\n\n return yAxis}", "updateChart(data) {\n let cleanData = this.processData(data);\n let step = cleanData.sumOfLastElements < 10 ? 1 : null;\n\n this.chart.config.options.scales.yAxes[0].ticks.stepSize = step;\n this.chart.data.datasets[0].data = cleanData.negativeLow;\n this.chart.data.datasets[1].data = cleanData.negativeMiddle;\n this.chart.data.datasets[2].data = cleanData.negativeHigh;\n this.chart.data.datasets[3].data = cleanData.positiveLow;\n this.chart.data.datasets[4].data = cleanData.positiveMiddle;\n this.chart.data.datasets[5].data = cleanData.positiveHigh;\n this.chart.update();\n }", "function drawYTicks() {\n var tickSpread\n for( i = 0; i < yTicks; i++) {\n console.log(yTicks);\n tickSpread = margin + ((height - margin * 2)/yTicks) * i;\n console.log(tickSpread);\n line(margin - tickLength, tickSpread, margin, tickSpread);\n drawText(yRange[i], margin - margin/2, tickSpread + 3, 10, NORMAL);\n }\n}", "function drawYlabels(data, chartHeight, element) {\n\n // extracts scale from data\n var scale = data.scale;\n\n // determines the maximum value to be displayed on the Y axis of the chart\n var maxY = findMaxY(data.values, scale);\n\n // creates the label area that the labels are rendered to\n var labelArea = $(\"<div>\").attr(\"id\", \"yArea\");\n $(labelArea).css({height: chartHeight + \"px\"});\n $(element).append(labelArea);\n\n var labelHeight;\n var i;\n\n for (i = 0; i <= maxY / scale; i++) {\n // creates a label for each multiple of scale less than or equal to maxY\n var label = $(\"<div>\").addClass(\"yLabel\");\n\n // determines the label height\n labelHeight = ((i * scale) / maxY) * chartHeight;\n\n // updates the position and text displayed for the label\n $(label).css({marginBottom: (labelHeight - 13) + \"px\"});\n $(label).text((i * scale) + \" -\");\n\n // appends the label to the label area\n $(labelArea).append(label);\n }\n}", "function build_y_axis_scale(data, axis_label) {\n var scale_max = d3.max(data, function(d) {\n return d[axis_label];\n });\n\n var scale_min = d3.min(data, function(d) {\n return d[axis_label];\n });\n\n return d3.scale.linear()\n .range([height, margin])\n .domain([scale_min - 50, scale_max + 30]);\n }", "function renderYaxes(newYScale, yAxis) {\n let leftAxis = d3.axisLeft(newYScale);\n\n yAxis.transition()\n .duration(1000)\n .call(leftAxis);\n\n return yAxis;\n}", "function renderYaxes(newYScale, yAxis) {\n let leftAxis = d3.axisLeft(newYScale);\n \n yAxis.transition()\n .duration(1000)\n .call(leftAxis);\n \n return yAxis;\n}", "function changeYAxes(newYScale, yAxis) {\n let leftAxis = d3.axisLeft(newYScale).ticks(10);\n \n yAxis.transition()\n .duration(500)\n .call(leftAxis);\n \n return yAxis;\n}", "function getYaxisOptions(){\n scale = new Array();\n\n if(generate_param_1){\n y1_scale = {\n type: \"linear\",\n\n display: show_scale_1,\n position: \"left\",\n id: \"y-axis-1\",\n scaleLabel: {\n display: true,\n labelString: label_1,\n },\n };\n\n if(same_scale) {\n y1_scale[\"ticks\"] = {\n min: min_scale_value,\n max: max_scale_value\n }\n }\n\n scale.push(y1_scale);\n }\n\n\n if(generate_param_2){\n y2_scale = {\n type: \"linear\",\n display: show_scale_2,\n position: \"right\",\n id: \"y-axis-2\",\n scaleLabel: {\n display: true,\n labelString: label_2,\n },\n gridLines: {\n drawOnChartArea: false,\n }\n };\n\n if(same_scale) {\n y2_scale[\"ticks\"] = {\n min: min_scale_value,\n max: max_scale_value\n }\n }\n\n scale.push(y2_scale);\n }\n\n if(generate_param_3){\n y3_scale = {\n type: \"linear\",\n display: show_scale_3,\n position: \"right\",\n id: \"y-axis-3\",\n scaleLabel: {\n display: true,\n labelString: label_3\n },\n gridLines: {\n drawOnChartArea: false,\n }\n };\n scale.push(y3_scale);\n }\n\n\n\n return scale;\n}", "configYAxis(yConf) {\n // Default: duration, bounds and orient\n const bounds = yConf.bounds;\n const yAxisConfig = {\n duration: yConf.duration,\n bounds,\n orient: yConf.yOrient,\n tickSize: 0,\n };\n\n // Assemble the y-scale object\n const yDomain = yConf.data.map(d => d.category);\n // NOTE: rangebands for bar charts are 'top-to-bottom', unlike\n // other components that run 'bottom-to-top'. This relates to\n // sorting...\n yAxisConfig.scale = D3.scale.ordinal()\n .rangeBands([ 0, bounds.height ], 0.1)\n .domain(yDomain);\n\n return yAxisConfig;\n }", "function update_ticks(d, extent) {\n\t // update brushes\n\t if (d) {\n\t var brush_el = d3.selectAll(\".brush\")\n\t .filter(function(key) { return key == d; });\n\t // single tick\n\t if (extent) {\n\t // restore previous extent\n\t brush_el.call(yscale[d].brush = d3.svg.brush().y(yscale[d]).extent(extent).on(\"brush\", brush));\n\t } else {\n\t brush_el.call(yscale[d].brush = d3.svg.brush().y(yscale[d]).on(\"brush\", brush));\n\t }\n\t } else {\n\t // all ticks\n\t d3.selectAll(\".brush\")\n\t .each(function(d) { d3.select(this).call(yscale[d].brush = d3.svg.brush().y(yscale[d]).on(\"brush\", brush)); })\n\t }\n\t\n\t brush_count++;\n\t\n\t show_ticks();\n\t\n\t // update axes\n\t d3.selectAll(\".axis\")\n\t .each(function(d,i) {\n\t // hide lines for better performance\n\t d3.select(this).selectAll('line').style(\"display\", \"none\");\n\t\n\t // transition axis numbers\n\t d3.select(this)\n\t .transition()\n\t .duration(720)\n\t .call(axis.scale(yscale[d]));\n\t\n\t // bring lines back\n\t d3.select(this).selectAll('line').transition().delay(800).style(\"display\", null);\n\t\n\t d3.select(this)\n\t .selectAll('text')\n\t .style('font-weight', null)\n\t .style('font-size', null)\n\t .style('display', null);\n\t });\n\t}", "function initYaxis(yLinScale, yAxis) {\n var leftAx = d3.axisLeft(yLinScale);\n yAxis.transition()\n .duration(1000)\n .call(leftAx);\n return yAxis;\n }", "function Y(d) {\n return yScale(d[1]);\n }", "function Y(d) {\n return yScale(d[1]);\n }", "function Y(d) {\n return yScale(d[1]);\n }", "function Y(d) {\n return yScale(d[1]);\n }", "function yScale(data) {\n\n bound = calculate_minmax(data);\n let y = d3.scaleLinear()\n .domain([bound.min, bound.max])\n .range([h - 25, 25])\n .nice();\n return y;\n}", "function gen_yaxis(percentile, yx, y, minValue, maxValue, metricName){\n\n //set normalize the y-scale\n if (percentile) {\n y.domain([minValue/maxValue, maxValue/maxValue]);\n var yAxis = d3.svg.axis()\n .scale(y)\n .orient(\"left\")\n .tickFormat(d3.format(\"%\"));\n\n yx.selectAll(\".axis_label\").remove();\n yx\n .attr(\"class\", \"y_axis\")\n .call(yAxis)\n .append(\"text\")\n .attr('id','yAxisLabel')\n //.attr(\"transform\", \"rotate(-90)\")\n .attr(\"y\", -28)\n .attr(\"x\",28)\n .attr(\"dy\", \".71em\")\n .style(\"text-anchor\", \"end\")\n .attr(\"class\", \"axis_label\")\n .text(\"Percentile\"); // label at the side of the y-axis\n\n //set raw value y-scale\n } else {\n y.domain([minValue, maxValue]);\n var yAxis = d3.svg.axis()\n .scale(y)\n .orient(\"left\")\n .tickFormat(d3.format(\"d\"));\n\n yx\n .attr(\"class\", \"y_axis\")\n .call(yAxis)\n .append(\"text\")\n .attr('id','yAxisLabel')\n //.attr(\"transform\", \"rotate(-90)\")\n .attr(\"y\", -28)\n .attr(\"x\",28)\n .attr(\"dy\", \".71em\")\n .style(\"text-anchor\", \"end\")\n .text(metricName); // label at the side of the y-axis\n }\n\n}", "function tracer_grille(svg,width,yScale,data){\r\n\t\tsvg.selectAll(\"y_axis\").data(yScale.ticks(5)).enter()\r\n        .append(\"line\")\r\n        .attr(\"class\", \"horizontalGrid\")\r\n        .attr(\"x2\", width)\r\n        .attr(\"y1\", function(d){ return yScale(d);})\r\n        .attr(\"y2\", function(d){ return yScale(d);});\r\n}", "function renderYAxis(newYScale, yAxis) {\n var leftAxis = d3.axisLeft(newYScale);\n // use a transition to shift the axis\n yAxis.transition()\n .duration(svgTransitionDuration)\n .call(leftAxis);\n //\n return yAxis;\n}", "function updateYlabel() {\n if (options.ylabel && ylabel) {\n ylabel.text(options.ylabel);\n } else {\n ylabel.style(\"display\", \"none\");\n }\n }", "function renderYAxis(newYScale, yAxis2) {\n var leftAxis = d3.axisLeft(newYScale);\n yAxis2.transition()\n .duration(1000)\n .call(leftAxis);\n return yAxis2;\n }", "function yScale(data,chosenYAxis){\n var yLinearScale=d3.scaleLinear()\n .domain([d3.min(data,d=>d[chosenYAxis])*0.8,\n d3.max(data,d=>d[chosenYAxis])*1.1])\n .range([height,0]);\n return yLinearScale;\n}", "function drawAxisY(svg, yAxis, graphXStart, axisPadding) {\n drawAxis(svg, yAxis, 'translate(' + (graphXStart + axisPadding) + ', 0)', {});\n}" ]
[ "0.7569453", "0.7556463", "0.74414724", "0.7293451", "0.7286599", "0.72845596", "0.72440237", "0.7234491", "0.7220298", "0.7209505", "0.71976674", "0.71720177", "0.71532005", "0.7120985", "0.7065339", "0.70631766", "0.7059973", "0.705938", "0.70574737", "0.70571864", "0.70549005", "0.70549005", "0.7053598", "0.70528966", "0.7028237", "0.69959295", "0.6994197", "0.6990561", "0.69821227", "0.69821227", "0.6967618", "0.6953045", "0.695282", "0.69401073", "0.6939876", "0.6932929", "0.6887059", "0.68789494", "0.68567127", "0.6809571", "0.673838", "0.673838", "0.6734131", "0.6701349", "0.6662782", "0.6656781", "0.66487104", "0.66153", "0.660131", "0.6575259", "0.6564109", "0.6535627", "0.6494493", "0.6489153", "0.6473101", "0.6459001", "0.6445267", "0.6416149", "0.6404", "0.6392502", "0.63761616", "0.637497", "0.6331078", "0.6321675", "0.6318757", "0.63041323", "0.63014567", "0.62967163", "0.6262886", "0.6251062", "0.6246457", "0.6243511", "0.62405837", "0.6238523", "0.6229848", "0.62287676", "0.62153876", "0.62084", "0.62049747", "0.6202865", "0.6192094", "0.61835474", "0.6177999", "0.61766875", "0.6161467", "0.61560506", "0.6154725", "0.61516637", "0.6137304", "0.61295223", "0.61295223", "0.61295223", "0.6111722", "0.6110744", "0.6095641", "0.6095171", "0.60944885", "0.60808265", "0.60715204", "0.60709226", "0.6062907" ]
0.0
-1
function to shorten the labels' text
function modifyLabels(name) { var shortLabels = []; for (var i = 0; i < name.length; i++) { var stringName = name[i].toString(); var splitLabels = stringName.split(";"); if (splitLabels.length > 1) { shortLabels.push(splitLabels[splitLabels.length - 1]); } else { shortLabels.push(splitLabels[0]); } } return shortLabels; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function label(label) {\n return function(s) {\n var delta = s.length - label.length;\n return strRepeat (' ', Math.floor (delta / 2)) + label +\n strRepeat (' ', Math.ceil (delta / 2));\n };\n }", "function setBigLabelsProperties(label, text){\n label.style.backgroundColor = \"#4EA1E6\";\n label.style.overflow = \"hidden\";\n label.style.position = \"relative\";\n label.style.top = \"0px\";\n label.style.fontSize = \"13px\";\n label.appendChild(document.createTextNode(translateFromTypeToName(text)));\n label.style.textAlign = \"left\";\t\n}", "function shorttext() {\n var label_height = $('.banner-slide-homepersonalblog .slick-current .label-wrapper').height(),\n title_height = $('.banner-slide-homepersonalblog .slick-current .title').height(),\n blockquote_height = $('.banner-slide-homepersonalblog .slick-current blockquote').outerHeight(true),\n readmore_height = $('.banner-slide-homepersonalblog .slick-current .read-more').outerHeight(true);\n if(window.innerWidth > 1024) {\n $('.banner-slide-homepersonalblog .slick-current .more-text').css('max-height', $('.banner-slide-homepersonalblog .slick-current .news-image').height() - 92 - label_height - blockquote_height - title_height - readmore_height);\n }\n else {\n $('.banner-slide-homepersonalblog .slick-current .more-text').css('max-height', $('.banner-slide-homepersonalblog .slick-current .news-image').height() - 68 - label_height - blockquote_height - title_height - readmore_height);\n }\n }", "function setSmallLabelsProperties(label, text){\n label.style.backgroundColor = \"#4EA1E6\";\n label.style.overflow = \"hidden\";\n label.style.position = \"relative\";\n label.style.top = \"0px\";\n label.style.fontSize = \"9px\";\n label.appendChild(document.createTextNode(translateFromTypeToName(text)));\n label.style.textAlign = \"left\";\n}", "function shortenTitle(text) {\n\tif (text.length > 40)\n\t\treturn text.substring(0, 40) + \"... [+\" + (text.length - 40) + \"chars]\";\n\telse\n\t\treturn text;\n}", "shortenText(text){\n return text.substr(0, 270) + \"...\";\n }", "function showText(txt) {\n labelText = txt;\n}", "function abbrevIfTextOverflow(id, index){\n // need to replace this with text width funct\n // if ( $('#'+id)[0].scrollWidth > $('#'+id).innerWidth()) {\n // var file_text_elem = document.getElementById(id);\n // text=file_text_elem.value;\n // abbrevText(file_text_elem, text);\n // // originalFileNames.values[index] = \"\\n\" + originalFileNames.values[index]; //mark that abbreviation was made with an illegal newline character in array of original names \n // }\n }", "function scaleTipText(){\n var length = tip.node().getComputedTextLength();\n // rescale text accordingly\n if (length > donutWidth){\n tip.style(\"font-size\", Math.round(length/30))\n } else {\n tip.style(\"font-size\", 11)\n }\n}", "shortDescription(contenu){\n\t\tlet desc = contenu.slice(0, 250);\n\t\treturn desc + \" ...\";\n\t}", "function trimLength() {\n _.each(vm.tags, function (tag, idx) {\n tag.ShortName = angular.copy(tag.Name);\n if (tag.Name.length > 10) {\n tag.ShortName = tag.ShortName.substring(0, 10) + \"...\";\n }\n });\n }", "_text(d) {\n if (d.indexData !== -1)\n return this._adjustLengthText(this.model.data.children.data[this._vOrder[d.indexData]].labels[1], 20);\n else\n return \"\";\n }", "function createSimplifiedWordLabel(item) {\n return '<span class=\"simp-word\" ' +\n 'onclick=\"taeUI.getInstance().wordEvent(event, this)\">' +\n item.originalValue + \n '</span>';\n }", "function acronymizeBars(labels) {\n labels.text(function(d) {\n if (d && d.length > 18) d = acronymize(d);\n return d;\n });\n}", "function setLabels(index){\n\tvar label = '';\n\tif (!defaultSettings.showlabels){\n\t\treturn label;\n\t}\n\t\n\tif (index % 8 === 0){\n\t\tlabel += '<span class=\"label type-num number-' + labelPosition.num + '\">' + labelPosition.num + '</span>';\n\t\tlabelPosition.num--;\n\t}\n\tif (index >=56){\n\t\tlabel += '<span class=\"label type-alpha alphabet-' + String.fromCharCode(labelPosition.alpha) + '\">' + String.fromCharCode(labelPosition.alpha) + '</span>';\n\t\tlabelPosition.alpha++;\n\t}\n\treturn label; \n}", "function editLabel(label) {\n if(!isNaN(label)) {\n return label;\n } else {\n var newlabel = label\n .replaceAll(\"Inapplicable \\\\(\", \"Inapplicable<br>(\")\n .replaceAll(\"hysician\", \"hys.\")\n .replaceAll(\"Emergency room\", \"ER\");\n return newlabel;\n }\n }", "getShortTitle() {\n \n let showDetails = this.get('showDetails');\n // Good enough for two lines max\n let limit = showDetails ? 80 : 40;\n let title = this.get('taskCard.title');\n if(title.length < limit) {\n return title;\n }\n \n return `${title.slice(0, limit)}...`;\n }", "function collapseText(str,len){\n\t\tlen = len?len:30;\n\t\tif(str && str.length > len){\n\t\t\tvar extra = str.substr(len,str.length);\n\t\t\tstr = truncate(str,len);\n\t\t\tvar moreButton = ' <button class=\"wc-more-text-button\" data-text=\"'+extra+'\" onclick=\"WcFun.uncollapseText(this)\">more</button>'; /*[1]*/ /*[2]*/\n\t\t\tstr += moreButton;\n\t\t}\n\t\treturn str;\n\t}", "function updateLabel() {\n\t\tlabelVal.text( slider._getLabelValCallback( brush.extent()[0] ) );\n\t\tlabelLabel.attr(\"transform\", \"translate(\" + (+sliderWidth + \n \t\t\t\t\t\t \t +labelVal[0][0].offsetWidth + \n \t\t\t\t\t\t \t +margin.labelSpace) + \n \t \",\" + sliderHeight/2 + \")\");\n\t}", "function shortenArea(t, level) {\n\tif (!t.includes(\" \"))\n\t\treturn t;\n\tvar limite = 0;\n\tlimite = (level == 0) ? 10 : limite;\n\tlimite = (level == 1) ? 10 : limite;\n\tlimite = (level == 2) ? 15 : limite;\n\tlimite = (level == 3) ? 35 : limite;\n\n\tvar list = t.split(\" \");\n\tvar result = \"\";\n\tfor (var i = 0; i < list.length; i++) {\n\t\tif (result.length + list[i].length > limite) {\n\t\t\tif (i == 0) {\n\t\t\t\tresult = list[i].substring(0, limite - 5) + \". ...\";\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\tresult += \"...\";\n\t\t\treturn result;\n\t\t}\n\t\tresult += \" \" + list[i];\n\t}\n\n\treturn result;\n}", "minimizeDescription() {\n var shortdescription = \"\";\n for (var i = 0; i < 28 && this.description[i] !== '\\n'; i++) {\n shortdescription += this.description.charAt(i);\n }\n shortdescription += \"...\";\n\n return shortdescription;\n }", "function truncateLongNames(barList) {\n // reset all short name\n barList.forEach( function(curBar) {\n if (curBar.getMetadata(\"short name\")) {\n curBar.deleteMetadata(\"short name\");\n }\n });\n\n // set 20% of width or a readable minimum\n let maxWidth = 0.2*(width-50);\n maxWidth = (maxWidth < 80) ? 80 : maxWidth;\n // Find the maximum string length and see if it fits\n let maxNLenNode = barList.reduce(function(total, a) {\n if (a.getName().length > total.getName().length) { return a; }\n return total;\n });\n let maxNLen = maxNLenNode.getName().length * 10; // string to pixel conversion factor 1char:10px\n if (maxNLen <= maxWidth) { return maxNLen; } // everything fits\n\n let maxStrLen = Math.floor(maxWidth/10);\n barList.forEach( function(nodeObj) {\n if (nodeObj.getName().length > maxStrLen) {\n nodeObj.setMetadata(\"short name\", \"...\" + \n nodeObj.getName().substring(nodeObj.getName().length-maxStrLen+3, nodeObj.getName().length));\n }\n });\n return maxWidth;\n }", "function smalltext(text) {\n\t\t\ttext.attr(\"x\", function(d) { return x(d.x) + 5; })\n\t\t\t.attr(\"y\", function(d) { return y(d.y) -20; })\n\t\t\t.attr(\"width\",40)\n\t\t\t.attr(\"height\",20);\n\t\t\t\n\t\t}", "function rename_labels() {\n\t\t $('.price_rule').each(function() {\n\t\t\tvar rule_id = $(this).attr('data-id');\n\t\t\tif (rule_id < (price_rule_num - 1)) {\n\t\t\t\t$(this).find('.additional_adult').html($('#translations .t_for_adult_n').html().replace(/%d/, parseInt(rule_id)+1) + ' ('+quitenicebooking.currency_unit+')');\n\t\t\t\t$(this).find('.additional_child').html($('#translations .t_for_child_n').html().replace(/%d/, parseInt(rule_id)+1) + ' ('+quitenicebooking.currency_unit+')');\n\t\t\t} else {\n\t\t\t\t$(this).find('.additional_adult').html($('#translations .t_additional_adult').html() + ' ('+quitenicebooking.currency_unit+')');\n\t\t\t\t$(this).find('.additional_child').html($('#translations .t_additional_child').html() + ' ('+quitenicebooking.currency_unit+')');\n\t\t\t}\n\t\t });\n\t }", "static labelOf(t) {\n const label= !t.desc ? Filters.titlecase(t.name.replace(/[-_]/g, ' ')) /* friendlyish name */ :\n (typeof t.desc === 'string') ? t.desc :\n t.desc.label;\n return label;\n }", "function shorten(value, maxLen) {\r\n\t\t\tvar shortValue = value;\r\n\r\n\t\t\tif (!maxLen) {\r\n\t\t\t\tmaxLen = 30;\r\n\t\t\t}\r\n\r\n\t\t\tif (value.length > maxLen) {\r\n\t\t\t\tshortValue = value.substring(0, maxLen - 3) + \"...\";\r\n\t\t\t}\r\n\r\n\t\t\treturn shortValue;\r\n\r\n\t\t} // shorten", "updateBarLabels() {\n for (let i = this.barElements.length - 1; i >= 0; i -= 1) {\n const el = this.barElements[i];\n const word = el.querySelector(`.${styles.barLabelWord}`);\n const count = parseInt(\n el.querySelector(`.${styles.barLabelNumber}`).textContent,\n 10,\n );\n\n if (el.offsetWidth > 50) {\n word.style.display = 'inline';\n word.textContent = getLabelWord(count, el.offsetWidth);\n return;\n }\n }\n }", "function getTextPositionInLabel(text) {\r\n\t\ttext = text + \"\";\r\n\t\treturn 15 - (text.length * 2.2); \r\n\t}", "function labels() {\n pop();\n strokeWeight(1);\n fill(255);\n textStyle(NORMAL);\n textFont('Georgia');\n\n var min = minSlider.value();\n var alpha = alphaSlider.value();\n var range = rangeSlider.value();\n\n // Shorten labels and add '$'\n if(range >= 1000 & range <= 1000000){\n range_half = \"$\" + range / 2000 + \"K\";\n range = \"$\" + range / 1000 + \"K\";\n }\n\n if(range >= 1000000){\n var range_half = \"$\" + range / 2000 + \"K\";\n var range = \"$\" + range / 1000000 + \"M\";\n }\n\n // minSlider labels\n if(min >=1000 & min <= 1000000){\n min_half = \"$\" + min / 2000 + \"K\";\n min = \"$\" + min / 1000 + \"K\";\n }\n\n\n if(maxMin >=1000 & maxMin <= 1000000){\n maxMin_half = \"$\" + maxMin / 2000 + \"K\";\n maxMin = \"$\" + maxMin / 1000 + \"K\";\n }\n\n text(\"Min:\", minSlider.x * 2 + minSlider.width - 15, minSlider.y + yOff);\n text(min , minSlider.x * 2 + minSlider.width + xOff + 5, minSlider.y + yOff);\n text(0, minSlider.x, minSlider.y + space);\n text(maxMin, minSlider.x + minSlider.width, minSlider.y + space);\n text(maxMin_half, minSlider.x + minSlider.width / 2 - 10, minSlider.y + space);\n\n\n // alphaSlider labels\n text(\"alpha:\", alphaSlider.x * 2 + alphaSlider.width - 15, 65);\n text(alpha , alphaSlider.x * 2 + alphaSlider.width + xOff + 5, alphaSlider.y + yOff);\n text(\"0\", alphaSlider.x, alphaSlider.y + space);\n text(maxAlpha, alphaSlider.x + alphaSlider.width, alphaSlider.y + space);\n text(maxAlpha / 2, alphaSlider.x + alphaSlider.width / 2, alphaSlider.y + space);\n\n // rangeSlider labels\n\n\n if(maxRange >= 999999){\n var maxRange_half = \"$\" + maxRange / 2000 + \"K\";\n var maxRange = \"$\" + maxRange / 1000000 + \"M\";\n }\n\n if(maxRange >= 1000 & maxRange <= 1000000){\n var maxRange_half = \"$\" + maxRange / 2000 + \"K\";\n var maxRange = \"$\" + maxRange / 1000 + \"K\";\n }\n\n text(\"Range:\", rangeSlider.x * 2 + rangeSlider.width - 15, 95);\n text(\"[-\" + range + \",\" + range + \"]\" , rangeSlider.x * 2 + rangeSlider.width + xOff + 5, rangeSlider.y + yOff);\n text(\"1\", rangeSlider.x, rangeSlider.y + space);\n text(\"$1M\", rangeSlider.x + rangeSlider.width, rangeSlider.y + space);\n text(\"$500K\", rangeSlider.x + rangeSlider.width / 2 - 10, rangeSlider.y + space);\n\n text(\"The Pareto Distribution:\", rangeSlider.x, rangeSlider.y + 2*space);\n //text(\"P(X\\u2264x) = 1 - (min_x/X)^\\u03B1\", rangeSlider.x, rangeSlider.y + 2*space + 14);\n\n push();\n }", "function otuLabelHandler(label){\n return label.split(';').slice(-2).join();\n}", "function fieldLabel(field) { return [field, \"Label\"].join(\"\"); }", "function mkLabelText (row, idx) {\n return `{gray-fg}${Utils.pad(3, idx, ' ')}{/gray-fg} ${row.string}`\n }", "function normal_name(d) {\n let inst_name = d.name.replace(/_/g, ' ').split('#')[0];\n if (inst_name.length > params.labels.max_label_char) {\n inst_name = inst_name.substring(0, params.labels.max_label_char) + '..';\n }\n return inst_name;\n }", "function LabelOptions() { }", "function truncateLabel(seriesName, truncate) {\n if (!truncate) {\n return seriesName;\n }\n\n let result = seriesName;\n let truncateLength = typeof truncate === 'number' ? truncate : DEFAULT_TRUNCATE_LENGTH;\n 0;\n\n if (seriesName.length > truncateLength) {\n result = seriesName.substring(0, truncateLength) + '…';\n }\n return result;\n}", "function updateLabel(){\n var textUpdate = \"\";\n for(var i = 0; i < domain.length; i++){\n textUpdate = textUpdate.concat(domain[i].name);\n textUpdate = textUpdate.concat(\"<br/>\");\n }\n domLabel.html(textUpdate);\n}", "function toggleLabel() {\n var input = $(this);\n setTimeout(function() {\n var def = input.attr('title');\n if (!input.val() || (input.val() == def)) {\n input.prev('span').css('visibility', '');\n if (def) {\n var dummy = $('<label></label>').text(def).css('visibility','hidden').appendTo('body');\n input.prev('span').css('margin-left', dummy.width() + 3 + 'px');\n dummy.remove();\n }\n } else {\n input.prev('span').css('visibility', 'hidden');\n }\n }, 0);\n }", "function LabelOptions() {}", "get text(){ return this.__label.text; }", "function tm_label(d) {\n\tvar res = \"\";\n\tvar words = d.Team.split(\" \");\n\twords.forEach(function(w) {\n\t\tres += w + \"\\n\";\n\t});\n\treturn res;\n}", "function makeLabels() {\n svgContainer.append('text')\n .attr('x', 100)\n .attr('y', 40)\n .style('font-size', '14pt')\n .text(\"Fertility vs Life Expectancy (1980)\");\n\n svgContainer.append('text')\n .attr('x', 130)\n .attr('y', 490)\n .style('font-size', '10pt')\n .text('Fertility Rates (Avg Children per Woman)');\n\n svgContainer.append('text')\n .attr('transform', 'translate(15, 300)rotate(-90)')\n .style('font-size', '10pt')\n .text('Life Expectancy (years)');\n }", "function changeLabelsSize(value) {\n graph.style.labels_size = value\n\n graph.element\n .selectAll('text')\n .style('font', `${value}px sans-serif`)\n }", "function cutName(obj,limitLength){\n\tvar len = limitLength;\n\t$(obj).each(function(){\n\t\tvar tpTxt = $(this).text();\n\t\tif(tpTxt.length > len && len != undefined){\n\t\t\t$(this).attr(\"title\",tpTxt);\n\t\t\ttpTxt = tpTxt.substring(0,limitLength)+\"...\";\n\t\t\t$(this).text(tpTxt);\n\t\t}\n\t});\n}", "function shorten(txt) { \r\n \r\n // Max embed limit is 2048, here this value cut the character description length.\r\n const maxLength = 650; \r\n \r\n if (!txt) return `There's no description.`;\r\n //if (txt.indexOf('\\n\\n[') != -1) txt = txt.slice(0, txt.indexOf('\\n\\n[')); // <= Cut everything after first hyperlink\r\n while (txt.match(/(\\n){2}\\[.+\\]\\]/)) txt = txt.replace(txt.match(/(\\n){2}\\[.+\\]\\]/)[0], ''); // Regex to delete string in nested hyperlinks markdown\r\n while (txt.match(/(\\n){2}\\[.+\\]/)) txt = txt.replace(txt.match(/(\\n){2}\\[.+\\]/)[0], '');\r\n while (txt.match(/\\[.+?]/)) txt = txt.replace(txt.match(/\\[.+?]/)[0], '');\r\n \r\n if (txt.length > maxLength) {\r\n \r\n // Change this to cut by another set of strings\r\n let cut = '\\n\\n'; \r\n txt = txt.slice(0, maxLength-txt.length-6);\r\n \r\n if (txt.lastIndexOf(cut) != -1) txt = txt.slice(0, txt.lastIndexOf(cut));\r\n else {\r\n let arr = [];\r\n for (let p of ['.', '?', '!']) arr.push(txt.lastIndexOf(p));\r\n txt = txt.slice(0, arr.sort((a, b) => b - a)[0]+1);\r\n }\r\n \r\n txt = txt + ' **[...]**';\r\n }\r\n return txt;\r\n }", "adjustLabels() {\n let formWidth = this.$element.width();\n\n if (this.$element.hasClass('cd-commentForm-short')) {\n if (formWidth >= this.buttonsTotalWidthStandard + 7) {\n this.$element.removeClass('cd-commentForm-short');\n this.submitButton.setLabel(this.submitButtonLabelStandard);\n this.previewButton.setLabel(cd.s('cf-preview'));\n this.viewChangesButton.setLabel(cd.s('cf-viewchanges'));\n this.cancelButton.setLabel(cd.s('cf-cancel'));\n }\n } else {\n this.buttonsTotalWidthStandard = (\n this.submitButton.$element.outerWidth(true) +\n (\n this.previewButton.$element.is(':visible') ?\n this.previewButton.$element.outerWidth(true) :\n 0\n ) +\n // Users may hide the view changes button by any kind of a plugin.\n (\n this.viewChangesButton.$element.is(':visible') ?\n this.viewChangesButton.$element.outerWidth(true) :\n 0\n ) +\n this.advancedButton.$element.outerWidth(true) +\n this.helpPopupButton.$element.outerWidth(true) +\n this.cancelButton.$element.outerWidth(true)\n );\n if (formWidth < this.buttonsTotalWidthStandard + 7) {\n this.$element.addClass('cd-commentForm-short');\n this.submitButton.setLabel(this.submitButtonLabelShort);\n this.previewButton.setLabel(cd.s('cf-preview-short'));\n this.viewChangesButton.setLabel(cd.s('cf-viewchanges-short'));\n this.cancelButton.setLabel(cd.s('cf-cancel-short'));\n }\n }\n }", "label() {\n if(this.props.columnType === Constants.getIn(['columnTypes', 'SIDEBAR'])) {\n return null\n }\n\n let labelLines = this.labelLines()\n\n // Clip long names, and append an ellipsis\n if (labelLines.length > 3) {\n labelLines = [labelLines[0], labelLines[1], labelLines[2]]\n labelLines[2] += '…'\n }\n\n const labelLengthExceed = labelLines.length * Constants.get('singleLineCategoryLabelHeight') > this.props.height\n\n let labelClassName = 'inactiveCategoryLabels'\n\n if(labelLengthExceed === true && this.checkHoverState() === false && this.filterboxActive() === false) {\n return null\n }\n\n if(this.checkHoverState() === true) {\n labelClassName = 'activeCategoryLabels'\n }\n\n let currentY = (this.props.height/2)\n let lineCount = 0\n currentY += (1 - (labelLines.length/2)) * \n Constants.get('singleLineCategoryLabelHeight')\n\n // Decrement just before it's increcemented inside the map.\n currentY -= Constants.get('singleLineCategoryLabelHeight')\n\n return <g>\n <text\n >\n {labelLines.map((line) => {\n currentY += Constants.get('singleLineCategoryLabelHeight')\n lineCount += 1\n return <tspan fill={this.fill} className={labelClassName} \n key={this.props.categoryName + 'CategoryLabelLine' + lineCount}\n y={currentY}\n x={this.props.width + Constants.get('categoryLabelOffset')}>\n {line}\n </tspan>\n })}\n </text>\n { this.filterbox(currentY) }\n </g>\n }", "function shorten( $text, $length ) {\n\n // Skip if max length defined zero\n if ( $length == '0' ) return $text;\n\n // Do the magic\n var length = $length || 10;\n if ( $text.length > length ) {\n $text = $text.substring( 0, length ) + '&hellip;';\n }\n\n return $text;\n}", "function wrapText(circles, labeller) {\n return function() {\n var text = d3Selection.select(this),\n data = text.datum(),\n width = circles[data.sets[0]].radius || 50,\n label = labeller(data) || '';\n\n var words = label.split(/\\s+/).reverse(),\n maxLines = 3,\n minChars = (label.length + words.length) / maxLines,\n word = words.pop(),\n line = [word],\n joined,\n lineNumber = 0,\n lineHeight = 1.1, // ems\n tspan = text.text(null).append(\"tspan\").text(word);\n\n while (true) {\n word = words.pop();\n if (!word) break;\n line.push(word);\n joined = line.join(\" \");\n tspan.text(joined);\n if (joined.length > minChars && tspan.node().getComputedTextLength() > width) {\n line.pop();\n tspan.text(line.join(\" \"));\n line = [word];\n tspan = text.append(\"tspan\").text(word);\n lineNumber++;\n }\n }\n\n var initial = 0.35 - lineNumber * lineHeight / 2,\n x = text.attr(\"x\"),\n y = text.attr(\"y\");\n\n text.selectAll(\"tspan\")\n .attr(\"x\", x)\n .attr(\"y\", y)\n .attr(\"dy\", function(d, i) {\n return (initial + i * lineHeight) + \"em\";\n });\n };\n }", "function fix_label_lengths(parameters) {\n let max_width = 0\n for(let p of parameters) {\n if (p.label_elem) {\n // TBD doesn't deal with invisible parameters\n if (p.label_elem.scrollWidth > p.label_elem.offsetWidth) // it's bigger that the space for it\n max_width = Math.max(max_width, p.label_elem.scrollWidth + 5)\n else if (p.label_elem.style.width !== '') // we previosly set a width to it (needed for groups readding params)\n max_width = Math.max(max_width, p.label_elem.scrollWidth)\n }\n }\n if (max_width != 0) {\n for(let p of parameters) {\n if (p.label_elem !== null)\n p.label_elem.style.width = max_width + \"px\"\n }\n }\n}", "function addDriverLabels(vis, laps, cssClass, x, textAnchor) {\n\n return vis.selectAll('text.label.' + cssClass)\n .data(laps)\n .enter()\n .append('svg:text')\n .attr('class', 'label ' + cssClass)\n .attr('x', x)\n .attr('dy', '0.35em')\n .attr('text-anchor', textAnchor)\n .text(function(d) {\n\n\n var var4= [d.name,d.placing.slice(1, 6)];\n //var qna = var4.split(',');\n //var res = qna.join(\" <br> \");\n\n return var4[0] ;//+ var4[1];\n })\n .style('fill', function(d) {\n\n return SCALES.clr(d.placing[0]);\n })\n .on('mouseover', function(d) {\n\n highlight(vis, d.name);\n })\n .on('mouseout', function() {\n\n unhighlight(vis);\n });\n\n}", "function shorterTitle(films) {\n for(let i = 0; i < 5; i++) {\n if(films[i].textContent.length > 20) {\n films[i].textContent = films[i].textContent.slice(0, 20) + '...';\n }\n }\n}", "function wrapText(circles, labeller) {\n return function () {\n var text = d3Selection.select(this),\n data = text.datum(),\n width = circles[data.sets[0]].radius || 50,\n label = labeller(data) || '';\n\n var words = label.split(/\\s+/).reverse(),\n maxLines = 3,\n minChars = (label.length + words.length) / maxLines,\n word = words.pop(),\n line = [word],\n joined,\n lineNumber = 0,\n lineHeight = 1.1,\n // ems\n tspan = text.text(null).append(\"tspan\").text(word);\n\n while (true) {\n word = words.pop();\n if (!word) break;\n line.push(word);\n joined = line.join(\" \");\n tspan.text(joined);\n if (joined.length > minChars && tspan.node().getComputedTextLength() > width) {\n line.pop();\n tspan.text(line.join(\" \"));\n line = [word];\n tspan = text.append(\"tspan\").text(word);\n lineNumber++;\n }\n }\n\n var initial = 0.35 - lineNumber * lineHeight / 2,\n x = text.attr(\"x\"),\n y = text.attr(\"y\");\n\n text.selectAll(\"tspan\").attr(\"x\", x).attr(\"y\", y).attr(\"dy\", function (d, i) {\n return initial + i * lineHeight + \"em\";\n });\n };\n }", "function wrapText(circles, labeller) {\n return function () {\n var text = d3Selection.select(this),\n data = text.datum(),\n width = circles[data.sets[0]].radius || 50,\n label = labeller(data) || '';\n\n var words = label.split(/\\s+/).reverse(),\n maxLines = 3,\n minChars = (label.length + words.length) / maxLines,\n word = words.pop(),\n line = [word],\n joined,\n lineNumber = 0,\n lineHeight = 1.1,\n // ems\n tspan = text.text(null).append(\"tspan\").text(word);\n\n while (true) {\n word = words.pop();\n if (!word) break;\n line.push(word);\n joined = line.join(\" \");\n tspan.text(joined);\n if (joined.length > minChars && tspan.node().getComputedTextLength() > width) {\n line.pop();\n tspan.text(line.join(\" \"));\n line = [word];\n tspan = text.append(\"tspan\").text(word);\n lineNumber++;\n }\n }\n\n var initial = 0.35 - lineNumber * lineHeight / 2,\n x = text.attr(\"x\"),\n y = text.attr(\"y\");\n\n text.selectAll(\"tspan\").attr(\"x\", x).attr(\"y\", y).attr(\"dy\", function (d, i) {\n return initial + i * lineHeight + \"em\";\n });\n };\n }", "function formatPieChartLabels() {\n\t\tif (Math.round(this.point.percentage) < 5) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\treturn '<span style=\"font-size: 8pt; font-family: Arial, sans-serif;\">' + \n\t\t\trestrictFractionalPart(this.point.y) + ' (' + Math.round(this.point.percentage) + '%)</span>';\n\t}", "function tooltipText(d){\n return d.name + ': ' + d.size;\n }", "function wrapText(circles, labeller) {\n return function () {\n var text = d3Selection.select(this),\n data = text.datum(),\n width = circles[data.sets[0]].radius || 50,\n label = labeller(data) || '';\n var words = label.split(/\\s+/).reverse(),\n maxLines = 3,\n minChars = (label.length + words.length) / maxLines,\n word = words.pop(),\n line = [word],\n joined,\n lineNumber = 0,\n lineHeight = 1.1,\n // ems\n tspan = text.text(null).append(\"tspan\").text(word);\n\n while (true) {\n word = words.pop();\n if (!word) break;\n line.push(word);\n joined = line.join(\" \");\n tspan.text(joined);\n\n if (joined.length > minChars && tspan.node().getComputedTextLength() > width) {\n line.pop();\n tspan.text(line.join(\" \"));\n line = [word];\n tspan = text.append(\"tspan\").text(word);\n lineNumber++;\n }\n }\n\n var initial = 0.35 - lineNumber * lineHeight / 2,\n x = text.attr(\"x\"),\n y = text.attr(\"y\");\n text.selectAll(\"tspan\").attr(\"x\", x).attr(\"y\", y).attr(\"dy\", function (d, i) {\n return initial + i * lineHeight + \"em\";\n });\n };\n }", "function updateLabels() {\n label = label.data(data.topics, function(d) {\n return d.name;\n });\n\n label.exit().remove();\n\n var labelEnter = label.enter().append(\"a\")\n .attr(\"class\", \"g-label\")\n .attr(\"id\", function(d) {\n return encodeURIComponent(d.name);\n })\n .call(force.drag)\n .call(linkTopic);\n\n labelEnter.append(\"div\")\n .attr(\"class\", \"g-name\")\n .text(function(d) {\n return d.name;\n });\n\n labelEnter.append(\"div\")\n .attr(\"class\", \"g-value\");\n\n label\n .style(\"font-size\", function(d) {\n return Math.max(8, r(d.count) / 2.2) + \"px\";\n })\n .style(\"width\", function(d) {\n return r(d.count) * 2.5 + \"px\";\n });\n\n // Create a temporary span to compute the true text width.\n label.append(\"span\")\n .text(function(d) {\n return d.name;\n })\n .each(function(d) { d.dx = Math.max(2.5 * r(d.count), this.getBoundingClientRect().width); })\n .remove();\n\n label\n .style(\"width\", function(d) {\n return d.dx + \"px\";\n })\n .select(\".g-value\")\n .text(function(d) {\n return d.count + (d.r > 60 ? \" mentions\" : \"\");\n });\n\n // Compute the height of labels when wrapped.\n label.each(function(d) { d.dy = this.getBoundingClientRect().height; });\n }", "function getTooltipText(d) {\r\n var mainText = '<p><strong>Name: </strong>' + d.label + ' (' + d.abbrev\r\n + ')</p><p><strong>Description: </strong>' + d.description + '</p>';\r\n var classification = '<p><strong>Classification: </strong>'\r\n + d.classification + '</p';\r\n return d.type == \"out\" ? mainText : mainText + classification;\r\n }", "function _makeLabel (n) {\n if (Array.isArray(n)) return _arrayToVec(n);\n if (typeof n === 'object') return 'fa_' + (n._id);\n else return n.toFixed(6);\n}", "function countryLabel(dot){\n dot.append(\"text\")\n .attr(\"class\", function(d){return \"country topleftlabel \"+d.name;})\n .attr(\"text-anchor\", \"start\")\n .attr(\"x\", 24)\n .attr(\"y\", 135)\n .text(function(d) {return d.name; })\n .style(\"fill\", function(d){return colorScale(d.region);});\n }", "label (valueName, postValue, postLabel) {\n let value = ''\n\n try {\n value = this.tags[valueName]\n } catch (error) {\n\n }\n\n if (!value) { return '' }\n // look for any overrides or improvements and apply them if found\n let dataImprovement = dataImprover[valueName]\n let prettyLabel, prettyValue\n // let improverType = typeof (dataImprovement)\n switch (typeof (dataImprovement)) {\n case 'string':\n prettyLabel = dataImprovement\n prettyValue = value\n break\n case 'object':\n prettyLabel = dataImprovement.label\n prettyValue = dataImprovement.value(value)\n break\n default:\n prettyLabel = titleCase(valueName.replace(/[:|-|_]/gi, ' '))\n prettyValue = value\n }\n\n // console.log(prettyLabel,prettyValue);\n let ret =\n ((prettyLabel) ? `<strong>${prettyLabel}:</strong>&nbsp;` + (postLabel || '') : '') +\n prettyValue +\n ((postValue) || '')\n\n return ret\n }", "function addLabel(w,h, label, labelForeground, wrapTextWidth) {\r\n\tctx = document.getElementById('canvas').getContext('2d');\r\n\tvar txt, newH, newW;\r\n\t\r\n\tvar nw = w/10;\r\n\tvar nh = h/10;\r\n\t\r\n\tctx.fillStyle = labelForeground;\r\n\tctx.textBaseline = \"top\";\r\n\tctx.textarea_wrap = \"hard\";\r\n\tctx.textarea_row = 2;\r\n\tctx.cols = 10;\r\n\tfor (i= 0; i < label.length; i++) {\r\n\t\ttxt = label[i][0];\r\n\t\tnewW = nw*label[i][1];\r\n\t\tnewH = nh*label[i][2];\r\n\t\tctx.font = \"11pt Bloomberg Prop Unicode I\";\r\n\t\twrapText(ctx,txt, newW,newH, wrapTextWidth, newH);\r\n\t}\r\n}", "function setLabel(props){\n //label content\n var labelAttribute = \"<h1>\" + props[expressed] +\n \"</h1>\" + expressed + \"</b>\";\n\n //create info label div\n var infolabel = d3.select(\"body\")\n .append(\"div\")\n .attr(\"class\", \"infolabel\")\n .attr(\"id\", props.adm1_code + \"_label\")\n .html(labelAttribute)\n\n var regionName = infolabel.append(\"div\")\n .attr(\"class\", \"labelname\")\n .html((props.NAME_1 + \" Region\").bold());\n }", "title() { return this.owner.name + \" - \" + this.label.replace('\\n', ' ') }", "function lblForName(text){\n\t\trandom = random+1;\n\t\tvar lblBasicConf1 = { id:\"lblForNm\"+random,text :text,isVisible:true,skin: \"lblBlackBold\"};\n\t\tvar lbllayoutConf1 = {containerWeight:40,hExpand:true,margin:[0,0,0,0],widgetAlignment:constants.WIDGET_ALIGN_MIDDLE_LEFT,contentAlignment :constants.CONTENT_ALIGN_MIDDLE_LEFT,padding:[2,0,0,0],vExpand: false,hExpand: true};//,percent:true\n\t\treturn new kony.ui.Label(lblBasicConf1, lbllayoutConf1, {});\t\n\t}", "_adjustLengthText(stText, limit) {\n if (stText.length > limit)\n return stText.slice(0, limit) + \"...\";\n else\n return stText;\n }", "_adjustLengthText(stText, limit) {\n if (stText.length > limit)\n return stText.slice(0, limit) + \"...\";\n else\n return stText;\n }", "function createLabel(height, bandwidth, redundant) {\n\t if (!height && !bandwidth) {\n\t return '';\n\t }\n\t\n\t var bandwidthString = toKbps(bandwidth) + ' kbps';\n\t var label = bandwidthString;\n\t\n\t if (height) {\n\t label = height + 'p';\n\t if (bandwidth && redundant) {\n\t label += ' (' + bandwidthString + ')';\n\t }\n\t }\n\t\n\t return label;\n\t}", "function shortenText (longText, maxCharLength) {\n const charLength = longText.length\n\n if (charLength > maxCharLength) {\n // If text is too long, then return the amount\n const splitArray = longText.split(' ')\n let charCounter = 0\n let i = 0\n for (i = 0; i < splitArray.length; i++) {\n if (charCounter + splitArray[i].length + 1 > maxCharLength) {\n break\n }\n charCounter += splitArray[i].length + 1\n }\n const shortenedText = splitArray.slice(0, i).join(' ') + ' ...'\n return shortenedText\n }\n // If text is right\n return longText\n}", "displayRender(label) {\n return label[label.length - 1]\n }", "function circle_add_label(l){\n circle.html('')\n circle.css({ width: \"80px\", height: \"80px\"})\n circle.html(\"<small class='text-white'>\" + l + \"</small>\")\n \n }", "function addlbl() {\n}", "function calculateMaxLabelWidth(xcpPage, stepConfig, fieldLables) {\r\n var labelWidth = 0; //Default label width.\r\n var el = xcpPage.getEl();\r\n var textMetrics = new Ext.util.TextMetrics(el);\r\n textMetrics.measure.addCls(\"x-form-item-label\");\r\n\r\n var width;\r\n for (var i = 0; i < fieldLables.length; i++) {\r\n //Calculate label width in pixels.\r\n width = textMetrics.getWidth(fieldLables[i]);\r\n if (width > labelWidth)\r\n labelWidth = width;\r\n }\r\n console.log(\"Calculated max label width: \"+labelWidth);\r\n textMetrics.measure.removeCls(\"x-form-item-label\");\r\n textMetrics.destroy();\r\n return labelWidth;\r\n }", "function shortenTitle(sanatizedTitle) {\n return sanatizedTitle.split(/\\s+/).slice(0, 5).join(\" \")\n}", "function shortenText(body, maxlength) {\n return (body.length > maxlength) ? body.substring(0, maxlength) + '...' : body;\n}", "function wrapText(circles, labeller) {\n return function() {\n var text = d3Selection.select(this),\n data = text.datum(),\n width = circles[data.sets[0]].radius || 50,\n label = labeller(data) || '';\n\n var words = label.split(/\\s+/).reverse(),\n maxLines = 3,\n minChars = (label.length + words.length) / maxLines,\n word = words.pop(),\n line = [word],\n joined,\n lineNumber = 0,\n lineHeight = 1.1, // ems\n tspan = text.text(null).append(\"tspan\").text(word);\n\n while (true) {\n word = words.pop();\n if (!word) break;\n line.push(word);\n joined = line.join(\" \");\n tspan.text(joined);\n if (joined.length > minChars && tspan.node().getComputedTextLength() > width) {\n line.pop();\n tspan.text(line.join(\" \"));\n line = [word];\n tspan = text.append(\"tspan\").text(word);\n lineNumber++;\n }\n }\n\n var initial = 0.35 - lineNumber * lineHeight / 2,\n x = text.attr(\"x\"),\n y = text.attr(\"y\");\n\n text.selectAll(\"tspan\")\n .attr(\"x\", x)\n .attr(\"y\", y)\n .attr(\"dy\", function(d, i) {\n return (initial + i * lineHeight) + \"em\";\n });\n };\n}", "_updateTitle(text, limit, tooltipLimit) {\n this.hasTooltip = !!limit && !!text && text.length > limit;\n if (this.hasTooltip) {\n this.setAttribute('title', text.substr(0, tooltipLimit));\n } else {\n this.removeAttribute('title');\n }\n }", "function newAnchorLabel() {\n count = ++that.anchor_count;\n anchor_label = strval((count + 1)); //generating footnote number starting at 1 instead of 0\n /* yil original letter generating label code\n anchor_label = '';\n do {\n anchor_label = chr(ord('a') + (count % 26)) + anchor_label;\n count = (int) floor(count / 26);\n } while (count > 0);*/\n return anchor_label;\n }", "function rightLabels() {\n let labels = ['0.1', '0.2', '0.3', '0.4', '0.5', '0.6', '0.7', '0.8', '0.9'];\n // Solvent labels\n push();\n fill(128, 0, 128);\n textSize(18);\n for (let i = 0; i < labels.length; i++) {\n text(labels[i], 90 + 40 * (i + 1), 475);\n if (i == labels.length - 1) {\n textSize(22);\n text('solvent', 510, 460);\n }\n }\n pop();\n // Solute labels\n push();\n fill(0, 0, 255);\n textSize(18);\n for (let i = 0; i < labels.length; i++) {\n text(labels[i], 70, 450 - 40 * (i + 1));\n if (i == labels.length - 1) {\n textSize(22);\n noStroke();\n text('solute', 70, 40);\n }\n }\n pop();\n push();\n textSize(22);\n fill(255, 100, 0);\n noStroke();\n text('carrier', 35, 470)\n pop();\n push();\n textSize(22);\n text('solvent mass fraction', 200, 520);\n let angle1 = radians(270);\n translate(35, 350);\n rotate(angle1);\n text('solute mass fraction', 0, 0);\n pop();\n}", "function textTruncate(title, maxLength, subString) {\r\n\ttitle.each(function() {\r\n\t var $this = $(this),\r\n\t \ttext = $this.text();\r\n\r\n\t if (text.length > maxLength) {\r\n\t $this.text(text.substr(0, subString) + \"...\");\r\n\t }\r\n\t});\r\n}", "function add_shed_label(item) {\n ctx.fillText(\"SHED\", item[0], item[1]);\n }", "function scaleOrHideLabel(width) {\n if (width <= dateSmallSize) {\n $(\".img-date\").css(\"font-size\", \"10px\");\n imgDateSmall = true;\n\n if (width <= dateHiddenSize) {\n $(\".img-date\").hide();\n imgDateHidden = true;\n }\n }\n\n if (imgDateHidden && width > dateHiddenSize) {\n $(\".img-date\").show();\n imgDateHidden = false;\n }\n\n if (imgDateSmall && width > dateSmallSize) {\n $(\".img-date\").css(\"font-size\", \"14px\");\n imgDateSmall = false;\n }\n}", "function generateLabel(level, qualityLabels, redundant) {\n\t if (!level) {\n\t return '';\n\t }\n\t // Flash uses bitrate instead of bandwidth\n\t var bandwidth = level.bitrate || level.bandwidth;\n\t // Flash, in some cases, will create its own label. Prefer it over creating a new label\n\t return getCustomLabel(qualityLabels, bandwidth) || level.label || createLabel(level.height, bandwidth, redundant);\n\t}", "minimizeAllLabels() {\n if (!this._.showLabels) return;\n this.unselectSelectedLabel();\n for (const label of this._.labelSet) label.minimized = true;\n this.renderForAWhile();\n this.forceUpdate();\n }", "function translationLabels(){\n /** This help array shows the hints for this experiment */\n\t\t\t\thelpArray=[_(\"help1\"),_(\"help2\"),_(\"help3\"),_(\"help4\"),_(\"help5\"),_(\"Next\"),_(\"Close\")];\n scope.heading=_(\"Millikan's Oil Drop Experiment\");\n\t\t\t\tscope.variables=_(\"Variables\"); \n\t\t\t\tscope.result=_(\"Result\"); \n\t\t\t\tscope.copyright=_(\"copyright\");\n buttonTxt = [_(\"Start\"),_(\"Reset\"),_(\"Voltage On\"),_(\"Voltage Off\"), _(\"X Ray On\"), _(\"X Ray Off\")];\n scope.start_txt = buttonTxt[0];\n scope.oil_type_txt = _(\"Choose Oil Type\");\n scope.voltageOnOff_txt = buttonTxt[2];\n scope.adjustVoltage_txt = _(\"Adjust Voltage(KV): \");\n scope.xRay_txt = buttonTxt[4];\n scope.reset_txt = buttonTxt[1];\n scope.voltApplied_txt = _(\"Voltage Applied (v)\");\n\t\t\t\tscope.oilDensity_txt = _(\"Oil Density (kg/m\");\n scope.oil_type = [{\n oil:_(\"Olive Oil\"),\n index:0\n },{\n oil:_(\"Glycerin\"),\n index:1\n }];\n scope.$apply();\t\t\t\t\n\t\t\t}", "generateDetailsLabel() {\n var html = \"<table><tr><td><i class='material-icons speaking-android'>android</i></td><td><div class='speech-bubble'>Das Frachtstück \" + this.desc + \" gehört zu der Gruppe \" + this.group + \". Für die folgenden Eigenschaften habe ich die folgenden Koordinaten berechnet:<table class='speech-bubble-table'><tbody><tr><td>Länge:</td><td class='after-m'>\" + Styler.styleM(this.length) + \"</td></tr><tr><td>Breite:</td><td class='after-m'>\" + Styler.styleM(this.width) + \"</td></tr><tr><td>Höhe:</td><td class='after-m'>\" + Styler.styleM(this.height) + \"</td></tr><tr><td>Z-Koordinate (Länge):</td><td class='after-m'>\" + Styler.styleM(this.z) + \"</td></tr><tr><td>X-Koordinate (Tiefe):</td><td class='after-m'>\" + Styler.styleM(this.x) + \"</td></tr><tr><td>Y-Koordinate (Höhe):</td><td class='after-m'>\" + Styler.styleM(this.y) + \"</td></tr><tr><td>Folgenummer</td><td>\" + this.seqNr + \"</td></tr></tbody></table>\";\n if (this.isRotated) {\n html += \"das Gut wurde um die vertikale Achse rotiert\";\n } else {\n html += \"das Gut wurde nicht um die vertikale Achse rotiert\";\n }\n html += \"</div></td></tr></table>\";\n return html;\n }", "function pragraphs(valu,maxlengs){\n var a=valu.text().substr(0,maxlengs);\n valu.html(a+\"....\"+\"<span class='more'>\"+ \" read more\" + \"</span>\");\n $('.more').on('click',function(){\n $(this).parent('p').text('applly the last lessons i dont understand anything but a will try and try agine to be profisional in our work hello my friends this is my project to applly the last lessons i dont understand anything but a will try and try agine to be profisional in our work hello my friends this is my project to applly the last lessons i dont unde');\n });\n}", "truncDesc() {\n let description = this.props.data.description;\n if (description == null) {\n return \"\";\n }\n else if (description.length <= 105) {\n return description;\n }\n else if (description.split(\" \").length === 1) {\n return description.slice(0, 105) + \"...\";\n }\n let words = description.split(\" \");\n let letters = 0;\n let index = 0;\n while (letters <= 105 && index < words.length) {\n letters += words[index].length;\n index++;\n }\n return words.slice(0, index).join(\" \") + \"...\";\n }", "function toggleLabels() {\n if (!onBreak) {\n document.getElementById('top-label').innerText = times.breakMinutes + ' minute break coming up';\n document.getElementById('label').innerText = 'Session';\n } else {\n document.getElementById('top-label').innerText = times.sessionMinutes + ' minute session coming up';\n document.getElementById('label').innerText = 'Break';\n }\n }", "function formatLabels( nLabelColumnWidth )\n{\n makeFieldLabels( $( '.form-control,.list-unstyled', '#editUserForm' ) );\n\n // Set up display of password/confirm fields\n if ( g_sUsername == JSON.parse( localStorage.getItem( 'panelSpy.session' ) )['user']['username'] )\n {\n $( '#oldPassword' ).closest( '.form-group' ).show();\n g_sFocusId = 'oldPassword';\n }\n else\n {\n $( '#oldPassword' ).closest( '.form-group' ).hide();\n\n if ( g_sAction == 'update' )\n {\n g_sFocusId = 'password';\n }\n else\n {\n g_sFocusId = 'username';\n }\n }\n\n var sNew = ( g_sAction == 'update' ) ? 'New ' : '';\n var sPassword = sNew + 'Password';\n var sConfirm = 'Confirm ' + sPassword;\n\n $( 'label[for=password]' ).text( sPassword );\n $( '#password' ).attr( 'placeholder', sPassword );\n $( 'label[for=confirm]' ).text( sConfirm );\n $( '#confirm' ).attr( 'placeholder', sConfirm );\n\n // Turn off autocomplete\n $( 'input', '#editUserForm' ).attr( 'autocomplete', 'off' );\n\n // Customize responsive layout\n $( '.form-group>label' ).removeClass().addClass( 'control-label' ).addClass( 'col-sm-' + nLabelColumnWidth );\n $( '.form-control,.fakeFormControl', '#editUserForm' ).parent().removeClass().addClass( 'col-sm-' + ( 12 - nLabelColumnWidth ) );\n}", "get escapeLabelHTML() {\n return false;\n }", "function fLabel(result) {\n \tif(result != null){\n \t\tif(result.length > 7) result = result.substring(0,7);\n \t\tresult = result.toUpperCase();\n \t\tclickedCell.text(result);\n \t\tclickedCell.css(\"color\",\"black\");\n \t\tlabels.push(result);\n \t\tthis.edited = true;\n \t}\n }", "function updateLabels() {\n label = label.data(data.topics, function(d) { return d.name; });\n\n label.exit().remove();\n\n var labelEnter = label.enter().append(\"a\")\n .attr(\"class\", \"g-label\")\n .attr(\"href\", function(d) { return \"#\" + encodeURIComponent(d.name); })\n .call(force.drag)\n .call(linkTopic);\n\n labelEnter.append(\"div\")\n .attr(\"class\", \"g-name\")\n .text(function(d) { return d.name; });\n\n labelEnter.append(\"div\")\n .attr(\"class\", \"g-value\");\n\n label\n .style(\"font-size\", function(d) { return Math.max(8, r(d.count) / 2) + \"px\"; })\n .style(\"width\", function(d) { return r(d.count) * 2.5 + \"px\"; });\n\n // Create a temporary span to compute the true text width.\n label.append(\"span\")\n .text(function(d) { return d.name; })\n .each(function(d) { d.dx = Math.max(2.5 * r(d.count), this.getBoundingClientRect().width); })\n .remove();\n\n label\n .style(\"width\", function(d) { return d.dx + \"px\"; })\n .select(\".g-value\")\n .text(function(d) { return d.count + (d.r > 60 ? \" mentions\" : \"\"); });\n\n // Compute the height of labels when wrapped.\n label.each(function(d) { d.dy = this.getBoundingClientRect().height; });\n}", "_createSingleRowLabel(element) {\n\t\t\treturn element\n\t\t\t\t.append('text')\n\t\t\t\t.attr('class', 'label')\n\t\t\t\t.attr('text-anchor', 'end')\n\t\t\t\t.text((d) => {\n\t\t\t\t\treturn d.bacterium.latinName;\n\t\t\t\t});\n\t\t}", "function updateLabels() {\n label = label.data(data.topics, function(d) { return d.name; });\n\n label.exit().remove();\n\n var labelEnter = label.enter().append(\"a\")\n .attr(\"class\", \"g-label\")\n .attr(\"href\", function(d) { return \"#\" + encodeURIComponent(d.name); })\n .call(force.drag)\n .call(linkTopic);\n\n labelEnter.append(\"div\")\n .attr(\"class\", \"g-name\")\n .text(function(d) { return d.name; });\n\n labelEnter.append(\"div\")\n .attr(\"class\", \"g-value\");\n\n label\n .style(\"font-size\", function(d) { return Math.max(8, d.r / 2) + \"px\"; })\n .style(\"width\", function(d) { return d.r * 2.5 + \"px\"; });\n\n // Create a temporary span to compute the true text width.\n label.append(\"span\")\n .text(function(d) { return d.name; })\n .each(function(d) { d.dx = Math.max(d.r * 2.5, this.getBoundingClientRect().width); })\n .remove();\n\n label\n .style(\"width\", function(d) { return d.dx + \"px\"; })\n .select(\".g-value\")\n .text(function(d) { return formatShortCount(d.parties[0].count) + \" - \" + formatShortCount(d.parties[1].count); });\n\n // Compute the height of labels when wrapped.\n label.each(function(d) { d.dy = this.getBoundingClientRect().height; });\n}", "function updateLabels() {\n label = label.data(data.topics, function(d) { return d.name; });\n\n label.exit().remove();\n\n var labelEnter = label.enter().append(\"a\")\n .attr(\"class\", \"g-label\")\n .attr(\"href\", function(d) { return \"#\" + encodeURIComponent(d.name); })\n .call(force.drag)\n .call(linkTopic);\n\n labelEnter.append(\"div\")\n .attr(\"class\", \"g-name\")\n .text(function(d) { return d.name; });\n\n labelEnter.append(\"div\")\n .attr(\"class\", \"g-value\");\n\n label\n .style(\"font-size\", function(d) { return Math.max(8, d.r / 2) + \"px\"; })\n .style(\"width\", function(d) { return d.r * 2.5 + \"px\"; });\n\n // Create a temporary span to compute the true text width.\n label.append(\"span\")\n .text(function(d) { return d.name; })\n .each(function(d) { d.dx = Math.max(d.r * 2.5, this.getBoundingClientRect().width); })\n .remove();\n\n label\n .style(\"width\", function(d) { return d.dx + \"px\"; })\n .select(\".g-value\")\n .text(function(d) { return formatShortCount(d.parties[0].count) + \" - \" + formatShortCount(d.parties[1].count); });\n\n // Compute the height of labels when wrapped.\n label.each(function(d) { d.dy = this.getBoundingClientRect().height; });\n}", "function updateLabels() {\n label = label.data(data.topics, function(d) { return d.name; });\n\n label.exit().remove();\n\n var labelEnter = label.enter().append(\"a\")\n .attr(\"class\", \"g-label\")\n .attr(\"href\", function(d) { return \"#\" + encodeURIComponent(d.name); })\n .call(force.drag)\n .call(linkTopic);\n\n labelEnter.append(\"div\")\n .attr(\"class\", \"g-name\")\n .text(function(d) { return d.name; });\n\n labelEnter.append(\"div\")\n .attr(\"class\", \"g-value\");\n\n label\n .style(\"font-size\", function(d) { return Math.max(8, d.r / 2) + \"px\"; })\n .style(\"width\", function(d) { return d.r * 2.5 + \"px\"; });\n\n // Create a temporary span to compute the true text width.\n label.append(\"span\")\n .text(function(d) { return d.name; })\n .each(function(d) { d.dx = Math.max(d.r * 2.5, this.getBoundingClientRect().width); })\n .remove();\n\n label\n .style(\"width\", function(d) { return d.dx + \"px\"; })\n .select(\".g-value\")\n .text(function(d) { return formatShortCount(d.parties[0].count) + \" - \" + formatShortCount(d.parties[1].count); });\n\n // Compute the height of labels when wrapped.\n label.each(function(d) { d.dy = this.getBoundingClientRect().height; });\n}", "function updateLabels() {\n label = label.data(data.topics, function(d) { return d.name; });\n\n label.exit().remove();\n\n var labelEnter = label.enter().append(\"a\")\n .attr(\"class\", \"g-label\")\n .attr(\"href\", function(d) { return \"#\" + encodeURIComponent(d.name); })\n .call(force.drag)\n .call(linkTopic);\n\n labelEnter.append(\"div\")\n .attr(\"class\", \"g-name\")\n .text(function(d) { return d.name; });\n\n labelEnter.append(\"div\")\n .attr(\"class\", \"g-value\");\n\n label\n .style(\"font-size\", function(d) { return Math.max(8, d.r / 2) + \"px\"; })\n .style(\"width\", function(d) { return d.r * 2.5 + \"px\"; });\n\n // Create a temporary span to compute the true text width.\n label.append(\"span\")\n .text(function(d) { return d.name; })\n .each(function(d) { d.dx = Math.max(d.r * 2.5, this.getBoundingClientRect().width); })\n .remove();\n\n label\n .style(\"width\", function(d) { return d.dx + \"px\"; })\n .select(\".g-value\")\n .text(function(d) { return formatShortCount(d.parties[0].count) + \" - \" + formatShortCount(d.parties[1].count); });\n\n // Compute the height of labels when wrapped.\n label.each(function(d) { d.dy = this.getBoundingClientRect().height; });\n}", "function updateLabels() {\n label = label.data(data.topics, function(d) { return d.name; });\n\n label.exit().remove();\n\n var labelEnter = label.enter().append(\"a\")\n .attr(\"class\", \"g-label\")\n .attr(\"href\", function(d) { return \"#\" + encodeURIComponent(d.name); })\n .call(force.drag)\n .call(linkTopic);\n\n labelEnter.append(\"div\")\n .attr(\"class\", \"g-name\")\n .text(function(d) { return d.name; });\n\n labelEnter.append(\"div\")\n .attr(\"class\", \"g-value\");\n\n label\n .style(\"font-size\", function(d) { return Math.max(8, d.r / 2) + \"px\"; })\n .style(\"width\", function(d) { return d.r * 2.5 + \"px\"; });\n\n // Create a temporary span to compute the true text width.\n label.append(\"span\")\n .text(function(d) { return d.name; })\n .each(function(d) { d.dx = Math.max(d.r * 2.5, this.getBoundingClientRect().width); })\n .remove();\n\n label\n .style(\"width\", function(d) { return d.dx + \"px\"; })\n .select(\".g-value\")\n .text(function(d) { return formatShortCount(d.parties[0].count) + \" - \" + formatShortCount(d.parties[1].count); });\n\n // Compute the height of labels when wrapped.\n label.each(function(d) { d.dy = this.getBoundingClientRect().height; });\n}", "function updateLabels() {\n label = label.data(data.topics, function(d) { return d.name; });\n\n label.exit().remove();\n\n var labelEnter = label.enter().append(\"a\")\n .attr(\"class\", \"g-label\")\n .attr(\"href\", function(d) { return \"#\" + encodeURIComponent(d.name); })\n .call(force.drag)\n .call(linkTopic);\n\n labelEnter.append(\"div\")\n .attr(\"class\", \"g-name\")\n .text(function(d) { return d.name; });\n\n labelEnter.append(\"div\")\n .attr(\"class\", \"g-value\");\n\n label\n .style(\"font-size\", function(d) { return Math.max(8, d.r / 2) + \"px\"; })\n .style(\"width\", function(d) { return d.r * 2.5 + \"px\"; });\n\n // Create a temporary span to compute the true text width.\n label.append(\"span\")\n .text(function(d) { return d.name; })\n .each(function(d) { d.dx = Math.max(d.r * 2.5, this.getBoundingClientRect().width); })\n .remove();\n\n label\n .style(\"width\", function(d) { return d.dx + \"px\"; })\n .select(\".g-value\")\n .text(function(d) { return formatShortCount(d.parties[0].count) + \" - \" + formatShortCount(d.parties[1].count); });\n\n // Compute the height of labels when wrapped.\n label.each(function(d) { d.dy = this.getBoundingClientRect().height; });\n}" ]
[ "0.6853646", "0.6770334", "0.66363716", "0.65640783", "0.6360337", "0.6358234", "0.6248246", "0.6202889", "0.619546", "0.6188341", "0.61338395", "0.61211383", "0.6109526", "0.6108328", "0.6087851", "0.6076325", "0.60602385", "0.6060108", "0.6048226", "0.604727", "0.60344946", "0.6024618", "0.6015281", "0.60020095", "0.5974184", "0.5958933", "0.59544337", "0.5945", "0.5913509", "0.5910485", "0.5895983", "0.58866256", "0.58832455", "0.5875728", "0.58724177", "0.5863897", "0.5855601", "0.5838428", "0.5826282", "0.5817538", "0.5817342", "0.5812683", "0.5805503", "0.58017033", "0.5801115", "0.5796685", "0.579651", "0.57867247", "0.5785449", "0.57820207", "0.5774939", "0.5772969", "0.5772969", "0.57679784", "0.5765949", "0.5764127", "0.5763847", "0.57556313", "0.57550853", "0.57479143", "0.5744681", "0.5744311", "0.57420707", "0.5735049", "0.5720226", "0.5718567", "0.5718567", "0.57122064", "0.57109016", "0.56987506", "0.56975627", "0.5697342", "0.56931275", "0.569143", "0.5690579", "0.56863517", "0.5683204", "0.568179", "0.5681207", "0.56806326", "0.5664039", "0.5662887", "0.565474", "0.5651749", "0.5647992", "0.5636024", "0.5633771", "0.5624891", "0.562027", "0.5612151", "0.5611461", "0.5609231", "0.560267", "0.55995387", "0.5596824", "0.5596824", "0.5596824", "0.5596824", "0.5596824", "0.5596824" ]
0.6129448
11
Working with erase form.
function select_session_for_logout(session_id){ document.getElementById('user_sessions_logout_data').value = ''; document.getElementById('user_sessions_logout_data').value = session_id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function eraseFun(evt){\n if(evt.target.id === 'backspace'){ \n num = num.substring(0, num.length -1);\n screen.value = num;\n }\n // The CE button clears the entire string\n if(evt.target.id === 'clearNum'){\n num = '';\n screen.value = runningTotalInt;\n }\n // The CA Button clears the running total var\n if(evt.target.id === 'clearRunning'){\n num = '';\n runningTotalInt = 0;\n runningTotalStr = '';\n screen.value = '';\n } \n}", "function startOverEraseRecord() {\n var frm = document.frmEraseRecord;\n frm.eraseRecID.value = \"\";\n $(\"#btnStartOverEraseRec\").hide();\n $(\"#btnEraseRec\").show();\n $(\"#statusFormEraseRecord\").css(\"background-color\", \"lightgray\");\n $(\"#statusFormEraseRecord\").html(\"\");\n}", "function erase(erase){\n\tif(erase.value === \"off\"){\n\t\t//change value attribute of button tag\n\t\terase.value = \"on\";\n\t\t//change text between <button> and </button>\n\t\terase.textContent = \"Auto Erase: ON\";\n\t\t//set value of autoErase to true\n\t\tautoErase = true;\n\t}\n\telse{\n\t\t//change value attribute of button tag\n\t\terase.value = \"off\";\n\t\t//change text between <button> and </button>\n\t\terase.textContent = \"Auto Erase: OFF\";\n\t\t//set value of autoErase to false\n\t\tautoErase = false;\t\n\t}\n}", "function erase() {\n context.clearRect(0,0,canvas.width,canvas.height);\n}", "function eraseTag() {\n $(\"#userPageTitle\").html(\"NFC Erase Tag\");\n operation = \"erase\";\n var html = '<div class=\"container\" id=\"erasePage\">'\n html += '<div id=\"confirmation_div\" class=\"box\">'\n html += '<p>Are you sure you want to delete the content of this tag?</p>'\n html += '<span style=\"float:left;\" class=\"red\" onclick=\"NoErase()\">No</span>'\n html += '<span class=\"green\" onclick=\"yesErase()\">Yes</span>'\n html += '</div> '\n html += '<button id=\"eraseButton\" class = \"btn-danger red\" style =\"padding:10px 20px;display:none;\" > Erase Tag </button> </div >';\n\n $(\"#eraseTagContents\").html(html);\n $(\"#operationIcons\").css(\"display\", \"none\");\n $(\"#lockTagContents\").css(\"display\", \"none\");\n $(\"#crossButtonImage\").css(\"display\", \"block\");\n $(\"#writeTagContents\").css(\"display\", \"none\");\n $(\"#readTagContents\").css(\"display\", \"none\");\n $(\"#eraseTagContents\").css(\"display\", \"block\");\n $(\"#previousTagContents\").css(\"display\", \"none\");\n $(\"#crossButtonImageForHis\").css(\"display\", \"none\");\n\n}", "function clearFormExample(){\n $('#lcom_avatar_img').attr('disabled','disabled');\n loginLogger.debug('avatar choose DISABLED');\n\tprepareDataComm();\n}", "function wipe(){\n let erase = document.getElementById(\"visor\");\n\n erase.innerText = \"\";\n \n}", "function clear_canvas(undoVal) {\n ctx = undefined;\n perimeter = new Array();\n complete = false;\n $(\"#submitButton\").attr(\"disabled\", \"disabled\");\n document.getElementById('coordinates').value = '';\n start(false, undoVal);\n}", "eliminar() {\n if (this.app.keyCode == this.app.BACKSPACE) {\n this.contador -= 1;\n this.textBox = this.textBox.slice(0, -1);\n }\n\n this.contador += 1;\n\n if (this.app.keyCode == this.app.ENTER) {\n this.textBox = this.textBox + \"\\n\";\n this.contador = 0;\n\n }\n if (this.contador == 25 &&\n this.app.keyCode != this.app.BACKSPACE &&\n this.app.keyCode != this.app.ENTER) {\n this.textBox = this.textBox + \"\\n\";\n this.contador = 0;\n }\n\n }", "function erase_stimulus() {\n document.getElementById(\"stimul_input\").value=\"\";\n}", "function toggleErase() {\n\terasing = !erasing;\t\n\tif (erasing) {\n\t\tstate.penColor = \"#FFFFFF\";\n\t\tstate.penWidth = 20;\n\t\tstate.canvas.style.cursor = \"url('/images/eraser.png') 10 10, auto\";\n\t\teraseButton.innerText = \"Draw\";\n\t} else {\n\t\tstate.penColor = \"#000000\";\n\t\tstate.penWidth = 2;\n\t\tstate.canvas.style.cursor = \"crosshair\";\n\t\tstate.eraseButton.innerText = \"Erase\";\n\t}\n}", "function clean_editor () {\n canvas.clear();\n $('#imageLoader').val(null); // clear file upload\n $('#editor').hide(); // hide canvas\n $('#editor-menu').hide();\n $('#setBg').hide();\n\n $('#imgName').val('');\n $('#imgName').hide();\n\n $('#editor-menu #unfilterTool').hide();\n $('#filterTool').show();\n $('#fill').hide();\n\n $('#error_text_img').hide();\n $('#editor_title').show();\n $('#file-wrap').show();\n }", "function undo() {\n clear_canvas(true);\n complete = false;\n}", "function erase() {\nvar m = confirm(\"Sure to clear the Board?\");\nif (m) {\n ctx.clearRect(0, 0, w, h);\n socket.emit(\"clear_wb\"); //Announce to everyone in room to clear the board\n}\n}", "function eraseOne() {\n\n }", "function eraseMessages() {\n\tanswer.innerHTML = '';\n\teraseButton.style.display = 'none';\n}", "function eraseNewPartitionArtist() {\n\ttry {\n\t\t$(\"#new_partition_artist\").val(\"\");\n\t\tdocument.getElementById(\"new_partition_artist\").value = \"\";\n\t} finally {\n\t\t// nothing\n\t}\n}", "undo() {\n\t\tthis.editing = false;\n\t\tthis.query('.edit').value = this.text;\n\t}", "function abortEditing() {\n\t\t$('.editing').removeClass('editing');\n\t\t$('.edit').val('').off('keyup');\n\t}", "function deletKeyFunction(){\n\tanimateButtons('deleteKey');\n\tif(resText=='ans'){\n\t\tdeleteAll();\n\t}else if(v=='v'){\n\n\t\tnumberInstMemo=0;\n\t\toperations('z');\n\t\tresText='ans.';\n\t\t\n\n\t}else{\n\t\tnumberInstMemo=Math.floor(numberInstMemo/10);\n\n\t}\n\n\tlet splitResText=resText.split(\"\");\n\tlet lengthSplitResText=splitResText.length-1;\n\tresText=resText.substring(0, lengthSplitResText);\n\n\tdocument.getElementById(\"resText\").innerHTML = resText;\n\n}", "erase() {\n this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height)\n }", "function eraseText() {\n\t// Deletes the text in the textarea\n\tdocument.getElementById(\"input_notes\").value = \"\";\n\t// refresh the browser page\n\tlocation.reload();\n}", "function choose_mode_erase(event) {\n mode = 'erase';\n document.getElementById('icon-table').classList.remove('mode-fill');\n document.getElementById('icon-table').classList.remove('mode-paint');\n document.getElementById('icon-table').classList.add('mode-erase');\n mode_indicator();\n}", "function undo() \r\n {\r\n addressRef.value = address;\r\n roomNumberRef.value = roomNumber;\r\n seatsUsedRef.value = seatsUsed;\r\n seatsTotalRef.value = seatsTotal;\r\n updateTextfieldClasses();\r\n useAddress ? useAddressClassRef.MaterialCheckbox.check() : \"\";\r\n lightsOn ? lightsClassRef.MaterialSwitch.on() : \"\";\r\n heatingCoolingOn ? heatingCoolingClassRef.MaterialSwitch.on() : \"\"; \r\n \r\n snackbarContainer.MaterialSnackbar.cleanup_();\r\n }", "function deletesingle() {\r\n backspaceValue = form.display.value;\r\n form.display.value = backspaceValue.substr(0, backspaceValue.length - 1);\r\n}", "forget() {\n if (this.mode === 'addSection') {\n delete cd.g.addSectionForm;\n } else {\n delete this.target[CommentForm.modeToProperty(this.mode) + 'Form'];\n }\n removeFromArrayIfPresent(cd.commentForms, this);\n saveSession();\n navPanel.updateCommentFormButton();\n }", "function eraseData() {\n\t// show loading images\n\t$(\"resultsarea\").show();\n\t$(\"loadingmeaning\").show();\n\t$(\"loadinggraph\").show();\n\t$(\"loadingcelebs\").show();\n\t\t\n\t// resetting fields\n\t$(\"norankdata\").hide();\n\t$(\"meaning\").innerHTML = \"\";\n\t$(\"graph\").innerHTML = \"\";\n\t$(\"celebs\").innerHTML = \"\";\n\t$(\"errors\").innerHTML = \"\";\n}", "function eraseInput() {\n\tdocument.getElementById(\"inputItem\").value = \"\"\n}", "function cancelEditOperador(){\n\t\t $(\"#form_edit_operdor\")[0].reset();\n\t}", "function deleteE(eId) {\n document.getElementById(eId).innerHTML='';\n \n}", "function erase() {\n ctx.clearRect(0, 0, w, h);\n blankSketch = true;\n fillCanvas();\n}", "async _onDeleteKey(event) {\n if (!game.user.isTrusted) throw new Error(\"You may not delete drawings!\");\n let ids = this.controlled.map(obj => obj.id);\n if ( !ids.length ) return;\n return canvas.scene.deleteEmbeddedEntity('Drawing', ids);\n }", "function removeFormFromScreen() {\n const form = document.getElementById('dino-compare');\n form.innerHTML = '';\n }", "function cancelEditOpp() {\n clearEditOppForm();\n}", "function clearText(e){\n\t$.originalText.value= \"\";\n\t$.originalText.focus();\n\t$.encryptedText.text = \"\";\n\t$.label2.enabled = false;\n\t$.encryptedText.enabled = false;\n}", "function erase() {\n\tsetTimeout(function(){\n\t\t$('#messages').html('');\n\t\tchatray = [];\n\t\tnochatray = [];\n\t\ttoggle=0;\n\t}, 1000);\n\t$('#messages').html('<br><br><br><br><h1><span id=\"trgt1\">Secret</span> <br><span id=\"trgt2\">Messenger</span></h1>');\n\tcypher();\n}", "fileDeleted(){\n let form = this\n let file = ''\n $('#fileupload').bind('fileuploaddestroy', function (e, data) {\n // remove inputs named 'selected_files[]' that will interfere with the back end\n $(\"input[name='selected_files[]']\").remove();\n $(\"input[name='sf_ids']\").each(function(){\n $('div.fields-div').find(`input[name^='${$(this).val()}']`).remove();\n });\n //then remove yourself?\n // $(\"input[name='sf_ids']\").remove();\n });\n $('#fileupload').bind('fileuploaddestroyed', function (e, data) {\n // if student deletes uploaded primary file, we need to remove this param because the backend uses it to know when a browse-everything file is primary\n $('#be_primary_pcdm').remove();\n form.validatePDF()\n });\n\n $('#supplemental_fileupload').bind('fileuploaddestroy', function (e, data) {\n file = $(data.context).find('p.name span').text();\n });\n\n $('#supplemental_fileupload').bind('fileuploaddestroyed', function (e, data) {\n $('#supplemental_files_metadata tr').each(function(){\n if ($(this).find('td').first().text() === file) {\n $(this).remove();\n }\n });\n form.validateSupplementalFiles()\n })\n }", "clearForm() {\n // clear any previous highlighted row\n this.clearPrevHighlight();\n // clear the inputs\n $(\"#item_id\").val(0);\n $(\"#item_title\").val(\"\");\n $(\"#item_author_first_name\").val(\"\");\n $(\"#item_author_surname\").val(\"\");\n $(\"#item_year\").val(\"\");\n // disable buttons dependent on a table row having been clicked\n $(\"#btn_search\").prop(\"disabled\", true);\n $(\"#btn_add_item\").prop(\"disabled\", true);\n $(\"#btn_update_item\").prop(\"disabled\", true);\n $(\"#btn_delete_item\").prop(\"disabled\", true);\n // disable link to author page\n $(\"#link_current_author\").removeClass(\"text-primary\");\n $(\"#link_current_author\").addClass(\"text-muted\");\n // hide editions page\n $(\"#page_editions\").hide(\"slow\");\n }", "function clearEdits(){\n\n}", "function clearForm(){\n\n //Find all my form values and clear them!\n $(\".control\").val('');\n\n //Mark icons as not important\n UI.$btnImportant.removeClass(\"fas\");\n UI.$btnImportant.addClass('far');\n important = false;\n\n UI.$btnAlert.removeClass('fas');\n UI.$btnAlert.addClass(\"far\");\n alert = false;\n}", "function eliminar(){\r\n var asignar=document.formulario.valores.value;\r\n var nuevoValor=asignar.substring(0,asignar.length-1);\r\n document.getElementById(\"valores\").value=nuevoValor;\r\n }", "function toolsClear(name, clear, submit, copy, size, download) {\n var inout = $inout(name);\n var input = $input(name);\n var output = $output(name);\n clear.addEventListener(\n 'click',\n function() {\n if (inout) {\n inout.value = empty;\n inout.focus();\n } else if (output) {\n output.value = empty;\n input.value = empty;\n input.focus();\n }\n enable(submit);\n if (ifShowInline(copy)) {\n hide(copy);\n }\n if (size) {\n hide(size);\n }\n if (download) {\n hide(download);\n updateDownload(download);\n }\n },\n false\n );\n }", "function TouchEnKey_Clear(frmName,eleName) {\r\n\ttry\r\n\t{\r\n\t\tvar obj = document.getElementById(\"TouchEnKey\");\r\n\t obj.Clear(frmName, eleName, 0);\r\n\t}\r\n\tcatch(e)\r\n\t{\r\n\t}\r\n}", "function onDelete(e)\n{\n var evt = e ? e : event;\n var sel = evt.target ? evt.target : evt.srcElement;\n if(evt.keyCode && evt.keyCode == 46 || evt.which == 46) {\n var val = sel.value;\n if(sel.id==\"paletteList\")\n {\n removePalette(val);\n updatePaletteDom();\n redraw();\n }\n else if(sel.id==\"spriteList\")\n {\n removeSheet(val);\n updateSheetDom();\n redraw();\n }\n else if(sel.id==\"tileList\")\n {\n removeTiles(val);\n updateTileDom();\n redraw();\n }\n \n }\n \n}", "function deletePitch(){\n currentNeume.pitches.splice(currentPitchIndex, 1);\n \n currentPitchIndex = 0;\n \n document.getElementById(\"input\").innerHTML = pitchDataChangeForm();\n document.getElementById(\"meiOutput\").value = createMEIOutput();\n createSVGOutput();\n}", "function clearNoteChangingForm(){\n $('#note-changing-text-input').val(noNoteSelectedString);\n $('#note-changing-color-input').val(defaultColorHex);\n $('#note-changing-start-input').attr('value', \"\");\n $('#note-changing-end-input').attr('value', \"\");\n $('#note-changing-id').attr('value', \"\");\n\n $('#note-deleting-id').attr('value', \"\");\n}", "function clear() {\r\n msg.value = \"\";\r\n key.value = \"\";\r\n msgLen = 0;\r\n keyLen = 0;\r\n btn.disabled = true;\r\n}", "function undo(){\n canvas.clear();\n canvas.loadFromJSON(tempDesign);\n canva.renderAll();\n }", "function Delete(){\n\tcurrent = document.getElementById('screen').value = current.slice(0, -1);\n}", "async function undoEdgeFields() {\n readerForm.querySelector('.edge-group').remove();\n readerForm.querySelector('.undo-btn').remove();\n if (typeof visualGraph === 'object') visualGraph.destroy();\n document.querySelector('#adjacency-list').innerHTML = null;\n readerForm.querySelector('#numVertexes').disabled = false;\n readerForm.querySelector('#numEdges').disabled = false;\n readerForm.querySelector('button[type=\"submit\"]').innerHTML = 'Definir arestas';\n}", "function deleteCharacter() {\n setMatricula(matricula.slice(0, -1));\n setMatriculaLogada(matricula.slice(0, -1));\n if (matricula.length <= 1) {\n setInputVisible(false);\n setAluno({ auth: \"\", access: false, name: \"\" });\n }\n }", "function borradoElemento () {\n\t/*\n\tinit_listener_file_upload();\n\t$(\".combo_tipo_doc\").val(\"\");\n\tfileUploadPreview ();\n\t\n\t\n\t\tcloseFancy();\n\t\n\t*/\n}", "function removerrornow(j)\n {\n $('#reqspace').hide();\n reqerror[j]=1;\n errordisappear(id[j]);\n reqdisp=\"\";\n $('#reqspace').text(reqdisp);\n }", "function eraseNewPartitionName(){\n\ttry {\n\t\t$(\"#new_partition_name\").val(\"\");\n\t\tdocument.getElementById(\"new_partition_name\").value = \"\";\n\t} finally {\n\t\t// nothing\n\t}\n}", "function del(){\n document.getElementById(\"text-box\").value = \"\";\n }", "function pinchar(e) {\n\n document.getElementById(e.target.id).remove();\n txtBolasEliminadas.text(`Bolas Eliminadas : ${eliminadas+=1}`);\n }", "_deleteHandler(event) {\n const that = this,\n selectionStart = that.$.input.selectionStart,\n selectionEnd = that.$.input.selectionEnd,\n key = event.key;\n\n let newSelectionStart = selectionStart;\n\n that._preventDefault(event);\n\n if (selectionStart === selectionEnd) {\n if (key === 'Backspace') {\n for (let i = selectionStart; i > 0; i--) {\n const maskItem = that._mask[i - 1];\n\n if (maskItem.type === 'mask') {\n newSelectionStart = i - 1;\n maskItem.character = '';\n break;\n }\n else {\n newSelectionStart = selectionStart - 1;\n break;\n }\n }\n }\n else {\n for (let i = selectionStart; i < that._mask.length; i++) {\n const maskItem = that._mask[i];\n\n if (maskItem.type === 'mask') {\n newSelectionStart = i + 1;\n maskItem.character = '';\n break;\n }\n else {\n newSelectionStart = selectionStart + 1;\n break;\n }\n }\n }\n }\n else {\n that._cleanMask(selectionStart, selectionEnd);\n if (key === 'Delete') {\n newSelectionStart = selectionEnd;\n }\n }\n\n that._setMaskToInput();\n that._updateMaskFullAndCompleted();\n that.value = that._getValueWithTextMaskFormat({ start: 0, end: that._mask.length }, that.textMaskFormat);\n that.$.input.selectionStart = that.$.input.selectionEnd = newSelectionStart;\n }", "function fEliminar(){\n if (cPermisoPag != 1){\n fAlert(\"No tiene Permiso de ejecutar esta acción\");\n return;\n }\n\n if(lBandera == true){\n fAlert(\"No puede efectuar esta operación mientras se encuentre realizando otra transacción\");\n return;\n }\n\n frm.hdCveOpinionEntidad.value = \"\";\n frm.iCveSistema.value = \"\";\n frm.hdCveModulo.value = \"\";\n frm.iNumReporte.value = \"\";\n\n aDoc = FRMListado.fGetObjs(0);\n\n for(cont=0;cont < aDoc.length;cont++){\n if(aDoc[cont]){\n if (frm.hdCveOpinionEntidad.value==\"\") frm.hdCveOpinionEntidad.value=aResLis[cont][0]; else frm.hdCveOpinionEntidad.value+=\",\"+aResLis[cont][0];\n if (frm.iCveSistema.value==\"\") frm.iCveSistema.value=aResLis[cont][1]; else frm.iCveSistema.value+=\",\"+aResLis[cont][1];\n if (frm.hdCveModulo.value==\"\") frm.hdCveModulo.value=aResLis[cont][2]; else frm.hdCveModulo.value += \",\" + aResLis[cont][2];\n if (frm.iNumReporte.value==\"\" ) frm.iNumReporte.value=aResLis[cont][3]; else frm.iNumReporte.value+=\",\"+aResLis[cont][3];\n }\n }\n\n if (frm.iCveSistema.value == \"\"){\n fAlert ('\\nSeleccione al menos un registro para realizar esta operación.');\n return;\n }\n\n frm.hdBoton.value = \"Borrar\";\n frm.hdFiltro.value = \"\";\n if(fEngSubmite(\"pgGRLReporteXOpinion.jsp\",\"idElimina\")){\n FRMPanel.fSetTraStatus(\"UpdateComplete\");\n fDisabled(true);\n FRMListado.fSetDisabled(false);\n }\n\n fCargaListadoA();\n }", "function erase() {\n // Erase as long as there are characters left in typed_text\n if (char_index > 0) {\n if (!typing) set_typing(true);\n set_typed_text(text[text_index].substring(0, --char_index));\n setTimeout(erase, erase_delay);\n }\n // Go to next word and call type when finished\n else {\n set_typing(false);\n text_index++;\n if (text_index >= text.length) text_index = 0;\n setTimeout(type, type_delay + 1000);\n }\n }", "function removePoint(){//Removal of last polygon point\n $(\"#add_f\").attr(\"disabled\", false);//Enable the add point button\n var point_to_remove_id = parseInt(number_of_polygon_points);//Get the id of the last point\n if($(\"#x\"+point_to_remove_id).val() != \"\" || $(\"#y\"+point_to_remove_id).val() != \"\"){//Confirm that the user wants the removal of the last point\n var r = confirm(\"Το σημείο που θέλετε να αφαιρέσετε περιέχει τιμές. Είστε σίγουροι ότι θέλετε να ολοκληρώσετε την ενέργεια;\");\n if(!r){\n return;\n }\n }\n $(\"#\"+point_to_remove_id+\"f\").remove();//Remove the div of the point\n number_of_polygon_points--;\n if(number_of_polygon_points == 4){//If number of points is equal to 5 then the form is at its initial state \n $('#rem_f').attr(\"disabled\", true);//Disable add point(+) button\n $('#respol').attr(\"disabled\", true);//Disable reset form button \n }\n}", "function deleteNeume(){\n currentSyllable.neumes.splice(currentNeumeIndex, 1);\n \n currentNeumeIndex = 0;\n \n document.getElementById(\"input\").innerHTML = neumeDataChangeForm();\n document.getElementById(\"meiOutput\").value = createMEIOutput();\n createSVGOutput();\n}", "function cancelEditing() {\n $(\"#rightContainer\").html(\"\");\n}", "function addToDelete(src) {\n var formContents = document.getElementById('delete-selected-form').innerHTML;\n if (document.getElementById(src).style.opacity == '0.4') {\n var id = \"remove\" + src;\n var child = document.getElementById(id);\n child.parentNode.removeChild(child);\n\n deleteFormIndex--;\n document.getElementById(src).style.opacity = '1';\n } else {\n var newLine = \"<input type = 'hidden' name ='\" + deleteFormIndex + \"' value = \" + src + \" id ='remove\" + src + \"'>\";\n deleteFormIndex++;\n formContents += newLine;\n document.getElementById('delete-selected-form').innerHTML = formContents;\n document.getElementById(src).style.opacity = '0.4';\n } // if else\n\n if (deleteFormIndex == 0) {\n document.getElementById(\"delete-selected-button\").style.opacity = \"0.3\";\n document.getElementById(\"delete-selected-button\").disabled = true;\n } else {\n document.getElementById(\"delete-selected-button\").style.opacity = \"1\";\n document.getElementById(\"delete-selected-button\").disabled = false;\n } // if else\n} // addToDelete", "function eliminar_todo(){\n\tdocument.fo.valores.value=\"\";\n}", "clearCanvas() {\n this.effacerButton.addEventListener('click', (e) => {\n e.preventDefault();\n this.validerButton.style.display = 'none';\n //0 = décalage gauche Canvas, 0 = décalage Top idem, width && height du rectangle a effacer\n this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);\n });\n }", "function eraseWrongAnswer(){\n $('#wrong').remove();\n}", "function delInputCommon() {\r\n blocknumber.value = \"\";\r\n namespace.value = \"\";\r\n memo.value = \"\";\r\n amount.value = \"\";\r\n recipient.value = \"\";\r\n }", "clearAction(e) {\n if (!e.currentTarget.predelete) {\n e.currentTarget.predelete = 1;\n e.currentTarget.classList.add(\"predelete\");\n e.currentTarget.textContent = \"本当?\";\n } else {\n chrome.storage.local.clear();\n window.close();\n }\n }", "function eraseAll() {\n for (let i = 0; i < eraseQ.length; i++) {\n const cx = document.getElementById(eraseQ[i]).getContext(\"2d\");\n cx.clearRect(0, 0, 44, 76);\n }\n eraseQ = [];\n}", "function deleteImage(key){\n\tformid = 'form'+key;\n\tmpdeleteid = 'mpdelete'+key;\n\tdocument.getElementById(mpdeleteid).value = '1';\n\tdocument.getElementById(formid).submit();\n}", "function _exitEditingMode() {\n delete cmsobj.editingmode;\n\n $('body').removeClass('editmode');\n $('#global-substitutions').remove(); // Not sure why, but this is needed otherwise it ends up with multiple instances\n \n if( _$smSaveAsPanel.hasClass(\"active\") ) {\n // Close the SaveAs RHS dialog if it's open\n _toggleSmSaveAsPanelVisibility();\n $('#sm-ninja-editor-requested-content').remove();\n }\n\n $(\"#image_preview_container\").remove();\n\n $(\"#ckeditor_toolbar\").remove();\n $('#ckedit').remove(); // Remove the ckeditor\n\n mov.section.cms.hideSmSidebarRight(); // hide the right sidebar\n mov.section.cms.showSmSidebarLeft(); // And show the left one\n\n $('#sm_overlay').remove();\n }", "static delete() {\n // Ensuring that the current screen is NOT empty\n if (curr_o !== \"\") {\n // By chance if the last character is an operator, oppr is assigned none\n if (operators.includes(curr_o[curr_o.length - 1])) {\n oppr = \"\";\n }\n curr_o = curr_o.substr(0, curr_o.length - 1);\n Calc.dispcurr(curr_o);\n }\n // Pop the last character from previous screen if the current screen is empty\n else {\n // By chance if the last character is an operator\n if (operators.includes(prev_o[prev_o.length - 1])) {\n oppr = \"\";\n }\n prev_o = prev_o.substr(0, prev_o.length - 1);\n Calc.dispprev(prev_o);\n }\n return;\n }", "function removeEquation(index) {\n var equation = points[index];\n points[index] = null;\n\n // Remove points from canvas\n for (var i = 0; i < equation.length; i++) {\n ctx.clearRect(equation[i][0] - 8, equation[i][1] - 8, 16, 16);\n }\n\n document.querySelector(\"#remove\" + index).remove();\n\n if (document.getElementById(\"editor\").childElementCount === 0) {\n document.getElementById(\"calculate\").style.display = \"none\";\n }\n}", "function uniPrograms_Clear_FromData()\r\n{\r\n\tclearFields(\"uniProgram_form\");\r\n\t//remove Delete Button\r\n\tremove_child_Elements('uniPrograms-delete-btn');\r\n\taddValidationClass('uniProgram_form', 'uni_program_data_upload_file', 'validate-required');\r\n}", "function handleDeletion () {\n if ( ! self.cfg.delSelector )\n return true;\n //if ( $('#'+self.cfg.textareaId).is(':focus') )\n // return true;\n var\n selElem = $(svgRoot).find('.selected').first();\n if ( selElem.length === 0 || isReadOnly(selElem) )\n return true;\n var delElem = self.cfg.delSelector( selElem[0] );\n if ( typeof delElem === 'boolean' )\n return delElem;\n if ( delElem && self.cfg.delConfirm(delElem) ) {\n for ( var n=0; n<self.cfg.onDelete.length; n++ )\n self.cfg.onDelete[n](delElem);\n var editables = $('.editable');\n editables = editables.eq(editables.index(delElem)+1).addClass('prev-editing');\n if ( selElem.closest('.editing').length !== 0 )\n removeEditings();\n unselectElem(selElem);\n var elemPath = getElementPath(delElem);\n\n if ( self.cfg.delTask )\n self.cfg.delTask(delElem);\n else\n $(delElem).remove();\n\n registerChange('deleted '+elemPath);\n }\n return false;\n }", "function EraseAPoint()\n {\n ErasePointSound();\n\n elem = document.getElementById(\"pointsTakenId2\");\n // elem.Value = pts1.length;\n \n\n switch(MeasureStep)\n {\n case 0:\n pts1.pop();\n elem.value = pts1.length;\n if(pts1.length<pointsNeededVal){\n $(\"#CalculateResultId .btn-green\").css('background','#F1F1F1'); \n $(\"#CalculateResultId\").unbind(\"click\");\n\n } \n \n break;\n case 1:\n pts2.pop();\n elem.value = pts2.length;\n break;\n case 2:\n pts3.pop();\n elem.value = pts3.length;\n break;\n case 3:\n pts4.pop(d);\n elem.value = pts4.length;\n break;\n } \n \n \n }", "function destroykey(elm)\n {\n // Remove key span\n elm.keyicon.remove();\n \n // Set icon to null\n elm.keyicon = null;\n \n // Remove key\n elm.key.remove();\n \n // Set to null\n elm.key = null;\n }", "function handleClearButton() {\n textArea.value = '';\n inputs.forEach(input => input.value = '');\n }", "function remove()\n\t\t{\n\t\t\t\n\t\t\tvar a1=$(element).find(\"#\"+lastid).get(0);\n\t\t\tvar a2=$(element).find(\"#\"+lastid.replace(\"g\",\"s\")).get(0);\n\t\t\ta2.innerHTML = \"\";\n\t\t\ta1.removeAttribute(\"style\");\n\t\t\ta1.removeAttribute(\"src\");\n\t\t\ta1.removeAttribute(\"type\");\n\t\t\ta1.removeAttribute(\"readonly\");\n\t\t\ta1.setAttribute(\"type\",\"text\");\t\n\t\t\ta1.setAttribute(\"value\",\"\");\n\t\t\ta1.value=\"\";\n\t\t\n\t\t}", "delete() {\n this.domElement.innerText = \"\";\n }", "function clear_form() {\n /* Insert */\n $(\"#instance_add\").val(\"\");\n $(\"#name_add\").val(\"\");\n $(\"#phone_add\").val(\"\");\n $(\"#insert_state\").removeClass(\"alert-success\");\n $(\"#insert_state\").addClass(\"alert-light\");\n $(\"#insert_state\").html(\"\");\n /* Import */\n $(\"#instance_irt\").val(\"\");\n $(\"#file_irt\").val(\"\");\n $(\"#import_state\").removeClass(\"alert-success\");\n $(\"#import_state\").addClass(\"alert-light\");\n $(\"#import_state\").html(\"\");\n /* Update */\n $(\"#name_upd\").val(\"\");\n $(\"#phone_upd\").val(\"\");\n $(\"#update_state\").removeClass(\"alert-success\");\n $(\"#update_state\").addClass(\"alert-light\");\n $(\"#update_state\").html(\"\");\n /* Remove */\n $(\"#id_to_remove\").val(\"\");\n $(\"#remove_state\").removeClass(\"alert-success\");\n $(\"#remove_state\").addClass(\"alert-light\");\n $(\"#remove_state\").html(\"\");\n}", "function preventPromptErasing(event, deleteKeyPressed)\n { \n if($(_consoleSelector)[0].selectionStart < _eraseLimit || $(_consoleSelector)[0].selectionEnd < _eraseLimit || (!deleteKeyPressed && $(_consoleSelector)[0].selectionStart == _eraseLimit || $(_consoleSelector)[0].selectionEnd == _eraseLimit))\n {\n event.preventDefault();\n $(_consoleSelector)[0].selectionStart = _eraseLimit;\n $(_consoleSelector)[0].selectionEnd = _eraseLimit;\n }\n }", "function deleteAll() {\n document.getElementById(\"texto\").value = \"\"; //el text area sera completamente borrado\n}", "escFunction(e){\r\n if (this.state.editMode) {\r\n if(e.keyCode === 27) {\r\n this.cancelEdits(e);\r\n }\r\n }\r\n }", "finishEditingText() {\n if (!this.editingText) return;\n this.editingText.finishEditing();\n\n if (this.editingText.content === '') {\n this.editingText.remove();\n }\n\n this.editingText = null;\n this.fireEvent('canvasModified');\n }", "function backspace(){\n document.getElementById('input').value=\"\";\n document.getElementById('answer').value=\"\";\n}", "function undo() {\n canDraw.erase();\n canOverlay.erase();\n canDraw.context.drawImage(canDraw.backupImageArray.pop().canvas, 0, 0);\n doneDrawing();\n updateScore();\n}", "function cancelarEdicionAsistencia(asistenciaId) {\n nombres.forEach(nombre => {\n $(\"#\" + nombre + asistenciaId)\n .children()\n .show();\n });\n $(\".borrar\").remove();\n $(\".form\" + asistenciaId).val('');\n\n $(\"#botonEditar\" + asistenciaId).show();\n $(\"#botonAceptar\" + asistenciaId).remove();\n $(\"#botonCancelar\" + asistenciaId).remove(); \n $(\"#editar-asistencia\" + asistenciaId).remove();\n}", "function eraseCorrectAnswer(){\n $('#right').remove();\n}", "erase(req, res) { \n\n this.tradeDao.eraseAll()\n .then(this.common.editSuccess(res))\n .catch(this.common.serverError(res));\n }", "function saveReset() {\n saveBtn.style.display = 'none';\n deleteBtn.style.display = 'inline-block';\n editDestinationID.contentEditable = 'false';\n editCommentID.contentEditable = 'false';\n editDestinationID.style.border = 'none';\n editCommentID.style.border = 'none';\n }", "function clearForm()\r\n{ \r\n // stores the inputs temporarily in case the user wants to undo the clearing\r\n let address = addressRef.value;\r\n let roomNumber = roomNumberRef.value;\r\n let seatsUsed = seatsUsedRef.value;\r\n let seatsTotal = seatsTotalRef.value;\r\n let useAddress = useAddressClassRef.MaterialCheckbox.inputElement_.checked;\r\n let lightsOn = lightsClassRef.MaterialSwitch.inputElement_.checked;\r\n let heatingCoolingOn = heatingCoolingClassRef.MaterialSwitch.inputElement_.checked;\r\n \r\n resetFields();\r\n \r\n let data = \r\n {\r\n message: 'Cleared.',\r\n timeout: 4000,\r\n actionHandler: undo,\r\n actionText: 'Undo'\r\n };\r\n toastRef.MaterialSnackbar.showSnackbar(data);\r\n \r\n /* Returns what the user entered before the clearing. */\r\n function undo() \r\n {\r\n addressRef.value = address;\r\n roomNumberRef.value = roomNumber;\r\n seatsUsedRef.value = seatsUsed;\r\n seatsTotalRef.value = seatsTotal;\r\n updateTextfieldClasses();\r\n useAddress ? useAddressClassRef.MaterialCheckbox.check() : \"\";\r\n lightsOn ? lightsClassRef.MaterialSwitch.on() : \"\";\r\n heatingCoolingOn ? heatingCoolingClassRef.MaterialSwitch.on() : \"\"; \r\n \r\n snackbarContainer.MaterialSnackbar.cleanup_();\r\n }\r\n}", "function deleteVariationPitch(){\n currentNeume.pitches[currentPitchIndex][currentVarSourceIndex].additionalPitches.splice(currentVarPitchIndex, 1);\n \n currentVarPitchIndex = 0;\n \n document.getElementById(\"input\").innerHTML = pitchDataChangeForm();\n document.getElementById(\"meiOutput\").value = createMEIOutput();\n createSVGOutput();\n}", "function eraseShape() {\r\n\tif (anySelected) {\r\n\t\tshapes.splice(shapes.indexOf(previousSelectedShape), 1);\r\n\t\tpreviousSelectedShape = null;\r\n\t\tdrawShapes();\r\n\t\tanySelected = false;\r\n\t}\r\n}", "function Edit_NotifyDestruction()\n{\n\t//always remove the mandatories\n\tif (this.MANDATORY_IMAGE && this.MANDATORY_IMAGE.parentNode)\n\t{\n\t\t//remove it from the parent\n\t\tthis.MANDATORY_IMAGE.parentNode.removeChild(this.MANDATORY_IMAGE);\n\t}\n\t//has mandatory caption?\n\tif (this.MANDATORY_CAPTION && this.MANDATORY_CAPTION.parentNode)\n\t{\n\t\t//remove it from the parent\n\t\tthis.MANDATORY_CAPTION.parentNode.removeChild(this.MANDATORY_CAPTION);\n\t}\n\t//has virtual key\n\tif (this.ShortCutKey)\n\t{\n\t\t//request parent form\n\t\tvar parentForm = this.InterpreterObject.GetParentFormObject();\n\t\t//valid?\n\t\tif (parentForm && parentForm.HTML)\n\t\t{\n\t\t\t//remove ourselves from the array\n\t\t\tparentForm.HTML.OnKeyDownListenerIds.Remove(this.id);\n\t\t}\n\t\t//no more key\n\t\tthis.ShortCutKey = false;\n\t}\n}", "function supprimerFonction() \n{\n\tidDeSupp.value = this.parentElement.parentElement.getElementsByTagName('p')[5].innerHTML;\n\t//console.log(this + 'SUPPRIMER'); \n\tformulaireSupp.submit();\n}", "function eraseCalcEqn(field) {\r\n\tsetTimeout(function(){\r\n\t\t$.post(app_path_webroot+'Design/calculation_equation_validate.php?pid='+pid, { field: field, action: 'erase' }, function(data){ });\r\n\t},500);\r\n}", "function clearOp() {\n document.getElementById('op').value = '';\n}", "function deactivateEditing() {\n\t$(\"#add_button\").remove();\n\t$(\"#ok\").remove();\n\t$(\"#cancel\").remove();\n $(\"#edit\").toggleClass(\"color\").toggleClass(\"color_discreet\"); \n}", "function deleteContent() {\n input.innerText = \"0\";\n output.innerText = \"0\";\n text_input = \"\";\n}", "function DDLightbarMenu_Erase()\n{\n\tvar formatStr = \"%\" + this.size.width + \"s\"; // For use with printf()\n\tconsole.print(\"\\1n\");\n\tvar curPos = { x: this.pos.x, y: this.pos.y };\n\tfor (var i = 0; i < this.size.height; ++i)\n\t{\n\t\tconsole.gotoxy(curPos.x, curPos.y++);\n\t\tprintf(formatStr, \"\");\n\t}\n\tconsole.gotoxy(curPos);\n}" ]
[ "0.65362966", "0.64395463", "0.64105535", "0.62217593", "0.6209199", "0.60521364", "0.6039817", "0.6035422", "0.6007958", "0.6007324", "0.59783643", "0.5971119", "0.5965625", "0.5953932", "0.5936535", "0.5925425", "0.59030104", "0.58825594", "0.5875108", "0.58619374", "0.5837627", "0.58363956", "0.58009404", "0.5790527", "0.57854515", "0.575253", "0.5744816", "0.5737865", "0.57286984", "0.57253134", "0.571315", "0.5705716", "0.57011306", "0.56783503", "0.56743693", "0.56674016", "0.56473684", "0.5646898", "0.5638781", "0.5638084", "0.56305563", "0.5627726", "0.56115025", "0.5594168", "0.557719", "0.5575991", "0.55752873", "0.55692625", "0.5567089", "0.55475056", "0.55471927", "0.5541963", "0.55395436", "0.5535535", "0.55328935", "0.55224234", "0.5506549", "0.5506293", "0.54989564", "0.5498432", "0.54921496", "0.5481678", "0.54769987", "0.54752207", "0.547051", "0.5466967", "0.5466176", "0.5465893", "0.5465346", "0.5464076", "0.5463331", "0.5460536", "0.545705", "0.54509014", "0.54402506", "0.543942", "0.54356915", "0.5434019", "0.54335356", "0.5427181", "0.54271287", "0.5425758", "0.54120713", "0.5410559", "0.5408763", "0.54085463", "0.54023266", "0.5395758", "0.5395027", "0.5394867", "0.538834", "0.5387276", "0.5379166", "0.5378935", "0.53776824", "0.5376138", "0.53733593", "0.53699434", "0.5359471", "0.5356411", "0.5355302" ]
0.0
-1
for some reason, the interaction between the random seed and the webgl pseduorandom function produces unpleasant looking artifacts (i.e. diagonal and occasionally horizontal lines) for certain values of the random seed the main cause seems to be when the random seed is less than 0.27 or so this fix doesn't 100% solve the problem (as there seems to be other causes as well), but it is rare enough to be acceptable for now
function generateRandomSeed(){ return Math.random() * 0.73 + 0.27; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function random () {\n\t\n\tseed = 312541332155 * (4365216455 + seed) % 7654754253243312;\n\t\n\treturn 0.0000001 * (seed % 10000000);\n\t\n}", "function srandom() {\n randomSeed = (randomSeed * 9301 + 49297) % 233280;\n return randomSeed / 233280;\n}", "function rnd() \n{\n\t\t\n rnd.seed = (rnd.seed*9301+49297) % 233280;\n return rnd.seed/(233280.0);\n}", "function random() {\n\t\tseed = Math.sin(seed) * 10000;\n\t\treturn seed - Math.floor(seed);\n\t}", "function seededRandom()\n{\n m_z = (36969 * (m_z & 65535) + (m_z >> 16)) & mask;\n m_w = (18000 * (m_w & 65535) + (m_w >> 16)) & mask;\n var result = ((m_z << 16) + m_w) & mask;\n result /= 4294967296;\n return result + 0.5;\n}", "randomize(width, height, pxBox, probability=0.6) {\n // Helper function to set up two-way edges\n function connectVerts(v0, v1) {\n v0.edges.push(new Edge(v0, v1));\n v1.edges.push(new Edge(v1, v0));\n }\n\n let count = 0;\n\n // Build a grid of verts\n let grid = [];\n for (let y = 0; y < height; y++) {\n let row = [];\n for (let x = 0; x < width; x++) {\n let v = new Vertex();\n //v.value = 'v' + x + ',' + y;\n v.value = 'v' + count++;\n row.push(v);\n }\n grid.push(row);\n }\n\n\n // Last pass, set the x and y coordinates for drawing\n const boxBuffer = 0.8;\n const boxInner = pxBox * boxBuffer;\n const boxInnerOffset = (pxBox - boxInner) / 2 + 5;\n\n for (let y = 0; y < height; y++) {\n for (let x = 0; x < width; x++) {\n grid[y][x].pos = {\n 'x': (x * pxBox + boxInnerOffset + Math.random() * boxInner) | 0,\n 'y': (y * pxBox + boxInnerOffset + Math.random() * boxInner) | 0\n };\n }\n }\n\n // Go through the grid randomly hooking up edges\n for (let y = 0; y < height; y++) {\n for (let x = 0; x < width; x++) {\n // Connect down\n if (y < height - 1) {\n if (Math.random() < probability) {\n connectVerts(grid[y][x], grid[y+1][x]);\n }\n }\n\n // Connect right\n if (x < width - 1) {\n if (Math.random() < probability) {\n connectVerts(grid[y][x], grid[y][x+1]);\n }\n }\n }\n }\n\n\n // Finally, add everything in our grid to the vertexes in this Graph\n for (let y = 0; y < height; y++) {\n for (let x = 0; x < width; x++) {\n this.vertexes.push(grid[y][x]);\n }\n }\n }", "function randomColor(seed){\n var s = parseFloat('0.'+seed);\n const randomColor = '#'+Math.floor(s*16777215).toString(16);\n return randomColor;\n}", "randomize(width, height, pxBox, probability=0.6) {\n // Helper function to set up two-way edges\n function connectVerts(v0, v1) {\n v0.edges.push(new Edge(v1));\n v1.edges.push(new Edge(v0));\n }\n\n let count = 0;\n this.vertexes.length = 0;\n\n // Build a grid of verts\n let grid = [];\n for (let y = 0; y < height; y++) {\n let row = [];\n for (let x = 0; x < width; x++) {\n let v = new Vertex();\n //v.value = 'v' + x + ',' + y;\n v.value = 'v' + count++;\n row.push(v);\n }\n grid.push(row);\n }\n\n // Go through the grid randomly hooking up edges\n for (let y = 0; y < height; y++) {\n for (let x = 0; x < width; x++) {\n // Connect down\n if (y < height - 1) {\n if (Math.random() < probability) {\n connectVerts(grid[y][x], grid[y+1][x]);\n }\n }\n\n // Connect right\n if (x < width - 1) {\n if (Math.random() < probability) {\n connectVerts(grid[y][x], grid[y][x+1]);\n }\n }\n }\n }\n\n // Last pass, set the x and y coordinates for drawing\n const boxBuffer = 0.8;\n const boxInner = pxBox * boxBuffer;\n const boxInnerOffset = (pxBox - boxInner) / 2;\n\n for (let y = 0; y < height; y++) {\n for (let x = 0; x < width; x++) {\n grid[y][x].pos = {\n 'x': (x * pxBox + boxInnerOffset + Math.random() * boxInner) | 0,\n 'y': (y * pxBox + boxInnerOffset + Math.random() * boxInner) | 0\n };\n }\n }\n\n // Finally, add everything in our grid to the vertexes in this Graph\n for (let y = 0; y < height; y++) {\n for (let x = 0; x < width; x++) {\n this.vertexes.push(grid[y][x]);\n }\n }\n }", "function replaceMathRandom() {\n Math.random = seededRandom(6);\n }", "function random() {\n var x = Math.sin(seed++) * 10000;\n return x - Math.floor(x);\n}", "function randSeed() {\n return Math.floor(65536 * Math.random());\n}", "function randomColorGen(){\n // return `#${Math.floor(Math.random()*16777215).toString(16)}`;\n return \"#\" + Math.random().toString(16).slice(2, 8)\n}", "onTransitionStart() {\n this.seed = Math.random() * 45000;\n }", "randomize(width, height, pxBox, probability=0.6) {\n\t\t// Helper function to set up two-way edges\n\t\tfunction connectVerts(v0, v1) {\n\t\t\tv0.edges.push(new Edge(v1));\n\t\t\tv1.edges.push(new Edge(v0));\n\t\t}\n\n\t\tlet count = 0;\n\n\t\t// Build a grid of verts\n\t\tlet grid = [];\n\t\tfor (let y = 0; y < height; y++) {\n\t\t\tlet row = [];\n\t\t\tfor (let x = 0; x < width; x++) {\n\t\t\t\tlet v = new Vertex();\n\t\t\t\t//v.value = 'v' + x + ',' + y;\n\t\t\t\tv.value = 'v' + count++;\n\t\t\t\trow.push(v);\n\t\t\t}\n\t\t\tgrid.push(row);\n\t\t}\n\n\t\t// Go through the grid randomly hooking up edges\n\t\tfor (let y = 0; y < height; y++) {\n\t\t\tfor (let x = 0; x < width; x++) {\n\t\t\t\t// Connect down\n\t\t\t\tif (y < height - 1) {\n\t\t\t\t\tif (Math.random() < probability) {\n\t\t\t\t\t\tconnectVerts(grid[y][x], grid[y+1][x]);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Connect right\n\t\t\t\tif (x < width - 1) {\n\t\t\t\t\tif (Math.random() < probability) {\n\t\t\t\t\t\tconnectVerts(grid[y][x], grid[y][x+1]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Last pass, set the x and y coordinates for drawing\n\t\tconst boxBuffer = 0.8;\n\t\tconst boxInner = pxBox * boxBuffer;\n\t\tconst boxInnerOffset = (pxBox - boxInner) / 2;\n\n\t\tfor (let y = 0; y < height; y++) {\n\t\t\tfor (let x = 0; x < width; x++) {\n\t\t\t\tgrid[y][x].pos = {\n\t\t\t\t\t'x': (x * pxBox + boxInnerOffset + Math.random() * boxInner) | 0,\n\t\t\t\t\t'y': (y * pxBox + boxInnerOffset + Math.random() * boxInner) | 0\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\t// Finally, add everything in our grid to the vertexes in this Graph\n\t\tfor (let y = 0; y < height; y++) {\n\t\t\tfor (let x = 0; x < width; x++) {\n\t\t\t\tthis.vertexes.push(grid[y][x]);\n\t\t\t}\n\t\t}\n\t}", "randomColor() {\n /*\n Uncomment for random shades of blue\n\n h = 215;\n s = Math.floor(Math.random() * 100);\n l = 60 // Math.floor(Math.random() * 100);\n return 'hsl(' + h + ', ' + s + '%, ' + l + '%)';\n */\n return ('#' + (Math.random() * 0xFFFFFF << 0).toString(16) + '000000').slice(0, 7);\n }", "function SeededRandom(){}", "function pseudoRandom(seed) {\n seed = (seed * 9301 + 49297) % 233280;\n return seed / 233280.0;\n }", "function RandomVividColor() {\n\n\tlet rFactor = Math.random();\n\tlet gFactor = Math.random();\n\tlet bFactor = Math.random();\n\n\tlet sumFactors = rFactor + gFactor + bFactor;\n\n\trFactor = 1.5 * rFactor / sumFactors;\n\tgFactor = 1.5 * gFactor / sumFactors;\n\tbFactor = 1.5 * bFactor / sumFactors;\n\n\tlet color = new THREE.Color(rFactor, gFactor, bFactor);\n\n\treturn color ;\n}", "function randomColorGenerator() {\n\t\t\t\t\t\t\treturn '#'\n\t\t\t\t\t\t\t\t\t+ (Math.random().toString(16) + '0000000')\n\t\t\t\t\t\t\t\t\t\t\t.slice(2, 8);\n\t\t\t\t\t\t}", "function random(seed) {\n if (typeof seed != \"undefined\") {\n var x = Math.sin(seed++) * 10000;\n return x - Math.floor(x);\n } else {\n return Math.random();\n }\n }", "function randomColorCode() {\n var colorCode = [\n 'FFEBFF','FFEBF5','FFEBEB','FFF5EB','FFFFEB','F5FFEB','EBFFEB','EBFFF5','EBFFFF','EBF5FF','EBEBFF','F5EBFF',\n 'FFCDFE','FFCDE5','FFCECD','FFE7CD','FEFFCD','E5FFCD','CDFFCE','CDFFE7','CDFEFF','CDE5FF','CECDFF','E7CDFF',\n 'FFAFFE','FFAFD6','FFB0AF','FFD8AF','FEFFAF','D6FFAF','AFFFB0','AFFFD8','AFFEFF','AFD6FF','B0AFFF','D8AFFF',\n 'FF91FE','FF91C7','FF9291','FFC991','FEFF91','C7FF91','91FF92','91FFC9','91FEFF','91C7FF','9291FF','C991FF',\n 'FF73FD','FF73B7','FF7573','FFBB73','FDFF73','B7FF73','73FF75','73FFBB','73FDFF','73B7FF','7573FF','BB73FF',\n 'FF55FD','FF55A8','FF5755','FFAC55','FDFF55','A8FF55','55FF57','55FFAC','55FDFF','55A8FF','5755FF','AC55FF',\n 'FF37FD','FF3799','FF3937','FF9D37','FDFF37','99FF37','37FF39','37FF9D','37FDFF','3799FF','3937FF','9D37FF',\n 'FF19FC','FF1989','FF1C19','FF8F19','FCFF19','89FF19','19FF1C','19FF8F','19FCFF','1989FF','1C19FF','8F19FF',\n 'FA00F7','FA007A','FA0300','FA8000','F7FA00','7AFA00','00FA03','00FA80','00F7FA','007AFA','0300FA','8000FA',\n 'DC00D9','DC006B','DC0300','DC7100','D9DC00','6BDC00','00DC03','00DC71','00D9DC','006BDC','0300DC','7100DC',\n 'BE00BC','BE005D','BE0200','BE6100','BCBE00','5DBE00','00BE02','00BE61','00BCBE','005DBE','0200BE','6100BE',\n 'A0009E','A0004E','A00200','A05200','9EA000','4EA000','00A002','00A052','009EA0','004EA0','0200A0','5200A0'\n ];\n _.shuffle(colorCode)\n var length = colorCode.length;\n var index = Math.floor( Math.random() * length );\n return colorCode[index];\n }", "getRandomColor() {\n return [Math.random()*this.particleColorMult[0]+this.particleColorMin[0],\n Math.random()*this.particleColorMult[1]+this.particleColorMin[1],\n Math.random()*this.particleColorMult[2]+this.particleColorMin[2], 1.0];\n }", "static randomFlSeed(seed, min, max) {\r\n seedrandom(seed, { global: true });\r\n let decimalPlaces = Math.pow(10 ,2); //Sets decimal place to 2\r\n let randomNo = Math.random() * (max - min) + min;\r\n return Math.floor(randomNo * decimalPlaces) / decimalPlaces;\r\n }", "function gen_random(){\r\n\treturn 0.3\r\n}", "function rand(){\n return Math.random()-0.5;\n }", "function generateRandomColorValues () {\n r = Math.round(Math.random() * (256));\n g = Math.round(Math.random() * (256));\n b = Math.round(Math.random() * (256));\n}", "function randomNotReally() {\n var x = Math.sin(seed++);\n return x - Math.floor(x);\n}", "function random()\n {\n m_z = (36969 * (m_z & 65535) + (m_z >> 16)) & mask;\n m_w = (18000 * (m_w & 65535) + (m_w >> 16)) & mask;\n var result = ((m_z << 16) + m_w) & mask;\n result /= 4294967296;\n return result + 0.5;\n }", "function randomInitialize() \r\n{\r\n\tradius = ((Math.random() * (maxRadius - minRadius)) + minRadius);\r\n\tcenter_x_pos = (Math.random() * ((maxCanvasWidth - radius) - (minCanvasWidth + radius)) + (minCanvasWidth + radius)) ;\r\n\tcenter_y_pos = (Math.random() * ((maxCanvasHeight - radius) - (minCanvasHeight + radius)) + (minCanvasHeight + radius)) ;\r\n\tcolour = colourArr[Math.round(Math.random() * colourArr.length)];\r\n\tdx = Math.round((Math.random()-.5)*dx);\t\t\t//\t-.5 to change value to +ve or -ve \t&\t*(2*dx) to speed it up\r\n\tdy = Math.round((Math.random()-.5)*dy);\t\t\t//\t-.5 to change value to +ve or -ve \t&\t*(2*dx) to speed it up\r\n\tif (dx === 0) \r\n\t{\r\n\t\tdx = 10;\r\n\t}\r\n\tif (dy === 0) \r\n\t{\r\n\t\tdy = 10;\r\n\t}\r\n}", "function pseudoRandom(seed){\n return (Math.pow(seed, 2) % 50515093);\n}", "function randomColor () {\nreturn Math.floor (Math.random() * 256) ;\n}", "generateGameSeed() {\n // clear existing seed\n this.gameSeed = '';\n\n // generate new game seed\n for (let i = 0; i < 20; i += 1) {\n this.gameSeed += this.gameSeedValues[Math.floor(Math.random() * 4)];\n }\n }", "function generateNumbers() {\n $(\"#generatedNumberArea\").empty();\n listNumbers.length = 0;\n var countNumbersGenerated = parseInt(document.getElementById(\"inpNumbersGenerated\").value);\n var seedNumber;\n\n if (document.getElementById(\"optradioDefaultJS\").checked) {\n for(i = 0; i < countNumbersGenerated; i++) {\n listNumbers[i] = Math.random();\n $(\"#generatedNumberArea\").append(listNumbers[i] + \"\\n\");\n }\n }\n\n // Random knihovny seedrandom.js\n if (document.getElementById(\"optradioSeedRandomJS\").checked) {\n // Nastavuje Math.random na GPNC zalozeny na ARC4, kteremu je nastaven automaticky seed pouzitim\n // aktualniho casu, statusu HTML DOM, a dalsich lokalnich informaci.\n var seedRandom = new Math.seedrandom();\n\n // Pokud byl zadán seed\n if (document.getElementById(\"inpSeedNumber\").value != \"\") {\n seedNumber = parseInt(document.getElementById(\"inpSeedNumber\").value);\n seedRandom = new Math.seedrandom(seedNumber);\n }\n\n for(i = 0; i < countNumbersGenerated; i++) {\n listNumbers[i] = seedRandom();\n $(\"#generatedNumberArea\").append(listNumbers[i] + \"\\n\");\n }\n }\n\n // Random Mersenne Twister knihovny Random.js\n if (document.getElementById(\"optradioMersenne\").checked) {\n // Pokud byl zadán seed (povinne)\n if (document.getElementById(\"inpSeedNumber\").value != \"\") {\n seedNumber = parseInt(document.getElementById(\"inpSeedNumber\").value);\n var engine = Random.engines.mt19937().seed(seedNumber);\n var random = new Random(engine);\n\n for(i = 0; i < countNumbersGenerated; i++) {\n listNumbers[i] = random.real(0, 1, false);\n $(\"#generatedNumberArea\").append(listNumbers[i] + \"\\n\");\n }\n }\n }\n\n if (document.getElementById(\"optradioChanceJS\").checked) {\n var chance;\n if (document.getElementById(\"inpSeedNumber\").value != \"\") {\n // Pokud byl zadan seed, nastav ho\n seedNumber = parseInt(document.getElementById(\"inpSeedNumber\").value);\n chance = new Chance(seedNumber);\n } else {\n // Pokud nebyl zadan seed, generuj nahodne\n chance = new Chance();\n }\n\n for(i = 0; i < countNumbersGenerated; i++) {\n listNumbers[i] = chance.random();\n $(\"#generatedNumberArea\").append(listNumbers[i] + \"\\n\");\n }\n }\n\n $(\"#btnTestExtremal\").prop('disabled', false);\n $(\"#btnTestDifference\").prop('disabled', false);\n $(\"#btnTestSpearman\").prop('disabled', false);\n $(\"#btnTestSerial\").prop('disabled', false);\n}", "function TinySplat(originX:int, originY:int, size:int, number:int) {\n\tvar MapTexture : Texture2D = gameObject.GetComponent(MeshRenderer).material.mainTexture;\n\tvar transp : float = 0.5;\n\tvar invtransp : float = 0.5;\n\tvar sourcePixel : Color = MapTexture.GetPixel(originX, originY);\n\tMapTexture.SetPixel(originX, originY, (ColorArray[Random.Range(0,ColorArray.length)]*transp) + (sourcePixel*invtransp) );\n\tfor (i=0; i<number; i++) {\n\t\tRandomJitterX = Random.Range(0, size)-(size/2);\n\t\tRandomJitterY = Random.Range(0, size)-(size/2);\n\t\tsourcePixel = MapTexture.GetPixel(originX+RandomJitterX, originY+RandomJitterY);\n\t MapTexture.SetPixel(originX+RandomJitterX, originY+RandomJitterY, (ColorArray[Random.Range(0,ColorArray.length)]*transp) + (sourcePixel*invtransp) );\n\t}\n}", "next_rand() {\n this.jitter_pos *= 10;\n if (this.jitter_pos > 10000000000)\n this.jitter_pos = 10;\n return (this.jitter * this.jitter_pos) % 1;\n }", "function generateRandomColor()\n{\n let randomColor = '#'+Math.floor(Math.random()*16777215).toString(16); //167777215 amount of colors that exisit black to white\n return randomColor;\n}", "function RandomColor() {\n\n\tlet rFactor = Math.random()\n\tlet gFactor = Math.random()\n\tlet bFactor = Math.random()\n\n\tlet color = new THREE.Color(rFactor, gFactor, bFactor);\n\n\treturn color ;\n}", "function colorGenerator() {\n var redColor = Math.floor(Math.random() * 256) + 1;\n var greenColor = Math.floor(Math.random() * 256) + 1;\n var blueColor = Math.floor(Math.random() * 256) + 1;\n var rgb = redColor + ', ' + greenColor + ', ' + blueColor;\n document.body.style.backgroundColor = 'rgb(' + [redColor, greenColor, blueColor].join(',') + ')';\n}", "function randomColor() {\n return `#${Math.floor(Math.random() * 16777215)\n .toString(16)\n .padStart(6, 0)}`;\n}", "function random() {\n\t\tr = (r + 0.1) % 1\n\t\treturn r\n\t}", "function randomColor() {\t\t\t\t\t\t\t\t// randomizes hex values\n\tlet color = \"#\";\n\tfor(i = 0; i < 6; i++) {\n\t\tcolor += Math.floor((Math.random() * 16)).toString(16);\n\t}\n\treturn color;\n}", "function randomizeParameters() {\n CS.strokeS=randomRGBA();\n CS.fillS=randomRGBA();\n CS.lineW=Math.floor(Math.random()*9)+1;\n CS.brushSize=Math.floor(Math.random()*99)+1;\n updateControls();\n // canvas.dispatchEvent(new Event('mousemove')); // trigger updating in place of the brush on the preview layer\n //TODO trigger redraw \"in-place\" on new random event\n }", "function resetMathRandom() {\n Math.random = mathRandom;\n }", "static randFloat () {\n return Math.random();\n }", "function randomColors() {\r\n return '#' + Math.floor(Math.random() * 16777215).toString(16);\r\n}", "function doubleRandom() {\n background(color1, 20);\n stroke(color2);\n fill(color2);\n var rand = 0;\n for (var i = 1; i < steps; i++) {\n point((width/steps) * i, (height / 2) + random(-rand, rand));\n rand = heart*random(-500, 500);\n }\n}", "function randomColor() {\n\t\treturn \"#\"+(0x1000000+(Math.random())*0xffffff).toString(16).substr(1,6);\n\t}", "function newpos() {\n // Wherever particles are injected, the tree will tend to grow faster\n // toward it. Ideally, particles wander in from infinity; the best we\n // could do is to have them wander in from the edge of the field.\n // But in order to have the rendering occur in a reasonable time when\n // the seed is small, without too much visible bias, we instead place\n // the particles in a coarse grid. The final tree will cover every\n // point on the grid.\n //\n // There's probably a better strategy than this.\n x = Math.floor(Math.random()*(width/seedResolution))*seedResolution;\n y = Math.floor(Math.random()*(height/seedResolution))*seedResolution;\n }", "function randomColor() {\n return \"#\" + Math.floor(Math.random() * 0xffffff).toString(16);\n}", "function main() {\n const canvas = document.getElementById(\"canvas\");\n \n // Initialize WebGL rendering context\n const gl = canvas.getContext(\"webgl\");\n if (!gl) {\n alert(\"WebGL initialization failed. Please check if your browser supports it.\");\n return;\n }\n \n // Initialize shader program and position buffer\n const shaderProgram = initShaderProgram(gl);\n const posBuffer = initBuffer(gl);\n \n // Initialize textures\n initTexture(gl);\n \n // Setup shader program with uniforms and vertices\n const uniforms = initUniforms(gl, shaderProgram, myUniforms);\n const program = {\n program: shaderProgram,\n vertices: gl.getAttribLocation(shaderProgram, \"vPosition\"),\n posBuffer: posBuffer\n }; \n prepareScene(gl, program, uniforms);\n \n \n // Setup uniform values\n setupUniforms(gl, uniforms, vars);\n \n // Resize canvas to proper size\n resize();\n \n // Render loop\n function render(elapsed) {\n // Calculate time values\n vars.dt = elapsed / 1000 - vars.time;\n vars.time = elapsed / 1000;\n \n // Update uniform values\n updateUniforms(gl, uniforms, vars);\n \n // Render to screen\n gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);\n requestAnimationFrame(render);\n }\n // Loop\n requestAnimationFrame(render);\n \n // Add fullscreen\n fullScreen();\n}", "function random () {\n return MIN_FLOAT * baseRandInt();\n }", "function randomColor(){\n return \"#\" + Math.round(Math.random() * 0xFFFFFF).toString(16);\n}", "function randBGColor(){\n var randomColor = \"#\"+((1<<24)*Math.random()|0).toString(16); \n document.body.style.setProperty('--main-bg-color', randomColor)\n}", "function setupShaders() {\r\n \r\n // define fragment shader in essl using es6 template strings\r\n var fShaderCode = `\r\n precision mediump float;\r\n varying vec4 v_Color;\r\n void main(void) {\r\n gl_FragColor = v_Color; // all fragments are white\r\n }\r\n `;\r\n \r\n // define vertex shader in essl using es6 template strings\r\n var vShaderCode = `\r\n attribute vec3 vertexPosition;\r\n attribute vec3 diffuse;\r\n attribute vec3 ambient;\r\n attribute vec3 specular;\r\n varying vec4 v_Color;\r\n uniform mat4 uModelMatrix; // the model matrix\r\n uniform mat4 view; // the view matrix\r\n uniform mat4 projection;\r\n uniform mat4 modelMatrix;\r\n uniform mat4 viewMatrix;\r\n // Apply lighting effect\r\n attribute highp vec3 Norm;\r\n attribute highp vec3 Half;\r\n attribute highp vec3 Light;\r\n attribute highp float n;\r\n\r\n void main(void) {\r\n // position \r\n gl_Position = projection * view * uModelMatrix * vec4(vertexPosition, 1.0);\r\n //color\r\n float NdotL = dot(normalize(vec3(view * uModelMatrix * vec4(Norm, 0.0))), normalize(vec3(view * uModelMatrix * vec4(Light, 0.0))));\r\n float NdotH = dot(normalize(vec3(view * uModelMatrix * vec4(Norm, 0.0))), normalize(vec3(view * uModelMatrix * vec4(Half, 0.0))));\r\n float maxNdotL = max(NdotL, 0.0);\r\n float maxNdotH = max(NdotH, 0.0);\r\n v_Color = vec4(ambient, 1.0) + vec4(diffuse * maxNdotL, 1.0) + vec4(specular * pow(maxNdotH, n), 1.0);\r\n \r\n }\r\n `;\r\n \r\n try {\r\n // console.log(\"fragment shader: \"+fShaderCode);\r\n var fShader = gl.createShader(gl.FRAGMENT_SHADER); // create frag shader\r\n gl.shaderSource(fShader,fShaderCode); // attach code to shader\r\n gl.compileShader(fShader); // compile the code for gpu execution\r\n\r\n // console.log(\"vertex shader: \"+vShaderCode);\r\n var vShader = gl.createShader(gl.VERTEX_SHADER); // create vertex shader\r\n gl.shaderSource(vShader,vShaderCode); // attach code to shader\r\n gl.compileShader(vShader); // compile the code for gpu execution\r\n \r\n if (!gl.getShaderParameter(fShader, gl.COMPILE_STATUS)) { // bad frag shader compile\r\n throw \"error during fragment shader compile: \" + gl.getShaderInfoLog(fShader); \r\n gl.deleteShader(fShader);\r\n } else if (!gl.getShaderParameter(vShader, gl.COMPILE_STATUS)) { // bad vertex shader compile\r\n throw \"error during vertex shader compile: \" + gl.getShaderInfoLog(vShader); \r\n gl.deleteShader(vShader);\r\n } else { // no compile errors\r\n var shaderProgram = gl.createProgram(); // create the single shader program\r\n gl.attachShader(shaderProgram, fShader); // put frag shader in program\r\n gl.attachShader(shaderProgram, vShader); // put vertex shader in program\r\n gl.linkProgram(shaderProgram); // link program into gl context\r\n\r\n if (!gl.getProgramParameter(shaderProgram, gl.LINK_STATUS)) { // bad program link\r\n throw \"error during shader program linking: \" + gl.getProgramInfoLog(shaderProgram);\r\n } else { // no shader program link errors\r\n gl.useProgram(shaderProgram); // activate shader program (frag and vert)\r\n vertexPositionAttrib = // get pointer to vertex shader input\r\n gl.getAttribLocation(shaderProgram, \"vertexPosition\"); \r\n modelMatrixULoc = gl.getUniformLocation(shaderProgram, \"uModelMatrix\"); // ptr to mmat\r\n view = gl.getUniformLocation(shaderProgram, \"view\"); // ptr to mmat\r\n projection = gl.getUniformLocation(shaderProgram, \"projection\"); // ptr to mmat\r\n\r\n gl.enableVertexAttribArray(vertexPositionAttrib); // input to shader from array\r\n //color\r\n diffuse = gl.getAttribLocation(shaderProgram, 'diffuse');\r\n gl.enableVertexAttribArray(diffuse);\r\n ambient = gl.getAttribLocation(shaderProgram, 'ambient');\r\n gl.enableVertexAttribArray(ambient);\r\n specular = gl.getAttribLocation(shaderProgram, 'specular');\r\n gl.enableVertexAttribArray(specular);\r\n\r\n //vectors\r\n Norm = gl.getAttribLocation(shaderProgram, 'Norm');\r\n gl.enableVertexAttribArray(Norm);\r\n Light = gl.getAttribLocation(shaderProgram, 'Light');\r\n gl.enableVertexAttribArray(Light);\r\n Half = gl.getAttribLocation(shaderProgram, 'Half');\r\n gl.enableVertexAttribArray(Half);\r\n n = gl.getAttribLocation(shaderProgram, 'n');\r\n gl.enableVertexAttribArray(n);\r\n } // end if no shader program link errors\r\n } // end if no compile errors\r\n } // end try \r\n \r\n catch(e) {\r\n console.log(e);\r\n } // end catch\r\n} // end setup shaders", "function seededRandom( s ) {\n\n\t\tif ( s !== undefined ) _seed = s;\n\n\t\t// Mulberry32 generator\n\n\t\tlet t = _seed += 0x6D2B79F5;\n\n\t\tt = Math.imul( t ^ t >>> 15, t | 1 );\n\n\t\tt ^= t + Math.imul( t ^ t >>> 7, t | 61 );\n\n\t\treturn ( ( t ^ t >>> 14 ) >>> 0 ) / 4294967296;\n\n\t}", "function rgbaRandom(){\n\tvar r = Math.floor(Math.random() * 255);\n \tvar g = Math.floor(Math.random() * 255);\n \tvar b = Math.floor(Math.random() * 255);\n \tvar a = roundDecimal(Math.random(), 2); // Get a num between 0-1 and use 2 decimals\n\treturn \"rgba(\"+ r +\",\"+ g +\",\"+ b +\",\"+ a +\")\";\n}", "newSeed() {\n return [\n Math.floor(this.prng.next() * 0x10000),\n Math.floor(this.prng.next() * 0x10000),\n Math.floor(this.prng.next() * 0x10000),\n Math.floor(this.prng.next() * 0x10000),\n ];\n }", "newSeed() {\n return [\n Math.floor(this.prng.next() * 0x10000),\n Math.floor(this.prng.next() * 0x10000),\n Math.floor(this.prng.next() * 0x10000),\n Math.floor(this.prng.next() * 0x10000),\n ];\n }", "function setupShaders() {\n \n // define vertex shader in essl using es6 template strings\n var vShaderCode = `\n attribute vec3 aVertexPosition; // vertex position\n attribute vec3 aVertexNormal; // vertex normal\n attribute vec2 aTextureCoord; // texture coordinate\n \n uniform mat4 umMatrix; // the model matrix\n uniform mat4 upvmMatrix; // the project view model matrix\n \n varying vec3 vWorldPos; // interpolated world position of vertex\n varying vec3 vVertexNormal; // interpolated normal for frag shader\n varying vec2 vTextureCoord; \n\n void main(void) {\n \n // vertex position\n vec4 vWorldPos4 = umMatrix * vec4(aVertexPosition, 1.0);\n vWorldPos = vec3(vWorldPos4.x,vWorldPos4.y,vWorldPos4.z);\n gl_Position = upvmMatrix * vec4(aVertexPosition, 1.0);\n\n // vertex normal (assume no non-uniform scale)\n vec4 vWorldNormal4 = umMatrix * vec4(aVertexNormal, 0.0);\n vVertexNormal = normalize(vec3(vWorldNormal4.x,vWorldNormal4.y,vWorldNormal4.z)); \n \n // texture\n vTextureCoord = aTextureCoord;\n }\n `;\n \n // define fragment shader in essl using es6 template strings\n var fShaderCode = `\n precision mediump float; // set float to medium precision\n\n // eye location\n uniform vec3 uEyePosition; // the eye's position in world\n \n // light properties\n uniform vec3 uLightAmbient; // the light's ambient color\n uniform vec3 uLightDiffuse; // the light's diffuse color\n uniform vec3 uLightSpecular; // the light's specular color\n uniform vec3 uLightPosition; // the light's position\n \n // material properties\n uniform vec3 uAmbient; // the ambient reflectivity\n uniform vec3 uDiffuse; // the diffuse reflectivity\n uniform vec3 uSpecular; // the specular reflectivity\n uniform float uShininess; // the specular exponent\n \n uniform sampler2D uSampler;\n \n // geometry properties\n varying vec3 vWorldPos; // world xyz of fragment\n varying vec3 vVertexNormal; // normal of fragment\n varying vec2 vTextureCoord; // texture coordinate\n \n uniform bool uUseTexture;\n // transparency?\n uniform float uAlpha;\n \n void main(void) {\n \n // ambient term\n vec3 ambient = uAmbient*uLightAmbient; \n \n // diffuse term\n vec3 normal = normalize(vVertexNormal); \n vec3 light = normalize(uLightPosition - vWorldPos);\n float lambert = max(0.0,dot(normal,light));\n vec3 diffuse = uDiffuse*uLightDiffuse*lambert; // diffuse term\n \n // specular term\n vec3 eye = normalize(uEyePosition - vWorldPos);\n vec3 halfVec = normalize(light+eye);\n float highlight = pow(max(0.0,dot(normal,halfVec)),uShininess);\n vec3 specular = uSpecular*uLightSpecular*highlight; // specular term\n \n // combine to output color\n vec3 colorOut = ambient + diffuse + specular; // no specular yet\n \t\tvec4 textureColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t)); \n \n // check if an object is using a texture\n \t\tif(uUseTexture){\n \t\t\tgl_FragColor = vec4(textureColor.rgb * colorOut, textureColor.a*uAlpha);\n \t\t}else{\n \t\t\tgl_FragColor = vec4(colorOut, uAlpha);\n \t\t}\n }\n `;\n \n try {\n var fShader = gl.createShader(gl.FRAGMENT_SHADER); // create frag shader\n gl.shaderSource(fShader,fShaderCode); // attach code to shader\n gl.compileShader(fShader); // compile the code for gpu execution\n\n var vShader = gl.createShader(gl.VERTEX_SHADER); // create vertex shader\n gl.shaderSource(vShader,vShaderCode); // attach code to shader\n gl.compileShader(vShader); // compile the code for gpu execution\n \n if (!gl.getShaderParameter(fShader, gl.COMPILE_STATUS)) { // bad frag shader compile\n throw \"error during fragment shader compile: \" + gl.getShaderInfoLog(fShader); \n gl.deleteShader(fShader);\n } else if (!gl.getShaderParameter(vShader, gl.COMPILE_STATUS)) { // bad vertex shader compile\n throw \"error during vertex shader compile: \" + gl.getShaderInfoLog(vShader); \n gl.deleteShader(vShader);\n } else { // no compile errors\n var shaderProgram = gl.createProgram(); // create the single shader program\n gl.attachShader(shaderProgram, fShader); // put frag shader in program\n gl.attachShader(shaderProgram, vShader); // put vertex shader in program\n gl.linkProgram(shaderProgram); // link program into gl context\n\n if (!gl.getProgramParameter(shaderProgram, gl.LINK_STATUS)) { // bad program link\n throw \"error during shader program linking: \" + gl.getProgramInfoLog(shaderProgram);\n } else { // no shader program link errors\n gl.useProgram(shaderProgram); // activate shader program (frag and vert)\n \n // locate and enable vertex attributes\n vPosAttribLoc = gl.getAttribLocation(shaderProgram, \"aVertexPosition\"); // ptr to vertex pos attrib\n gl.enableVertexAttribArray(vPosAttribLoc); // connect attrib to array\n vNormAttribLoc = gl.getAttribLocation(shaderProgram, \"aVertexNormal\"); // ptr to vertex normal attrib\n gl.enableVertexAttribArray(vNormAttribLoc); // connect attrib to array\n \n /**texture coord*/\n vTexAttribLoc = gl.getAttribLocation(shaderProgram, \"aTextureCoord\"); // ptr to vertex normal attrib\n gl.enableVertexAttribArray(vTexAttribLoc); // connect attrib to array\n \n // locate vertex uniforms\n mMatrixULoc = gl.getUniformLocation(shaderProgram, \"umMatrix\"); // ptr to mmat\n pvmMatrixULoc = gl.getUniformLocation(shaderProgram, \"upvmMatrix\"); // ptr to pvmmat\n /**texture*/\n samplerLoc = gl.getUniformLocation(shaderProgram, \"uSampler\");\n // locate fragment uniforms\n var eyePositionULoc = gl.getUniformLocation(shaderProgram, \"uEyePosition\"); // ptr to eye position\n var lightAmbientULoc = gl.getUniformLocation(shaderProgram, \"uLightAmbient\"); // ptr to light ambient\n var lightDiffuseULoc = gl.getUniformLocation(shaderProgram, \"uLightDiffuse\"); // ptr to light diffuse\n var lightSpecularULoc = gl.getUniformLocation(shaderProgram, \"uLightSpecular\"); // ptr to light specular\n var lightPositionULoc = gl.getUniformLocation(shaderProgram, \"uLightPosition\"); // ptr to light position\n ambientULoc = gl.getUniformLocation(shaderProgram, \"uAmbient\"); // ptr to ambient\n diffuseULoc = gl.getUniformLocation(shaderProgram, \"uDiffuse\"); // ptr to diffuse\n specularULoc = gl.getUniformLocation(shaderProgram, \"uSpecular\"); // ptr to specular\n shininessULoc = gl.getUniformLocation(shaderProgram, \"uShininess\"); // ptr to shininess\n /** ptr to using texture or not*/\n usetextureULoc = gl.getUniformLocation(shaderProgram, \"uUseTexture\"); \n /** issue with blending*/\n alphaULoc = gl.getUniformLocation(shaderProgram, \"uAlpha\");\n // pass global constants into fragment uniforms\n gl.uniform3fv(eyePositionULoc,Eye); // pass in the eye's position\n gl.uniform3fv(lightAmbientULoc,lightAmbient); // pass in the light's ambient emission\n gl.uniform3fv(lightDiffuseULoc,lightDiffuse); // pass in the light's diffuse emission\n gl.uniform3fv(lightSpecularULoc,lightSpecular); // pass in the light's specular emission\n gl.uniform3fv(lightPositionULoc,lightPosition); // pass in the light's position\n \n } // end if no shader program link errors\n } // end if no compile errors\n } // end try \n \n catch(e) {\n console.log(e);\n } // end catch\n} // end setup shaders", "function initGL() {\r\n var canvas = document.getElementById(\"webGLcanvas\");\r\n canvas.width = window.innerWidth - 30;\r\n canvas.height = Math.floor(window.innerHeight - 0.25 * window.innerHeight);\r\n try {\r\n gl = canvas.getContext(\"experimental-webgl\");\r\n gl.viewportWidth = canvas.width;\r\n gl.viewportHeight = canvas.height;\r\n } catch (e) {\r\n }\r\n if (!gl) {\r\n alert(\"cannot initialize webGL\");\r\n }\r\n\r\n document.onkeydown = handleKeyDown;\r\n document.onkeyup = handleKeyUp;\r\n canvas.onmousedown = handleMouseDown;\r\n document.onmouseup = handleMouseUp;\r\n document.onmousemove = handleMouseMove;\r\n\r\n // fragprogram = initShaders(\"perfrag-shader-fs\", \"perfrag-shader-vs\");\r\n vertprogram = initShaders(\"shader-fs\", \"shader-vs\");\r\n currentProgram = vertprogram;\r\n gl.clearColor(0.13, 0.13, 0.13, 1);\r\n gl.enable(gl.DEPTH_TEST);\r\n\r\n fpsInterval = 1000 / 15;\r\n then = Date.now();\r\n startTime = then;\r\n // initBuffer();\r\n cornerVertexPosBuffer = gl.createBuffer();\r\n pointLightPos = [\r\n rand(-3, 7),rand(-3, 7),rand(-3, 7),\r\n rand(-3, 7),rand(-3, 7),rand(-3, 7),\r\n rand(-3, 7),rand(-3, 7),rand(-3, 7),\r\n rand(-3, 7),rand(-3, 7),rand(-3, 7),\r\n rand(-3, 7),rand(-3, 7),rand(-3, 7),\r\n ];\r\n pointLightColor = [\r\n rand(0, 0.5),rand(0.4, 1),rand(0.4, 1),\r\n rand(0.4, 1),rand(0.4, 1),rand(0, 0.5),\r\n rand(0.4, 1),rand(0.4, 1),rand(0.4, 1),\r\n rand(0, 0.5),rand(0, 0.5),rand(0, 0.5),\r\n rand(0.4, 1),rand(0, 0.5),rand(0.4, 1),\r\n ];\r\n \r\n numPtLights = 5;\r\n\r\n animate();\r\n}", "constructor() {\n this.x = random(0, windowWidth);\n this.y = random(0, windowHeight);\n this.r = random(0, 2.5);\n this.xSpeed = random(-0.1, 0.5);\n this.ySpeed = random(-0.1, 0.5);\n }", "function randomColor() {\n return color = `rgba(${Math.floor(Math.random() * 256)}, ${Math.floor(Math.random() * 256)}, ${Math.floor(Math.random() * 256)}, ${Math.floor(Math.random() * 256)})`;\n}", "offsetVertices() {\r\n let offset;\r\n for (let i = 0; i < this.vertices.length; i++) {\r\n offset =\r\n Math.random() * ASTEROID_JAGGEDNESS * 2 + 1 - ASTEROID_JAGGEDNESS;\r\n this.vertices[i].x *= offset;\r\n this.vertices[i].y *= offset;\r\n }\r\n }", "getRandomColor () {\n return this.c.particlesColors[Math.floor(Math.random() * this.c.particlesColors.length)]\n }", "constructor(){\n this.x = (Math.random() * (745 - 51)) + 51;\n this.y = 25;\n this.v = 1 + Math.random() * 2;\n this.color = [16, 37, 66];\n }", "function rng() {\n return random();\n }", "function rng() {\n return random();\n }", "function seededRandom( s ) {\n\n\tif ( s !== undefined ) _seed = s;\n\n\t// Mulberry32 generator\n\n\tlet t = _seed += 0x6D2B79F5;\n\n\tt = Math.imul( t ^ t >>> 15, t | 1 );\n\n\tt ^= t + Math.imul( t ^ t >>> 7, t | 61 );\n\n\treturn ( ( t ^ t >>> 14 ) >>> 0 ) / 4294967296;\n\n}", "function crndf() {\n return (Math.random()-0.5)*2;\n}", "function main() {\n \n //math2d_test();\n \n /**\n ** Initialize WebGL Components\n **/\n \n // Retrieve <canvas> element\n var canvas = document.getElementById('webgl');\n\n // Get the rendering context for WebGL\n var gl = getWebGLContext(canvas);\n if (!gl) {\n console.log('Failed to get the rendering context for WebGL');\n return;\n }\n\n // Initialize shaders\n if (!initShadersFromID(gl, \"vertex-shader\", \"fragment-shader\")) {\n console.log('Failed to intialize shaders.');\n return;\n }\n\n // create GL buffer objects\n\t\n vBuffer_Pnt = gl.createBuffer();\n if (!vBuffer_Pnt) {\n console.log('Failed to create the buffer object');\n return -1;\n }\n\n vBuffer_Line = gl.createBuffer();\n if (!vBuffer_Line) {\n console.log('Failed to create the buffer object');\n return -1;\n }\n\tvBuffer_Tri = gl.createBuffer();\n\tif (!vBuffer_Tri) {\n console.log('Failed to create the buffer object');\n return -1;\n }\n\tvBuffer_Quad = gl.createBuffer();\n\tif (!vBuffer_Quad) {\n console.log('Failed to create the buffer object');\n return -1;\n }\n\tvBuffer_Select = gl.createBuffer();\n\tif (!vBuffer_Select) {\n console.log('Failed to create the buffer object');\n return -1;\n }\n\n var skeleton=true;\n if(skeleton)\n {\n document.getElementById(\"App_Title\").innerHTML += \"-Skeleton\";\n }\n\n // \\todo create buffers for triangles and quads...\n\n // Specify the color for clearing <canvas>\n gl.clearColor(0, 0, 0, 1);\n\n // Clear <canvas>\n gl.clear(gl.COLOR_BUFFER_BIT);\n\n // get GL shader variable locations\n var a_Position = gl.getAttribLocation(gl.program, 'a_Position');\n if (a_Position < 0) {\n console.log('Failed to get the storage location of a_Position');\n return -1;\n }\n\n var u_FragColor = gl.getUniformLocation(gl.program, 'u_FragColor');\n if (!u_FragColor) {\n console.log('Failed to get the storage location of u_FragColor');\n return;\n }\n\n /**\n ** Set Event Handlers\n **\n ** Student Note: the WebGL book uses an older syntax. The newer syntax, explicitly calling addEventListener, is preferred.\n ** See https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener\n **/\n // set event handlers buttons\n document.getElementById(\"LineButton\").addEventListener(\n \"click\",\n function () {\n curr_draw_mode = draw_mode.DrawLines;\n });\n\n document.getElementById(\"TriangleButton\").addEventListener(\n \"click\",\n function () {\n curr_draw_mode = draw_mode.DrawTriangles;\n }); \n\tdocument.getElementById(\"QuadButton\").addEventListener(\n \"click\",\n function () {\n curr_draw_mode = draw_mode.DrawQuads;\n });\n\t\n\tdocument.getElementById(\"DeleteButton\").addEventListener(\n \"click\",\n function () {\n curr_draw_mode = draw_mode.Delete;\n });\n \n document.getElementById(\"ClearScreenButton\").addEventListener(\n \"click\",\n function () {\n curr_draw_mode = draw_mode.ClearScreen;\n // clear the vertex arrays\n\t\t\t\twhile (select_point.length > 0)\n select_point.pop();\n\t\t\t\twhile (select_verts.length > 0)\n select_verts.pop();\n while (points.length > 0)\n points.pop();\n while (line_verts.length > 0)\n line_verts.pop();\n while (tri_verts.length > 0)\n tri_verts.pop();\n\t\t\t\twhile(quad_verts.length>0)//added quad verts functionality\n\t\t\t\t\tquad_verts.pop();\n\n gl.clear(gl.COLOR_BUFFER_BIT);\n \n curr_draw_mode = draw_mode.DrawLines;\n });\n \n //\\todo add event handlers for other buttons as required.... \n\n // set event handlers for color sliders\n /* \\todo right now these just output to the console, code needs to be modified... */\n document.getElementById(\"RedRange\").addEventListener(\n \"input\",\n function () {\n console.log(\"RedRange:\" + document.getElementById(\"RedRange\").value);\n });\n document.getElementById(\"GreenRange\").addEventListener(\n \"input\",\n function () {\n console.log(\"GreenRange:\" + document.getElementById(\"GreenRange\").value);\n });\n document.getElementById(\"BlueRange\").addEventListener(\n \"input\",\n function () {\n console.log(\"BlueRange:\" + document.getElementById(\"BlueRange\").value);\n }); \n \n // init sliders \n // \\todo this code needs to be modified ...\n document.getElementById(\"RedRange\").value = 0;\n document.getElementById(\"GreenRange\").value = 100;\n document.getElementById(\"BlueRange\").value = 0;\n \n // Register function (event handler) to be called on a mouse press\n canvas.addEventListener(\n \"mousedown\",\n function (ev) {\n\t\t\t\tif(ev.button === 0){\n handleMouseDown(ev, gl, canvas, a_Position, u_FragColor);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (ev.button === 2){\n\t\t\t\thandleMouseDown(ev, gl, canvas, a_Position, u_FragColor);\n\t\t\t\t//select=true;\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t});\n\tcanvas.addEventListener('contextmenu', function(e) {\n if (e.button === 2) {\n e.preventDefault();\n return false;\n }\n }, false);\n}", "static initializeGL()\n {\n // Create the renderer\n RPM.renderer = new THREE.WebGLRenderer({antialias: RPM.datasGame.system\n .antialias, alpha: true});\n RPM.renderer.autoClear = false;\n RPM.renderer.setSize(RPM.CANVAS_WIDTH, RPM.CANVAS_HEIGHT);\n if (RPM.datasGame.system.antialias)\n {\n RPM.renderer.setPixelRatio(2);\n }\n Platform.canvas3D.appendChild(RPM.renderer.domElement);\n }", "randomColor()\n {\n function r()\n {\n return Math.floor(Math.random() * 255)\n }\n return 'rgba(' + r() + ',' + r() + ',' + r() + ', 0.2)'\n }", "function randomColor(){\n return color3(Math.floor(Math.random()*256),\n Math.floor(Math.random()*256),\n Math.floor(Math.random()*256));\n}", "_random() {\n return Math.rnd();\n }", "function setupShaders() {\n \n // define vertex shader in essl using es6 template strings\n var vShaderCode = `\n attribute vec3 aVertexPosition; // vertex position\n \n uniform mat4 umMatrix; // the model matrix\n uniform mat4 upvmMatrix; // the project view model matrix\n\n uniform float xtranslate;\n uniform float ytranslate;\n uniform float ztranslate;\n \n varying vec3 vWorldPos; // interpolated world position of vertex\n\n void main(void) {\n \n vec4 vWorldPos4 = umMatrix * vec4(aVertexPosition, 1.0);\n vWorldPos = vec3(vWorldPos4.x,vWorldPos4.y,vWorldPos4.z);\n gl_Position = upvmMatrix * vec4(aVertexPosition[0] + xtranslate, aVertexPosition[1] + ytranslate, aVertexPosition[2] + ztranslate, 1.0);\n }\n `;\n \n // define fragment shader in essl using es6 template strings\n var fShaderCode = `\n precision mediump float; // set float to medium precision\n\n // eye location\n uniform vec3 uEyePosition; // the eye's position in world\n \n // light properties\n uniform vec3 uLightDiffuse; // the light's diffuse color\n uniform vec3 uLightPosition; // the light's position\n \n // material properties\n uniform vec3 uDiffuse; // the diffuse reflectivity\n\n // transparency\n uniform float uTransp;\n \n // geometry properties\n varying vec3 vWorldPos; // world xyz of fragment\n \n void main(void) {\n \n vec3 diffuse = uDiffuse*uLightDiffuse;\n \n vec3 colorOut = diffuse;\n gl_FragColor = vec4(colorOut, uTransp); \n }\n `;\n \n try {\n var fShader = gl.createShader(gl.FRAGMENT_SHADER); // create frag shader\n gl.shaderSource(fShader,fShaderCode); // attach code to shader\n gl.compileShader(fShader); // compile the code for gpu execution\n\n var vShader = gl.createShader(gl.VERTEX_SHADER); // create vertex shader\n gl.shaderSource(vShader,vShaderCode); // attach code to shader\n gl.compileShader(vShader); // compile the code for gpu execution\n \n if (!gl.getShaderParameter(fShader, gl.COMPILE_STATUS)) { // bad frag shader compile\n throw \"error during fragment shader compile: \" + gl.getShaderInfoLog(fShader); \n gl.deleteShader(fShader);\n } else if (!gl.getShaderParameter(vShader, gl.COMPILE_STATUS)) { // bad vertex shader compile\n throw \"error during vertex shader compile: \" + gl.getShaderInfoLog(vShader); \n gl.deleteShader(vShader);\n } else { // no compile errors\n var shaderProgram = gl.createProgram(); // create the single shader program\n gl.attachShader(shaderProgram, fShader); // put frag shader in program\n gl.attachShader(shaderProgram, vShader); // put vertex shader in program\n gl.linkProgram(shaderProgram); // link program into gl context\n\n if (!gl.getProgramParameter(shaderProgram, gl.LINK_STATUS)) { // bad program link\n throw \"error during shader program linking: \" + gl.getProgramInfoLog(shaderProgram);\n } else { // no shader program link errors\n gl.useProgram(shaderProgram); // activate shader program (frag and vert)\n \n // locate and enable vertex attributes\n vPosAttribLoc = gl.getAttribLocation(shaderProgram, \"aVertexPosition\"); // ptr to vertex pos attrib\n gl.enableVertexAttribArray(vPosAttribLoc); // connect attrib to array\n \n // locate vertex uniforms\n mMatrixULoc = gl.getUniformLocation(shaderProgram, \"umMatrix\"); // ptr to mmat\n pvmMatrixULoc = gl.getUniformLocation(shaderProgram, \"upvmMatrix\"); // ptr to pvmmat\n \n // locate fragment uniforms\n var eyePositionULoc = gl.getUniformLocation(shaderProgram, \"uEyePosition\"); // ptr to eye position\n var lightDiffuseULoc = gl.getUniformLocation(shaderProgram, \"uLightDiffuse\"); // ptr to light diffuse\n var lightPositionULoc = gl.getUniformLocation(shaderProgram, \"uLightPosition\"); // ptr to light position\n diffuseULoc = gl.getUniformLocation(shaderProgram, \"uDiffuse\"); // ptr to diffuse\n transpULoc = gl.getUniformLocation(shaderProgram, \"uTransp\"); \n xTransULoc = gl.getUniformLocation(shaderProgram, \"xtranslate\"); \n yTransULoc = gl.getUniformLocation(shaderProgram, \"ytranslate\"); \n zTransULoc = gl.getUniformLocation(shaderProgram, \"ztranslate\"); \n \n // pass global constants into fragment uniforms\n gl.uniform3fv(eyePositionULoc,Eye); // pass in the eye's position\n gl.uniform3fv(lightDiffuseULoc,lightDiffuse); // pass in the light's diffuse emission\n gl.uniform3fv(lightPositionULoc,lightPosition); // pass in the light's position\n } // end if no shader program link errors\n } // end if no compile errors\n } // end try \n \n catch(e) {\n console.log(e);\n } // end catch\n} // end setup shaders", "function randomColor() {\n function color() {\n return Math.floor(Math.random()*256).toString(16)\n }\n return \"#\"+color()+color()+color();\n}", "function setup() {\r\n createCanvas(1754, 2481);\r\n //Creates Canvas size.\r\n noLoop();\r\n //stops the randomly generated lines from looping over\r\n angleMode(RADIANS);\r\n}", "function rng () {\n return random()\n }", "function setup() {\n // createCanvas(windowWidth, windowHeight);\n createCanvas(600, 600);\n\n // background(0);\n nR = random(1000);\n nG = random(1000);\n nB = random(1000);\n}", "function seed(seed) {\n\t if (seed > 0 && seed < 1) {\n\t // Scale the seed out\n\t seed *= 65536;\n\t }\n\t seed = Math.floor(seed);\n\t if (seed < 256) {\n\t seed |= seed << 8;\n\t }\n\t for (var i = 0; i < 256; i++) {\n\t var v;\n\t if (i & 1) {\n\t v = p[i] ^ (seed & 255);\n\t }\n\t else {\n\t v = p[i] ^ ((seed >> 8) & 255);\n\t }\n\t perm[i] = perm[i + 256] = v;\n\t gradP[i] = gradP[i + 256] = grad3[v % 12];\n\t }\n\t }", "function randColor()\n {\n return '#'+ Math.floor(Math.random()*16777215).toString(16);\n }", "function generateRandom(){\n const random = [];\n random[0] = Math.trunc(Math.random()*screenSize[0]) + 1; //width\n random[1] = Math.trunc(Math.random()*screenSize[1]) + 1; //Heigth\n return random;\n }", "function random_rgba() {\n var o = Math.round, r = Math.random, s = 255;\n return 'rgb(' + o(r() * s) + ',' + o(r() * s) + ',' + o(r() * s) + ')';\n}", "function RNJesus() {\n\tRNG = Math.floor((Math.random() * 10));\n\t//alert(\"RNG = \" + RNG);\n}", "function r(){return Math.random().toString().slice(2,7)}", "constructor() {\n this.init = false;\n if(Math.floor(Math.random()*300) == 0) {\n this.init = true;\n }\n\n this.y = -20;\n this.x = Math.floor(Math.random()*canvas.width);\n\n this.dropSpeed = 0.0015 + Math.random()/128;\n\n var shade = Math.floor(Math.random()*90)+10;\n this.color = \"#\" + String(shade) + String(shade) + \"FF\";\n }", "randomize() {\n const buffer = this.buffer[this.currentBufferIndex];\n\n for (let y = 0; y < this.height; y++) {\n for (let x = 0; y < this.width; x++) {\n buffer[y][x] = Math.floor(Math.random() * MODULO);\n }\n }\n }", "static Random() {\n return new Vector((Math.random() - 0.5) * 2, (Math.random() - 0.5) * 2)\n }", "function randomColor() {\n return \"rgb(\" + random(0, 235) +\n \", \" + random(0, 235) +\n \", \" + random(0, 235) + \")\";\n}", "function randomPrimaryColor() {\n return Math.floor(Math.random() * 256);\n // return Math.floor(Math.random() * 256).toString(16).padStart(2, '0');\n}", "function randomColor(){\r\n var hue = Math.floor(Math.random() * 360);\r\n var l = Math.random() * 15 + 70;\r\n var pastel = 'hsl(' + hue + ', 100%, ' + l + '%)';\r\n return pastel;\r\n}", "function inning(){\n \n //DEBUGGING\n //console.log( Math.round(Math.random() * 2 ) );\n \n return Math.round(Math.random() * 2);\n }", "function rColor () {\n var c1 = Math.floor(Math.random() * 256);\n var c2 = Math.floor(Math.random() * 256);\n var c3 = Math.floor(Math.random() * 256);\n var randomColor = \"rgb(\" + c1 + \",\" + c2 + \",\" + c3 + \")\";\n \n \tdocument.body.style.backgroundColor = randomColor;\n}", "function randomBackgroundColor() {\n document.body.style.backgroundColor = randomRGB();\n} //set body background to random rgb value", "function PerlinNoise(seed) {\n var rnd = seed !== undef ? new Marsaglia(seed) : Marsaglia.createRandomized();\n var i, j;\n // http://www.noisemachine.com/talk1/17b.html\n // http://mrl.nyu.edu/~perlin/noise/\n // generate permutation\n var perm = new Uint8Array(512);\n for(i=0;i<256;++i) { perm[i] = i; }\n for(i=0;i<256;++i) { var t = perm[j = rnd.nextInt() & 0xFF]; perm[j] = perm[i]; perm[i] = t; }\n // copy to avoid taking mod in perm[0];\n for(i=0;i<256;++i) { perm[i + 256] = perm[i]; }\n\n function grad3d(i,x,y,z) {\n var h = i & 15; // convert into 1 2 gradient directions\n var u = h<8 ? x : y,\n v = h<4 ? y : h===12||h===14 ? x : z;\n return ((h&1) === 0 ? u : -u) + ((h&2) === 0 ? v : -v);\n }\n\n function grad2d(i,x,y) {\n var v = (i & 1) === 0 ? x : y;\n return (i&2) === 0 ? -v : v;\n }\n\n function grad1d(i,x) {\n return (i&1) === 0 ? -x : x;\n }\n\n function lerp(t,a,b) { return a + t * (b - a); }\n\n this.noise3d = function(x, y, z) {\n //var X = Math.floor(x)&255, Y = Math.floor(y)&255, Z = Math.floor(z)&255;\n //x -= Math.floor(x); y -= Math.floor(y); z -= Math.floor(z);\n var X = (x|0)&255, Y = (y|0)&255, Z = (z|0)&255;\n x -= (x|0); y -= (y|0); z -= (z|0);\n var fx = (3-2*x)*x*x, fy = (3-2*y)*y*y, fz = (3-2*z)*z*z;\n var p0 = perm[X]+Y, p00 = perm[p0] + Z, p01 = perm[p0 + 1] + Z,\n p1 = perm[X + 1] + Y, p10 = perm[p1] + Z, p11 = perm[p1 + 1] + Z;\n return lerp(fz,\n lerp(fy, lerp(fx, grad3d(perm[p00], x, y, z), grad3d(perm[p10], x-1, y, z)),\n lerp(fx, grad3d(perm[p01], x, y-1, z), grad3d(perm[p11], x-1, y-1,z))),\n lerp(fy, lerp(fx, grad3d(perm[p00 + 1], x, y, z-1), grad3d(perm[p10 + 1], x-1, y, z-1)),\n lerp(fx, grad3d(perm[p01 + 1], x, y-1, z-1), grad3d(perm[p11 + 1], x-1, y-1,z-1))));\n };\n\n this.noise2d = function(x, y) {\n var X = Math.floor(x)&255, Y = Math.floor(y)&255;\n x -= Math.floor(x); y -= Math.floor(y);\n var fx = (3-2*x)*x*x, fy = (3-2*y)*y*y;\n var p0 = perm[X]+Y, p1 = perm[X + 1] + Y;\n return lerp(fy,\n lerp(fx, grad2d(perm[p0], x, y), grad2d(perm[p1], x-1, y)),\n lerp(fx, grad2d(perm[p0 + 1], x, y-1), grad2d(perm[p1 + 1], x-1, y-1)));\n };\n\n this.noise1d = function(x) {\n var X = Math.floor(x)&255;\n x -= Math.floor(x);\n var fx = (3-2*x)*x*x;\n return lerp(fx, grad1d(perm[X], x), grad1d(perm[X+1], x-1));\n };\n}", "function well1024a (entropy_) {\n var entropy = entropy_ || [];\n var m1 = 3, m2 = 24, m3 = 10;\n var state = [ 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0 ];\n var state_i = 0;\n var z0, z1, z2;\n function maToPos (t, v) { return v ^ (v >>> t); }\n function maToNeg (t, v) { return v ^ (v << -t); }\n \n function init (entropy) {\n for (var i = 0; i < state.length; i++)\n state[i] = ~(Math.random() * 4294967296);\n var s_i = 0;\n for (var i = 0; i < entropy.length; i++) {\n state[s_i] = (state[s_i] + Math.floor(entropy[i])) & 0xffffffff;\n s_i = (s_i + 1) & 0x1f;\n }\n for (var i = 0; i < 31; i++)\n getUInt32();\n }\n\n function getState () {\n return { seed: state.slice(0),\n idx: state_i };\n }\n\n function setState (s) {\n if (s.seed.length != 32)\n throw new Error(\"Seed not 32-length array of 32-bit UINTs\");\n if (s.idx < 0 || s.idx > 31 || Math.floor(s.idx) != s.idx)\n throw new Error(\"Idx out of range [0, 31]\");\n for (var i = 0; i < s.seed.length; i++) {\n if (s.seed[i] != s.seed[i] & 0xffffffff)\n throw new Error(\"Seed not 32-length array of 32-bit UINTs\");\n }\n state = s.seed.slice(0);\n state_i = s.idx;\n }\n \n function getUInt32 () {\n z0 = state[(state_i + 31) & 0x1f];\n z1 = state[state_i] ^ maToPos(8, state[(state_i + m1) & 0x1f]);\n z2 = maToNeg(-19, state[(state_i + m2) & 0x1f]) ^ maToNeg(-14, state[(state_i + m3) & 0x1f]);\n state[state_i] = z1 ^ z2;\n state[(state_i + 31) & 0x1f] = maToNeg(-11, z0) ^ maToNeg(-7, z1) ^ maToNeg(-13, z2);\n state_i = (state_i + 31) & 0x1f;\n return state[state_i] + 0x80000000;\n }\n \n init(entropy);\n return { getState: getState,\n setState: setState,\n getUInt32: getUInt32 };\n}", "function setupShaders() {\n \n // define vertex shader in essl using es6 template strings\n var vShaderCode = `\n attribute vec3 aVertexPosition; // vertex position\n attribute vec3 aVertexNormal; // vertex normal\n attribute vec2 aVertexTexture; // vertex texture\n \n uniform mat4 umMatrix; // the model matrix\n uniform mat4 upvmMatrix; // the project view model matrix\n \n varying vec3 vWorldPos; // interpolated world position of vertex\n varying vec3 vVertexNormal; // interpolated normal for frag shader\n varying vec2 vVertexTexture; // interpolated texture for frag shader\n\n void main(void) {\n \n // vertex position\n vec4 vWorldPos4 = umMatrix * vec4(aVertexPosition, 1.0);\n vWorldPos = vec3(vWorldPos4.x,vWorldPos4.y,vWorldPos4.z);\n gl_Position = upvmMatrix * vec4(aVertexPosition, 1.0);\n\n // vertex normal (assume no non-uniform scale)\n vec4 vWorldNormal4 = umMatrix * vec4(aVertexNormal, 0.0);\n vVertexNormal = normalize(vec3(vWorldNormal4.x,vWorldNormal4.y,vWorldNormal4.z)); \n vVertexTexture = aVertexTexture;\n }\n `;\n \n // define fragment shader in essl using es6 template strings\n var fShaderCode = `\n precision mediump float; // set float to medium precision\n\n // eye location\n uniform vec3 uEyePosition; // the eye's position in world\n \n // light properties\n uniform vec3 uLightAmbient; // the light's ambient color\n uniform vec3 uLightDiffuse; // the light's diffuse color\n uniform vec3 uLightSpecular; // the light's specular color\n uniform vec3 uLightPosition; // the light's position\n \n // material properties\n uniform vec3 uAmbient; // the ambient reflectivity\n uniform vec3 uDiffuse; // the diffuse reflectivity\n uniform vec3 uSpecular; // the specular reflectivity\n uniform float uShininess; // the specular exponent\n uniform float uAlpha; // the alpha value\n uniform float uBlendMode; // the blend mode\n\n // sampler\n uniform sampler2D uSampler;\n \n // geometry properties\n varying vec3 vWorldPos; // world xyz of fragment\n varying vec3 vVertexNormal; // normal of fragment\n varying vec2 vVertexTexture; // vertex texture (u, v)\n \n void main(void) {\n \n // ambient term\n vec3 ambient = uAmbient*uLightAmbient; \n \n // diffuse term\n vec3 normal = normalize(vVertexNormal); \n vec3 light = normalize(uLightPosition - vWorldPos);\n float lambert = max(0.0,dot(normal,light));\n vec3 diffuse = uDiffuse*uLightDiffuse*lambert; // diffuse term\n \n // specular term\n vec3 eye = normalize(uEyePosition - vWorldPos);\n vec3 halfVec = normalize(light+eye);\n float highlight = pow(max(0.0,dot(normal,halfVec)),uShininess);\n vec3 specular = uSpecular*uLightSpecular*highlight; // specular term\n \n // combine to output color\n vec3 colorOut = ambient + diffuse + specular; // no specular yet\n\n vec4 flatColor = vec4(colorOut, 1.0);\n vec4 texColor = texture2D(uSampler, vec2(vVertexTexture.x, vVertexTexture.y));\n\n if (uBlendMode == 0.0) {\n gl_FragColor = vec4(texColor.rgb * colorOut, texColor.a * uAlpha);\n }\n if (uBlendMode == 1.0) {\n gl_FragColor = vec4(texColor.rgb, texColor.a * uAlpha);\n }\n if (uBlendMode == 2.0) {\n gl_FragColor = texColor;\n }\n if (uBlendMode == 3.0) {\n gl_FragColor = flatColor;\n }\n }\n `;\n \n try {\n var fShader = gl.createShader(gl.FRAGMENT_SHADER); // create frag shader\n gl.shaderSource(fShader,fShaderCode); // attach code to shader\n gl.compileShader(fShader); // compile the code for gpu execution\n\n var vShader = gl.createShader(gl.VERTEX_SHADER); // create vertex shader\n gl.shaderSource(vShader,vShaderCode); // attach code to shader\n gl.compileShader(vShader); // compile the code for gpu execution\n \n if (!gl.getShaderParameter(fShader, gl.COMPILE_STATUS)) { // bad frag shader compile\n throw \"error during fragment shader compile: \" + gl.getShaderInfoLog(fShader); \n gl.deleteShader(fShader);\n } else if (!gl.getShaderParameter(vShader, gl.COMPILE_STATUS)) { // bad vertex shader compile\n throw \"error during vertex shader compile: \" + gl.getShaderInfoLog(vShader); \n gl.deleteShader(vShader);\n } else { // no compile errors\n var shaderProgram = gl.createProgram(); // create the single shader program\n gl.attachShader(shaderProgram, fShader); // put frag shader in program\n gl.attachShader(shaderProgram, vShader); // put vertex shader in program\n gl.linkProgram(shaderProgram); // link program into gl context\n\n if (!gl.getProgramParameter(shaderProgram, gl.LINK_STATUS)) { // bad program link\n throw \"error during shader program linking: \" + gl.getProgramInfoLog(shaderProgram);\n } else { // no shader program link errors\n gl.useProgram(shaderProgram); // activate shader program (frag and vert)\n \n // locate and enable vertex attributes\n vPosAttribLoc = gl.getAttribLocation(shaderProgram, \"aVertexPosition\"); // ptr to vertex pos attrib\n gl.enableVertexAttribArray(vPosAttribLoc); // connect attrib to array\n vNormAttribLoc = gl.getAttribLocation(shaderProgram, \"aVertexNormal\"); // ptr to vertex normal attrib\n gl.enableVertexAttribArray(vNormAttribLoc); // connect attrib to arrayconsole.log(textures);\n vTexAttribLoc = gl.getAttribLocation(shaderProgram, \"aVertexTexture\");\n gl.enableVertexAttribArray(vTexAttribLoc);\n \n \n // locate vertex uniforms\n mMatrixULoc = gl.getUniformLocation(shaderProgram, \"umMatrix\"); // ptr to mmat\n pvmMatrixULoc = gl.getUniformLocation(shaderProgram, \"upvmMatrix\"); // ptr to pvmmat\n\n // locate sampler uniform\n samplerUniform = gl.getUniformLocation(shaderProgram, \"uSampler\"); // ptr to sampler\n \n // locate fragment uniforms\n var eyePositionULoc = gl.getUniformLocation(shaderProgram, \"uEyePosition\"); // ptr to eye position\n var lightAmbientULoc = gl.getUniformLocation(shaderProgram, \"uLightAmbient\"); // ptr to light ambient\n var lightDiffuseULoc = gl.getUniformLocation(shaderProgram, \"uLightDiffuse\"); // ptr to light diffuse\n var lightSpecularULoc = gl.getUniformLocation(shaderProgram, \"uLightSpecular\"); // ptr to light specular\n var lightPositionULoc = gl.getUniformLocation(shaderProgram, \"uLightPosition\"); // ptr to light position\n\n ambientULoc = gl.getUniformLocation(shaderProgram, \"uAmbient\"); // ptr to ambient\n diffuseULoc = gl.getUniformLocation(shaderProgram, \"uDiffuse\"); // ptr to diffuse\n specularULoc = gl.getUniformLocation(shaderProgram, \"uSpecular\"); // ptr to specular\n shininessULoc = gl.getUniformLocation(shaderProgram, \"uShininess\"); // ptr to shininess\n alphaULoc = gl.getUniformLocation(shaderProgram, \"uAlpha\"); // ptr to alpha\n lightBlendULoc = gl.getUniformLocation(shaderProgram, \"uBlendMode\"); // ptr to blend mode\n \n // pass global constants into fragment uniforms\n gl.uniform3fv(eyePositionULoc,Eye); // pass in the eye's position\n gl.uniform3fv(lightAmbientULoc,lightAmbient); // pass in the light's ambient emission\n gl.uniform3fv(lightDiffuseULoc,lightDiffuse); // pass in the light's diffuse emission\n gl.uniform3fv(lightSpecularULoc,lightSpecular); // pass in the light's specular emission\n gl.uniform3fv(lightPositionULoc,lightPosition); // pass in the light's position\n } // end if no shader program link errors\n } // end if no compile errors\n } // end try \n \n catch(e) {\n console.log(e);\n } // end catch\n} // end setup shaders", "function random() { // different sequence to Math.random()\n var T16 = 0x10000, T32 = T16*T16,\n cons = 0x0808, tant = 0x8405, // cons*T16 + tant = 134775813\n X = RandSeed*cons % T16 * T16 + RandSeed*tant + 1; // Exact 32=bit arithmetic\n return (RandSeed = X % T32) / T32;\n }", "function getRandomColor() {\r\n color = \"hsl(\" + Math.random() * 360 + \", 100%, 75%)\";\r\n return color;\r\n}", "function randomColor() {\n var x = Math.floor(Math.random() * 256);\n var y = Math.floor(Math.random() * 256);\n var z = Math.floor(Math.random() * 256);\n var rbgColor = 'rgb(' + x + ',' + y + ',' + z + ')'; \n\ndocument.body.style.background = rbgColor;\n }" ]
[ "0.6522048", "0.6380164", "0.6356211", "0.6312801", "0.6273608", "0.6235491", "0.61811876", "0.6104483", "0.60932875", "0.60890627", "0.6079582", "0.607377", "0.6056277", "0.6053681", "0.6040202", "0.59780675", "0.5958687", "0.59291494", "0.59094006", "0.5903984", "0.5903626", "0.5884096", "0.5863877", "0.58556354", "0.5846795", "0.5827381", "0.581929", "0.5811834", "0.5811679", "0.579844", "0.57905746", "0.5786275", "0.57855165", "0.57805353", "0.57716566", "0.57511795", "0.57475346", "0.5747126", "0.57468724", "0.5742118", "0.5740248", "0.5739517", "0.5738947", "0.5735583", "0.5730699", "0.5727892", "0.57277095", "0.57242054", "0.5724183", "0.57154936", "0.5712143", "0.5707701", "0.57049054", "0.56996965", "0.5699447", "0.5698101", "0.56870943", "0.56870943", "0.5684727", "0.56837255", "0.5682474", "0.56818557", "0.5680623", "0.567742", "0.567479", "0.56736356", "0.56736356", "0.5672336", "0.56694376", "0.5669306", "0.56681913", "0.56657726", "0.5665203", "0.56644297", "0.56617004", "0.5659394", "0.56567496", "0.5654657", "0.56520295", "0.5648027", "0.56458455", "0.56415063", "0.56354934", "0.5634512", "0.56328285", "0.56323314", "0.5630966", "0.5628533", "0.5626378", "0.5622477", "0.5621341", "0.56206965", "0.5619937", "0.56163675", "0.5616267", "0.5613918", "0.5611198", "0.5609686", "0.5609315", "0.56088614" ]
0.6948111
0
Create a RomanNumerals helper that can convert a roman numeral to and from an integer value. The class should follow the API demonstrated in the examples below. Multiple roman numeral values will be tested for each helper method. Modern Roman numerals are written by expressing each digit separately starting with the left most digit and skipping any digit with a value of zero. In Roman numerals 1990 is rendered: 1000=M, 900=CM, 90=XC; resulting in MCMXC. 2008 is written as 2000=MM, 8=VIII; or MMVIII. 1666 uses each Roman symbol in descending order: MDCLXVI. Examples: RomanNumerals.toRoman(1000); // should return 'M' RomanNumerals.fromRoman('M'); // should return 1000
function RomanNumeralsHelper() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static toRoman(num) {\n \n // Copy the input to a variable called \"int.\"\n var int = num;\n \n // Initialize empty array to hold the roman numerals that will be used in the solution.\n var convert = [];\n \n // Initialize a dictionary for all combinations of roman numerals.\n var dictionary = { \n \"M\": 1000,\n \"CM\": 900,\n \"D\": 500,\n \"CD\": 400,\n \"C\": 100,\n \"XC\": 90,\n \"L\": 50,\n \"XL\": 40,\n \"X\": 10,\n \"IX\": 9,\n \"V\": 5,\n \"IV\": 4,\n \"I\": 1\n }\n \n while (int) {\n // This for loop tries to find the largest base value from the dictionary in \"int.\"\n for (var key in dictionary) {\n if (int / dictionary[key] >= 1) {\n // Add the corresponding roman numeral of the largest base value found in \"int\" to the \"convert\" array.\n convert.push(key);\n // Now, subtract the base value from \"int.\" \n int = int - dictionary[key];\n // Exit the for loop because we want to start over again from the top of the dictionary.\n break;\n }\n }\n }\n \n // Combine the \"convert\" array into a string and return as the solution.\n return convert.join(\"\")\n }", "function numToRoman(num) {\n}", "function convertToRoman(num) {\n // Converting number into single digit: eg: 345 to 3, 4, and 5!\n var digits = []\n while (num) {\n digits.push(num % 10);\n num = Math.floor(num / 10);\n }\n\n // Multiply proper tens or hundreds or thousands to single digits. So the number breaks\n // Eg: 345 into 300, 40, and 5\n var expandedNum = [];\n var x = 1;\n for (var digit in digits) {\n expandedNum.push(digits[digit] * x)\n x *= 10;\n }\n expandedNum.reverse();\n\n // Some important base-roman dictionary values:\n var romandict = { 1000: 'M', 900: 'CM', 500: 'D', 400: 'CD', 100: 'C', 90: 'XC', 50: 'L', 40: 'XL', 10: 'X', 9: 'IX', 5: 'V', 4: 'IV', 1: 'I' }\n // Storing the integers from romandict and sorting in descending order as dictionary saves values in ascending order by default.\n var decimals = Object.keys(romandict).sort((a, b) => b - a);\n\n var romanNumber = ''\n\n for (var i in expandedNum) {\n for (var j in decimals) {\n while (decimals[j] <= expandedNum[i]) {\n romanNumber += romandict[decimals[j]];\n expandedNum[i] -= decimals[j];\n }\n }\n }\n return romanNumber\n}", "function int_to_Roman(num) {\n // object to hold values for each roman numeral symbol\n var converter = {M:1000,CM:900,D:500,CD:400,C:100,XC:90,L:50,XL:40,X:10,IX:9,V:5,IV:4,I:1},roman = '',i;\n for ( i in converter ) {\n // if num is greater or equal to a number in the converter object\n while ( num >= converter[i] ) {\n // add the corresponding roman numeral to our growing roman numeral\n roman += i;\n // and subtract what you have added to the roman numeral from num and go thru the loop until num < converter[i]\n num -= converter[i];\n }\n }\n return roman;\n}", "function convertToRoman(num) {\n \n}", "static fromRoman(str) {\n \n // Initialize an empty array.\n var temp = []\n \n // Loop over each roman numeral of the input \"str.\"\n for (var char of str) {\n // Add the corresponding decimal value of each roman numeral to the \"temp\" array.\n switch(char) {\n case \"I\":\n temp.push(1);\n break;\n case \"V\":\n temp.push(5);\n break;\n case \"X\":\n temp.push(10);\n break;\n case \"L\":\n temp.push(50);\n break;\n case \"C\":\n temp.push(100);\n break;\n case \"D\":\n temp.push(500);\n break;\n case \"M\":\n temp.push(1000);\n break;\n default:\n break; \n }\n }\n \n // Check for subtractive cases, i.e. when a smaller roman numeral precedes a larger roman numeral.\n for (var i = 0; i < temp.length-1; i++) {\n if (temp[i] < temp[i+1]) {\n // Multiply the subtractive roman numeral by -2 and add it to the end of the \"temp\" array. This has the same effect as subtracting it.\n temp.push(temp[i] * -2) \n } \n }\n \n // Add up all the converted roman numerals in the \"temp\" array and return as the solution.\n return temp.reduce(function (total, num) {return total + num;})\n }", "function convertToRoman (num) {\n function oneToTenDigit (digit) {\n switch (digit) {\n case 0: return '';\n case 1: return 'I';\n case 2: return 'II';\n case 3: return 'III';\n case 4: return 'IV';\n case 5: return 'V';\n case 6: return 'VI';\n case 7: return 'VII';\n case 8: return 'VIII';\n case 9: return 'IX';\n default: return undefined;\n }\n }\n\n function tenDigit (digit) {\n switch (digit) {\n case 0: return '';\n case 1: return 'X';\n case 2: return 'XX';\n case 3: return 'XXX';\n case 4: return 'XL';\n case 5: return 'L';\n case 6: return 'LX';\n case 7: return 'LXX';\n case 8: return 'LXXX';\n case 9: return 'XC';\n default: return undefined;\n }\n }\n\n function centDigit (digit) {\n switch (digit) {\n case 0: return '';\n case 1: return 'C';\n case 2: return 'CC';\n case 3: return 'CCC';\n case 4: return 'CD';\n case 5: return 'D';\n case 6: return 'DC';\n case 7: return 'DCC';\n case 8: return 'DCCC';\n case 9: return 'CM';\n default: return undefined;\n }\n }\n\n function milDigit (digit) {\n if (digit === 0) {\n return '';\n }\n if (!Number.isInteger(digit)) {\n return undefined;\n }\n return 'M'.repeat(digit);\n }\n\n return milDigit(Math.floor((num % 10000) / 1000)) +\n centDigit(Math.floor((num % 1000) / 100)) +\n tenDigit(Math.floor((num % 100) / 10)) +\n oneToTenDigit(Math.floor(num % 10) / 1);\n}", "function convertToRoman(num) {\n var lookup = {M:1000,CM:900,D:500,CD:400,C:100,XC:90,L:50,XL:40,X:10,IX:9,V:5,IV:4,I:1},\n roman = '',\n i;\n for ( i in lookup ) {\n while ( num >= lookup[i] ) {\n roman += i;\n num -= lookup[i];\n }\n }\n return roman;\n}", "function convertToRoman(number) {\n var roman = [];\n var i, v, x, l, c, d, m;\n \n m = Math.floor(number / 1000); // 3\n for (var count = 0; count < m; count++) {\n roman.push(\"M\");\n }\n var mRemainder = number % 1000; // 192\n if (mRemainder >= 900) {\n roman.push(\"CM\");\n mRemainder = mRemainder - 900;\n }\n \n d = Math.floor(mRemainder / 500); // 0\n for (count = 0; count < d; count++) {\n roman.push(\"D\");\n }\n var dRemainder = mRemainder % 500; // 192\n \n c = Math.floor(dRemainder / 100); // 1\n if (c === 9) {\n roman.push(\"CM\");\n }\n else if (c === 4) {\n roman.push(\"CD\");\n }\n else {\n for (count = 0; count < c; count++) {\n roman.push(\"C\");\n }\n }\n var cRemainder = dRemainder % 100; // 92\n if (cRemainder >= 90) {\n roman.push(\"XC\");\n cRemainder = cRemainder - 90;\n }\n \n l = Math.floor(cRemainder / 50); // 1\n for (count = 0; count < l; count++) {\n roman.push(\"L\");\n }\n var lRemainder = cRemainder % 50; // 42\n \n x = Math.floor(lRemainder / 10); // 4\n if (x === 9) {\n roman.push(\"XC\");\n }\n else if (x === 4) {\n roman.push(\"XL\");\n }\n else {\n for (count = 0; count < x; count++) {\n roman.push(\"X\");\n }\n }\n var xRemainder = lRemainder % 10; // 2\n if (xRemainder === 9) {\n roman.push(\"IX\");\n xRemainder = xRemainder - 9;\n }\n \n v = Math.floor(xRemainder / 5); // 0\n for (count = 0; count < v; count++) {\n roman.push(\"V\");\n }\n var vRemainder = xRemainder % 5; // 2\n \n i = vRemainder; // 2\n if (i === 4) {\n roman.push(\"IV\");\n }\n else {\n for (count = 0; count < i; count++) {\n roman.push(\"I\");\n }\n }\n \n return roman.join(\"\");\n}", "function convertToRoman_1(num) {\n let value = [1, 4, 5, 9, 10, 40, 50, 90, 100, 400, 500, 900, 1000];\n let symbols = [\n \"I\",\n \"IV\",\n \"V\",\n \"IX\",\n \"X\",\n \"XL\",\n \"L\",\n \"XC\",\n \"C\",\n \"CD\",\n \"D\",\n \"CM\",\n \"M\",\n ];\n let i = 12;\n let result = \"\";\n while (num > 0) {\n let division = Math.floor(num / value[i]);\n num = num % value[i];\n while (division--) {\n result += symbols[i];\n }\n i--;\n }\n return result;\n}", "function decimalToRoman (decNumber) {\n var romNumeral = \"\";\n\n // Implement here!\n\n return romNumeral;\n}", "function toRoman(number) {\r\n const vals = [10, 9, 5, 4, 1];\r\n const syms = ['X', 'IX', 'V', 'IV', 'I'];\r\n roman = '';\r\n for (let i = 0; i < syms.length; i++) {\r\n while (number >= vals[i]) {\r\n number -= vals[i];\r\n roman += syms[i];\r\n }\r\n }\r\n return roman;\r\n}", "function intToRoman(int){\n var romanNum = \"\"\n if(int > 999){\n var thousandth = Math.floor((int/1000)%10)\n console.log(thousandth)\n }\n if(int > 99){\n var hundredth = Math.floor((int/100)%10)\n console.log(hundredth)\n }\n if(int > 9){\n var tenth = Math.floor((int/10)%10)\n console.log(tenth)\n }\n var ones = int%10\n console.log(ones)\n switch(thousandth){\n case 4:\n romanNum += \"MMMM\"\n break\n case 3:\n romanNum += \"MMM\"\n break\n case 2:\n romanNum += \"MM\"\n break\n case 1:\n romanNum += \"M\"\n break\n default:\n break\n }\n switch(hundredth){\n case 9:\n romanNum += \"CM\"\n break\n case 8:\n romanNum += \"DCCC\"\n break\n case 7:\n romanNum += \"DCC\"\n break\n case 6:\n romanNum += \"DC\"\n break\n case 5:\n romanNum += \"D\"\n break\n case 4:\n romanNum += \"CD\"\n break\n case 3:\n romanNum += \"CCC\"\n break\n case 2:\n romanNum += \"CC\"\n break\n case 1:\n romanNum += \"C\"\n break\n default:\n break\n }\n switch(tenth){\n case 9:\n romanNum += \"XC\"\n break\n case 8:\n romanNum += \"LXXX\"\n break\n case 7:\n romanNum += \"LXX\"\n break\n case 6:\n romanNum += \"LX\"\n break\n case 5:\n romanNum += \"L\"\n break\n case 4:\n romanNum += \"XL\"\n break\n case 3:\n romanNum += \"XXX\"\n break\n case 2:\n romanNum += \"XX\"\n break\n case 1:\n romanNum += \"X\"\n break\n default:\n break\n }\n switch(ones){\n case 9:\n romanNum += \"IX\"\n break\n case 8:\n romanNum += \"VIII\"\n break\n case 7:\n romanNum += \"VII\"\n break\n case 6:\n romanNum += \"VI\"\n break\n case 5:\n romanNum += \"V\"\n break\n case 4:\n romanNum += \"IV\"\n break\n case 3:\n romanNum += \"III\"\n break\n case 2:\n romanNum += \"II\"\n break\n case 1:\n romanNum += \"I\"\n break\n default:\n break\n }\n console.log(romanNum)\n return romanNum\n}", "function convertToRoman(num) {\n if (num < 1 || num > 3999)\n return undefined;\n \n let numerals = [['I','V'],['X','L'],['C','D'],['M']];\n\n let arr = num\n .toString()\n .split('')\n .map(element => parseInt(element));\n \n while (arr.length < 4)\n arr.unshift(0);\n\n arr = arr.map((element, index) => {\n let ones = numerals[3-index][0];\n let fives = numerals[3-index][1];\n if (element <= 3 && element > 0) \n return ones.repeat(element);\n if (element === 4)\n return ones + fives;\n if (element === 5)\n return fives;\n if (element > 5 && element < 9)\n return fives + ones.repeat(element - 5);\n if (element === 9)\n return ones + numerals[4-index][0];\n })\n\n return arr.join('');\n}", "function convertToRoman(num) {\n var roman = \"\";\n var decimalNums = [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1];\n var romanNums = ['M', 'CM', 'D', 'CD', 'C', 'XC', 'L', 'XL', 'X', 'IX', 'V', 'IV', 'I'];\n for (var i = 0; i < decimalNums.length; i++) {\n while (num >= decimalNums[i]) {\n roman += romanNums[i];\n num -= decimalNums[i];\n }\n }\n return roman;\n}", "function convertToRoman() {\n let numero = prompt('Ingrese el número a convertir:');\n let original = numero;\n\n function obtenerNumero(digito, cadenaUno, cadenaDos, cadenaTres) {\n switch (true) {\n \n case digito <= 3:\n return cadenaUno.repeat(digito);\n \n case digito === 4:\n return cadenaUno + cadenaDos;\n \n case digito <= 8:\n return cadenaDos + cadenaUno.repeat(digito - 5);\n \n default:\n return cadenaUno + cadenaTres;\n }\n }\n \n let cadena = '';\n \n cadena += 'M'.repeat(Math.floor(numero/1000));\n numero %= 1000;\n \n cadena += obtenerNumero(Math.floor(numero/100), 'C', 'D', 'M')\n numero %= 100;\n \n cadena += obtenerNumero(Math.floor(numero/10), 'X', 'L', 'C')\n numero %= 10;\n \n cadena += obtenerNumero(numero, 'I', 'V', 'X')\n \n alert(`${original} en números romanos equivale a: ${cadena}.`);\n\n return cadena;\n }", "getAsRoman(number) {\n let retval = '';\n this.value = number;\n retval += this.generateNumber(this.value, 1000, 'M');\n retval += this.generateNumber(this.value, 900, 'CM');\n retval += this.generateNumber(this.value, 500, 'D');\n retval += this.generateNumber(this.value, 400, 'CD');\n retval += this.generateNumber(this.value, 100, 'C');\n retval += this.generateNumber(this.value, 90, 'XC');\n retval += this.generateNumber(this.value, 50, 'L');\n retval += this.generateNumber(this.value, 40, 'XL');\n retval += this.generateNumber(this.value, 10, 'X');\n retval += this.generateNumber(this.value, 9, 'IX');\n retval += this.generateNumber(this.value, 5, 'V');\n retval += this.generateNumber(this.value, 4, 'IV');\n retval += this.generateNumber(this.value, 1, 'I');\n return retval.toString();\n }", "function toRoman(num) { \n var result = '';\n var decimal = [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1];\n var roman = [\"M\", \"CM\",\"D\",\"CD\",\"C\", \"XC\", \"L\", \"XL\", \"X\",\"IX\",\"V\",\"IV\",\"I\"];\n for (var i = 0;i<=decimal.length;i++) {\n while (num%decimal[i] < num) { \n result += roman[i];\n num -= decimal[i];\n }\n }\n return result;\n}", "function convertToRoman(num) {\n if (isNaN(num))\n return NaN;\n var digits = String(+num).split(\"\"),\n key = [\"\",\"C\",\"CC\",\"CCC\",\"CD\",\"D\",\"DC\",\"DCC\",\"DCCC\",\"CM\",\n \"\",\"X\",\"XX\",\"XXX\",\"XL\",\"L\",\"LX\",\"LXX\",\"LXXX\",\"XC\",\n \"\",\"I\",\"II\",\"III\",\"IV\",\"V\",\"VI\",\"VII\",\"VIII\",\"IX\"],\n roman = \"\",\n i = 3;\n console.log(`Digits array is [${digits}]`)\n while (i--)\n roman = (key[+digits.pop() + (i * 10)] || \"\") + roman;\n console.log(`roman is ${roman}`)\n return Array(+digits.join(\"\") + 1).join(\"M\") + roman;\n}", "function convertToRoman(num) {\n let romanNums = {\n 1000: \"M\",\n 900: \"CM\",\n 500: \"D\",\n 400: \"CD\",\n 100: \"C\",\n 90: \"XC\",\n 50: \"L\",\n 40: \"XL\",\n 10: \"X\",\n 9: \"IX\",\n 5: \"V\",\n 4: \"IV\",\n 1: \"I\",\n }\n let keys = Object.keys(romanNums).reverse();\n let romanNum = \"\";\n\n keys.forEach(function(key) {\n while (key <= num) {\n romanNum += romanNums[key];\n num -= key;\n }\n });\n\n return romanNum;\n}", "function convertToRoman(num) {\n const map = {\n M: 1000,\n CM: 900,\n D: 500,\n CD: 400,\n C: 100,\n XC: 90,\n L: 50,\n XL: 40,\n X: 10,\n IX: 9,\n V: 5,\n IV: 4,\n I: 1,\n };\n let result = '';\n \n // main algorithm\n \n console.log(\"result:\", result);\n return result;\n }", "function convertToRoman_2(num) {\n let m = [\"\", \"M\", \"MM\", \"MMM\"];\n let c = [\"\", \"C\", \"CC\", \"CCC\", \"CD\", \"D\", \"DC\", \"DCC\", \"DCCC\", \"CM\"];\n let x = [\"\", \"X\", \"XX\", \"XXX\", \"XL\", \"L\", \"LX\", \"LXX\", \"LXXX\", \"XC\"];\n let i = [\"\", \"I\", \"II\", \"III\", \"IV\", \"V\", \"VI\", \"VII\", \"VIII\", \"IX\"];\n\n let thousand = m[Math.floor(num / 1000)];\n let hundred = c[Math.floor((num % 1000) / 100)];\n let tens = x[Math.floor((num % 100) / 10)];\n let ones = i[num % 10];\n\n return thousand + hundred + tens + ones;\n}", "function decimalToRoman (1053) {\n \tvar romNumeral = \"\";\n while (i >= 1000) {\n romNumeral += \"M\";\n i -= 1000; }\n while (i >= 900) {\n romNumeral += \"CM\";\n i -= 900;\n }\n while (i >= 500) {\n romNumeral += \"D\";\n i -= 500;\n }\n while (i >= 400) {\n romNumeral += \"CD\";\n i -= 400;\n }\n while (i >= 100) {\n romNumeral += \"C\";\n i -= 100;\n }\n while (i >= 90) {\n romNumeral += \"XC\";\n i -= 90;\n }\n while (i >= 50) {\n romNumeral += \"L\";\n i -= 50;\n }\n while (i >= 40) {\n romNumeral += \"XL\";\n i -= 40;\n }\n while (i >= 10) {\n romNumeral += \"X\";\n i -= 10;\n }\n while (i >= 9) {\n romNumeral += \"IX\";\n i -= 9;\n }\n while (i >= 5) {\n romNumeral += \"V\";\n i -= 5;\n }\n while (i >= 4) {\n romNumeral += \"IV\";\n i -= 4;\n }\n while (i >= 1) {\n romNumeral += \"I\";\n i -= 1;\n } \n console.log(romNumeral);\n\treturn romNumeral;\n}", "function convertToRoman(num) {\n let romanLookup = [\n ['M', 'CM', 'D', 'CD', 'C', 'XC', 'L', 'XL', 'X', 'IX', 'V', 'IV', 'I'],\n [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1]\n ];\n\n let roman = '';\n for(let i = 0; i < romanLookup[0].length; i++) {\n while(num >= romanLookup[1][i]) {\n roman += romanLookup[0][i];\n num -= romanLookup[1][i];\n }\n }\n return roman;\n}", "function convertToRoman(num) {\n\tconst numbers = [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1];\n\tconst romanNumerals = [\n\t\t'M',\n\t\t'CM',\n\t\t'D',\n\t\t'CD',\n\t\t'C',\n\t\t'XC',\n\t\t'L',\n\t\t'XL',\n\t\t'X',\n\t\t'IX',\n\t\t'V',\n\t\t'IV',\n\t\t'I',\n\t];\n\n\tlet romanValue = '';\n\tlet regularNum = num;\n\n\tfor (let i = 0; i < numbers.length; i++) {\n\t\twhile (numbers[i] <= regularNum) {\n\t\t\tromanValue += romanNumerals[i];\n\t\t\tregularNum -= numbers[i];\n\t\t}\n\t}\n\n\treturn romanValue;\n}", "function integerToRoman(n){\n var roman = [\"M\", \"CM\", \"D\", \"CD\", \"C\", \"XC\", \"L\", \"XL\", \"X\", \"IX\", \"V\", \"IV\", \"I\"];\n var value = [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1];\n var result = \"\";\n for (var i=0; i<value.length; i++){\n while(n >= value[i]){\n result += roman[i];\n n -= value[i];\n }\n }\n return result;\n}", "function convertToRoman(num) {\n let result = '';\n\n const decimals = [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1],\n roman = ['M', 'CM', 'D', 'CD', 'C', 'XC', 'L', 'XL', 'X', 'IX', 'V', 'IV', 'I'];\n\n decimals.map(function (decimal, index) {\n while (num >= decimal) {\n result += roman[index];\n num -= decimal;\n }\n });\n\n return result;\n}", "function convertToRoman(num) {\n var obj = {M:1000, CM:900, DCCC:800, DCC:700, DC:600, D:500, CD:400, CCC:300, CC:200, C:100, XC:90, LXXX:80, LXX:70, LX:60, L:50, XL:40, XXX:30, XX:20, X:10, IX:9, VIII:8, VII:7, VI:6, V:5, IV:4, III:3, II:2, I:1} // initialize variable to the object;\n var roman = ''; // initialize variable to the empty string;\n\n for (var key in obj) {\n while(num >= obj[key]) { // while the num variable is greater than or equal to the current value of property;\n roman += key; // Add its equivalent roman numeral to original empty string.\n num -= obj[key]; // Make num equal to num less the value of property;\n }\n }\n\n return roman;\n}", "function romanize (num) {\n if (!+num)\n return false;\n var\tdigits = String(+num).split(\"\"),\n\t\tkey = [\"\",\"C\",\"CC\",\"CCC\",\"CD\",\"D\",\"DC\",\"DCC\",\"DCCC\",\"CM\",\n\t\t \"\",\"X\",\"XX\",\"XXX\",\"XL\",\"L\",\"LX\",\"LXX\",\"LXXX\",\"XC\",\n\t\t \"\",\"I\",\"II\",\"III\",\"IV\",\"V\",\"VI\",\"VII\",\"VIII\",\"IX\"],\n\t\troman = \"\",\n\t\ti = 3;\n while (i--)\n roman = (key[+digits.pop() + (i * 10)] || \"\") + roman;\n return Array(+digits.join(\"\") + 1).join(\"M\") + roman;\n}", "function toRoman(num){\nlet roman = \"\"; \n\nlet diccionario = {\n M: 1000,\n CM: 900,\n D: 500,\n CD: 400,\n C: 100,\n XC: 90,\n L: 50,\n XL: 40,\n X: 10,\n IX: 9,\n V: 5,\n IV: 4,\n I: 1\n }\n\n if (typeof num !== \"number\") {\n console.log(\"Introduce numero valido\");\n }else if (typeof num === \"number\"){\n for (let key in diccionario) {\n while (num >= diccionario[key]){\n //console.log(\"num es:\", num) -> para ir viendo como va num\n roman += key;\n num -= diccionario[key];\n \n //console.log(\"roman es: \", roman) -- > Para ir viendo como se añaden las letras de nº romanos.\n \n }\n }\n return roman;\n \n }\n}", "function convertToRoman(number) {\n var data = [{\n value: 1000,\n \"char\": 'M'\n }, {\n value: 900,\n \"char\": 'CM'\n }, {\n value: 500,\n \"char\": 'D'\n }, {\n value: 400,\n \"char\": 'CD'\n }, {\n value: 100,\n \"char\": 'C'\n }, {\n value: 90,\n \"char\": 'XC'\n }, {\n value: 50,\n \"char\": 'L'\n }, {\n value: 40,\n \"char\": 'XL'\n }, {\n value: 10,\n \"char\": 'X'\n }, {\n value: 9,\n \"char\": 'IX'\n }, {\n value: 5,\n \"char\": 'V'\n }, {\n value: 4,\n \"char\": 'IV'\n }, {\n value: 1,\n \"char\": 'I'\n }];\n return data.reduce(function (result, currentValue) {\n while (number >= currentValue.value) {\n result += currentValue[\"char\"];\n number -= currentValue.value;\n }\n\n return result;\n }, '');\n}", "function numToRomanNumeralv1(num) {\n \n var result = \"\"\n var roman = ['M', 'CM', 'D', 'CD', 'C', 'L', 'XC', 'X', 'IX', 'V', 'IV', 'I']\n var integer = [1000, 900, 500, 400, 100, 50, 90, 10, 9, 5, 4, 1]\n \n for (let i = 0; i < roman.length; i++) {\n while (num >= integer[i]) {\n result += roman[i];\n num -= integer[i];\n }\n }\n return result;\n}", "function convertToRoman(num) {\n\n //create an empty string\n var roman = \"\";\n //create an array of possible roman numerals up to 1000\n var romanNumeral = [\"M\", \"CM\", \"D\", \"CD\", \"C\", \"XC\", \"L\", \"XL\", \"X\", \"IX\", \"V\", \"IV\", \"I\"];\n //create array of possible number values\n var numbers = [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1];\n //iterate for a length of our numbers array\n for (var i=0; i<numbers.length; i++) {\n //while original number is larger than inputted numbers array\n while(num >= numbers[i]) {\n //add its equivalent roman numeral to our original empty string\n roman = roman + romanNumeral[i];\n //subtract the value from original number to end the while loop\n num = num - numbers[i];\n }\n }\n return roman;\n}", "function parseRoman(s) {\n var val = {M: 1000, D: 500, C: 100, L: 50, X: 10, V: 5, I: 1};\n return s.toUpperCase().split('').reduce(function(r, a, i, aa) {\n return val[a] < val[aa[i + 1]] ? r - val[a] : r + val[a];\n }, 0);\n}", "function getRoman(value) {\r\n var romanNumeral = \"\";\r\n for (var i = 0; i < romanLetters.length; i++) {\r\n while (value >= numericalLetters[i]) {\r\n value -= numericalLetters[i];\r\n romanNumeral += romanLetters[i];\r\n }\r\n }\r\n return romanNumeral;\r\n }", "function convertToRoman(num) {\n const roman = [[\"I\",\"II\",\"III\",\"IV\",\"V\",\"VI\",\"VII\",\"VIII\",\"IX\",\"X\"],[\"X\",\"XX\",\"XXX\",\"XL\",\"L\",\"LX\",\"LXX\",\"LXXX\",\"XC\",\"C\"],[\"C\",\"CC\",\"CCC\",\"CD\",\"D\",\"DC\",\"DCC\",\"DCCC\",\"CM\",\"M\"],[\"M\"]];\n if(num <=10){\n return roman[0][num-1];\n }\n if(num > 10){\n let splited = num.toString().split(\"\").reverse();\n splited = splited.map(x => parseInt(x));\n \n let result = [];\n for(let b = 0; b < splited.length; b++){\n if(b < 3){\n result.push(roman[b][parseInt(splited[b])-1]);\n }else if(b === 3){\n for(let i = 0; i < splited[3]; i++){\n result.push(\"M\");\n }\n }else{\n return undefined;\n }\n }\nreturn result.reverse().join(\"\");\n}\n}", "function roman_to_Int(rom) {\n if(rom == null) return -1;\n // Starts the calculation of the number at first roman numeral listed (ei if number is MCD, num = 1000)\n var num = char_to_int(rom.charAt(0));\n // Sets variables for previous and current number calculated in loop\n var pre, curr;\n // Starts the loop at the second roman rumeral listed \n for(var i = 1; i < rom.length; i++){\n curr = char_to_int(rom.charAt(i));\n pre = char_to_int(rom.charAt(i-1));\n // if the current number is less than/equal to previous number \n if(curr <= pre){\n // add the current number to num\n num += curr;\n } else {\n // for example IV would calculate as 4 = (1-(1*2))+5\n num = num - pre*2 + curr;\n }\n } \n return num;\n }", "function convertToRoman(num){\n\n let roman_numeral = \"\";\n \n \n while(true){\n let max = findMax(num);\n if(max == 1){\n roman_numeral += \"I\";\n num = num - max;\n }\n else if(max == 4){\n roman_numeral += \"IV\";\n num = num - max;\n }\n else if(max == 5){\n roman_numeral += \"V\";\n num = num - max;\n }\n else if(max == 9){\n roman_numeral += \"IX\";\n num = num - max;\n }\n else if(max == 10){\n roman_numeral += \"X\";\n num = num - max;\n }\n else if(max == 40){\n roman_numeral += \"XL\";\n num = num - max;\n }\n else if(max == 50){\n roman_numeral += \"L\";\n num = num - max;\n }\n else if(max == 90){\n roman_numeral += \"XC\";\n num = num - max;\n }\n else if(max == 100){\n roman_numeral += \"C\";\n num = num - max;\n }\n else if(max == 400){\n roman_numeral += \"CD\";\n num = num - max;\n }\n else if(max == 500){\n roman_numeral += \"D\";\n num = num - max;\n }\n else if(max == 900){\n roman_numeral += \"CM\";\n num = num - max;\n }\n else if(max == 1000){\n roman_numeral += \"M\";\n num = num - max;\n }\n if(num == 0){\n break;\n }\n \n }\n\n return roman_numeral;\n}", "function convertToRoman(num) {\n let numSplit = separateUnits(num); \n // console.log(numSplit); // Testing \n\n let romanNum = \"\";\n\nfor (let i=0; i<numSplit.length; i++){\n switch(numSplit[i]){\n case 3000:\n romanNum +=\"MMM\";\n break;\n case 2000:\n romanNum +=\"MM\";\n break;\n case 1000:\n romanNum +=\"M\";\n break; \n case 900:\n romanNum +=\"CM\";\n break;\n case 800:\n romanNum +=\"DCCC\";\n break;\n case 700:\n romanNum +=\"DCC\";\n break;\n case 600:\n romanNum +=\"DC\";\n break;\n case 500:\n romanNum +=\"D\";\n break;\n case 400:\n romanNum +=\"CD\";\n break;\n case 300:\n romanNum +=\"CCC\";\n break;\n case 200:\n romanNum +=\"CC\";\n break;\n case 100:\n romanNum +=\"C\";\n break;\n case 90:\n romanNum +=\"XC\";\n break;\n case 80:\n romanNum +=\"LXXX\";\n break;\n case 70:\n romanNum +=\"LXX\";\n break;\n case 60:\n romanNum +=\"LX\";\n break;\n case 50:\n romanNum +=\"L\";\n break;\n case 40:\n romanNum +=\"XL\";\n break;\n case 30:\n romanNum +=\"XXX\";\n break;\n case 20:\n romanNum +=\"XX\";\n break;\n case 10:\n romanNum +=\"X\";\n break;\n case 9:\n romanNum +=\"IX\";\n break;\n case 8:\n romanNum +=\"VIII\";\n break;\n case 7:\n romanNum +=\"VII\";\n break;\n case 6:\n romanNum +=\"VI\";\n break;\n case 5:\n romanNum +=\"V\";\n break;\n case 4:\n romanNum +=\"IV\";\n break;\n case 3:\n romanNum +=\"III\";\n break;\n case 2:\n romanNum +=\"II\";\n break;\n case 1:\n romanNum +=\"I\";\n break;\n}\n\n\n}\nreturn romanNum;\n} // function", "function convertToRoman(num) {\n var arr = (\"\"+num).split(\"\");\n var length = arr.length;\n \n var one = \"I\";\n var four = \"IV\";\n var five = \"V\";\n var nine = \"IX\";\n var ten = \"X\";\n var fourty = \"XL\";\n var fifty = \"L\";\n var nintey = \"XC\";\n var oneHundred = \"C\";\n var fourHundred = \"CD\";\n var fiveHundred = \"D\";\n var nineHundred = \"CM\";\n var oneThousand = \"M\";\n \n var thousands = \"\";\n var hundreds = \"\";\n var tens = \"\";\n var ones = \"\";\n \n function getOnes(dig) {\n if (dig === 0) {\n ones += ones;\n }\n if (dig > 0 && dig < 4) {\n for (var i = 1; i <= dig; i++) {\n ones += one;\n }\n }\n if (dig == 4) {\n ones += four;\n }\n if (dig == 5) {\n ones += five;\n }\n if (dig > 5 && dig < 9) {\n ones += five;\n for (var i = 1; i <= dig -5; i++) {\n ones += one;\n }\n }\n if (dig == 9) {\n ones += nine;\n }\n return ones;\n }\n \n \n function getTens(dig) {\n if (dig === 0) {\n tens += tens;\n }\n if (dig > 0 && dig < 4) {\n for (var i = 1; i <= dig; i++) {\n tens += ten;\n }\n }\n if (dig == 4) {\n tens += fourty;\n }\n if (dig == 5) {\n tens += fifty;\n }\n if (dig > 5 && dig < 9) {\n tens += fifty;\n for (var i = 1; i <= dig - 5; i++) {\n tens += ten;\n }\n }\n if (dig == 9) {\n tens += nintey;\n }\n }\n \n function getHundreds(dig) {\n if (dig === 0) {\n hundreds += hundreds;\n }\n if (dig > 0 && dig < 4) {\n for (var i = 1; i <= dig; i++) {\n hundreds += oneHundred;\n }\n }\n if (dig == 4) {\n hundreds += fourHundred;\n }\n if (dig == 5) {\n hundreds += fiveHundred;\n }\n if (dig > 5 && dig < 9) {\n hundreds += fiveHundred;\n for (var i = 1; i <= dig -5; i++) {\n hundreds += oneHundred;\n }\n }\n if (dig == 9) {\n hundreds += nineHundred;\n }\n return hundreds;\n }\n \n function getThousands(dig) {\n if (dig === 0) {\n thousands += thousands;\n }\n if (dig > 0 && dig < 4) {\n for (var i = 1; i <= dig; i++) {\n thousands += oneThousand;\n }\n }\n return thousands;\n }\n \n //chech length of number and run required functions\n if (length === 1) {\n getOnes(arr[0]);\n return ones;\n }\n \n if (length === 2) {\n getTens(arr[0]);\n getOnes(arr[1]);\n return tens + ones;\n }\n \n if (length === 3) {\n getHundreds(arr[0]);\n getTens(arr[1]);\n getOnes(arr[2]);\n return hundreds + tens + ones;\n }\n \n if (length === 4) {\n getThousands(arr[0]);\n getHundreds(arr[1]);\n getTens(arr[2]);\n getOnes(arr[3]);\n return thousands + hundreds + tens + ones;\n }\n \n}", "function romanToInt(s) {\r\n var result = 0;\r\n if (s === '') {\r\n return result;\r\n }\r\n var romans = new Map();\r\n romans.set('I', 1);\r\n romans.set('V', 5);\r\n romans.set('X', 10);\r\n romans.set('L', 50);\r\n romans.set('C', 100);\r\n romans.set('D', 500);\r\n romans.set('M', 1000);\r\n console.log(romans.values());\r\n for (var i_1 = 0; i_1 < s.length; i_1++) {\r\n if (romans.get(s.charAt(i_1)) < romans.get(s.charAt(i_1 + 1))) {\r\n result -= romans.get(s.charAt(i_1));\r\n }\r\n else {\r\n result += romans.get(s.charAt(i_1));\r\n }\r\n }\r\n return result;\r\n}", "function romanNumerals(num) {\n let romanRef = {M:1000, CM:900, D:500, CD:400, C:100, XC:90, L:50, XL:40, X:10, IX:9, V:5, IV:4, I:1};\n let numeral = '';\n for ( let i in romanRef ) {\n while ( num >= romanRef[i] ) {\n numeral += i;\n num -= romanRef[i];\n }\n }\n return numeral;\n}", "function convert(num) {\n var numToConvert = num; // prevent modifying parameter\n var romanNum = ''; // create a new string to represent roman numerals\n\n // break down roman numerals into categories\n var romanNumerals = ['M', 'CM', 'D', 'CD', 'C', 'XC', 'L', 'XL', 'X', 'IX', 'V', 'IV', 'I'];\n // create numbers to coincide with romanNumerals\n var numbers = [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1];\n\n for (var i = 0; i < romanNumerals.length; i++){\n //\n while (numToConvert >= numbers[i]){\n numToConvert -= numbers[i];\n romanNum += romanNumerals[i];\n }\n }\n\n return romanNum.toUpperCase();\n}", "function convertToRoman(num) {\n //function to find first occurence of number being less than item in array\n function findDec(element) {\n return num < element;\n }\n\n const romans = [\n \"I\",\n \"IV\",\n \"V\",\n \"IX\",\n \"X\",\n \"XL\",\n \"L\",\n \"XC\",\n \"C\",\n \"CD\",\n \"D\",\n \"CM\",\n \"M\",\n \"MMMM\",\n \"V!\"\n ];\n const decimals = [\n 1,\n 4,\n 5,\n 9,\n 10,\n 40,\n 50,\n 90,\n 100,\n 400,\n 500,\n 900,\n 1000,\n 4000,\n 5000\n ];\n let romArr = [];\n\n let index1 = decimals.findIndex(findDec);\n console.log(\"index 1 :\" + index1);\n\n //run loop until provided number is 0\n for (let i = 0; num > 0; i++) {\n let index = decimals.findIndex(findDec); //index where number is less than element in array\n\n romArr.push(romans[index - 1]); //push the roman element with above index - 1 to get highest numeral before being too low\n num -= decimals[index - 1]; //set num equal to itself minus it's relative roman numeral above\n console.log(num);\n }\n\n return romArr.join(\"\");\n}", "function romanToInt(str) {\n\tvar result = {\n\t\t'M':0,\n\t\t'D':0,\n\t\t'C':0,\n\t\t'L':0,\n\t\t'X':0,\n\t\t'V':0,\n\t\t'I':0,\n\t}\n\n\tvar romannumkey = {\n\t\t'M':1000,\n\t\t'D':500,\n\t\t'C':100,\n\t\t'L':50,\n\t\t'X':10,\n\t\t'V':5,\n\t\t'I':1,\n\t}\n\n\tvar rkey = ['M', 'D', 'C', 'L', 'X', 'V', 'I']\n\n\tstr1 = 'LIV'; //54 - IF I is NOT directly before another I, it's subtracted instead of added.\n\tstr2 = 'IX';\n\tstr3 = 'VII';\n\tstr4 = 'XLIX'; //If value of index i is less than index i+1, subtract instead of add.\n\t\n\tvar intresult = 0;\n\tfor (var i = 0; i < str.length; i++) {\n\t\tif (romannumkey[str[i]] < romannumkey[str[i+1]]) {\n\t\t\tintresult -= romannumkey[str[i]];\n\t\t} else {\n\t\t\tintresult += romannumkey[str[i]];\n\t\t}\n\t}\n\treturn intresult;\n}", "function decToRom(number) {\n const roman = {\n divide: [1000,900,500,400,100,90,50,40,10,9,5,4,1],\n char: [\"M\",\"CM\",\"D\",\"CD\",\"C\",\"XC\",\"L\",\"XL\",\"X\",\"IX\",\"V\",\"IV\",\"I\"]\n };\n let remainder = number;\n let newArray = []\n for (i = 0; i < 13; i++) {\n newArray.push(roman.char[i].repeat(Math.floor(remainder / roman.divide[i])));\n remainder = remainder % roman.divide[i];\n }\n return newArray.join('');\n}", "function convertToRoman(num) {\n let thousand, fiveHundred, fourHundred, hundred, fifty, forty, ten, five, four, one, len;\n if (num > 3999) {\n console.log(`Whoa! that's one BIG number - we ain't doing that!`);\n return;\n }\n const arr = num.toString().split('').map(Number);\n length = arr.length;\n\n thousand = length > 3 ? arr[length-4] : 0;\n hundred = length > 2 ? arr[length-3] : 0;\n ten = length > 1 ? arr[length-2] : 0;\n one = arr[length-1];\n\n function buildThousands(thousand) {\n let str = '';\n for (let i = 0; i < thousand; i++) {\n str += 'M';\n }\n return str;\n }\n\n function buildHundreds(hundred) {\n let str = '';\n if (hundred < 4) {\n for (let i = 0; i < hundred; i++) {\n str += 'C'; \n }\n return str;\n }\n if (hundred === 4) {\n str = 'CD';\n return str;\n }\n if (hundred === 5) {\n str = 'D';\n return str;\n }\n if (hundred > 5 && hundred < 9) {\n str = 'D';\n for (let i = 0; i < hundred-5; i++) {\n str += 'C'; \n }\n return str;\n }\n if (hundred === 9) {\n str = 'CM';\n return str;\n }\n }\n\n function buildTens(ten) {\n let str = '';\n if (ten < 4) {\n for (let i = 0; i < ten; i++) {\n str += 'X'; \n }\n return str;\n }\n if (ten === 4) {\n str = 'XL';\n return str;\n }\n if (ten === 5) {\n str = 'L';\n return str;\n }\n if (ten > 5 && ten < 9) {\n str = 'L';\n for (let i = 0; i < ten-5; i++) {\n str += 'X'; \n }\n return str;\n }\n if (ten === 9) {\n str = 'XC';\n return str;\n }\n }\n\n function buildOnes(one) {\n let str = '';\n if (one < 4) {\n for (let i = 0; i < one; i++) {\n str += 'I'; \n }\n return str;\n }\n if (one === 4) {\n str = 'IV';\n return str;\n }\n if (one === 5) {\n str = 'V';\n return str;\n }\n if (one > 5 && one < 9) {\n str = 'V';\n for (let i = 0; i < one-5; i++) {\n str += 'I'; \n }\n return str;\n }\n if (one === 9) {\n str = 'IX';\n return str;\n }\n }\n\n return buildThousands(thousand) + buildHundreds(hundred) + buildTens(ten) + buildOnes(one);\n}", "function convertToRoman(num) {\nvar arr=[];\nvar m = Math.floor(num/1000);\nfor(let i=0;i<m;i++){ //how many thousands\narr.push(\"M\");\n}\nvar remainderM = num%1000;\nif(remainderM>=900){ //remainderM more than 900\narr.push(\"CM\");\nvar remainder900 = remainderM % 900;\nif (remainder900 >=90){\narr.push(\"XC\");\nvar remainder90= remainder900%90;\nif(remainder90>5){\nvar remainder5= remainder90%5;\nif(remainder5==4){\narr.push(\"IX\");\nreturn arr.join(\"\");\n}\nelse {\narr.push(\"V\");\nfor (let i=0;i<remainder5;i++){\narr.push(\"I\");\n}\nreturn arr.join(\"\");\n}\n}\nelse if(remainder90==5){\narr.push(\"V\");\nreturn arr.join(\"\");\n}\nelse if(remainder90==4){\narr.push(\"IV\");\nreturn arr.join(\"\");\n}\nelse if(remainder90>0){\nfor (let i=0;i<remainder90;i++){\narr.push(\"I\");\n}\nreturn arr.join(\"\");\n}\nelse {\nreturn arr.join(\"\");\n}\n}\nelse if(remainder900>=50){\narr.push(\"L\");\nvar remainder50= remainder900%50;\nvar tens=Math.floor(remainder50/10);\nfor(let i=0;i<tens;i++){\narr.push(\"X\");\n}\nvar remainder10=remainder50%10;\n\nif(remainder10>5){\nvar remainderTen5= remainder10%5;\nif(remainderTen5==4){\narr.push(\"IX\");\nreturn arr.join(\"\");\n}\nelse {\narr.push(\"V\");\nfor (let i=0;i<remainderTen5;i++){\narr.push(\"I\");\n}\nreturn arr.join(\"\");\n}\n}\nelse if(remainder10==5){\narr.push(\"V\");\nreturn arr.join(\"\");\n}\nelse if(remainder10==4){\narr.push(\"IV\");\nreturn arr.join(\"\");\n}\nelse if(remainder10>0){\nfor (let i=0;i<remainder10;i++){\narr.push(\"I\");\n}\nreturn arr.join(\"\");\n}\nelse {\nreturn arr.join(\"\");\n}\n}\nelse if(remainder900>=40){\narr.push(\"XL\");\n\nvar remainder40= remainder900%40;\nif(remainder40>5){\nvar remainderForty5= remainder40%5;\nif(remainderForty5==4){\narr.push(\"IX\");\nreturn arr.join(\"\");\n}\nelse {\narr.push(\"V\");\nfor (let i=0;i<remainderForty5;i++){\narr.push(\"I\");\n}\nreturn arr.join(\"\");\n}\n}\nelse if(remainder40==5){\narr.push(\"V\");\nreturn arr.join(\"\");\n}\nelse if(remainder40==4){\narr.push(\"IV\");\nreturn arr.join(\"\");\n}\nelse if(remainder40>0){\nfor (let i=0;i<remainder40;i++){\narr.push(\"I\");\n}\nreturn arr.join(\"\");\n}\nelse {\nreturn arr.join(\"\");\n}\n}\nelse if(remainder900>0){\n\n\n\ntens=Math.floor(remainder900/10);\nfor(let i=0;i<tens;i++){\narr.push(\"X\");\n}\nremainder10=remainder900%10;\n\nif(remainder10>5){\nremainderTen5= remainder10%5;\nif(remainderTen5==4){\narr.push(\"IX\");\nreturn arr.join(\"\");\n}\nelse {\narr.push(\"V\");\nfor (let i=0;i<remainderTen5;i++){\narr.push(\"I\");\n}\nreturn arr.join(\"\");\n}\n}\nelse if(remainder10==5){\narr.push(\"V\");\nreturn arr.join(\"\");\n}\nelse if(remainder10==4){\narr.push(\"IV\");\nreturn arr.join(\"\");\n}\nelse if(remainder10>0){\nfor (let i=0;i<remainder10;i++){\narr.push(\"I\");\n}\nreturn arr.join(\"\");\n}\nelse {\nreturn arr.join(\"\");\n}\n}\nelse {\nreturn arr.join(\"\");\n}\n}\nelse{\nif(remainderM>=500){ //remainderM more than 500\narr.push(\"D\");\nvar remainder500=remainderM%500;\nfor (let i=0;i<Math.floor(remainder500/100);i++){\narr.push(\"C\");\n}\n\n\n\nvar remainder100 = remainder500 % 100;\nif (remainder100 >=90){\narr.push(\"XC\");\nremainder90= remainder100%90;\nif(remainder90>5){\nremainder5= remainder90%5;\nif(remainder5==4){\narr.push(\"IX\");\nreturn arr.join(\"\");\n}\nelse {\narr.push(\"V\");\nfor (let i=0;i<remainder5;i++){\narr.push(\"I\");\n}\nreturn arr.join(\"\");\n}\n}\nelse if(remainder90==5){\narr.push(\"V\");\nreturn arr.join(\"\");\n}\nelse if(remainder90==4){\narr.push(\"IV\");\nreturn arr.join(\"\");\n}\nelse if(remainder90>0){\nfor (let i=0;i<remainder90;i++){\narr.push(\"I\");\n}\nreturn arr.join(\"\");\n}\nelse {\nreturn arr.join(\"\");\n}\n}\nelse if(remainder100>=50){\narr.push(\"L\");\nremainder50= remainder100%50;\ntens=Math.floor(remainder50/10);\nfor(let i=0;i<tens;i++){\narr.push(\"X\");\n}\nremainder10=remainder50%10;\n\nif(remainder10>5){\nremainderTen5= remainder10%5;\nif(remainderTen5==4){\narr.push(\"IX\");\nreturn arr.join(\"\");\n}\nelse {\narr.push(\"V\");\nfor (let i=0;i<remainderTen5;i++){\narr.push(\"I\");\n}\nreturn arr.join(\"\");\n}\n}\nelse if(remainder10==5){\narr.push(\"V\");\nreturn arr.join(\"\");\n}\nelse if(remainder10==4){\narr.push(\"IV\");\nreturn arr.join(\"\");\n}\nelse if(remainder10>0){\nfor (let i=0;i<remainder10;i++){\narr.push(\"I\");\n}\nreturn arr.join(\"\");\n}\nelse {\nreturn arr.join(\"\");\n}\n}\nelse if(remainder100>=40){\narr.push(\"XL\");\n\nremainder40= remainder100%40;\nif(remainder40>5){\nremainderForty5= remainder40%5;\nif(remainderForty5==4){\narr.push(\"IX\");\nreturn arr.join(\"\");\n}\nelse {\narr.push(\"V\");\nfor (let i=0;i<remainderForty5;i++){\narr.push(\"I\");\n}\nreturn arr.join(\"\");\n}\n}\nelse if(remainder40==5){\narr.push(\"V\");\nreturn arr.join(\"\");\n}\nelse if(remainder40==4){\narr.push(\"IV\");\nreturn arr.join(\"\");\n}\nelse if(remainder40>0){\nfor (let i=0;i<remainder40;i++){\narr.push(\"I\");\n}\nreturn arr.join(\"\");\n}\nelse {\nreturn arr.join(\"\");\n}\n}\nelse if(remainder100>0){\n\n\n\ntens=Math.floor(remainder100/10);\nfor(let i=0;i<tens;i++){\narr.push(\"X\");\n}\nremainder10=remainder100%10;\n\nif(remainder10>5){\nremainderTen5= remainder10%5;\nif(remainderTen5==4){\narr.push(\"IX\");\nreturn arr.join(\"\");\n}\nelse {\narr.push(\"V\");\nfor (let i=0;i<remainderTen5;i++){\narr.push(\"I\");\n}\nreturn arr.join(\"\");\n}\n}\nelse if(remainder10==5){\narr.push(\"V\");\nreturn arr.join(\"\");\n}\nelse if(remainder10==4){\narr.push(\"IV\");\nreturn arr.join(\"\");\n}\nelse if(remainder10>0){\nfor (let i=0;i<remainder10;i++){\narr.push(\"I\");\n}\nreturn arr.join(\"\");\n}\nelse {\nreturn arr.join(\"\");\n}\n}\nelse {\nreturn arr.join(\"\");\n}\n}\nelse if(remainderM>=400){ //remainderM more than 400\narr.push(\"CD\");\n\nvar remainder400 = remainderM % 100;\nif (remainder400 >=90){\narr.push(\"XC\");\nremainder90= remainder100%90;\nif(remainder90>5){\nremainder5= remainder90%5;\nif(remainder5==4){\narr.push(\"IX\");\nreturn arr.join(\"\");\n}\nelse {\narr.push(\"V\");\nfor (let i=0;i<remainder5;i++){\narr.push(\"I\");\n}\nreturn arr.join(\"\");\n}\n}\nelse if(remainder90==5){\narr.push(\"V\");\nreturn arr.join(\"\");\n}\nelse if(remainder90==4){\narr.push(\"IV\");\nreturn arr.join(\"\");\n}\nelse if(remainder90>0){\nfor (let i=0;i<remainder90;i++){\narr.push(\"I\");\n}\nreturn arr.join(\"\");\n}\nelse {\nreturn arr.join(\"\");\n}\n}\nelse if(remainder400>=50){\narr.push(\"L\");\nremainder50= remainder400%50;\ntens=Math.floor(remainder50/10);\nfor(let i=0;i<tens;i++){\narr.push(\"X\");\n}\nremainder10=remainder50%10;\n\nif(remainder10>5){\nremainderTen5= remainder10%5;\nif(remainderTen5==4){\narr.push(\"IX\");\nreturn arr.join(\"\");\n}\nelse {\narr.push(\"V\");\nfor (let i=0;i<remainderTen5;i++){\narr.push(\"I\");\n}\nreturn arr.join(\"\");\n}\n}\nelse if(remainder10==5){\narr.push(\"V\");\nreturn arr.join(\"\");\n}\nelse if(remainder10==4){\narr.push(\"IV\");\nreturn arr.join(\"\");\n}\nelse if(remainder10>0){\nfor (let i=0;i<remainder10;i++){\narr.push(\"I\");\n}\nreturn arr.join(\"\");\n}\nelse {\nreturn arr.join(\"\");\n}\n}\nelse if(remainder400>=40){\narr.push(\"XL\");\n\nremainder40= remainder400%40;\nif(remainder40>5){\nremainderForty5= remainder40%5;\nif(remainderForty5==4){\narr.push(\"IX\");\nreturn arr.join(\"\");\n}\nelse {\narr.push(\"V\");\nfor (let i=0;i<remainderForty5;i++){\narr.push(\"I\");\n}\nreturn arr.join(\"\");\n}\n}\nelse if(remainder40==5){\narr.push(\"V\");\nreturn arr.join(\"\");\n}\nelse if(remainder40==4){\narr.push(\"IV\");\nreturn arr.join(\"\");\n}\nelse if(remainder40>0){\nfor (let i=0;i<remainder40;i++){\narr.push(\"I\");\n}\nreturn arr.join(\"\");\n}\nelse {\nreturn arr.join(\"\");\n}\n}\nelse if(remainder400>0){\n\ntens=Math.floor(remainder400/10);\nfor(let i=0;i<tens;i++){\narr.push(\"X\");\n}\nremainder10=remainder400%10;\n\nif(remainder10>5){\nremainderTen5= remainder10%5;\nif(remainderTen5==4){\narr.push(\"IX\");\nreturn arr.join(\"\");\n}\nelse {\narr.push(\"V\");\nfor (let i=0;i<remainderTen5;i++){\narr.push(\"I\");\n}\nreturn arr.join(\"\");\n}\n}\nelse if(remainder10==5){\narr.push(\"V\");\nreturn arr.join(\"\");\n}\nelse if(remainder10==4){\narr.push(\"IV\");\nreturn arr.join(\"\");\n}\nelse if(remainder10>0){\nfor (let i=0;i<remainder10;i++){\narr.push(\"I\");\n}\nreturn arr.join(\"\");\n}\nelse {\nreturn arr.join(\"\");\n}\n}\nelse {\nreturn arr.join(\"\");\n}\n}\nelse if (remainderM>0){ //remainderM less than 400\n\n\n\n\n\nfor (let i=0;i<Math.floor(remainderM/100);i++){\narr.push(\"C\");\n}\n\n\n\nremainder100 = remainderM % 100;\nif (remainder100 >=90){\narr.push(\"XC\");\nremainder90= remainder100%90;\nif(remainder90>5){\nremainder5= remainder90%5;\nif(remainder5==4){\narr.push(\"IX\");\nreturn arr.join(\"\");\n}\nelse {\narr.push(\"V\");\nfor (let i=0;i<remainder5;i++){\narr.push(\"I\");\n}\nreturn arr.join(\"\");\n}\n}\nelse if(remainder90==5){\narr.push(\"V\");\nreturn arr.join(\"\");\n}\nelse if(remainder90==4){\narr.push(\"IV\");\nreturn arr.join(\"\");\n}\nelse if(remainder90>0){\nfor (let i=0;i<remainder90;i++){\narr.push(\"I\");\n}\nreturn arr.join(\"\");\n}\nelse {\nreturn arr.join(\"\");\n}\n}\nelse if(remainder100>=50){\narr.push(\"L\");\nremainder50= remainder100%50;\ntens=Math.floor(remainder50/10);\nfor(let i=0;i<tens;i++){\narr.push(\"X\");\n}\nremainder10=remainder50%10;\n\nif(remainder10>5){\nremainderTen5= remainder10%5;\nif(remainderTen5==4){\narr.push(\"IX\");\nreturn arr.join(\"\");\n}\nelse {\narr.push(\"V\");\nfor (let i=0;i<remainderTen5;i++){\narr.push(\"I\");\n}\nreturn arr.join(\"\");\n}\n}\nelse if(remainder10==5){\narr.push(\"V\");\nreturn arr.join(\"\");\n}\nelse if(remainder10==4){\narr.push(\"IV\");\nreturn arr.join(\"\");\n}\nelse if(remainder10>0){\nfor (let i=0;i<remainder10;i++){\narr.push(\"I\");\n}\nreturn arr.join(\"\");\n}\nelse {\nreturn arr.join(\"\");\n}\n}\nelse if(remainder100>=40){\narr.push(\"XL\");\n\nremainder40= remainder100%40;\nif(remainder40>5){\nremainderForty5= remainder40%5;\nif(remainderForty5==4){\narr.push(\"IX\");\nreturn arr.join(\"\");\n}\nelse {\narr.push(\"V\");\nfor (let i=0;i<remainderForty5;i++){\narr.push(\"I\");\n}\nreturn arr.join(\"\");\n}\n}\nelse if(remainder40==5){\narr.push(\"V\");\nreturn arr.join(\"\");\n}\nelse if(remainder40==4){\narr.push(\"IV\");\nreturn arr.join(\"\");\n}\nelse if(remainder40>0){\nfor (let i=0;i<remainder40;i++){\narr.push(\"I\");\n}\nreturn arr.join(\"\");\n}\nelse {\nreturn arr.join(\"\");\n}\n}\nelse if(remainder100>0){\n\ntens=Math.floor(remainder100/10);\nfor(let i=0;i<tens;i++){\narr.push(\"X\");\n}\nremainder10=remainder100%10;\n\nif(remainder10>5){\nremainderTen5= remainder10%5;\nif(remainderTen5==4){\narr.push(\"IX\");\nreturn arr.join(\"\");\n}\nelse {\narr.push(\"V\");\nfor (let i=0;i<remainderTen5;i++){\narr.push(\"I\");\n}\nreturn arr.join(\"\");\n}\n}\nelse if(remainder10==5){\narr.push(\"V\");\nreturn arr.join(\"\");\n}\nelse if(remainder10==4){\narr.push(\"IV\");\nreturn arr.join(\"\");\n}\nelse if(remainder10>0){\nfor (let i=0;i<remainder10;i++){\narr.push(\"I\");\n}\nreturn arr.join(\"\");\n}\nelse {\nreturn arr.join(\"\");\n}\n}\nelse {\nreturn arr.join(\"\");\n}\n}\nelse {\nreturn arr.join(\"\"); //remainderM is 0\n}\n}\n}", "function convertToRoman(num) {\n const map = {\n M: 1000,\n CM: 900,\n D: 500,\n CD: 400,\n C: 100,\n XC: 90,\n L: 50,\n XL: 40,\n X: 10,\n IX: 9,\n V: 5,\n IV: 4,\n I: 1,\n };\n let result = '';\n \n\n for (let key in map) { \n const repeatCounter = Math.floor(num / map[key]);\n \n if (repeatCounter !== 0) {\n result += key.repeat(repeatCounter);\n }\n \n num %= map[key];\n \n if (num === 0) return result;\n }\n \n console.log(\"result:\", result);\n return result;\n }", "function romanToInteger(str){\n if (str.length < 0){\n return -1;\n }\n var len = str.length;\n var result = charToInt(str[0]);\n var pre, cur, i;\n for (i=1; i<len; i++){\n cur = charToInt(str[i]);\n pre = charToInt(str[i-1]);\n if (pre >= cur){\n result += cur;\n }else {\n result += cur - pre * 2;\n }\n }\n return result;\n}", "function convertToRoman(num) {\n let RomanNum= [1000,500,100,90,50,40,10,9,5,4,3,2,1];\n let RomanAlpha =['M','D','C','XC','L','XL','X','IX','V','IV','III','II','I'];\n let conver = '';\n for (let i=0; i<RomanNum.length;i++){\n while(RomanNum[i]<= num){\n conver += RomanAlpha[i];\n num -= RomanNum[i];\n }\n }\n return conver;\n}", "function convertToRoman(num) {\n //works on numbers under 4000 only\n //array with roman numerals\n var romanNum = [\"M\",\"CM\",\"D\",\"CD\",\"C\",\"XC\",\"L\",\"XL\",\"X\",\"IX\",\"V\",\"IV\",\"I\"];\n //matching array with arabic numbers\n var arabicNum = [1000,900,500,400,100,90,50,40,10,9,5,4,1];\n //result will be string\n var result = \"\";\n\n //loop through length of array, same for both\n //maybe use indexOf?\n for(i = 0; i < romanNum.length; i++){\n //while input value is greater or equal to the current arabic num in array\n //example: 36; will start checking from 10 b/c smaller than 40\n while (num >= arabicNum[i]) {\n //input value - current arabic num in array\n num -= arabicNum[i];\n //result is the string of matching roman numeral in same spot of array\n //X+X+X, then is smaller than 10\n result += romanNum[i];\n }\n }\n return result;\n //return num;\n}", "function convertToRoman(num) {\n/*Key: \nM - 1000\nD - 500\nC - 100\nL - 50\nX - 10\nV - 5\nI - 1*/\n let objKey = {\n 1000 : \"M\",\n 900 : \"CM\",\n 500 : \"D\",\n 400 : \"CD\",\n 100 : \"C\",\n 90 : \"XC\",\n 50 : \"L\",\n 40 : \"XL\",\n 10 : \"X\",\n 9 : \"IX\",\n 5 : \"V\",\n 4 : \"IV\",\n 1 : \"I\" \n }; \n let romArr = [];\n for(let i = 12; i >= 0; i--) {\n if(Math.floor(num/Object.keys(objKey)[i]) >= 1){\n romArr.push(Object.values(objKey)[i]);\n num -= Object.keys(objKey)[i];\n i++;\n }\n }\n romArr = romArr.join(\"\");\n console.log(romArr);\n}", "function convertToRoman(num) {\n // get input\n num = document.getElementById(\"num\").value;\n // Create an empty string for the result \n let result = [];\n\n // list all relevant numbers and numerals\n let arabicNum = [1000000,500000,100000,50000,10000,5000,1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1];\n \n let romanNum = [\"_M\",\"_D\",\"_C\",\"_L\",\"_X\",\"_V\",\"M\",\"CM\",\"D\",\"CD\",\"C\",\"XC\",\"L\",\"XL\",\"X\",\"IX\",\"V\",\"IV\",\"I\"];\n\n // Loop through the numbers while the number is greater than the number, keep looping\n arabicNum.map((number, i) => { \n while (num >= number) {\n // add numerals as you go --> loop numbers, find 1st, loop again, find 2nd\n result += romanNum[i];\n num -= number;\n }\n\n // add pop-up with result\n document.getElementById(\"answer\").innerHTML = result;\n });\n }", "static get romanNumeral() {\n return /^M{0,4}(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})$/;\n }", "function romanToArabic(roman) {\n const numeralValues = {\n I: 1,\n V: 5,\n X: 10,\n L: 50,\n C: 100,\n D: 500,\n M: 1000,\n };\n\n let romanArray = roman.split('').map((i) => numeralValues[i]);\n console.log({ romanArray });\n\n let result = 0;\n // let i = 0;\n const range = romanArray.length;\n console.log({ range });\n\n for (let i = 0; i < range; ) {\n if (i === 0) {\n result += romanArray[i];\n i++;\n } else if (\n romanArray[i] <= romanArray[i - 1] &&\n romanArray[i] >= romanArray[i + 1]\n ) {\n result += romanArray[i];\n i++;\n } else if (romanArray[i] < romanArray[i + 1]) {\n result += romanArray[i + 1] - romanArray[i];\n i += 2;\n }\n console.log({ i });\n }\n console.log({ result });\n\n // console.log(romanArray[i-1]);\n\n return result;\n}", "function roman(){\n let number = prompt(\"Write a number up to 4000\");\n //number= parseInt(number);\n let ronum = \"\";\n console.log(number);\n let numarray = [number[0],number[1],number[2],number[3]];\n \n if(number[0]==1){\n ronum=ronum+'M';\n }\n else if(number[0]==2){\n ronum=ronum+'MM';\n }\n else if(number[0]==3){\n ronum=ronum+'MMM';\n }\n console.log(ronum);\n\n if(number[1]==1){\n ronum=ronum+'C';\n }\n else if(number[1]==0){\n ronum=ronum;\n }\n else if(number[1]==2){\n ronum=ronum+'CC';\n }\n else if(number[1]==3){\n ronum=ronum+'CC';\n }\n else if(number[1]==4){\n ronum=ronum+'CD';\n }\n else if(number[1]==5){\n ronum=ronum+'D';\n }\n else if(number[1]==6){\n ronum=ronum+'DC';\n }\n else if(number[1]==7){\n ronum=ronum+'DCC';\n }\n else if(number[1]==8){\n ronum=ronum+'DCCC';\n }\n else if(number[1]==9){\n ronum=ronum+'CM';\n }\n\n if(number[2]==1){\n ronum=ronum+'X'\n }\n else if(number[2]==0){\n ronum=ronum;\n }\n else if(number[2]==2){\n ronum=ronum+'XX'\n }\n else if(number[2]==3){\n ronum=ronum+'XXX'\n }\n else if(number[2]==4){\n ronum=ronum+'XL'\n }\n else if(number[2]==5){\n ronum=ronum+'L'\n }\n else if(number[2]==6){\n ronum=ronum+'LX'\n }\n else if(number[2]==7){\n ronum=ronum+'LXX'\n }\n else if(number[2]==8){\n ronum=ronum+'LXXX'\n }\n else if(number[2]==9){\n ronum=ronum+'XC'\n }\n \n\n if(number[3]==1) {\n ronum= ronum+'I';\n }\n else if(number[3]==2) {\n ronum= ronum+'II';\n }\n else if(number[3]==0){\n ronum=ronum;\n }\n else if(number[3]==3) {\n ronum= ronum+'III';\n }\n else if(number[3]==4) {\n ronum= ronum+'IV';\n }\n else if(number[3]==5) {\n ronum= ronum+'V';\n }\n else if(number[3]==6) {\n ronum= 'VI';\n }\n else if(number[3]==7) {\n ronum= 'VII';\n }\n else if(number[3]==8) {\n ronum= 'VIII';\n }\n else if(number[3]==9) {\n ronum= 'IX';\n }\n\n console.log(ronum);\n}", "function romanGeneral(numberArray) {\n\n // integer to roman numeral mapping\n const numeralMapping = {\n '1': 'I', '2': 'II', '3': 'III', '4': 'IV', '5': 'V',\n '6': 'VI', '7': 'VII', '8': 'VIII', '9': 'IX',\n '10': 'X', '20': 'XX', '30': 'XXX', '40': 'XL', '50': 'L',\n '60': 'LX', '70': 'LXX', '80': 'LXXX', '90': 'XC',\n '100': 'C', '200': 'CC', '3000': 'CCC', '400': 'CD', '500': 'D',\n '600': 'DC', '700': 'DCC', '800': 'DCCC', '900': 'CM',\n '1000': 'M', '2000': 'MM', '3000': 'MMM'\n }\n\n // initialize roman numeral array\n const romanArray = [];\n\n // match integers with roman numerals\n for (let int of numberArray) {\n for (let [num, roman] of Object.entries(numeralMapping)) {\n if (num === int) {\n romanArray.push(roman);\n }\n }\n }\n\n // return roman numeral as string\n return romanArray.join('');\n}", "function convertToRoman(num){\n\n var changing_num = num;\n var roman_num = '';\n var divider_idx = 0;\n var divide_result;\n var roman_key = [\n [1000, \"M\"], \n [500, \"D\"], \n [100, \"C\"], \n [50, \"L\"], \n [10, \"X\"], \n [5, \"V\"], \n [1, \"I\"], \n ]\n\n divide_result = changing_num / roman_key[divider_idx][0];\n \n while( changing_num > 5) {\n divide_result = changing_num / roman_key[divider_idx][0];\n if (divide_result >= 1){\n changing_num /= roman_key[divider_idx][0] \n roman_num += roman_key[divider_idx][1]\n }else{\n divider_idx++;\n }\n console.log(changing_num);\n }\n\n return roman_num;\n}", "function toCheckRoman(value) {\r\n var romanNumeral = '';\r\n if (value <= 0) {\r\n document.getElementById(\"errorMessage\").innerHTML = \"Please enter the value as greater than zero\";\r\n } else if (value > 3000) {\r\n document.getElementById(\"errorMessage\").innerHTML = \"Please enter the value less than 3000\";\r\n } else {\r\n var romanNumeral = getRoman(value);\r\n }\r\n return romanNumeral;\r\n }", "function roman_to_Int(str1) {\n if(str1 == null) return -1;\n\n let num = char_to_int(str1.charAt(0));\n let pre, curr;\n\n for(var i = 1; i < str1.length; i++){\n curr = char_to_int(str1.charAt(i));\n pre = char_to_int(str1.charAt(i-1));\n if(curr <= pre){\n num += curr;\n } else {\n num = num - pre*2 + curr;\n }\n }\n\n return num;\n }", "function formatRoman(value, pattern) {\n var i,\n s = '',\n v = Number(String(value).slice(-3)),\n nThousands = (value - v) / 1000,\n decimal = [0, 1, 4, 5, 9, 10, 40, 50, 90, 100, 400, 500, 900].reverse(),\n numeral = ['0', 'I', 'IV', 'V', 'IX', 'X', 'XL', 'L', 'XC', 'C', 'CD', 'D', 'CM'].reverse();\n\n while (v > 0) {\n for (i = 0; i < decimal.length; i++) {\n if (decimal[i] <= v) {\n s += numeral[i];\n v -= decimal[i];\n break;\n }\n }\n }\n\n for (i = 0; i < nThousands; i++) {\n s = \"M\".concat(s);\n }\n\n if (pattern[1] !== pattern[1].toUpperCase()) {\n s = s.toLowerCase();\n }\n\n return s;\n}", "function solution(number){\n var roman = {M:1000,CM:900, D:500,CD:400,C:100,XC:90,L:50,XL:40,X:10,IX:9,V:5,IV:4,I:1 }\n var ans = '';\n while (number > 0) {\n for(a in roman) { \n if(roman[a] <= number) {\n ans += a; \n number -= roman[a]; \n break;\n } \n }\n }\n return ans;\n}", "function solution(roman){\n var sum = 0;\n var chars = roman.split('');\n var nums = [];\n\n\n var translate = function(letter) {\n switch(letter) {\n case \"M\":\n nums.push(1000);\n break;\n case 'D':\n nums.push(500);\n break;\n case 'C':\n nums.push(100);\n break;\n case 'L':\n nums.push(50);\n break;\n case 'X':\n nums.push(10);\n break;\n case 'V':\n nums.push(5);\n break;\n case 'I':\n nums.push(1);\n }\n };\n\n //convert each character to a number, push to numbers array\n for (var i=0; i<chars.length; i++) {\n translate(chars[i]);\n }\n\n //within numbers array, sum them up roman-numerals style\n for (var i=0; i<nums.length; i++) {\n if (nums[i] >= nums[i+1] || nums[i+1] == undefined) {\n sum += nums[i];\n }\n else {\n sum += nums[i+1] - nums[i];\n i++;\n }\n }\n\n return sum;\n}", "function convertRomans (numEntered) {\n var vNum = [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1];\n var rNum = ['M', 'CM', 'D', 'CD', 'C', 'XC', 'L', 'XL', 'X', 'IX', 'V', 'IV', 'I'];\n var result = \"\";\n for(i = 0; i < vNum.length; i++) {\n value = parseInt(numEntered/vNum[i]);\n for(j = 0; j < value; j++) {\n result += rNum[i];\n }\n numEntered = numEntered%vNum[i];\n }\n inputElement.value = ''\n inputElement.focus()\n return result;\n}", "function convertsmallnum(num) {\n var romanNumber = \"\";\n var romanNumeral = {\n 0: '',\n 1: 'I',\n 5: 'V',\n 9: 'IX',\n 10: 'X',\n 50: 'L',\n 90: 'XC',\n 100: 'C',\n 500: 'D',\n 900: 'CM',\n 1000: 'M'\n };\n // if number is already in the lookup table return property value without any processing\n if (romanNumeral[num] != undefined)\n return romanNumeral[num];\n // need to do hard work here :)\n if (num >= 1000) {\n t = num / 1000;\n var tmp = \"\";\n for (i = 0; i < t; i++) {\n tmp = tmp + romanNumeral[1000];\n }\n return tmp;\n }\n if (num > 500) {\n t = num / 500;\n var tmp = \"\";\n return romanNumeral[num]\n }\n}", "function testConvertRomanNumerals(){\n var testCases = {\n 'VII': 7,\n 'vii': 7,\n 'I': 1,\n 'i': 1,\n 'IV': 4,\n 'Iv': 4,\n 'iV': 4,\n 'IX': 9,\n 'XCIV': 94,\n 'xciv': 94\n }\n\n var NanCases = {\n 'ggg': true\n }\n\n for(numeral in testCases) {\n var actual = convertRomanNumeral(numeral);\n if(actual !== testCases[numeral]) {\n console.log(`Failed on ${numeral}, expected ${testCases[numeral]} but got ${actual}`);\n return false;\n }\n }\n\n for(numeral in NanCases) {\n var actual = convertRomanNumeral(numeral);\n if (!isNaN(actual)) return false;\n }\n\n console.log(\"all tests pass\");\n return true;\n }", "function roman(int){\n arr = []\n i = 0\n while(int>=500){\n int = int - 500\n arr[i] = 'D'\n i++\n }\n while( int>= 100){\n int = int - 100\n arr[i] = 'C'\n i++\n }\n while( int>= 50){\n int = int-50\n arr[i] = 'L'\n i++\n }\n while(int>= 10){\n int = int-10\n arr[i] = 'X'\n i++\n }\n while(int>=5){\n int = int -5\n arr[i] = 'V'\n i++\n }\n while(int>0){\n int = int - 1\n arr[i] = 'I'\n i++\n }\n console.log(arr.join(''))\n}", "function romanThousands(num, romanArr) {\n\tfor (var i= 0; i<num; i++) {\n romanArr.push(\"M\");\n }\n return romanArr;\n}", "function convert(numArray) {\n if (inputL === 4) {\n out.push(roman1000s[numArray[0]]);\n out.push(roman100s[numArray[1]]);\n out.push(roman10s[numArray[2]]);\n out.push(roman1s[numArray[3]]);\n } else if (inputL === 3) {\n out.push(roman100s[numArray[0]]);\n out.push(roman10s[numArray[1]]);\n out.push(roman1s[numArray[2]]);\n } else if (inputL === 2) {\n out.push(roman10s[numArray[0]]);\n out.push(roman1s[numArray[1]]);\n } else if (inputL === 1) {\n out.push(roman1s[numArray[0]]);\n } else {\n // prepare an error message for invalid entries or inputs beyond the scope of this exercise\n error = \"number is either not a valid number, or is too large for this edition of 'SUPERAWESOMEONLINEROMANNUMERALCONVERTERMACHINE'\";\n }\n // join array of roman nums into a single string and assign it to out variable\n out = out.join(\"\");\n // determine if output should be a roman numeral, or an error\n if (typeof input !== 'number') {\n output = error;\n } else {\n output = out;\n }\n }", "function isRoman(s) {\n // http://stackoverflow.com/a/267405/1447675\n return /^M{0,4}(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})$/i.test(s);\n}", "function BasicRomanNumerals(str) {\n let roman = { I: 1, V: 5, X: 10, L: 50, C: 100, D: 500, M: 1000 };\n let result = 0;\n for (let i = 0; i < str.length; i++) {\n if (roman[str[i]] < roman[str[i + 1]]) {\n result += roman[str[i + 1]] - roman[str[i]];\n i++;\n } else {\n result += roman[str[i]];\n }\n console.log(\"result ::\", result);\n }\n return result;\n}", "function toRomanNumerals(tonic, chords) {\n return chords.map(chord => {\n const [note, chordType] = (0, _chord.tokenize)(chord);\n const intervalName = (0, _core.distance)(tonic, note);\n const roman = (0, _romanNumeral.get)((0, _core.interval)(intervalName));\n return roman.name + chordType;\n });\n}", "function getRomanNumerals_firstDigitValues() {\n\t\treturn [\n\t\t\t'',\n\t\t\t'i',\n\t\t\t'ii',\n\t\t\t'iii',\n\t\t\t'iv',\n\t\t\t'v',\n\t\t\t'vi',\n\t\t\t'vii',\n\t\t\t'viii',\n\t\t\t'ix',\n\t\t];\n\t}", "function arabicToRoman(number1){\n\n const x = number1.split('');\n \n if (x.length==1){\n x.unshift[0,0,0]\n }else if (x.length==2){\n x.unshift[0,0] \n }else if (x.length==3){\n x.unshift[0] }\n\n\n if ( x[3]==1){\n x[3]= I;\n } else if (x[3]==2){\n x[3]= II;\n } else if ( x[3]==3){\n x[3]= III;\n } else if ( x[3]==4){\n x[3]=IV;\n } else if ( x[3]==5){\n x[3]= V;\n } else if ( x[3]==6){\n x[3]= VI;\n }else if ( x[0]==7){\n x[3]= VII;\n }else if ( x[0]==8){\n x[3]= VIII;\n }else if ( x[0]==9){\n x[3]= IX;\n }\n\n if ( x[2]==1){\n x[2]= X;\n } else if (x[2]==2){\n x[3]= XX;\n } else if ( x[2]==3){\n x[2]= XXX;\n } else if ( x[2]==4){\n x[2]= XL;\n } else if ( x[3]==5){\n x[2]= L;\n } else if ( x[3]==6){\n x[2]= LX;\n }else if ( x[0]==7){\n x[2]= LXX;\n }else if ( x[0]==8){\n x[2]= LXXX;\n }else if ( x[0]==9){\n x[2]= XC;\n }\n \n \n \n \n\nconsole.log(x); \nreturn x;\n}", "function arabicToRomanNumeral(number) {\n return new Promise( (resolve, reject) => {\n const url = `${environment.serverUrl}/api/v1/numeral?numeral=${number}`\n\n fetch(url, {method: 'GET'})\n .then(res => resolve(res.json()))\n .catch(err => reject(err))\n });\n}", "function Integer(v, radix, alphabet, caseSensitive) {\r\n if (typeof v === \"undefined\") return Integer[0];\r\n if (typeof radix !== \"undefined\") return +radix === 10 && !alphabet ? parseValue(v) : parseBase(v, radix, alphabet, caseSensitive);\r\n return parseValue(v);\r\n }", "function fromRomanNumerals(tonic, chords) {\n const romanNumerals = chords.map(_romanNumeral.get);\n return romanNumerals.map(rn => (0, _core.transpose)(tonic, (0, _core.interval)(rn)) + rn.chordType);\n}", "function romanNumerals() {\n for (let i = 0;)\n}", "static numerals() {\n return [\n { numeral: 'M', value: 1000 },\n { numeral: 'CM', value: 900 },\n { numeral: 'D', value: 500 },\n { numeral: 'CD', value: 400 },\n { numeral: 'C', value: 100 },\n { numeral: 'XC', value: 90 },\n { numeral: 'L', value: 50 },\n { numeral: 'XL', value: 40 },\n { numeral: 'X', value: 10 },\n { numeral: 'IX', value: 9 },\n { numeral: 'V', value: 5 },\n { numeral: 'IV', value: 4 },\n { numeral: 'I', value: 1 },\n ];\n }", "function insertRoman(num, rn){\r\n var roman = \"\";\r\n for(let i = 0; i < num; i++){\r\n roman = roman.concat(rn);\r\n }\r\n return roman;\r\n}//insertRoman", "function octalToDec(number) {\n function inner() {\n return parseInt(number);\n }\n return inner();\n}", "function convert(num) { \n if(num < 1){ return \"\";}\n if(num >= 1000){ return \"M\" + convert(num - 1000);}\n if(num >= 900){ return \"CM\" + convert(num - 900);}\n if(num >= 500){ return \"D\" + convert(num - 500);}\n if(num >= 400){ return \"CD\" + convert(num - 400);} \n if(num >= 100){ return \"C\" + convert(num - 100);}\n if(num >= 90){ return \"XC\" + convert(num - 90);}\n if(num >= 50){ return \"L\" + convert(num - 50);}\n if(num >= 40){ return \"XL\" + convert(num - 40);}\n if(num >= 10){ return \"X\" + convert(num - 10);}\n if(num >= 9){ return \"IX\" + convert(num - 9);}\n if(num >= 5){ return \"V\" + convert(num - 5);}\n if(num >= 4){ return \"IV\" + convert(num - 4);}\n if(num >= 1){ return \"I\" + convert(num - 1);} \n }", "function i2a (num) {\n // if (num === 0) return \"0\"\n let lookup = new Map()\n lookup.set(0, '0')\n lookup.set(1, '1')\n lookup.set(2, '2')\n lookup.set(3, '3')\n lookup.set(4, '4')\n lookup.set(5, '5')\n lookup.set(6, '6')\n lookup.set(7, '7')\n lookup.set(8, '8')\n lookup.set(9, '9')\n\n //handle negative cases\n let flag = true\n if (num < 0) {\n flag = false\n num *= -1\n }\n\n let reverseStr = \"\"\n while (num > 0) {\n let remainder = num % 10\n reverseStr += lookup.get(remainder)\n num = Math.floor(num/10)\n }\n\n let resultStr = \"\"\n for (let i=reverseStr.length-1; i>= 0; i--) {\n resultStr += reverseStr[i]\n }\n\n return flag ? resultStr : `-${resultStr}`\n\n}", "function main() {\n if (process.argv.length != expectedNumberOfArguments) {\n throw new Error(\"Unexpected number of input arguments. Expected \" + expectedNumberOfArguments + \" actual \" + process.argv.length)\n }\n \n let romanNumeralWritten = process.argv[2]\n let integerValue = convertRomanNumerals(romanNumeralWritten)\n}", "function solution(roman){\n let numerals = {'I': 1, 'V': 5, 'X': 10, 'L': 50, 'C': 100, 'D': 500, 'M': 1000,};\n let count = numerals[roman[roman.length-1]];\n \n for (let i = roman.length - 2; i >= 0; i--) {\n (numerals[roman[i]] >= numerals[roman[i+1]]) ?\n count += numerals[roman[i]] :\n count -= numerals[roman[i]]\n }\n return count;\n}", "function ToNumber(a) {\r\n\r\n var b;\r\n\r\n\r\n if (a === \"I\") {\r\n b = 1;\r\n\r\n } else if (a === \"V\") {\r\n b = 5;\r\n\r\n } else if (a === \"X\") {\r\n b = 10;\r\n\r\n } else if (a === \"L\") {\r\n b = 50;\r\n\r\n } else if (a === \"C\") {\r\n b = 100;\r\n\r\n } else if (a === \"D\") {\r\n b = 500;\r\n\r\n } else if (a === \"M\") {\r\n b = 1000;\r\n\r\n }\r\n return b;\r\n\r\n\r\n}", "function getIgnoreKeywords_romanNumerals() {\n\t\tvar numerals = getIgnoreKeywords_romanNumerals_numbersOnly();\n\t\tvar results = [];\n\t\tvar separators = numberSuffixSeparators();\n\t\t\n\t\tvar separatorscount = separators.length;\n\t\t\n\t\tfor(var i = 0; i < separatorscount; i++) {\n\t\t\tvar separator = separators[i];\n\t\t\t\n\t\t\tfor(j = 0; j <= 10; j++) {\n\t\t\t\tvar numeral = numerals[j];\n\t\t\t\tnumerals.push(numeral + separator + 'ly');\n\t\t\t\tnumerals.push(numeral + separator + 'th');\n\t\t\t\tnumerals.push('(' + numeral + separator + ')');\n\t\t\t\tnumerals.push('{' + numeral + separator + '}');\n\t\t\t\tnumerals.push('[' + numeral + separator + ']');\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn numerals;\n\t}", "function getRomanNumerals_secondDigitValues() {\n\t\treturn [\n\t\t\t'',\n\t\t\t'x',\n\t\t\t'xx',\n\t\t\t'xxx',\n\t\t\t'xl',\n\t\t\t'l',\n\t\t\t'lx',\n\t\t\t'lxx',\n\t\t\t'lxxx',\n\t\t\t'xc',\n\t\t];\n\t}", "function convert() {\r\n var dec = document.getElementById('decimalVal');\r\n if (dec.value.length == 0) {\r\n document.getElementById(\"errorMessage\").innerHTML = \"Empty not allowed\";\r\n } else if (isNaN(dec.value) === true) {\r\n document.getElementById(\"errorMessage\").innerHTML = \"This value is not a number\";\r\n } else if (dec.value.length > 0) {\r\n document.getElementById(\"errorMessage\").innerHTML = \"\";\r\n document.getElementById('romanVal').value = toCheckRoman(dec.value);\r\n }\r\n }", "function char_to_int(r){\n switch (r){\n case 'I': return 1;\n case 'V': return 5;\n case 'X': return 10;\n case 'L': return 50;\n case 'C': return 100;\n case 'D': return 500;\n case 'M': return 1000;\n default: return -1;\n }\n}", "toCardinal() {\n let m = this\n let res = m.map(val => {\n if (!val.has('#Ordinal')) {\n return val\n }\n let obj = parse(val)\n if (obj.num === null) {\n return val\n }\n let fmt = val.has('#TextValue') ? 'TextCardinal' : 'Cardinal'\n let str = format(obj, fmt)\n val.replaceWith(str, { tags: true })\n val.tag('Cardinal')\n return val\n })\n return new Numbers(res.document, res.pointer)\n }", "function convertDigit(digit, col) {\n\t\t// resulting string value we return as a roman numeral\n\t\t// (we concatenate where necessary, via Roman rules)\n\t\tlet value;\n\t\t\n\t\t// look up column by using index of this objects relevant elements\n\t\tlet romans = {\n\t\t\tunits:['I','X','C','M'],\n\t\t\tfives: ['V', 'L', 'D', '']\n\t\t};\n\t\t\n\t\tswitch (parseInt(digit)) {\n\t\t\tcase 1:\n\t\t\tcase 2:\n\t\t\tcase 3:\n\t\t\t\t// TODO: romans.units >>>\n\t\t\t\t//value = string concat.\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 4:\n\t\t\tcase 5:\n\t\t\tcase 6:\n\t\t\tcase 7:\n\t\t\tcase 8:\n\t\t\t\t// TODO: romans.fives >>>\n\t\t\t\t//value = string concat.\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 9:\n\t\t\t\t// TODO: romans.units >>>\n\t\t\t\t//value = string concat.\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:\n\t\t\t\tvalue = 'default';\n\t\t\t\t\n\t\t}\n\t\treturn value;\n\t}", "function getIgnoreKeywords_romanNumerals_numbersOnly() {\n\t\tvar digit1 = getRomanNumerals_firstDigitValues();\n\t\tvar digit2 = getRomanNumerals_secondDigitValues();\n\t\tvar digit3 = getRomanNumerals_thirdDigitValues();\n\t\tvar digit4 = getRomanNumerals_fourthDigitValues();\n\t\t\n\t\tvar numerals = digit1;\n\t\t\n\t\tnumerals = getIgnoreKeywords_romanNumerals_mergeLists({'mainlist':digit2, 'mergedlist':numerals});\n\t\tnumerals = getIgnoreKeywords_romanNumerals_mergeLists({'mainlist':digit3, 'mergedlist':numerals});\n\t\tnumerals = getIgnoreKeywords_romanNumerals_mergeLists({'mainlist':digit4, 'mergedlist':numerals});\n\t\t\n\t\treturn numerals;\n\t}", "function convert() {\n var num = $('.texty').val();\n var ara = [1000, 900, 500, 400, 100, 90, 50, 40, 10, 6, 5, 4, 1]; //Arabic numbers\n var rom = ['M', 'CM', 'D', 'CD', 'C', 'XC', 'L', 'XL', 'X', 'VI', 'V', 'IV', 'I']; //Roman numerals\n var final = '';\n for (var i = 0; i < rom.length; i++) {\n while (num >= ara[i]) {\n final += rom[i];\n num -= ara[i];\n }\n }\n $('.texty').val(final);\n }", "function convertMois(mois)\n{\n switch(mois)\n {\n case \"janvier\":\n return (1);\n case \"fevrier\":\n return (2);\n case \"mars\":\n return (3);\n case \"avril\":\n return (4);\n case \"mai\":\n return (5);\n case \"juin\":\n return (6);\n case \"juillet\":\n return (7);\n case \"aoat\":\n return (8);\n case \"septembre\":\n return (9);\n case \"octobre\":\n return (10);\n case \"novembre\":\n return (11);\n case \"decembre\":\n return (12);\n }\n}", "function getRomanNumerals_fourthDigitValues() {\n\t\treturn [\n\t\t\t'',\n\t\t\t'm',\n\t\t\t'mm',\n\t\t\t'mmm',\n\t\t];\n\t}", "function showRoman(roman) {\n $('.POJ').hide();\n $('.TRS').hide();\n $('.DT').hide();\n switch(roman) {\n case 't':\n $('.TRS').css('display', 'inline');\n break;\n case 'd':\n $('.DT').css('display', 'inline');\n break;\n default:\n $('.POJ').css('display', 'inline');\n }\n }", "function romanDecrypt(str) {\n let p1 = [];\n let p2 = [];\n let result = [];\n str = str.split('');\n str.forEach((l, i) => {\n (i % 2 === 0) ? (i !== str.length - 1) ? p1.push(l) : p2.push(l) : p2.push(l);\n });\n return result.concat(p1, p2).join('');\n}", "function getRomanNumerals_thirdDigitValues() {\n\t\treturn [\n\t\t\t'',\n\t\t\t'c',\n\t\t\t'cc',\n\t\t\t'ccc',\n\t\t\t'cd',\n\t\t\t'd',\n\t\t\t'dc',\n\t\t\t'dcc',\n\t\t\t'dccc',\n\t\t\t'cm',\n\t\t];\n\t}" ]
[ "0.7701473", "0.7673229", "0.7652371", "0.7606942", "0.74909365", "0.7477582", "0.7460199", "0.73037314", "0.7275474", "0.7255527", "0.72379744", "0.7234946", "0.7206486", "0.7188408", "0.715548", "0.711843", "0.7118097", "0.70999044", "0.7031964", "0.70021874", "0.69848704", "0.69317776", "0.69250315", "0.69199103", "0.69119316", "0.6900499", "0.6877635", "0.68755215", "0.68694144", "0.68680865", "0.68663335", "0.6824982", "0.68087286", "0.6803842", "0.6793717", "0.678162", "0.6728085", "0.66726065", "0.6671112", "0.6628323", "0.66068864", "0.6606321", "0.66032594", "0.65761983", "0.6574006", "0.65380484", "0.65359527", "0.648078", "0.6477073", "0.64425576", "0.64073914", "0.63845086", "0.62608194", "0.6193112", "0.6181755", "0.61238384", "0.6092207", "0.60858595", "0.60258996", "0.59696436", "0.59595895", "0.5917521", "0.5885608", "0.58832157", "0.5858248", "0.58488727", "0.5798536", "0.57933897", "0.5790612", "0.5753671", "0.5688095", "0.56527424", "0.5644358", "0.55995345", "0.55166876", "0.5441576", "0.54394025", "0.53589386", "0.5358022", "0.531722", "0.5315227", "0.5264199", "0.52600914", "0.5236519", "0.51878524", "0.5114271", "0.5090522", "0.50759417", "0.50496745", "0.50027806", "0.49121535", "0.48755714", "0.4863929", "0.4699759", "0.46981874", "0.4633588", "0.46314755", "0.4596781", "0.45539474", "0.45028993" ]
0.7541177
4
This is called when you click on the map. Go and try click now.
handleMapClick(event) { let { markers } = this.state; markers = update(markers, { $push: [ { position: event.latLng, defaultAnimation: 2, key: Date.now(), // Add a key property for: http://fb.me/react-warning-keys }, ], }); this.setState({ markers }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _mapClick() {\n infoBoxManager.turnOffInfoBoxStates();\n infoBoxManager.updateInfoBoxState(_overMarker, 0);\n}", "function clickMap(event) {\n u('#introduction').remove();\n clickTimer = setTimeout(function () {\n if (swallowClick) {\n swallowClick = false;\n return;\n }\n swallowClick = false;\n mly.moveCloseTo(event.latlng.lat, event.latlng.lng);\n }, 200);\n}", "_onMapClicked() {\n if(this._listener) {\n this._listener.mapClicked();\n }\n }", "function onMapClick() {\n // releaseClick();\n}", "function clickInfoForMapControlMenu() {\n // updatePermaLink(permaLink);\n // outMapControl();\n }", "function toggleClick() {\n\t\tif(ib.getMap()){\n\t\t\tib.close();\t\t\t\t\n\t\t} else {\n\t\t\tib.open(map,marker);\n\t\t}\n\t}", "function mouseClicked(){\n\tif(clicked){\n\t\tclicked =false; // check clicked status: first click set cy and cx, second click go back to regular mandlebrot. \n\t}\n\telse{\n\t\tclicked=true;\n\t\tcx = map(mouseX,0,width, -1.0, 1.0);\n\t\tcy = map(mouseY,0,height,-1.0,1.0);\n\t}\n}", "function doubleClickMap(event) {\n if (clickTimer) {\n clearTimeout(clickTimer);\n swallowClick = true;\n clickTimer = null;\n }\n createNewMarkerAt(event.latlng);\n}", "function onMapClick(e) \r\n {\r\n //hide accuracy radius circle on first click\r\n if (accuracyRadiusCircle != undefined)\r\n {\r\n mymap.removeLayer(accuracyRadiusCircle);\r\n accuracyRadiusCircle = undefined;\r\n }\r\n\r\n //only display route and destination marker if current location has been read\r\n if (currentLocationCoordinates != undefined)\r\n {\r\n //if not yet initialized, then initialize control object for routing\r\n if (control == undefined)\r\n { initializeControl(); }\r\n\r\n //pass destination coordinates to routeMap() function\r\n destinationLocationCoordinates = e.latlng;\r\n routeMap(currentLocationCoordinates, destinationLocationCoordinates, \"destination\");\r\n }\r\n else //current location detection was blocked/error occurred\r\n {\r\n alert(\"Allow the website to access your location to be able to set a destination and determine a route.\");\r\n }\r\n }", "function onMapClick(e) {\n\t alert(\"You clicked the map at \" + e.latlng);\n\t}", "function mouseLngLatClick() {\r\n Coordinates.state = (Coordinates.state + 1) % Coordinates.states.length\r\n switch (Coordinates.states[Coordinates.state]) {\r\n case 'll':\r\n Coordinates.DDnotM = true\r\n Coordinates.ZZnotAP = true\r\n break\r\n case 'en':\r\n Coordinates.ZZnotAP = true\r\n Coordinates.DDnotM = false\r\n break\r\n case 'rxy':\r\n Coordinates.ZZnotAP = false\r\n Coordinates.DDnotM = false\r\n break\r\n case 'site':\r\n Coordinates.ZZnotAP = false\r\n Coordinates.DDnotM = false\r\n break\r\n default:\r\n }\r\n\r\n Coordinates.refresh()\r\n}", "_onMapClick(e) {\r\n\t const targetElement = e.originalEvent.target;\r\n\t const element = this._element;\r\n\r\n\t if (\r\n\t this._handleClick &&\r\n\t (targetElement === element || element.contains(targetElement))\r\n\t ) {\r\n\t this._handleClick();\r\n\t }\r\n\t }", "function handleMouseUp(evt)\r\n{\r\n\tisClicked = false;\r\n\tmapFrame.style.cursor = \"default\";\r\n}", "function onMapClick(e) {\n \t //map click event object (e) has latlng property which is a location at which the click occured.\n //alert(1234);\n }", "function onMapClick(e) {\n alert(\"You clicked the map at \" + e.latlng);\n }", "handleMapClick(event) {\n }", "function onMapClick(e) {\r\n console.log(\"You clicked the map at \" + e.latlng);\r\n}", "function onMapClick(e) {\n\talert(\"You clicked the map at \" + e.latlng);\n}", "function clickBaiduMap(pt){\n\tpoint_bd = pt;\n\tcenterFS(point_bd);\n}", "function onMapClick(e) {\n // alert(\"You clicked the map at \" + e.latlng);\n}", "function onMapClick(e) {\n\t\tpopup\n\t\t\t.setLatLng(e.latlng)\n\t\t\t.setContent(\"You clicked the map at \" + e.latlng.toString())\n\t\t\t.openOn(map);\n\t}", "_onMapClick(e) {\n const targetElement = e.originalEvent.target;\n const element = this._element;\n\n if (\n this._handleClick &&\n (targetElement === element || element.contains(targetElement))\n ) {\n this._handleClick();\n }\n }", "static onMapMousedown() {\n store.dispatch(mapMousedown())\n }", "function onMapClick(e) {\n //map click event object (e) has latlng property which is a location at which the click occured.\n popup\n .setLatLng(e.latlng)\n .setContent(\"You clicked the map at \" + e.latlng.toString())\n .openOn(map);\n }", "function onMapClick(e) { //on a map click\n\t popup //set some stuff for the popup\n\t .setLatLng(e.latlng) //set the location\n\t .setContent(\"You clicked the map at \" + e.latlng.toString()) //set the text/content\n\t .openOn(map); //open it\n\t}", "function mapOnClick(e) {\n var coords = e.latLng;\n \n geocoder.geocode({'location': coords}, function(results, status) {\n if (status === 'OK') {\n if (program.addAllInfo(results[0])) { setMarkerPosition(coords); }\n } else {\n program.showMessage(\"\", \"Óþekkt villa. Ekki tókst að sækja staðsetninguna\");\n }\n });\n }", "function myclick(i) {\r\n google.maps.event.trigger(gmarkers[i], \"click\");\r\n}", "function mapaClick(mouse) {\r\n\tswitch (root.actividad) {\r\n\t\tcase 0: // Nada cargado\r\n\t\t\tbreak\r\n\r\n\t\tcase 1: // Ubicar marcas para recorte\r\n\t\t\tLogEtaCorte.agregarMarca(mouse)\r\n\t\t\tbreak\r\n\r\n\t\tcase 2: // Marcar contornos\r\n\t\t\tvar posR = posReal(mouse, mapa.escala)\r\n\t\t\tconsole.log(\"pos real: \", posR.x, posR.y)\r\n\r\n\t\t\tif (Glo.hayTrazoRojo) {\r\n\t\t\t\tmiProxy.guardarTrazo()\r\n\t\t\t\tGlo.hayTrazoVerde = true\r\n\t\t\t}\r\n\r\n\t\t\tmiProxy.marcarTrazo(\r\n\t\t\t\t\tposR.x,\tposR.y,\r\n\t\t\t\t\tNumber(pin_radio.currentText),\r\n\t\t\t\t\tNumber(pin_vecinos.currentText),\r\n\t\t\t\t\tNumber(pin_cambioAng.value) * 0.0174532925)\r\n\r\n\t\t\tGlo.hayTrazoRojo = true\r\n\t\t\tpin_btBorrarCapa.enabled = true\r\n\r\n\t\t\tmapa.actualizTrazos()\r\n\t\t\tbreak\r\n\t}\r\n}", "function mapDotClick(e) {\n var clickedEvent = null;\n\n //Find the pushpin that matches the target, and then look up the matching event\n //TODO: We may be able to optimize this to assume the pushpin id always matches the event ID - something to look into\n for (var i = 0; i < AppGlobals.oneUpStateObject.map.entities.getLength() ; i++) {\n if (e.target == AppGlobals.oneUpStateObject.map.entities.get(i)) {\n clickedEvent = AppGlobals.oneUpStateObject.getEventFromPushpinIndex(i);\n }\n }\n\n if (clickedEvent != null) {\n //Set the new selected ID\n AppGlobals.oneUpStateObject.setSelectedEventId(clickedEvent.id);\n\n AppGlobals.oneUpStateObject.transitionDetailsDiv(2);\n } else {\n //TODO: Blow up\n }\n }", "function myClick(id){\n google.maps.event.trigger(markers[id], 'click');\n }", "function myclick(i) {\n\tgoogle.maps.event.trigger(gmarkers[i], \"click\");\n}", "function clickPoint( point ) {\n ceui.showStation({ id : point.id, name : point.name, latlon : \"\" });\n // removed code exhibit \"B\" was here\n }", "function onMapClick(e){\r\n\t\t\t\tvar coordinate = e.latlng.toString().split(',');\r\n\t\t\t\tvar lat = coordinate[0].split('(');\r\n\t\t\t\tvar lng = coordinate[1].split(')');\r\n\t\t\t\tvar latlng = \"You preclicked the map at <br><strong>Latitude: </strong>\" + lat[1]\r\n\t\t\t\t+ \"<br><strong>Longitude: </strong>\" + lng[0];\r\n\t\t\t\tinfo.innerHTML = latlng;\r\n\t\t\t\tpopup\r\n\t\t\t\t\t.setLatLng(e.latlng)\r\n\t\t\t\t\t.setContent(latlng)\r\n\t\t\t\t\t.openOn(map);\r\n\t\t\t}", "function receiveMapClickEvent(event) {\n var now = new Date().getTime();\n var lastClick = lastMapClickMillis;\n lastMapClickMillis = now;\n if (displayedCode.is_pinned) {\n if (now - lastClick < 3000) {\n // Tapped twice in 3 seconds - they're probably confused why the first tap\n // did nothing, so unpin and continue with the tap.\n togglePushPin();\n } else {\n // It's pinned, so ignore the tap. They should unpin the current location.\n return;\n }\n }\n var zoom = map.map.getZoom();\n var center = map.map.getCenter();\n var codeLength = 4;\n for (var i = 0; i < CodeLengthZoom.length; i++) {\n if (zoom >= CodeLengthZoom[i].zoom) {\n codeLength = CodeLengthZoom[i].code;\n }\n }\n var newcode = OpenLocationCode.encode(event.latLng.lat(), event.latLng.lng(), codeLength);\n if (displayedCode.code == newcode) {\n return;\n }\n displayedCode.setCode(newcode);\n displayedCode.setUrl();\n displayCodeInformation(displayedCode);\n map.setCodeMarker(\n displayedCode.codeArea.latitudeLo,\n displayedCode.codeArea.longitudeLo,\n displayedCode.codeArea.latitudeHi,\n displayedCode.codeArea.longitudeHi);\n map.zoomToCenter(\n displayedCode.codeArea.latitudeCenter,\n displayedCode.codeArea.longitudeCenter,\n zoom);\n}", "function receiveMapClickEvent(event) {\n var now = new Date().getTime();\n var lastClick = lastMapClickMillis;\n lastMapClickMillis = now;\n if (displayedCode.is_pinned) {\n if (now - lastClick < 3000) {\n // Tapped twice in 3 seconds - they're probably confused why the first tap\n // did nothing, so unpin and continue with the tap.\n togglePushPin();\n } else {\n // It's pinned, so ignore the tap. They should unpin the current location.\n return;\n }\n }\n var zoom = map.map.getZoom();\n var center = map.map.getCenter();\n var codeLength = 4;\n for (var i = 0; i < CodeLengthZoom.length; i++) {\n if (zoom >= CodeLengthZoom[i].zoom) {\n codeLength = CodeLengthZoom[i].code;\n }\n }\n var newcode = OpenLocationCode.encode(event.latLng.lat(), event.latLng.lng(), codeLength);\n if (displayedCode.code == newcode) {\n return;\n }\n displayedCode.setCode(newcode);\n displayedCode.setUrl();\n displayCodeInformation(displayedCode);\n map.setCodeMarker(\n displayedCode.codeArea.latitudeLo,\n displayedCode.codeArea.longitudeLo,\n displayedCode.codeArea.latitudeHi,\n displayedCode.codeArea.longitudeHi);\n map.zoomToCenter(\n displayedCode.codeArea.latitudeCenter,\n displayedCode.codeArea.longitudeCenter,\n zoom);\n}", "function userMarkerClickListener(event) {\n lastLocation = event.latLng;\n return dropClick();\n}", "function mapKeyGo() {\n $('.map_buttons').change(function() {\n id = $(this).val();\n $(id).click()\n });\n }", "function markerClick(e) {\n var coord = e.latlng;\n fillFieldsLatlng(coord)\n }", "handleMapClick(event) {\n const nextMarkers = [\n ...this.state.markers,\n {\n position: event.latLng,\n defaultAnimation: 2,\n key: Date.now(), // Add a key property for: http://fb.me/react-warning-keys\n },\n ];\n this.setState({\n markers: nextMarkers,\n });\n\n if (nextMarkers.length === 3) {\n alert(\n `Right click on the marker to remove it`,\n `Also check the code!`\n );\n }\n }", "onClick(event){\n this.geocodeLatLng(event.latLng, address =>{\n if(typeof(this.onClickMap) === 'function'){\n this.onClickMap(address, event.latLng)\n }\n })\n }", "function echartMapClick (param) {\n\tif (param.name != \"\") {\n\t\tbMap(param.name);\n\t\treturn false;\n\t} else {\n\t\treturn false;\n\t}\n}", "function onLocationFound(e) {\n onClick(e)\n}", "markerClick(id, cafe) {\n this.setState({ redirect: true, id: id });\n this.clickToggle();\n // Set other markers to invisible\n this.deleteMarkers(cafe);\n }", "function onMapClick(e) {\n console.log(i18n[\"ui-click\"] + mymap.wrapLatLng(e.latlng));\n }", "function handleLongClickInMap(currentEvent)\n\t{\n\t\tvar lastClickedPos = map.screenToGeo(currentEvent.currentPointer.viewportX, currentEvent.currentPointer.viewportY);\n\n\t\tsh = lastClickedPos.lat + \",\" + lastClickedPos.lng;\n\t\tdocument.getElementById(\"start\").value = sh;\n\t\tgeocode(sh);\n\t}", "function onMapClick(e) {\r\npopup\r\n.setLatLng(e.latlng)\r\n.setContent(\"You clicked the map at \" + e.latlng.toString())\r\n.openOn(mymap);\r\n}", "function clickHandler(e) {\n // Nur bei Linksklick\n if (e.button !== 0) return;\n clickAt(e.offsetX, e.offsetY);\n }", "function clickBMCC(evt){\n\t\tevt.preventDefault();\n\t\t$.each(locations, function(id, info)\n\t\t{ \n\t\t\tconsole.log(info);\n var mark= addMarker(info.loc[0], info.loc[1]);\t\n \n mark.index = id;\n\n\t\tvar listener = google.maps.event.addListener(mark, \"click\", clickMap);\n\n\t\t}); \t\t\n\t}", "function ChangeMapByClick(evt){\n\t\n\t// First, to detect if the event if a change of image map, and detect if the image is already loaded\n\tif ((GetAction(evt) == \"AHEAD\" || GetAction(evt) == \"BACK\" ) && imageLoaded == 1) {\n\t\n\t\t// Detect an action to move ahead\n\t\tif (GetAction(evt) == \"AHEAD\"){\n\t\t\t\n\t\t\t// Set the event action to global \n\t\t\tmovePageAction = \"AHEAD\";\n\t\t\t\n\t\t\t// See if the limit of page\n\t\t\tif(currentMapNumber < currentEpisode.Pages[currentPage].Maps.length - 1){\n\t\t\t//When its possible to change to next map, increment counter and set the map to image\n\t\t\t\tcurrentMapNumber++;\n\t\t\t\tSetImageViewByMap(currentEpisode.Pages[currentPage].Maps[currentMapNumber]);\n\t\t\t}\n\t\t\telse{\n\t\t\t\t// Trying to move to another page, to the first map\n\t\t\t\tif(currentPage < currentEpisode.Pages.length - 1){\n\t\t\t\t\tcurrentPage++;\n\t\t\t\t\tLoadPageToSVG(currentEpisode.Pages[currentPage].Path);\t\t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t// If in the limit of the pages, load the next episode\n\t\t\t\t\tepisodeNumber++;\n\t\t\t\t\tLoadEpisode(episodeNumber);\n\n\t\t\t\t\t// Watch and return the episode minus 1, when it detect error\n\t\t\t\t\tif (ReturnIfImageError() == true)\n\t\t\t\t\t\tepisodeNumber = 0; \n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse if (GetAction(evt) == \"BACK\"){\n\t\t\t\n\t\t\t// Set the event action to global \n\t\t\tmovePageAction = \"BACK\";\n\t\t\t\n\t\t\t// See if the limit of page\n\t\t\tif(currentMapNumber >= 1){\n\t\t\t//When its possible to change to last map, decrement counter and set the map to image\n\t\t\t\tcurrentMapNumber--;\n\t\t\t\tSetImageViewByMap(currentEpisode.Pages[currentPage].Maps[currentMapNumber]);\n\t\t\t}\n\t\t\telse{\n\t\t\t\t// Trying to move to another page, to the last map\n\t\t\t\tif(currentPage >= 1){\n\t\t\t\t\tcurrentPage--;\n\t\t\t\t\tLoadPageToSVG(currentEpisode.Pages[currentPage].Path);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t// If in the start of the pages, load the last episode\n\t\t\t\t\tepisodeNumber--;\n\t\t\t\t\tLoadEpisode(episodeNumber);\n\n\t\t\t\t\t// Watch and return the episode plus 1, when it detect error\n\t\t\t\t\tif (ReturnIfImageError() == true)\n\t\t\t\t\t\tepisodeNumber = 0; \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\telse{\n\t\n\t\t// Detecting event to exit the SubPages tutorial\n\t\tif (GetAction(evt) == \"ESC\"){\n\t\t\tClosePageElement();\n\t\t}\n\t\t//In case of Context Menu, return false to do not allow to show the submenu\n\t\telse{\n\t\t\tif (evt.type == \"contextmenu\") \n\t\t\t\treturn false;\n\t\t\telse\n\t\t\t\treturn true;\n\t\t}\n\t}\n}", "onMapCommandButtonClick(e) {\n this._showGoToDialog();\n }", "function onMapClick(e) {\n clickLat = e.latlng.lat;\n clickLong = e.latlng.lng;\n popup\n .setLatLng(e.latlng)\n .setContent(\"You clicked the map at \" + e.latlng.toString().substring(6,27))\n .openOn(map);\n latNum = e.latlng.lat\n lngNum = e.latlng.lng \n if (marker) { // check\n map.removeLayer(marker);\n\n }\n marker = new L.Marker(e.latlng);\n marker.addTo(map);\n marker.bindPopup(\"Current Latitude and Longitude is \" + e.latlng.toString().substring(6,27)).openPopup();\n}", "function reDirectMap(event) {\n console.log(\"clicked!\");\n var lat = parseFloat($(this).attr(\"lat\"));\n var lng = parseFloat($(this).attr(\"lng\"));\n console.log(`lat: ${lat}, lng: ${lng}`);\n map.setCenter({\n lat: lat,\n lng,\n lng\n });\n map.setZoom(10);\n}", "function googlemarkerclicked() {\r\n\r\n\tvar currmarker = this;\r\n\r\n\tvar markerid = this.mid;\r\n\r\n\t//Handle marker click\r\n\tmarkerclicked(markerid, currmarker);\r\n\r\n}", "function TrackerMap() {\n\t\tvar submit = document.getElementById(\"submit\");\n\t\tsubmit.onclick = run;\n\n\t\tfunction run() {\n\t\t\tvar display_TrackerMap = document.getElementById(\"clickme\");\n\t\t\tdisplay_TrackerMap.style.display = \"block\";\n\t\t\treturn false;\n\t\t}\n\t}", "function onMapClick(e) {\n popup\n .setLatLng(e.latlng)\n .setContent(\"You clicked the map at \" + e.latlng.toString())\n .openOn(mymap);\n}", "onMapClicked() {\n this.setState({\n showingInfoWindow: false,\n activeMarker: null,\n })\n }", "function mapClickListener(event) {\n // If drop mode is enabled, there should not be clicks outside of radius.\n if (dropMode) {\n if ($(\"#guide-footer\").hasClass('active') == false) {\n $(\"#guide-footer\").addClass('active');\n }\n $(\"#guide-text\").text(\"Incorrect area - select a place within the grey circle.\");\n $(\"#guide-text\").css('color', 'rgba(209, 44, 29, 1)');\n }\n // If the map is clicked while not in drop mode, then shrink the current message open.\n else {\n if (currCow.infoBox != null && currCow.previewBox != null && currCow.marker != null) {\n shrinkMessage(currCow.infoBox, currCow.previewBox, currCow.marker.isGray);\n currCow.infoBox.close();\n currCow.infoBox = currCow.previewBox = currCow.marker = null;\n }\n }\n}", "function gotoMap() {\n $anchorScroll('map-canvas');\n }", "function handleMouseDown(evt)\r\n{\r\n\tif (inFrame(evt.clientX,evt.clientY)) \r\n\t{\r\n\t\txOld = evt.clientX - getLeft();\r\n\t\tyOld = evt.clientY - getTop();\r\n\t\tisClicked = true;\r\n\t\tevt.preventDefault();\r\n\t}\r\n\tmapFrame.style.cursor = \"move\";\r\n}", "function mouseClickedOnCanvas() {\n game.click = true;\n}", "function onMapClick(e) {\r\n popup\r\n .setLatLng(e.latlng)\r\n .setContent(\"You clicked the map at \" + e.latlng.toString())\r\n .openOn(mymap);\r\n}", "function onMapClick(e) {\r\n popup\r\n .setLatLng(e.latlng)\r\n .setContent(\"You clicked the map at \" + e.latlng.toString())\r\n .openOn(mymap);\r\n}", "function activateInfoClick(callback) {\n featureInfo.ActivateInfoClick(callback, map);\n }", "function onPointClick(event) {\n\t\ttoggleDisplayedPoint(this);\n\t}", "function mouseClicked() {\n // If it has been clicked return true\n return true;\n }", "handleMapClick(event) {\n let { markers } = this.state;\n markers = update(markers, {\n $push: [\n {\n position: event.latLng,\n defaultAnimation: 2,\n key: Date.now(), // Add a key property for: http://fb.me/react-warning-keys\n },\n ],\n });\n this.setState({ markers });\n\n if (markers.length === 3) {\n this.props.toast(\n `Right click on the marker to remove it`,\n `Also check the code!`\n );\n }\n }", "function processClick(event){\n\n\tvar x = event.x;\n\tvar y = event.y;\n\tvar canvas = document.getElementById(\"US-Map\");\n\tvar rect = canvas.getBoundingClientRect();\n\tx -= rect.left;\n\ty -= rect.top\n\ty = rect.height - y;\n\t// console.log(x + \", \" + y);\n\tvar longInterval = rect.width / USAHorizonScale;\n\tvar latInterval = rect.height / USAVerticalScale;\n\tvar xCoord = Math.floor(x / longInterval);\n\tvar yCoord = Math.floor(y / latInterval);\n\t// console.log(xCoord + \", \" + yCoord);\n\t\n\n\tif(autoFeedPosition){\n\t\tconsole.log(\"AUTO FEEDING\");\n\t\txCoord = event.x;\n\t\tyCoord = event.y;\n\t\tautoFeedPosition = false;\n\t}\n\n\n\tvar finalPos = xCoord + yCoord * USAHorizonScale;\n\n\n\n\n\n\tt_lastClickPosition = finalPos;\n\tconsole.log(xCoord + \", \" + yCoord);\n\tif(tempMapGrid === null){\n\t\treturn;\n\t}\n\tdrawMap(tempMapGrid, finalPos);\n\tpauseChronoAnimation();\n\tlocation.href = \"#\";\n\tlocation.href = \"#selectedAreaInfo\";\n\t// console.log(finalPos);\n\t// console.log(tempMapGrid[finalPos]);\n\tupdateTableValueDisplay();\n\n\n\tif(tempMapGrid[finalPos].length === 0){\n\t\t//No entries in region\n\t\talert(\"No entries in the selected region\");\n\t\tdocument.getElementById(\"selectedAreaInfo\").style.display = \"none\";\n\t\tdocument.getElementById(\"massCategoryLineChart\").style.display = \"none\";\n\t\treturn;\n\t}\n\n\tvar nextPredictedForArea =parseFloat(getNewestMeteorite(tempMapGrid[finalPos])[year].getFullYear()) + parseFloat((1 / getAverageMeteoritesPerYear(tempMapGrid[finalPos])).toFixed(0));\n\tvar nextPredictedForUSA = parseFloat(getNewestMeteorite(getAmericanMeteorites())[year].getFullYear()) + parseFloat((1 / getAverageMeteoritesPerYear(getAmericanMeteorites())).toFixed(0));\n\tupdate(\"SubsetLabel\", getRegionLabel(xCoord, yCoord) + \" (\" + convertAreaLabelToReference(getRegionLabel(xCoord, yCoord)) + \")\");\n\tupdate(\"SubsetNewest\", getNewestMeteorite(tempMapGrid[finalPos])[name] + \" (\" + getNewestMeteorite(tempMapGrid[finalPos])[year].getFullYear() + \")\");\n\tupdate(\"SubsetOldest\", getOldestMeteorite(tempMapGrid[finalPos])[name] + \" (\" + getOldestMeteorite(tempMapGrid[finalPos])[year].getFullYear() + \")\");\n\tupdate(\"SubsetIQR\", getInterquartileRange(tempMapGrid[finalPos]).lower + \"g to \" + getInterquartileRange(tempMapGrid[finalPos]).upper + \"g\");\n\tupdate(\"SubsetAverageMass\", getAverageMass(tempMapGrid[finalPos]).toFixed(3) + \"g\");\n\tupdate(\"USAverageMass\", getAverageMass(getAmericanMeteorites()).toFixed(3) + \"g\");\n\tupdate(\"SubsetMassRangeExpectation\", getMassGroupLabel(getMassRangeExpectation(categorizeByMass(tempMapGrid[finalPos]), tempMapGrid[finalPos].length)));\n\tupdate(\"USMassRangeExpectation\", getMassGroupLabel(getMassRangeExpectation(categorizeByMass(getAmericanMeteorites()), getAmericanMeteorites().length)));\n\tupdate(\"SubsetStandardDeviation\", getStandardDeviation(tempMapGrid[finalPos]).toFixed(3) + \"g\");\n\tupdate(\"USStandardDeviation\", getStandardDeviation(getAmericanMeteorites()).toFixed(3) + \"g\");\n\tupdate(\"SubsetMeteoritesPerYear\", getAverageMeteoritesPerYear(tempMapGrid[finalPos]).toFixed(3));\n\tupdate(\"USMeteoritesPerYear\", getAverageMeteoritesPerYear(getAmericanMeteorites()).toFixed(3));\n\tupdate(\"SubsetAmpyPercentile\", getPercentileAMPY(tempMapGrid, finalPos) + getOrdinalEnding(getPercentileAMPY(tempMapGrid, finalPos)));\n\tupdate(\"SubsetEntries\", tempMapGrid[finalPos].length);\n\tupdate(\"USEntries\", getAmericanMeteorites().length);\n\tupdate(\"SubsetPredictedTime\", nextPredictedForArea);\n\tupdate(\"SubsetChanceNextYear\", getChanceOfNextInXYears(tempMapGrid[finalPos], 1.0).toFixed(4));\n\tupdate(\"SubsetChanceNext5Years\", getChanceOfNextInXYears(tempMapGrid[finalPos], 5.0).toFixed(4));\n\tupdate(\"SubsetDangerRank\", findRankOfDangerousnessOfArea(finalPos) + getOrdinalEnding(findRankOfDangerousnessOfArea(finalPos)) + \" out of \" + (USAHorizonScale * USAVerticalScale));\n\t\n\tupdate(\"USAOldest\", getOldestMeteorite(getAmericanMeteorites())[name] + \"(\" + getOldestMeteorite(getAmericanMeteorites())[year].getFullYear() + \")\");\n\tupdate(\"USANewest\", getNewestMeteorite(getAmericanMeteorites())[name] + \"(\" + getNewestMeteorite(getAmericanMeteorites())[year].getFullYear() + \")\");\n\tupdate(\"USAIQR\", getInterquartileRange(getAmericanMeteorites()).lower + \"g to \" + getInterquartileRange(getAmericanMeteorites()).upper + \"g\");\n\tupdate(\"USAPredictedTime\", nextPredictedForUSA);\n\tupdate(\"USAChanceNextYear\", getChanceOfNextInXYears(getAmericanMeteorites(), 1.0).toFixed(4));\n\tupdate(\"USAChanceNext5Years\", getChanceOfNextInXYears(getAmericanMeteorites(), 5.0).toFixed(4));\n\tdocument.getElementById(\"selectedAreaInfo\").style.display = \"block\";\n\tupdateMassDistributionGraph(document.getElementById(\"distributionMode\").value, tempMapGrid[finalPos], \"massDistributionChartSubset\", getRegionLabel(xCoord, yCoord));\n\tupdateMassDistributionGraph(document.getElementById(\"distributionMode\").value, getAmericanMeteorites(), \"massDistributionChartUSA\", \"USA\");\n\tcreateMultiLineMassChart(tempMapGrid[finalPos]);\n\t\n\thighlightDangerRankInListing(getRegionLabel(xCoord, yCoord));\n\t// console.log(finalPos + \" FAIL: \" + translateIndexToCoords(finalPos, USAHorizonScale, USAVerticalScale))\n\n}", "function openMap () {\n $('.interactivemap-head').click(function() {\n if(!$(this).hasClass('up')) {\n $('#imagemap-wrapper').slideDown(900);\n $(this).addClass('up');\n $('.interactivemap-head .interactivebtn-wraper span').fadeOut(1000);\n } else {\n $('#imagemap-wrapper').slideUp(1200);\n $(this).removeClass('up');\n $('.interactivemap-head .interactivebtn-wraper span').fadeIn(1000);\n }\n });\n }", "function onPolyClick(e){\n clickedLatLng = e.latlng;\n}", "function clickEventer(event){\n\t\t// get the coordinate of the clicked postion\n\t \tvar coord = getCoordinate(event); \n\t \tif(checkInfoWindow()){ // check if infowindow was opened\n\t \t\tmapCollector.infowindow.close() //close opened window\n\t \t\tcreateNewInfoWindow(coord, contentString) //create new one\n\t \t\tmapCollector.infowindow.open(map); // open the newly created\n\t \t}else{\n\t \t\tcreateNewInfoWindow(coord, contentString) // create new one\n\t \t\tmapCollector.infowindow.open(map); // open it\n\t \t}\n\t \t\n }", "canvasClick() {\n\t\tthis.bird.jumpBird();\n\t}", "onLoadButtonClick() {\n console.log(\"Loaderbox Clicked!\");\n this.jqueryMap.$load.click();\n return false;\n }", "function tileClick() {\n\tmoveOneTile(this);\n}", "function battleMapOptionsMenuClicked() {\n if(store.getState().isOptionsPanelOpened) {\n battleMapGamePauseImageid.classList.remove('nodisplay');\n battleMapOptionsMenuCloseStateChangeStarter();\n setTimeout(function(){\n isUserFocusOnThePage = true;\n isUserFocusOnTheGame = true;\n battleMapOptionsMenuCloseManualpauseOffStateChangeStarter();\n }, 50);\n\n } else {\n battleMapGamePauseImageid.classList.add('nodisplay');\n battleMapOptionsMenuOpenStateChangeStarter();\n }\n }", "function anchorClick() {\n var marker = markerForUrl( this.href );\n if( marker ) {\n if( /\\bZOOM\\b/.exec( this.className ) ) {\n var mapType = marker.mapType || marker.ezmap.map.getCurrentMapType();\n var zoomLevel;\n if( marker.span ) {\n zoomLevel = mapType.getSpanZoomLevel(\n marker.point, marker.span, marker.ezmap.viewsize );\n }\n else {\n zoomLevel = marker.ezmap.map.getZoom();\n }\n marker.ezmap.map.setCenter( marker.point, zoomLevel, mapType );\n }\n marker.doOpen();\n return false;\n }\n else {\n return true;\n }\n }", "function clickActivate() {\r\n populateInfoWindow(this, largeInfowindow);\r\n }", "function onMapClick(e) {\r\npopup\r\n.setLatLng(e.latlng)\r\n.setContent(\"You can set question at \" + e.latlng.toString())\r\n.openOn(mymap);\r\n}", "function onMapClick(e) { // defining click function\n popup // calling popup\n .setLatLng(e.latlng) \n .setContent(\"You clicked the map at \" + e.latlng.toString()) // setting the popup content\n .openOn(mymap); // adding it to the map\n}", "function canvasClick(e) {\n\tblockus.mouseClicked();\n}", "function triggerClick(i) {\n google.maps.event.trigger(markers[i], \"click\");\n}", "chooseLoc(event) {\n\t\tevent.preventDefault();\n\t\tthis.showMap = true; // Display the google map component to select a location\n\t}", "function initMapClickHandlers() {\r\n\tvar listener = google.maps.event.addListener(map, 'tilesloaded', function() {\r\n\t\tgoogle.maps.event.addListener(map, 'click', mapLeftClicked);\r\n\t\tgoogle.maps.event.removeListener(listener);\r\n\t});\r\n}", "onLocationClicked(){}", "function onMapClickEvent(event) {\n createTempDraggingMarker(googleMap, event.latLng);\n }", "function mapClick() {\r\n\tlet map = document.querySelectorAll('.wrap-map .map');\r\n\tlet wrap = document.getElementById('map');\r\n\r\n\tfor(let i = 0; i < map.length; i++) {\r\n\r\n\t\tmap[i].onclick = function() {\r\n\t\t\tfor(let j = 0; j < map.length; j++) {\r\n\t\t\t\tmap[j].classList.remove('yellow');\r\n\t\t\t}\r\n\t\t\tthis.classList.add('yellow');\r\n\t\t}\r\n\t}\r\n}", "function setClickPoint(){\r\n\tmap.getSource('clickPoint').setData({\r\n\t\t\"type\": \"FeatureCollection\",\r\n\t\t \"features\": [{\r\n\t\t\t \"type\": \"Feature\",\r\n\t\t\t \"properties\": { \"name\": \"User Click\"},\r\n\t\t\t \"geometry\": {\r\n\t\t\t\t \"type\": \"Point\",\r\n\t\t\t\t \"coordinates\": [clickLng, clickLat]\r\n\t\t\t }\r\n\t\t }]\r\n\t});\r\n}", "function clickMarker(e) {\n deselectCurrentMarker();\n var markerComponent = mly.getComponent('marker');\n var marker = e.target || e;\n marker.options.tags = marker.options.tags || {};\n selectedMarker = marker;\n marker.setIcon(redIcon);\n markerId = marker.id;\n currentMarkerId = markerId;\n markerComponent.add([mapillaryMarkers[currentMarkerId]]);\n}", "function markerClickHandler() {\n // clear map from all windows and animations\n stopAnimateAllMarkers();\n closeAllWindows();\n\n // set only one animation of clicked marker\n this.setAnimation(google.maps.Animation.BOUNCE);\n // open info window related to marker\n infoWindows[markers.indexOf(this)].open(map, this);\n}", "function openMarker(i) {\n GEvent.trigger(gmarkers[i], \"click\");\n}", "function onMapClick(map) {\n localGroup.clearLayers();\n console.log(map.latlng.lat, map.latlng.lng);\n\n L.marker([map.latlng.lat, map.latlng.lng])\n .addTo(localGroup)\n .bindPopup(map.latlng.lat + \" / \" + map.latlng.lng)\n .openPopup();\n $(\"#latitude-input\").val(map.latlng.lat);\n $(\"#longitude-input\").val(map.latlng.lng);\n }", "function click() {\n\t// If clicking on a cell with your piece in it, highlight the cell\n\tif (!selectedBox) { // 1st click\n\t\tif ((!blueTurn && this.hasClassName(\"red\")) || (blueTurn && this.hasClassName(\"blue\"))) {\n\t\t\tthis.addClassName(\"selected\");\n\t\t\tselectedBox = this;\n\t\t}\n\t}\n\t\n\t// Player is trying to move a piece\n\telse { // 2nd click\n\t\tselectedBox.removeClassName(\"selected\");\n\t\tthis.onmouseout();\n\t\t\n\t\t// If there are forced jumps and player is not jumping, highlight forced jumps\n\t\tif (forcedJumps != false) {\n\t\t\tif (!jump(this)) {\n\t\t\t\thighlightForcedJumps(forcedJumps);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Try moving, then try jumping\n\t\telse if (!move(this))\n\t\t\tjump(this);\n\t\t\t\n\t\tselectedBox = null;\n\t\tcheckVictory();\n\t}\n}", "function clickLink() {\t\t\t\t\t\t\n\t$(\".link-map\").on(\"click\", function(e){\n\t\te.preventDefault();\n\t\ttoggleLink($(this));\n\t});\n}", "function clickHandler(e) {\n var layer = e.target;\n // Set initial view if main country is clicked\n if (Math.abs(e.target.getLatLng().lat - mainCountry.lat) < 1 && Math.abs(e.target.getLatLng().lng - mainCountry.lng) < 1) {\n map.setView(mainCountry, 2);\n if (year > 2013) {\n info.update(layer.feature.properties, 'origin');\n } else {\n info.update();\n }\n\n } else {\n var bounds = [e.target.getLatLng(), mainCountry];\n map.fitBounds(bounds);\n info.update(layer.feature.properties);\n }\n }", "function onClick(e) {drawLineOnRoute(this.tripId, this.lastUpdateTime, this.curPoint); console.log(this.routeId); console.log(this.tripId); activeMarker = this}", "function initialize() {\n google.maps.event.trigger(marker1, 'click');\n }", "handleMouseDown() {\n let { map, isDrawingEnabled, option } = this.state;\n\n /**\n * We track it only for \"Draw\" drawing mode,\n * because of the combination of mouse down and move events\n * result in circle drawing\n */\n if ( ! (isDrawingEnabled && option === \"draw\") ) return;\n\n map.mouseDown = true;\n this.setState({map: map});\n }", "function clickTracker() {\n if (firstClick) {\n firstClick = false;\n clickUrl = getUrlParameter(\"click\");\n if (clickUrl == clickTrackerHolder || clickUrl == null) {\n return;\n }\n\n callClickTracker(clickUrl);\n }\n}", "function mouseClicked() {\n if (mouseY >= 620 && mouseY <= 720 && mouseX >= 1040 && mouseX <= 1280) {\n aanvalActie = false;\n aanvalKnopStatus = false;\n beweegActie = false;\n beweegKnopStatus = false;\n beurtVeranderen();\n veranderKleur(donkerblauw,wit);\n veranderKleur(lichtblauw,wit);\n }\n}", "function skipMap(){\r\n document.getElementById(\"more-anchor\").focus();\r\n}", "function ClickbleMapItemCursor(){\n //changes cursor style when hovering \"clickable\" layer.\n map.on(\"mousemove\", \"photos\", function(e) {map.getCanvas().style.cursor = 'pointer';});\n map.on('mouseleave', \"photos\", function() {map.getCanvas().style.cursor = '';});\n\n}", "function clickLocation(marker, infoWindow) {\n //console.log(marker);\n marker.addListener(\"click\", function () {\n map.setCenter({lat: this.getPosition().lat(),lng: this.getPosition().lng()});\n map.setZoom(13);\n toggleBounce(this);\n getPlaceDetails(this, infoWindow);\n });\n }" ]
[ "0.77199215", "0.740433", "0.723734", "0.716919", "0.69429654", "0.6904967", "0.6897565", "0.6871738", "0.6833234", "0.6832017", "0.6821699", "0.67967635", "0.67821723", "0.67805374", "0.67613673", "0.6750715", "0.6687423", "0.66783965", "0.66772765", "0.66548586", "0.66408116", "0.6630555", "0.6628458", "0.66264683", "0.6625792", "0.65743446", "0.6555673", "0.6553555", "0.65506923", "0.6543765", "0.6538068", "0.6501387", "0.6477391", "0.6469515", "0.6469515", "0.6454136", "0.6442065", "0.64377147", "0.64222956", "0.6421529", "0.6418073", "0.63865054", "0.6379117", "0.63768214", "0.6365861", "0.6364841", "0.6359829", "0.63473314", "0.63445073", "0.63412935", "0.6340594", "0.6332674", "0.6311506", "0.6308569", "0.63055736", "0.6301254", "0.6294179", "0.6288173", "0.6288106", "0.62795717", "0.62687564", "0.62687564", "0.62619644", "0.6250746", "0.6237011", "0.6208846", "0.62016976", "0.6193234", "0.61883557", "0.6185068", "0.6183355", "0.61627823", "0.61598474", "0.61465687", "0.6145961", "0.6122413", "0.61212003", "0.61199", "0.6117762", "0.6114024", "0.6111607", "0.6107209", "0.6103621", "0.6098524", "0.60979915", "0.6097171", "0.6096413", "0.6085038", "0.6080015", "0.6063799", "0.6059579", "0.6047752", "0.60447484", "0.60372317", "0.6035202", "0.60312235", "0.60304224", "0.60295695", "0.6027932", "0.6025697", "0.6014995" ]
0.0
-1
Find student by name and english within (min,max)
function find() { var str = prompt("Tìm theo thên sinh viên: "); var min = parseFloat(prompt("Min Điểm Anh Văn: ")); var max = parseFloat(prompt("Max Điểm Anh Văn: ")); var found = []; for(var i=0; i<list.length; i++) { var logic = list[i].name.includes(str) && (min <= list[i].english) && (list[i].english <= max); //var logic = (list[i].name == name && min<= list[i].english && list[i].english <=max); if (logic) { found.push(list[i]); } } if(!found.length) { console.log("Không tìm thấy !"); return; } console.log(`Các sinh viên có tên '${name}' mà điểm tiếng Anh nằm trong khoảng (${min}, ${max})`); console.table(found); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findBestStudent(sortA,h){\n //read each object inside of Array.\n var x;\n var txt = \"\";\n var arrayBestStudent;\n for (i=0; i < sortA.length;i++){\n var alu = sortA[i];\n for (x in alu) {\n if(alu.grade >= h){\n txt += alu[x] + \", \";\n }\n }\n txt=txt+\"<br>\";\n document.getElementById(\"bestStudent\").innerHTML = txt;\n }\n }", "getStudentByCourse(courseName) {\n let st = new Set()\n for (let s of this.stumap.values()) {\n s.courses.forEach(courses => {\n courses.forEach(name => {\n if (courseName == name) {\n st.add(s);\n }\n });\n });\n }\n return st\n }", "function nameSearch() {\r\n searchName = myInput.value.toLowerCase();\r\n listStudent = [];\r\n\r\n // Conditional to check for \"no results\" cases\r\n\r\n if (searchName.length > 0 && listStudent.length === 0) {\r\n listStudent.length = 0;\r\n document.querySelector(\r\n \".student-list\"\r\n ).innerHTML = `<li class=\"student-item cf\"><div><h3> Sorry, no matches </h3></div></li>`;\r\n addPagination(listStudent);\r\n }\r\n\r\n // Loop to check if input corresponds to a student name from the list.\r\n // Could have been done with a for loop or other method like includes, or searching of index\r\n\r\n Array.from(list).forEach(function (student) {\r\n if (\r\n student.name.first.toLowerCase().match(searchName) ||\r\n student.name.last.toLowerCase().match(searchName)\r\n ) {\r\n listStudent.push(student);\r\n showPage(listStudent, 1);\r\n }\r\n });\r\n addPagination(listStudent);\r\n }", "function findWorstStudent(sortA,lgra){\n //read each object inside of Array.\n var x;\n var txt = \"\";\n var arrayBestStudent;\n for (i=0; i < sortA.length;i++){\n var alu = sortA[i];\n for (x in alu) {\n if(alu.grade <= lgra){\n txt += alu[x] + \", \";\n }\n }\n txt=txt+\"<br>\";\n document.getElementById(\"worstStudent\").innerHTML = txt+\"<br>\";\n }\n }", "function filterStudents(searchString) {\n let newData = [];\n for (let i = 0; i < data.length; i++) {\n const name = `${data[i].name.first} ${data[i].name.last}`\n if (name.toLowerCase().includes(searchString.value.toLowerCase())) {\n newData.push(data[i]);\n }\n }\n return newData;\n}", "function highestScore(studentObj) {\n let highScore = studentObj[0].score;\n let student;\n for (let i = 1; i < studentObj.length; i += 1) {\n if (studentObj[i].score > highScore) {\n highScore = studentObj[i].score;\n const splitName = studentObj[i].name.split(' ');\n const initials = splitName[0][0] + splitName[1][0];\n student = initials + studentObj[i].id;\n }\n }\n return student;\n}", "examStudent(gid) {\n let s = this.getStudent(gid);\n let st = new Set()\n s.courses.forEach(course => {\n course.forEach(name => {\n for (let c of this.crseMap.values())\n if (c.name == name) st.add(c);\n });\n\n });\n\n return st\n\n }", "getStudentDetailByName(name) {\n let selectedStudent = studentsFullList.filter(student => student.name.toLowerCase().includes(name.toLowerCase()));\n if (selectedStudent.length == 0) {\n console.log(`No result found`);\n } \n return selectedStudent;\n }", "function student(fullName, studies, city, markAv){\r\n this.fullName = fullName;\r\n this.studies= studies;\r\n this.city = city;\r\n this.markAv = markAv;\r\n}", "function nameAndBestSubjectInequalities(arrObj){\r\n newArr = [];\r\n for(var i= 0; i< arrObj.length; i++){\r\n classPlusScores = arrObj[i].classes; //Object!!\r\n var mathScore = classPlusScores['math'];\r\n var scienceScore = classPlusScores['science'];\r\n var socialStudiesScore = classPlusScores['socialStudies'];\r\n if(mathScore >= scienceScore && mathScore>= socialStudiesScore){\r\n newArr.push([arrObj[i].name, 'math']);\r\n }\r\n if(scienceScore>= mathScore && scienceScore >= socialStudiesScore){\r\n newArr.push([arrObj[i].name, 'science']);\r\n }\r\n if(socialStudiesScore>= mathScore && socialStudiesScore>= scienceScore){\r\n newArr.push([arrObj[i].name, 'socialStudies']);\r\n } \r\n }\r\n return newArr\r\n }", "function searchWithName() {\n\t\t//console.log('Search student...');\n\n\t\t// The request parameters\n\t\tvar url = './student';\n\t\tvar fullname = $('fullname').value;\n\t\tvar params = 'fullname=' + fullname;\n\t\tvar req = JSON.stringify({});\n\t\t//alert(params);\n\t\t// display loading message\n\t\t//showLoadingMessage('Searching for student' + fullname + '...'); \n\n\t\tajax('GET', url + '?' + params, req,\n\t\t\t\t// successful callback\n\t\t\t\tfunction (res) {\n\t\t\tvar students = JSON.parse(res);\n\t\t\t//alert(students);\n\t\t\tif (!students || students.length === 0) {\n\t\t\t\tshowWarningMessage('No student' + fullname + ' found.');\n\t\t\t} else {\n\t\t\t\tlistStudents(students);\n\t\t\t}\n\t\t},\n\t\t// failed callback\n\t\tfunction () {\n\t\t\tshowErrorMessage('Cannot load student ' + fullname + '.');\n\t\t}\n\t\t);\n\t}", "function quesIdentifiesStudent(ques) \n { \n if (ques.indexOf('first') != -1)\n {\n return true;\n }\n else if (ques.indexOf('last') != -1)\n {\n return true;\n }\n else if (ques.indexOf('name') != -1)\n {\n return true;\n }\n \n else if (ques == 'id')\n {\n return true;\n }\n \n var id_index = ques.indexOf('id');\n if (id_index != -1)\n {\n if (id_index > 0)\n {\n if (ques[id_index-1] == ' ')\n {\n // e.g. \"student id\"\n return true;\n }\n }\n } \n else if (ques.indexOf('id:') != -1)\n {\n // e.g. student id:\n return true;\n }\n else if (ques.indexOf('identity') != -1)\n {\n return true;\n }\n else if (ques.indexOf('identifier') != -1)\n {\n return true;\n }\n else if (ques.indexOf('class') != -1)\n {\n return true;\n }\n else if (ques.indexOf('section') != -1)\n {\n return true;\n }\n else if (ques.indexOf('period') != -1)\n {\n return true;\n }\n else if (ques.indexOf('room') != -1)\n {\n return true;\n }\n else if (ques.indexOf('student') != -1)\n {\n return true;\n }\n else if (ques.indexOf('teacher') != -1)\n {\n return true;\n }\n else if (ques.indexOf('email') != -1)\n {\n return true;\n }\n else if (ques.indexOf('e-mail') != -1)\n {\n return true;\n }\n \n // spanish\n else if (ques.indexOf('correo') != -1)\n {\n return true;\n }\n \n return false;\n }", "function nameAndBestSubjectEfficient(arrObj){\r\n newArr = [];\r\n for(var i= 0; i< arrObj.length; i++){\r\n classPlusScores = arrObj[i].classes; //Object!!\r\n miniList = [];\r\n var maximum = 0;\r\n var bestSubject;\r\n for (var prop1 in classPlusScores) {\r\n if(classPlusScores[prop1]>= maximum){\r\n maximum = classPlusScores[prop1];\r\n bestSubject = prop1;\r\n }\r\n }\r\n newArr.push([arrObj[i].name, bestSubject]);\r\n }\r\n return newArr;\r\n }", "function nameAndBestSubjectWOClassNames(arrObj){\r\n newArr = [];\r\n for(var i= 0; i< arrObj.length; i++){\r\n classPlusScores = arrObj[i].classes; //Object!!\r\n miniList = [];\r\n for (var prop1 in classPlusScores) {\r\n miniList.push(classPlusScores[prop1]);\r\n } \r\n var maximum = 0; \r\n for(var j = 0; j< miniList.length; j++){\r\n if(miniList[j]>= maximum){\r\n maximum = miniList[j];\r\n }\r\n }\r\n for (var prop1 in classPlusScores) {\r\n if(maximum === classPlusScores[prop1]){\r\n var bestSubject= prop1;\r\n } \r\n } \r\n newArr.push([arrObj[i].name, bestSubject]);\r\n }\r\n return newArr\r\n }", "function createFilterFor(query) {\n\n // var lowercaseQuery = angular.lowercase(query); //for english only\n return function filterFn(student) {\n return (student.name.indexOf(query) != -1) ||\n (student.schoolid.indexOf(query) != -1);\n };\n\n }", "function search() {\n // Retrieves the value in the search text <input> tag\n // For loop to search through all students names and emails for a match to student text <input> entry\n // If a match is found it is added to the visibleStudents[] array \n let entry = studentSearchInput.value;\n for (let i = 0; i < students.length; i++) {\n let studentName = students[i].querySelector('div h3').textContent;\n let studentEmail = students[i].querySelector('.email').textContent;\n\n if (studentName.indexOf(entry) >= 0 || studentEmail.indexOf(entry) >= 0) {\n visibleStudents.push(i);\n }\n }\n}", "function contain(value, min, max) {\n if (value < min) {\n return min;\n } else if (value > max) {\n return max;\n } else {\n return value;\n }\n }", "function aboveAverageStudents (students) {\n var rata =(students.score)\n for( i=0 ; i>rata ; i++){\n console.log(i)\n }\n if( rata < students.score ){\n return students\n }else{\n return {}\n }\n}", "static getStudentByProperties(propertiesName, value, getOption) {\n\t\tif (value === undefined) {\n\t\t\treturn console.log(new Error('The properties name of Student is empty!'));\n\t\t}\n\n\t\tlet indexStudentsSearch = new Array();\n\t\tfor (let i = 0; i < students.length; i++) {\n\t\t\tlet student = this.getStudentByIndex(i);\n\t\t\tif (student[propertiesName] !== undefined) {\n\t\t\t\tlet propertiesValue = student[propertiesName];\n\t\t\t\tif (typeof value == 'string' || typeof propertiesValue == 'string') {\n\t\t\t\t\tpropertiesValue = propertiesValue.toLowerCase();\n\t\t\t\t\tvalue = value.toLowerCase();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (propertiesValue == value) {\n\t\t\t\t\tindexStudentsSearch.push(i);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (indexStudentsSearch.length === 0) {\n\t\t\treturn console.log('Not find Student in list!');\n\t\t}\n\t\t\n\t\tswitch(getOption) {\n\t\t\tcase option.first:\n\t\t\t\treturn indexStudentsSearch[0];\n\t\t\t\tbreak;\n\t\t\tcase option.last:\n\t\t\t\treturn indexStudentsSearch.pop();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn indexStudentsSearch;\n\t\t}\n\t}", "function getBestStudent(grades) {\n\tfor (let grade in grades) {\n\t\tlet length = grades[grade].length;\n\t\tlet result = grades[grade].reduce((accumulator, accelerator) => {\n\t\t\treturn accumulator + accelerator\n\t\t}, 0) / length\n\t\tgrades[grade] = result\n\t}\n\tlet keysSorted = Object.keys(grades).sort((a,b) => {\n\t\treturn grades[a]-grades[b]\n\t});\n\treturn keysSorted[keysSorted.length - 1]\n}", "function searchStudents() {\n\t\tclearClass();\n\t\t$('.no-student').hide();\n\t\t$('.student-item').hide();\n\t\tcounter = 0;\n\t\tcount = 1;\n\t\tvar input = $('input').val();\n\t\tinput = input.toLowerCase();\n\t\tif(input.length === 0){\n\t\t\tloadFirstPage();\n\t\t\t\n\t\t}else{\n\t\t\tfor(i = 1; i <=studentItemLength; i++){\n\t\t\t\t\n\t\t\t\tvar name = $('.student-item:nth-child('+ i + ') h3').html();\n\t\t\t\tname = name.toLowerCase();\n\t\t\t\tvar email = $('.student-item:nth-child('+ i + ') .email').html();\n\t\t\t\temail = email.toLowerCase();\n\t\t\t\tvar nameOutput = name.indexOf(input);\n\t\t\t\tvar emailOutput = email.indexOf(input);\n\t\t\t\tif((nameOutput !== -1) || (emailOutput !== -1)){\n\t\t\t\t\tvar item = $('.student-item:nth-child(' + i + ')');\n\t\t\t\t\tcreateClass(item);\n\t\t\t\t\tcounter ++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tif(counter === 0){\n\t\t\t\t$('.no-student').show();\n\t\t\t}\n\t\t\tnavBar(counter);\n\t\t\tshowStudents(1);\n\t\t\tclickingPageNumber();\n\t\t\t\n\t\t}\n\t\n}", "function getStudentsFirstNameBeforeLastName(students) {\n var studentsWhoseFirstNameBeforeLastName = _.filter(students, function(student) {\n return student.firstName.toLowerCase() < student.lastName.toLowerCase();\n });\n return studentsWhoseFirstNameBeforeLastName;\n}", "function findStudent(studentName) {\n\treturn Array.from(document.querySelectorAll('li i'))\n\t\t.map(el => el.nextSibling.textContent)\n\t\t.filter(student => student.includes(studentName));\n}", "function searchByName(name) {\n removeAllChild(\"search_display\");\n for (var i = 0; i < lst.length; i++) {\n if (lst[i].name.includes(name))\n addOneSubject(lst[i]);\n }\n}", "filterByName (role, text) {\n const firstName = role['person']['first_name'].toLowerCase()\n const lastName = role['person']['last_name'].toLowerCase()\n const email = role['person']['email'].toLowerCase()\n const gender = role['person']['gender']\n let searchString = firstName + ' ' + lastName + email\n role['person']['dietary_restrictions'].forEach(restriction => searchString += restriction.toLowerCase())\n if (gender !== null && gender !== '') {\n searchString += gender.toLowerCase()\n }\n role['roles'].forEach((role, index) => {\n const topLevelTag = topLevelTagFromRole(role).toLowerCase()\n searchString += dehumanize(tagFromRole(role))\n if (topLevelTag === 'participant') {\n const attributes = Object.values(role)[0]\n if (attributes['graduation_year'] != null) {\n searchString += attributes['graduation_year'].toString().toLowerCase()\n }\n if (attributes['major'] != null) {\n searchString += attributes['major'].toLowerCase()\n }\n if (attributes['school'] != null) {\n searchString += attributes['school'].toLowerCase()\n }\n attributes['skills'].forEach(skill => searchString += skill.toLowerCase())\n attributes['custom'].forEach(q => searchString += q.toLowerCase())\n }\n })\n return searchString.includes(text.toLowerCase())\n }", "function students(d,curdate) {\n\tif (d.properties.students) {\n\t\tvar dateloc=d.properties.students.search(niceDate(curdate));\n\t\tif (dateloc > -1) {\n\t\t\treturn Number(d.properties.students.substr(dateloc+5,3));\n\t\t} else { return \"0\";}\n\t} else {return \"0\";}\n}", "function studentMatchesSearch( student, searchFilter ) {\n str = searchFilter.toLowerCase();\n name = student.querySelector('h3').textContent.toLowerCase();\n email = student.querySelector('.email').textContent.toLowerCase();\n return ( name.indexOf(str) !== -1 || email.indexOf(str) !== -1 );\n }", "function getSchoolStartingWith(schoolName) {\n let schoolRef = db.collection('schools');\n let slen = schoolName.length;\n let ubound = schoolName.substring(0, slen-1) +\n String.fromCharCode(schoolName.charCodeAt(slen-1) + 1);\n let schoolDoc = schoolRef.where('name', '>=', schoolName).where('name', '<', ubound)\n .get().then(snapshot => {\n if (snapshot.empty) {\n return [];\n }\n var schools = [];\n snapshot.forEach(doc => {\n schools.push(doc.data());\n });\n return schools;\n })\n return schoolDoc;\n}", "function Search_Index_In_Add_Ary( student_name, student_className )\r\r\n{\r\r\n\tvar count = Student_Add_Ary[0].length;\r\r\n\r\r\n\tfor( i=0; i<count; i++ )\r\r\n\t{\r\r\n\t\tif( Student_Add_Ary[1][i]==student_name && Student_Add_Ary[3][i]==student_className )\r\r\n\t\t\treturn i;\r\r\n\t}\r\r\n\treturn -1;\r\r\n}", "compareStudents (a, b) {\n let order = 0;\n\n if (a.fields.name_first < b.fields.name_first) {\n order = -1;\n }\n\n if (a.fields.name_first > b.fields.name_first) {\n order = 1;\n }\n\n return order;\n }", "function minMaxFinder(data){\n var minGDP = 100000000000000;\n var maxGDP = 0;\n var minGHG = 100000000000000;\n var maxGHG = 0;\n var minSector = 100000000000000;\n var maxSector = 0;\n\n // Iterate through all years.\n for (var i = 0; i < data.length; i++) {\n var yearData = data[i];\n var yearKeys = Object.keys(yearData);\n\n // Iterate through all keys of year data.\n for (var j = 0; j < yearKeys.length; j++) {\n var key = yearKeys[j];\n\n // Only check key if continuing to country data.\n if (key != \"year\") {\n var countryData = yearData[key];\n var countryKeys = Object.keys(countryData);\n\n // Iterate through all keys of country data.\n for (var k = 0; k < countryKeys.length; k++) {\n var countryKey = countryKeys[k];\n\n // Only check if continuing to datavalues.\n if (countryKey != \"Name\") {\n var dataValue = countryData[countryKey];\n\n // Only continue if data is available.\n if (dataValue != \"NAV\") {\n\n // Check min and max for GHG emissions.\n if (countryKey == \"GHG\") {\n if (dataValue < minGHG) {\n minGHG = dataValue;\n };\n if (dataValue > maxGHG) {\n maxGHG = dataValue;\n };\n }\n\n // Check min and max for GDP.\n else if (countryKey == \"GDP\") {\n if (dataValue < minGDP) {\n minGDP = dataValue;\n };\n if (dataValue > maxGDP) {\n maxGDP = dataValue;\n };\n }\n\n // Check min and max for sector GHG emissions.\n else {\n if (Math.abs(dataValue) < minSector) {\n minSector = Math.abs(dataValue);\n };\n if (Math.abs(dataValue) > maxSector) {\n maxSector = Math.abs(dataValue);\n };\n }\n };\n };\n };\n };\n };\n };\n // Form list of the results.\n var resultList = [minGHG, maxGHG, minGDP, maxGDP, minSector, maxSector];\n return resultList;\n}", "function getStudentCity(std_name) { // \"SK\"\n var obj = data.find(function(item) { return item.name == std_name });\n\n if (obj) {\n return obj.city;\n\n } else {\n return \"NO City Found\";\n }\n}", "function findStudentIndex(studentName) {\n for (var i = 0; i < courseInfo.courseStudents.length; i++) {\n if (courseInfo.courseStudents[i].name === studentName){\n return i;\n }\n }\n}", "function search(list) {\r\n // str variable uses JavaScript to append HTML for a search bar.\r\n var str =\r\n '<label for=\"search\" class=\"student-search\"><span>Search by name</span> <input id=\"search\" placeholder=\"Search by name...\"> <button type=\"button\" ><img src=\"img/icn-search.svg\" alt=\"Search icon\"></button></label>';\r\n document.querySelector(\".header\").insertAdjacentHTML(\"beforeend\", str);\r\n\r\n // variable to register user input and set eventlisteners to call the function nameSearch\r\n\r\n const myInput = document.getElementById(\"search\");\r\n document.querySelector(\"button\").addEventListener(\"click\", nameSearch);\r\n myInput.addEventListener(\"keyup\", nameSearch);\r\n\r\n // This function uses input to search for correspondending students first and last names */\r\n\r\n function nameSearch() {\r\n searchName = myInput.value.toLowerCase();\r\n listStudent = [];\r\n\r\n // Conditional to check for \"no results\" cases\r\n\r\n if (searchName.length > 0 && listStudent.length === 0) {\r\n listStudent.length = 0;\r\n document.querySelector(\r\n \".student-list\"\r\n ).innerHTML = `<li class=\"student-item cf\"><div><h3> Sorry, no matches </h3></div></li>`;\r\n addPagination(listStudent);\r\n }\r\n\r\n // Loop to check if input corresponds to a student name from the list.\r\n // Could have been done with a for loop or other method like includes, or searching of index\r\n\r\n Array.from(list).forEach(function (student) {\r\n if (\r\n student.name.first.toLowerCase().match(searchName) ||\r\n student.name.last.toLowerCase().match(searchName)\r\n ) {\r\n listStudent.push(student);\r\n showPage(listStudent, 1);\r\n }\r\n });\r\n addPagination(listStudent);\r\n }\r\n}", "function queryUserName(name){\n var results = users.filter(function(o){\n if(o.name.toLowerCase().indexOf(name.toLowerCase()) > - 1){\n return o;\n }\n });\n showUserResults(results);\n}", "function gradeStudents(obj) {\n\n\n if (obj[\"marks\"] >= 90)\n obj[\"grade\"] = \"A\";\n\n else if (obj.marks >= 80 && obj.marks < 90)\n obj[\"grade\"] = \"B\";\n\n else if (obj.marks >= 60 && obj.marks < 80)\n obj[\"grade\"] = \"C\";\n\n else if (obj.marks >= 40 && obj.marks < 60)\n obj[\"grade\"] = \"D\";\n\n else\n obj[\"grade\"] = \"F\";\n\n return obj;\n}", "function searchGroup(group, key, min, max) {\n\t\tif (max < min)\n\t\t\treturn false;\n\t\tvar mid = Math.floor((min + max) / 2);\n\t\tif (group[mid].start > key) {\n\t\t\treturn searchGroup(group, key, min, mid - 1);\n\t\t} else if (group[mid].end < key) {\n\t\t\treturn searchGroup(group, key, mid + 1, max);\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "function marksGt70(student) {\n return student.marks > 70;\n}", "function tinyFriend(name) {\n var min = name[0];\n for (var i = 1; i < name.length; i++) {\n var store = name[i];\n if (min.length > store.length) {\n min = store;\n }\n }\n return min;\n}", "function doSortObjHighestToLowest() {\n const mappedNames = people.results\n .map((person) => {\n return {\n name: person.name.first,\n };\n })\n .filter((person) => person.name.startsWith('A')) //filtrando todos que começa com A\n .sort((a, b) => {\n return a.name.length - b.name.length;\n }); //ordenando\n console.log('lista de obj ordenados do menor para o maior', mappedNames);\n}", "function Students(name, lastName, age, grade) {\n this.name = name;\n this.lastName = lastName;\n this.age = age;\n this.averGrade = grade;\n}", "function searchStudent(searchInput, studentItem) {\r\n console.log(searchInput);\r\n console.log(studentItem);\r\n const studentInputMatches = [];\r\n for (i = 0; i < studentItem.length; i++) {\r\n if (\r\n searchInput.value.length !== 0 &&\r\n studentItem[i].textContent.toLowerCase() ===\r\n searchInput.value.toLowerCase()\r\n ) {\r\n studentInputMatches.push(searchInput);\r\n }\r\n }\r\n // showPage(searchStudent());\r\n}", "function Student(name, major, yearInSchool, club) {\n this.name = name; // string, (e.g. \"Jim\", \"Pam\", \"Michael\")\n this.major = major; // string, (e.g. \"Computer Science\", \"Art\", \"Business\")\n this.yearInSchool = yearInSchool; // int, (e.g. 1, 2, 3, 4)\n this.club = club; // string, (e.g. \"Improv\", \"Art\")\n}", "function searchMates(query,array){\n\n\tfor(var i = 0; i<array.length; i++){\n\t\tif(query === array[i].name){\n\t\t\treturn array[i]\n\t\t}\n\t\n\t}\n\treturn \"this name not found\"\n}", "function findLowestAverages(arr){\n // initially set avg of grade 6 to 100, as that is the max grade\n let avg6 = 100;\n let avg7 = 100;\n let avg8 = 100; \n let temp6 = 0;\n let temp7 = 0;\n let temp8 = 0;\n let names6 = [];\n let names7 = [];\n let names8 =[];\n for (let i=0; i <arr.length; i++ ){\n if(arr[i].grade===6){\n for (let r=0; r < arr[i].scores.length; r++){\n temp6 += (arr[i].scores[r].value)/arr[i].scores.length;\n }\n names6.push(arr[i].name)\n if(temp6<avg6){\n avg6 = temp6\n names6.pop();\n names6.push(arr[i].name)\n\n }\n else{\n names6.pop();\n }\n temp6=0;\n \n }\n if(arr[i].grade===7){\n for (let r=0; r < arr[i].scores.length; r++){\n temp7 += (arr[i].scores[r].value)/arr[i].scores.length;\n \n }\n names7.push(arr[i].name)\n if(temp7<avg7){\n avg7 = temp7\n names7.pop();\n names7.push(arr[i].name)\n }\n else{\n names7.pop();\n }\n temp7=0;\n }\n if(arr[i].grade===8){\n for (let r=0; r < arr[i].scores.length; r++){\n temp8 += (arr[i].scores[r].value)/arr[i].scores.length; \n }\n names8.push(arr[i].name)\n if(temp8<avg8){\n avg8 = temp8 \n names8.pop();\n names8.push(arr[i].name)\n }\n else{\n names8.pop();\n \n }\n temp8=0;\n } \n }\n const lowestAvgs = [{'grade': 6, 'name': names6[names6.length-1],'average': avg6},{'grade': 7, 'name': names7[names7.length-1], 'average': avg7},{'grade': 8, 'name': names8[names8.length-1], 'average': avg8}] \n return lowestAvgs\n}", "function findStudentElement(studentName) {\n\treturn Array.from(document.querySelectorAll('li i'))\n\t\t.find(studentEl => studentEl.nextSibling.textContent.includes(studentName));\n}", "function find_dataRange(data){\r\n\t\tconsole.log(\"find_dataRange\");\r\n\t\tmin_max_zaehlstelle ={};\r\n\t\tfor (k = 1; k < Object.keys(data[0]).length; k++){ // name of zaehlstelle\r\n\t\t\tvar name_zaehlstelle = Object.keys(zaehlstellen_data[0])[k];\r\n\t\t\tvar min_max = [Infinity, -Infinity];\r\n\r\n\t\t\tfor (i = 1; i < data.length; i++){ // also via keys? // value of zaehlstelle at certain date\r\n\t\t\t\tvar amount = data[i][name_zaehlstelle];\r\n\r\n\t\t\t\tif (amount < min_max[0]) {min_max[0] = amount};\r\n\t\t\t\tif (amount > min_max[1]) {min_max[1] = amount};\r\n\r\n\t\t\t}\r\n\t\t\tmin_max_zaehlstelle[name_zaehlstelle] = min_max; // assign min/max-Values to Object\r\n\t\t}\r\n\t}", "function filteredByRating(min, max){\n filters.rating = {\n apply: (d) => d.imdb >= min && d.imdb <= max,\n min, max\n }\n applyFilters(false)\n}", "function findCourse(array, name){\r\n for(var i = 0; i < array.length; i++) if(array[i].getName()=== name) return i;\r\n return -1;\r\n}", "between(min, max) {\n return this.filter((val) => {\n let num = parse(val).num\n return num > min && num < max\n })\n }", "function students(total, part) {\n const percentage = d3\n .scaleLinear()\n .domain([0, 100]) // pass in a percent\n .range([0, total]);\n\n return percentage(part);\n }", "function getStudents (node, start = 1, end = node.length){\n return fn => {\n for (let i = start - 1; i < end; i++){\n fn(node[i]);\n }\n }\n}", "function getVoisins(name){\r\n\tif(name==\"eastern_australia\"){return [\"western_australia\",\"new_guinea\",\"indonesia\"]}\r\n\tif(name==\"western_australia\"){return [\"eastern_australia\",\"new_guinea\",\"indonesia\"]}\r\n\tif(name==\"new_guinea\"){return [\"western_australia\",\"eastern_australia\",\"indonesia\"]}\r\n\tif(name==\"indonesia\"){return [\"western_australia\",\"new_guinea\",\"siam\"]}\r\n\tif(name==\"siam\"){return [\"indonesia\",\"india\",\"china\"]}\r\n\tif(name==\"india\"){return [\"siam\",\"china\",\"afghanistan\",\"middle_east\"]}\r\n\tif(name==\"middle_east\"){return [\"russia\",\"east_africa\",\"egypt\",\"afghanistan\",\"india\",\"southern_europe\"]}\r\n\tif(name==\"afghanistan\"){return [\"middle_east\",\"india\",\"china\",\"russia\",\"ural\"]}\r\n\tif(name==\"china\"){return [\"afghanistan\",\"siam\",\"india\",\"ural\",\"siberia\",\"mongolia\"]}\r\n\tif(name==\"mongolia\"){return [\"china\",\"siberia\",\"japan\",\"kamchatka\",\"irkutsk\"]}\r\n\tif(name==\"japan\"){return [\"kamchatka\",\"mongolia\"]}\r\n\tif(name==\"siberia\"){return [\"ural\",\"china\",\"mongolia\",\"yakursk\",\"irkutsk\"]}\r\n\tif(name==\"ural\"){return [\"russia\",\"afghanistan\",\"china\",\"siberia\"]}\r\n\tif(name==\"irkutsk\"){return [\"mongolia\",\"siberia\",\"kamchatka\",\"yakursk\"]}\r\n\tif(name==\"yakursk\"){return [\"irkutsk\",\"kamchatka\",\"siberia\"]}\r\n\tif(name==\"kamchatka\"){return [\"irkutsk\",\"yakursk\",\"japan\",\"mongolia\",\"alaska\"]}\r\n\tif(name==\"russia\"){return [\"ural\",\"afghanistan\",\"middle_east\",\"southern_europe\",\"northern_europe\",\"scandinavia\"]}\r\n\tif(name==\"scandinavia\"){return [\"russia\",\"iceland\",\"great_britain\",\"northern_europe\"]}\r\n\tif(name==\"northern_europe\"){return [\"southern_europe\",\"russia\",\"scandinavia\",\"western_europe\",\"great_britain\"]}\r\n\tif(name==\"southern_europe\"){return [\"egypt\",\"north_africa\",\"middle_east\",\"western_europe\",\"russia\"]}\r\n\tif(name==\"western_europe\"){return [\"north_africa\",\"great_britain\",\"southern_europe\",\"northern_europe\"]}\r\n\tif(name==\"great_britain\"){return [\"western_europe\",\"iceland\",\"scandinavia\",\"northern_europe\"]}\r\n\tif(name==\"iceland\"){return [\"great_britain\",\"northern_europe\",\"scandinavia\",\"greenland\"]}\r\n\tif(name==\"greenland\"){return [\"iceland\",\"northwest_territory\",\"ontario\",\"quebec\"]}\r\n\tif(name==\"northwest_territory\"){return [\"alaska\",\"ontario\",\"greenland\",\"alberta\"]}\r\n\tif(name==\"alaska\"){return [\"northwest_territory\",\"alberta\",\"kamchatka\"]}\r\n\tif(name==\"alberta\"){return [\"alaska\",\"northwest_territory\",\"ontario\",\"western_united_states\"]}\r\n\tif(name==\"ontario\"){return [\"western_united_states\",\"alberta\",\"quebec\",\"eastern_united_states\",\"northwest_territory\",\"greenland\"]}\r\n\tif(name==\"quebec\"){return [\"greenland\",\"ontario\",\"eastern_united_states\"]}\r\n\tif(name==\"eastern_united_states\"){return [\"western_united_states\",\"ontario\",\"quebec\",\"central_america\"]}\r\n\tif(name==\"western_united_states\"){return [\"alberta\",\"ontario\",\"central_america\",\"eastern_united_states\"]}\r\n\tif(name==\"central_america\"){return [\"western_united_states\",\"eastern_united_states\",\"venezuela\"]}\r\n\tif(name==\"venezuela\"){return [\"central_america\",\"brazil\",\"peru\"]}\r\n\tif(name==\"peru\"){return [\"brazil\",\"venezuela\",\"argentina\"]}\r\n\tif(name==\"brazil\"){return [\"peru\",\"venezuela\",\"argentina\",\"north_africa\"]}\r\n\tif(name==\"argentina\"){return [\"peru\",\"brazil\"]}\r\n\tif(name==\"north_africa\"){return [\"brazil\",\"western_europe\",\"southern_europe\",\"egypt\",\"east_africa\",\"congo\"]}\r\n\tif(name==\"egypt\"){return [\"southern_europe\",\"middle_east\",\"north_africa\",\"east_africa\"]}\r\n\tif(name==\"east_africa\"){return [\"egypt\",\"middle_east\",\"north_africa\",\"congo\",\"madagascar\",\"south_africa\"]}\r\n\tif(name==\"madagascar\"){return [\"south_africa\",\"east_africa\"]}\r\n\tif(name==\"south_africa\"){return [\"madagascar\",\"congo\",\"east_africa\"]}\r\n\tif(name==\"congo\"){return [\"south_africa\",\"north_africa\",\"east_africa\"]}\r\n}", "function performSearch(search){\n let result = [];\n for (var i = 0; i < data.length; i++) {\n if (data[i].name.first.toLowerCase().includes(search) || data[i].name.last.toLowerCase().includes(search))\n {\n result.push(data[i]);\n }\n }\n if (result.length > 0) {\n showPage(result, 1);\n addPagination(result);\n } else {\n let studentList = document.querySelector('.student-list');\n let linkList = document.querySelector('.link-list');\n studentList.innerHTML = \"<div>No results</div>\";\n linkList.innerHTML = \"\";\n }\n}", "function checkgrade(student){\n return student.grade >=60;\n}", "function yearComparator(student1, student2) {\n var one_year = student1.yearInSchool\n var two_year = student2.yearInSchool\n if (one_year > two_year) {\n return true;\n } else {\n return false;\n }\n}", "function searchList(allStudents) {\n if (currentFilter.length === 0 || currentFilter === \"\" || currentFilter === null) {\n return allStudents;\n } else {\n const list = allStudents.filter((student) => {\n if (\n student.firstName.toLowerCase().includes(currentFilter.toLowerCase()) ||\n (student.middleName !== null && student.middleName.toLowerCase().includes(currentFilter.toLowerCase())) ||\n (student.nickName !== null && student.nickName.toLowerCase().includes(currentFilter.toLowerCase())) ||\n (student.lastName !== null && student.lastName.toLowerCase().includes(currentFilter.toLowerCase()))\n ) {\n return true;\n } else {\n return false;\n }\n });\n console.log(list);\n return list;\n }\n}", "function minProjectSize(s, p, min_students, max_students) {\n var project_cnt = Math.ceil(s.length / min_students);\n var project_sur = p.length - project_cnt;\n\n if (0 <= project_sur) {\n return [project_cnt, project_sur, min_students];\n };\n\n if (0 > project_sur) {\n if (min_students < max_students) {\n min_students += 1;\n return minProjectSize(s, p, min_students, max_students);\n } else {\n return false;\n };\n };\n}", "function getStudents(containerElement, projectName, queryFlag) {\n const foundInfo = document.querySelector('.search-results');\n foundInfo.innerHTML = '';\n containerElement.removeAttribute('style');\n containerElement.innerHTML = '';\n containerElement.append(spinnerBox);\n\n\n\n let query = queryFlag === 'classmate' ?\n [\"slackName\", \">=\", search.value]:\n [\"currentProject\", \">=\", projectName];\n\n db.collection(\"Users\")\n .orderBy(queryFlag?'slackName':'currentProject').where(...query)\n .startAt(queryFlag?search.value:projectName)\n .endAt(queryFlag?search.value +\"\\uf8ff\":projectName)\n .get()\n .then(function(querySnapshot) {\n containerElement.innerHTML = '';\n if(queryFlag && search.value === '') return;\n if(querySnapshot.size){\n\n // lang filter\n const langFilter = document.createElement('select');\n langFilter.classList.add('language-filter');\n langFilter.innerHTML = \"<option value disabled selected>Filter by language</option>\";\n\n //filter event listener\n langFilter.addEventListener('change', function(evt){\n const studentsFilterList = containerElement.querySelectorAll('.student-card');\n // console.log(studentsFilterList)\n studentsFilterList.forEach(e => {\n let lang = e.querySelector('.user-language');\n if(e.lastChild.innerHTML.match(langFilter.value) ||\n lang.innerHTML.match(langFilter.value)) {\n if(e.classList.contains('hidden')){\n e.classList.remove('hidden');\n }\n }else{\n e.classList.add('hidden');\n }\n });\n const numOfItems = langFilter[langFilter.selectedIndex].innerHTML.match(/(\\d+)/i)[0];\n studentsCount.innerHTML = ('Filtered ' + numOfItems + \" record\" + (+numOfItems===1?\"\":\"s\"));\n const closeFilter = document.createElement(\"span\");\n closeFilter.classList.add(\"closeFilter\");\n closeFilter.innerHTML = \"clear filter\"\n studentsCount.appendChild(closeFilter);\n\n //close filter event\n closeFilter.addEventListener('click', ()=>{\n studentsFilterList.forEach(e => {\n e.classList.remove('hidden');\n \n });\n langFilter.selectedIndex = 0;\n studentsCount.innerHTML = \"Found \" + querySnapshot.size + \" record\" + (querySnapshot.size===1?\"\":\"s\");\n });\n });\n \n // add found results\n const infoBox = document.querySelector('.info-block');\n // const foundInfo = document.querySelector('.search-results');\n foundInfo.innerHTML = '';\n //foundInfo.classList.add(\"search-results\");\n const studentsCount = document.createElement(\"div\");\n studentsCount.classList.add(\"search-count\");\n studentsCount.innerHTML = \"Found \" + querySnapshot.size + \" record\" + (querySnapshot.size===1?\"\":\"s\");\n foundInfo.append(studentsCount);\n\n const langFilterObject = {};\n //containerElement.append(foundInfo);\n const retrievedStudents = {};\n querySnapshot.forEach(function(doc) { \n\n // extract languages\n const userLangs = doc.data().language.split(',');\n userLangs.forEach(lang => {\n langFilterObject[lang] = langFilterObject[lang]?langFilterObject[lang]+1:1;\n \n })\n\n const student = document.createElement(\"li\");\n student.className = \"student-card\";\n\n const data_contact = document.createElement(\"span\");\n data_contact.className = \"slack-link\";\n data_contact.innerHTML = `<img src=\"img/slack-black.svg\" alt=\"Slack Icon\" class=\"slack-icon\"><span>${doc.data().slackName}</span>`;\n\n const data_languages = document.createElement(\"p\");\n data_languages.className = \"user-language\"\n data_languages.innerHTML = `<i class=\"ion-ios-world-outline icon-language\"></i> ${doc.data().language.replace(',',', ')}`;\n\n\n\n student.appendChild(data_contact);\n student.appendChild(data_languages);\n if(queryFlag) {\n const workingProject = document.createElement(\"div\");\n workingProject.className = \"user-info\";\n workingProject.innerHTML = `<div class=\"user-track\"><i class=\"ion-ios-star-outline icon-track\"></i> ${doc.data().userTrack}</div>\n <div class=\"user-project\"><i class=\"ion-ios-copy-outline icon-project\"></i> ${doc.data().currentProject}</div>`;\n student.appendChild(workingProject);\n }\n\n \n retrievedStudents[doc.data().slackName] = student;\n \n \n });\n\n const sortedList = Object.keys(retrievedStudents);\n sortedList.sort((a,b)=>{\n return a.toLowerCase() > b.toLocaleLowerCase();\n });\n sortedList.forEach((e,i)=>{\n containerElement.appendChild(retrievedStudents[e]);\n });\n\n if(containerElement.offsetHeight > 420){\n containerElement.setAttribute('style', 'overflow-y:scroll; max-height: 660px');\n containerElement.scrollTop = 0;\n }\n \n optionFiedCreator(Object.keys(langFilterObject).sort(), langFilter);\n foundInfo.append(langFilter);\n\n const langContainer = document.querySelectorAll('.language-filter option');\n\n for(i = 1; i < langContainer.length; i++) {\n langContainer[i].innerText = langContainer[i].innerText + \" (\" + langFilterObject[langContainer[i].value] + \") \";\n }\n\n\n\n }else{\n const student = document.createElement(\"li\");\n student.className = \"student-card\";\n const notFound = document.createElement(\"li\");\n notFound.className = \"student-card notfound\";\n notFound.innerHTML = `It seems we could not find anything`;\n containerElement.appendChild(notFound);\n }\n\n })\n .catch(function(error) {\n console.log(\"Error getting documents: \", error);\n });\n}", "function findMatch() { \n\n\n let jobCharacteristics = jobs.characteristics[0];\n let candidateSkills = candidates.skills[0];\n\n // use substring method to compare strings\n let result = jobCharacteristics.localeCompare(candidateSkills);\n\n document.getElementById(\"result\").innerHTML = result;\n }", "function alphaInstructors (arr){\nvar jsInstructors = arr.filter(function(instructor){\n\treturn instructor['teaches'] === 'JavaScript';\n\t}).map(function(instructor){\n\t\treturn instructor.firstname;\n\t})\n\nreturn jsInstructors.sort();\n\n}", "function findRange(values) {\n var max = {\n list: 0,\n value: values[0]\n };\n var min = {\n list: 0,\n value: values[0]\n };\n\n for (var i = 0; i < values.length; i++) {\n var value = values[i];\n\n if (value > max.value) {\n max = {\n list: i,\n value: value\n };\n }\n\n if (value < min.value) {\n min = {\n list: i,\n value: value\n };\n }\n }\n\n return {\n 'max': max,\n 'min': min\n };\n}", "function getStudentYears(studentName) {\n /*\n * Filter the transcriptList for the specfied student\n */\n let transcriptList = database_data.getTranscripts();\n let findStudentTrans = transcriptList.filter(function (obj) {\n return (obj.studentName===studentName);\n });\n\n /*\n * Using the records in findStudentTrans, get distinct\n * semester, year values.\n */\n let years = findStudentTrans.reduce((acc, x) =>\n acc.concat(acc.find(y => y.year === x.year) ? [] : [x]), []);\n return years;\n}", "function spEng(sentence){\n sentence= sentence.toLowerCase()\n for(let i in sentence){\n if(sentence.includes('english')) return true;\n }\n return false;\n}", "function Student(id, name, surname, grades){\n this.id = id,\n this.name = name,\n this.surname = surname,\n this.grades = grades,\n this.getAverage = function(){\n var temp = 0;\n for (var g in grades){\n temp = temp + parseInt(g);\n }\n \n return temp / grades.length \n },\n this.getInfo = function(){\n return this.name + \" \" + this.surname;\n }\n\n}", "function searchName(name){\n var nameABC = change_alias(name).toLowerCase();\n for(let contact of listContact)\n {\n if(change_alias(contact.Name).toLowerCase().indexOf(nameABC)!== -1)\n console.log(contact);\n }\n}", "function passExam(name, score) {\n let passUni = 71;\n let passColl = 51;\n if (score >= passUni) {\n console.log(name + ' has enrolled in University with ' + score + ' points');\n } else if (score >= passColl) {\n console.log(name + ' has enrolled in College with ' + score + ' points');\n } else {\n console.log(name + ' has failed');\n }\n}", "function getStudents () {\n\n }", "function lookingForStudent() {\n\t//Creaton the input box and the submit button\n\t$(\"h4\").append(\"<form class='student-search'>\");\n\t$(\"form\").append(\"<input type='text' name='name' placeholder='Search for Students'>\");\t\n\t$(\"form\").append(\"<button class= 'search' type='submit' name='submit' value='submit'>Search</button>\");\n\n\tconst form = document.querySelector('form');\n\tconst input = form.querySelector(\"input[placeholder='Search for Students']\");\n\tlet text = input.value;\n\tlet submitCounter = 0;\n\n\t//Listening to the name that is written\n\tform.addEventListener('submit', (e) => {\n\t\t//Avoididng automatic refreshments\n\t\te.preventDefault();\n\t\t//Eliminating results of previous searchs\n\t\tif (submitCounter >0) {\n\t\t\t$('divLook').empty();\t\t\t\n\t\t};\n\t\tsubmitCounter +=1;\n\t\tlet counter = 0\n\n\t\tfor (let k=1; k<=studentsNumber; k+=1) {\t\n\n\t\t//Preparing to receive incomplete names\n\t\t\t//Separating name from family name\n\t\t\tlet nameSeparator = studentsData[k-1].name.indexOf(' ');\n\t\t\tlet nameSearchedSeparator = input.value.indexOf(' ');\n\t\t\t\n\t\t\tlet firstName = studentsData[k-1].name.substring(0,nameSeparator);\n\t\t\tlet firstNameSearched = input.value.substring(0,nameSearchedSeparator);\n\n\t\t\t//Family names can be introduced with name or without it\n\t\t\tlet familyName = studentsData[k-1].name.substring((nameSeparator+1), studentsData[k-1].name.length);\n\t\t\tlet familyNameSearched = input.value.substring((nameSearchedSeparator+1), input.value.length) \n\n\t\t\t//Correcting situations where only the name is typed\n\t\t\tif (nameSearchedSeparator < 0) {\n\t\t\t\tfirstNameSearched = familyNameSearched;\n\t\t\t}\n\n\t\t\t//Showing the positive results of the search (one or several)\n\t\t\tif (studentsData[k-1].name === input.value || firstName === firstNameSearched || familyName === familyNameSearched) {\n\t\t\t\tlet divLook = document.createElement('div');\n\t\t\t\t$(\"div.page-header.cf\").append(\"<divLook class='student-found'><p class='message'>\" + \n\t\t\t\tstudentsData[k-1].name + \n\t\t\t\t\" is the student number \" + studentsData[k-1].idnumber+\" who \" + \n\t\t\t\tstudentsData[k-1].enrollment + \"<br> His/Her contact address is: \"+ \n\t\t\t\tstudentsData[k-1].email+\"<br><img class='avatar' src=\"+ \n\t\t\t\tstudentsData[k-1].photo +\"></p></divLook>\");\n\t\t\t} else {\n\t\t\t\t//Showing the negative results of the search\n\t\t\t\tcounter +=1;\n\t\t\t\tif (counter === studentsNumber) { \n\t\t\t\t\t$(\"div.page-header.cf\").append(\"<divLook class='student-found'><p class='message'>\"+\n\t\t\t\t\t\"No student with this name is currently enrolled</p></divLook>\"); \n\t\t\t\t};\n\t\t\t};\t\t\n\t\t};\n\t\t//Cleaning the input box\n\t\tinput.value = '';\n\t});\n}", "function createNewScore() {\n var initials = document.querySelector(\"#initials\").value.trim().toUpperCase();\n if (initials.length != 2 || validInitial.indexOf(initials[0]) < 0 || validInitial.indexOf(initials[1]) < 0) {\n alert(\"Please enter correct initials of your first name and last name without space!\");\n return null;\n }\n return newScore = {\n name: initials,\n score: timeLeft,\n };\n}", "function d(e,a){a=a||O.languages||E(S);var n={relevance:0,value:t(e)},r=n;return a.filter(w).forEach(function(t){var a=l(t,e,!1);a.language=t,a.relevance>r.relevance&&(r=a),a.relevance>n.relevance&&(r=n,n=a)}),r.language&&(n.second_best=r),n}", "function search(champ, role) {\n for (let i = 0; i < eval(role).length; i++) {\n if (eval(role)[i].champ === champ) {\n return {role: eval(role)[i].role, h: eval(role)[i].h, id: eval(role)[i].id};\n }\n }\n}", "function Search_Student_Exist_In_Add_Ary( StudentName, StudentClassName, Outside_praise, Inside_praise )\r\r\n{\r\r\n\tvar len = Student_Add_Ary[0].length;\r\r\n\r\r\n\tfor(i=0; i<len; i++ )\r\r\n\t{\r\r\n\t\tif( Student_Add_Ary[1][i]==StudentName && Student_Add_Ary[3][i]==StudentClassName && Student_Add_Ary[4][i]==Outside_praise && Student_Add_Ary[5][i]==Inside_praise )\r\r\n\t\t\treturn true;\r\r\n\t}\r\r\n\treturn false;\r\r\n}", "function findGrade(arrName, arrMark) {\n var arrNameAndGrade = [];\n for (var i = 0; i < arrName.length; i++) {\n arrNameAndGrade[arrNameAndGrade.length] = arrName[i];\n arrNameAndGrade[arrNameAndGrade.length] = arrMark[i];\n if (arrMark[i] < 50) {\n console.log(arrName[i] + ' failed to complete the exam');\n } else if (arrMark[i] < 60) {\n console.log(arrName[i] + ' aquired ' + arrMark[i] + \" and earned: 6\")\n } else if (arrMark[i] < 70) {\n console.log(arrName[i] + ' aquired ' + arrMark[i] + \" and earned: 7\")\n } else if (arrMark[i] < 80) {\n console.log(arrName[i] + ' aquired ' + arrMark[i] + \" and earned: 8\")\n } else if (arrMark[i] < 90) {\n console.log(arrName[i] + ' aquired ' + arrMark[i] + \" and earned: 9\")\n } else if (arrMark[i] <= 100) {\n console.log(arrName[i] + ' aquired ' + arrMark[i] + \" and earned: 10\")\n }\n } return arrNameAndGrade;\n}", "function getBestMatch(subject) {\n\tvar bestScore = 100.0\n\tvar matchName = \"\"\n\tvar returnString = \"\"\n\tvar allMeasurements = Object.keys(Measurements)\n\tvar allSubjects = []\n\tfor (firstIndex = 0; firstIndex < allMeasurements.length; firstIndex++) {\n\t\tvar measurement = allMeasurements[firstIndex]\n\t\tallSubjects[firstIndex] = exportArray(Measurements[measurement])\n\t}\n\tfor (secondIndex = 0; secondIndex < allSubjects.length; secondIndex++) {\n\t\tvar score = compareWithSubject(subject, allSubjects[secondIndex])\n\t\tif (score < bestScore) {\n\t\t\tbestScore = score\n\t\t\tmatchName = allMeasurements[secondIndex]\n\t\t}\n\t}\t\n\treturn matchName\n}", "function search( list ) {\n\tconst searchBar = document.querySelector( '#search' );\n\tconst searchInput = searchBar.value.toLowerCase();\n\tlet matches = [];\n\tconst noMatch = document.querySelector( '.student-list' )\n\tconst pagination = document.querySelector( '.pagination' )\n\tfor ( let i = 0; i < list.length; i++ ) {\n\t\tconst studentList = list[ i ];\n\t\tconst studentName = ( list[ i ].name.first + list[ i ].name.last ).toLowerCase();\n\t\tif ( studentName.includes( searchInput ) ) {\n\t\t\tmatches.push( studentList );\n\t\t}\n\t}\n\tif ( matches.length >= 1 ) {\n\t\tshowPage( matches, 1 );\n\t\taddPagination( matches );\n\t\tpagination.style.display = 'block';\n\t\tconsole.log( matches );\n\t} else {\n\t\tnoMatch.innerHTML = `No results found, please try another name!`;\n\t\tpagination.style.display = 'none';\n\t\tconsole.log( matches )\n\t}\n}", "function binsearchCourse(code, searchDept, sheet){\n code = code.replace(\"_\", \" \");\n if(searchDept == undefined || searchDept == null){\n searchDept = false;\n }\n if(sheet == undefined){\n sheet = SpreadsheetApp.openByUrl(\"https://docs.google.com/spreadsheets/d/11tRpkgU0JoV_qTa_KsI8yEO6aLz8KY9wtGmIQXkdaXs/edit#gid=0\").getSheets()[0];\n }\n\n var values;\n\n if(searchDept){\n var deptValues = SpreadsheetApp.openByUrl(\"https://docs.google.com/spreadsheets/d/11tRpkgU0JoV_qTa_KsI8yEO6aLz8KY9wtGmIQXkdaXs/edit#gid=0\").getSheets()[1].getRange(\"A:C\").getValues();\n\n const dept = code.split(\" \")[0].replace(\" \", \"\")\n for(var i = 1; i < deptValues.length; i++){\n if(deptValues[i][0] == dept){\n const startIndex = parseInt(deptValues[i][1]);\n const endIndex = parseInt(deptValues[i][2]);\n\n values = sheet.getRange(\"A\" + String(startIndex + 1) + \":C\" + String(endIndex + 1));\n break;\n }\n }\n values = sheet.getRange(\"A:C\").getValues();\n }\n else{\n values = sheet.getRange(\"A:C\").getValues();\n }\n\n var low = 0;\n var high = values.length;\n var mid = Math.floor((low + high) / 2);\n\n while(low < high){\n if(values[mid][0] === code){\n return new course(values[mid][0], values[mid][1], values[mid][2]);\n }\n else if(code < values[mid][0]){\n high = mid;\n mid = Math.floor((low + high) / 2);\n }\n else if(code > values[mid][0]){\n low = mid;\n mid = Math.floor((low + high) / 2);\n }\n }\n\n if(values[low][0] === code){\n return new course(values[mid][0], values[mid][1], values[mid][2]);\n }\n else{\n return null;\n }\n}", "function searchMaxAndMin(array){\n var max = array[0];\n var min = array[0];\n for (var i = 1; i < array.length; i++){\n if(array[i] > max){\n max = array[i];\n }else if(array[i] < min){\n min = array[i];\n }\n }\n return [min, max]\n }", "function hasOnlyStudents() {}", "function searchItems (list, inputValue) {\n let student = '';\n let indexOfStudents = [];\n for (let i = 0; i < list.length; i+=1) {\n student = list[i].textContent;\n if (student.toUpperCase().indexOf(inputValue) > -1) {\n list[i].parentElement.parentElement.style.display = '';\n indexOfStudents.push(i);\n } else {\n list[i].parentElement.parentElement.style.display = 'none';\n }\n }\n return indexOfStudents;\n}", "findStudent(username){\n // This method provided for convenience. It takes in a username and looks\n // for that username on student objec ts contained in the `this.students`\n // Array.\n let foundStudent = this.students.find(function(student, index){\n return student.username == username;\n });\n return foundStudent;\n }", "function filteredByCollege(players, college) {\n\n for (i=0; i<players.length; i++) {\n if (players[i].collegeName.localeCompare(college) == 0) {\n\n let first = players[i].firstName\n let last = players[i].lastName\n let id = players[i].playerId\n\n let player = new Player(String(first), String(last), id)\n playersModel.push(player)\n }\n }\n}", "function getStudentNames(students) {\n const mapped = students.map(function(item) {\n return item.name;\n })\n return mapped;\n}", "function getempbyage(){\n let agfactor = company.student.filter((ag)=>{\n return ag.Age >40;\n })\n return agfactor;\n}", "function cstudents(d,curdate) {\n\tif (d.properties.students) {\n\t\tvar dateloc=d.properties.students.search(niceDate(curdate));\n\t\tvar cstudent= d.properties.students;\n\t\tvar csmatch=cstudent.match(/[0-9]{4}/g);\n\t\tvar breakdate=\"0\";\n\t\tfor (k=0;k<csmatch.length;k++) {\n\t\t\tif (csmatch[k]>niceDate(curdate) && k==0) {\n\t\t\t\treturn \"0\";\n\t\t\t}\n\t\t\tif (csmatch[k]>niceDate(curdate) && k>0) {\n\t\t\t\tbreakdate=csmatch[k-1];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (k==csmatch.length-1) {\n\t\t\t\tbreakdate=\"all\";\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (breakdate==\"0\") {\n\t\t\treturn \"0\";\n\t\t}\n\t\tif (breakdate!=\"all\") {\n\t\t\tvar repstr=\"(\"+breakdate+\":[0-9]*).*\";\n\t\t\tcstudent=cstudent.replace(new RegExp(repstr),\"$1\");\n\t\t}\n\t\tcstudent=cstudent.replace(/[^,]?[0-9]*:/g,\"+\");\n\t\tcstudent=cstudent.replace(/,/g,\"\");\n\t\treturn addbits(\"0\"+cstudent);\n\t} else {return \"0\";}\n}", "function Student (name,roll){\r\n this.name = name;\r\n this.roll = roll;\r\n \r\n}", "getStudentName(reverse = false) {\n let name = API.LMSGetValue(\"cmi.core.student_name\");\n let parts;\n if (!reverse)\n if (name.indexOf(\",\") !== -1) {\n parts = name.split(\",\");\n name = `${parts[1]}${parts[0]}`;\n }\n\n\n return name;\n }", "function soFarMatches(currentInput, studentName) {\n\n // Sentinel value for making sure it matches\n let soFarMatches = true;\n\n // Changes both local copies of the strings to lower case for evaluation\n currentInput = currentInput.toLowerCase();\n studentName = studentName.toLowerCase();\n\n // If the search is greater then the student's name it's always false\n if (currentInput > studentName) {\n soFarMatches = false;\n }\n\n // Checks each character and if they don't match then it sets the bool to false\n else {\n for (let index = 0; index < currentInput.length; index += 1) {\n if (currentInput.charAt(index) != studentName.charAt(index)) {\n soFarMatches = false;\n }\n }\n }\n\n return soFarMatches;\n\n}", "function tinyFriend(name){\n\n var min = name[0].length;\n for(var i = 0; i < name.length; i++){\n var element = name[i].length;\n if(element < min){\n min = element;\n tinyName = name[i];\n }\n }\n\n return tinyName;\n}", "function getLetterGrade(student, section) {\n\tvar totalGrade = section.students[student].totalGrade;\n\n\tif (isValidGrade(totalGrade)) {\n if ($.type(totalGrade) == \"null\") return totalGrade;\n\t\tfor (letter in section.cutoffs) {\n\t\t\tif (totalGrade >= section.cutoffs[letter])\n\t\t\t\treturn letter;\n\t\t};\n\t\t// else (if totalGrade is valid)\n\t\treturn \"F\";\n\t};\n\t\n\t// else (if finalGrade is invalid)\n\treturn -1;\n}", "function getD(name, subject, mark) {\n if ((subject == \"Mya\" || subject == \"Eng\" || subject == \"Bio\") && mark >= 75) {\n console.log(name + \" gets \" + subject + \" D*.\");\n } else if (mark >= 80) {\n console.log(name + \" gets \" + subject + \" D*\");\n } else if (mark < 40) {\n console.log(name + \" fails \" + subject + \".\");\n } else {\n console.log(name + \" passes \" + subject + \".\");\n }\n}", "function filterBetween(array, min, max){\n try {\n array.join(\" \");\n min.split(\" \");\n max.split(\" \");\n }\n catch(err) {\n throw \"The correct object was not passed\";\n }\n let filter = [];\n for(let i = 0; i < array.length; i++){\n if(array[i] < min){\n filter.push(array[i]);\n } else if (array[i] > max) {\n filter.push(array[i]);\n }\n }\n return filter;\n}", "function chooseLocale(names){var i=0,j,next,locale,split;while(i<names.length){split=normalizeLocale(names[i]).split('-');j=split.length;next=normalizeLocale(names[i+1]);next=next?next.split('-'):null;while(j>0){locale=loadLocale(split.slice(0,j).join('-'));if(locale){return locale;}if(next&&next.length>=j&&compareArrays(split,next,true)>=j-1){//the next array item is better than a shallower substring of this one\nbreak;}j--;}i++;}return null;}", "function getRanges(text) {\n // function to return lower - upper\n const ranged = (lower, upper) =>\n Array.apply(null, Array(upper - lower + 1)).map((_, i) => lower + i);\n let bounds = text.split(\"-\").map(Number);\n // if single int, return the int\n if (bounds.length === 1) {\n return bounds;\n }\n // incorrect syntax\n if (bounds.length > 2) {\n return [];\n }\n // check that the range they input isn't too wild\n const size = Math.abs(bounds[0] - bounds[1]);\n const weeksInSchoolYear = 24;\n const maxClassesPerWeek = 4; // 3 lectures + 1 tutorial\n const maxLectures = weeksInSchoolYear * maxClassesPerWeek;\n if (size > maxLectures) {\n return [];\n }\n // swap upper & lower bound if they are out of order\n if (bounds[1] < bounds[0]) {\n return ranged(bounds[1] || 0, bounds[0] || 0);\n } else {\n return ranged(bounds[0] || 0, bounds[1] || 0);\n }\n}", "function matchName(firstName, lastName, texts) {\n var combinedName = S(firstName).trim() + S(lastName).trim();\n if (combinedName.length < 5) {\n return null; //too short\n } else {\n if (\n findText(combinedName, texts) ||\n findText(S(firstName + ' ' + lastName).trim(), texts)\n || (findText(firstName, texts) && findText(lastName, texts))\n ) {\n return 'firstAndLast';\n }\n \n else\n if (findText(firstName, texts)) {\n return 'firstOnly';\n } else if (findText(lastName, texts)) {\n return 'lastOnly';\n } else {\n return null;\n }\n }\n}", "function task3() {\n return _.max(data.students, function (student) {\n return student.mark;\n });\n }", "function findWinner() {\n let fGrades = [];\n let champions = [];\n\n $scope.data.grades.forEach((x) => {\n fGrades.push(x.finalGrade);\n });\n\n fGrades = fGrades.sort(function (a, b) { return a - b; });\n\n let bestGrades = [\n fGrades[fGrades.length - 1],\n fGrades[fGrades.length - 2],\n fGrades[fGrades.length - 3],\n fGrades[fGrades.length - 4],\n fGrades[fGrades.length - 5],\n ];\n $scope.data.grades.forEach((x) => {\n if (x.finalGrade == bestGrades[0]) champions[0] = { name: x.studentName, grade: x.finalGrade };\n else if (x.finalGrade == bestGrades[1]) champions[1] = { name: x.studentName, grade: x.finalGrade };\n else if (x.finalGrade == bestGrades[2]) champions[2] = { name: x.studentName, grade: x.finalGrade };\n else if (x.finalGrade == bestGrades[3]) champions[3] = { name: x.studentName, grade: x.finalGrade };\n else if (x.finalGrade == bestGrades[4]) champions[4] = { name: x.studentName, grade: x.finalGrade };\n });\n $scope.championsString = \"Os melhores colocados foram\";\n for (i = 0; i < champions.length; i++) {\n $scope.championsString += \" \" + champions[i].name + \", com a nota \" + champions[i].grade + \",\";\n }\n $scope.championsString += \".\";\n\n console.log($scope.championsString);\n\n }", "function student(id,name,classes, roll,section,){\n this.id = id;\n this.name=name;\n this.classes= classes;\n this.roll= roll;\n this.section=section;\n}", "function getGrade(s1, s2, s3) {\n // Code here\n\n let score = (s1 + s2 + s3) / 3\n\n if (score >= 90 && score <= 100) {\n return 'A';\n } else if (score >= 80 && score <= 90) {\n return 'B';\n } else if (score >= 70 && score < 80) {\n return 'C';\n } else if (score >= 60 && score < 70) {\n return 'D';\n } else {\n return 'F';\n }\n}", "function Student(first, last, age, gender, interests) {\n Person.call(this, first, last, age, gender, interests);\n}" ]
[ "0.53605336", "0.5236415", "0.52123845", "0.52116615", "0.51960886", "0.51480806", "0.5130726", "0.51219517", "0.5118432", "0.5090784", "0.5089608", "0.5087221", "0.4942091", "0.49295577", "0.49284372", "0.4927867", "0.4925993", "0.4876195", "0.48691663", "0.48641905", "0.48618457", "0.4828485", "0.48246908", "0.48229373", "0.4788774", "0.47829118", "0.47569862", "0.4744764", "0.4744267", "0.47413945", "0.4739801", "0.472919", "0.4726227", "0.47133216", "0.469942", "0.46936315", "0.46867117", "0.46828496", "0.46795815", "0.46736306", "0.46698084", "0.46487963", "0.46448705", "0.4640254", "0.46366867", "0.4635559", "0.4630408", "0.46223685", "0.4612708", "0.45992044", "0.4598857", "0.45897046", "0.4589075", "0.4579993", "0.45700136", "0.45629305", "0.45603958", "0.45576683", "0.4548212", "0.45473948", "0.45395902", "0.45318684", "0.4518628", "0.45154142", "0.4513784", "0.45093197", "0.45082644", "0.45070255", "0.44879493", "0.44879135", "0.44798484", "0.44687334", "0.44677618", "0.44652534", "0.44621655", "0.44571432", "0.44558948", "0.44535348", "0.4452752", "0.44489393", "0.4444647", "0.44444698", "0.4443805", "0.44413745", "0.4441311", "0.44402456", "0.44389984", "0.44372523", "0.4436451", "0.44362143", "0.4434204", "0.44286287", "0.44272673", "0.4422078", "0.44174764", "0.44157195", "0.44109336", "0.44095567", "0.44037193", "0.4391583" ]
0.6514899
0
Constructor method for initializing the state
constructor(props) { super(props); //Generating tiles data and initializing tile properties //{0:{letter:'D',status:'hide',count:0},1:{...},....} let tilesGenerated = this.getInitialTiles() this.state = {tileData: tilesGenerated}; // Attribution http://ccs.neu.edu/home/ntuck/courses/2019/09/cs5610/notes/05-react/ this.handleClick = this.handleClick.bind(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor() { \r\n super();\r\n this.state = {};\r\n }", "constructor() {\n\n // we use the super keyword and method to call the constructor of a parent class\n // this gives us access to the properties of the parent class. It MUST \n // be used BEFORE the 'this' keyword\n super();\n this.state = {\n header: \"Calculator\",\n display: '0',\n operator: '',\n temp: 0,\n resetDisplay: true\n }\n }", "constructor() {\n super()\n this.state = intialState\n }", "constructor() {\n super();\n this.state = {};\n }", "constructor() {\n this.state = undefined\n }", "constructor(props) { // be promoted into a class\n super(props);\n this.state = {}; // defines initial state\n }", "constructor() {\n super();\n this.state = defaultState;\n }", "constructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t}\n\t}", "constructor(props){\n\t\t//calling the parent method, Component\n\t\tsuper(props);\n\t\t//initialize by creating a new object and assign it to this.state. Record the property \"term\" on state\n\t\tthis.state = { term: 'Starting value' };\n\t}", "constructor(props) {\n\t\t// calling parent method via super\n\t\tsuper(props);\n\t\t// initialise state by creating object\n\t\tthis.state = { term: 'Messi' };\n\t}", "constructor(props) {\n\t\t super(props)\n\t\t this.state = {\n\t\t\t nom: \"test3\",\n\t\t }\n\t }", "constructor (props) {\n\t\tsuper(props);\n\t\tthis.state = {};\n\t}", "constructor(props) {\n super(props);//reference to parents constructor with props\n\n // now this can be referenced anywhere inside the class. Basically like a JAVA Object. we only use this.state once. then we use this.setState\n this.state={lat:null, errMessage:null};// 1st way to initialize state. \n }", "constructor(props) {\n super(props);\n this.state = {};\n }", "constructor(props) {\n super(props);\n this.state = {};\n }", "constructor(props) {\n super(props);\n this.state = {};\n }", "constructor(props) {\n super(props);\n this.state = {};\n }", "constructor(props) {\n super(props);\n this.state = {};\n }", "constructor(props) {\n super(props);\n this.state= {flag:0};\n }", "constructor() {\n super();\n this.state = {\n };\n }", "constructor(props){\n //it is the first and the only function called automatically, whenever a new instance was created\n super(props);\n this.state = { term: ''}; //initialize the state by create a new object, and assign it to this.state.\n }", "constructor(props) {\n super(props);\n this.state = ({\n \n })\n }", "constructor() {\n super(...arguments);\n this.state = this.constructor.initialState(this.props);\n }", "constructor() {\n super();\n this._init();\n }", "constructor(props) {\n super(props);\n this.state = { symbol: this.props.location.state.symbol, \n min: this.props.location.state.min, \n max: this.props.location.state.max,\n topic: this.props.location.state.topic,\n color: this.props.location.state.color };\n }", "constructor(props){\n super(props);\n this.state= {\n };\n }", "initializer () {\n this._state = \"dead\"\n this._num2state = []\n this._state2num = {}\n this._groups = []\n this.transitions([\n { state: \"dead\", enter: null, leave: null },\n { state: \"booted\", enter: \"boot\", leave: \"shutdown\" },\n { state: \"latched\", enter: \"latch\", leave: \"unlatch\" },\n { state: \"configured\", enter: \"configure\", leave: \"reset\" },\n { state: \"prepared\", enter: \"prepare\", leave: \"release\" },\n { state: \"started\", enter: \"start\", leave: \"stop\" }\n ])\n this.groups([\n \"BOOT\", \"BASE\", \"RESOURCE\", \"SERVICE\", \"USECASE\"\n ])\n }", "constructor(props){\n super(props); // Passing the props parameter to the constructor\n \n //Setting up the initial state of the component by this.state object because states are immutable .\n this.state = {\n name:\"Rachit\",\n age:28,\n date : new Date()\n };\n }", "constructor() {\n // step 2, call your constructor\n super();\n this.state = {\n greeting: `Hello Sandbox`,\n bands: [\n \"Guster\",\n \"Guster\",\n \"Modest Mouse\",\n \"CCR\",\n \"Skynard\",\n \"Led Zepplin\"\n ]\n };\n }", "constructor(props){\n super(props); //calling the super class constructor\n\n //we intialize a new object with this.state\n\n // object that we pass has a propery that we want to record on the state property\n\n this.state ={ term: ''};\n\n }", "constructor(props) {\n //Call the constrictor of Super class i.e The Component\n super(props);\n //maintain the state required for this component\n this.state = {}\n }", "constructor() {\n super()\n this.state = {\n count: 0,\n Data: []\n }\n // console.log(\"construtor\");\n }", "constructor(props) {\n super(props);\n this.state = { };\n }", "constructor(props) {\n super(props)\n this.state = {}\n }", "constructor(props) {\n super(props)\n this.state = {}\n }", "constructor(props) {\n super(props);\n\n const state = this.state;\n }", "constructor(props) {\n super(props);\n this.state = {}\n }", "constructor(props) {\n super(props); //Call the base class constructor 'Component' with the 'props' argument\n //State object\n this.state = {}; //Set to empty object or provide initial values for some of the state properties used in this component\n }", "constructor(props) {\n super(props);\n this.state = {\n\n }\n }", "constructor(props) {\n super(props);\n this.state = {initial:0, begin_loc:null, traffic:false, marker:null, marker_state:0};\n this.location = null;\n }", "constructor() {\n super()\n self = this\n self.init()\n }", "constructor(props) {\n super(props);\n this.state = {};\n }", "constructor(props) {\n super(props);\n this.state = {};\n }", "constructor(props) {\n super(props);\n this.state = {};\n }", "constructor(props) {\n super(props);\n this.state = {};\n }", "constructor() { // this is a method that is automatically called during the creation of an object from a class. The Constructor aids in constructing things\n super(); // super is used to call the parent function of an object\n\n this.state = { //property under class, a place to hold data and user input\n message: \"\" //message is an empty string to allow the user to store their own data into it\n };\n }", "constructor(props) {\n super(props);\n\n this.state = defaultState;\n }", "constructor(props){\n super(props);\n \n this.state = {\n\n }\n\n }", "constructor() {\n this._initialize();\n }", "constructor(props){\n super(props);\n this.state = {}\n }", "constructor(props) {\n super(props);\n // 2)\n this.state = {\n title: 'Pulp fiction in cinema.',\n body: 'some text'\n }\n }", "constructor(props){\n super(props);\n\n // we initialise new state object and assign to this.state\n // object we pass will have properties we want to record on the state, in this case we want to store the property 'term' on state\n // We will only ever have this.state in the constructor\n this.state = {term: ''}\n }", "constructor(props){\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tlng:10,\n\t\t\tlat: 80,\n\t\t\tzoom: 4\n\t\t}\n\t}", "constructor(props) {\n super(props);\n this.state = {\n };\n }", "constructor(props) {\n super(props);\n this.state = {\n };\n }", "constructor(props) {\n super(props);\n this.state = {\n };\n }", "constructor(props) {\n super(props);\n\n this.state = {\n\n };\n }", "constructor(prenom,nom,date,pic){\n super();\n this.prenom=prenom;\n this.nom=nom;\n this.date=date;\n this.pic=pic;\n this.state = { DEFAULT_STATE };\n\n}", "constructor(props) {\n super(props);\n \n \n \n //creation of an initial state, a json object\n this.state = {\n }; \n }", "constructor(){\n super();\n this.state = {\n name : \"John\",\n input : \"\"\n }\n }", "constructor(props){\n\t\t//can't call 'this' in constructor unless you call super(props)\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tnotes: [],\n\t\t\tbio: {},\n\t\t\trepos: []\n\t\t}\n\t}", "constructor() {\n //gives us ability from the Component class to use state\n super();\n\n //use state to hold variables attached to instances of component\n this.state = {\n books: [],\n name: 'Joshua Eli Poliquin'\n }\n }", "constructor(props) {\n super(props);\n this.state = {\n a: 1,\n };\n\n console.log(\"constructor was called\");\n }", "constructor(props) {\n\t\tsuper(props);\n\n\t\t// 'CREATE' the state (only do this in the constructor)\n\t\t// ie. Only do 'this.state =' in constructor methods\n\t\tthis.state = {\n\t\t\tterm: ''\n\t\t};\n\t}", "constructor() {\n // Run super\n super();\n\n // Bind private methods\n this.state = this.state.bind(this);\n }", "constructor(){\n // ES6 class constructors MUST call super if they are subclasses.\n super();\n\n this.state = {\n sidebarMenu: [\n { name: 'Terms Of Use', url: 'legal/terms-of-use' },\n { name: 'Trademark Notice', url: 'legal/trademark-notice' },\n { name: 'Cookies Policy', url: 'legal/cookies-policy' }\n ]\n };\n }", "constructor(state) {\n this.state = undefined;\n this.setState(state);\n }", "constructor() {\n // gives us ability from the Component class to use state\n super();\n\n // use state to hold variables attached to indstances of component\n this.state = {\n books: [],\n name: 'Mayur Bhatia'\n }\n }", "constructor() {\n this.init();\n }", "constructor(props){\n super(props)\n\n // 2 SET INITIAL STATE\n this.state = {\n title: 'LifeCycle'\n }\n }", "constructor(props) {\n super(props);\n\n this.state = { value: 0 }; // Will probably store value in state later when the design has been improved\n\n }", "constructor(props) {\n super(props);\n //for things that will effect the UI inside state\n // immutable\n this.state = {\n countryData: null,\n countryCode: 'new code',\n name: 'name'\n }\n }", "constructor(props) {\n super(props);\n this.state = {\n // initial state with empty attributes.\n Date: '',\n Strategy: '',\n Content: '',\n Time: '',\n Sprint: '',\n noteId: this.generateId()\n }\n }", "constructor(props) {\n super(props);\n \n this.state = {\n };\n }", "constructor(props) {\n super(props);\n \n this.state = {\n };\n }", "constructor(props) {\n super(props);\n \n this.state = {\n };\n }", "constructor()\n {\n this.init();\n }", "constructor() {\n super();\n this.state = { \n //Initializing local state by assigning an object to this.state - thats why I needed the constructor\n quotesList: quotes,\n random: 0 \n }\n }", "constructor() {\r\n super()\r\n this.init()\r\n }", "constructor(){\n super();\n console.log(\"what is this\" , this)\n this.state ={\n count : 0\n }\n }", "function State() { }", "constructor(props) {\n super(props);\n this.state = {\n name: 'Daniel',\n currentDate: new Date()\n };\n console.log('constructor');\n }", "function State() {\n\n }", "function Constructor() {\n // All construction is actually done in the init method\n if ( this.initialize )\n this.initialize.apply(this, arguments);\n }", "consructor() {\n }", "function _construct()\n\t\t{;\n\t\t}", "constructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tcount: 0,\n\t\t\tvalue1: 1,\n\t\t\tvalue2: 1,\n\t\t\tproduct: 1\n\t\t};\n\t}", "constructor(props) {\n super(props);\n this.state = {\n zipCode : 0,\n city : \"\",\n st: \"\",\n lat: 0,\n long: 0,\n timezone: \"\",\n timezoneAbbr: \"\",\n offset: 0,\n oNames: \"\",\n areaCodes: \"\",\n start: true,\n valid : false\n }\n this.clicked = this.clicked.bind(this);\n this.render = this.render.bind(this);\n\n }", "constructor(config) {\r\n if (!config) {\r\n throw new Error(\"Config is empty\");\r\n }\r\n \r\n const { initial, states } = config;\r\n \r\n this.initalState = initial;\r\n this.states = states;\r\n \r\n this.currentState = this.initalState;\r\n this.history = [this.initalState];\r\n this.currentHistoryIndex = 0;\r\n }", "constructor(){\n // make sure to call Parent class constructors\n super();\n\n this.state = {\n message: 'Welcome Visitor',\n }\n }", "constructor(props){\n super(props);\n this.state = {\n priority: \"\",\n alertopen: false,\n }\n this._eventDataContructor();\n }", "constructor() {\n\n\t\t// base constructor\n\n\t\t// the property active is never utilized however\n\n\t\tthis.active = true;\n\t}", "constructor(){\n super();//call the super(), then start using the constructor\n \n this.state = {count: 0};\n\n /* Use arrow function to get rid of binding */\n /*\n this.increment = this.increment.bind(this);\n this.reset = this.reset.bind(this);\n */\n }", "constructor() {\n\t\tsuper();\n\t\tthis.state = {\n\t\t\tcount: 0\n\t\t}\n\t}", "constructor(props) {\n super(props);\n this.state = {\n name: \"Joe\",\n age: \"25\"\n }\n }", "constructor() {\n super(); // it fire React.Component's constructor\n this.state = {\n count: 0,\n }; // state is empty object\n }", "constructor(props) {\n // Calls code in parent(React.Component)\n super(props);\n\n this.state = {\n // Toggles nav steps\n start: false,\n active: 1,\n form: {\n stateOfIncorporation: 'Delaware',\n type: 'LLC'\n }\n };\n }", "constructor(props) {\n super(props)\n this.state = {\n }\n }", "constructor(props) { //functional components do not have state - only class based components do\n super(props); //comes from component. component has its own constructor function.\n\n this.state = { term: '' }; //state is a javascript object that exists on any class based component. each instance of a component has its own copy of state. we initialize the state by using this.state. term could be named something else if wished. this is the only time changing state happens this way (this.state = {}) use this.setState for all future state changes\n }", "function State() {\n\n }", "constructor(props) {\n //Call the constrictor of Super class i.e The Component\n super(props);\n //maintain the state required for this component\n this.state = {};\n }" ]
[ "0.7974465", "0.7888749", "0.77192265", "0.768085", "0.76338804", "0.7605623", "0.7566743", "0.75522894", "0.7388755", "0.7381028", "0.7376605", "0.7364394", "0.7355025", "0.7338865", "0.7338865", "0.7338865", "0.7338865", "0.7338865", "0.73156303", "0.7313952", "0.73010826", "0.7275326", "0.72613645", "0.7260482", "0.72567594", "0.7246421", "0.7244352", "0.7229929", "0.72295326", "0.72188336", "0.72128433", "0.7206629", "0.7205615", "0.72043693", "0.72043693", "0.72036946", "0.72029865", "0.72009695", "0.71961194", "0.71949136", "0.71941", "0.717738", "0.717738", "0.717738", "0.717738", "0.7170631", "0.7168573", "0.71643627", "0.71627635", "0.71599907", "0.7158668", "0.71584076", "0.71360254", "0.71268874", "0.71268874", "0.71268874", "0.7117635", "0.71158576", "0.71093297", "0.709618", "0.7081782", "0.70770216", "0.7069771", "0.7063366", "0.7060585", "0.7056983", "0.70532334", "0.7047639", "0.70460546", "0.70407623", "0.70320386", "0.702525", "0.7020607", "0.7019494", "0.7019494", "0.7019494", "0.7016252", "0.7001909", "0.69982076", "0.6997064", "0.69958836", "0.69945616", "0.69935596", "0.6985183", "0.698209", "0.6977767", "0.69775945", "0.6976072", "0.6973924", "0.69640744", "0.6960925", "0.69569534", "0.69540507", "0.69535565", "0.6935428", "0.6931179", "0.69298404", "0.6925197", "0.69228166", "0.6921974", "0.69217014" ]
0.0
-1
This method serves the purpose of updating any tile detail i.e changing state based on given params data : state object, ids : ids of tiles to be modified, status : status with which tiles should be updated incrementCount : to increment or not increment count
updateTiles(data, ids, status, incrementCount = false) { //Iterating through provided ids _.map(ids, function (id) { //Updating status of given ids with given state data[id]['status'] = status //For complete this is will result in additional score point to prevent it we have this condition if (status != 'complete' && incrementCount) { data[id]['count']++ } }) //Handling for complete case if (status == 'complete' && incrementCount) { data[ids[1]]['count']++ } //Updating the state with updated information this.setState({tileData: data}) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleClick(id) {\n //taking the state object in another variable\n let data = this.state.tileData;\n //Getting the currently active tiles\n let currentActive = _.filter(data, {'status': 'active'})\n //To prevent actions during delay\n if (currentActive.length < 2) {\n //For matched tiles nothing is to be done\n if (data[id]['status'] != 'complete') {\n //Finding the active tile index/key\n let activeKey = _.findKey(data, {'status': 'active'})\n //Clicking on currently active tile again\n if (activeKey != id) {\n //If this is the second active tile check for next scenario i.e match or not\n if (activeKey != undefined) {\n //For match condition\n if (data[activeKey]['letter'] == data[id]['letter']) {\n this.updateTiles(data, [activeKey, id], 'complete', true)\n } else {\n //For not match condition\n //First show the selected tiles as active\n this.updateTiles(data, [id], 'active', true)\n //Update state after the delay\n setTimeout(() => {\n this.updateTiles(data, [activeKey, id], 'hide')\n }, 1000);\n }\n } else {\n //For first active tile update the state with active\n this.updateTiles(data, [id], 'active', true)\n }\n }\n }\n }\n }", "changeStatus(params) {\n var index = this.list.map(i => i.id).indexOf(params.id);\n this.list[index].open = params.status;\n ls.updateItem({id : params.id}, {open : params.status});\n this.filterByStatus(this.stats);\n }", "update(id, status){\n var data = this.state.data;\n var request = this.findReq(id, data)[0];\n request.status = status;\n request.updated_at = new Date();\n data = sorter(this.state.data);\n this.setState({\n \tdata: data\n });\n }", "function updateTileState(tiles) {\n var collapsed,\n oldCollapsed;\n\n tiles = tiles || /*istanbul ignore next: default value */ [];\n\n oldCollapsed = scope.isCollapsed;\n\n collapsed = tileIsCollapsed(scope.tileId, tiles);\n\n if (oldCollapsed === collapsed) {\n displayModeChanging = false;\n }\n\n scope.isCollapsed = collapsed;\n\n if (collapsed && !tileInitialized) {\n //in some cases the tile-content div is left in a partially collapsed state.\n // this will ensure that the tile is styled corretly and the tile is completely collapsed\n $timeout(function () {\n var contentEl;\n contentEl = el.find('.bb-tile-content');\n contentEl.removeClass('collapsing').addClass('collapse');\n }, 1);\n }\n }", "function updateStatusData() {\r\n\r\n var requestURL = 'comm/getStatus';\r\n var method = 'POST';\r\n var headers = {\r\n 'Accept': 'application/json',\r\n 'Content-Type': 'application/json'\r\n };\r\n var body = {\r\n all: true\r\n }\r\n\r\n jsonBody = JSON.stringify(body);\r\n\r\n fetch(requestURL, {\r\n headers: headers,\r\n method: method,\r\n body: jsonBody\r\n }).then((response) => {\r\n if (parseInt(response.clone().status) < 400) {\r\n // fetch was successful, store it in the IDB.\r\n response.clone().json().then((result) => {\r\n for(var i in result.zoneStatus){\r\n StatusIDBFuncSet.addData(StatusIDBSettings.tables[0].tableName, result.zoneStatus[i]);\r\n }\r\n }).catch((err) => {\r\n console.log(`[SW] ERROR in status json: ${err}`);\r\n console.log(response.clone().json());\r\n })\r\n } else {\r\n console.log('[SW] Server returned error for /comm/getStaus:', response.clone().status);\r\n }\r\n }).catch((err) => {\r\n console.log('[SW] Failed to get new status for loc: ', loc);\r\n })\r\n}", "function updateTiles() {\n\t// show hide tiles based on privileges\n\tconst privileges = mainWindow.tempData.privileges;\n\n\t// clear tile list\n\t$(\"#tileList\").empty();\n\n\t// show tiles based on privileges\n\tObject.keys(privileges).forEach((module, index) => {\n\t\t// check if user has read permisison\n\t\tif (privileges[module].split(\"\")[1] != 1) {\n\t\t\treturn;\n\t\t}\n\n\t\t// get random color for tile\n\t\tconst color = colors[Math.floor(Math.random() * colors.length)];\n\n\t\ttry {\n\t\t\t// append tile\n\t\t\tconst tile = `\n\t\t<div class=\"card TILE ${module}\" style=\"background-color: ${color}; opacity: 0.8;\" onclick=\"mainWindow.loadRoute('${module.toLowerCase()}')\">\n\t\t\t\t<div class=\"card-body text-center\">\n\t\t\t\t\t\t<h1>${tileInfo[module].title}</h1>\n\t\t\t\t\t\t<i class=\"fa fa-3x ${tileInfo[module].icon}\"></i>\n\t\t\t\t</div>\n\t\t</div>\n\t\t`;\n\n\t\t\t$(\"#tileList\").append(tile);\n\t\t} catch (e) {\n\t\t\treturn;\n\t\t}\n\t});\n\n\t// update right sidebar and calenders\n\tupdateSideBar().catch((e) => {\n\t\tconsole.log(e);\n\t});\n}", "updatePiece(tileId) {\n if(!this.hasMoved)\n this.hasMoved = true;\n this.currentTile = tileId;\n this.validSpaces(true);\n }", "function updateStateMaps() {\n // XXX\n }", "updateColors(data) {\n for (let i = 0; i < data.length; i++) {\n this.map.setFeatureState({\n source: 'pbdb',\n sourceLayer: 'hexgrid',\n id: data[i].hex_id\n }, {\n color: this.colorScale(parseInt(data[i].count))\n })\n }\n }", "function updateData(data) {\n if (data && !data.error) {\n state.stops[\"id\"+data.id.substring(6)] = data; \n }\n displayData();\n}", "handleStatusChange(taskId, e, data) {\n const task = _.find(this.state.tasks, {'task_id': taskId})\n const newStatus = data.value\n if (newStatus !== task.status) {\n let newTasks = this.state.tasks.slice()\n let newTask = _.find(newTasks, {'task_id': taskId})\n newTask.status = newStatus\n let filteredTasks = this.filterTasksByWorkspaces(newTasks,\n this.state.selectedWorkspaces);\n let displayTasks = filteredTasks.length > 0 ? filteredTasks : newTasks;\n let newCompletionPercentage = this.calculateCompletionPercentage(displayTasks);\n put(`/tasks/${task.task_id}`, {status: newStatus})\n .then(res => {\n this.setState({\n tasks: newTasks,\n completionPercentage: newCompletionPercentage,\n })\n console.log(`Successfully changed status to ${newStatus} for ${task.name}`)\n })\n .catch(err => console.log(err))\n }\n }", "function updateState(data) {\n updateVoteFinishArea(data.state);\n}", "static updateItemMap(type, itemMap, itemIdx, r, c, height, width) {\n const gridWidth = StorageGrid.getData(type).width;\n for (let r1 = r; r1 < r + height; r1 += 1) {\n for (let c1 = c; c1 < c + width; c1 += 1) {\n const mapObj = {};\n if (r1 === r && c1 === c) {\n mapObj.status = TOP;\n mapObj.idx = itemIdx;\n } else {\n mapObj.status = OCCUIPED;\n }\n\n itemMap.set(r1 * gridWidth + c1, mapObj);\n }\n }\n }", "updateData(state, payload) {\n const { action, index, item } = payload;\n // eslint-disable-next-line object-curly-newline\n const { checkflag, detail, memberid, id } = item;\n if (action === 'create') {\n axios.post('http://localhost:8081/ssm-simple/checklist/create', {\n id,\n checkflag: 0,\n detail,\n memberid,\n }).then(() => {\n state.lists.push(item);\n });\n } else if (action === 'remove') {\n axios.post('http://localhost:8081/ssm-simple/checklist/delete', {\n id,\n }).then(() => {\n state.lists.splice(index, 1);\n });\n } else if (action === 'check') {\n axios.post('http://localhost:8081/ssm-simple/checklist/check', {\n id,\n checkflag,\n }).then(() => {\n state.lists[index].checkflag = checkflag;\n });\n }\n }", "function changeItemState(itemId, state, errorCounter) {\n\n $.ajax({\n\t \ttype: 'PUT',\n\t \turl: '/api/worklist/items/' + itemId + '/state?participantId=' + participantUUID,\n\t \tdata: state,\n contentType: 'text/plain',\n\t \tsuccess: function(data) {\n\t \t console.log(\"Success is a rare word in our context! But we managed to change the state of an item.\");\n\t \t},\n\t \terror: function(jqXHR, textStatus, errorThrown) {\n errorCounter++;\n }\n\t});\n}", "function updateTiles() {\n forEachTile(function update(row, col) {\n setTimeout(function () {\n tileColor = jQuery.Color().hsla({\n hue: (tileColor.hue() + (Math.random() * tileMaxHueShift)) % 360,\n saturation: tileMinSaturation + (Math.random() * tileSaturationSpread),\n lightness: tileMinLightness + (Math.random() * tileLightnessSpread),\n alpha: tileOpacity\n });\n\n var currentColor = jQuery.Color($(\"#\" + row + \"-\" + col), \"backgroundColor\");\n\n // when to update the Tiles\n if (currentColor.lightness() < tileLightnessDeadZoneLowerBound() ||\n currentColor.lightness() > tileLightnessDeadZoneUpperBound() ||\n currentColor.lightness() == 1) {\n $(\"#\" + row + \"-\" + col).animate({\n backgroundColor: tileColor\n }, tileFadeDuration);\n }\n }, getTileDelayTime(row, col));\n });\n }", "setStateInternal(id, value) {\n var obj = id;\n if (! obj.startsWith(this.namespace + '.'))\n obj = this.namespace + '.' + id;\n this.log.info('update state ' + obj + ' with value:' + value);\n currentStateValues[obj] = value;\n }", "updateClientState(uid, data) {\n this.pendingStates[uid] = data;\n }", "function updateIssueStatusInJira(TCID, Id){\n\tgetAjaxSetupConnection('POST');\n\n\tvar jsonData = {\n\t\t\"transition\": {\n\t \"id\": Id \n\t }\n\t}\n\n $.ajax({\n\t\turl: base_url + '/rest/api/latest/issue/' + TCID + '/transitions?expand=transitions.fields',\n\t\tdata: JSON.stringify(jsonData),\n\t\tsuccess: function (data, status, xhr) { \n\t\t\tconsole.log(xhr);\n\t\t},\n\t\tasync: false,\n\t\ttype: 'POST',\n\t\terror: function (error) { console.log(error.responseText);}\n\t});\t\t\t\n}", "update(data={}) {\n this.state = Object.assign(this.state, data);\n\n // notify all the Listeners of updated state\n this.notifyObervers(this.state);\n }", "function update_board(id){\n\t \tvar t = $('#'+id);\n\t \tfor (var k = parseInt(t.attr('col'))-1; k < parseInt(t.attr('col'))+parseInt(t.attr('sizex'))-1; k++) {\n\t \t\tfor (var j = parseInt(t.attr('row'))-1; j < parseInt(t.attr('row'))+parseInt(t.attr('sizey'))-1; j++) {\n\t \t\t\tboard[k][j].occupied = 1;\n\t \t\t\tboard[k][j].tile = id;\n\t \t\t};\n\t \t};\n\t }", "updateWorkLogStatus(id, status) {\n const index = dataModel.worklogs.findIndex((logs) => logs._id === id);\n try {\n dataModel.worklogs[index].status = status;\n } catch (err) {\n console.log('couldn\\'t find the object');\n }\n\n }", "updateData(config) {\r\n this.setState(config);\r\n }", "async function editMilestoneStatusHandler(id, status) {\n const response = await fetch(`/api/milestones/${id}`, {\n method: 'PUT',\n body: JSON.stringify({\n status\n }),\n headers: {\n 'Content-Type': 'application/json'\n }\n });\n if (response.ok) {\n location.reload();\n } else {\n alert(response.statusText);\n }\n}", "function statusUpdate(status, custId) {\n\n STATUS = status\n updateStatusCSS();\n detailsUpdate(customerId);\n}", "updateItemOfCurrentList(id, data) {\n\n return new TotoAPI().fetch('/supermarket/currentList/items/' + id, {\n method: 'PUT',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(data)\n });\n }", "applyChanges() {\n for (let i = 0; i < this.statusList.length; i++) {\n this.board.updateCell(...this.statusList[i]);\n }\n\n this.statusList = [];\n }", "function computeCurrentId(id){\n switch(id){\n case \"threeByThree_Tile1\":\n arrayData.currentTile = 0;\n break;\n case \"threeByThree_Tile2\":\n arrayData.currentTile = 1;\n break;\n case \"threeByThree_Tile3\":\n arrayData.currentTile = 2;\n break;\n\n case \"threeByThree_Tile4\":\n arrayData.currentTile = 3;\n break;\n \n case \"threeByThree_Tile5\":\n arrayData.currentTile = 4;\n break;\n \n case \"threeByThree_Tile6\":\n arrayData.currentTile = 5;\n break;\n \n case \"threeByThree_Tile7\":\n arrayData.currentTile = 6;\n break;\n \n case \"threeByThree_Tile8\":\n arrayData.currentTile = 7;\n break;\n \n case \"threeByThree_Tile9\":\n arrayData.currentTile = 8;\n break;\n\n }\n }", "function updateData() {\n\n const currentAvatarPage = invisible.getAttribute(\"current-avatar-page\");\n const currentAvatarPageToFetch = currentAvatarPage - 1;\n const fetchURL = \"getShopDtoByUserId/\" + currentUserId + \"?page=\" + currentAvatarPageToFetch + \"&size=5\";\n\n fetch(`${fetchURL}`)\n .then(success) // successful response\n .then(handleData)\n .then(activateShopping)\n .catch(error); // error\n\n }", "updateIndex(){\n this.props.updateIndex(this.props.currentState.index + 10);\n this.props.removeAllStoriesFromSelection(true); // This is done to ensure that there are no selected stories when we go to the next set of stories\n this.props.toggleLoader(true); // Show the loader again, since the new set of stories will be fetched from the api\n this.props.setLoaderText('Fetching stories');\n }", "updateSelectedTile(event) { \n this.selectedBoatId = event.detail.boatId;\n this.sendMessageService(this.selectedBoatId);\n }", "function changeNumberOfUnits(action,id){\n cart = cart.map((item)=>{\n let numberOfUnits = item.numberOfUnits;\n\n if(item.id === id){\n if(action === 'minus' && numberOfUnits > 1){\n numberOfUnits--\n }else if(action === 'plus'){\n numberOfUnits++\n }\n }\n return {\n ...item,\n numberOfUnits,\n }\n })\n updateCart();\n}", "function refreshTiles() {\n updater.postMessage({ refresh: true })\n }", "refresh() {\n this.props.loadGrid(5);\n this.resetTiles();\n }", "function displayRideUpdates(data) {\n console.log(\"displayRideUpdates working\");\n\n if (data.length == 0) {\n console.log(\"no data\");\n $('main').append(\n '<p>' + \"Sorry there are no matches\" + '</p>',\n '<br />'\n );\n }\n /*for (index in data ) */\n\n // forEach\n // data.forEach(ride => {\n // $('main').append(\n // '<p>' + ride.amusementParkName + '</p>',\n // '<p>' + ride.rideName + '</p>',\n // '<p>' + ride.minutesWait + '</p>',\n // '<p>' + ride.typeOfRide + '</p>',\n // '<p>' + ride.thrill + '</p>',\n // '<p>' + ride.rating + '</p>',\n // '<p>' + ride.text + '</p>',\n // '<br />',\n // '<button class=\"btnEdit\">' + \"Edit\" + '</button>',\n // '<button class=\"btnDelete\">' + \"Delete\" + '</button>',\n // '<br />',\n // '</main>'\n // );\n // });\n\n\n appState.rides = data;\n\n for (i = 0; i < data.length; i++) {\n let id = data[i].id;\n /*$('.btnDelete').data(\"id\", id);*/\n /*$(\".btnDelete\").data({\n \"id\": id\n }).data();*/\n console.log(id);\n // $('.btnDelete').attr(\"data-id\", id);\n console.log(\"data-id\", id);\n $('main').append(\n\n '<h6 class=\"sectionedList\">' + \"Amusement Park Name:\" + '</h6>',\n '<p>' + data[i].amusementParkName + '</p>',\n '<h6>' + \"Ride Name:\" + '</h6>',\n '<p>' + data[i].rideName + '</p>',\n '<h6 class=\"showMore aliceblue\">' + \"More...\" + '</h6>',\n '<h6 class=\"showLess aliceblue displayNone\">' + \"Less...\" + '</h6>',\n '<div class =\"displayNone expandableElement\">' +\n '<h6>' + \"Wait Time in Minutes:\" + '</h6>' +\n '<p>' + data[i].minutesWait + '</p>' +\n '<h6>' + \"Type of Ride:\" + '</h6>' +\n '<p>' + data[i].typeOfRide + '</p>' +\n '<h6>' + \"Thrill Level:\" + '</h6>' +\n '<p>' + data[i].thrill + '</p>' +\n '<h6>' + \"Give it a Rating:\" + '</h6>' +\n '<p>' + data[i].rating + '</p>' +\n '<h6>' + \"Say something about this ride:\" + '</h6>' +\n '<p>' + data[i].text + '</p>' +\n '<div class=\"clearfix p50B buttonDiv\">' +\n '<button class=\"btnEdit floatRight\" data-id=\"' + id + '\">' + \"Edit\" + '</button>' +\n\n '<button class=\"btnDelete floatRight\" data-id=\"' + id + '\">' + \"Delete\" + '</button>' +\n '</div>' +\n '</div>' +\n '<br style=\"display:block; margin-top:20px; line-height:30px;\"/>'\n );\n\n }\n $(\".showMore\").click(function () {\n console.log(\"showMore clicked\");\n $(this).nextUntil($(\"br\")).removeClass(\"displayNone\");\n $(this).next(\".showLess\").removeClass(\"displayNone\");\n $(this).addClass(\"displayNone\");\n });\n\n $(\".showLess\").click(function () {\n console.log(\"showLess clicked\");\n $(this).nextUntil($(\"br\")).addClass(\"displayNone\");\n $(this).prev(\".showMore\").removeClass(\"displayNone\");\n $(this).addClass(\"displayNone\");\n });\n\n $(\".btnEdit\").click(function (event) {\n event.preventDefault();\n $(\".modalEdit\").show();\n $(\".formEdit\").attr('data-id', $(this).attr('data-id'));\n let id = $(this).attr('data-id');\n /*let amusement = data[i].amusementParkName;\n console.log(amusement);*/\n const ride = appState.rides.find(r => r.id === id);\n console.log('ride', ride)\n\n $('.formEdit').append(\n '<label>' + \"Amusement Park Name\" + '</label>',\n '<input class=\"displayBlock marginAuto\" type=\"text\" name=\"amusementParkNameEdit\" placeholder=\"Disney Hollywood Studios Florida\" value=\"' + ride.amusementParkName + '\">',\n '<label>' + \"Ride Name\" + '</label>',\n '<input class=\"displayBlock marginAuto\" type=\"text\" name=\"rideNameEdit\" placeholder=\"Tower of Terror\" value=\"' + ride.rideName + '\">',\n '<label>' + \"Wait Time in Minutes\" + '</label>',\n '<input class=\"displayBlock marginAuto\" type=\"number\" name=\"minutesWaitEdit\" placeholder=\"120\" value=\"' + ride.minutesWait + '\">',\n '<label>' + \"Type of Ride\" + '</label>',\n '<input class=\"displayBlock marginAuto\" type=\"text\" name=\"typeOfRideEdit\" placeholder=\"Rollercoaster\" value=\"' + ride.typeOfRide + '\">',\n '<label>' + \"Thrill Level\" + '</label>',\n '<input class=\"displayBlock marginAuto\" type=\"text\" name=\"thrillEdit\" placeholder=\"Low, Medium, High\" value=\"' + ride.thrill + '\">',\n '<label>' + \"Give it a Rating\" + '</label>',\n '<input class=\"displayBlock marginAuto\" type=\"number\" name=\"ratingEdit\" placeholder=\"Enter 1-5\" min=\"1\" max=\"5\" value=\"' + ride.rating + '\">',\n '<label>' + \"Say something about this ride\" + '</label>',\n '<textarea class=\"displayBlock marginAuto\" name=\"textEdit\" placeholder=\"Describe in 50 characters\" value=\"' + ride.text + '\">' + \"\" +\n '</textarea>',\n '<br />' +\n '<div class=\"clearfix\">' +\n '<button class=\"displayBlock floatRight button buttonEditCancel\" type=\"button\">' + \"Cancel\" + '</button>' +\n '<button class=\"displayBlock floatRight button buttonEditApply\" type=\"submit\">' + \"Apply\" + '</button>' +\n '</div>' +\n '<br />'\n );\n $(\".formEdit\").children(\"input\").attr('data-id', $(this).attr('data-id'));\n\n $(\".buttonEditApply\").attr('data-id', $(this).attr('data-id'));\n\n $(\".buttonEditCancel\").click(function (event) {\n console.log(\"clicking cancel edit\");\n event.preventDefault();\n console.log(\"clicking cancel edit\");\n $(\".modalEdit\").hide();\n $(\".formEdit\").empty();\n $(\".list\").show();\n });\n\n $(\".formEdit\")[0].reset();\n });\n\n\n\n $(\".btnDelete\").click(function (event) {\n event.preventDefault();\n $(\".modalDelete\").show();\n $(\".buttonDeleteYes\").attr('data-id', $(this).attr('data-id'));\n $(\".buttonDeleteYes\").click(function () {\n event.preventDefault();\n $.ajax({\n url: '/rides/' + $(this).attr('data-id'),\n method: 'DELETE'\n }).then(function () {\n getAndDisplayRideUpdates()\n });\n });\n });\n\n //$(\".btnDelete\").on('click', function (event) {\n // event.preventDefault();\n // $(\".modalDelete\").show();\n //});\n}", "_updateLayers() {\n const {tileset3d, layerMap} = this.state;\n const {selectedTiles} = tileset3d;\n\n const tilesWithoutLayer = selectedTiles.filter(tile => !(tile.contentUri in layerMap));\n\n for (const tile of tilesWithoutLayer) {\n this._unpackTile(tile);\n\n const layer = this._create3DTileLayer(tile);\n\n tileset3d.addTileToCache(tile); // Add and remove on main thread\n\n layerMap[tile.contentUri] = {\n layer,\n tile\n };\n }\n }", "updateCellValue(id, data) {\n fetch(`${this.baseUrl}/games/${id}/update_cell`, {\n method: \"PATCH\",\n headers: {\n ...this.authHeader,\n ...this.defaultHeaders\n },\n body: JSON.stringify(data)\n })\n }", "handleUpdate(e) {\n e.preventDefault();\n // if user chooses to update 1 item (first item that matches parameters)\n if (this.state.UpdateProp && this.state.filter && e.target.value === 'update1') {\n fetch('/putOne', {\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\"\n },\n body: JSON.stringify({\n filterUpdate: this.state.filterUpdate,\n filter: this.state.filter,\n propNew: this.state.UpdateProp,\n propData: this.state.newData\n })\n }).then(res => res.json())\n .then(response => alert('project updated!'), (error) => {\n throw error.message;\n })\n\n window.location.reload(); // fetch data once more to show updates\n }\n // if user chooses to updateALL items (all items that match parameters)\n if (this.state.UpdateProp && this.state.filter && e.target.value === 'updateAll') {\n fetch('/putAll', {\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\"\n },\n body: JSON.stringify({\n filterUpdate: this.state.filterUpdate,\n filter: this.state.filter,\n propNew: this.state.UpdateProp,\n propData: this.state.newData\n })\n }).then(res => res.json())\n .then(response => alert('project updated!'), (error) => {\n throw error.message;\n })\n\n window.location.reload(); // fetch data once more to show updates\n }\n\n }", "function update() {\n \n // data\n var key = Object.keys(ids).find( key => ids[key] == this.value) ;\n var newId = data.id[key];\n var newValue = data.value[key];\n var newDemo = data.demographics[key];\n \n // bar chart\n Plotly.restyle('bar', 'x', [newValue.slice(0,10).reverse()]);\n Plotly.restyle('bar', 'y', [newId.slice(0,10).reverse().map( i => 'OTU ' + i.toString() )]);\n\n // bubble chart\n Plotly.restyle('bubble', 'x', [newId]);\n Plotly.restyle('bubble', 'y', [newValue]);\n\n // info panel\n d3.selectAll('#sample-metadata text').remove();\n Object.entries(newDemo).forEach( v => {\n d3.select('#sample-metadata')\n .append('text')\n .text(`${v[0]} : ${v[1]}`)\n .append('br');\n });\n\n // gauge\n Plotly.restyle('gauge', 'value', [newDemo.wfreq]);\n Plotly.restyle('gauge', 'title', [{ text: `Scrubs per Week | Participant: ${newDemo.id}` }]);\n\n }", "function updateStatus(st) {\r\n\tsrc = st.attr('src');\r\n\tvar s;\r\n\tvar id = st.attr('id');\r\n\tif (src == 'img/check.png') {\r\n\t\tst.attr('src', 'img/uncheck.png');\r\n\t\ts = 0;\r\n\t} else {\r\n\t\tst.attr('src', 'img/check.png');\r\n\t\ts = 1;\r\n\t}\r\n\r\n\t$.post(\"updatestatus.act\", {\r\n\t\ts : s,\r\n\t\tid : id,\r\n\t}, function(data) {\r\n//\t\tclearChild();\r\n//\t\tgetList();\r\n\t});\r\n}", "update(data) {\n this.data = data;\n this.populate(this.dindex);\n console.log(\"Infographic of type \\\"\" + this.typename + \"\\\" updated.\");\n }", "function updateDriverStatus(driverData){\r\n\tconst index = markers.findIndex(marker => marker.phoneNumber == driverData.phoneNumber);\r\n\tconsole.log(\"Checking if update is required...\");\r\n\tif(driverData.status==\"active\"){\r\n\t\tconsole.log(\"Updating marker\");\r\n\t\tif(markers[index].mark.icon=='./views/Images/inactive.png'){\r\n\t\t\tmarkers[index].mark.icon = driverIcons[types[driverData.destination].type].icon;\r\n\t\t\tremoveDriverMarker(driverData);\r\n\t\t\taddDriverMarker(driverData);\r\n\t\t\tconsole.log(\"Updated marker to active.\");\r\n\t\t}\r\n\t\t//else if(markers[index].mark.icon!=driverIcons[types[driverData.destination].type].icon){\r\n\t\telse{\r\n\t\t\tmarkers[index].mark.icon = driverIcons[types[driverData.destination].type].icon;\r\n\t\t\tconsole.log(\"Updating marker color\");\r\n\t\t\tremoveDriverMarker(driverData);\r\n\t\t\taddDriverMarker(driverData);\r\n\t\t\tconsole.log(\"Update completed.\");\r\n\t\t}\r\n\t}\r\n\telse{\r\n\t\tif(markers[index].mark.icon!='./views/Images/inactive.png'){\r\n\t\t\tmarkers[index].mark.icon = './views/Images/inactive.png';\r\n\t\t\tremoveDriverMarker(driverData);\r\n\t\t\taddDriverMarker(driverData);\r\n\t\t\tconsole.log(\"Updated marker to in-active.\");\r\n\t\t}\r\n\t}\r\n}", "function updatePosInfoDetail(model) {\n $scope.loadingPosInfoDetails = true;\n if (model.Id == 0) {\n DynamicApiService.postSingle('PosInfoDetail', model).then(function (result) {\n $scope.getPosInfoDetails($scope.slaveEntityIdentifier, 'page=1&pageSize=200&posInfoId=' + $scope.selectedPosInfo.Id);\n //$scope.selectPosInfo($scope.selectedPosInfo); //Actually get posinfo details of allready selected as update on view\n tosterFactory.showCustomToast('New entry \"' + model.Description + '\" saved successfully.', 'success');\n }, function (reason) {\n $scope.loadingPosInfoDetails = false;\n tosterFactory.showCustomToast(model.Description + ' entry failed to save.', 'fail');\n console.log('Fail Load'); console.log(reason);\n }, function (error) {\n $scope.loadingPosInfoDetails = false;\n tosterFactory.showCustomToast(model.Description + ' entry errored on save.', 'error');\n console.log('Error Load'); console.log(error);\n });\n } else {\n DynamicApiService.putMultiple('PosInfoDetail', [model]).then(function (result) {\n $scope.getPosInfoDetails($scope.slaveEntityIdentifier, 'page=1&pageSize=200&posInfoId=' + $scope.selectedPosInfo.Id);\n //$scope.selectPosInfo($scope.selectedPosInfo); //Actually get posinfo details of allready selected as update on view\n tosterFactory.showCustomToast('Entry \"' + model.Description + '\" updated successfully.', 'success');\n }, function (reason) {\n $scope.loadingPosInfoDetails = false;\n tosterFactory.showCustomToast(model.Description + ' entry failed to update.', 'fail');\n console.log('Fail Load'); console.log(reason);\n }, function (error) {\n $scope.loadingPosInfoDetails = false;\n tosterFactory.showCustomToast(model.Description + ' entry errored on update.', 'error');\n console.log('Error Load'); console.log(error);\n });\n }\n }", "update(id, title, description) {\n TaskApi.update(id, title, description)\n .then((response) => {\n if (response.data && response.data._id) {\n this.setState((state) => ({\n ...state, todos: state.todos.map(todo =>\n todo._id === response.data._id ?\n { ...response.data, title, description }\n : todo\n )\n }));\n }\n })\n .catch(error => {\n this.setState((state) => ({ ...state, error }));\n });\n }", "update(data) {\n this.data = data || this.data;\n this._updateID++;\n }", "function update() {\n // Extract from the object id the corresponding index of the array\n let index = checkIndex(this.id)[0];\n\n // Update the array based on the existing value of the array\n if (binaryNumbers[index]) {\n binaryNumbers[index] = 0;\n } else {\n binaryNumbers[index] = 1;\n }\n\n setIconAndNumbers();\n setDecimal();\n}", "function updateTiles() {\n console.debug(\"updateTiles called\");\n tagList.forEach(function (id) {\n addTagInServiceTile(id, id == \"Cheapest\" && \"Lowest Cost\" || id);\n });\n\n setTimeout(function () {\n if ($('service-tile #Recommended').length > 0 && !window.recommendDefault) {\n window.recommendDefault = true;\n $('service-tile #Recommended label').click();\n } else if ($('service-tile #Recommended').length > 0 && window.recommendDefault && $('service-tile input[id^=\"nbsServiceTileServiceRadio\"]:checked').length == 0) {\n $('service-tile #Recommended label').click();\n }\n }, 400);\n }", "async updateState(state) {\n let key = this.ctx.stub.createCompositeKey(this.name, [state.getKey()]);\n let data = Utils.serialize(state);\n await this.ctx.stub.putState(key, data);\n }", "function updateBldCounter()\n{\n\t$( \".building\" ).each(function( index ) {\n\t if($(this).attr(\"status\") != \"done\"){\n\t\tvar currCount = $(this).attr(\"counter\");\n\n\t\tcurrCount = currCount -1;\n\t\tif($(this).attr(\"status\") == \"building\"){\n\t\t\t$(this).html(\"<img src='\"+ loadingImage +\"'>building process ..\"+ currCount);\n\t\t}else if($(this).attr(\"status\") == \"Upgrading\"){\n\t\t\t$(this).html(\"<img src='\"+ loadingImage +\"'>Upgrading Bulding...\"+ currCount);\t\t\t\n\t\t}\n\t\t$(this).attr(\"counter\",currCount);\n\n\t\t//$(this).attr(\"counter\",currCount++);\n\t }\t \n\t});\n\t\n setTimeout(updateBldCounter, 1000);\n}", "function fetchImageDataAndUpdateState() {\n\n const titleList = images.reduce((newList, img) => [...newList, img.title], []);\n\n hydrateDetailPageImages(titleList, currDetailPage).then(function(detailPage) {\n\n // Update wiki page from our in memory list\n wikiPages[pageID] = detailPage;\n\n // Dispatch our pages list update and set data for the current detail view\n dispatchUpdates(wikiPages, wikiPages[pageID]);\n\n }).catch((e) => {\n console.error('Failed to hydrate image info on details page', e);\n dispatchUpdates(wikiPages, wikiPages[pageID]);\n });\n }", "openUpdate(id) {\n this.setState({\n type_modal: 'update',\n id_current: id\n });\n let name_pk = this.props.pk_key;\n let detail = _.clone(_.find(this.state.data, { [name_pk]: id }));\n Object.keys(detail).forEach(function (item) {\n detail[item] = (detail[item] === null) ? '' : detail[item];\n });\n this.setState({\n row_current: detail\n });\n this.toggleModal();\n }", "onClick(status) {\n const url = `${API_URL}collection-evidence/${this.id}/state`;\n const data = {\n State: status\n };\n let stateIndex;\n\n if(status === 'Submitted') stateIndex = 0;\n if(status === 'Approved') stateIndex = 1;\n if(status === 'Rejected') stateIndex = 2;\n\n let tempData = Object.assign({}, this.state.imgData, { State: stateIndex, StateDescription: status});\n\n axios.put(url, data).then(res => {\n this.setState({ imgData: tempData });\n });\n }", "updateCurrentTileUi() {\n let theTile = this.map[this.player.getPositionKey()];\n currentTilePositionElement.innerText = `[${theTile.getPositionKey()}]`;\n if (theTile.hasBuilding()) {\n let buildingText = theTile.actor.getName() + \" \" + theTile.actor?.inventory?.getSummary();\n currentTileBuildingElement.innerText = buildingText;\n } else {\n currentTileBuildingElement.innerText = \"None\";\n }\n if (theTile.tileType != \"empty\") {\n currentTileResourcesElement.innerText = `${theTile.getType()}: ${theTile.countResources()}`;\n } else {\n currentTileResourcesElement.innerText = \"No Resources\";\n }\n }", "function update()\n\t{\n\t setNavBarState({buttonDisabled: true});\n\t\t\n\t fetch('/api/get_script_status').then(res => res.json()).then(data => {\n\n\t\t//If our script is not currently \"Running\", then we start it.\n\t if (data.hasOwnProperty('status') === false || data[0]['status'] !== \"Running\" ) {\n\t\t setNavBarState({chipColor: \"yellow\", buttonDisabled: true, chipDisplay: \"inline\"});\n\t\t fetch('/api/update_data');\n\t\t}});\n\t}", "updateMyTask(state, { id, taskData }) {\n const index = state.myTasks.findIndex(t => t.id === id);\n\n if (index > -1) {\n state.myTasks[index] = Object.assign({}, state.myTasks[index], taskData);\n }\n }", "function update() {\n $scope.items.shift();\n $scope.items.push(generateRow());\n $scope.usage1 = setUsage();\n $scope.usage2 = setUsage();\n $scope.usage3 = setUsage();\n $scope.usage4 = setUsage();\n $scope.mapObject.data = mapChanges();\n $timeout(update, updateInterval);\n }", "update(data = {}) {\n this.state = Object.assign(this.state, data);\n this.notify(this.state);\n }", "function updateData() \n{\n\tObject.keys(raidApp.selectedLocations).forEach((key) => \n\t{\n\t\tconst raid = raidApp.selectedLocations[key];\n\t\tconst card = getRaidCard(raid);\n\t\t// CODELAB: Add code to call getForecastFromCache\n\n\t\t// Get the forecast data from the network.\n\t\t//getRaidFromNetwork(location.geo).then((forecast) => {\n\t\t//renderForecast(card, forecast);\n\t\t//});\n\t\trenderRaid(card, raid) \n\t});\n}", "update_tile(tile_pos){\n var tile = this.grid[tile_pos.x][tile_pos.y]\n if(tile != null){\n tile.update(this.grid)\n }\n }", "function setChangeStatus() {\n\n // update status of item\n $(\".item_status\").unbind().click(function() {\n\n var tr = $(this).parent();\n var itemId = tr.attr('id').substring(tr.attr('id').indexOf('-') + 1);\n var newItemStatus = (1 - itemsStatus[itemId]);\n\n $.ajax({\n type: \"PUT\",\n url: \"/item\",\n data: {id: itemId, value: undefined, status: newItemStatus },\n success: function (data)\n {\n if (data['status'] === 0 ) // only upon success we change status of item\n {\n\n var itemsStr;\n $(\"#errorMsg\").html(\"&nbsp;\");\n itemsStatus[itemId] = newItemStatus;\n\n tr.children(\"td:nth-child(1)\").toggleClass(\"item_completed_sign\");\n tr.children(\"td:nth-child(2)\").toggleClass(\"item_completed_content\");\n\n // update the number of total remaining completed and uncompleted tasks\n newItemStatus === 1 ? (++completedItems , --uncompletedItems) : (--completedItems , ++uncompletedItems);\n\n if (completedItems > 0 && uncompletedItems === 0) // all the items were completed\n {\n $('#change_all_statuses').prop('checked',true);\n $(\"#clear_completed\").html(\"Clear completed.\");\n $(\"#clear_completed\").show();\n }\n\n else\n {\n $('#change_all_statuses').prop('checked',false);\n if (completedItems > 0) {\n $(\"#clear_completed\").html(\"Clear completed.\");\n $(\"#clear_completed\").show();\n }\n else {\n $(\"#clear_completed\").hide();\n }\n }\n\n itemsStr = (uncompletedItems === 1) ? 'item left.' : 'items left.';\n $(\"#items_left\").html(\"<strong> \" + uncompletedItems + \" </strong>\" + itemsStr);\n }\n else // request failed\n {\n console.log(\"Unable to update item with id: \" + itemId + \". Reason: \" + data['msg']);\n $(\"#errorMsg\").text(\"Failed to change item status: \" + data['msg']);\n }\n },\n error: function ()\n {\n console.log(\"Unable to update item with id: \" + itemId + \".\");\n $(\"#errorMsg\").text(\"Failed to change item status\");\n }\n });\n });\n}", "function state(id)\r\n{\r\n\t//console.log(id)\r\n\tswitch(id[0])\r\n\t{\r\n\t\tcase 'E': updateActivTab(\"S_E_Button\", \"S_E_Options\", id[1], 0);break;//StackEdit\r\n\t\tcase 'C': updateActiv(\"S_C_Toggle\", \"S_Console\", id[1]);break;//Toggle Console\r\n\t\tcase 'M': updateActiv(\"M_Toggle\", \"Menu\", id[1]);break;//Menu/Toolbar\r\n\t\tcase 'P': updatePreferences(id[1]);break;//User Preferences\r\n\t\tcase 'F': saveLoadFile(id[1]);//Load/Save File\r\n\t}\r\n}", "handleChange(id){\n /* the trickiest part of this that we are dealing with an entire array \n because we are saving an array in our state we never wanna modify state directly */\n this.setState((previousState)=>{\n /* then i will use .map() to loop through \n previousState.toDos (previousState el state el adima | toDos <= object property)\n and look for a toDo with the id ( el parameter fe handleChange function ) */\n let updated = previousState.toDos.map((todo)=>{\n /* \n todo.id <= todo: represent each element( object ) of toDoData array of objects.&\n the id in the object\n id <= the id passed to handleChange method\n if both of them are equal we wanna change the status ( inside toDoData completed: true /false)\n */\n if(todo.id === id ){\n // this means if \"completed\" is true it will equal what's not \"true\" that is false\n todo.completed = !todo.completed \n }\n /* whether or not we did that change true to false ( toDoData completed) we return the todo \n (map method parameter).\n this return add the todo(the parameter of the .map(method)) returns into our updated variable */\n return todo\n })\n /* return new version of state */\n return {\n toDos: updated // updated is the variabled elly shayel .map\n }\n })\n }", "updateCartItemQuantity(amount, cartDetailID) {\n const url = WebshopEndpoint + \"/ShoppingCartController/UpdateItemQuan/\" +\n cartDetailID; \n\n fetch(url, { \n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n dataType: \"application/json\"\n },\n body: JSON.stringify(amount)\n })\n .then(response => response.json())\n .then((json) => {\n switch (json.id) {\n case 603:\n this.setState(prevState => {\n const updatedItems = prevState.items.map(prod => {\n if (prod.cartDetailID === cartDetailID) {\n prod.quantity = json.result\n }\n return prod\n })\n return {\n items: updatedItems\n }\n }) \n break;\n case 602:\n this.removeItemFromCartItemsState(cartDetailID);\n break;\n default:\n // Logger besked så vi ved hvilken fejl der forekom \n console.log(json.message)\n }\n }).then(() => this.updateTotalCartQuantity())\n .catch(() => {\n console.log(\"An error occured\");\n });;\n }", "toggleUpdate() {\n\n if (this.state.dataHasChanged && this.state.updatePending) {\n const taskRequestBody = {\n method: 'PATCH',\n headers: {'Content-Type': 'application/json'},\n body: JSON.stringify({\n project_id: this.state.project_id,\n project_token: this.state.project_token,\n project_name: this.state.project_name,\n project_description: this.state.project_description,\n project_status: this.state.project_status.toString()\n })\n };\n\n fetch(process.env.REACT_APP_API_URL + \"project/update\", taskRequestBody)\n .then(response => response.json())\n .then(\n (data) => {\n this.props.updateDisplayMessage({empty: false, error: data.error, content: data.msg});\n this.setState({updatePending: !this.state.updatePending});\n },\n (error) => {\n this.props.updateDisplayMessage({empty: false, error: true, content: error});\n this.setState({error: true})\n }\n )\n } else {\n this.setState({updatePending: !this.state.updatePending});\n }\n }", "update(startingData) {}", "function updateStateOfHost(updateInfo){\r\n\tfor(j in updateInfo){\r\n\t\tfor(k in markers_array){\r\n\t\t//markers_array[k].plines[0].setOptions({'strokeColor':'red'});\r\n\t\tif(markers_array[k].title==updateInfo[j].id){ \r\n\t\t\tif ((markers_array[k].device_type.toLowerCase().indexOf('odu16'))>=0){\r\n\t\t\t\t\r\n\t\t\t\t//markers_array[k].setIcon(\"images/odu-\"+updateInfo[j].state+\".png\");\r\n\t\t\t\tif (labelFlag==0){\r\n\t\t\t\t\tvar label = new Label({\r\n\t\t\t\t\t\tmap: map\r\n\t\t\t\t\t});\r\n\t\t\t\t\tlabel.set('zIndex', 1234);\r\n\t\t\t\t\tlabel.bindTo('position', markers_array[k], 'position');\r\n\t\t\t\t\tlabel.set('text','<div style=\"text-align:center;margin-top:-24px;font-size:10px;\">RM18<br/>'+String(updateInfo[j].signal)+'</div>');\r\n\t\t\t\t\tmarkers_array[k].setIcon(\"images/device\"+updateInfo[j].state+\".png\");\r\n\t\t\t\t\tlabelDict[markers_array[k].title]=label\r\n\t\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tmarkers_array[k].setIcon(\"images/device\"+updateInfo[j].state+\".png\");\r\n\t\t\t\t\tlabelDict[markers_array[k].title].set('text','<div style=\"text-align:center;margin-top:-24px;font-size:10px;\">RM18<br/>'+String(updateInfo[j].signal)+'</div>');\r\n\t\t\t\t }\t\t\t\t\t\r\n\r\n\t\t\t\t}\r\n\t\t\telse if ((markers_array[k].device_type.toLowerCase().indexOf('odu100'))>=0){\r\n\t\t\t\tif (labelFlag==0){\r\n\t\t\t\t\tvar label = new Label({\r\n\t\t\t\t\t\tmap: map\r\n\t\t\t\t\t});\r\n\t\t\t\t\tlabel.set('zIndex', 1234);\r\n\t\t\t\t\tlabel.bindTo('position', markers_array[k], 'position');\r\n\t\t\t\t\tlabel.set('text','<div style=\"text-align:center;margin-top:-24px;font-size:10px;\">RM<br/>'+String(updateInfo[j].signal)+'</div>');\r\n\t\t\t\t\tmarkers_array[k].setIcon(\"images/device\"+updateInfo[j].state+\".png\");\r\n\t\t\t\t\tlabelDict[markers_array[k].title]=label\r\n\t\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tmarkers_array[k].setIcon(\"images/device\"+updateInfo[j].state+\".png\");\r\n\t\t\t\t\tlabelDict[markers_array[k].title].set('text','<div style=\"text-align:center;margin-top:-24px;font-size:10px;\">RM<br/>'+String(updateInfo[j].signal)+'</div>');\r\n\t\t\t\t }\t\t\t\t\t\r\n\r\n\t\t\t\t}\r\n\t\t\telse if ((markers_array[k].device_type.toLowerCase().indexOf('idu'))>=0){\r\n\t\t\t\t//markers_array[k].setIcon(\"images/idu-\"+updateInfo[j].state+\".png\");\r\n\t\t\t\tif (labelFlag==0){\r\n\t\t\t\t\tvar label = new Label({\r\n\t\t\t\t\t\tmap: map\r\n\t\t\t\t\t});\r\n\t\t\t\t\tlabel.set('zIndex', 1234);\r\n\t\t\t\t\tlabel.bindTo('position', markers_array[k], 'position');\r\n\t\t\t\t\tlabel.set('text','<div style=\"text-align:center;margin-top:-24px;font-size:10px;\">IDU</div>');\r\n\t\t\t\t\tmarkers_array[k].setIcon(\"images/device\"+updateInfo[j].state+\".png\");\r\n\t\t\t\t\tlabelDict[markers_array[k].title]=label\r\n\t\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tmarkers_array[k].setIcon(\"images/device\"+updateInfo[j].state+\".png\");\r\n\t\t\t\t\tlabelDict[markers_array[k].title].set('text','<div style=\"text-align:center;margin-top:-24px;font-size:10px;\">IDU</div>');\r\n\t\t\t\t }\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\telse if ((markers_array[k].device_type.toLowerCase().indexOf('ap'))>=0){\r\n\t\t\t\tif (labelFlag==0){\r\n\t\t\t\t\tvar label = new Label({\r\n\t\t\t\t\t\tmap: map\r\n\t\t\t\t\t});\r\n\t\t\t\t\tlabel.set('zIndex', 1234);\r\n\t\t\t\t\tlabel.bindTo('position', markers_array[k], 'position');\r\n\t\t\t\t\tlabel.set('text','<div style=\"text-align:center;margin-top:-24px;font-size:10px;\">AP<br/>'+String(updateInfo[j].client)+'</div>');\r\n\t\t\t\t\tmarkers_array[k].setIcon(\"images/device\"+updateInfo[j].state+\".png\");\r\n\t\t\t\t\tlabelDict[markers_array[k].title]=label\r\n\t\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tmarkers_array[k].setIcon(\"images/device\"+updateInfo[j].state+\".png\");\r\n\t\t\t\t\tlabelDict[markers_array[k].title].set('text','<div style=\"text-align:center;margin-top:-24px;font-size:10px;\">AP<br/>'+String(updateInfo[j].client)+'</div>');\r\n\t\t\t\t }\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\telse if ((markers_array[k].device_type.toLowerCase().indexOf('ccu'))>=0){\r\n\t\t\t\tif (labelFlag==0){\r\n\t\t\t\t\tvar label = new Label({\r\n\t\t\t\t\t\tmap: map\r\n\t\t\t\t\t});\r\n\t\t\t\t\tlabel.set('zIndex', 1234);\r\n\t\t\t\t\tlabel.bindTo('position', markers_array[k], 'position');\r\n\t\t\t\t\tlabel.set('text','<div style=\"text-align:center;margin-top:-24px;font-size:10px;\">CCU<br/></div>');\r\n\t\t\t\t\tmarkers_array[k].setIcon(\"images/device\"+updateInfo[j].state+\".png\");\r\n\t\t\t\t\tlabelDict[markers_array[k].title]=label\r\n\t\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tmarkers_array[k].setIcon(\"images/device\"+updateInfo[j].state+\".png\");\r\n\t\t\t\t\tlabelDict[markers_array[k].title].set('text','<div style=\"text-align:center;margin-top:-24px;font-size:10px;\">CCU<br/></div>');\r\n\t\t\t\t }\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\telse if ((markers_array[k].device_type.toLowerCase().indexOf('mou'))>=0){\r\n\t\t\t\tif (labelFlag==0){\r\n\t\t\t\t\tvar label = new Label({\r\n\t\t\t\t\t\tmap: map\r\n\t\t\t\t\t});\r\n\t\t\t\t\tlabel.set('zIndex', 1234);\r\n\t\t\t\t\tlabel.bindTo('position', markers_array[k], 'position');\r\n\t\t\t\t\tlabel.set('text','<div style=\"text-align:center;margin-top:-24px;font-size:10px;\">MOU<br/></div>');\r\n\r\n\t\t\t\t\tmarkers_array[k].setIcon(\"images/device\"+updateInfo[j].state+\".png\");\r\n\t\t\t\t\tlabelDict[markers_array[k].title]=label\r\n\t\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tmarkers_array[k].setIcon(\"images/device\"+updateInfo[j].state+\".png\");\r\n\t\t\t\t\tlabelDict[markers_array[k].title].set('text','<div style=\"text-align:center;margin-top:-24px;font-size:10px;\">MOU<br/></div>');\r\n\t\t\t\t }\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\telse if ((markers_array[k].device_type.toLowerCase().indexOf('rou'))>=0){\r\n\t\t\t\tif (labelFlag==0){\r\n\t\t\t\t\tvar label = new Label({\r\n\t\t\t\t\t\tmap: map\r\n\t\t\t\t\t});\r\n\t\t\t\t\tlabel.set('zIndex', 1234);\r\n\t\t\t\t\tlabel.bindTo('position', markers_array[k], 'position');\r\n\t\t\t\t\tlabel.set('text','<div style=\"text-align:center;margin-top:-24px;font-size:10px;\">ROU<br/></div>');\r\n\t\t\t\t\tmarkers_array[k].setIcon(\"images/device\"+updateInfo[j].state+\".png\");\r\n\t\t\t\t\tlabelDict[markers_array[k].title]=label\r\n\t\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tmarkers_array[k].setIcon(\"images/device\"+updateInfo[j].state+\".png\");\r\n\t\t\t\t\tlabelDict[markers_array[k].title].set('text','<div style=\"text-align:center;margin-top:-24px;font-size:10px;\">ROU<br/></div>');\r\n\t\t\t\t }\t\t\t\t\t\r\n\t\t\t\t}\r\n\r\n\t\t\telse if ((markers_array[k].device_type.toLowerCase().indexOf('swt'))>=0){\r\n\t\t\t\tmarkers_array[k].setIcon(\"images/switch-\"+updateInfo[j].state+\".png\");\t\t\r\n\t\t\t}\r\n\t\t\telse if ((markers_array[k].title.toLowerCase().indexOf('localhost'))>=0){\r\n\t\t\t\tmarkers_array[k].setIcon(\"images/localhost-\"+updateInfo[j].state+\".png\");\t\t\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\t\r\n\t\t\t\t//console.log(markers_array[k].device_type.toLowerCase());\r\n\t\t\t\tmarkers_array[k].setIcon(\"images/unknown-\"+updateInfo[j].state+\".png\");\t\t\r\n\t\t}\r\n\t\t}\r\n\t}\r\n\tlabelFlag=1;\r\n}", "function updateGridStatusFromWS(data,VarTime){\n\tvar requestedTime = kendo.toString(new Date(VarTime), \"G\");\n\tvar status = data.status;\n\tvar reqId = data.requestId;\n\n\tif (data.hasOwnProperty('remarks')){\n\t\tvar remarks = data.remarks;\n\t}\n\t\t\t\t\n\tvar grid =$(\"#writebackgrid\").data(\"kendoGrid\");\n\tvar data = grid.dataSource.data();\n\t// Find those records that have requestId\n\t// and return them in `res` array\n\tvar res = $.grep(data, function (d) {\n\t\treturn d.requestId == reqId;\n\t});\n\n\tif(res !=undefined){\n\t\tvar dataItem =grid.dataSource.get(res[0].id);\n\t\t\n\t\tdataItem.set(\"lastUpdated\",requestedTime);\n\t\tdataItem.set(\"status\",status);\n\t\t\n\t\tif (status.toUpperCase() == \"SUCCESS\"){\n\t\t\n\t\t\tnotificationMsg.show({\n\t\t\t\tmessage : \"Parameter <strong>\" + dataItem.pointName + \"</strong> has been updated successfully.\"\n\t\t\t}, 'success');\n\t\t\t\t \n\t\t} else if (status.toUpperCase() == \"FAILURE\"){\n\t\t\n\t\t\tnotificationMsg.show({\n\t\t\t\tmessage : \"Failed to update parameter <strong>\" + dataItem.pointName + \"</strong>. \" + remarks\n\t\t\t}, 'error');\n\t\t\n\t\t}\n\t}\n\t//console.log(test);\n\thighlightQueuedRows();\n}", "function dispatch_details_update_row(items, obj) {\n var item;\n for(i in items) {\n\titem = items[i];\n\tif((order_list_store.getValue(item, 'id')==obj['id'])) {\n\t attrs = order_list_store.getAttributes(item);\n\t for(j in attrs) {\n\t\torder_list_store.setValue(item, attrs[j], obj[attrs[j]]);\n\t }\n\t return true;\n\t}\n }\n return false;\n}", "updateStatus(){\n getStatus();\n }", "function updateTask(updateIds,updatedtask) {\n const path = \"/tasks/\"+updateIds;\n axios.patch(path,updatedtask)\n .then(res => {\n console.log(res.data);\n dispatch(turnoffeditmode(false));\n const value = tasks;\n const updatedarray = value.map(task => {\n if (task.Id === updateIds){\n return updatedtask;\n }\n else return task;\n });\n setTasks(updatedarray);\n })\n .catch(err => {\n console.log(err);\n })\n }", "toggleAreaState(data) { \n\n return (dispatch) => {\n\n fetch('/api/areas/toggleState', {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(data)\n })\n .then(resp => {\n return resp.json();\n }).then((area) => {\n\n if(area._id){\n dispatch({\n type:'AREA_UPDATED',\n payload:area\n });\n toast.success(messages.area.updated);\n }else{\n toast.error(messages.area.error.cannotUpdate);\n }\n\n });\n\n }\n\n }", "static update(data, id) {\n this.checkArgs(data, id);\n if ((typeof data !== 'object')) {\n return this.invalidData('This request is invalid');\n }\n\n const entry = DummyDataHelpers.updateEntry(data, dummyEntries, id);\n if (entry) {\n return this.success(`An entry with ${id} has been updated successfully`, entry);\n }\n return this.badRequest('Id does not exist');\n }", "update(data = {}) {\r\n console.log(data);\r\n this.state = Object.assign(this.state, data);\r\n this.notify(this.state);\r\n }", "function updateCounter(data) {\n // ui.grid.updateLastChanged( getCurrentTime() );\n console.log(\"data last updated at: \" + getCurrentTime() + \" with \" + data);\n}", "update(id) {\n\n }", "update(id, data, params) {}", "handleSaveChange(event) {\n let data= Object.assign({}, this.state.dataConfig);\n api.modifyStation(data._id, data, (err, result) => {\n if (err) {\n Notification(\n \"error\",\n \"Error\",\n err.data === undefined ? err : err.status + \" \" + err.data._error_message,\n );\n } else {\n let tmp = {}\n tmp['_id'] = result._id;\n tmp['seed'] = result.seed; \n let temp = Object.assign({}, this.state.temp); \n temp.seed = tmp\n this.setState({temp: temp}) \n \n // // --------sau khi thay doi va update ok\n Notification(\"success\", \"Edit Station\", \"Edit station is successfully\");\n }\n });\n }", "reloadAll() {\n const prevAreas = this.state.areas;\n this.setState(\n {\n areas: [],\n mainGraphData: {}\n },\n () => {\n // Add all the areas back.\n prevAreas.forEach(this.addAreaByStr);\n\n // TODO: Add code for stuff after reload here!\n // Force reload the heatmap, only refetch data when dynamic map is on\n if (this.state.dynamicMapOn && this.state.models.length !== 0) {\n this.map.fetchData(this.state.dynamicMapOn, this.state.perMillionOn);\n }\n if(this.state.perMillion && this.state.models.length !== 0) {\n this.map.fetchData(this.state.dynamicMapOn, this.state.perMillionOn);\n }\n\n }\n );\n }", "updateGridStates() {\n const newGridStates = _.times(this.state.boardHeight, (rowIdx) => {\n return _.times(this.state.boardWidth, (colIdx) => {\n const northRowIdx = this.wrapHeight(rowIdx - 1);\n const southRowIdx = this.wrapHeight(rowIdx + 1);\n const eastColIdx = this.wrapWidth(colIdx + 1);\n const westColIdx = this.wrapWidth(colIdx - 1);\n const neighbors = [\n // North\n this.state.gridStates[northRowIdx][colIdx],\n // North-east\n this.state.gridStates[northRowIdx][eastColIdx],\n // North-west\n this.state.gridStates[northRowIdx][westColIdx],\n // South\n this.state.gridStates[southRowIdx][colIdx],\n // South-east\n this.state.gridStates[southRowIdx][eastColIdx],\n // South-west\n this.state.gridStates[southRowIdx][westColIdx],\n // East\n this.state.gridStates[rowIdx][eastColIdx],\n // West\n this.state.gridStates[rowIdx][westColIdx]\n ];\n const numLiveNeighbors = _.sum(neighbors);\n const isAlive = this.state.gridStates[rowIdx][colIdx];\n const nextLife = isAlive ? numLiveNeighbors === 2 || numLiveNeighbors === 3 : numLiveNeighbors === 3;\n return Number(nextLife);\n });\n });\n this.setState({gridStates: newGridStates}, () => {\n console.log('updated state');\n setTimeout(this.updateGridStates.bind(this), this.state.iterationSleep);\n });\n }", "function updateData() {\n\t/*\n\t* TODO: Fetch data\n\t*/\n}", "updateData() {\n\t\tdbapi.get('maintenance')\n\t\t\t.then((response) => {\n\t\t\t\tfor (let i = 0; i < response.data.length; i++) {\n\t\t\t\t\tresponse.data[i].start_date_time = new Date(response.data[i].start_date_time);\n\t\t\t\t}\n\t\t\t\tthis.setState({ \n\t\t\t\t\tdata: response.data,\n\t\t\t\t\tfilteredIndexes: [],\n\t\t\t\t\tmachines: Array.from(new Set(response.data.map(a => a.equipment_name))),\n\t\t\t\t});\n\t\t\t\tthis.filterData('general', null);\n\t\t\t})\n\t\t\t.catch((error) => {\n\t\t\t\tconsole.log(\"Error updating data\");\n\t\t\t\tconsole.log(error);\n\t\t\t\tthis.setState({\n\t\t\t\t\tdata: [{ maintenance_id: -1, start_date_time: new Date(), equipment_name: \"ERROR: Please Refresh\" }],\n\t\t\t\t\tfilteredIndexes:[0],\n\t\t\t\t});\n\t\t\t})\n\t}", "function updateData(id,x){\n let identify = {\n id : id\n }\n let getData = new XMLHttpRequest();\n getData.onreadystatechange = function(){\n if (this.readyState == 4 && this.status == 200) {\n rData = JSON.parse(this.responseText)\n if(rData.length < 2 && id == \"tasks\"){\n document.getElementById(id + '-list').innerHTML = `<div class=\"no-data\">There are no ${id} to display :( <br/> Add one Now`\n }\n else{\n if(id == \"tasks\"){\n updateTasks(rData,id)\n }\n else if(id == \"l-priority\"){\n updateLowP()\n }\n else if(id == \"m-priority\"){\n updateMediumP()\n }\n else if(id == \"h-priority\"){\n updateHighP()\n }\n else{\n updateCompTasks()\n }\n }\n /* To update subtasks in real time */\n if(x === true){\n displaySubTask();\n displayComments();\n }\n }\n }\n /* replace https://note-it-keeper.herokuapp.com/ to http://localhost:8000 when running locally */\n getData.open(\"POST\", \"https://note-it-keeper.herokuapp.com/receiveData\", true );\n getData.setRequestHeader(\"Content-Type\",\"application/json; charset=utf-8\");\n getData.send((JSON.stringify(identify)));\n}", "function UpdateTileMap() {\n// set up a dynamic array based on current OPC position to populate the tiles\n\tzoomPosition = [OPC.currentPos -11, OPC.currentPos -10, OPC.currentPos -9, OPC.currentPos -1, OPC.currentPos, OPC.currentPos +1, OPC.currentPos +9, OPC.currentPos +10, OPC.currentPos +11];\n\tswitch(gridZoom) {\n\t\tcase 3: // update the tile map for a 3x3 grid (zoomed in)\n\t\t\tfor(i=0; i < zoomPosition.length; i++) {\n\t\t\t\tswitch(i) {\n\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\tgridValid = Math.floor(zoomPosition[i] / 10) + 1 == Math.floor(zoomPosition[4] / 10)\t\t\t\t\t\t\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\tgridValid = Math.floor(zoomPosition[i] / 10) == Math.floor(zoomPosition[4] / 10)\t\t\t\t\t\t\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 6:\n\t\t\t\t\t\t\tgridValid = Math.floor(zoomPosition[i] / 10) - 1 == Math.floor(zoomPosition[4] / 10)\t\t\t\t\t\t\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\tgridValid = Math.floor(zoomPosition[i] / 10) + 1 == Math.floor(zoomPosition[4] / 10)\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 5:\n\t\t\t\t\t\t\tgridValid = Math.floor(zoomPosition[i] / 10) == Math.floor(zoomPosition[4] / 10)\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 8:\n\t\t\t\t\t\t\tgridValid = Math.floor(zoomPosition[i] / 10) - 1 == Math.floor(zoomPosition[4] / 10)\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tgridValid = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\tif(zoomPosition[i] >= 0 &&\n\t\t\t\t\tzoomPosition[i] < 100 &&\n\t\t\t\t\tgridValid) {\n\t\t\t\t\tif(gridArr[zoomPosition[i]].explored < 1) {\n\t\t\t\t\t\tdocument.getElementById(\"tz\" + i.toString()).style.backgroundColor = \"rgba(255,255,255,1)\";\n\t\t\t\t\t}\n\t\t\t\t\tif(gridArr[zoomPosition[i]].explored > 0) {\n\t\t\t\t\t\tdocument.getElementById(\"tz\" + i.toString()).style.backgroundColor = \"rgba(255,255,255,0)\";\n\t\t\t\t\t}\n\t\t\t\t\tif(i == 4) {\n\t\t\t\t\t\tif(OPC.lightLoc == \"offHand\") {\n\t\t\t\t\t\t\tswitch(OPC.offHand) {\n\t\t\t\t\t\t\t\tcase torch:\n\t\t\t\t\t\t\t\t\tlightLifeBar = OPC.lightLife / 6;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase lantern:\n\t\t\t\t\t\t\t\t\tlightLifeBar = OPC.lightLife / 36;\t\t\t\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\tlightLifeBar = 100;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdocument.getElementById(\"tz\" + i.toString()).style.backgroundColor = \"rgba(255,\" + lightLifeBar * 2.55 + \",0,0.5)\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tdocument.getElementById(\"tz\" + i.toString()).style.backgroundColor = \"rgba(255,255,255,1)\";\n\t\t\t\t}\t\t\n\t\t\t}\n\t\t\tUpdateGraphicsZoomMap();\n\t\t\tUpdateNoteGrid();\n\t\t\tbreak;\n\t\tcase 10: // update the tile map for a 10x10 grid (zoomed out)\n\t\t\tfor(i=0; i < zoomPosition.length; i++) { // clear the 3x3\n//\t\t\t\tdocument.getElementById(\"tz\" + i.toString()).innerHTML = \"\";\n\t\t\t\tdocument.getElementById(\"tz\" + i.toString()).style.backgroundColor = \"rgba(0,0,0,0)\";\n\t\t\t}\n\t\t\tfor(i=0; i<gridArr.length; i++) { // do for the whole map array\n\t\t\t\tdocument.getElementById(\"t\" + i.toString()).innerHTML = \"\"; // clears the letters off the map\n\t\t\t\tif(gridArr[i].open == 1) {\n//\t\t\t\t\tdocument.getElementById(\"t\" + i.toString()).innerHTML = gridArr[i].pathValue;\n//\t\t\t\t\tdocument.getElementById(\"t\" + i.toString()).innerHTML = gridArr[i].explored;\n\t\t\t\t}\n\t\t\t\tif(gridArr[i].room == \"R\") { // tile is a room\n//\t\t\t\t\tdocument.getElementById(\"t\" + i.toString()).innerHTML = \"R\";\n\t\t\t\t}\n\t\t\t\tif(gridArr[i].room == \"SC\") { // tile is a secret chamber\n//\t\t\t\t\tdocument.getElementById(\"t\" + i.toString()).innerHTML = \"SC\";\n\t\t\t\t}\n\t\t\t\tif(gridArr[i].sDoor > 0) { // tile has a secret door\n//\t\t\t\t\tdocument.getElementById(\"t\" + i.toString()).innerHTML = \"D\";\n\t\t\t\t}\n\t\t\t\tif(gridArr[i].encounter == \"combat\") { // tile has a combat encounter\n//\t\t\t\t\tgridName = \"\";\n//\t\t\t\t\tfor(iGN = 0; iGN < gridArr[i].nonPC.name.length; iGN ++) {\n//\t\t\t\t\t\tif(gridArr[i].nonPC.name.charAt(iGN) == gridArr[i].nonPC.name.charAt(iGN).toUpperCase() && // is an upper case letter\n//\t\t\t\t\t\t\tgridArr[i].nonPC.name.charAt(iGN) !== \" \"){ // is not a space\n//\t\t\t\t\t\t\tgridName += gridArr[i].nonPC.name.charAt(iGN);\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\t\t\t\t\tdocument.getElementById(\"t\" + i.toString()).innerHTML = gridName + \" \" + gridArr[i].nonPC.hpCurrent;\n\t\t\t\t}\n\t\t\t\tif(gridArr[i].pathValue !== 0) { // tile has an exit path value\n\t\t\t\t\tdocument.getElementById(\"t\" + i.toString()).innerHTML = gridArr[i].pathValue;\n\t\t\t\t}\t\t\t\t\n\t\t\t\tif(gridArr[i].pathValue == 0) { // tile does not have an exit path value\n\t\t\t\t\tdocument.getElementById(\"t\" + i.toString()).innerHTML = \"\";\n\t\t\t\t}\n\t\t\t\tif(gridArr[i].encounter == \"trap\" && // tile has a trap\n\t\t\t\t\tgridArr[i].trapState == 4) { // trap is in state for (discovered by unsprung)\n//\t\t\t\t\tdocument.getElementById(\"t\" + i.toString()).innerHTML = \"-T-\";\n\t\t\t\t}\n\t\t\t\tif(gridArr[i].explored < 1) { // tile has been explored\n\t\t\t\t\tdocument.getElementById(\"t\" + i.toString()).style.backgroundColor = \"rgba(255,255,255,1)\";\n\t\t\t\t}\n\t\t\t\telse if(gridArr[i].explored > 0) { // tile has not been explored\n\t\t\t\t\tdocument.getElementById(\"t\" + i.toString()).style.backgroundColor = \"rgba(255,255,255,0)\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(OPC.currentPos >= 0) {\n\t\t\t\tif(OPC.lightLoc == \"offHand\") {\n\t\t\t\t\tswitch(OPC.offHand) {\n\t\t\t\t\t\tcase torch:\n\t\t\t\t\t\t\tlightLifeBar = OPC.lightLife / 6;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase lantern:\n\t\t\t\t\t\t\tlightLifeBar = OPC.lightLife / 36;\t\t\t\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tlightLifeBar = 100;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdocument.getElementById(\"t\" + OPC.currentPos.toString()).style.backgroundColor = \"rgba(255,\" + lightLifeBar * 2.55 + \",0,0.5)\";\n\t\t\t}\n\t\t\tbreak;\n\t}\n}", "function updateGrid() {\n for (const gridRef of this.spriteGrid) {\n const playerInPos = playerInGridPosition.call(this, gridRef.gridPos);\n const powerUpInPos = powerUpInGridPosition.call(this, gridRef.gridPos);\n\n if (playerInPos !== null) {\n const playerDef = SNAKE_GAME_CONFIG.playerDefs[playerInPos];\n const playerState = this.playerStates[playerInPos];\n if (playerState.alive) {\n gridRef.sprite.tint = playerDef.colour;\n } else {\n gridRef.sprite.tint = playerDef.deadColour;\n }\n } else if (powerUpInPos) {\n gridRef.sprite.tint = SNAKE_GAME_CONFIG.powerUpColour;\n } else {\n gridRef.sprite.tint = SNAKE_GAME_CONFIG.emptyTileColour;\n }\n }\n}", "changeInterviewStatus(e) {\n let key = parseInt(e.target.id)\n let items = this.state.items\n items[key].interviewing = !items[key].interviewing\n this.setState({\n items: items\n })\n }", "updateWalls(id,wallsIn){\n\t\tfor(let x = 0; x < wallsIn.length;x++){\n\t\t\tthis.props.G.cells[id].walls[x] = wallsIn[x];\n\t\t}\n\t}", "updateVisibleTiles(gameState: GameState) {\n gameState.tiles\n .filter((tile) => tile.isVisible())\n .forEach((tile) => {\n if (tile.isOwnedBy(this.player) && tile.isGeneral()) {\n this.generalLocation = tile.index;\n } else {\n this.notFound.add(tile.index);\n }\n })\n }", "function success(response) {\n console.log(\"update states success\");\n }", "async function updateStatus($items, status){\n\t\t//TODO: Error handling in case Promise rejects\n\t\tawait Promise.all($items.toArray().map(async function(item) {\n\t\t\treturn self.db.updateStatus($(item).attr('id'), status);\n\t\t}));\n\t\tawait self.loadAllItems();\n\t}", "function updateStateAndReturn() {\n let deadplayers = 0;\n \n /* since players are stored in the GameLobby and in the tiles\n we can plock them out and update them right away and remove them from the tiles\n but not from the gamelobby */\n for(let player in GameLobby._availablePlayers){\n // if player is not alive we delete him\n if(!GameLobby._availablePlayers[player].player.isAlive){\n deadplayers ++; // count the dead suvivors\n // the pos of the dead player\n const pos = GameLobby._availablePlayers[player].player.getEntityTilePos();\n // if the players died this round\n if(pos.tileX) {\n /* Create a dead player for dead players */\n const deadplayer = {\n sockid:GameLobby._availablePlayers[player].player.playBy,\n name : player,\n // only need x and y pos of the tiles\n posX : pos.tileX,\n posY : pos.tileY\n }\n //add the player to the died players\n g_tileManager.__Deadplayers.push(deadplayer);\n // remove the player from the container\n g_tileManager.__tiles[pos.tileX][pos.tileY].removeEntity(pos.spatialPos);\n GameLobby._availablePlayers[player].player.updateEntityTilePos(null,null,null);\n }\n }\n }\n \n /* this loop just every entity that is dead and is only stored in the tiles\n if you remove these types of entities they will be collected by the garbage colloector\n there are no other instances of them outside the tilemanager */\n for(let i = 0; i < g_tileManager.__tiles.length; i++) {\n for(let j=0; j < g_tileManager.__tiles.length; j++) {\n g_tileManager.__tiles[i][j].update();\n }\n }\n\n /* check if the game is over */\n\n // if players have collected all the keys they win\n if(g_tileManager.__objPickedUp === 3) {\n g_tileManager.__gameWon.players = true;\n }\n\n // if all players died then the monster won\n if(deadplayers === 2) {\n g_tileManager.__gameWon.monster = true;\n }\n \n // return the map to the clients for rendering\n return g_tileManager;\n}", "update(object) {\n for (const prop in object){\n this.state[prop] = object[prop];\n }\n //change has been made to data so call handler\n this.fire();\n\n }", "update(object) {\n for (const prop in object){\n this.state[prop] = object[prop];\n }\n //change has been made to data so call handler\n this.fire();\n\n }", "function clickMaster(id){\n var k = document.getElementById(id);\n computeCurrentId(id);\n\n if(arrayData.state===0){\n for(var i=0;i<arrayData.tileIdArray.length;i++){\n if(i!=arrayData.currentTile){\n arrayData.tileIdArray[i].style.backgroundImage = \"url('img/grass.jpg')\"\n }\n \n }\n\n if(arrayData.currentImageTile===0){\n k.style.backgroundImage = \"url('img/tile_90_0.jpg')\";\n arrayData.currentImageTile++;\n }else if(arrayData.currentImageTile===1){\n k.style.backgroundImage = \"url('img/tile_90_1.jpg')\";\n arrayData.currentImageTile++;\n }else if(arrayData.currentImageTile===2){\n k.style.backgroundImage = \"url('img/tile_90_2.jpg')\";\n arrayData.currentImageTile++;\n }else if(arrayData.currentImageTile===3){\n k.style.backgroundImage = \"url('img/tile_90_3.jpg')\";\n arrayData.currentImageTile=0;\n }\n\n\n\n\n }\n \n }", "updateData(updates) {\n let current = this.head\n\n while (current) {\n if (current.data.status === STATUS_INPROGRESS) {\n current.data.status = updates.status\n if (current.next) {\n current = current.next\n current.data.status = STATUS_INPROGRESS\n }\n return\n }\n current = current.next\n }\n }", "refresh() {\n this.stateCounter(this.stateCounter() + 1);\n }", "function updateMap() {\n\t\t\tid = trail_select.value;\n\t\t\tconsole.log(id);\n\t\t\tvar newlayer = layer.getLayer(id);\n\t\t\tnewlayer.removeFrom(map);\n\t\t\tnewlayer.setStyle({\n\t\t\t\t\tweight: 5,\n\t\t\t\t\tcolor: '#00ff00',\n\t\t\t\t\topacity: 1.0\n\t\t\t});\n\t\t\tnewlayer.addTo(map)\n\t\t\tvar prevlayer = layer.getLayer(previd);\n\t\t\tif (previd !== id) {\n\t\t\t\tprevlayer.setStyle({\n\t\t\t\t\tcolor: '#ff7800',\n\t\t\t\t\topacity: 1.0,\n\t\t\t\t\tweight: (prevlayer.feature.properties.annual*0.17)**4\n\t\t\t\t});\n\t\t\t\tprevlayer.addTo(map);\n\t\t\t\tprevid = id;\n\t\t\t}\n\t\t}", "handleUpdateBox(id, title) {\n this.setState({updatedId: id, updatedTitle: title});\n }", "updatePendingStatus(txCount, block, hash){\n // pending status for spiner\n this.props.pending(true, txCount+1)\n // pending status for DB\n setPending(this.props.smartFundAddress, 1, this.props.accounts[0], block, hash, \"Withdraw\")\n // close modal\n this.modalClose()\n }", "changeStatusEdit(state) {\n state.statusEditData = !this.state.statusEditData\n }", "updateStatus () {\n // make sure Sprite in world..\n let alY = Math.cos(this.direction*Math.PI/180) * this.speed * 0.001,\n lat = this.lat + alY;\n if (lat > 84 || lat < -84) {\n alY = -alY;\n this.direction += 180;\n console.warn(\"latitude out of bbox, turn back..\");\n }\n this.lon += Math.sin(this.direction*Math.PI/180) * this.speed * 0.001;\n this.lat += alY;\n // updateStatusView. toDO in maintask.js\n }" ]
[ "0.6142494", "0.57734376", "0.5750621", "0.57186747", "0.5547951", "0.5534367", "0.55251896", "0.5505066", "0.5447544", "0.5415714", "0.5391554", "0.5390321", "0.53763944", "0.5337144", "0.5305733", "0.53017634", "0.5288924", "0.52837616", "0.5274543", "0.5256012", "0.5255083", "0.52366173", "0.52255845", "0.521592", "0.52099764", "0.5208341", "0.51814044", "0.5178459", "0.51762646", "0.51729923", "0.51703", "0.5165653", "0.51484245", "0.51477623", "0.5146309", "0.5143953", "0.51407343", "0.5138449", "0.5126153", "0.51181996", "0.511813", "0.51145893", "0.5112699", "0.5107745", "0.5106102", "0.51054245", "0.5102869", "0.510252", "0.50994575", "0.50964063", "0.5095017", "0.5093576", "0.50847304", "0.50832033", "0.5078291", "0.5067303", "0.5066361", "0.50642425", "0.50638086", "0.5051391", "0.5051308", "0.50505084", "0.5038796", "0.5036533", "0.50356597", "0.50304615", "0.50251436", "0.50221264", "0.50175303", "0.50171953", "0.5013988", "0.5011862", "0.50084174", "0.5004636", "0.49936447", "0.4991614", "0.4990836", "0.4977983", "0.4974812", "0.4958415", "0.49574864", "0.49562195", "0.49516508", "0.49486256", "0.49483436", "0.4946892", "0.49468145", "0.49429077", "0.4941159", "0.49402955", "0.49361184", "0.49361184", "0.4931371", "0.49283224", "0.49206218", "0.49198794", "0.49194127", "0.49159315", "0.49158052", "0.4915055" ]
0.84763926
0
This method is to handle the click of tiles. Based on the state of game, the new state will be generated here.
handleClick(id) { //taking the state object in another variable let data = this.state.tileData; //Getting the currently active tiles let currentActive = _.filter(data, {'status': 'active'}) //To prevent actions during delay if (currentActive.length < 2) { //For matched tiles nothing is to be done if (data[id]['status'] != 'complete') { //Finding the active tile index/key let activeKey = _.findKey(data, {'status': 'active'}) //Clicking on currently active tile again if (activeKey != id) { //If this is the second active tile check for next scenario i.e match or not if (activeKey != undefined) { //For match condition if (data[activeKey]['letter'] == data[id]['letter']) { this.updateTiles(data, [activeKey, id], 'complete', true) } else { //For not match condition //First show the selected tiles as active this.updateTiles(data, [id], 'active', true) //Update state after the delay setTimeout(() => { this.updateTiles(data, [activeKey, id], 'hide') }, 1000); } } else { //For first active tile update the state with active this.updateTiles(data, [id], 'active', true) } } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tileClick() {\n\tvar position = parseInt(this.dataset.position);\n\tif (board.isValidMove(position)) {\n\t\tboard.placeTile(current, position);\n\t\tthis.getElementsByClassName('tile-image')[0].src = current.img;\n\t\tif (board.isWinningState(current, position)) {\n\t\t\tend(current);\n\t\t} else if (board.isTie()) {\n\t\t\tend(current, true);\n\t\t} else {\n\t\t\tswitchCurrentPlayer();\n\t\t\tif (current.constructor.name === 'ComputerPlayer') {\n\t\t\t\tcomputerMove();\n\t\t\t}\n\t\t}\n\t}\n}", "function tileClick() {\n\tmoveOneTile(this);\n}", "handleTileClick(position) {\n const { gameState } = this.state;\n const openTiles = this.getNumberOfOpenTiles();\n if (openTiles != 2) { // disables clicks when two tiles are open\n this.channel.push(\"tileClicked\", {position: position}).receive(\"ok\", response => {\n this.setState({\n gameState: response.game.gameState,\n clicks: response.game.clicks\n }, this.showTileBeforeHiding);\n });\n }\n }", "function onMouseDown(e) {\n \n // Get the mouse position\n var pos = getMousePos(mycanvas, e);\n \n // Start dragging\n if (!drag) {\n \n // Get the tile under the mouse\n mt = getMouseTile(pos);\n \n if (mt.valid) {\n \n // Valid tile\n var swapped = false;\n if (level.selectedtile.selected) {\n \n if (mt.x == level.selectedtile.column && mt.y == level.selectedtile.row) {\n // Same tile selected, deselect\n \n level.selectedtile.selected = false;\n drag = true;\n return;\n } else if (canSwap(mt.x, mt.y, level.selectedtile.column, level.selectedtile.row)){\n // Tiles can be swapped, swap the tiles\n \n mouseSwap(mt.x, mt.y, level.selectedtile.column, level.selectedtile.row);\n swapped = true;\n }\n }\n \n if (!swapped) {\n \n // Set the new selected tile\n level.selectedtile.column = mt.x;\n level.selectedtile.row = mt.y;\n level.selectedtile.selected = true;\n }\n } else {\n \n // Invalid tile\n level.selectedtile.selected = false;\n }\n \n // Start dragging\n drag = true;\n }\n \n // Check if a button was clicked\n// for (var i=0; i<buttons.length; i++) {\n// if (pos.x >= buttons[i].x && pos.x < buttons[i].x+buttons[i].width &&\n// pos.y >= buttons[i].y && pos.y < buttons[i].y+buttons[i].height) {\n// \n// // Button i was clicked\n// if (i == 0) {\n// // New Game\n// newGame();\n// } else if (i == 1) {\n// // Show Moves\n// showmoves = !showmoves;\n// buttons[i].text = (showmoves?\"Hide\":\"Show\") + \" Moves\";\n// } else if (i == 2) {\n// // AI Bot\n// aibot = !aibot;\n// buttons[i].text = (aibot?\"Disable\":\"Enable\") + \" AI Bot\";\n// }\n// }\n// }\n }", "function openTile(chosenTile){\n if ($(document.getElementById(chosenTile)).hasClass('clicked')) {\n return\n }\n else{\n if ($(document.getElementById(chosenTile)).hasClass('hidden')) {\n $(document.getElementById(chosenTile)).removeClass('hidden'); \n $(document.getElementById(chosenTile)).addClass('clicked');\n }\n }\n selectionCount++;\n storeTileContent(chosenTile);\n }", "handleClick(i) {\n\n // set the clicky tile values and score\n let values = this.state.clickyValues;\n let score = this.state.score;\n\n // if the clicky tile that was clicked has been clicked before...\n // its game over\n if (values[i].clicked === true) {\n\n alert(\"You Lose!\");\n\n // after the losing the game, the score is reset...\n // as well as the \"clicked\" boolean on every tile\n score = 0;\n for (let j = 0; j < values.length; j++) {\n values[j].clicked = false;\n }\n\n // implement the reset values to the body's state\n this.setState({\n values: values,\n score: score\n });\n\n return;\n\n }\n\n // if the clicky tile that was clicked had not been...\n // clicked already, mark it as clicked, and up the score\n values[i].clicked = true;\n score++;\n\n // if the score is 12 or greater, that means...\n // every tile has been clicked once, and no tiles have been clicked twice.\n // this is the game's win condition\n if (score >= 12) {\n\n alert(\"You Win!\");\n\n // after the winning the game, the score is reset...\n // as well as the \"clicked\" boolean on every tile\n score = 0;\n for (let j = 0; j < values.length; j++) {\n values[j].clicked = false;\n }\n\n // implement the reset values to the body's state\n this.setState({\n values: values,\n score: score\n });\n\n return;\n\n }\n\n // If the game has not been won or lost yet...\n // we must shuffle the tiles after a tile has been clicked\n\n // Create a handful of values for a shuffe procedure \n let currentIndex = values.length, temporaryValue, randomIndex;\n\n // While there remain elements to shuffle...\n while (0 !== currentIndex) {\n\n // Pick a remaining element...\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex -= 1;\n\n // And swap it with the current element.\n temporaryValue = values[currentIndex];\n values[currentIndex] = values[randomIndex];\n values[randomIndex] = temporaryValue;\n }\n\n // implement the shuffled values to the body's state\n this.setState({\n values: values,\n score: score\n });\n\n\n }", "function tileClicked(e){\n // check if the tile can move to the empty spot\n // if the tile can move, move the tile to the empty spot\n\n\tvar curr_tile = e.target; // setting the curr_tile to the tile that has been clicked\n\t\n\tvar curr_row = curr_tile.row; // setting the curr_row to the row of the tile clicked\n\tvar curr_col = curr_tile.col; //setting the curr_col to the column of the tile clicked\n\t\n\t/*\n\t* check the tile in the row before the tile clicked , if the tile from the row before it is the empty one , we move the tile \n\t* to the position of the empty tile, and set the empty tile to the position where the curr_tile was\n\t*/\n\tif( ! (curr_row - 1 < 0 )) // checking if the row number is valid and didnt exceed the boundaries\n\t{\n\t\tif(tile_array[curr_row-1][curr_col] == 0) //check if the item before the tile clicked is the empty tile\n\t\t{\n\t\t\tvar temp1 = tile_array[curr_row][curr_col]; // save the div currently clicked into the temp variable\n\t\t\ttile_array[curr_row][curr_col] = 0; // set the current tile position to the empty tile\n\t\t\tcurr_tile.row = curr_row - 1; // setting the tile new row\n\t\t\tcurr_tile.col = curr_col; // setting the tile new col\n\t\t\ttile_array[curr_tile.row][curr_tile.col] = temp1; //saving the div in the new position\n\t\t\tcurr_tile.style.left = curr_tile.col * _tile_width+\"px\"; //setting the left position for the tile \n\t\t\tcurr_tile.style.top = curr_tile.row * _tile_height+\"px\"; //setting the top position for the tile\n\t\t\t\n\t\t}\n\t}\n\t\n\n\t/*\n\t* check the tile in the row after the tile clicked , if the tile from the row after it is the empty one , we move the tile \n\t* to the position of the empty tile, and set the empty tile to the position where the curr_tile was\n\t*/\n\t\n\tif(!(curr_row + 1 > _num_rows - 1)) // checking if the row number is valid and didnt exceed the boundaries\n\t{\n\t\tif(tile_array[curr_row + 1][curr_col] == 0) //check if the item after the tile clicked is the empty tile\n\t\t{\n\t\t\t\tvar temp2 = tile_array[curr_row][curr_col]; // save the div currently clicked into the temp variable\n\t\t\t\ttile_array[curr_row][curr_col] = 0; // set the current tile position to the empty tile\n\t\t\t\tcurr_tile.row = curr_row + 1; // setting the tile new row\n\t\t\t\tcurr_tile.col = curr_col; // setting the tile new col\n\t\t\t\ttile_array[curr_tile.row][curr_tile.col] = temp2; //saving the div in the new position\n\t\t\t\tcurr_tile.style.left = curr_tile.col * _tile_width+\"px\"; //setting the left position for the tile \n\t\t\t\tcurr_tile.style.top = curr_tile.row * _tile_height+\"px\"; //setting the top position for the tile\n\t\t}\n\t\n\t}\n\t\n\t\t/*\n\t\t* check the tile in the column before the tile clicked , if the tile from the row before it is the empty one \n\t\t* , we move the tile to the position of the empty tile, and set the empty tile to the position where the curr_tile was\n\t\t*/\n\n\t\tif(!(curr_col - 1 < 0))\n\t\t{\n\t\t\tif(tile_array[curr_row][curr_col-1] == 0)\n\t\t\t{\n\t\t\t\tvar temp3 = tile_array[curr_row][curr_col];\n\t\t\t\ttile_array[curr_row][curr_col] = 0;\n\t\t\t\tcurr_tile.col = curr_col - 1;\n\t\t\t\tcurr_tile.row = curr_row;\n\t\t\t\ttile_array[curr_tile.row][curr_tile.col] = temp3;\n\t\t\t\tcurr_tile.style.left = curr_tile.col * _tile_width+\"px\";\n\t\t\t\tcurr_tile.style.top = curr_tile.row * _tile_height+\"px\";\n\t\t\t}\n\t\t}\n\t\t\n\t\n\t\t\tif(!(curr_col + 1 > _num_cols))\n\t\t\t{\n\t\t\t\tif(tile_array[curr_row][curr_col+1] == 0)\n\t\t\t\t{\n\t\t\t\t\tvar temp4 = tile_array[curr_row][curr_col];\n\t\t\t\t\ttile_array[curr_row][curr_col] = 0;\n\t\t\t\t\tcurr_tile.col = curr_col+1;\n\t\t\t\t\tcurr_tile.row = curr_row;\n\t\t\t\t\ttile_array[curr_tile.row][curr_tile.col] = temp4;\n\t\t\t\t\tcurr_tile.style.left = curr_tile.col * _tile_width+\"px\";\n\t\t\t\t\tcurr_tile.style.top = curr_tile.row * _tile_height+\"px\";\n\t\t\t\t}\n\t\t\t}\n\t\n\t\n}", "clickTile(row, col, button){\n //If left mouse button\n if (button == 0){\n if(this.grid[row][col].isBomb && !this.grid[row][col].isFlagged){\n this.grid[row][col].isTrigger = true;\n this.gameOver = true;\n this.drawSmiley(this.smileyCtx, 'dead')\n }\n this.revealTile(row, col);\n\n } else if(button == 2 && !this.grid[row][col].isRevealed){\n this.flagTile(row,col);\n\n }\n if (this.gameWon()){\n this.gameOver = true;\n this.draw();\n this.drawSmiley(this.smileyCtx, 'shades');\n return true;\n }\n this.draw();\n this.drawBombsLeft();\n return false;\n }", "function handleClick() {\n let indexOfTheTileClicked = parseInt(this.id);\n\n console.log({ indexOfTheTileClicked, indexOfBlankTile })\n console.log({\n \"+1\": indexOfTheTileClicked + 1,\n \"-1\": indexOfTheTileClicked - 1,\n \"+4\": indexOfTheTileClicked + 4,\n \"-4\": indexOfTheTileClicked - 4\n })\n\n function swapTiles() {\n // Swap the blank tile with the selected tile\n console.log(\"before\", tiles)\n let tileClicked = tiles[indexOfTheTileClicked]\n tiles[indexOfTheTileClicked] = tiles[indexOfBlankTile];\n tiles[indexOfBlankTile] = tileClicked;\n indexOfBlankTile = indexOfTheTileClicked;\n console.log(\"after\", tiles)\n // Redraw the board based off the updated array\n drawTiles();\n }\n\n // If the tile clicked is either 1 or 4 spots away from the blank tile in the array, swap tiles\n if ((indexOfTheTileClicked % 4) == 1 ||\n (indexOfTheTileClicked % 4) == 2) {\n console.log('in first if')\n if (indexOfTheTileClicked - 1 == indexOfBlankTile ||\n indexOfTheTileClicked + 1 == indexOfBlankTile ||\n indexOfTheTileClicked - 4 == indexOfBlankTile ||\n indexOfTheTileClicked + 4 == indexOfBlankTile) {\n\n swapTiles();\n }\n }\n if (((indexOfTheTileClicked + 1) % 4) == 0) {\n console.log('in first if')\n if (indexOfTheTileClicked - 1 == indexOfBlankTile ||\n indexOfTheTileClicked - 4 == indexOfBlankTile ||\n indexOfTheTileClicked + 4 == indexOfBlankTile) {\n\n\n swapTiles();\n }\n }\n if ((indexOfTheTileClicked % 4) == 0) {\n console.log('in second if')\n if (indexOfTheTileClicked + 1 == indexOfBlankTile ||\n indexOfTheTileClicked + 4 == indexOfBlankTile ||\n indexOfTheTileClicked - 4 == indexOfBlankTile) {\n\n swapTiles();\n }\n }\n}", "isClicked({ id, value, moves }) {\n let Tiles = this.state.Tiles\n let Clicks = this.state.Clicks\n for (let j = 0; j < moves.length; j++) { //loops through random moves \n if (Tiles[moves[j]].value === 0) { //if 0 is in random moves\n Tiles[id].value = Tiles[moves[j]].value // swap tile values\n Tiles[moves[j]].value = value\n Clicks++\n this.checkWin()\n }\n }\n this.setState({\n Tiles,\n Clicks\n })\n }", "function onMouseDown(e) {\n // Get the mouse position\n var pos = getMousePos(canvas, e);\n \n // Start dragging\n if (!drag) {\n // Get the tile under the mouse\n mt = getMouseTile(pos);\n \n if (mt.valid) {\n // Valid tile\n var swapped = false;\n if (level.selectedtile.selected) {\n if (mt.x == level.selectedtile.column && mt.y == level.selectedtile.row) {\n // Same tile selected, deselect\n level.selectedtile.selected = false;\n drag = true;\n return;\n } else if (canSwap(mt.x, mt.y, level.selectedtile.column, level.selectedtile.row)){\n // Tiles can be swapped, swap the tiles\n mouseSwap(mt.x, mt.y, level.selectedtile.column, level.selectedtile.row);\n swapped = true;\n }\n }\n \n if (!swapped) {\n // Set the new selected tile\n level.selectedtile.column = mt.x;\n level.selectedtile.row = mt.y;\n level.selectedtile.selected = true;\n }\n } else {\n // Invalid tile\n level.selectedtile.selected = false;\n }\n\n // Start dragging\n drag = true;\n }\n \n // Check if a button was clicked\n for (var i=0; i<buttons.length; i++) {\n if (pos.x >= buttons[i].x && pos.x < buttons[i].x+buttons[i].width &&\n pos.y >= buttons[i].y && pos.y < buttons[i].y+buttons[i].height) {\n \n // Button i was clicked\n if (i == 0) {\n // New Game\n newGame();\n } else if (i == 1) {\n // Show Moves\n showmoves = !showmoves;\n buttons[i].text = (showmoves?\"Hide\":\"Show\") + \" Moves\";\n } else if (i == 2) {\n // AI Bot\n aibot = !aibot;\n buttons[i].text = (aibot?\"Disable\":\"Enable\") + \" AI Bot\";\n }\n }\n }\n }", "function onMouseDown(e) {\n // Get the mouse position\n var pos = getMousePos(canvas, e);\n \n // Start dragging\n if (!drag) {\n // Get the tile under the mouse\n mt = getMouseTile(pos);\n \n if (mt.valid) {\n // Valid tile\n var swapped = false;\n if (level.selectedtile.selected) {\n if (mt.x == level.selectedtile.column && mt.y == level.selectedtile.row) {\n // Same tile selected, deselect\n level.selectedtile.selected = false;\n drag = true;\n return;\n } else if (canSwap(mt.x, mt.y, level.selectedtile.column, level.selectedtile.row)){\n // Tiles can be swapped, swap the tiles\n mouseSwap(mt.x, mt.y, level.selectedtile.column, level.selectedtile.row);\n swapped = true;\n }\n }\n \n if (!swapped) {\n // Set the new selected tile\n level.selectedtile.column = mt.x;\n level.selectedtile.row = mt.y;\n level.selectedtile.selected = true;\n }\n } else {\n // Invalid tile\n level.selectedtile.selected = false;\n }\n\n // Start dragging\n drag = true;\n }\n \n // Check if a button was clicked\n for (var i=0; i<buttons.length; i++) {\n if (pos.x >= buttons[i].x && pos.x < buttons[i].x+buttons[i].width &&\n pos.y >= buttons[i].y && pos.y < buttons[i].y+buttons[i].height) {\n \n // Button i was clicked\n if (i == 0) {\n // New Game\n newGame();\n } else if (i == 1) {\n // Show Moves\n showmoves = !showmoves;\n buttons[i].text = (showmoves?\"Hide\":\"Show\") + \" Moves\";\n } else if (i == 2) {\n // AI Bot\n aibot = !aibot;\n buttons[i].text = (aibot?\"Disable\":\"Enable\") + \" AI Bot\";\n }\n }\n }\n }", "function storeState(){\n\tvar tile_1 = CLICKED_TILE_1;\n\tvar tile_2 = CLICKED_TILE_2;\n\tvar pair_tile = new pairTiles(tile_1,tile_2);\n\tstack.push(pair_tile);\n\t//window.alert(\"STORE_STATE Tile1 == \"+pair_tile.tile_1.value.toString()+\" Tile2 == \"+pair_tile.tile_2.value.toString());\n\t//window.alert(\"Coord = \"+pair_tile.tile_1.coord.x+\" , \"+pair_tile.tile_1.coord.y);\n}", "buttonClick(event, type) {\n let self = this;\n if (self.stateService.statusRunning) { // if running disallow interaction with the board\n return false;\n } else if (type === 'go' && self.stateService.statusStart && self.stateService.statusEnd) { // if it's the go button and there are start and end tiles on the board\n self.stateService.statusRunning = true;\n self.stateService.currentSelectedTile = self.stateService.statusStart; // set the currently selected tile to the start tile\n self.stateService.statusPath.push(self.stateService.currentSelectedTile); // mark x,y as part of solution path\n self.setPathClass(self.stateService.currentSelectedTile);\n self.setClass(document.getElementById('go-button'), 'active');\n self.stateService.startTime = moment().format('HH:mm:ss.SSS');\n self.loopDir();// run calculation\n } else { // if start or end buttons\n let otherType = type === 'start' ? 'end' : 'start';\n let buttonFlag = `${type}ButtonFlag`;\n let otherButtonFlag = `${otherType}ButtonFlag`;\n let otherButton = document.getElementById(otherType + '-button');\n let button = event.srcElement;\n \n if (self.stateService[buttonFlag] === true) { // if already clicked\n self.unsetClass(button, 'active');\n } else { // if not clicked\n self.setClass(button, 'active');\n self.unsetClass(otherButton, 'active');\n self.stateService[otherButtonFlag] = false; // reset the other button\n }\n \n self.stateService.currentSelectedTile = null; // set the currently selected tile\n self.stateService[buttonFlag] = !self.stateService[buttonFlag];\n }\n \n }", "function mouseClicked(){\n //User clicks to advance the introduction\n if (state === `title`) {\n introState += 1;\n if (introState === 5) {\n state = `simulation`;\n }\n }\n //If user wins, click to restart\n else if (state === `win`) {\n gameStarted = false;\n score = 0;\n timer = 60;\n ant.x = floor(random(0, tileBlue.columns))* tileBlue.size + tileBlue.size/2; //random x position inside the tiles\n ant.y = floor(random(0,tileBlue.rows))* tileBlue.size + tileBlue.size/2; // random y position\n state = 'simulation';\n introState = 0;\n }\n //If user loses, click to restart\n else if (state === `lose`) {\n gameStarted = false;\n score = 0;\n timer = 60;\n ant.x = floor(random(0, tileBlue.columns))* tileBlue.size + tileBlue.size/2; //random x position inside the tiles\n ant.y = floor(random(0,tileBlue.rows))* tileBlue.size + tileBlue.size/2; // random y position\n state = 'title';\n introState = 0;\n }\n}", "handleClick(tileId) {\n\t\tif (this.state.status[parseInt(tileId)] || this.timerId != null)\n\t\t\treturn;\n\n this.channel.push(\"guess\", { \"tileId\": tileId, \"game\": this.state})\n\t\t\t.receive(\"ok\", this.onUpdate.bind(this))\n\t\t\t.receive(\"completed\", this.onUpdate.bind(this));\n\t}", "constructor(props) {\n super(props);\n //Generating tiles data and initializing tile properties\n //{0:{letter:'D',status:'hide',count:0},1:{...},....}\n let tilesGenerated = this.getInitialTiles()\n this.state = {tileData: tilesGenerated};\n // Attribution http://ccs.neu.edu/home/ntuck/courses/2019/09/cs5610/notes/05-react/\n this.handleClick = this.handleClick.bind(this);\n }", "function mouseClicked() {\r\n if (game.state === 0) {\r\n for (i = 0; i < length; i++) {\r\n for (j = 0; j < length; j++) {\r\n if (i === floor(map(mouseX, 0, width, 0, length))) {\r\n if (j === floor(map(mouseY, 0, height, 0, length))) {\r\n if (turn === state.X) {\r\n board[i][j] = state.X;\r\n turn = state.O;\r\n } \r\n else {\r\n if (turn === state.O) {\r\n board[i][j] = state.O;\r\n turn = state.X;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}", "clickableAction(tile){\r\n if(this.claimTerritoryPhase === true){\r\n this.handleClaimTerritoryPhase(tile);\r\n } else if(this.initialPlacementPhase === true){\r\n this.handleInitialPlacementPhase(tile);\r\n } else if(this.placementPhase === true){\r\n // console.log(\"in placement phase\")\r\n this.handlePlacementPhase(tile);\r\n } else if(this.battlePhase === true){\r\n // console.log(\"in battle phase\")\r\n this.handleBattlePhase(tile);\r\n } else if (this.fortifyPhase === true){\r\n this.handleFortifyPhase(tile);\r\n }\r\n this.updateInfoDisplay();\r\n }", "click(x, y) {\n\t\tvar click1 = this.state.click1;\n\t\tvar click2 = this.state.click2;\n\n\t\t// If both click states are already occupied, we are in the post-click delay, do nothing\n\t\tif (click1 != null && click2 != null) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// If this is the first click\n\t\tif (click1 === null) {\n\t\t\t// Update the state to reflect the first click\n\t\t\tvar newState = _.extend(this.state, {turns: this.state.turns + 1, click1: [x,y], click2: null});\n\t\t\tthis.setState(newState);\n\t\t}\n\t\t// If this is the second click\n\t\telse {\n\t\t\t// Compare the values of the two clicked tiles\n\t\t\tvar first_click = this.state.click1;\n\t\t\tvar x1 = Number(first_click[0]);\n\t\t\tvar y1 = Number(first_click[1]);\n\t\t\tvar val1 = String(this.state.values[x1][y1]);\n\t\t\tvar val2 = String(this.state.values[x][y]);\n\t\t\tvar solved = this.state.solved\n\t\t\tvar match = false;\n\n\t\t\t// If match\n\t\t\tif (val1 == val2) {\n\t\t\t\t// Add value of match to solved\n\t\t\t\tsolved.push(val1);\n\n\t\t\t\t// Update the state to reflect the match\n\t\t\t\tvar newState = _.extend(this.state, {solved: solved, turns: this.state.turns + 1, click1: null, click2: null});\n\t\t\t\tthis.setState(newState);\n\t\t\t}\n\t\t\t// If not a match, give the player one second before hiding values again\n\t\t\telse {\n\t\t\t\t// Update the state to reflect the second click\n\t\t\t\tvar newState = _.extend(this.state, {turns: this.state.turns + 1, click2: [x,y]});\n\t\t\t\tthis.setState(newState);\n\n\t\t\t\t// Reset the clicks on screen after 1.5 seconds\n\t\t\t\tvar reset = this.resetClicks.bind(this);\n\t\t\t\tsetTimeout(function(){reset()}, 1500);\n\t\t\t}\n\t\t}\n\t}", "handleClick(e) {\n console.log(this.props.tile);\n if (e.altKey) {\n this.props.updateGame(this.props.tile, true);\n } else {\n this.props.updateGame(this.props.tile, false);\n }\n }", "function newGame(e) {\n e.preventDefault()\n const newTiles = createTileData()\n setTiles(newTiles)\n setAlive(true)\n console.log(newTiles)\n }", "handleClick() {\n if (this.hide)\n return;\n // clicking hide on the toolbar should hide the toolbar\n let r = 0;\n if (dist(mouseX, mouseY, width - this.tileW + (this.tileW / 2), height - (this.tileH / 2)) < this.tileW / 2) {\n this.hide = true;\n this.exportMapToText();\n return;\n }\n // check which tile was clicked\n for (let i = 0; i < this.tiles.length; i++) {\n let x = i * this.tileW + i;\n let y = height - this.tileH;\n let w = this.tileW;\n let h = this.tileH;\n if ((mouseX + r > x) && (mouseX - r < x + w) && (mouseY + r > y) && (mouseY - r < y + h)) {\n // tile to paint with is the clicked tile\n this.selected = this.tiles[i].name;\n return;\n }\n }\n // toolbar element was not clicked, try to draw\n this.handleDrag();\n }", "function clickEvent(event){\n let id = event.target.id;\n let item = document.getElementById(id);\n if(event.target.className === \"tile\"){\n console.log(`Tile ${id} was clicked`);\n //Updates the board for the 'X' player\n if(counter%2 === 0 && counter !== 9){\n let val = 'x';\n score.querySelector('h2').innerText = ('Player 2 turn.');\n if(id<=2){\n gameBoard[0][id] = val;\n updateBoard(item, val, id);\n counter++;\n }else if(id>2 && id<=5){\n gameBoard[1][id-3] = val;\n updateBoard(item, val, id);\n counter++;\n }else if(id>5 && id<=8){\n gameBoard[2][id-6] = val;\n updateBoard(item, val, id);\n counter++;\n }//Updates the board for the 'o', player\n }else if(counter%2 !== 0 && counter !== 9){\n let val = 'o';\n score.querySelector('h2').innerText = ('Player 1 turn.');\n if(id<=2){\n gameBoard[0][id] = val;\n updateBoard(item, val, id);\n counter++;\n }else if(id>2 && id<=5){\n gameBoard[1][id-3] = val;\n updateBoard(item, val, id);\n counter++;\n }else if(id>5 && id<=8){\n gameBoard[2][id-6] = val;\n updateBoard(item, val, id);\n counter++;\n }\n }//Ends the game if board gets full \n if(counter === 9){\n score.querySelector('h2').innerText = (`Game is a tie no more moves available`);\n checkScore();\n document.querySelector('.menu').style.display = \"block\";\n }\n }else { //If player picks a tile thats already chosen\n score.querySelector('h2').innerText = (`That tile is already selected! ${counter%2 === 0 ? 'Player 1' : 'Player 2'} pick another tile!`);\n }\n}", "render() {\n\n const {clicked, name, imgUrl} = this.state; // destructuring\n return (\n // creates a 'tile' with a click event that triggers the scoreUpdate function (from App.js)\n <div className=\"tile\" onClick={() => this.props.scoreUpdate(name, clicked)} >\n\n <img src={imgUrl} alt={name} className=\"tile-img\" />\n\n </div>\n );\n }", "function clicked(e) {\n // If the state is 1 then a score is added\n if(e.target.getAttribute('state') == 1) {\n info.score++;\n // Disable container\n e.target.setAttribute('state', 3);\n }\n // If the state is 2 reduce the lives\n else if(e.target.getAttribute('state') == 2) {\n info.lives--;\n // Disable the container\n e.target.setAttribute('state', 3);\n }\n else {\n //Not clickable\n }\n // Recalculate the level based on the aquired score\n info.level = ((info.score/50) | 0) + 1;\n // If all lives are lost the game finishes\n if(info.lives == 0) {\n updateGraphics();\n setTimeout(gameOver, 100);\n }\n // Update the graphics\n updateGraphics();\n}", "createGameBoard() {\n function tileClickHandler() {\n let row, col;\n \n row = game.getRowFromTile(this.id);\n col = game.getColFromTile(this.id);\n\n //If is not your turn\n if (!player.getCurrentTurn() || !game) {\n alert('Its not your turn!');\n return;\n }\n\n //In gomoku first move for blacks have to be in the middle tile\n if(game.moves == 0 && !(row == 7 && col == 7)){\n alert('You have to put pawn in the middle of grid!');\n return;\n }\n //In gomoku second move for blacks have to be beyond 5x5 grid in the middle\n else if(game.moves == 2 && (row >= 5 && row <= 9 && col >= 5 && col <= 9)){\n alert('You have to put pawn beyond 5x5 grid in the middle!');\n return;\n }\n //If tile has been already played\n else{\n if ($(this).prop('disabled')) {\n alert('This tile has already been played on!');\n return;\n }\n\n //Update board after player turn.\n game.playTurn(this);\n game.updateBoard(player.getPlayerColor(), row, col, this.id);\n\n //Check if player win\n game.checkWinner();\n \n player.setCurrentTurn(false);\n }\n } \n $('#color').css(\"background-color\", `${player.getPlayerColor()}`);\n game.createTiles(tileClickHandler);\n if(player.getPlayerColor() != \"white\" && this.moves == 0){\n game.setTimer();\n }else{\n $(\".center\").prop(`disabled`, true);\n }\n }", "function handleClick(target){\r\n\r\n busy = true;\r\n\r\n // lets use the same abbr as previously\r\n r = target.r;\r\n c = target.c;\r\n t = target._animation.name;\r\n\r\n createShards(r,c,t);\r\n\r\n // change levelarray to reflect the coming change (dont remove anything. that will destroy your array logic)\r\n a = r;\r\n while(a > 0){\r\n levelArray[a][c] = levelArray[a - 1][c];\r\n levelArray[a][c].r = levelArray[a][c].r + 1;\r\n a --;\r\n }\r\n\r\n // insert a new tile in the open position (not where user clicked, but on r=0, c=c!)\r\n createTile(0, c, true, true); // also allow special tiles to be used here\r\n gameContainer.addChild(sprite);\r\n levelArray[0][c] = sprite;\r\n\r\n // timer penalty\r\n newcountdown -= 10;\r\n\r\n redraw(); //redraw level according to updated levelarray\r\n\r\n}", "handleClick(e){\n\t\t// console.log(e.target);\n\t\t// console.log(this.state.board);\n let playedSquare = e.target.innerHTML\n\n let newBoard = this.state.board\n\t\tlet newTurn = this.state.turn\n\n\t\tif (newBoard[playedSquare] !== 0)\n\t\t{\n console.log(\"square: \" + playedSquare + \" played already!!\")\n\t\t\treturn;\n\t\t}\n else {\n\t\t\tnewBoard[playedSquare] = this.state.turn\n\t\t\te.target.innerHTML = newTurn\n }\n\n\t\tif (this.checkForWin())\n\t\t{\n alert(\"GAME FINISHED \" + newTurn + \" WON !!!\")\n return\n\t\t}\n\n\t\tif (newTurn === \"X\")\n\t\t{\n\t\t\t newTurn = \"O\"\n\t\t}\n\t\telse\n\t\t{\n\t\t\t newTurn = \"X\"\n\t\t}\n\n\t\tthis.setState({\n\t board: newBoard,\n\t\t\tturn: newTurn\n\t }) // end of setState\n\n console.log(this.state.board)\n\n }", "function showTile(e) {\n const target = e.currentTarget;\n \n if (\n stopSelect ||\n target === selectedTile || \n target.className.includes(\" done\")\n ) {\n return;\n }\n //Removes class tile-back when tile has been selected\n target.className = target.className.replace(\"tile-back\", \" \").trim();\n target.className += \" done\";\n \n if (!selectedTile) {\n \n selectedTile = target;\n \n } else if (selectedTile) {\n // On condition that selected tile does not match targeted tile\n if (\n selectedTile.getAttribute(\"data-icon\") !== \n target.getAttribute(\"data-icon\")\n ) {\n //select is to stop\n stopSelect = true;\n\n //Swap target tile with incorrect selected tile\n var TileA = target;\n var TileB = selectedTile;\n \n //Div swap function\n // Function received from Stack Overflow. Referenced in Credits section in ReadMe doc\n $.fn.swap = function (elem) \n {\n elem = elem.jquery ? elem : $(elem);\n return this.each(function () \n {\n $('<span></span>').insertBefore(this).before(elem.before(this)).remove();\n });\n };\n \n $(TileA).swap(TileB);\n \n \n //Increments incorrect matches and adds to scoreboard\n let tilesWrong = document.querySelector(\".incorrect-score\").innerHTML;\n tilesWrong++;\n document.querySelector(\".incorrect-score\").innerHTML = tilesWrong;\n \n // If incorrect tiles are selected, the tiles are covered\n // Class of done is removed/replaced with empty string\n setTimeout(() => {\n selectedTile.className = selectedTile.className.replace(\"done\", \" \").trim() + \" tile-back\";\n target.className = target.className.replace(\"done\", \" \").trim() + \" tile-back\";\n \n selectedTile = null;\n stopSelect = false;\n \n }, 800);\n } else {\n //increments tiles matched\n tilesMatched++;\n selectedTile = null;\n \n //To target Congrats message to user\n let congratsMessage = document.querySelector(\".congrats-score-message\");\n let overlay = document.querySelector(\"#overlay\");\n \n // Content in html for class incorrect-score taken and showing in id final-incorrect-score in congrats message\n $(document).ready(function() {\n $(\"#final-incorrect-score\").html($(\".incorrect-score\").html());\n });\n\n // Content in html for timer taken and showing in id final-time in congrats message\n $(document).ready(function() {\n $(\"#final-time\").html($(\".timer p\").html());\n });\n\n // Content in html for timer and incorrect-score taken and added together showing in id final-overall-score in congrats message\n $(document).ready(function() {\n $(\"#final-overall-score\").html(Number($(\".timer p\").html()) + Number($(\".incorrect-score\").html()));\n });\n \n \n // Game is beaten once 15 matches have been made\n if (tilesMatched === 15) {\n setTimeout(() => \n {\n // Active class then applied to congrats message and overlay to show game is over\n congratsMessage.classList.add(\"active\");\n overlay.classList.add(\"active\");\n \n // To fix bug that caused div of class score-tally to be covered with class tile-back\n $(document).ready(function() {\n $(\".timer\").siblings().children().children().removeClass(\"tile-back\");\n });\n \n }, 250);\n \n return;\n }\n }\n }\n }", "function tileClickEvent() {\r\n\r\n\t$(\".tile-wide, .tile-square, .tile-small\").click(function() {\r\n\r\n\tvar id = generateUniqueID();\r\n\tvar modalId = \"#modal_\" + id;\r\n\tvar buttonId = \"#btn_\" + id;\r\n\r\n\tvar url = $(this).data(\"url\");\r\n\tvar toolTitle = $(this).find(\".tile-label\").text();\r\n\r\n\tvar modalCode = createModalCode(modalId, url, toolTitle);\r\n\t$(modalCode).appendTo(\"#iframe-container\");\r\n\t$(modalId).modal({backdrop: 'static', keyboard: false});\r\n\r\n\tvar btnTile = createTileButton(this, buttonId);\r\n\t$(btnTile).appendTo(\"#bottom-tray\");\r\n\r\n\tvar newModal = new ModalWindow($(modalId), $(buttonId), $(this));\r\n\tmodalArray.push(newModal);\r\n\r\n\taddEvents(newModal, buttonId);\r\n\r\n\tnewModal.showModalWindow();\r\n\r\n\t}); \r\n}", "function myDown(e) {\n\n // funciton to mark/unmark tiles while moving mouse\n canvas.onmousemove = myMove;\n\n x = e.pageX - canvas.offsetLeft;\n y = e.pageY - canvas.offsetTop;\n\n for (c = 0; c < tileColumnCount; c++) {\n for (r = 0; r < tileRowCount; r++) {\n if (c * (tileW + 3) < x && x < c * (tileW + 3) + tileW && r * (tileH + 3) < y && y < r * (tileH + 3) + tileH) {\n if (tiles[c][r].state == \"e\") {\n tiles[c][r].state = \"w\";\n\n boundX = c;\n boundY = r;\n\n }\n else if (tiles[c][r].state == \"w\") {\n tiles[c][r].state = \"e\";\n\n boundX = c;\n boundY = r;\n\n }\n }\n }\n }\n}", "function updateClickHandlers($base) {\n var data = $base.data('slidingtile'),\n emptyRow = data.emptyTile.row,\n emptyCol = data.emptyTile.col;\n \n $base.children('.tile').each(function () {\n var $tile = $(this),\n data = $tile.data('slidingtile');\n \n $tile.off('click');\n \n// An adjacent tile is either one row *or* one column from the empty tile, so\n// we can identify them by taking the absolute values of the row and column\n// displacements and find the sum of these two values. For adjacent tiles, this\n// value will be equal to 1.\n if (Math.abs(data.cPos.row - emptyRow) + Math.abs(data.cPos.col - emptyCol) === 1) {\n $tile.click(function () {\n moveTile($base, $(this));\n });\n }\n });\n }", "function mousePressed() {\r\n for (let i = 0; i < tilesX; i++) {\r\n for (let j = 0; j < tilesY; j++) {\r\n if (mouseX > i * res && mouseX < (i + 1) * res && mouseY > j * res && mouseY < (j + 1) * res) {\r\n tiles[i][j].clicked();\r\n //console.log('Clicked on', i, j);\r\n //console.log('life score' , tiles[i-1][j-1].life + tiles[i][j-1].life + tiles[i+1][j-1].life + tiles[i+1][j].life + tiles[i+1][j+1].life + tiles[i][j+1].life + tiles[i-1][j+1].life + tiles[i-1][j].life);\r\n }\r\n }\r\n }\r\n}", "function showTiles(char, index) {\n me.input.registerPointerEvent('click', char.collisionBox, function() {\n var menuing = game.data.moved.indexOf(true) >= 0;\n var isTargeted = (me.game.currentLevel.getLayerByName(\"map_layer\").getTileId(char.pos.x,char.pos.y) == 2);\n if (game.data.attacking && game.data.turn != game.data.teams[index] && isTargeted) {\n var i = game.data.moved.indexOf(true);\n game.data.moved[i] = false;\n game.data.waited[i] = true;\n game.data.attacking = false;\n for (m in game.data.buttons) {\n me.game.remove(game.data.buttons[m]);\n }\n while (game.data.highlight_x.length > 0) {\n me.game.currentLevel.getLayerByName(\"map_layer\").setTile(game.data.highlight_x.pop(),game.data.highlight_y.pop(), 1);\n }\n game.data.buttons = [];\n game.data.update_plz[i] = true;\n game.data.show_menu = false;\n console.log(\"simulating battle\");\n game.data.battle.simulate();\n game.data.battle.reset();\n } else if ((game.data.moving.indexOf(true) < 0) && !game.data.waited[index] && !menuing && (game.data.teams[index] === game.data.turn)) {\n //game.data.battle.init(char);\n game.data.back_x = game.data.location_x[index];\n game.data.back_y = game.data.location_y[index];\n\n for (var i = -(game.data.movement[index]); i <= game.data.movement[index]; i++) {\n\n var k = Math.abs(i);\n var cx = game.data.location_x[index]/32;\n var cy = game.data.location_y[index]/32;\n\n for (var j = k - game.data.movement[index]; j <= game.data.movement[index] - k; j++) {\n\n var hx = cx + i;\n var hy = cy + j;\n\n if ((hx >= 0)&&(hx <= 19)&&(hy >= 0)&&(hy <= 14)) {\n\n var corner = (Math.abs(i) + Math.abs(j)) == game.data.movement[index];\n\n if (corner) {\n for (m in game.data.range[index]) {\n\n var l = game.data.range[index][m];\n\n if (i <= 0 && j <= 0) {\n for (var n = 0; n <= l; n++) {\n if ((hx - n) >= 0 && (hy - (l - n)) >= 0) {\n game.data.highlight_x.push(hx - n);\n game.data.highlight_y.push(hy - l + n);\n me.game.currentLevel.getLayerByName(\"map_layer\").setTile(hx-n,hy-l+n,2);\n }\n }\n } \n\n else if (i <= 0 && j >= 0) {\n for (var n = 0; n <= l; n++) {\n if ((hx - n) >= 0 && (hy + (l - n)) <= 14) {\n game.data.highlight_x.push(hx - n);\n game.data.highlight_y.push(hy + l - n);\n me.game.currentLevel.getLayerByName(\"map_layer\").setTile(hx-n,hy+l-n,2);\n }\n }\n } \n\n else if (i >= 0 && j <= 0) {\n for (var n = 0; n <= l; n++) {\n if ((hx + n) <= 19 && (hy - (l - n)) >= 0) {\n game.data.highlight_x.push(hx + n);\n game.data.highlight_y.push(hy - l+ n);\n me.game.currentLevel.getLayerByName(\"map_layer\").setTile(hx+n,hy-l+n,2);\n }\n }\n } \n\n else if (i >= 0 && j >= 0) {\n for (var n = 0; n <= l; n++) {\n if ((hx + n) <= 19 && (hy + (l - n)) <= 14) {\n game.data.highlight_x.push(hx + n);\n game.data.highlight_y.push(hy + l - n);\n me.game.currentLevel.getLayerByName(\"map_layer\").setTile(hx+n,hy+l-n,2);\n }\n }\n }\n }\n }\n game.data.highlight_x.push(hx);\n game.data.highlight_y.push(hy);\n me.game.currentLevel.getLayerByName(\"map_layer\").setTile(hx,hy,3);\n }\n }\n }\n game.data.moving[index] = true;\n char.off_x = 0;\n char.off_y = 0;\n game.data.update_plz[index] = true;\n } \n\n else if (game.data.moving[index]) {\n while (game.data.highlight_x.length > 0) {\n me.game.currentLevel.getLayerByName(\"map_layer\").setTile(game.data.highlight_x.pop(),game.data.highlight_y.pop(), 1);\n }\n\n game.data.moving[index] = false;\n game.data.moved[index] = true;\n game.data.show_menu = true;\n menu(index);\n game.data.update_plz[index] = true;\n }\n });\n}", "function tileClick() {\n\n //le quitamos el eventlistener para no poder hacerle click\n this.removeEventListener(\"click\", tileClick);\n\n //cambiamos clase para mostar la tile\n this.classList.replace(\"undigged\", \"digged\")\n\n //comprobamos si la tile tiene algun item que mostrar\n stageMaster[currentPlayerLevel].forEach((item) => {\n\n item.piece.forEach(piece => {\n if (piece.pos.x == this.dataset.row && piece.pos.y == this.dataset.column) {\n\n //creamos el elemento de la imagen \n var newImg = document.createElement('img');\n\n //añadimos clase al elemento img\n newImg.classList.add(\"itemImg\");\n\n //añadimos clase si la imagen tiene que estar girada\n newImg.classList.add(\"rot-\" + piece.rot);\n\n //añadimos los parametros de ruta la imagen\n newImg.src = piece.img;\n\n //finalmente añadimos el div a la tile\n this.appendChild(newImg);\n }\n });\n })\n}", "clickSquare(e) {\n if (this.gameState === GameState.playerTurn) {\n if (e.target.dataset.board === 'cpu') {\n this.playerSelection({\n row: Number(e.target.dataset.row),\n col: Number(e.target.dataset.col),\n });\n }\n } else if (this.gameState === GameState.placingShips) {\n if (e.target.dataset.board === 'player') {\n if (\n this.playerBoard.isValidPlacement(\n this.playerShips[this.placeShipIndex],\n Number(e.target.dataset.row),\n Number(e.target.dataset.col),\n this.placementDirection,\n )\n ) {\n this.playerBoard.addShip(\n this.playerShips[this.placeShipIndex],\n Number(e.target.dataset.row),\n Number(e.target.dataset.col),\n this.placementDirection,\n );\n\n this.placementComplete[this.placeShipIndex] = true;\n this.battleshipDom.removeFleetButton(this.placeShipIndex);\n\n let allTrue = true;\n for (let i = 0; i < this.placementComplete.length; i += 1) {\n if (this.placementComplete[i] === false) {\n this.placeShipIndex = i;\n allTrue = false;\n break;\n }\n }\n this.battleshipDom.setPlayerBoard(this.playerBoard.boardState);\n\n if (allTrue) {\n this.gameState = GameState.preGame;\n } else {\n this.updatePostShipSelect();\n }\n }\n }\n }\n }", "handleClick(event) {\n var clickEvent = event.target.id;\n var pos = clickEvent.split(\"-\");\n var x = pos[0];\n var y = pos[1];\n let newBoard = this.state.board;\n let newShots = this.state.shots;\n let newMessage = this.state.message;\n if (newBoard[x][y] === 0) {\n newBoard[x][y] = MISS;\n newShots--;\n newMessage = 'You missed!';\n }else if (newBoard[x][y] === 1) {\n newBoard[x][y] = HIT;\n newShots--;\n newMessage = 'You hit something!'\n }\n this.setState({\n board: newBoard,\n shots: newShots,\n message: newMessage,\n })\n\n console.log(x + ' ' + y);\n console.log(\"click\")\n console.log(newShots);\n }", "handleClick(i) {\n\n // history of moves from beginning to next step.\n const history = this.state.history.slice(0, this.state.stepNumber + 1);\n // the current move \n const current = history[history.length-1];\n // create a copy of squares\n // Immutability is important\n // We can easily see when a component needs to be rerendered \n const squares = current.squares.slice();\n\n // if there is a winner or button clicked was filled\n if (calculateWinner(squares) || squares[i]) {\n return;\n }\n\n // change the state of square to reflect the move made\n squares[i] = this.state.xIsNext ? 'X' : '0';\n // call setState() to rerender the components.\n this.setState({\n // history is now beginnging to move just made\n history: history.concat([{\n squares: squares,\n }]),\n // step number is the length of the history\n stepNumber: history.length,\n xIsNext: !this.state.xIsNext,\n });\n }", "tileLeftClickedHandler(theRow, theCol) {\n\n let { rows, cols, mines } = this.props;\n let { gameStarted, theBoard } = this.state;\n\n /* Get count of revealed tiles */\n let revealed = this.findRevealedTiles(theBoard);\n let safeTiles = (rows * cols) - mines;\n\n let temp = theBoard;\n\n /* If condition is true, player has won, resets game */\n if(revealed === safeTiles - 1) {\n \n alert(\"You Win!\");\n this.resetBoard(rows, cols);\n return null;\n\n }\n\n /* game has not been started, start game */\n if (!gameStarted) {\n\n this.setState(() => ({\n theBoard: this.initRealBoard(theRow, theCol, rows, cols),\n gameStarted: true\n }))\n\n } else {\n\n console.log(`Row: ${theRow}, Col: ${theCol}, Revealed: ${temp[theRow][theCol].revealed}, Flag: ${temp[theRow][theCol].flag}, Mine: ${temp[theRow][theCol].mine}, Mine Count: ${temp[theRow][theCol].mineCount}`);\n\n /* if game started uncover tile */\n\n /* if the tile is revealed already, do nothing */\n if (temp[theRow][theCol].revealed) {\n return null;\n }\n\n /* if the tile is flagged, do nothing */\n if (temp[theRow][theCol].flag) {\n return null;\n }\n\n /* if the tile is a mine, player loses, resets game */\n if (temp[theRow][theCol].mine) {\n \n alert(\"You Lost...\");\n this.resetBoard(rows, cols);\n return null;\n\n }\n \n /* if the tile has no surrounding mines, uncover all surrounding empty tiles recursively */\n if (temp[theRow][theCol].mineCount === 0) {\n\n temp[theRow][theCol].revealed = true;\n temp = this.uncoverEmptyTiles(theRow, theCol, temp);\n\n } else {\n\n /* else the tile has a surrounding mine, reveal this tile */\n temp[theRow][theCol].revealed = true;\n\n }\n\n this.setState(() => ({\n theBoard: temp,\n }))\n }\n }", "handleClick(i){\n\n let squares = this.state.squares.slice();\n const calculateWinner = this.calculateWinner(squares);\n\n if (!squares[i] && !calculateWinner){\n squares[i] = this.state.xIsNext ? 'X' : 'O';\n \n const game = {\n squares:squares,\n stepNumber: this.state.stepNumber + 1,\n xIsNext: !this.state.xIsNext,\n squareNum: i,\n }\n\n this.checkWinner(game);\n this.newState(game);\n\n this.postState(game);\n }\n }", "function battleMapTowerPlaceClicked(event) {\n if (store.getState().isBuildMenuOpen == false) {\n let classParts = event.target.classList[0].split('-');\n let towerPlaceNumber = 'tower_slot_' + classParts[classParts.length - 1];\n let clickedSlotHTML = event.target;\n battleMapTowerPlaceClickedStateChangeStarter(towerPlaceNumber, clickedSlotHTML);\n } else if (store.getState().isBuildMenuOpen == true) {\n closeTowerBuildMenuStateChangeStarter();\n setTimeout(function(){\n let classParts = event.target.classList[0].split('-');\n let towerPlaceNumber = 'tower_slot_' + classParts[classParts.length - 1];\n let clickedSlotHTML = event.target;\n battleMapTowerPlaceClickedStateChangeStarter(towerPlaceNumber, clickedSlotHTML);\n }, 150);\n }\n }", "function onClick(e) {\n\tvar rect = c.getBoundingClientRect(); // get element's abs. position\n var tempx = e.clientX - rect.left; // get mouse x and adjust for el.\n var tempy = e.clientY - rect.top; // get mouse y and adjust for el.\n\t\n\t//Check that the click is within a square. \n\tfor(var i = 0; i < NUMBEROFTILES; i++){\n\t\tif(tempx < squares[i][0] + RECTWIDTH && tempx > squares[i][0]){\n\t\t\tif(tempy < squares[i][1] + RECTHEIGHT && tempy > squares[i][1]){\n\t\t\t\tif(squareSelected == false){\n\t\t\t\t\t//Change the color of the square that was clicked\n\t\t\t\t\tsquares[i][3] = \"#CD2626\";\n\t\t\t\t\tsquareSelected = true; \n\t\t\t\t\tsquareSelectedIndex = i;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t//Check if the move is a valid move.\n\t\t\t\t\tvar validMove = false; \n\t\t\n\t\t\t\t\tif(i == squareSelectedIndex - 1){\n\t\t\t\t\t\tif(squareSelectedIndex % GRIDSIZE != 0){\n\t\t\t\t\t\t\tvalidMove = true; \n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if(i == squareSelectedIndex + 1){\n\t\t\t\t\t\tif((squareSelectedIndex - 2) % GRIDSIZE != 0){\n\t\t\t\t\t\t\tvalidMove = true; \n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if(i == squareSelectedIndex - GRIDSIZE){\n\t\t\t\t\t\tif(squareSelectedIndex > GRIDSIZE - 1){\n\t\t\t\t\t\t\tvalidMove = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if(i == squareSelectedIndex + GRIDSIZE){\n\t\t\t\t\t\tif(squareSelectedIndex < NUMBEROFTILES - GRIDSIZE){\n\t\t\t\t\t\t\tvalidMove = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if(i == squareSelectedIndex){\n\t\t\t\t\t\tsquares[i][3] = generateTileColor(squares[i][2]);\n\t\t\t\t\t\tsquareSelected = false; \n\t\t\t\t\t\tsquareSelectedIndex = i;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\talert(\"Invalid move!\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(validMove == true){\n\t\t\t\t\t\t//Change the new number\n\t\t\t\t\t\tsquares[i][2] = applyOperator(squareSelectedIndex, i);\n\t\t\t\t\t\tsquares[i][3] = generateTileColor(squares[i][2]);\n\t\t\t\t\t\n\t\t\t\t\t\t//Change the old number\n\t\t\t\t\t\tsquares[squareSelectedIndex][2] = updateTileNumber(squares[squareSelectedIndex][2]);\n\t\t\t\t\t\tsquares[squareSelectedIndex][3] = generateTileColor(squares[squareSelectedIndex][2]);\n\t\t\t\t\t\tsquareSelected = true;\n\t\t\t\t\t\tsquareSelectedIndex = i; \n\t\t\t\t\t\tsquares[i][3] = \"#CD2626\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\t//If it is not, then they clicks somehwhere else\t\n\t\n\t//Clicked the reset button\n\tif(tempx < buttons[0][0] + RECTWIDTH && tempx > buttons[0][0]){\n\t\tif(tempy < buttons[0][1] + RECTHEIGHT && tempy > buttons[0][1]){\n\t\t\t//Reset buttons using backup? sqauresBackup\n\t\t}\n\t}\n}", "function onMouseDown(event) {\n\tpuzzle.pickTile();\n}", "createTiles(clickHandler){\n //Create tiles in the DOM\n for (let i = 0; i < 15; i++) {\n for (let j = 0; j < 14; j++) {\n $('.center').append(`<button class=\"tile\" id=\"button_${i}_${j}\"></button>`)\n }\n $('.center').append(`<button class=\"tile\" id=\"button_${i}_14\" style=\"float:none;\"/>`);\n }\n\n //Attach click listener to tiles\n for (let i = 0; i < 15; i++) {\n this.board.push(['']);\n for (let j = 0; j < 15; j++) {\n $(`#button_${i}_${j}`).on('click', clickHandler);\n }\n }\n }", "createGameBoard() {\n function tileClickHandler() {\n const row = parseInt(this.id.split('_')[1][0], 10);\n const col = parseInt(this.id.split('_')[1][1], 10);\n if (!player.getCurrentTurn() || !game) {\n alert('Its not your turn!');\n return;\n }\n\n if ($(this).prop('disabled')) {\n alert('This tile has already been played on!');\n return;\n }\n // Update board after your turn.\n game.playTurn(this);\n game.updateBoard(player.getPlayerType(), row, col, this.id);\n\n player.setCurrentTurn(false);\n player.updatePlaysArr(1 << ((row * 3) + col));\n\n game.checkWinner();\n }\n for (let i = 0; i < 3; i++) {\n this.board.push(['', '', '']);\n for (let j = 0; j < 3; j++) {\n $(`#button_${i}${j}`).on('click', tileClickHandler);\n }\n }\n }", "function turnOnAddTileHandler() {\r\n\t\t\tvar addNewPixelTile = function (x, y) {\r\n\t\t\t\tvar newTile = angular.extend({}, $injector.get('tileDefaults'), {\r\n\t\t\t\t\tid: 'IzendaDashboardTileNew' + (newTileIndex++),\r\n\t\t\t\t\tisNew: true,\r\n\t\t\t\t\twidth: 1,\r\n\t\t\t\t\theight: 1,\r\n\t\t\t\t\tx: x,\r\n\t\t\t\t\ty: y\r\n\t\t\t\t});\r\n\t\t\t\twhile (!vm.checkTileIntersectsBbox(newTile) && newTile.width < 6 && newTile.width + newTile.x < 12) {\r\n\t\t\t\t\tnewTile.width++;\r\n\t\t\t\t}\r\n\t\t\t\tif (vm.checkTileIntersectsBbox(newTile)) {\r\n\t\t\t\t\tnewTile.width--;\r\n\t\t\t\t}\r\n\t\t\t\twhile (!vm.checkTileIntersectsBbox(newTile) && newTile.height < 3) {\r\n\t\t\t\t\tnewTile.height++;\r\n\t\t\t\t}\r\n\t\t\t\tif (vm.checkTileIntersectsBbox(newTile)) {\r\n\t\t\t\t\tnewTile.height--;\r\n\t\t\t\t}\r\n\t\t\t\tif (newTile.width <= 0 || newTile.height <= 0)\r\n\t\t\t\t\treturn;\r\n\t\t\t\tvm.tiles.push(newTile);\r\n\t\t\t\tvm.updateDashboardSize();\r\n\t\t\t\t$scope.$evalAsync();\r\n\t\t\t};\r\n\t\t\tvar $tileContainer = vm.getTileContainer();\r\n\r\n\t\t\t// on click on free dashboard area: add tile\r\n\t\t\t$tileContainer.on('mousedown.dashboard', function (event) {\r\n\t\t\t\tvar $target = angular.element(event.target);\r\n\t\t\t\tif (vm.isTile$($target))\r\n\t\t\t\t\treturn true;\r\n\t\t\t\tif (event.which !== 1)\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t$tileContainer = vm.getTileContainer();\r\n\t\t\t\t// get {x, y} click coordinates\r\n\t\t\t\tvar x = Math.floor((event.pageX - $tileContainer.offset().left) / vm.tileWidth),\r\n\t\t\t\t\ty = Math.floor((event.pageY - $tileContainer.offset().top) / vm.tileHeight);\r\n\t\t\t\taddNewPixelTile(x, y);\r\n\t\t\t\treturn false;\r\n\t\t\t});\r\n\r\n\t\t\t// on mouse move: show grid\r\n\t\t\t$tileContainer.on('mousemove.dashboard', function (e) {\r\n\t\t\t\tvar $target = angular.element(e.target);\r\n\t\t\t\tif (vm.isTile$($target))\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t$tileContainer = vm.getTileContainer();\r\n\t\t\t\t// get {x, y} click coordinates\r\n\t\t\t\tvar x = Math.floor((e.pageX - $tileContainer.offset().left) / vm.tileWidth),\r\n\t\t\t\t\ty = Math.floor((e.pageY - $tileContainer.offset().top) / vm.tileHeight);\r\n\t\t\t\tvm.showTileGrid();\r\n\t\t\t\tvm.showTileGridShadow({\r\n\t\t\t\t\tleft: x * vm.tileWidth,\r\n\t\t\t\t\ttop: y * vm.tileHeight,\r\n\t\t\t\t\twidth: vm.tileWidth,\r\n\t\t\t\t\theight: vm.tileHeight\r\n\t\t\t\t}, true);\r\n\t\t\t});\r\n\r\n\t\t\t// on mouse out: hide grid\r\n\t\t\t$tileContainer.on('mouseout.dashboard', function () {\r\n\t\t\t\tvm.hideTileGridShadow();\r\n\t\t\t\tvm.hideTileGrid();\r\n\t\t\t});\r\n\t\t}", "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 clickHandler(block, classNames) {\n var space = myGame.map[block];\n // only run if game is still going\n if (myGame.board[space[0]][space[1]] === '' && !myGame.gameOver) {\n // toggle piece onto game board\n myGame.toggle(block);\n // update view on index.html\n updateView();\n // update game status\n updateStatus(classNames);\n myGame.nextPlayer(myGame.player);\n }\n}", "handleClick(i){\n let newBoard=this.state.board;\n let newSeen=this.state.seen;\n let newEndGame=this.state.endGame;\n\n if(newBoard[i]===\"#\" && this.isGameOver()===-1){\n newBoard[i]=(turn%2===0)? secondPlayer: firstPlayer;\n \n newSeen[i]=true;\n \n turn++;\n }\n\n let winner=this.isGameOver();\n\n if(winner!==-1 && !newEndGame){\n newEndGame=true;\n setTimeout(()=>{alert(winner + \" WINS!\");}, 250);\n }\n\n else if(turn===10 && !newEndGame){\n newEndGame=true;\n setTimeout(()=>{alert(\"It's a draw!\");}, 250);\n }\n\n this.setState(\n {\n board: newBoard,\n seen: newSeen,\n endGame: newEndGame\n }\n );\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 keyPressedHandler(e) {\n\tvar code = (e.keyCode ? e.keyCode : e.which);\n\tvar clickedTile = findTileXY(xPosi,yPosi);\n\tswitch(code) {\n\t\tcase ONE_KEY:\n\t\t\tvar u = createUnit(findTileXY(xPosi,yPosi));\n\t\t\tCivMind.addWorkerToArray(u);\n\t\t\tbreak;\n\t\tcase TWO_KEY:\n\t\t\taiSet();\n\t\t\tbreak;\n\t\tcase THREE_KEY:\n\t\t\tspawnRandomWood();\n\t\t\tbreak;\n\t\tcase FOUR_KEY:\n\t\t\tsetBuildingSpotsRan();\n\t\t\tbreak;\n\t\tcase FIVE_KEY:\n\t\t\tspawnWood(clickedTile);\n\t\t\tbreak;\n\t\tcase SIX_KEY:\n\t\t\tfor(var i=0;i<12;i++){\n\t\t\t\tspawnWood(clickedTile);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SEVEN_KEY:\n\t\t\tclickedTile.setVar('Mountain');\n\t\t\tbreak;\n\t\tcase EIGHT_KEY:\n\t\t\tclickedTile.setVar('Grass');\n\t\t\tbreak;\n\t\tcase NUMPAD1:\n\t\t\tif(!clickedTile.impassable){\n\t\t\t\tdrawPath(unitArray[0].currentTile,clickedTile);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase NUMPAD2:\n\t\t\tif(pathToDraw.length > 0){\n\t\t\t\tmoveOnPath(unitArray[0],pathToDraw);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tvar path;\n\t\t\t\tif(!clickedTile.impassable){\n\t\t\t\t\tpath = pathFind(unitArray[0].currentTile,clickedTile,unitArray[0]);\n\t\t\t\t}\n\t\t\t\tmoveOnPath(unitArray[0],path);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase P_KEY:\n\t\t\tpauseGame();\n\t\t\tbreak;\n\t}\n}", "squareClicked(row, col) {\n // return from function if square has already been clicked or if game over\n if (\n this.state.history[this.state.historyIndex].currentBoard[row][col] !=\n null ||\n this.state.isGameWon ||\n this.state.isGameTied\n )\n return;\n\n // update board and history\n let currentBoard = this.state.history[this.state.historyIndex].currentBoard;\n currentBoard = BoardFunctions.copyOfBoard(currentBoard);\n const topRow = BoardFunctions.topRowFilledInCol(currentBoard, row, col);\n\n // color used by updateBoard() to color square red (+1), yellow (-1), or null (0)\n let color;\n if (this.state.isRedTurn) {\n color = +1;\n } else if (!this.state.isRedTurn) {\n color = -1;\n }\n\n const updatedBoard = BoardFunctions.updateBoard(\n currentBoard,\n topRow,\n col,\n color\n );\n const history = this.updateHistory(updatedBoard);\n\n this.setState(\n {\n history: history,\n historyIndex: this.state.historyIndex + 1\n },\n\n () => this.updateGameStatus(topRow, col)\n );\n }", "handleMouseDown(row, col) {\n const { grid, mainIsPressed } = this.state;\n const node = grid[row][col];\n if (node.isStart === true && node.isFinish === false) {\n this.setState({ mainIsPressed: \"start\" });\n node.isStart = false;\n }\n if (node.isFinish === true && node.isStart === false) {\n this.setState({ mainIsPressed: \"finish\" });\n node.isFinish = false;\n }\n if (mainIsPressed === \"\") {\n const newGrid = gridWithWallToggled(grid, row, col);\n this.setState({ grid: newGrid, mouseIsPressed: true });\n }\n }", "function clickbox() {\n switch (state) {\n //When in 'idle' state\n case 0:\n sortear();\n break;\n //When showing the result of the previous game\n case 2:\n restablecer()\n break;\n }\n}", "shuffle() {\n let Tiles = this.state.Tiles\n let Clicks = this.state.Clicks\n Clicks = 0\n for(let i=0;i<=50;i++){\n let blank = Tiles.find(item => item.value === 0) //find tile value 0\n let blankValue = blank.value\n let newTile = Tiles[blank.moves[Math.floor(Math.random() * ((blank.moves.length)))]] //picks random move\n let newValue = newTile.value //swaps values\n newTile.value = blankValue\n blank.value = newValue\n }\n this.setState({\n Tiles,\n Clicks\n })\n }", "addClick(e) {\n //console.log(this.m.gameOver)\n if (!this.m.gameOver) {\n let player;\n if (e.target.innerText == \"\") {\n if (!this.m.gameOver) {\n //if tiled has been clicked or not\n if (this.m.beenClicked % 2 == 0) {\n // console.log('x clicked')\n e.target.innerText = \"X\";\n player = this.m.firstPlayer;\n } else {\n e.target.innerText = \"O\";\n //console.log('o clicked')\n player = this.m.secondPlayer;\n }\n\n this.m.beenClicked++;\n // console.log(e);\n // console.log('clicked on', e.target.id)\n //was clicked=true\n if (this.m.beenClicked > 4) {\n this.checkWin();\n }\n this.playerTurn(player);\n\n }\n }\n }\n }", "function selectedTile(event) {\n\n const pos = {\n x: event.clientX,\n y: event.clientY\n };\n // var selectedTile = \"none\";\n if (tile(pos, greenTile1Positions)) {\n selectedPiece = \"greenTile1\";\n ctx.beginPath();\n ctx.arc(greenTile1Positions[currentPosition(greenTile1Positions)].x,greenTile1Positions[currentPosition(greenTile1Positions)].y,20,0,2*Math.PI);\n ctx.closePath();\n ctx.strokeStyle= \"white\";\n ctx.stroke();\n\n // alert(selectedPiece);\n } else if (tile(pos, greenTile2Positions)) {\n selectedPiece = \"greenTile2\";\n ctx.beginPath();\n ctx.arc(greenTile2Positions[currentPosition(greenTile2Positions)].x,greenTile2Positions[currentPosition(greenTile2Positions)].y,20,0,2*Math.PI);\n ctx.closePath();\n ctx.strokeStyle= \"white\";\n ctx.stroke();\n // alert(selectedPiece);\n } else if (tile(pos, greenTile3Positions)) {\n selectedPiece = \"greenTile3\";\n ctx.beginPath();\n ctx.arc(greenTile3Positions[currentPosition(greenTile3Positions)].x,greenTile3Positions[currentPosition(greenTile3Positions)].y,20,0,2*Math.PI);\n ctx.closePath();\n ctx.strokeStyle= \"white\";\n ctx.stroke();\n // alert(selectedPiece);\n } else if (tile(pos, greenTile4Positions)) {\n selectedPiece = \"greenTile4\";\n ctx.beginPath();\n ctx.arc(greenTile4Positions[currentPosition(greenTile4Positions)].x,greenTile4Positions[currentPosition(greenTile4Positions)].y,20,0,2*Math.PI);\n ctx.closePath();\n ctx.strokeStyle= \"white\";\n ctx.stroke();\n // alert(selectedPiece);\n } else if (tile(pos, redTile1Positions)) {\n selectedPiece = \"redTile1\";\n ctx.beginPath();\n ctx.arc(redTile1Positions[currentPosition(redTile1Positions)].x,redTile1Positions[currentPosition(redTile1Positions)].y,20,0,2*Math.PI);\n ctx.closePath();\n ctx.strokeStyle= \"white\";\n ctx.stroke();\n // alert(selectedPiece);\n } else if (tile(pos, redTile2Positions)) {\n selectedPiece = \"redTile2\";\n ctx.beginPath();\n ctx.arc(redTile2Positions[currentPosition(redTile2Positions)].x,redTile2Positions[currentPosition(redTile2Positions)].y,20,0,2*Math.PI);\n ctx.closePath();\n ctx.strokeStyle= \"white\";\n ctx.stroke();\n // alert(selectedPiece);\n } else if (tile(pos, redTile3Positions)) {\n selectedPiece = \"redTile3\";\n ctx.beginPath();\n ctx.arc(redTile3Positions[currentPosition(redTile3Positions)].x,redTile3Positions[currentPosition(redTile3Positions)].y,20,0,2*Math.PI);\n ctx.closePath();\n ctx.strokeStyle= \"white\";\n ctx.stroke();\n // alert(selectedPiece);\n } else if (tile(pos, redTile4Positions)) {\n selectedPiece = \"redTile4\";\n ctx.beginPath();\n ctx.arc(redTile4Positions[currentPosition(redTile4Positions)].x,redTile4Positions[currentPosition(redTile4Positions)].y,20,0,2*Math.PI);\n ctx.closePath();\n ctx.strokeStyle= \"white\";\n ctx.stroke();\n // alert(selectedPiece);\n } else if (tile(pos, yellowTile1Positions)) {\n selectedPiece = \"yellowTile1\";\n ctx.beginPath();\n ctx.arc(yellowTile1Positions[currentPosition(yellowTile1Positions)].x,yellowTile1Positions[currentPosition(yellowTile1Positions)].y,20,0,2*Math.PI);\n ctx.closePath();\n ctx.strokeStyle= \"white\";\n ctx.stroke();\n // alert(selectedPiece);\n } else if (tile(pos, yellowTile2Positions)) {\n selectedPiece = \"yellowTile2\";\n ctx.beginPath();\n ctx.arc(yellowTile2Positions[currentPosition(yellowTile2Positions)].x,yellowTile2Positions[currentPosition(yellowTile2Positions)].y,20,0,2*Math.PI);\n ctx.closePath();\n ctx.strokeStyle= \"white\";\n ctx.stroke();\n // alert(selectedPiece);\n } else if (tile(pos, yellowTile3Positions)) {\n selectedPiece = \"yellowTile3\";\n ctx.beginPath();\n ctx.arc(yellowTile3Positions[currentPosition(yellowTile3Positions)].x,yellowTile3Positions[currentPosition(yellowTile3Positions)].y,20,0,2*Math.PI);\n ctx.closePath();\n ctx.strokeStyle= \"white\";\n ctx.stroke();\n // alert(selectedPiece);\n } else if (tile(pos, yellowTile4Positions)) {\n selectedPiece = \"yellowTile4\";\n ctx.beginPath();\n ctx.arc(yellowTile4Positions[currentPosition(yellowTile4Positions)].x,yellowTile4Positions[currentPosition(yellowTile4Positions)].y,20,0,2*Math.PI);\n ctx.closePath();\n ctx.strokeStyle= \"white\";\n ctx.stroke();\n // alert(selectedPiece);\n } else if (tile(pos, blueTile1Positions)) {\n selectedPiece = \"blueTile1\";\n ctx.beginPath();\n ctx.arc(blueTile1Positions[currentPosition(blueTile1Positions)].x,blueTile1Positions[currentPosition(blueTile1Positions)].y,20,0,2*Math.PI);\n ctx.closePath();\n ctx.strokeStyle= \"white\";\n ctx.stroke();\n // alert(selectedPiece);\n } else if (tile(pos, blueTile2Positions)) {\n selectedPiece = \"blueTile2\";\n ctx.beginPath();\n ctx.arc(blueTile2Positions[currentPosition(blueTile2Positions)].x,blueTile2Positions[currentPosition(blueTile2Positions)].y,20,0,2*Math.PI);\n ctx.closePath();\n ctx.strokeStyle= \"white\";\n ctx.stroke();\n // alert(selectedPiece);\n } else if (tile(pos, blueTile3Positions)) {\n selectedPiece = \"blueTile3\";\n ctx.beginPath();\n ctx.arc(blueTile3Positions[currentPosition(blueTile3Positions)].x,blueTile3Positions[currentPosition(blueTile3Positions)].y,20,0,2*Math.PI);\n ctx.closePath();\n ctx.strokeStyle= \"white\";\n ctx.stroke();\n // alert(selectedPiece);\n } else if (tile(pos, blueTile4Positions)) {\n selectedPiece = \"blueTile4\";\n ctx.beginPath();\n ctx.arc(blueTile4Positions[currentPosition(blueTile4Positions)].x,blueTile4Positions[currentPosition(blueTile4Positions)].y,20,0,2*Math.PI);\n ctx.closePath();\n ctx.strokeStyle= \"white\";\n ctx.stroke();\n // alert(selectedPiece);\n }\n return selectedPiece;\n}", "handleClick(i){\n\t\tconst history = this.state.history.slice(0, this.state.stepNum + 1);\n\t\tconst current = history[history.length - 1];\n\t\tconst squares = current.squares.slice();\n\t\tif(squares[i] || calcWinner(squares)) {\n\t\t\treturn;\n\t\t}\n\t\tsquares[i] = this.state.xTurn?'x':'o';\n\t\tthis.setState({\n\t\t\thistory\t\t: history.concat([{ squares:squares, clicks:i }]),\n \t\tstepNum\t: history.length,\n\t\t\txTurn\t\t: !this.state.xTurn\n\t\t});\n\t}", "function click() {\n\t// If clicking on a cell with your piece in it, highlight the cell\n\tif (!selectedBox) { // 1st click\n\t\tif ((!blueTurn && this.hasClassName(\"red\")) || (blueTurn && this.hasClassName(\"blue\"))) {\n\t\t\tthis.addClassName(\"selected\");\n\t\t\tselectedBox = this;\n\t\t}\n\t}\n\t\n\t// Player is trying to move a piece\n\telse { // 2nd click\n\t\tselectedBox.removeClassName(\"selected\");\n\t\tthis.onmouseout();\n\t\t\n\t\t// If there are forced jumps and player is not jumping, highlight forced jumps\n\t\tif (forcedJumps != false) {\n\t\t\tif (!jump(this)) {\n\t\t\t\thighlightForcedJumps(forcedJumps);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Try moving, then try jumping\n\t\telse if (!move(this))\n\t\t\tjump(this);\n\t\t\t\n\t\tselectedBox = null;\n\t\tcheckVictory();\n\t}\n}", "function clickHandler(e) {\r\n if (that.currentGameState.onClick) {\r\n that.currentGameState.onClick.call(this, that.currentGameState, e);\r\n }\r\n }", "function updateTileState(tiles) {\n var collapsed,\n oldCollapsed;\n\n tiles = tiles || /*istanbul ignore next: default value */ [];\n\n oldCollapsed = scope.isCollapsed;\n\n collapsed = tileIsCollapsed(scope.tileId, tiles);\n\n if (oldCollapsed === collapsed) {\n displayModeChanging = false;\n }\n\n scope.isCollapsed = collapsed;\n\n if (collapsed && !tileInitialized) {\n //in some cases the tile-content div is left in a partially collapsed state.\n // this will ensure that the tile is styled corretly and the tile is completely collapsed\n $timeout(function () {\n var contentEl;\n contentEl = el.find('.bb-tile-content');\n contentEl.removeClass('collapsing').addClass('collapse');\n }, 1);\n }\n }", "function handleClick(i){\n //making a copy of the current status of the board\n const boardCopy = [...board];\n // If user click an occupied square or if game is won, return\n if (winner || boardCopy[i]) return;\n // Put an X or an O in the clicked square\n boardCopy[i] = xIsNext ? \"Gray Cat\" : \"White Cat\";\n setBoard(boardCopy);\n setXisNext(!xIsNext);\n }", "onLeftClick( event ) {\r\n let cell = event.target.dataMine;\r\n\r\n if (this.state == STATES.idle) {\r\n this.startGame(cell);\r\n }\r\n\r\n if (this.mode == MODES.dig ) {\r\n this.digCell(cell);\r\n }\r\n else {\r\n this.flagCell(cell);\r\n } \r\n }", "function canvasClick(e)\n{\n var x;\n var y;\n\n // grab html page coords\n if (e.pageX != undefined && e.pageY != undefined)\n {\n x = e.pageX;\n y = e.pageY;\n }\n else\n {\n x = e.clientX + document.body.scrollLeft +\n document.documentElement.scrollLeft;\n y = e.clientY + document.body.scrollTop +\n document.documentElement.scrollTop;\n }\n\n // make them relative to the canvas only\n x -= canvas.offsetLeft;\n y -= canvas.offsetTop;\n\n // return tile x,y that we clicked\n var cell = [\n Math.floor(x / tileWidth),\n Math.floor(y / tileHeight)\n ];\n\n // now we know while tile we clicked\n console.log('we clicked tile ' + cell[0] + ',' + cell[1]);\n\n pathStart = pathEnd;\n pathEnd = cell;\n\n // calculate path\n currentPath = findPath(world, pathStart, pathEnd);\n mouselayer.removeChildren();\n redraw(1, 'white');\n redraw(0, 'white');\n}", "function checkClick(tile) {\n\tif (tile.type === 0) {\n\t\trevealTile(tile)\n\t\trevealBlanks(tile) \n\t} else if (tile.type > 0) \n\t\trevealTile(tile)\n\telse {\n\t\trevealMines(tile)\n\t\tdisplayLose(tile)\n\t}\n}", "handleClick(i) {\n const squares = this.state.squares.slice(); // Allow for immutable objects (new objects to track each instance of a board).\n // Hard to detect when mutable objects are changed. Immutable objects also allow us to revist old objects, such as to get the winner of a past game.\n\n // Return early to ignore click if already won or a square is filled\n // Using const squares as local variable\n if (calculateWinner(squares) || squares[i]) {\n return;\n }\n\n squares[i] = this.state.xIsNext ? \"X\" : \"O\";\n this.setState({\n squares: squares,\n // Calling !xIsNext directly does not work as we need to reference the constructor field\n // just like I do in Java.\n xIsNext: !this.state.xIsNext,\n });\n }", "function handleClick(e) {\n\tconst cell = e.target\n\tconst currentClass = oTurn ? oClass : xClass \n\tplaceMark(cell, currentClass)\n\tif (checkWin(currentClass)) {\n\t\tendGame(false)\n\t} else if (isDraw()) {\n\t\tendGame(true)\n\t} else {\n\t\tswapTurns()\n\t}\n}", "function handleSetupBoardClick(event) {\r\n //The only purpose of this event handler is to handle the setUp stage on the player's side of the board, so do nothing if it's not even in the set up stage.\r\n if (state.phase !== 'setup' || event.target.tagName !== 'DIV') {\r\n \r\n return;\r\n }\r\n \r\n let index = [parseInt(event.target.id[3]), parseInt(event.target.id[5])];\r\n\r\n //If there is no ship selected, and we click on a ship on the board that has already been placed, remove it and set it as shipPrimed.\r\n if (!state.shipPrimed) {\r\n \r\n if (event.target.classList.contains('active')) {\r\n \r\n let shipType = findShipType(event.target);\r\n //Re render the mouse over effects on the grid since when you click on a square, it doesn't move out of the square so it won't derender the squares that were activated before. Make it manually rerender.\r\n handlePlayerBoardMouseOut(event);\r\n removeShip(playerShipState, shipType);\r\n primeShip(shipType);\r\n handlePlayerBoardMouseOver(event);\r\n //We only need to render here because if a ship is removed and all the ships are used is the only case when the ready button's state should be set to unclickable again. If a ship was just merely replaced with another ship, it should have never been ready to begin with.\r\n render();\r\n return;\r\n }\r\n else {\r\n return;\r\n }\r\n } \r\n\r\n //Assuming the ship is primed, if the player clicks on a square in which the ship would overlap the edges of the game board, return and end function.\r\n //NOTE: I don't replace any ships that are already on the coordinate here, because if it does replace, it would be placed on a square that overlap the edges of the gameboard. I am making it so that the currently primed ship overlapping the edges has a higher priority than if there is already a ship there that needs to be replaced to make room for the primed ship.\r\n \r\n if (((state.orientation === 'horizontal') && (index[1] + playerShipState[state.shipPrimed].health.length - 1) > 9) ||\r\n ((state.orientation === 'vertical') && (index[0] + playerShipState[state.shipPrimed].health.length - 1) > 9)) {\r\n\r\n return;\r\n }\r\n \r\n\r\n //Assuming the ship is Primed and doesn't overlap, If the elements that the ship would have taken up are already taken by another ship, then replace that ship with the currently primed ship and set the ship that was previously there to shipPrimed. HOWEVER, if multiple ships exist on the squares it would take up, have it do nothing. If there are no ships there, just add the ship.\r\n // let neighborIndexes = getNeighborIndexes(index[0], index[1]);\r\n let neighboringShips = [];\r\n\r\n //This will loop through each neighboring element and push each unique ship type that exists in the neighboring elements into the neighboringShips Array.\r\n loopEachShipSquare(playerShipState, state.shipPrimed, (element) => {\r\n let shipType = findShipType(element);\r\n if (shipType) {\r\n if (neighboringShips.length === 0) {\r\n neighboringShips.push(shipType)\r\n } else if (neighboringShips.length > 0 && !neighboringShips.includes(shipType)) {\r\n neighboringShips.push(shipType);\r\n }\r\n };\r\n }, index[0], index[1]);\r\n\r\n //If there are multiple ships already on the square that the ship would take up, do nothing.\r\n if (neighboringShips.length > 1) {\r\n return;\r\n //If there are no ships on the neighboring squares, just add the ship.\r\n } else if (neighboringShips.length === 0 ) {\r\n addShip(playerShipState, state.shipPrimed, index[0], index[1]);\r\n //NOTE: We do not need to rerender mouse over effects because in this case, If a ship is added on an empty square, the squares that are animated are still the same even after placement. And it will be deanimated as long as we mouse out.\r\n //we only need to render here because, if the game is ready, the last ship should only be placed and not replaced.\r\n render();\r\n //If there is only 1 ship on the neighboring squares, replace the ship.\r\n } else if (neighboringShips.length === 1) {\r\n //Re render the mouse over effects.\r\n handlePlayerBoardMouseOut(event);\r\n removeShip(playerShipState, neighboringShips[0]);\r\n addShip(playerShipState, state.shipPrimed, index[0], index[1]);\r\n primeShip(neighboringShips[0]);\r\n handlePlayerBoardMouseOver(event);\r\n render();\r\n } \r\n\r\n \r\n}", "function mapTile(x, y) {\r\n\r\n\r\n whichButton = \"mapTile-\" + x + \"-\" + y\r\n\r\n if (gameData.diseaseControlFinished == 0) {\r\n if (gameData.diseaseArray[x][y] == 0 && gameData.civiliansPlaced < gameData.civiliansTotal) {\r\n gameData.diseaseArray[x][y] = 1\r\n gameData.civiliansPlaced += 1\r\n } else if (gameData.diseaseArray[x][y] == 1) {\r\n gameData.diseaseArray[x][y] = 0\r\n gameData.civiliansPlaced -= 1\r\n }\r\n }\r\n\t if (gameData.autoStartSimulation)\r\n\t\tstartSimulation()\r\n\t\r\n\tupdateMapTileAesthetic()\r\n}", "function mouseClicked(){\n if(state === 7 && mouseX < 400 && mouseX > 200 && mouseY < 400 && mouseY > 200){\n window.open(\"https://rookeryphysics.github.io/palmpong/index.html\");\n }\n if(mouseX < shipX + 50 && mouseX > shipX && mouseY < shipY && mouseY > shipY + 50){\n state = 9;\n }\n if(state === 3 && resource.oil < 500){\n resource.oil = resource.oil + 10;\n }\n if(mouseX < 100 && mouseY < 100){\n if(goingForward){\n goingForward = false;\n if(state === 1){\n state = 0;\n }\n }\n else if(!goingForward){\n goingForward = true;\n if(state === 0){\n state = 1;\n }\n }\n }\n}", "function mousePressed() {\n if (state === 'title') {\n state = 'simulation'\n newRound()\n }\n else if (state === 'simulation') {\n clicked();\n }\n}", "handleMouseDown(row, col) {\n const newGrid = getNewGridWithWallToggled(this.state.grid, row, col);\n this.setState({ grid: newGrid, mouseIsPressed: true });\n }", "function Tile( element ){\n\n// Tile element\nvar tile = element;\n\n// Global settings\n\n// Declare css for when the tile is in its idle state.\n var idleCss = \"perspective( 800px ) rotateX( 0deg ) rotateY( 0deg ) translateZ( 0px )\";\n\n\nvar initialize = function() {\n\n// Set transform origin to the center of the element.\ntile.style.webkitTransformOrigin = \"0% 50%\";\ntile.style.MozTransformOrigin = \"0% 50%\";\ntile.style.msTransformOrigin = \"0% 50%\";\ntile.style.oTransformOrigin = \"0% 50%\";\ntile.style.transformOrigin = \"0% 50%\";\n\n// Make sure the parent preserves the 3d perspective\ntile.parentElement.style.webkitTransformStyle = \"preserve-3d\";\ntile.parentElement.style.MozTransformStyle = \"preserve-3d\";\ntile.parentElement.style.msTransformStyle = \"preserve-3d\";\ntile.parentElement.style.oTransformStyle = \"preserve-3d\";\ntile.parentElement.style.transformStyle = \"preserve-3d\";\n\n// Set element transform times\ntile.style.webkitTransition = \"-webkit-transform 0.08s\";\ntile.style.MozTransition = \"-moz-transform 0.08s\";\ntile.style.msTransition = \"-ms-transform 0.08s\";\ntile.style.oTransition = \"-o-transform 0.08s\";\ntile.style.transition = \"transform 0.08s\";\n\n// This gives an antialiased effect for transforms in firefox.\ntile.style.outline = \"1px solid transparent\";\n\n// Font smoothing for webkit.\ntile.style.webkitFontSmoothing = \"antialiased\";\n\n// Listen to mouse events for the tile.\ntile.addEventListener('mousedown', MouseDown, false);\n\n}\n\n\nvar pushTile = function( x, y ){\n\n// Get the elements width and height.\nvar width = tile.offsetWidth;\nvar height = tile.offsetHeight;\n\nvar translateString = \"perspective( 800px ) \";\n\n\n/* Tilt based on position clicked\n*\n* Not quite sure how msft do this, but here's my logic:\n*\n* If the click is closer to the left, right, top or bottom:\n* Then tilt in that direction\n*\n* Unless the click is in the middle quater of the tile:\n* In which case, push the tile down.\n*\n*/\n\n// If the click is in the center quater of the element, push down.\nif ( x > width/4 && x < (width/4 * 3) && y > height/4 && y < (height/4 * 3) ) {\ntile.style.webkitTransformOrigin = \"50% 50%\";\ntile.style.MozTransformOrigin = \"50% 50%\";\ntile.style.msTransformOrigin = \"50% 50%\";\ntile.style.oTransformOrigin = \"50% 50%\";\ntile.style.transformOrigin = \"50% 50%\";\nvar trans = 40 / (width/150);\ntranslateString += \"rotateX( 0deg ) rotateY( 0deg ) translateZ(\" + -trans +\"px )\";\n}\n\n// is the user closer to the right/left hand side?\nelse if ( Math.min( x, width - x) < Math.min( y, height - y) ) {\nvar deg = 10 / (width/150) ;\n// Tilt on the left side\nif ( x < width - x ) {\n\ntile.style.webkitTransformOrigin = \"100% 50%\";\ntile.style.MozTransformOrigin = \"100% 50%\";\ntile.style.msTransformOrigin = \"100% 50%\";\ntile.style.oTransformOrigin = \"100% 50%\";\ntile.style.transformOrigin = \"100% 50%\";\ntranslateString += \"rotateX( 0deg ) rotateY( \"+ -deg + \"deg ) translateZ( -0px )\";\n\n// Tilt on the right side\n} else {\n\ntile.style.webkitTransformOrigin = \"0% 50%\";\ntile.style.MozTransformOrigin = \"0% 50%\";\ntile.style.msTransformOrigin = \"0% 50%\";\ntile.style.oTransformOrigin = \"0% 50%\";\ntile.style.transformOrigin = \"0% 50%\";\ntranslateString += \"rotateX( 0deg ) rotateY( \"+ deg + \"deg ) translateZ( -0px )\";\n}\n\n// the user is closer to the top/bottom side (also the default)\n} else {\nvar incline = 10 / (height/150);\n// Tilt on the top\nif ( y < height - y ) {\n\ntile.style.webkitTransformOrigin = \"50% 100%\";\ntile.style.MozTransformOrigin = \"50% 100%\";\ntile.style.msTransformOrigin = \"50% 100%\";\ntile.style.oTransformOrigin = \"50% 100%\";\ntile.style.transformOrigin = \"50% 100%\";\ntranslateString += \"rotateX( \"+incline+\"deg ) rotateY( 0deg ) translateZ( -0px )\";\n\n// Tilt on the bottom\n} else {\n\ntile.style.webkitTransformOrigin = \"50% 0%\";\ntile.style.MozTransformOrigin = \"50% 0%\";\ntile.style.msTransformOrigin = \"50% 0%\";\ntile.style.oTransformOrigin = \"50% 0%\";\ntile.style.transformOrigin = \"50% 0%\";\ntranslateString += \"rotateX( \"+ -incline +\"deg ) rotateY( 0deg ) translateZ( -0px )\";\n}\n}\n\n// Apply transformation to tile.\ntile.style.webkitTransform = translateString;\ntile.style.MozTransform = translateString;\ntile.style.msTransform = translateString;\ntile.style.oTransform = translateString;\ntile.style.transform = translateString;\n\ndocument.addEventListener('mouseup', MouseUp, false);\n\n};\n\nvar MouseDown = function( event ){\n\n// Chrome\nif ( event.offsetX ) {\npushTile( event.offsetX, event.offsetY );\nreturn;\n}\n\n// Non offsetX browsers\nvar tilePosition = elementPosition( tile );\nvar x = event.pageX - tilePosition.x;\nvar y = event.pageY - tilePosition.y;\n\npushTile( x, y );\n\n};\n\n\nvar MouseUp = function( event ){\n\n// Set the element to its idle state\ntile.style.webkitTransform = idleCss;\ntile.style.MozTransform = idleCss;\ntile.style.msTransform = idleCss;\ntile.style.oTransform = idleCss;\ntile.style.transform = idleCss;\n\ndocument.removeEventListener('mouseup', MouseUp, false);\n};\n\n// Element position finding for non webkit browsers.\n// How will this perform on mobile?\nvar getNumericStyleProperty = function(style, prop){\n return parseInt(style.getPropertyValue(prop),10) ;\n}\n\nvar elementPosition = function( e ){\nvar x = 0, y = 0;\nvar inner = true ;\ndo {\nx += e.offsetLeft;\ny += e.offsetTop;\nvar style = getComputedStyle(e,null) ;\nvar borderTop = getNumericStyleProperty(style,\"border-top-width\") ;\nvar borderLeft = getNumericStyleProperty(style,\"border-left-width\") ;\ny += borderTop ;\nx += borderLeft ;\nif (inner){\nvar paddingTop = getNumericStyleProperty(style,\"padding-top\") ;\nvar paddingLeft = getNumericStyleProperty(style,\"padding-left\") ;\ny += paddingTop ;\nx += paddingLeft ;\n}\ninner = false ;\n} while (e = e.offsetParent);\nreturn { x: x, y: y };\n}\n\n// Initialize the tile.\ninitialize();\n}", "handleMouseDown(row, col) {\n const newGrid = getNewGridWithWallToggled(this.state.grid, row, col);\n this.setState({grid: newGrid, mouseIsPressed: true});\n }", "tileSelected(obj){\n var new_sections = this.state.breadcrumb_sections; \n \n // Check if the third index exists\n if (new_sections[2]) {\n // Remove it\n new_sections.splice(2, 1);\n }\n \n // Update the state of all other breadcrumb options\n new_sections.push({ key: obj.stock_symbol, content: obj.stock_symbol, active: true })\n new_sections[0].active = false;\n new_sections[1].active = false;\n new_sections[0].onClick = (event, data) => this.onBreadcrumbClick(data);\n new_sections[1].onClick = (event, data) => this.onBreadcrumbClick(data);\n \n this.setState({\n stock: obj.stock_symbol,\n stock_show: true,\n grid_show: false\n });\n }", "function newBoard(){ \n\t // Reset the counter\n\t for(var i = 0; i < 16; i++)\n\t\t\ttileClickCount[i] = 0;\n\t // Reset the variables\n\t last_flipped_id = -1;\n\n\t tiles_flipped = 0; \n\t tiles_cleared = []; \n\n\t // Shuffle the formulas\n\t var formulasAndXValues = [];\n\t for (var i = 0; i < formulas.length; i++)\n\t\t\tformulasAndXValues.push({\"id\": i, \"formula\": formulas[i], \"xval\": xvalues[i]});\n\n\t // Shuffle the order\n\t //formulasAndXValues = shuffle(formulasAndXValues);\n\n\t var output = ''; \n\t for(var i = 0; i < formulas.length; i++)\n\t {\n\t\t\tvar obj = formulasAndXValues[i];\n\t\t\toutput += '<div id=\"tile_' +obj[\"id\"]+ '\" onclick=\"memoryFlipTile(this,\\''+obj[\"id\"]+'\\')\"></div>'; \n\t }\n\n\t document.getElementById('memory_board').innerHTML = output; \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 }", "function onTileClick(data, objTile){\n\t\t\n\t\tobjTile = jQuery(objTile);\t\t\n\t\t\n\t\tvar objItem = g_objTileDesign.getItemByTile(objTile);\n\t\tvar index = objItem.index;\t\t\n\t\t\n\t\tg_lightbox.open(index);\n\t}", "function mouseClicked() {\n let x = floor (mouseX / sz);\n let y = floor (mouseY / sz);\n if (grid[x][y] == '') {\n if (turn == 0) {\n turn = 1;\n } else {\n turn = 0;\n }\n grid[x][y] = players[turn];\n redraw();\n }\n}", "handleClick(i){\r\n const history= this.state.history.slice(0,this.state.stepNumber+1);\r\n const current=history[history.length-1];\r\n const squares =current.squares.slice();\r\n const winner=winnerYay(squares);\r\n if(winner || squares[i]){\r\n return;\r\n }\r\n //check state\r\n squares[i]=this.state.xIsNext?'x':'o';\r\n this.setState({\r\n history:history.concat({\r\n squares:squares\r\n }) ,\r\n xIsNext:!this.state.xIsNext,\r\n stepNumber:history.length\r\n })\r\n \r\n }", "function onClick() { //This function is called on row 194\n if (!(event.target.classList.contains('clicked'))) {\n if (player1.classList.contains('active')) {\n event.target.classList.add('box-filled-1');\n event.target.classList.add('clicked');\n player1Moves.push(event.target.id);\n checkForActive(player1, player2);\n checkForWin(player1Moves);\n } else if (blockXMoves()) {\n event.target.classList.add('box-filled-2');\n event.target.classList.add('clicked');\n player2Moves.push(event.target.id);\n player2Selections.push(event.target);\n checkForActive(player2, player1);\n checkForWin(player2Moves);\n }\n }\n}", "function click_tile_callback(tile_info){\n console.log('tile callback');\n console.log('clicking on ' + tile_info.row + ' row and ' + tile_info.col + ' col with value ' + String(tile_info.value))\n }", "handleSquareClick(i,j){\n\t\tvar square,\n\t\tresult,\n\t\tgameState;\n\t\tsquare = this.state.square.clone2DArray();\n\n\t\tif(square[i][j] || this.state.currentPlayer !== this.userPlayer ){\n\t\t\treturn ;\n\t\t}\n\n\t\tsquare[i][j] = this.state.currentSymbol;\n\n\t\tresult = calculateWinner(square);\n\t\t\n\t\t//if game is tied return\n\t\tif(result.isFinished && result.isTied){\n\n\t\t\tthis.setState({\n\t\t\t\tsquare : square,\n\t\t\t\tisTied : true,\n\t\t\t\tisFinished : true\n\t\t\t});\n\t\t\tthis.startNewGame();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(result.isFinished){\n\t\t\tthis.handleGameFinish(square , result );\n\t\t}else{\n\n\t\t\tthis.setState({\n\t\t\t\tsquare : square,\n\t\t\t\tcurrentSymbol : (this.state.currentSymbol===\"X\") ? \"0\" : \"X\",\n\t\t\t\tcurrentPlayer : this.state.currentPlayer === \"playerOne\" ? \"playerTwo\" : \"playerOne\"\n\t\t\t});\n\n\n\t\t}\n\t\t\n\t}", "function tileEventHandler(current){\n let tile = board[current];\n sendChatMessage(\"Current tile: \" + tile.description);\n let modifyMessage = \"\";\n\n if (current == 0 || tile.description.startsWith(\"Just Visiting\")){\n sendChatMessage(\"Rolling again...\");\n setTimeout(roll, 3000);\n }\n else if (tile.description.startsWith(\"Gacha\")){\n sendChatMessage(\"Time for RNGesus :pray:\");\n diceResult = getRandomIntInclusive(1, 6);\n handleGacha(diceResult);\n modifyMessage = gacha[diceResult-1];\n }\n else if (tile.description.startsWith(\"Trap\") || tile.description.startsWith(\"ARTS\")\n || tile.description.startsWith(\"Counter\")){\n sendChatMessage(\"Time for RNGesus :pray:\");\n diceResult = getRandomIntInclusive(1, 6);\n handleMystery(diceResult, tile);\n }\n else if (tile.description === \"RAPE!!\"){\n sendChatMessage(\"Yameteeeeee!!!\");\n sendChatMessage(\"Rape settings: Quiz settings Randomized\");\n modifyMessage = \"Quiz settings Randomized\";\n randomize();\n }\n else if (tile.description === \"Ugly Bastard\"){\n sendChatMessage(\"We can't escape Ugly Bastard.\");\n sendChatMessage(\"Song difficulty: 0-20\");\n modifyMessage = \"Song difficulty: 0-20\";\n curDiffRange = [0,20];\n setDifficulty(curDiffRange);\n }\n else if (tile.description === \"Drugs\"){\n sendChatMessage(\"Drugs are bad kids, don't do drugs.\");\n sendChatMessage(\"Guess time: 10 seconds\");\n modifyMessage = \"Guess time: 10 seconds\";\n curGuessTime = 10;\n setGuessTime(curGuessTime);\n }\n else if (tile.description === \"NTR\"){\n sendChatMessage(\"Everyone gets to choose a partner to coop with. First come, first served.\");\n sendChatMessage(\"Choose your partner now!\");\n modifyMessage = \"Co-op with partner\";\n addModifier(modifyMessage);\n }\n else if (tile.description === \"APT-kun\"){\n sendChatMessage(\"Since APT-kun is a training wagon and not meant to be commonly used\");\n sendChatMessage(\"Show type: no TV\");\n modifyMessage = \"Show type: no TV\";\n tv = false;\n changeTVSelection(tv);\n }\n else if (tile.description === \"Flying Pussyfoot\"){\n sendChatMessage(\"Baccano! characters are immortal\");\n sendChatMessage(\"Everyone starts with 3 lives\");\n modifyMessage = \"Everyone starts with 3 lives\";\n lives = 3;\n }\n else if (tile.description === \"Galaxy Express 999\"){\n sendChatMessage(\"\\\"Back in my days, anime wasn't only isekai trash\\\"\");\n sendChatMessage(\"Year range: 1950-2000\");\n modifyMessage = \"Year range: 1950-2000\";\n curYearRange = [1950,2000];\n setYears(curYearRange);\n }\n else if (tile.description === \"Kotetsujou\"){\n sendChatMessage(\"Kabaneri was a clusterfuck, there's no better settings to describe it than this.\");\n sendChatMessage(\"Song selection: Random\");\n modifyMessage = \"Song selection: Random\";\n curType = 1;\n setSongSelection(curType);\n }\n else if (tile.description === \"Go to Jail\"){\n sendChatMessage(\"You're in Jail, but since you're a cute anime girl, guards let you out but supervise you\");\n sendChatMessage(\"No dropdown\");\n modifyMessage = \"No dropdown\";\n current = 10;\n }\n else if (tile.description === \"Kansei Durifto!?\"){\n sendChatMessage(\"*Eurobeat intensifies*\");\n sendChatMessage(\"Playback Speed x2\");\n modifyMessage = \"Playback Speed x2\";\n curSpeed = 2;\n setSpeed(curSpeed);\n }\n if (current != 0 && !tile.description.startsWith(\"Just Visiting\") && modifyMessage !== \"\" && modifyMessage !== \"Co-op with partner\"){\n addModifier(modifyMessage);\n sendChatMessage(\"Rolling again...\");\n setTimeout(roll, 3000);\n }\n else {\n if (tags.indexOf(tile.description) >= 0){\n if (tile.owner !== \"\"){\n let ownerLives = lives + 1;\n let owner = tile.owner;\n let description = tile.description;\n let filteredTiles = board.filter(checkOwnerShip);\n filteredTiles = filteredTiles.filter(checkTile);\n if (chosenTags.indexOf(description) > 0 && chosenTags.indexOf(description) < 7) {\n if (filteredTiles.length === 3){\n ownerLives ++;\n }\n }\n else if (filteredTiles.length === 2){\n ownerLives ++;\n }\n setLives(ownerLives);\n sendChatMessage(owner + \": \" + ownerLives + \" lives, everyone else \" + lives + \" lives\");\n }\n else {\n setLives(lives);\n sendChatMessage(\"Everyone: \" + lives + \" lives\");\n }\n if (!tagless){\n curTag = tile.description;\n }\n setTag();\n displayModifiers();\n setTimeout(() => { lobby.changeGameSettings(); },1);\n setTimeout(() => { updateModifiers(); },1);\n }\n }\n}", "function clickHandler(e, thisSquare) {\n let squareCoords = {\n userId: $(thisSquare).data('user-id'),\n row: $(thisSquare).data('row'),\n col: $(thisSquare).data('col')\n };\n // Register a board-click on the recently-clicked square\n state.registerBoardClick(squareCoords);\n // Store mouseclick coords for rendering a picked-up ship\n state.shipPickedUp.mouseX = e.pageX;\n state.shipPickedUp.mouseY = e.pageY;\n\n }", "handleClick(i) {\n\t const history = this.state.history.slice(0, this.state.stepNumber + 1);\n const current = history[history.length - 1];\n const squares = current.squares.slice();\n\t \n\t if (calculateWinner(squares) || squares[i]) {\n\t\t return;\n\t }\n\t \n\t // if squares[i] = this.state.xIsNext, return X, if not, then return O\n\t squares[i] = this.state.xIsNext ? 'X' : 'O';\n\t // set board state with squares again, and change boolean value of xIsNext\n\t this.setState({\n\t history: history.concat([{\n\t squares: squares\n\t }]),\n\t stepNumber: history.length,\n\t xIsNext: !this.state.xIsNext,\n\t });\n }", "handleClick(i){\n const history = this.state.history.slice(0, this.state.stepNumber + 1);\n const current = history[history.length - 1];\n const squares = current.squares.slice();\n // If someone has won or the square is occupied already then the game stops\n // responding and filling in squares.\n if (calculateWinner(squares) || squares[i]) {\n return;\n }\n squares[i] = this.state.xIsNext ? 'X' : 'O';\n this.setState({\n // Add the current history of squares to the array/list of history states.\n history: history.concat([{\n squares: squares,\n }]),\n stepNumber: history.length,\n xIsNext: !this.state.xIsNext,\n });\n }", "function move2(){\n // only run if there isnt a tile being placed\n if(immobile) {\n return;\n }\n console.log(\"move2 was called\");\n var currentSurroundingTiles = getSurroundingTiles();\n var i;\n var keyCode = event.keyCode;\n console.log(\"the key code is \" + keyCode);\n // todo\n // there is a problem with stage tiles if you move using the buttons\n\n switch (keyCode) {\n // down 's'\n case(83):\n case(40):\n // down ^\n if (currentGameBoard[currentPlayer.rowLocation + 1][currentPlayer.colLocation].staged) {\n flipTile2(currentPlayer.rowLocation + 1, currentPlayer.colLocation);\n }\n else if (currentGameBoard[currentPlayer.rowLocation + 1][currentPlayer.colLocation].connected) {\n\n //resets move options now that the player has moved\n for (i = 0; i < currentSurroundingTiles.length; i++) {\n currentSurroundingTiles[i].connected = false;\n }\n //if there isnt a chest then just move player, otherwise draw the chest again once the player leaves the square\n if(currentGameBoard[currentPlayer.rowLocation][currentPlayer.colLocation].droppedItem === \"\") document.getElementById(currentPlayer.rowLocation + \",\" + currentPlayer.colLocation).innerHTML = \"\";\n else{\n document.getElementById(currentPlayer.rowLocation + \",\" + currentPlayer.colLocation).innerHTML = \"<img src =\"+items.chest.image +\">\";\n }\n currentPlayer.rowLocation++;\n //win condition\n if (currentPlayer.rowLocation === startingTileRow && currentPlayer.colLocation === startingTileCol && currentPlayer.gold >= 25) {\n document.getElementById(\"win\").play();\n document.getElementById(\"message\").innerHTML = \"You win!\";\n document.getElementById(\"message\").style.display = \"inline\";\n }\n document.getElementById(currentPlayer.rowLocation + \",\" + currentPlayer.colLocation).innerHTML = \"<img src=\" + currentPlayer.image + \">\";\n clearClickableSettings();\n setOnclickSettings();\n document.getElementById(\"deck\").onclick = stageTiles;\n }\n break;\n // right 'D'\n case(68):\n case(39):\n // right >\n if (currentGameBoard[currentPlayer.rowLocation][currentPlayer.colLocation + 1].staged) {\n flipTile2(currentPlayer.rowLocation, currentPlayer.colLocation + 1);\n }\n else if (currentGameBoard[currentPlayer.rowLocation][currentPlayer.colLocation + 1].connected) {\n for (i = 0; i < currentSurroundingTiles.length; i++) {\n currentSurroundingTiles[i].connected = false;\n }\n //if there isnt a chest then just move player, otherwise draw the chest again once the player leaves the square\n if(currentGameBoard[currentPlayer.rowLocation][currentPlayer.colLocation].droppedItem === \"\") document.getElementById(currentPlayer.rowLocation + \",\" + currentPlayer.colLocation).innerHTML = \"\";\n else{\n document.getElementById(currentPlayer.rowLocation + \",\" + currentPlayer.colLocation).innerHTML = \"<img src =\"+items.chest.image +\">\";\n }\n currentPlayer.colLocation++;\n //win condition\n if (currentPlayer.rowLocation === startingTileRow && currentPlayer.colLocation === startingTileCol && currentPlayer.gold >= 25) {\n document.getElementById(\"win\").play();\n document.getElementById(\"message\").innerHTML = \"You win!\";\n document.getElementById(\"message\").style.display = \"inline\";\n }\n document.getElementById(currentPlayer.rowLocation + \",\" + currentPlayer.colLocation).innerHTML = \"<img src=\" + currentPlayer.image + \">\";\n clearClickableSettings();\n setOnclickSettings();\n document.getElementById(\"deck\").onclick = stageTiles;\n }\n break;\n // up ^\n case(38):\n case(87):\n // up 'W'\n if (currentGameBoard[currentPlayer.rowLocation - 1][currentPlayer.colLocation].staged) {\n flipTile2(currentPlayer.rowLocation - 1, currentPlayer.colLocation);\n }\n else if (currentGameBoard[currentPlayer.rowLocation - 1][currentPlayer.colLocation].connected) {\n for (i = 0; i < currentSurroundingTiles.length; i++) {\n currentSurroundingTiles[i].connected = false;\n }\n //if there isnt a chest then just move player, otherwise draw the chest again once the player leaves the square\n if(currentGameBoard[currentPlayer.rowLocation][currentPlayer.colLocation].droppedItem === \"\") document.getElementById(currentPlayer.rowLocation + \",\" + currentPlayer.colLocation).innerHTML = \"\";\n else{\n document.getElementById(currentPlayer.rowLocation + \",\" + currentPlayer.colLocation).innerHTML = \"<img src =\"+items.chest.image +\">\";\n }\n currentPlayer.rowLocation--;\n //win condition\n if (currentPlayer.rowLocation === startingTileRow && currentPlayer.colLocation === startingTileCol && currentPlayer.gold >= 25) {\n document.getElementById(\"win\").play();\n document.getElementById(\"message\").innerHTML = \"You win!\";\n document.getElementById(\"message\").style.display = \"inline\";\n }\n document.getElementById(currentPlayer.rowLocation + \",\" + currentPlayer.colLocation).innerHTML = \"<img src=\" + currentPlayer.image + \">\";\n clearClickableSettings();\n setOnclickSettings();\n document.getElementById(\"deck\").onclick = stageTiles;\n }\n break;\n // left <\n case(37):\n case(65):\n // left 'A'\n if (currentGameBoard[currentPlayer.rowLocation][currentPlayer.colLocation - 1].staged) {\n flipTile2(currentPlayer.rowLocation, currentPlayer.colLocation - 1);\n }\n else if (currentGameBoard[currentPlayer.rowLocation][currentPlayer.colLocation - 1].connected) {\n for (i = 0; i < currentSurroundingTiles.length; i++) {\n currentSurroundingTiles[i].connected = false;\n }\n //if there isnt a chest then just move player, otherwise draw the chest again once the player leaves the square\n if(currentGameBoard[currentPlayer.rowLocation][currentPlayer.colLocation].droppedItem === \"\") document.getElementById(currentPlayer.rowLocation + \",\" + currentPlayer.colLocation).innerHTML = \"\";\n else if(currentGameBoard[currentPlayer.rowLocation][currentPlayer.colLocation].droppedItem === \"chest\"){\n document.getElementById(currentPlayer.rowLocation + \",\" + currentPlayer.colLocation).innerHTML = \"<img src =\"+items.chest.image +\">\";\n }\n currentPlayer.colLocation--;\n //win condition\n if (currentPlayer.rowLocation === startingTileRow && currentPlayer.colLocation === startingTileCol && currentPlayer.gold >= 25) {\n document.getElementById(\"win\").play();\n document.getElementById(\"message\").innerHTML = \"You win!\";\n document.getElementById(\"message\").style.display = \"inline\";\n }\n document.getElementById(currentPlayer.rowLocation + \",\" + currentPlayer.colLocation).innerHTML = \"<img src=\" + currentPlayer.image + \">\";\n clearClickableSettings();\n setOnclickSettings();\n document.getElementById(\"deck\").onclick = stageTiles;\n }\n break;\n }\n var chest = false;\n switch (currentGameBoard[currentPlayer.rowLocation][currentPlayer.colLocation].droppedItem) {\n case(\"bread\"):\n //recover health\n currentPlayer.hp += 1;\n break;\n case(\"key\"):\n //add a key to player inventory\n currentPlayer.keys += 1;\n break;\n case(\"chest\"):\n //if player has a key, open chest, if not.... dont\n if(currentPlayer.keys > 0){\n currentPlayer.keys -= 1;\n currentPlayer.gold += 5;\n }else{\n chest = true;\n }\n\n break;\n case(\"sword\"):\n //add sword to player inventory and add 1 to attack\n currentPlayer.attack += 1;\n currentPlayer.hasSword = true;\n //\n break;\n default:\n //there is no droppedItem, so do nothing\n break;\n }\n updateStats();\n if(!chest) currentGameBoard[currentPlayer.rowLocation][currentPlayer.colLocation].droppedItem = \"\";\n // update currentConnected[]\n currentConnectedTiles = [];\n getSurroundingTiles();\n}", "handleSquareClick(i) {\n\t\tconst history = this.state.history.slice(0, this.state.stepNumber + 1);\n\t\tconst current = history[history.length -1];\n\t\tconst squares = current.squares.slice();\n\n\t\tif (squares[i] || this.state.winnerSquares) {\n\t\t\treturn;\n\t\t}\n \n\t\tsquares[i] = this.state.nextPlayer;\n\t\t\n\t\t// Check for winner\n\t\tlet winnerSquares = this.calculateWinnerSquares(squares, true);\n\t\tlet winner = winnerSquares ? squares[winnerSquares[0]] : null;\n\t\tlet showTrophy = winner ? true : false;\n\t\t\n\t\tthis.setState({\n\t\t\thistory: history.concat([{\n\t\t\t\tsquares: squares,\n\t\t\t}]),\n\t\t\tstepNumber: history.length,\n\t\t\tnextPlayer: this.getNextPlayer(history.length),\n\t\t\twinner: winner,\n\t\t\twinnerSquares: winnerSquares,\n\t\t\thover: null,\n\t\t\tshowTrophy: showTrophy\n\t\t});\n\t}", "function handleClick(evt) {\n if (turn === 1) {\n evt.target.classList.add('puppy')\n } else if (turn === -1) {\n evt.target.classList.add('kitten')\n } else {\n return\n }\n turn *= -1;\n render();\n}", "function mouse_click_game(mx, my) {\n console.log('Clicked on tile at (' + Math.floor(mx / 32) + ', ' + Math.floor(my / 32) + ').');\n }", "function App() {\n const[selected, setSelected] = useState(-1);\n\n /*\n The following are the 3 default tiles;\n In the future, we can use setTiles to implement the real data source\n */\n const[tiles, setTiles] = useState([\n {\n id: 0,\n title: 'title1',\n subtitle: 'subtitle1'\n },\n {\n id: 1,\n title: 'title2',\n subtitle: 'subtitle2'\n },\n {\n id: 2,\n title: 'title3',\n subtitle: 'subtitle3'\n }\n ]);\n \n /*\n Use map method to iterate over the data source and display the values of title and subtitle as follows.\n The number of tiles and content of titles are dynamic based on the variable tiles, which is default value now\n */\n const menu = tiles.map((tile, index)=>{\n \n const handleOnClick = (index) =>{\n setSelected(index);\n }\n\n //styling the button to make it align center and keep bottom in the Card\n const bottom = {\n position:'absolute',\n bottom: '30px',\n transform:\"translateX(-50%)\",\n cursor: \"pointer\"\n }\n \n //Two style objects for before and after toggled\n const before = {\n height:\"300px\", position:\"relative\",\n backgroundColor: '#fff'\n }\n\n const after = {\n height:\"300px\", position:\"relative\",\n backgroundColor: '#ccc'\n }\n \n return(\n <div key={tile.id} className=\"col-12 col-md-4\">\n {/* Responsive grids, the container for each tile will cover whole width of the page in extra small screen size,\n and the div only cover one third width of the page in medium to extra large screen size*/}\n \n {/* use ternary operator to show backgroundColor of the Card, if it's toggled or not */}\n <Card style={index === selected ? after : before}>\n <CardBody className=\"text-center\">\n <CardTitle className=\"h2 m-3\">{tile.title}</CardTitle>\n <CardSubtitle className=\"h4 m-3\">{tile.subtitle}</CardSubtitle>\n {/* Pass the tile index as a parameter to the onClick event handler */}\n <Button style={bottom} color=\"primary\" onClick={()=>handleOnClick(index)}>\n Select\n </Button>\n </CardBody>\n </Card>\n </div>\n )\n })\n\n return (\n <div className=\"container\">\n <div className=\"row mt-5\">\n {menu}\n </div>\n </div>\n );\n}", "function canvasClick(e){\n var x;\n var y;\n // grab html page coords\n if (e.pageX != undefined && e.pageY != undefined){\n x = e.pageX;\n y = e.pageY;\n }\n else{\n x = e.clientX + document.body.scrollLeft +\n document.documentElement.scrollLeft;\n y = e.clientY + document.body.scrollTop +\n document.documentElement.scrollTop;\n }\n // make them relative to the canvas only\n x -= canvas.offsetLeft;\n y -= canvas.offsetTop;\n // return tile x,y that we clicked\n var cell = [\n Math.floor(x/tileWidth),\n Math.floor(y/tileHeight)\n ];\n // now we know while tile we clicked\n console.log('we clicked tile '+ cell[0] + ',' + cell[1]);\n pathStart = pathEnd;\n pathEnd = cell;\n // calculate path\n currentPath = findPath( world,pathStart,pathEnd );\n worldDraw();\n}", "gridClick(gridNr) {\n //get the current grid values\n var newGrids = this.state.gridValues.slice();\n\n //Don't do anything if the grid is already used\n if(newGrids[gridNr] != null || this.calcWinner() != null) {\n return;\n }\n\n\n //set the value of the grid depending on who's turn it was\n newGrids[gridNr] = this.state.xTurn ? 'X' : 'O';\n\n //add fieldState to the history\n let newHistory = this.state.history;\n let turn = Object.keys(newHistory).length;\n newHistory[turn] = newGrids;\n\n this.setState({\n gridValues: newGrids,\n xTurn: !this.state.xTurn,\n history: newHistory,\n });\n }", "function onMouseDown(e) {\n //Pega a posição\n var pos = getMousePos(canvas, e);\n //Começa o arrastar\n if (gameState == gameStates.ready && !pause && !gameOver) {\n if (!drag) {\n //Tile sob o mouse\n mt = getMouseTile(pos);\n if (mt.valid) {\n var swapped = false;\n if (level.selectedtile.selected) {\n if (canSwap(mt.x, mt.y, level.selectedtile.column, level.selectedtile.row)) {\n //Pode trocar, mova-os\n mouseSwap(mt.x, mt.y, level.selectedtile.column, level.selectedtile.row);\n swapped = true;\n }\n }\n if (!swapped) {\n //Faz o tile selecionado\n level.selectedtile.column = mt.x;\n level.selectedtile.row = mt.y;\n level.selectedtile.selected = true;\n }\n } else {\n //Tile invalido\n level.selectedtile.selected = false;\n }\n //Começa o arrastar\n drag = true;\n }\n }\n //Verificação de clique nos botões\n if (pos.x >= buttons[0].x && pos.x < buttons[0].x + buttons[0].w && pos.y >= buttons[0].y && pos.y < buttons[0].y + buttons[0].h) {\n if (!gameOver && gameState != gameStates.init) {\n pause = !pause;\n }\n }\n if (gameState == gameStates.init) {\n if (pos.x >= buttons[3].x && pos.x < buttons[3].x + buttons[3].w && pos.y >= buttons[3].y && pos.y < buttons[3].y + buttons[3].h) {\n firsTime = false;\n gameState = gameStates.ready;\n }\n }\n if (pause || gameOver) {\n for (var i = 1; i < buttons.length; i++) {\n if (pos.x >= buttons[i].x && pos.x < buttons[i].x + buttons[i].w && pos.y >= buttons[i].y && pos.y < buttons[i].y + buttons[i].h) {\n switch (i) {\n case 1:\n window.cancelAnimationFrame(vari);\n window.score = Math.floor(score / 4);\n if (score > high) localStorage.high = score;\n canvas.removeEventListener(\"mousemove\", onMouseMove);\n canvas.removeEventListener(\"mousedown\", onMouseDown);\n window.nav = 3;\n window.troca = 2;\n break;\n case 2:\n newGame();\n firsTime = true;\n break;\n case 3:\n pause = false;\n break;\n }\n }\n }\n }\n }", "function battleMapTowerPlaceClickedStateChangeStarter(towerPlaceNumber, clickedSlotHTML) {\n store.dispatch( {\n type: TOWER_CLICKED,\n payload: {\n activeTowerSlot: towerPlaceNumber,\n clickedSlotHTML: clickedSlotHTML,\n isBuildMenuOpen: true,\n towerSlotToBuild: towerPlaceNumber\n }\n });\n }", "function newTile() {\n\n // Create a new tile\n createdTile = document.createElement(\"div\");\n\n createdTile.setAttribute(\"position\", \"absolute\");\n createdTile.setAttribute(\"class\", \"tile\");\n\n // Find the empty corners\n var emptyCorners = [];\n if (!tileArray[0][0]) {\n emptyCorners.push(\"tile-1\");\n }\n if (!tileArray[0][3]) {\n emptyCorners.push(\"tile-4\");\n }\n if (!tileArray[3][0]) {\n emptyCorners.push(\"tile-13\");\n }\n if (!tileArray[3][3]) {\n emptyCorners.push(\"tile-16\");\n }\n\n // Of the empty corners, pick a corner for the tile to go into\n var newTileCorner = Math.floor(Math.random() * emptyCorners.length);\n\n if (emptyCorners.length > 0) {\n // Pick a corner to put the tile in\n createdTile.setAttribute(\"id\", emptyCorners[newTileCorner]);\n\n // Insert the tile into the corner\n $(\"#tile-container\").append(createdTile);\n\n // Insert the tile into the array of tiles\n if (emptyCorners[newTileCorner] == \"tile-1\") {\n tileArray[0][0] = createdTile;\n } else if (emptyCorners[newTileCorner] == \"tile-4\") {\n tileArray[0][3] = createdTile;\n } else if (emptyCorners[newTileCorner] == \"tile-13\") {\n tileArray[3][0] = createdTile;\n } else if (emptyCorners[newTileCorner] == \"tile-16\") {\n tileArray[3][3] = createdTile;\n }\n\n // Access the tile with jquery\n var $activeTile = $(\"#\" + createdTile.id);\n $activeTile.hide().fadeIn(100);\n\n // Make the new tile the same color as the old future tile\n createdTile.style.backgroundColor = futureColor;\n }\n }", "function handleClick(evt) {\n //if the game is ended, no more action\n if (gameEnded === true) {\n return false;\n }\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 false;\n }\n\n // place piece in board and add to HTML table\n placeInTable(y, x);\n\n //update the board\n board[y][x] = currPlayer;\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 if (isEntireBoardFilled()) {\n return endGame(`Game tie!`);\n }\n\n // switch players\n // TODO: switch currPlayer 1 <-> 2\n currPlayer = currPlayer === 1 ? 2 : 1;\n}", "tileListener() {\r\n //handler/listener for each tile, compare with solution after each shift \r\n for (let i = 0; i < this.tileArr.length; i++) {\r\n for (let j = 0; j < this.tileArr[i].length; j++) {\r\n (() => {\r\n let handler = () => {\r\n this.xyControl(this.tileArr[i][j].sId, this.tileArr[i][j].swapVal - 1, (this.tileArr.length * this.tileArr[i].length) - 1);\r\n this.evaluation.evaluate((cb) => {\r\n if (cb === \"Solved!\") {\r\n if (this.player !== undefined) {\r\n clearInterval(this.interval);\r\n this.player.setScore(-this.msElapsed);\r\n this.player.setGame(\"puzzle\");\r\n this.player.setX($(\"#slider\").val());\r\n this.player.setY($(\"#slider\").val());\r\n this.player.setTime(this.hmsElapsed);\r\n //this.view.viewPlayer(`${this.player.getName()}'s final score: ${this.player.getScore()}`);\r\n $(\"#name\").val(\"\");\r\n $(\"#score\").val(\"\");\r\n this.socket.emit('message', this.player);\r\n this.getXMLHttp();\r\n this.player = undefined;\r\n }\r\n this.view.playerInfo(cb);\r\n document.getElementById(\"shape\" + this.nxn).setAttribute(\"fill\", \"white\");\r\n document.dispatchEvent(this.removeEvent);\r\n }\r\n }, this.solution);\r\n };\r\n this.clickListener(true, this.tileArr[i][j], handler);\r\n\r\n document.addEventListener(\"removeListener\", () => {\r\n if (i < this.tileArr.length && j < this.tileArr[i].length) {\r\n this.clickListener(false, this.tileArr[i][j], handler);\r\n }\r\n });\r\n })();\r\n }\r\n }\r\n }" ]
[ "0.7156538", "0.70725775", "0.69551", "0.6948739", "0.69445723", "0.689793", "0.68488145", "0.6846115", "0.6833589", "0.6792237", "0.6714962", "0.6714962", "0.6707241", "0.6697729", "0.6674949", "0.6587558", "0.65588075", "0.65304506", "0.65228873", "0.6517864", "0.6499317", "0.6488733", "0.6465173", "0.646376", "0.64494383", "0.6430441", "0.64136344", "0.6398324", "0.6383952", "0.6289198", "0.6284606", "0.62713176", "0.62697667", "0.6253498", "0.62308896", "0.62184197", "0.61994576", "0.615726", "0.6156174", "0.61472005", "0.6146394", "0.6143152", "0.61393243", "0.61071324", "0.6105144", "0.60946906", "0.60889614", "0.6081391", "0.6075516", "0.60732555", "0.60676545", "0.60626704", "0.6053974", "0.60454345", "0.6040909", "0.6037562", "0.602417", "0.6023921", "0.60233134", "0.6021215", "0.6019818", "0.6017145", "0.6011467", "0.60079664", "0.6007937", "0.600505", "0.60044986", "0.5999823", "0.5995006", "0.5965903", "0.5963685", "0.5960493", "0.5957116", "0.5953505", "0.5950584", "0.5945627", "0.5943316", "0.59412694", "0.5940383", "0.59350693", "0.59340376", "0.59327966", "0.59247625", "0.5921873", "0.5917946", "0.5908815", "0.59086597", "0.5903099", "0.5894455", "0.5891838", "0.58901054", "0.58881193", "0.58871895", "0.5887002", "0.58849686", "0.58829814", "0.58811283", "0.58789057", "0.5876892", "0.5872797" ]
0.7425664
0
For resetting or restarting the game
reset() { let tilesGenerated = this.getInitialTiles() this.setState({tileData: tilesGenerated}) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function restart(){\n myGameArea.reset();\n}", "function restart() {\n game.state.restart();\n}", "function actionOnResetClick () {\n gameRestart();\n }", "function restartGame()\n{\n\tSnake.reset();\n\tMouse.changeLocation();\n\tScoreboard.reset();\n\t\n\tenterState(\"countdown\");\n}", "function restartGame() {\n\tthis.game.stats.setStats();\n\t//TODO figure out how to restart the game to reset all variables.\n\tthis.game.state.start(\"Preload\");\n}", "function restartGame() {\n\tallOpenedCards.length = 0;\n\tresetTimer();\n\tresetMoveCount();\n\tresetStar();\n\tresetCards();\n\ttoggleModal();\n\tinit();\n}", "restart() {\n\n this.snake.reset();\n this.food.reset();\n this.score = 0;\n this.scoreCounter.innerText = 0;\n this.controls.classList.remove('playing');\n this.controls.classList.remove('in-menu');\n this.board.classList.remove('game-over');\n this.board.classList.remove('leaderboard');\n\n }", "function restartGame() {\n state = STATES.READY;\n timer = 20;\n gameScore = 0;\n}", "function reset() {\n time = 120;\n gameRun = false;\n }", "function resetGame() {\n resetClockAndTime();\n resetMoves(); \n resetRatings();\n startGame();\n}", "function onRestart() {\n setGame({\n cards: helpers.generateCards(),\n firstCard: undefined,\n });\n setStartTime(0);\n setElapsedTime(0);\n timeoutIds.current.forEach((id) => clearTimeout(id));\n timeoutIds.current = [];\n setWin(false);\n setScoreCanBeSaved(false);\n }", "function reset() {\n //Reset the game\n channelResetGame();\n }", "function restartGame() {\n stopGameClock();\n resetGameClock();\n resetMoves();\n resetStars();\n resetCards();\n shuffle();\n dealTheCards();\n hidePopUp();\n gameStart = 0;\n gameTime = 0;\n moveCount = 0;\n flippedCards = [];\n matchedCards = [];\n}", "function resetGame() {\n resetClockAndTime();\n resetMoves();\n resetStars();\n initGame();\n activateCards();\n startGame();\n}", "function restartGame() {\n playGame();\n }", "function reset(){\n\n theme.play();\n\n gameState = PLAY;\n gameOver.visible = false;\n restart.visible = false;\n \n monsterGroup.destroyEach();\n \n Mario.changeAnimation(\"running\",MarioRunning);\n\n score=0;\n\n monsterGroup.destroyEach();\n\n \n}", "function restartGame() {\n //Clear the CPU sequence\n cpuSequence = [];\n //Reset count\n count = 0;\n startCpuSequence();\n }", "function restartButton(k) {\n resetGame(k);\n }", "function reset() {\n\t\t/**\n\t\t * TODO: create initial game start page and additional\n\t\t * \tinteractivity when game resets once understand more about\n\t\t * animation\n\t\t */\n\t}", "function resetGame() {\n counter = 0;\n }", "function restart() {\n //uccide i nemici prima di iniziare la nuova partita\n firstEnemy.callAll('kill');\n game.time.events.remove(enemyLaunchTimer);\n game.time.events.add(1000, Enemy);\n\n //resuscita il 'player'\n player.revive();\n player.health = 20;\n\n //il testo del punteggio totale torna visibile e viene aggiornato lo 'score'\n scoreText.visible = true;\n score = 0;\n scoreText.render();\n\n //nasconde entrambi i testi di fine gioco\n gameOver.visible = false;\n gameOver_victory.visible = false;\n\n win = false;\n }", "function reset(){\r\n gameState = PLAY;\r\n gameOver.visible = false;\r\n // restart.visible = false;\r\n enemiesGroup.destroyEach();\r\n blockGroup.destroyEach();\r\n stars1Group.destroyEach();\r\n stars2Group.destroyEach();\r\n candyGirl.addAnimation(\"running\", candygirl_running);\r\n score = 0;\r\n}", "function restart() {}", "function restart() {\n level = 1;\n gamePattern = [];\n userClickedPattern = [];\n startGame = false;\n //console.log(\"restarted\");\n}", "function restartGame() {\n openCards = 0;\n clearTimer();\n clearMoves();\n clearStars();\n clearBoard();\n shuffleCards();\n\n}", "function resetGame() {\n gBoard = buildBoard();\n gGame.shownCount = 0;\n gGame.isOn = false;\n gLivesCount = 3;\n}", "function resetGame() {\n resetTimer();\n resetMoves();\n resetStars();\n shuffleDeck();\n resetCards();\n}", "function restart () {\n quiz.isGameOver = false\n quiz.currentQuestion = 0\n quiz.player1Score = 0\n quiz.player2Score = 0\n}", "restart() {\r\n\r\n this.snake.reset();\r\n this.controls.classList.remove('game-over');\r\n this.board.classList.remove('game-over');\r\n\r\n }", "function restartGame() {\n\tstart = false;\n}", "function resetGame() {\n stopPongGame();\n\n // reset positions\n\n // reset scores\n\n // start game again\n}", "function resetGame () { \n\t\t\t\t\t\t\tblueNum = 0;\n\t\t\t\t\t\t greenNum = 0;\n\t\t\t\t\t\t\tredNum = 0;\n\t\t\t\t\t\t\tyellowNum = 0;\n\t\t\t\t\t\t scoreResult=0;\n\t\t\t\t\t\t\ttargetScore = 0;\n\t\t\t\t\t\t\tgetNumber(); // Restart the game and assigns new traget number\n\t\t\t\t\t\t\tscoreBoard(); // Update the score board with new values.\n\t\t}", "function restartGame() {\n pipesGroup.clear(true, true);\n pipesGroup.clear(true, true);\n gapsGroup.clear(true, true);\n scoreboardGroup.clear(true, true);\n player.destroy();\n gameOverBanner.visible = false;\n restartButton.visible = false;\n\n const gameScene = game.scene.scenes[0];\n prepareGame(gameScene);\n\n gameScene.physics.resume();\n}", "function resetGame() {\n location.reload();\n }", "function resetGame() {\n clearGameCards();\n resetMoves();\n resetTimer();\n}", "function resetCurrentGame() {\n clearGameCards();\n resetMoves();\n resetTimer();\n startGame();\n resetGameSound();\n}", "function reset() {\n timesPlayed = -1;\n right = 0;\n wrong = 0;\n startGame ();\n }", "function restart() {\n\tplayer.stage = 0; // reset stage counter\n\tplayer.sprite = player.playerChar[player.stage];// reset player character\n\tplayer.resetPos(); //reset player position\n\twindow.open(\"#close\", \"_self\"); // close popup\n}", "function resetGame() {\n stopGoodTones();\n stopErrTone();\n clearScore();\n game.genSeq = [];\n game.playerSeq = [];\n game.err = false;\n }", "function resetGame () {\n resetBricks ();\n store.commit ('setScore', 0);\n store.commit ('setLives', 3);\n resetBoard ();\n draw ();\n}", "function restart() {\n grid = createGrid(currentLevel);\n stepCount = 0;\n requestAnimationFrame(drawCanvas);\n win = false;\n scoreSet = false; //Set boolean to false\n}", "resetGame() {\n\t\t//stop game\n\t\tthis.running = false\n\t\tclearInterval(this.loop);\n\n\t\t//set original values\n\t\tthis.aliens = [1, 3, 5, 7, 9, 23, 25, 27, 29, 31];\n\t\tthis.direction = 1;\n\t\tthis.ship = [104, 114, 115, 116];\n\t\tthis.missiles = [];\n\t\tthis.level = 1;\n\t\tthis.currentLevel = 1;\n\t\tthis.speed = 512;\n\t\tthis.score = 0;\n\n\t\tconsole.log(\"Game reset.\");\n\t}", "function resetGame() {\n window.cancelAnimationFrame(anim_id);\n playing = false;\n score = 0;\n level = 1;\n new_game = true;\n speed = init_speed\n direction = ''\n snake.reset(init_speed);\n fruit.reset();\n }", "function resetGame(){\n console.log(gamePaused);\n gamePaused=false;\n console.log(gamePaused);\n if(!gamePaused && !stopGame){\n removeModal(); \n playGame();\n } else{\n removeModal();\n addCirclesToHoverBar();\n //clearing all dots of game board\n clearGameBoard();\n clearMessageBoard(); \n changeMessageBoardBG(\"none\"); \n stopGame=false;\n count=30;\n startGame();\n } \n}", "gameReset() {\n console.log('reset!');\n }", "function reset() {\n generateLevel(0);\n Resources.setGameOver(false);\n paused = false;\n score = 0;\n lives = 3;\n level = 1;\n changeRows = false;\n pressedKeys = {\n left: false,\n right: false,\n up: false,\n down: false\n };\n }", "function restart() {\n grid = [null, null, null, null, null, null, null, null, null]\n player = 1\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 resetGame() {\n timer.stop();\n startGame();\n}", "restartGame() {\n\t\tthis.registry.destroy(); // destroy registry\n\t\tthis.events.off(); // disable all active events\n\t\tthis.scene.restart(); // restart current scene\n\t}", "function restartGame() {\n togglePanel(panel.POSTGAME)\n togglePanel(panel.PREGAME)\n}", "function resetGame() {\n location.reload()\n}", "function resetGame() {\n counter = 0;\n correctCounter = 0;\n incorrectCounter = 0;\n unansweredCounter = 0;\n timer = 30;\n startGame();\n timerHolder();\n }", "restartGame () {\n this.scene.start('gameScene')\n this.gameOver = false\n this.gameReset = true\n this.energy = 50\n this.energyText.setText('Energy: ' + this.energy.toString())\n this.score = 0\n this.scoreText.setText('Score: ' + this.score.toString())\n this.monsterDelay = 15000\n this.monsterYPositions = []\n this.defenderPositions = []\n console.log('Game Reset')\n\n // (extra)\n this.numberOfWaves = 0\n this.defenderType = 1\n \n }", "function gameReset() {\n totalScore = 0;\n setupGame();\n }", "function resetGameState() {\n\t\tgameOngoing = true;\n\t\tcurrentPlayer = player1;\n\t}", "function restartGame()\r\n{\r\n console.log(\"restart called\"); \r\n gameMessage= \"\";\r\n backpack = [];\r\n mapLocation=4;\r\n item=\"\";\r\n render(); \r\n}", "function restartGame() {\n state = 0;\n body.innerHTML = '';\n buildGame();\n gameOver = false;\n}", "start(){\n if (this.scene.reset == true) {\n if (this.gameCount > 0 && this.model.playsCoords.length > 0) {\n this.undoAllPlays();\n this.state = 'SMALL_WAIT';\n }\n else {\n this.state = 'UPDATE_CONFIGS';\n }\n this.restart_values();\n this.gameCount++;\n }\n }", "function resetGame() {\n clearGame();\n levelSpace.innerHTML = \"Press Start/Stop to Begin\";\n}", "function restartGame() {\n player.restart();\n hearts = [new Lives(0, 534), new Lives(33, 534), new Lives(66, 534)];\n life = 3;\n points = 0;\n gameEnd.css('display', 'none');\n}", "gameRestart() {\n this.destroy();\n this.render();\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 }", "function resetGame() {\n // Position of prey and player will reset\n setupPrey();\n setupPlayer();\n // movement and speed of prey will reset\n movePrey();\n // sound will replay\n nightSound.play();\n // Size and color of player will reset\n playerRadius = 20;\n firegreen = 0;\n // score will reset\n preyEaten = 0;\n // prey speed will reset\n preyMaxSpeed = 4\n // All of this when game is over\n gameOver = false;\n}", "function resetGame() {\n cardShuffle();\n resetBoard();\n cardsInPlay = [];\n cardInPlayId = -1;\n}", "function restart(){\n\tmarioGame.enStatus = enStep.nInit;\n\t$(\"#gameover\").unbind();\n\t//if(isCompatible() == true){\n\t\t$(\"#gameover\").addClass(\"character-removed\");\n\t\t$(\"#gameover\").bind(\"webkitTransitionEnd\", removeDiv);\n\t\t$(\"#gameover\").bind(\"oTransitionEnd\", removeDiv);\n\t\t$(\"#gameover\").bind(\"otransitionend\", removeDiv);\n\t\t$(\"#gameover\").bind(\"transitionend\", removeDiv);\n\t\t$(\"#gameover\").bind(\"msTransitionEnd\", removeDiv);\n\t/*}\n\telse\n\t{\n\t\t$(\"#gameover\").empty();\n\t\t$(\"#gameover\").remove();\n\t}*/\n\tmarioGame.nTurn = 0;\n\tmarioGame.nFrame = 0;\n}", "function resetGame() {\n matched = 0;\n resetTimer();\n resetMoves();\n resetStars();\n resetCards();\n shuffleDeck();\n}", "function restart () {\n quiz.currentQuestion = 0\n quiz.isGameOver = false\n quiz.player1Points = 0\n quiz.player2Points = 0\n}", "function gameRestart () {\n location.reload();\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 resetGame() {\n console.log(\"resetGame was called\");\n}", "function resetGame() {\n\tresetClockAndTime();\n\tresetMoves();\n\tresetStars();\n\tshuffleDeck();\n\tresetCards();\n\tmatched = 0;\n\ttoggledCards = [];\n}", "function resetGame() {\n userScore = 0;\n computerScore = 0;\n gameSwitch(winningScore);\n}", "function restart(){\n speed = 1;\n score = 0;\n appleY = 200;\n}", "function restart() {\n debug(\"restart\");\n let reset = document.querySelector('.restart');\n\n reset.addEventListener('click', function(){\n clearBoard();\n resetMoves();\n clearStars();\n createStars();\n clearTimer();\n createTimer();\n createBoard();\n })\n }", "function resetGame() {\n account.score = 0;\n account.lines = 0;\n account.level = 0;\n board.reset();\n time = { start: 0, elapsed: 0, level: LEVEL[account.level] };\n}", "resetGame() {\n this.initGrid();\n this.setDefaultSeeds();\n this.iteration = 0;\n }", "function restartGame() {\n //clear all playing pieces\n gameboard = [[null, null, null], [null, null, null], [null, null, null]];\n console.log('[restartGame] resetting gameboard');\n //clear up images\n for(let box of boxes) {\n box.innerHTML = '';\n }\n turn = 1;\n gameover = false;\n}", "function restart() {\n\t\t//hide anything on stage and show the score\n\t\tstage.removeAllChildren();\n\t\tscoreField.text = (0).toString();\n\t\tstage.addChild(scoreField);\n\n\t\t//new arrays to dump old data\n\t\trockBelt = new Array();\n\t\tbulletStream = new Array();\n\n\t\t//create the player\n\t\talive = true;\n\t\tship = new Ship();\n\t\tship.x = canvas.width / 2;\n\t\tship.y = canvas.height / 2;\n\n\t\t//log time untill values\n\t\ttimeToRock = ROCK_TIME;\n\t\tnextRock = nextBullet = 0;\n\n\t\t//reset key presses\n\t\tshootHeld =\tlfHeld = rtHeld = fwdHeld = dnHeld = false;\n\n\t\t//ensure stage is blank and add the ship\n\t\tstage.clear();\n\t\tstage.addChild(ship);\n\n\t\t//start game timer \n\t\tif (!createjs.Ticker.hasEventListener(\"tick\")) { \n\t\t\tcreatejs.Ticker.addEventListener(\"tick\", tick);\n\t\t} \n\t}", "function resetGame(){\n game_mode='';\n player_sequence=[];\n game_sequence=[];\n player_clicks = 0;\n createGame();\n}", "function resetGame() {\n location.reload();\n}", "function resetGame(){\n startingLevel = 1;\n startingScore = 0;\n startingLives = 5;\n\n changeScore(startingLevel, startingScore);\n changeLevel(startingLevel);\n}", "function resetGame(){\n\t\n\tlocation.reload(); \n\t\n}", "function restart() {\n firstClick = true;\n playerAlive = true;\n \n placedFlags = [];\n numPlacedFlags = 0;\n \n time = 0;\n \n createBoard();\n}", "function resetGame() {\n game.player1.gameScore = 0;\n game.player2.gameScore = 0;\n gameScoreIndex++;\n pointScoreIndex = 0; //for after looking at matchStats\n // gameScoreIndex = 0;\n // game.gameScoreCollection.push(pushArr);\n if (game.startSer === 'player1') {\n swal(game.player2.name + \" serves first\");\n game.startSer = 'player2';\n game.player1.curSer = false;\n game.player2.curSer = true;\n }else if (game.startSer === 'player2'){\n swal(game.player1.name + \" serves first\");\n game.startSer = 'player1';\n game.player1.curSer = true;\n game.player2.curSer = false;\n }\n }", "function resetGame() {\n \n // reset varaibles\n wrong = 0;\n correct = 0;\n index = -1;\n \n // Update HTML\n clearContent();\n\n // Restart game\n loadQuestion();\n }", "function resetGame() {\n document.location.reload(true)\n}", "resetGame(){\n location.reload()\n }", "function restartGame(){\n resetStars();\n initializeVariables();\n shuffleCards(cards);\n displayCards(cards);\n listenForCardFlip();\n $('.odometer').html(score);\n $('.resultsPopUp').hide();\n $('.placeholder').show();\n $(\"#timer\").TimeCircles().restart();\n $('#overlay').css('display', 'none');\n $(\"#try-again\").click(function(){\n restartGame();\n });\n}", "function playAgain(){\r\n restart();\r\n}", "resetGame() {\n\t\tthis.App.setGetters.setGameProperty('timer', this.App.game.settings.gameLength);\n\t\tthis.App.setGetters.setPlayersProperty('correct', false);\t\t\n\t\tthis.App.setGetters.setGameStoreProperty('paths', {});\n\t\tthis.App.setGetters.setGameStoreProperty('chatLog', {});\n\t\tthis.App.clientComms.emitToAllSockets('reset');\n\t\tthis.App.clientComms.emitToAllSockets('puzzle', []);\n\t}", "function restartGame() {\n\t// Delete all cards\n\tcardsContainer.innerHTML = '';\n\t// Reset rating\n\tstarsContainer.innerHTML = `<li><i class='fa fa-star'></i></li>\n\t\t\t\t\t\t\t\t<li><i class='fa fa-star'></i></li>\n\t\t\t\t\t\t\t\t<li><i class='fa fa-star'></i></li>`;\n\t//Hide modal window\n\tmodal.classList.remove('ShowModal');\n\t// Reset moves\n\tmovesContainer.innerHTML = 0;\n\t// Reset timer to 0\n\ttimer.innerHTML = '0 <i class=\"fa fa-clock-o\"></i>';\n\t// Call shuffle\n\tshuffle(cards);\n\t// Call 'init' to create new cards\n\tinit();\n\t// clear interval for timer\n\tclearInterval(intervalId);\n\t// Start a new timer\n\tshowTime();\n\t// Reset all related letiables\n\topenCards = [];\n\tmatchedCards = 0;\n\tmoves = 0;\n\tstars = 3;\n\tseconds = 0;\n}", "restartGame() {\n score=5;\n $('#restart-button').on('click', () => {\n $('.modal').hide();\n $('.game-container').css('display', 'block');\n $('.mushroom-container').css('display', 'block');\n setUpRound();\n $('#restart-button').off();\n });\n }", "restart() {\r\n console.clear();\r\n this.curPos = [];\r\n [...this.curPos] = [...this._startPos];\r\n this.grid = [];\r\n \r\n if(!this.isAlive) {\r\n console.log(`You died...`);\r\n }\r\n else if (this.won){\r\n console.log(`You found your hat!`);\r\n }\r\n\r\n let ans = prompt('Do you want to play again?(y/n)');\r\n \r\n if (ans === 'y' && !this.isAlive) {\r\n this.isAlive = true;\r\n this.copyGrid(this.oGrid, this.grid);\r\n this.update();\r\n }\r\n else if (ans === 'y' && this.won) {\r\n this.won = false;\r\n let test = this.generateAndTestMap();\r\n\r\n if(test != null) {\r\n this.oGrid = [];\r\n this.copyGrid(this.grid, this.oGrid);\r\n [...this.curPos] = [...this._startPos];\r\n this.update();\r\n }\r\n }\r\n }", "function restart() {\n toys = 0;\n mClickUpgrade.reset();\n mAutoClicker.reset();\n mMultiplier.reset();\n mToyShop.reset();\n mToyFactory.reset();\n mHiddenToyLayer.reset();\n localStorage.clear();\n update();\n}", "function resetGame () {\n clearBoard();\n window.location.reload();\n}", "function restartGame() {\r\n clearInterval(timerId);\r\n createDeck();\r\n}", "function restartGame() {\n\t//display all cards in closed condition\n\tfor (const element of allCardsClosedArray) {\n\t\telement.classList.remove('open', 'show', 'match', 'wrong');\n\t}\n\t//empty the openCards array\n\topenCards = [];\n\t//stop the timer and set to zero\n\tstopTimer();\n\tresetTimer();\n\tdocument.querySelector('.moves').innerText = '0';\n\t//reset star rating back to three stars\n\tupdateStarCounter();\n\tshuffle();\n}", "function restart(){\n\tstartGame();\n\tgameStart = true;\n\tnewEnemy=true;\n\tcanAttack = false;\n\tgameOver = false;\n\tplayerPower=0;\n\n\tenemyNum=[];\n\tcurrentEnemy=\"\";\n\tfor(var i = 0 ;i< 4;++i){\n\t\t$(\"#enemyContainer_\"+i).css({\"display\":\"none\"});\n\t}\n\t$(\"#currentEnemyContainer\").css({\"display\":\"none\"});\n\t$(\"#playerText\").html(\"\");\n\t$(\"#cpuText\").html(\"\");\n\n\t//return images to normal after deaths in previous game\n\t$(\"#avatar_IMG_0\").removeClass(\"dead\");\n\t$(\"#currentEnemy_IMG\").removeClass(\"dead\");\n\n}", "async function reset() {\n if (game == null) {\n return;\n }\n game.reset();\n await calcQValuesAndBestAction();\n game.render();\n /*\n renderSnakeGame(gameCanvas, game,\n showQValuesCheckbox.checked ? currentQValues : null);\n gameStatusSpan.textContent = 'Game started.';\n stepButton.disabled = false;\n autoPlayStopButton.disabled = false;\n */\n\n}", "function reset(){\n score=0;\n gameTime=0;\n updateScore();\n}" ]
[ "0.84975654", "0.8480572", "0.84599066", "0.84312546", "0.8280107", "0.82531106", "0.8194695", "0.8164885", "0.8139179", "0.81295276", "0.8114399", "0.8091073", "0.80888987", "0.80799156", "0.80610657", "0.8055116", "0.8008426", "0.79855466", "0.79724264", "0.79675543", "0.7954391", "0.7934399", "0.7903875", "0.7903623", "0.79029214", "0.79021", "0.7899087", "0.7895889", "0.7895332", "0.78945386", "0.78935647", "0.7893445", "0.7887611", "0.7876043", "0.7862725", "0.78615344", "0.78600883", "0.7832564", "0.78295046", "0.78290296", "0.7806566", "0.78055257", "0.77729106", "0.77661306", "0.77601635", "0.7756069", "0.77499115", "0.77488357", "0.77438277", "0.7737519", "0.77373683", "0.77179956", "0.7715266", "0.770925", "0.7706983", "0.77059", "0.7701259", "0.7698501", "0.76951987", "0.7693328", "0.7690809", "0.76869136", "0.76856405", "0.76747507", "0.7664029", "0.7663351", "0.7660426", "0.76595277", "0.76575124", "0.76569456", "0.76568246", "0.76509696", "0.7647852", "0.76259863", "0.7625588", "0.7624596", "0.76235145", "0.7622365", "0.76188207", "0.76175356", "0.76072854", "0.7606871", "0.76062375", "0.7605928", "0.7598677", "0.7591581", "0.7591099", "0.75881666", "0.7584354", "0.7581477", "0.7575346", "0.75747424", "0.7572852", "0.7568357", "0.7560839", "0.75563204", "0.75450647", "0.75322306", "0.75231767", "0.75204307", "0.7512185" ]
0.0
-1
Utility to get score for the game
getScore() { let score = 0; //loop through all the data and get total score _.map(this.state.tileData, function (key, value) { score += key['count']; }); return score; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getScore() {\n\treturn parseInt(currentScore);\n}", "function getScore(){\n return score\n}", "function pGetScore () { //private (pName) functions - not accessible anywhere but in here\n return score;\n }", "function score() {\n\treturn `Human: ${playerPoints} Computer: ${computerPoints}`;\n}", "score() {\n var scores = [];\n var state = [];\n\n var guess = this._mapRenderers(data => {\n if (!data.ref) {\n return null;\n }\n\n if (data.ref.getSerializedState) {\n state.push(data.ref.getSerializedState());\n }\n\n scores.push(data.ref.score());\n return data.ref.getUserInput();\n });\n\n var combinedScore = scores.reduce(Util$l.combineScores);\n return Util$l.keScoreFromPerseusScore(combinedScore, guess, state);\n }", "function calculateScore() {\n\tscore = winCount * 100 + loseCount * -50 + (coveredTileCount * 2) + (100 - time) + (50 - moves) * 2 + (bonus * 15);\n}", "getScore()\r\n\t{\r\n\t\treturn this._score;\r\n\t}", "GetScore() {\n return this.m_score;\n }", "getScore()\n\t{\n\t\treturn this._score;\n\t}", "function getScore(input) {\n if (input == 1) {\n return playerOneScore;\n } else if (input == 2) {\n return playerTwoScore;\n }\n }", "function getScore() {\n\t\tif (this.value == 'N') { //None\n\t\t\treturn 0.85;\n\t\t} else { //Required\n\t\t\treturn 0.62;\n\t\t}\n\t}", "getScore() {\n return this.val;\n }", "function getScore() {\n\treturn parseFloat((Math.abs(error) / ramp * 100).toPrecision(4));\n}", "computeScore() {\n const all_scores = [];\n\n GameTree.walkTree(\n this.state.gameTree,\n (node) => {\n if ('cost' in node.data.board) {\n all_scores.push(node.data.board.cost);\n }\n }\n );\n\n return all_scores.reduce((a, b) => (a + b), 0);\n }", "function calculate_score() {\n var answer = get_answer();\n var guess = get_guess();\n var diff = compare_arrays(answer, guess)\n return Math.floor(((((255 * 3) - diff) / (255 * 3)) * 100))\n}", "function getScoreStatus() {\n if (correctAnswers >= passingScore) {\n return \"passed\";\n }\n return \"failed\";\n}", "getScore() {\n return this.score;\n }", "function getBestScore() {\n\tconst storageScore = localStorage.getItem('current_score');\n\treturn storageScore ? parseInt(storageScore) : 0;\n}", "get score() {\n return this._score;\n }", "getScore() {\n let totalScore = 0;\n\n for (let i = 0; i < this.currentPuzzleIndex; i += 1) {\n totalScore += this.colorPuzzles[i].getScore();\n }\n\n return totalScore;\n }", "get scoring () {\n\t\treturn this._scoring;\n\t}", "function getCurrentScore(score, counter) { return \"Your current score is \" + score + \" out of \" + counter + \". \"; }", "function getHumanReadableScore(score) {\r\n if (score > 0) { \r\n return Math.round(score/antiscale);\r\n }\r\n return 10000;\r\n}", "function score(playerIndex) {\n // This score function just returns input1 of this round\n return game.get(\"input1\", game.getCurrentRound(), playerIndex);\n}", "getScore() {\r\n\t\tconst keys = Object.keys(this.score);\r\n\t\tlet scored = 0;\r\n\t\tfor (let i = 0; i < keys.length; i++) {\r\n\t\t\tlet key = keys[i];\r\n\t\t\tlet userAnswer = this.score[key];\r\n\t\t\tlet itr = this.head;\r\n\t\t\tlet j = 0;\r\n\t\t\twhile (j < i) {\r\n\t\t\t\titr = itr.next;\r\n\t\t\t\tj++;\r\n\t\t\t}\r\n\t\t\tif (itr.val[key][userAnswer]) {\r\n\t\t\t\tscored++;\r\n\t\t\t};\r\n\t\t}\r\n\t\treturn scored;\r\n\t}", "get score() {\n return this._score;\n }", "function calcscore() {\n var id;\n var scoreofWord = 0;\n var isDoublescoreofWord = false;\n\n $(\"#board div img\").each(function (index) {\n //loops through each tile on board\n id = this.id;\n\n if ($(this).parent().attr(\"id\") == \"spot2\") {\n //spot2 is a double word score\n scoreofWord += ScrabbleTiles[id].value;\n isDoublescoreofWord = true;\n } else if ($(this).parent().attr(\"id\") == \"spot6\") {\n //spot6 is a triple letter score\n scoreofWord += ScrabbleTiles[id].value * 3;\n } else {\n scoreofWord += ScrabbleTiles[id].value;\n }\n });\n //double word tile\n if (isDoublescoreofWord) {\n scoreofWord = scoreofWord * 2;\n }\n\n return scoreofWord;\n}", "getScores() {\n return getScores(this);\n }", "function getScore(id){\r\n\tvar res = 0;\r\n\tfor (var i = 0; i<field_height; i++)\r\n\t\tfor (var j = 0; j<field_width; j++)\r\n if (game_field[i][j] == id) res++;\r\n\treturn (res < 10) ? (' ' + res) : res;\t\r\n}", "function calcScore() {\n console.log(\"incorrect answers: \" + wrongCount);\n console.log(\"correct answers: \" + correctCount);\n let totalAttempts = wrongCount + correctCount;\n let score = (correctCount / totalAttempts) * 100;\n console.log(\"total score: \" + score);\n // textScore = toString(score);\n let printScore = $(\"<h2>\").text(score);\n $('.displayScore').append(printScore);\n\n }", "function getScore(correct, missed, noAnswer){\n let x = (correct / (correct + missed + noAnswer)) * 100;\n return x;\n }", "function simpleScore() {\n return simpleScrabbleScorer(userWord);\n}", "function Score() { }", "function getScore() {\n\n if (timeLeft < 0) {\n timeLeft = 0;\n }\n console.log(timeLeft);\n return score = timeLeft;\n \n}", "getP2Score(){\n return this.scoreScale[this.player2.points]; \n }", "function getCurrentScore (score, counter) {\n return ' Your current score is ' + score + ' out of ' + counter + '. '\n}", "function getPlayerScore() {\n let score = 0;\n playerHand.forEach((card) => {\n score += parseInt(card.Weight);\n });\n return score;\n\n}", "function determineScore(score){\n\tif(score === 0){\n\t\tlet result = \"even\";\n\t\treturn result;\n\t}\n\telse if(score%2 === 0){\n\t\tlet result = \"even\";\n\t\treturn result;\n\t}\n\telse{\n\t\tlet result = \"odd\";\n\t\treturn result;\n\t}\n\tconsole.log(\"determineScore \" + result);\n\treturn result;\n}", "function getBestScore() {\n if (typeof(Storage) !== \"undefined\") {\n return localStorage.getItem(\"best\");\n }\n return 0;\n}", "getP1Score(){\n return this.scoreScale[this.player1.points]; \n }", "function yourScore() {\n return fname + ' scored ' + (mid + final);\n }", "function score()\r\n { \r\n console.log(diceTotal);\r\n //alert(\"Your total is \" + diceTotal); \r\n alert(\"Not yet implemented!\");\r\n }", "function get_char_score() {\n $scope.time_diff = char_time_end - char_time_start;\n if ($scope.time_diff <= 20) return 100;\n else if ($scope.time_diff <= 38) return 70;\n else if ($scope.time_diff <= 56) return 30;\n else return 10;\n }", "function updateScore(time) {\n score = Math.floor((matches * matches / (time + 1) / (misses + 1)) * 10000);\n $('#score').text('Score: ' + score);\n return score;\n }", "function currentTurnScore(playerDiv) {\n return nthThrow(playerDiv, 0) + nthThrow(playerDiv, 1) + nthThrow(playerDiv, 2);\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 }", "function getScoreToRank(){\n\tvar scoreBucket = {};\n\n\tObject.keys(io.sockets.connected).forEach(function(socketID){\n\t\tvar player = io.sockets.connected[socketID].player;\n\t\tif(player){\n\t\t\tvar score = player.kills;\n\t\t\tif(!scoreBucket[score]){\n\t\t\t\tscoreBucket[score] = 0;\n\t\t\t}\n\t\t\tscoreBucket[score]++;\n\t\t}\n\t});\n\n\tvar scores = Object.keys(scoreBucket);\n\tscores.sort(scoreCompareFunction);\n\n\tvar rank = 1;\n\tvar scoreToRank = {};\n\tfor(var i = 0; i < scores.length; i++){\n\t\tvar s = scores[i];\n\t\tscoreToRank[s] = rank;\n\t\trank += scoreBucket[s];\n\t}\n\n\tscoreToRank.leaderScore = scores[0];\n\tscoreToRank.leaderID = -1;\n\tif(scores[0]){\n\t\tObject.keys(io.sockets.connected).forEach(function(socketID){\n\t\t\tvar player = io.sockets.connected[socketID].player;\n\t\t\tif(player && player.kills == scores[0])\n\t\t\t\tscoreToRank.leaderID = player.id;\n\t\t});\n\t}\n\treturn scoreToRank;\n}", "function scrabbleScore() {\n console.log(`Currently using : ${scoringAlgorithms[2].name}`);\n\tconsole.log(`The score for your word, ${userWord}, is ${oldScrabbleScoreTotal(userWord)}!`);\n}", "function calcScore(quizScore, essayScore) {\n\n var score = quizScore + essayScore;\n\n return score;\n\n}", "function getUserscore(actualScore){\n if (actualScore === 0) {\n alert('Where you even trying? :( '+actualScore+' out of 4');\n } else if(actualScore === 1){\n alert('Well you guess one right I suppose. '+actualScore+' out of 4');\n } else if(actualScore === 2){\n alert('Only half right, good job i guess '+actualScore+' out of 4');\n } else if(actualScore===3){\n alert('Wow 3 of them right! good job '+actualScore+' out of 4');\n }else if(actualScore===4){\n alert('WOW you got all of them RIGHT! I AM SO PROUD! AMAZING! '+actualScore+' out of 4' );\n }else if(actualScore===5){\n alert('Nice 5 right, congrats '+actualScore+' out of 5');\n }\n}", "function getHighScore() {\n return localStorage.getItem(\"highScore\");\n}", "function getCurrentScore(player, cpu, ties)\n {\n \talert(\"You: \" + player + \n \t\t \"\\nComputer: \" + cpu +\n \t\t \"\\nTies: \" + ties);\n }", "function calcScore(scores) {\n\tvar sumscore = 0;\n\tfor (var i = 0; i < boardsize + 1; ++i) {\n\t\tswitch(scores[i]) {\n\t\t\tcase 2:\n\t\t\t\t// 10x the value of this card\n\t\t\t\tsumscore += 10 * i;\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\t// Value of the card\n\t\t\t\tsumscore += i;\n\t\t\tdefault:\n\t\t\t\t// If it's 3 or more, add in a flat 100\n\t\t\t\t// Otherwise, do nothin'\n\t\t\t\tif (scores[i] > 2) sumscore += 100;\n\t\t\t\tbreak;\n\t\t} // switch(curscore[i])\n\t} // for (var i = 0; i < boardsize + 1; ++i)\n\treturn sumscore;\n} // function calcScore(scores)", "function calculateScoreTries(board) {\n\t\tif (board == \"boardEasy\" && openedPairs < 10) {\n\t\t\tscore += 20;\n\t\t} else if (board == \"boardEasy\" && openedPairs < 15) {\n\t\t\tscore += 10;\t\t\n\t\t} else if (board == \"boardNormal\" && openedPairs < 15) {\n\t\t\tscore += 40;\t\t\n\t\t} else if (board == \"boardNormal\" && openedPairs < 20) {\n\t\t\tscore += 20;\t\t\n\t\t} else if (board == \"boardAdvanced\" && openedPairs < 20) {\n\t\t\tscore += 50;\t\t\n\t\t} else if (board == \"boardAdvanced\" && openedPairs < 25) {\n\t\t\tscore += 30;\t\t\n\t\t} else if (board == \"boardDifficult\" && openedPairs < 30) {\n\t\t\tscore += 60;\t\t\n\t\t} else if (board == \"boardDifficult\" && openedPairs < 40) {\n\t\t\tscore += 40;\t\t\n\t\t}\n\t}", "function determineRungY (score) {\n let rungY = 300 - ((score - 1) * 30);\n return rungY;\n}", "function getScore(p1, p2) {\r\n if (p1 === p2) {\r\n return 0;\r\n } else if (p1 === 0) {\r\n if (p2 === 1) {\r\n return 0;\r\n } else {\r\n return 1;\r\n }\r\n } else if (p1 === 1) {\r\n if (p2 === 2) {\r\n return 0;\r\n } else {\r\n return 1;\r\n }\r\n } else if (p1 === 2) {\r\n if (p2 === 0) {\r\n return 0;\r\n } else {\r\n return 1;\r\n }\r\n }\r\n}", "function calculateScore(state, level) {\n var num = 0;\n num += check(state.board[0], state.board[1], state.board[2]);\n num += check(state.board[3], state.board[4], state.board[5]);\n num += check(state.board[6], state.board[7], state.board[8]);\n num += check(state.board[0], state.board[3], state.board[6]);\n num += check(state.board[1], state.board[4], state.board[7]);\n num += check(state.board[2], state.board[5], state.board[8]);\n num += check(state.board[0], state.board[4], state.board[8]);\n num += check(state.board[2], state.board[4], state.board[6]);\n if (level == -1) {\n return num;\n }\n if (num > 0) {\n return num + level;\n }\n else if (num < 0) {\n return num - level;\n }\n else {\n if (state.isCompleted == false) {\n return null;\n }\n else {\n return 0;\n }\n }\n}", "computeScore() {\n this.score++\n return this.score\n }", "function getCompScore() {\n let score = 0;\n compHand.forEach((card) => {\n score += parseInt(card.Weight);\n });\n return score;\n}", "get measureScore () {\n\t\treturn this._measureScore;\n\t}", "function roundScore(round){\n\treturn round[0]+round[1]\n}", "function getScore() {\n /*\n * (# of req. pages viewed + # of correctly answered req. questions) / \n * (total req. pages + total req. questions)\n */\n\n var totalRequired = pages.required + questions.required;\n\n // User scores 100% if there are no requirements...\n if( totalRequired === 0 ) {\n return 1;\n } \n\n return Math.min(( pages.viewed.required + questions.answered.required ) / totalRequired, 1);\n }", "getScore() { \n return sb3.computeBoolObjScore(this.reqs);\n }", "function getFinalScore (score, counter) {\n return ' Your final score is ' + score + ' out of ' + counter + '. '\n}", "function wholeScore(players) {\n\tvar score = 0;\n\tfor(var i = 0; i < players.length; i++) {\n\t\tscore += players[i].avgPoints;\n\t}\n\tconsole.log(\"Whole score of the team: %d\", score);\n}", "function scoreGame( pos ){\n \"use strict\";\n var res = { };\n res.H = pos.pots.b + pos.getNumSeed( \"b\" );\n res.J = pos.pots.a + pos.getNumSeed( \"a\" );\n return res;\n}", "function calculateScore() {\n\t\t//console.log(\"Deck constructor called\");\n\t\tvar score = 0;\n\t\t//var noOfAces = 0;\n\t\tvar haveAce = false;\n\t\tconsole.log(\"total cards with hand\" + cards.length);\n\t\tfor (var i =0; i < cards.length; i++) {\n\t\t // if(card.faceValue == faceValue.ace)\n\t\t /*if(card.faceValue == faceValue.ace){\n\t\t noOfAces = noOfAces + 1;\n\t\t\t }*/\n\t\t\t// console.log(\"facevalue: \" + cards[i].suitType + cards[i].faceValue);\n\t\t\t \n\t\t\t// console.log(\"faceValue.ace :\" + faceValue.ace);\n\t\t\t var cardScore = faceValue[cards[i].faceValue];\n\t\t\t if(cardScore == faceValue.ace){\n\t\t\t haveAce = true;\n\t\t\t }\n\t\t\t score += cardScore;\n\t\t}\n\t\t\n\t\tif((score + 10 <= 21) && haveAce){\n\t\t score =score+ 10;\n\t\t}\n\t\t\n\t\tconsole.log(\"current score of \" + name + \" is \" + score);\n\t\t//return score;\n\t\tcurrentScore = score;\n\t}", "calculateScore() {\n if (this.timeRemaining >= '90') {\n $(\"#live-score, #victory-score\").each(function () {\n $(this).text(parseInt($(this).text(), 10) + 100);\n });\n this.score += 100;\n } else if (this.timeRemaining >= '80') {\n $(\"#live-score, #victory-score\").each(function () {\n $(this).text(parseInt($(this).text(), 10) + 90);\n });\n this.score += 90;\n } else if (this.timeRemaining >= '70') {\n $(\"#live-score, #victory-score\").each(function () {\n $(this).text(parseInt($(this).text(), 10) + 80);\n });\n this.score += 80;\n } else if (this.timeRemaining >= '60') {\n $(\"#live-score, #victory-score\").each(function () {\n $(this).text(parseInt($(this).text(), 10) + 70);\n });\n this.score += 70;\n } else if (this.timeRemaining >= '50') {\n $(\"#live-score, #victory-score\").each(function () {\n $(this).text(parseInt($(this).text(), 10) + 60);\n });\n this.score += 60;\n } else if (this.timeRemaining >= '0') {\n $(\"#live-score, #victory-score\").each(function () {\n $(this).text(parseInt($(this).text(), 10) + 50);\n });\n this.score += 50;\n }\n }", "function getScore () {\n var num1 = 2,\n num2 = 3;\n\n // function add() {\n //\n // }\n\n return myName + \" scored \" + (num1 + num2);\n}", "function getTurno(){\n if(turno==\"player\"){\n return playerScore;\n }else{\n return machineScore;\n }\n}//getTurno()", "function get_score_elem(overlay) {\n score = overlay.getElementsByClassName(\"match-score\");\n if (score.length > 0) {\n return score[0];\n }\n\n return null;\n}", "function getScore(L) {\n var temp_score = 0;\n for (i = 0; i < L.length; i++) {\n temp_score = temp_score + L[i].remaining;\n }\n return temp_score\n}", "function getScore() { // Calculating rounded scores based off of dimension\n if (size < 50) { // Checking less than 50\n var lessThan = Math.round(10 - 0.1 * size);\n score = score + lessThan; // Updating score\n } else { // Checking more than 50\n var moreThan = Math.round(10 - 0.09 * size);\n score = score + moreThan; // Updating score\n }\n }", "function getScore(pos, neg) {\n var z, phat;\n\n z = 1.96;\n phat = 1 * pos / neg;\n\n return (phat + z*z/(2*neg) - z * Math.sqrt((phat*(1-phat)+z*z/(4*neg))/neg))/(1+z*z/negja);\n}", "CalcPowerScore() { \n\t\tthis.score = 0;\n\t\t\n\t\t// planets\n\t\tlet planet_score = 0;\n\t\tfor ( let p of this.planets ) { \n\t\t\tplanet_score += p.score;\n\t\t\tplanet_score += p.total_pop * 0.1;\n\t\t\t// TODO local economy\n\t\t\t}\n\t\t\t\n\t\t// ships\n\t\tlet ship_score = 0;\n\t\tfor ( let f of this.fleets ) { \n\t\t\tif ( !f.killme ) { \n\t\t\t\tship_score += f.milval;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t// troops\n\t\tlet ground_score = 0;\n\t\tfor ( let p of this.planets ) { \n\t\t\tground_score += p.troops.length;\n\t\t\t}\n\t\tfor ( let f of this.fleets ) { \n\t\t\tground_score += f.troops;\n\t\t\t}\n\t\t\n\t\t// tech level\n\t\tlet tech_score = 0;\n\t\tfor ( let t of this.tech.compl ) { \n\t\t\ttech_score += t.node.rp;\n\t\t\t}\n\t\t\t\n\t\tthis.power_score = Math.round( \n\t\t\t ( planet_score * 20.0 )\n\t\t\t+ ( ship_score * 0.02 )\n\t\t\t+ ( ground_score * 2.0 )\n\t\t\t+ ( tech_score * 0.1 )\n\t\t\t+ ( this.resources.$ * 0.001 )\n\t\t\t);\n\t\t\t\n\t\treturn this.power_score;\n\t\t}", "function ScoreManager_Percentage_CalculateScore()\n{\n\t//set current score as 0;\n\tvar currentScore = 0;\n\t//loop through each State\n\tfor (var stateId in this.States_List)\n\t{\n\t\t//we dont count current State\n\t\tif (stateId == this.States_Current)\n\t\t\tcontinue;\n\t\t//get the State itself\n\t\tvar state = this.States_List[stateId];\n\t\t//if we requested playback on this State or used the slider\n\t\tif (state.Requests_Cameras > 0 || state.Slider_Used > 0)\n\t\t{\n\t\t\t//you get nothing for this State-> 0!\n\t\t\tcontinue;\n\t\t}\n\t\t//now you get 100 points for the State IF YOU HAVE A CORRECT ACTION (or if it was auto camera)\n\t\tvar stateScore = (state.Actions_Correct || state.AutoPlayCamera) > 0 ? 100 : 0;\n\t\t//but I remove 50 for each error\n\t\tstateScore -= 50 * state.Count_Errors;\n\t\t//no score left?\n\t\tif (stateScore <= 0)\n\t\t{\n\t\t\t//you get nothing for this State-> 0!\n\t\t\tcontinue;\n\t\t}\n\t\t//now if you asked for hints \n\t\tif (state.Requests_Hints > 0)\n\t\t{\n\t\t\t//you get half score! sorry\n\t\t\tstateScore = stateScore / 2;\n\t\t}\n\t\t//finally add this to our current score\n\t\tcurrentScore += stateScore;\n\t}\n\t//raw score is the current score\n\tthis.Score_Raw = currentScore;\n\t//update final score to a percentage (dont count current State)\n\tthis.Score_Calculated = currentScore / (this.States_Count - 1);\n}", "function bonusScore () {\n // Currently, we have two kinds of bonus: Match and Phrase\n var bonus = 0;\n\n // TODO: Yeah, I know we can fail faster here, but it's 3 in the morning\n var firstWord = formWord(state.words[0]);\n var secondWord = formWord(state.words[1]);\n\n // Check for a Match Bonus, where both words are the same\n if (firstWord.toUpperCase() === secondWord.toUpperCase()) {\n bonus += 2 * getWordValue(state.words[0].toUpperCase());\n }\n\n // Check for a Phrase Bonus\n var phrase = firstWord.toLowerCase() + \" \" + secondWord.toLowerCase();\n if (bonusPhrases[phrase]) {\n bonus += config.phraseBonus;\n }\n console.log(\"The phrase bonus result is: \" + bonus);\n return bonus;\n}", "GetBestScore() {\n\t\treturn this.SearchController.bestScore\n\t}", "function gameFinalResult(){\n\tif(playerScore>computerScore){\n\t\treturn 'You are the Winner !!!';\n\t} else if (playerScore < computerScore){\n\t\treturn 'You loose !!'\n\t}else return 'You had a tie!!'\n}", "function setGameScore() {\n\tlet score = document.getElementById(\"score\");\n \treturn score.textContent = \"Your score: \" + player.score;\n}", "_calcLevelByScore (score) {\n if (app.ctx.level + 1 < app.ctx.scoreMmMap.length) {\n if (score >= app.getScoreByLevel(app.ctx.level + 1)) {\n return app.ctx.level + 1\n }\n return app.ctx.level\n } else {\n return Math.min(app.ctx.level, app.ctx.scoreMmMap.length - 1)\n }\n }", "function getScore() {\r\n var num1 = 2,\r\n num2 = 3;\r\n \r\n function add() {\r\n return name1 + ' scored ' + (num1 + num2);\r\n }\r\n \r\n return add();\r\n}", "handleGetScore() {\n let score = getScore(this.state.rubiksArray);\n console.log(score)\n }", "function getScore(records) {\n const DEFAULT_SCORE = 0;\n const MAGIC_PARAMETER = 10;\n if (!records.length) {\n return DEFAULT_SCORE;\n }\n const x = sd(records);\n return (1 - (x / (x + MAGIC_PARAMETER))) * 100;\n}", "function score(winner) {\n if (winner === \"win\") {\n userScore++;\n console.log(\n `The score is Player: ${userScore} vs Computer ${computerScore}`\n );\n } else if (winner === \"lose\") {\n computerScore++;\n console.log(\n `The score is Player: ${userScore} vs Computer ${computerScore}`\n );\n } else {\n console.log(\n `The score is Player: ${userScore} vs Computer ${computerScore}`\n );\n }\n}", "function compare(userChoice){\r\n let robotChoice = roboChoice();\r\n let score;\r\n\r\n if(userChoice == robotChoice){\r\n score = 2;\r\n }\r\n else if(userChoice == \"rock\" && robotChoice == \"scissors\"){\r\n score = 1;\r\n }\r\n else if(userChoice == \"scissors\" && robotChoice == \"rock\"){\r\n score = 0;\r\n }\r\n else if(userChoice == \"paper\" && robotChoice == \"rock\"){\r\n score = 1;\r\n }\r\n else if(userChoice == \"rock\" && robotChoice == \"paper\"){\r\n score = 0;\r\n }\r\n else if(userChoice == \"paper\" && robotChoice == \"scissors\"){\r\n score = 0;\r\n }\r\n else if(userChoice == \"scissors\" && robotChoice == \"paper\"){\r\n score = 1;\r\n }\r\n else{\r\n score = 2;\r\n } \r\n\r\n return score;\r\n\r\n}", "function yFromScore(score) {\n return 5+(9/10)*(100 - score);\n }", "function game()\n {\n \tlet playerScore = 0;\n \tlet computerScore = 0;\n \tlet ties = 0;\n \tconst MAX_ROUNDS = 5;\n\n \tfor(let i = 0; i < MAX_ROUNDS; i++)\n \t{\n \t\tif(!(playerScore === 3 || computerScore === 3))\n \t\t{\n \t\t\tlet outcome = playRound();\n\n\t \t\tif(outcome === \"win\")\n\t \t\t{\n\t \t\t\tplayerScore++;\n\t \t\t}\n\t \t\telse if(outcome === \"lose\")\n\t \t\t{\n\t \t\t\tcomputerScore++;\n\t \t\t}\n\t \t\telse\n\t \t\t{\n\t \t\t\tties++;\n\t \t\t}\n\n\t \t\tgetCurrentScore(playerScore, computerScore, ties);\n\t \t}\n \t}\n\n \tgetOutcome(playerScore, computerScore, ties);\n }", "static async getMatchScore(tournamentId, round, match) {\n const url = ENDPOINTS.MATCH_SCORE_ENDPOINT;\n const parameters = {\n tournamentId: tournamentId,\n round: round,\n match: match\n };\n\n try {\n const matchScore = await HTTPRequestHandler.get(url, parameters);\n return {\n score: matchScore.score,\n number: match,\n round: round\n }\n } catch (error) {\n console.log('getTeam error', error.toString());\n }\n }", "function printandget(scores){\nvar hight = 0;\n\nfor (var i = 0; i<scores.length; i++)\n{\nconsole.log(\"Bubble solution #\" + i +\" score: \" + scores[i]);\n\t\nif (hight<scores[i] ){\n\thight = scores[i];\n\t\n}}\nreturn hight;\n}", "function score(data) {\r\n return data[0]*0.1 + data[2]*0.01 + data[3]*0.11 + data[1]*0.1 + data[4]*0.2 + data[5]*0.1 + data[6]*0.2 + data[7]*0.01 + data[8]*0.01;\r\n}", "function getResult() {\n var score = (parseInt(getCheckedRadio('op1'))\n + parseInt(getCheckedRadio('op2'))\n + parseInt(getCheckedRadio('op3'))\n + parseInt(getCheckedRadio('op4')));\n return score;\n}", "scoreToDisplay() {\n let score = '';\n\n if (this.P1point === this.P2point && this.P1point < 3) {\n if (this.P1point === 0)\n score = 'Love';\n if (this.P1point === 1)\n score = 'Fifteen';\n if (this.P1point === 2)\n score = 'Thirty';\n score += '-All';\n }\n if (this.P1point === this.P2point && this.P1point > 2)\n score = 'Deuce';\n\n if (this.P1point > 0 && this.P2point === 0) {\n if (this.P1point === 1)\n this.P1res = 'Fifteen';\n if (this.P1point === 2)\n this.P1res = 'Thirty';\n if (this.P1point === 3)\n this.P1res = 'Forty';\n\n this.P2res = 'Love';\n score = this.P1res + '-' + this.P2res;\n }\n if (this.P2point > 0 && this.P1point === 0) {\n if (this.P2point === 1)\n this.P2res = 'Fifteen';\n if (this.P2point === 2)\n this.P2res = 'Thirty';\n if (this.P2point === 3)\n this.P2res = 'Forty';\n\n this.P1res = 'Love';\n score = this.P1res + '-' + this.P2res;\n }\n\n if (this.P1point > this.P2point && this.P1point < 4) {\n if (this.P1point === 2)\n this.P1res = 'Thirty';\n if (this.P1point === 3)\n this.P1res = 'Forty';\n if (this.P2point === 1)\n this.P2res = 'Fifteen';\n if (this.P2point === 2)\n this.P2res = 'Thirty';\n score = this.P1res + '-' + this.P2res;\n }\n if (this.P2point > this.P1point && this.P2point < 4) {\n if (this.P2point === 2)\n this.P2res = 'Thirty';\n if (this.P2point === 3)\n this.P2res = 'Forty';\n if (this.P1point === 1)\n this.P1res = 'Fifteen';\n if (this.P1point === 2)\n this.P1res = 'Thirty';\n score = this.P1res + '-' + this.P2res;\n }\n\n if (this.P1point > this.P2point && this.P2point >= 3) {\n score = 'Advantage ' + this.player1Name;\n }\n\n if (this.P2point > this.P1point && this.P1point >= 3) {\n score = 'Advantage ' + this.player2Name;\n }\n\n if (this.P1point >= 4 && this.P2point >= 0 && (this.P1point - this.P2point) >= 2) {\n score = 'Win for ' + this.player1Name;\n }\n if (this.P2point >= 4 && this.P1point >= 0 && (this.P2point - this.P1point) >= 2) {\n score = 'Win for ' + this.player2Name;\n }\n return score;\n }", "function GetPlayerScore() {\n\n let displayScore = document.getElementById(\"spanScore\");\n var score = 0;\n\n if (totalTimeInSec < 180)\n {\n //Remove score for time passed\n score = (18000 - (totalTimeInSec * 100));\n }\n\n //For each eaten cheese add 100\n score += (eatenCheese * 1000);\n\n //For each eaten random appearing cheese\n score += (eatenRandomCheese * 2500);\n\n //Display the score on the screen\n displayScore.innerHTML = score.toString();\n\n return score;\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 getRank(score) {\n let rank;\n // Iterate through the gameLevels array until we find the item whose score is\n // greater than the current score. Then we return the name gameLevels item\n // that just preceeds the item with the greater score.\n gameLevels.some((level, idx, arr) => {\n if (level[1] > score) {\n rank = arr[idx - 1][0];\n return true;\n } else return false;\n });\n // If our score is above the Genius level, return the name in the last element.\n // I could just return 'Genius', but maybe they'll change the word someday, eg\n // to 'Super Brain'.\n gameRank = rank ? rank : gameLevels.slice(-1)[0][0];\n return gameRank;\n}", "function addScore() {\n let bestScore;\n if (localStorage) {\n bestScore = parseInt(localStorage[board.height + \" \" + \n board.width + \" \" + board.numMines]);\n }\n if (!bestScore) bestScore = 0;\n document.getElementById(\"score\").innerHTML = \"Quickest -> \" +\n Math.floor(bestScore / 3600) + \"h : \" + \n Math.floor(bestScore % 3600 / 60) + \"m : \" + \n Math.floor(bestScore % 60) + \"s\";\n} // end addScore", "function gemScore() {\n\n return Math.floor(Math.random() * 12);\n\n }", "function game_score(score) {\n var score_text = document.querySelector(\"#score\");\n score_text.innerHTML = score;\n}", "function promptScore() {\n\treturn window.prompt(\"Enter a test score between 0 and 100. Enter 999 to end the program.\") * 1;\n}" ]
[ "0.81512415", "0.7906938", "0.7752494", "0.7547123", "0.7482738", "0.7304744", "0.72017646", "0.71558285", "0.7147191", "0.71316445", "0.71222734", "0.70741534", "0.7069578", "0.7051748", "0.70471334", "0.70044404", "0.7001239", "0.6986462", "0.69627994", "0.6961488", "0.69610506", "0.6909258", "0.6878884", "0.6830633", "0.68290347", "0.6797629", "0.6787229", "0.67751944", "0.6763897", "0.67558384", "0.6730753", "0.6719201", "0.6703107", "0.6689701", "0.66588837", "0.66265315", "0.6624838", "0.66226757", "0.66127014", "0.6608019", "0.6597913", "0.6595773", "0.65855026", "0.6583894", "0.65765107", "0.65663403", "0.65508515", "0.6530331", "0.65246356", "0.6517958", "0.65151864", "0.65142405", "0.6513495", "0.65127045", "0.65074944", "0.6504905", "0.65029335", "0.6488156", "0.64746004", "0.6470209", "0.6470083", "0.64665467", "0.64653015", "0.6462076", "0.64559394", "0.6452044", "0.644861", "0.6446265", "0.6440324", "0.6435735", "0.6433001", "0.6425782", "0.6425002", "0.6420603", "0.64201856", "0.6418148", "0.6408949", "0.64004135", "0.6400386", "0.6396879", "0.6395753", "0.639127", "0.6387995", "0.6357667", "0.63555163", "0.63497263", "0.6340128", "0.6333795", "0.6329014", "0.6319179", "0.63159364", "0.63073033", "0.630534", "0.63009727", "0.6300572", "0.63004994", "0.62987727", "0.6295755", "0.6294119", "0.6292992" ]
0.7016804
15
Utility to get game status
fetchGameStatus(STATUS) { //Get the number of tiles completed let completedTiles = _.filter(this.state.tileData, {'status': 'complete'}) //Game 0 implies not started case if (this.getScore() == 0) { return STATUS.BEGIN; } else if (completedTiles.length == 16) { //All tiles matched case return STATUS.COMPLETE; } return STATUS.INPROGRESS; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getGameStatus() {\n this.setMethod('GET');\n this.setPlayerId();\n return this.getApiResult(`${Config.PLAY_API}/${this.playerId}/status`);\n }", "function status() {\n console.log(`Active : ${game.active}`)\n console.log(`Points : ${game.points}`)\n console.log(`Strikes : ${game.strikes} out of ${game.maxStrikes}`)\n console.log(`Passes : ${game.passes} out of ${game.maxPasses}`)\n console.log(`Words : ${game.words}`)\n console.log(`Word : ${game.word}`)\n console.log(`Scrambled : ${game.scrambled}`)\n }", "function gameStatus(player, opponent, board) {\n // games status\n if (checkWin(player, board)) {\n return \"win\";\n } else if (checkWin(opponent, board)) {\n return \"lost\"\n } else if (checkDraw(board)) {\n return \"draw\"\n } else {\n return \"\";\n }\n}", "static getGameStatus() {\n return new Promise(\n async (resolve) => {\n try {\n resolve(Service.successResponse(''));\n } catch (e) {\n resolve(Service.rejectResponse(\n e.message || 'Invalid input',\n e.status || 405,\n ));\n }\n },\n );\n }", "function statusUpdate() {\n\t\tvar webAPI3 = new globals.xml.gameStatus(gameID);\n\t}", "function logPlayerStatus() {\n console.table(getPlayerStatus());\n}", "function checkGameStatus(){\r\n\tnumTurns++; //count turn\r\n\t\r\n\tif (checkWin()) {\r\n\t\tgameStatus = currentPlayer + \" Wins\";\r\n\t\tconsole.log(\"Game status: \" + gameStatus);\r\n\t}else if (numTurns == 9) {\r\n\t\tgameStatus = \"TIE\";\r\n\t\tconsole.log(\"Game status: \" + gameStatus);\r\n\t}\r\n\t\r\n\tcurrentPlayer = (currentPlayer == \"X\" ? \"O\" : \"X\");\r\n\t\r\n\tif (gameStatus != \"\"){\r\n\t\tshowLightBox(\"Game is Over: \", gameStatus);\r\n\t\tconsole.log(\"Game is Over: \" + gameStatus);\r\n\t}\r\n} // checkGameStatus", "function getGameState() {\n\t\treturn gameOngoing;\n\t}", "function checkStatus() {\n for (i = 0; i < gameWin.length; i++) {\n if (currentArray.join('') === gameWin[i].join('')) {\n winGame();\n }\n }\n for (i = 0; i < gameLoss.length; i++) {\n if (currentArray.join('') === gameLoss[i].join('')) {\n loseGame();\n }\n }\n}", "function updateStatus () {\n var status = ''\n\n var moveColor = 'White'\n if (game.turn() === 'b') {\n moveColor = 'Black'\n }\n\n // checkmate?\n if (game.in_checkmate()) {\n status = 'Game over, ' + moveColor + ' is in checkmate.'\n }\n\n // draw?\n else if (game.in_draw()) {\n status = 'Game over, drawn position'\n }\n\n // game still on\n else {\n status = moveColor + ' to move'\n\n // check?\n if (game.in_check()) {\n status += ', ' + moveColor + ' is in check'\n }\n }\n\n $status.html(status)\n $pgn.html(game.pgn())\n}", "function updateStatus () {\n var status = ''\n\n var moveColor = 'White'\n if (game.turn() === 'b') {\n moveColor = 'Black'\n }\n\n // checkmate?\n if (game.in_checkmate()) {\n status = 'Game over, ' + moveColor + ' is in checkmate.'\n }\n\n // draw?\n else if (game.in_draw()) {\n status = 'Game over, drawn position'\n }\n\n // game still on\n else {\n status = moveColor + ' to move'\n\n // check?\n if (game.in_check()) {\n status += ', ' + moveColor + ' is in check'\n }\n }\n\n $status.html(status)\n $pgn.html(game.pgn())\n}", "function getStates(game) {\n\n}", "function getStatus(gameId, playerId, callback){\n\t\tvar ajax = new XMLHttpRequest();\n\t\tajax.open(\"GET\", \"/game/\"+gameId+\"/\"+playerId, true);\n\t\tajax.onreadystatechange = function(){\n\t\t\tif(ajax.readyState === 4 && ajax.status === 200){\n\t\t\t\tcallback(JSON.parse(ajax.responseText));\n\t\t\t}\n\t\t};\n\t\tajax.send();\n\t}", "function getStatus() {\n return status;\n }", "function getGameOver() {\r\n return gameOver;\r\n }", "function getGameOver() {\n return gameOver;\n }", "async get() {\n await api.waitUntil('statusInitialized');\n return _converse.xmppstatus.get('status');\n }", "function gameStatus(status){\n var display = document.querySelector('#status');\n if(status === \"win\"){\n display.textContent = `You won in ${moves} moves!`;\n } else if (status === \"lose\")\n display.textContent = \"You Lose!\";\n}", "function gsINFO(){\r\n gameState= INFO\r\n}", "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}", "getStatus () {\n const winner = calculateWinner(this.current.squares)\n if (winner) {\n return 'Winner: ' + winner\n }\n\n return 'Next player: ' + (this.xIsNext ? 'X' : 'O')\n }", "function getPlayStatus() {\n return playStatus.findOne()\n }", "function getStatus() {\n\tapi({ data: \"cmd=getstatus\" },syncStatus);\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 checkGameStatus(cellI, cellJ) {\n\n //set gState.isGameOn && gState.isVictory:\n if (gBoard[cellI][cellJ].isExplodedBomb) {\n gState.isGameOn = false;\n gState.isVictory = false;\n }\n var maxShown = gLevel.SIZE * gLevel.SIZE - gLevel.MINES;\n if (gState.shownCount === maxShown && gState.markedCount === gLevel.MINES) {\n gState.isGameOn = false;\n gState.isVictory = true;\n } \n\n //act according to the result: \n //if game is lost\n if (!gState.isGameOn && !gState.isVictory) {\n console.log('lost!');\n showAllBombs(gBoard, gBombs);\n showGameEndPopup('You Lost');\n }\n //if game is won\n if (gState.isVictory) {\n console.log('victory!');\n showGameEndPopup('Victorious!');\n }\n //if game is done (lost/win), reset stuff\n if (!gState.isGameOn) gameOver(); \n}", "function pollStatus() {\n\t\t_gamepad = navigator.getGamepads()[0];\n\n\t\tif(_gamepad){\n\t\t\t// If current timestamp == previous one, then the state of the gamepad hasn't changed and there is no need to update.\n\t\t\tif (prevTimestamp && (_gamepad.timestamp === prevTimestamp)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tprevTimestamp = _gamepad.timestamp;\n\n\t\t\tvar event = new CustomEvent('gamepad:update', { 'detail': _gamepad });\n\t\t\twindow.dispatchEvent(event); // emit that gamepad state has changed\n\t\t}\n\t}", "function getStatus(){\n spotify.getStatus(function (err, res) {\n if (err) {\n return console.error(err);\n }\n\n currentSong = res.track.artist_resource.name + ' - ' + res.track.track_resource.name\n // console.info('currently playing: ' +currentSong)\n getStatus();\n });\n}", "function gameStatus() {\n if (enemyHealth === totalScore) {\n isGameOver = true;\n $(\"#gameoverbox\").text(\"You defeated the Supreme Leader!!!\");\n wins++;\n totalScore = 0;\n reset();\n } else if (totalScore > enemyHealth) {\n isGameOver = true;\n\n $(\"#gameoverbox\").text(\"You were defeated!!! GAME OVER!!!\");\n losses++;\n totalScore = 0;\n reset();\n }\n }", "status() {\n if (this.statusListeners) {\n this.statusListeners.depend();\n }\n\n return this.currentStatus;\n }", "function getStatus() {\n // TODO: perhaps remove this if no other status added\n return status;\n }", "function getStatus(video) {\n //create the object\n let status = {}\n\n //use the same \"commands\" as the video commands for clarity plz\n if (video.paused == false) {\n status.paused = 0;\n }\n else if (video.paused == true) {\n status.paused = 1;\n }\n status.currentTime = video.currentTime\n status.baseURI = video.baseURI\n\n return status\n}", "function checkGameStatus() {\n\tnumTurns++; // count turn\n\t\n\t// check for a Win\n\tif (checkWin()) {\n\t\tgameStatus = currentPlayer + \" wins!\";\n\t} // if\n\t\n\t// check for tie\n\tif (numTurns == 9) {\n\t\tgameStatus = \"Tie Game!\";\n\t} // if\n\t\n\t// switch current player\n\tcurrentPlayer = (currentPlayer == \"X\" ? \"O\" : \"X\");\n\t\n\t// game is over\n\tif(gameStatus != \"\"){\n\t\tsetTimeout(function() {showLightBox(gameStatus, \"Game Over.\");}, 500);\n\t} // if\n\n} // checkGameStatus()", "async function getStatus () {\n const bet = await db('bets')\n .select('status')\n .where('id', '=', betId)\n .first()\n return bet.status\n }", "function getStatus(msg, session, telegram) {\n if (noSession) {\n telegram.sendMessage(msg.chat.id, \"No pomodoro session is currently running.\");\n }\n else if (pomoStatus) {\n elapsedTime = Number((25 - ((Date.now() - timeOutStart) / 1000) / 60).toFixed(1));\n telegram.sendMessage(msg.chat.id, `Session \"${session}\" is currently running. You have ${elapsedTime} minute(s) left.`);\n }\n else if (breakStatus) {\n elapsedTime = Number((7 - ((Date.now() - timeOutStart) / 1000) / 60).toFixed(1));\n telegram.sendMessage(msg.chat.id, `You're on break from \"${session}\"! You have ${elapsedTime} minute(s) left before work.`);\n }\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 getUpdatedGameStatus(date, currentSeason, awayTeamName, homeTeamName){\n var lastUpdatedGameStatus;\n // console.log(\"https://api.mysportsfeeds.com/v1.1/pull/nba/\" + currentSeason + \"/scoreboard.json?fordate=\" + date);\n\n gameStatusTimer = setInterval(function(){\n\n $.ajax({\n type: \"GET\",\n url: \"/ajax\",\n dataType: 'json',\n async: false,\n data: {\n url: currentSeason + \"/scoreboard.json?fordate=\" + date\n },\n success: function (data){\n // lastUpdatedGameStatus = data.scoreboard.lastUpdatedOn;\n\n if(lastUpdatedGameStatus == null || lastUpdatedGameStatus == undefined || data.scoreboard.lastUpdatedOn != lastUpdatedGameStatus){\n lastUpdatedGameStatus = data.scoreboard.lastUpdatedOn;\n // TODO: Need to check for failure - in that case we need to retieve info for a playoff game instead.\n var games = data.scoreboard.gameScore;\n var currentGame;\n for(var i = 0; i < games.length; i++){\n var tempGame = games[i];\n if(tempGame.game.awayTeam.Name == awayTeamName && tempGame.game.homeTeam.Name == homeTeamName){\n currentGame = tempGame;\n }\n }\n\n var isCompleted = currentGame.isCompleted;\n var isInProgress = currentGame.isInProgress;\n var currentIntermission = currentGame.currentIntermission;\n var quarterSummary = currentGame.quarterSummary;\n\n var gameProgress = document.getElementById(\"gameProgress\");\n if(isCompleted != \"false\"){\n // The game is over\n gameProgress.innerHTML = \"Finished\";\n\n var awayQuarterTotal = document.getElementById(\"awayQuarterTotal\").innerHTML;\n var homeQuarterTotal = document.getElementById(\"homeQuarterTotal\").innerHTML;\n\n // TODO: Testing will need to be performed on this to see if it is working as intended.\n // Maybe just have it automatically set here\n var currentAwayScore = parseInt(awayQuarterTotal) >= parseInt(currentGame.awayScore) ? parseInt(awayQuarterTotal) : currentGame.awayScore;\n var currentHomeScore = parseInt(homeQuarterTotal) >= parseInt(currentGame.homeScore) ? parseInt(homeQuarterTotal) : currentGame.homeScore;\n\n // Update the Away Score\n $(\"#awayScore\").fadeOut(1000,function(){\n $(this).html(currentAwayScore).fadeIn(2000);\n });\n\n // Update the Home Score\n $(\"#homeScore\").fadeOut(1000,function(){\n $(this).html(currentHomeScore).fadeIn(2000);\n });\n\n // Stop both of the ongoing interval timers\n clearInterval(boxScoreTimer);\n clearInterval(gameStatusTimer);\n }else if(quarterSummary == \"null\" || quarterSummary == undefined || quarterSummary == null || quarterSummary == \"undefined\"){\n gameProgress.innerHTML= \"Starting\";\n }\n else if(currentIntermission == 1){\n // in between first and second quarter\n gameProgress.innerHTML = '<span style=\"color: green\">Q2</span> <span style=\"color:red\">12:00</span>';\n }else if(currentIntermission == 2){\n // Half Time\n gameProgress.innerHTML = \"Halftime\";\n }else if(currentIntermission == 3){\n // In between third and fourth quarter\n gameProgress.innerHTML = '<span style=\"color: green\">Q4</span> <span style=\"color:red\">12:00</span>';\n }else if(currentIntermission == 4){\n // The game has been completed, but that returned data still has isCompleted as \"false\"\n gameProgress.innerHTML = \"Finished\";\n\n // just in case we need to catch the end of the game here as well.\n var awayQuarterTotal = document.getElementById(\"awayQuarterTotal\").innerHTML;\n var homeQuarterTotal = document.getElementById(\"homeQuarterTotal\").innerHTML;\n\n // TODO: Testing will need to be performed on this to see if it is working as intended.\n // Maybe just have it automatically set here\n var currentAwayScore = parseInt(awayQuarterTotal) >= parseInt(currentGame.awayScore) ? parseInt(awayQuarterTotal) : currentGame.awayScore;\n var currentHomeScore = parseInt(homeQuarterTotal) >= parseInt(currentGame.homeScore) ? parseInt(homeQuarterTotal) : currentGame.homeScore;\n\n // Update the Away Score\n $(\"#awayScore\").fadeOut(1000,function(){\n $(this).html(currentAwayScore).fadeIn(2000);\n });\n\n // Update the Home Score\n $(\"#homeScore\").fadeOut(1000,function(){\n $(this).html(currentHomeScore).fadeIn(2000);\n });\n }else if(isInProgress){\n // The game is still in progress\n\n // Here I also need to set the score of the game as well\n\n var currentQuarter = currentGame.currentQuarter;\n var timeRemaining = currentGame.currentQuarterSecondsRemaining;\n\n if(currentQuarter == null || currentQuarter == undefined || currentQuarter == \"null\" || currentQuarter == \"undefined\"){\n // then the game is just starting\n }\n\n var minutesRemaining = Math.floor(parseInt(timeRemaining) / 60);\n var secondsRemaining = parseInt(timeRemaining) % 60;\n\n if(String(secondsRemaining).length ==1){\n secondsRemaining = \"0\" + String(secondsRemaining);\n }\n\n // Update the Game Progress - this should be two spans, one for the quarter, the other for the time remaining the quarter\n $(\"#gameProgress\").fadeOut(1000, function(){\n // $(this).html(\"Quarter: \" + currentQuarter + \" - \" + minutesRemaining + \":\" + secondsRemaining).fadeIn(2000);\n $(this).html('<span style=\"color: green\">Q' + currentQuarter + '</span> <span style=\"color:red\">' + minutesRemaining + \":\" + secondsRemaining + '</span>').fadeIn(2000);\n });\n\n // Check to see which score is greater the one returned from the current Ajax call\n // or the score displayed in the totals box\n\n var awayQuarterTotal = document.getElementById(\"awayQuarterTotal\").innerHTML;\n var homeQuarterTotal = document.getElementById(\"homeQuarterTotal\").innerHTML;\n\n // TODO: Testing will need to be performed on this to see if it is working as intended.\n var currentAwayScore = parseInt(awayQuarterTotal) >= currentGame.awayScore ? parseInt(awayQuarterTotal) : currentGame.awayScore;\n var currentHomeScore = parseInt(homeQuarterTotal) >= currentGame.homeScore ? parseInt(homeQuarterTotal) : currentGame.homeScore;\n\n // Update the Away Score\n $(\"#awayScore\").fadeOut(1000,function(){\n $(this).html(currentAwayScore).fadeIn(2000);\n });\n\n // Update the Home Score\n $(\"#homeScore\").fadeOut(1000,function(){\n $(this).html(currentHomeScore).fadeIn(2000);\n });\n\n\n // gameProgress.innerHTML = \"Quarter: \" + currentQuarter + \" - \" + minutesRemaining + \":\" + secondsRemaining;\n }\n }\n }\n });\n\n }, 60000); //End of start interval\n\n}", "async getGameInfos() {\n\t\tawait this.login(LOGIN_ACCOUNT_GAUTIER)\n\t\tconst game = await this.sendRequest({ rsn:'2ynbmhanlb',guide:{ login:{ language:1,platform:'gaotukc',ug:'' } } }, '699002934')\n\n\t\treturn game.a\n\t}", "function checkGameStatus() {\r\n\tnumTurns++; //count turns\r\n\t\r\n\t//check for tie\r\n\tif (numTurns == 9) {\r\n\t\tgameStatus = \"Tie Game\";\r\n\t}//numTurns\r\n\t\r\n\t//check window\r\n\tif (checkWin()) {\r\n\t\tgameStatus = currentPlayer + \" wins!\";\r\n\t}//check wins\r\n\r\n\t//switch current player\r\n\tcurrentPlayer = (currentPlayer == \"X\" ? \"O\" : \"X\" );\r\n}//checkGameStatus", "function getScoreStatus() {\n if (correctAnswers >= passingScore) {\n return \"passed\";\n }\n return \"failed\";\n}", "function checkIfGameOver() {\n return getItemFromLocalStorage('gameOver');\n}", "checkGameStatus(id){\n let totalCount = 0;\n let aceFlag = false;\n let itemIndex = 0;\n if(id == 'player'){\n this.checkPlayerStatus();\n } else {\n this.checkDealerStatus();\n }\n }", "function statusCheck() {\n var statusLog = document.querySelector(\".status\");\n var status = response.status;\n console.log(status);\n\n statusLog.innerHTML += status;\n }", "function gameStatus(player, status) {\n if (status === 'win') {\n document.getElementById(\"status\").innerHTML = `${player} Wins!`;\n document.getElementById(\"reset-btn\").innerHTML = \"Play Again?\";\n } else if (status === 'tie') {\n document.getElementById(\"status\").innerHTML = 'Tied Game!';\n document.getElementById(\"reset-btn\").innerHTML = \"Play Again?\";\n } else {\n if (player === \"X\") {\n document.getElementById(\"status\").innerHTML = \"Player X's Turn!\";\n } else if (player === \"O\") {\n document.getElementById(\"status\").innerHTML = \"Player O's Turn!\";\n }\n }\n}", "function updateStatus(){\n if(!gameStatus.isOver){\n if(gameStatus.turn == 0){\n document.getElementById('game-status').innerHTML = 'Game Start';\n }else{\n document.getElementById('game-status').innerHTML = calculateTurn(gameStatus.turn).color + ' just went';\n }\n }else{\n document.getElementById('game-status').innerHTML = calculateTurn(gameStatus.turn).color + ' WON! New game?';\n }\n}", "updateGameStatus(gameStatus) {\n this.gameStart = gameStatus.gameStart;\n this.gameTurn = gameStatus.gameTurn;\n this.gameScore = gameStatus.gameScore;\n this.waitNextTurn = gameStatus.waitNextTurn;\n this.scoreText.setText(this.gameScore.blue + ' < Blue : Red > ' + this.gameScore.red);\n }", "function getStatus() {\n var xhr = new XMLHttpRequest();\n var url = SERVER_URL + '/doorbells/' + DOORBELL_ID + '/visitors?authtoken=' + AUTH_TOKEN;\n xhr.open('GET', url, true);\n\n xhr.onload = function(e) {\n var data = JSON.parse(this.response);\n if (data.length > 0) {\n var mostRecentVisitor = data[0];\n var currentTime = (new Date()).getTime();\n var visitorTime = (new Date(Date.parse(mostRecentVisitor.when))).getTime();\n var timeDelta = currentTime - visitorTime;\n if (timeDelta > 0 && timeDelta < 60000) {\n Pebble.sendAppMessage({\n status: 1,\n visitor_description: mostRecentVisitor.description\n });\n currentVisitorId = mostRecentVisitor.id;\n return;\n }\n }\n // No one is at the door.\n Pebble.sendAppMessage({\n status: 0\n });\n currentVisitorId = '';\n };\n xhr.send();\n}", "function checkGameStatus() {\n if (!gGame.isOn && gGame.shownCount === 0) {\n gStartTime = Date.now();\n gGameInterval = setInterval(showTime, 1000)\n gGame.isOn = true;\n } else return false;\n}", "function gameStatus() {\n\n if(play){ //game paused\n gameControll.innerHTML = 'Start';\n number.innerHTML ='?';\n }else{ //game continued\n gameControll.innerHTML = 'Pause';\n }\n play = !play;\n}", "getStatus () {\r\n const timeElapsed = this._getTime()\r\n\r\n return new Status(this._dna[this._getSegIndex(timeElapsed)].pace, \"good\", this._getDistance(timeElapsed), timeElapsed)\r\n }", "function gameStatus() {\n // position of the last item in player sequence\n var lastPosition = playerSequence.length - 1; \n if (playerSequence[lastPosition] == simonSequence[lastPosition] && \n playerSequence.length < simonSequence.length) {\n status.html(`<p>Well done!</p>`);\n }\n else if (playerSequence[lastPosition] == simonSequence[lastPosition] \n && playerSequence.length == simonSequence.length) {\n status.html(`<p>Next play! Get ready!</p>`);\n disableColorButtons();\n setTimeout(function() {\n newGame = false; // To avoid score and simon sequence reset\n retry = false;\n notEndGame = false;\n play();\n }, 2000);\n }\n else {\n incorrectSound.play(); // 'Razz' sound plays when player makes mistake\n if (hard.is(\":checked\")) {\n status.html(\n `<div class=\"font\">Game Over </div>\n <p>Oops! That's not right!<br>\n You scored <span class=\"red\"> ${scores} </span><br> \n ${playAgain}.</p>`);\n enableModeButton();\n enableStartButton();\n disableExitButton();\n }\n else {\n status.html(\n `<div class=\"font\"> Oops! Not quite right!</div>\n <p>Let's have another try! </p>`);\n retry = true;\n newGame = false;\n setTimeout(play, 4000);\n disableExitButton();\n }\n }\n }", "function updateStatus(classNames) {\n // check game status\n if (myGame.checkWin(classNames)) {\n // update status of game and set gameover\n gameStatus(myGame.player, 'win');\n myGame.gameOver = true;\n return;\n } else if (myGame.spaces === 0) {\n // update status of game and set gameover\n gameStatus(myGame.player, 'tie');\n myGame.gameOver= true;\n return;\n } else {\n // update html text\n gameStatus(myGame.player)\n }\n}", "function checkStatus() {\n checkWin();\n checkLose();\n }", "showGameStatus(gameWin) {\n const div = document.createElement(`div`);\n div.classList.add(`game-status`);\n div.innerHTML = `${gameWin ? 'WIN!' : 'GAME OVER!'}`;\n this.DOMGrid.appendChild(div);\n }", "function SarahSetStatus() {\n\n\t// Sarah status depends on Bondage College imported data\n\tif (LogQuery(\"BondageCollege\", \"Import\")) SarahStatus = \"SchoolMate\";\n\tif (LogQuery(\"SarahLover\", \"NPC-Sarah\") && (Player.Lover == \"NPC-Sarah\")) SarahStatus = \"Lover\";\n\tif (LogQuery(\"SarahLover\", \"NPC-Sarah\") && (Player.Lover != \"NPC-Sarah\")) SarahStatus = \"ExLover\";\n\tif (LogQuery(\"SarahCollared\", \"NPC-Sarah\")) SarahStatus = \"Owned\";\n\tif (LogQuery(\"SarahCollaredWithCurfew\", \"NPC-Sarah\")) SarahStatus = \"Curfew\";\n\tif (LogQuery(\"SarahWillBePunished\", \"NPC-SarahIntro\")) SarahStatus = \"WillBePunished\";\n\tif (LogQuery(\"SarahCameWithPlayer\", \"NPC-SarahIntro\")) SarahStatus = \"CameWithPlayer\";\n\n\t// Amanda status depends on Bondage College imported data\n\tif (LogQuery(\"BondageCollege\", \"Import\")) AmandaStatus = \"SchoolMate\";\n\tif (LogQuery(\"AmandaLover\", \"NPC-Amanda\") && (Player.Lover == \"NPC-Amanda\")) AmandaStatus = \"Lover\";\n\tif (LogQuery(\"AmandaLover\", \"NPC-Amanda\") && (Player.Lover != \"NPC-Amanda\")) AmandaStatus = \"ExLover\";\n\tif (LogQuery(\"AmandaCollared\", \"NPC-Amanda\")) AmandaStatus = \"Owned\";\n\tif (LogQuery(\"AmandaCollaredWithCurfew\", \"NPC-Amanda\")) AmandaStatus = \"Curfew\";\n\tif (LogQuery(\"AmandaMistress\", \"NPC-Amanda\") && (Player.Owner == \"NPC-Amanda\")) AmandaStatus = \"Owner\";\n\tif (LogQuery(\"AmandaMistress\", \"NPC-Amanda\") && (Player.Owner != \"NPC-Amanda\")) AmandaStatus = \"ExOwner\";\n\n\t// They are not accessible if they already are in the private room\n\tfor (let P = 1; P < PrivateCharacter.length; P++) {\n\t\tif (PrivateCharacter[P].Name.trim() == \"Sarah\") { SarahStatus = \"InPrivateRoom\"; SarahInside = false; }\n\t\tif (PrivateCharacter[P].Name.trim() == \"Amanda\") AmandaStatus = \"InPrivateRoom\";\n\t\tif (PrivateCharacter[P].Name.trim() == \"Sophie\") SophieStatus = \"InPrivateRoom\";\n\t}\n}", "function showGameStatus() {\n document.getElementById(\"pairs_clicked\").innerHTML =\n memoryGame.pairsClicked;\n document.getElementById(\"pairs_guessed\").innerHTML =\n memoryGame.pairsGuessed;\n }", "static get STATUS() {\n return 0;\n }", "function loadStatus() {\n const status = childProcess.execSync('expressvpn status').toString();\n const notConnected = status.includes('Not connected');\n const connecting = status.includes('Connecting');\n const connected = status.match(/Connected\\sto\\s(.*)/);\n if (notConnected) {\n return 'Not connected';\n } else if (connecting) {\n return 'Connecting...';\n } else if (connected && connected[1]) {\n return connected[1];\n }\n}", "function statusUpdate() {\n console.log(\"Session Seconds: \" + sessionSeconds);\n console.log(\"Short Break Seconds: \" + shortBreakSeconds);\n console.log(\"Long Break Seconds: \" + longBreakSeconds);\n console.log(\"Paused: \" + paused);\n console.log(\"Seconds Left: \" + seconds_left);\n console.log(\"Current Timer: \" + currentTimer);\n console.log(\"Temp Session Seconds: \" + tempoarySessionSeconds);\n console.log(\"Temp Short Break Seconds: \" + tempoaryShortBreakSeconds);\n console.log(\"Temp Long Break Seconds: \" + tempoaryLongBreakSeconds);\n}", "function checkGameStatus() {\r\n\tnumTurns++;\r\n\t\r\n\t//check win\r\n\tif (checkWin()) {\r\n\t\tgameStatus = currentPlayer + \" Wins!\";\r\n\t\t\r\n\t}\r\n\t\r\n\t//chec for tie\r\n\tif (numTurns == 9) {\r\n\t\tgameStatus = \"Tie Game\";\r\n\t\t\r\n\t}//numTurns\r\n\t\t\r\n\t//switch current player\r\n\tcurrentPlayer = (currentPlayer == \"X\" ? \"O\" : \"X\");\r\n\t\r\n\t//game is over\t\r\n\tif(gameStatus != \"\") {\r\n\t\tsetTimeout(function() { showLightBox(gameStatus, \"Game Over.\");}, 500);\r\n\t\t\r\n\t}\r\n\t\r\n} //check game status", "function checkStatus() {\n\n }", "getStatusAndPlayTurn() {\n\n console.log('Get status and play turn.');\n\n // Get status just before our turn to make sure we have the latest info.\n fetch(this.baseUrl + 'status?' + querystring.stringify({robot_id: this.robotId})).then(response => {\n response.json().then(json => {\n\n // Save status.\n this.status = json;\n\n // Now run the actual decision making function.\n this.playTurn();\n\n });\n }); \n\n }", "function getStatus () // string\n{\n if (typeof (webphone_api.plhandler) === 'undefined' || webphone_api.plhandler === null)\n return \"STATUS,-1,Initializing\";\n else\n return webphone_api.plhandler.GetStatus();\n}", "static get globalMouseStatus() {\n return GRoot.$gmStatus;\n }", "function gameOver(status) {\n saveItemInLocalStorage('gameOver',true);\n clearTimeout(timer);\n timer=null;\n var message='Congrats you have won';\n if(!status)\n message='You have lost';\n return message;\n}", "static getButtonStatusText(challenge) {\n const [CCSTB, CCFB] = [this.Constants.STARTED.BUTTONS, this.Constants.FINISHED.BUTTONS];\n\n const uScore = this.getUser(challenge).score;\n const oScore = this.getOpponent(challenge).score;\n\n let statusTxt = null;\n\n if (ChallengeUtils.isNewChallenge(challenge)) {\n statusTxt = this.Constants.NEW.BUTTONS.TEXT.STATUS.READY;\n } else if (ChallengeUtils.isDeclinedChallenge(challenge)) {\n statusTxt = CCFB.TEXT.STATUS.DECLINED;\n } else if (ChallengeUtils.isFinishedChallenge(challenge)) {\n if (!_.isNil(challenge.winner)) {\n if (uScore !== oScore) {\n statusTxt = uScore > oScore ? CCFB.TEXT.STATUS.WON : CCFB.TEXT.STATUS.LOST;\n } else if (uScore === oScore) {\n statusTxt = CCFB.TEXT.STATUS.TIED;\n }\n }\n }\n\n if (_.isNil(statusTxt)) {\n statusTxt = _.isNil(oScore) ? CCSTB.TEXT.STATUS.THEM : CCSTB.TEXT.STATUS.YOU;\n }\n\n return statusTxt;\n }", "getGameState() {\n\t\treturn this.gameState;\n\t}", "function gameStatus() {\n\tpairsToGuess--;\n\tif (pairsToGuess == 0) {\n\t\ttoStopWatch(); //stop the stopwatch\n\t\tsetTimeout(function() { //display result popup\n\t\t\tdisplayResult(); //to put results to the modal\n \t\tmodalResult(); // to show modal with results\n \t\t}, 500); \n\t} else {\n\t\t\n\t}\n}", "function findMostRecentGame(game) {\n return game.status !== \"future\"\n}", "function pollStatus () {\n //Quick polling until location known\n if (gOnLanValid && !gOnLan && !gGeoLat) {\n pollGeo ();\n }\n loadJSONP(\n \"/json/stat.json\",\n function(newStatus) {\n if (JSON.stringify(gStatus) !== JSON.stringify(newStatus)) {\n console.log(newStatus);\n gStatus = newStatus;\n gStatusUpdate = true;\n updateDisplay();\n if (!checkStreamOK) {\n fullStopPlayer();\n updateDisplay();\n }\n }\n }, null, null, \"jpstat\"\n );\n //Get player into intended state\n if (gPlayIntention && !gPlaying && !gEnacting) {\n startPlayer();\n updateDisplay();\n }\n if (!gPlayIntention && gPlaying && !gEnacting) {\n console.log(\"Stopping to intended state\");\n stopPlayer();\n updateDisplay();\n }\n}", "function status1() {\n\n\n if(guest === computer) {\n wins++;\n $(\"#wins\").html(\"Wins: \" + wins);\n $('#status').html(\"You win!\");\n \n game = false;\n }\n\n else if(guest > computer) {\n losses++;\n $(\"#losses\").html(\"Losses:\" + losses);\n $(\"#status\").html(\"You lost.\");\n game = false;\n }\n\n\n\n\n\n}", "function checkGameStatus() {\n if (xCor[xCor.length - 1] > width ||\n xCor[xCor.length - 1] < 0 ||\n yCor[yCor.length - 1] > height ||\n yCor[yCor.length - 1] < 0 ||\n checkSnakeCollision()) {\n noLoop();\n var scoreVal = parseInt(scoreElem.html().substring(8));\n scoreElem.html('Game ended! Your score was : ' + scoreVal);\n synth.triggerAttackRelease('C2', '4n');\n }\n}", "status(){\n if(this.facedown.length <= 0){\n inProgress = false;\n console.log(\"GAME OVER\");\n }\n }", "function checkGameStatus(){\r\n\r\n\tnumTurns++; //count turn\r\n\t\r\n\t//check for a win\r\n\tif(checkWin()){\r\n\t\tgameStatus = currentPlayer + \" wins!\";\r\n\t}//if\r\n\t\r\n\r\n\t\r\n\t\tif(gameStatus != \"\"){\r\n\t\tsetTimeout(function(){showLightBox(gameStatus, \"Game Over.\");},500);\r\n\t}//if\r\n\t\r\n}// checkGameStatus", "async function inGame({Match, status_string}) {\r\n\tlet liveMatch = await getData('getmatchplayerdetails', true, [Match]).catch(err => log('red', err)),\r\n\t\tfriendsList = await getData('getfriends', true, [config.username]).catch(err => log('red', err)),\r\n\t\tplayerData = liveMatch.find(obj => obj.playerName === config.username),\r\n\t\tmaxPartySize = liveMatch.length / 2,\r\n\t\tpartyCount = 1;\r\n\tliveMatch.forEach(player => {\r\n\t\tif (player.taskForce !== playerData.taskForce) return;\r\n\t\tif (friendsList.find(obj => obj.name === player.playerName)) {partyCount++;}\r\n\t});\r\n\trpc.setActivity({\r\n\t\tdetails: queue[playerData.Queue][0],\r\n\t\tstate: `Party (${partyCount} / ${maxPartySize})`,\r\n\t\tstartTimestamp,\r\n\t\tlargeImageKey: removeAllSpaces(playerData.GodName.replace(/_/g, '')).toLowerCase() + '_jpg',\r\n\t\tlargeImageText: playerData.GodName.replace(/_/g, ' '),\r\n\t\tsmallImageKey: queue[playerData.Queue][1] + '_png',\r\n\t\tsmallImageText: queue[playerData.Queue][1].replace(/^\\w/, c => c.toUpperCase()),\r\n\t\tinstance: false\r\n\t}).catch(err => log('red', err));\r\n\tif (currentActivity !== status_string) {\r\n\t\tlet god = playerData.GodName.replace(/_/g, ' ');\r\n\t\tlet gamemode = queue[playerData.Queue][1].replace(/^\\w/, c => c.toUpperCase());\r\n\t\tlog('green', `RPC: God=${god} Gamemode=${gamemode}`);\r\n\t\tcurrentActivity = status_string;\r\n\t\tif (config.getAPIUseData) getDataUsed();\r\n\t}\r\n}", "getStatus () {\r\n const length = this._pastPos.length\r\n\r\n const timeDiff = (this._pastPos[length-1][2] - this._pastPos[0][2]) / 1000\r\n const pace = (timeDiff / 60) / ((this._sum(this._pastDist)) / 1000)\r\n \r\n\r\n let quality; //CUSTOMIZABLE, pace quality depends on GPS reading frequency\r\n switch (true) {\r\n case timeDiff / (length - 1) < 3:\r\n quality = \"good\"\r\n break;\r\n case timeDiff / (length - 1) < 5:\r\n quality = \"OK\"\r\n break;\r\n default:\r\n quality = \"poor\"\r\n break;\r\n }\r\n\r\n return new Status(pace, quality, this._totalDist, (this._pastPos[length-1][2] - this._creationTime) / 1000)\r\n }", "function outOfGame({status_string}) {\r\n\tif (currentActivity !== status_string) {\r\n\t\tlog('green', `RPC: ${status_string}`);\r\n\t\tcurrentActivity = status_string;\r\n\t\tif (config.getAPIUseData) getDataUsed();\r\n\t}\r\n\trpc.setActivity({\r\n\t\tdetails: status_string,\r\n\t\tlargeImageKey: 'logo_png',\r\n\t\tlargeImageText: status_string,\r\n\t\tinstance: false\r\n\t}).catch(err => log('red', err));\r\n}", "function get_is_game_full(cbFunc) {\n $.ajax({\n url : '/api/game/getPlayerFullStatus',\n type : 'POST',\n dataType: 'json',\n contentType : \"application/json\",\n success : function(data) {\n cbFunc(data.player_full_status);\n }\n });\n}", "function getSystemStatus() {\n requestUrl = 'http://' + address + '/api/' + username + '/';\n sendRequest('lights', 'GET');\n}", "getStatus() {\n const statuses = this.getStatuses();\n\n if (statuses.length === 1) { return statuses[0]; }\n\n sentry.warn('DB has multiple statuses', this.asJSON());\n return statuses[0];\n }", "getStatus() {\n\t\treturn this.status;\n\t}", "getStatus(username){\n if(this.userMapping.getUserByUsername(username).isOnline) {\n return 'online';\n } \n return 'offline';\n }", "function getGameMode(message) {\r\n let channelId = message.channel.id;\r\n if ((botHasChannel(channelId)) && (!bot.channel[channelId].activeGame == '')) {\r\n return bot.channel[channelId].activeGame;\r\n } else {\r\n return '';\r\n }\r\n}", "function checkOnlineStatus(){\n status = navigator.onLine;\n return status;\n }", "async getConsumableStatus() {\n let data = await this.sendCommand(\"get_consumable\", [], {});\n return {\n mainBrushLeftTime: Math.max(0, 300 - (data[0].main_brush_work_time / 60 / 60)), // convert to hours left\n sideBrushLeftTime: Math.max(0, 200 - (data[0].side_brush_work_time / 60 / 60)), // convert to hours left\n filterLeftTime: Math.max(0, 150 - (data[0].filter_work_time / 60 / 60)), // convert to hours left\n sensorLeftTime: Math.max(0, 30 - (data[0].sensor_dirty_time / 60 / 60)) // convert to hours left\n };\n }", "function getStatusMessage() {\n\t\tvar statusMessage;\n\n\t\tswitch(myMessengerDetails.status) {\n\t\t\tcase \"Online\":\n\t\t\t\tstatusMessage = settings.statusMessages[0];\n\t\t\t\tbreak;\n\t\t\tcase \"Offline\":\n\t\t\t\tstatusMessage = settings.statusMessages[1];\n\t\t\t\tbreak;\n\t\t\tcase \"Away\":\n\t\t\t\tstatusMessage = settings.statusMessages[2];\n\t\t\t\tbreak;\n\t\t\tcase \"Busy\":\n\t\t\t\tstatusMessage = settings.statusMessages[3];\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tstatusMessage = \"$ is not signed into Windows Live Messenger\";\n\t\t\t\tbreak;\n\t\t}\n\n\t\t//and replace the dollar signs with the user's display name\n\t\tstatusMessage = statusMessage.replace(\"$\", myMessengerDetails.displayName);\n\n\t\treturn statusMessage;\n\t}", "function getSteamStatusString(status) {\n\tswitch (status) {\n\t\tcase constants.STEAM.DISCONNECTED:\n\t\t\treturn 'Not connected.';\n\t\tcase constants.STEAM.CONNECTED:\n\t\t\treturn 'Connected, logging in.';\n\t\tcase constants.STEAM.LOGGED_IN:\n\t\t\treturn 'Connected and signed in.';\n\t}\n\n\treturn 'Unknown/Invalid';\n}", "function checkGameStatus(users) {\r\n if (users[0][2] == users[1][2]) {\r\n users[0].push('Draw')\r\n users[1].push('Draw')\r\n }\r\n else {\r\n // storing win/lose message for each player\r\n users[0].push(winCondition[users[0][2]]['lose'] == users[1][2] ? \"You Lose :(\" : \"You Win :)\")\r\n users[1].push(winCondition[users[1][2]]['lose'] == users[0][2] ? \"You Lose :(\" : \"You Win :)\")\r\n }\r\n}", "queryStatus( cb = false ) {\n PythonShell.run( './Python/modules/status.py', ( err, results ) => {\n if ( err )\n throw err\n // FIXME: Log this result, but quieted for now:\n // electronicDebug(`rcvd (pyShellUserStatus): ${results}`);\n if ( cb )\n cb( results )\n } )\n }", "async function getGipsStatus(session) {\n debug('getGipsStatus called');\n\n const gipsStatus = await getGlobalStatus(session.identityId);\n debug('getGipsStatus called', gipsStatus);\n\n return gipsStatus;\n}", "async function getGameVersion() {}", "isGameOpen() {\n return this.gameState === GAME_OPEN;\n }", "gameOverCheck(){\n return this.gameOver\n }", "function gameStatus(player, status) {\n if (status === 'win') {\n document.getElementById(\"status\").innerHTML = `${player} Wins!`;\n document.getElementById(\"reset-btn\").innerHTML = \"Play Again?\";\n // increment score on html\n scores(player);\n } else if (status === 'tie') {\n document.getElementById(\"status\").innerHTML = 'Tied Game!';\n document.getElementById(\"reset-btn\").innerHTML = \"Play Again?\";\n scores('tied');\n } else {\n if (player === \"O\") {\n document.getElementById(\"status\").innerHTML = \"Player X's Turn!\";\n } else if (player === \"X\") {\n document.getElementById(\"status\").innerHTML = \"Player O's Turn!\";\n }\n }\n}", "function getStatus() {\n return $mmCoursePrefetchDelegate.getModuleStatus(module, courseid, scorm.sha1hash, 0);\n }", "function determineGameStatus() {\n var player1 = [];\n var player2 = [];\n\n for(var index = 0;index < arrayMatrix.length;index++) {\n //console.log(index, arrayMatrix[index]);\n if (arrayMatrix[index] === \"player1\") {\n player1.push(index);\n }\n if (arrayMatrix[index] === \"player2\") {\n player2.push(index);\n }\n }\n ///console.log(\"player1\",player1);\n //console.log(\"player2\",player2);\n // console.log('arraymatrix',arrayMatrix);\n // console.log('player1',player1);\n // console.log('player2',player2);\n\n var isWinner = isPlayerWinner(player1);\n if (isWinner !== -1) {\n //we have a winner...\n return {winner:\"player1\", selections:isWinner}\n }\n else {\n isWinner = isPlayerWinner(player2);\n if (isWinner !== -1){\n return {winner:\"player2\", selections:isWinner}\n }\n else {\n return -1;\n }\n }\n //console.log(isWinner);\n}", "function gameStatus(dachi){\n if(dachi.energy >= 100 && dachi.fullness >= 100 && dachi.happiness >= 100){\n console.log(\"Win\");\n $(\".reaction\").text(\"You won !\");\n $(\"#feed\").hide();\n $(\"#play\").hide();\n $(\"#work\").hide();\n $(\"#sleep\").hide();\n $(\"#restart\").show();\n } else if (dachi.fullness <= 0 || dachi.happiness <= 0){\n console.log(\"Loss\");\n $(\".reaction\").text(\"You lost !\");\n $(\"#feed\").hide();\n $(\"#play\").hide();\n $(\"#work\").hide();\n $(\"#sleep\").hide();\n $(\"#restart\").show();\n }\n }", "async function getStat() {\n const responseFromServer = await fetch('/game-data');\n game_data = await responseFromServer.json();\n \n displayPrompt();\n}", "function displayStatus() {\n Reddcoin.messenger.getconnectionState(function(data){\n Reddcoin.viewWalletStatus.getView(data);\n\n Reddcoin.messenger.getReleaseVersion( function(data) {\n Reddcoin.viewWalletStatus.getView(data);\n });\n });\n}", "isGameStarted() {\n return this.gameState === GAME_STARTED;\n }", "function displayBotStatus() {\n var offline = 0,\n online = 0,\n farming = 0;\n\n $.ajax({\n url: '/Api/Bot/ASF',\n type: 'GET',\n success: function (data) {\n var json = data['Result'];\n\n for (var i = 0; i < json.length; i++) {\n var obj = json[i],\n KeepRunning = obj.KeepRunning,\n TimeRemaining = obj.CardsFarmer.TimeRemaining;\n\n if (KeepRunning === false) {\n offline++;\n } else {\n if (TimeRemaining === '00:00:00') {\n online++;\n } else {\n farming++;\n }\n }\n }\n\n $('#offlineBots').text(offline);\n $('#onlineBots').text(online);\n $('#farmingBots').text(farming);\n }\n });\n}" ]
[ "0.8152759", "0.7751369", "0.72937876", "0.7205052", "0.6953415", "0.6897468", "0.67789555", "0.67669314", "0.6752943", "0.6713045", "0.6713045", "0.67113835", "0.6671745", "0.66654474", "0.6644915", "0.66004276", "0.6592144", "0.6548108", "0.65450794", "0.6535144", "0.6529142", "0.65259093", "0.6497568", "0.64843076", "0.64624643", "0.6447329", "0.64358383", "0.6406806", "0.64015025", "0.6389342", "0.63770556", "0.6347577", "0.63435876", "0.6340349", "0.6303079", "0.6259589", "0.62529945", "0.6250129", "0.62451357", "0.6240006", "0.6234287", "0.62092876", "0.6207123", "0.62056303", "0.6177586", "0.61743754", "0.6171892", "0.6171656", "0.61587965", "0.61510736", "0.6127428", "0.61218137", "0.61191887", "0.61167234", "0.61110425", "0.61094487", "0.6103886", "0.6088122", "0.60862255", "0.60795414", "0.60737073", "0.6072446", "0.60712177", "0.60683775", "0.60654974", "0.6062636", "0.6050882", "0.6050152", "0.6045112", "0.6033524", "0.6032959", "0.60210073", "0.6020887", "0.60174954", "0.6015412", "0.60124177", "0.6009282", "0.600346", "0.60033166", "0.5991176", "0.59856355", "0.5980383", "0.59789395", "0.5973152", "0.59671897", "0.59563804", "0.5952614", "0.5952516", "0.59518313", "0.5946699", "0.5932674", "0.5929696", "0.5929412", "0.59121394", "0.59052706", "0.5905135", "0.5902931", "0.5900875", "0.5900695", "0.58783513" ]
0.7580793
2
Render utility to generate tiles
generateGridRows() { // Object to store the tiles let grid_rows = [] let grid_ind = 1 // For each row for (let row = 1; row <= 4; row++) { let col_grids = [] //For each column for (let col = 1; col <= 4; col++) { // Referred to reactjs documentation for handle click let id = grid_ind++ // To assign class based on state // Useful for styling let classVar = this.state.tileData[id]['status'] == 'hide' ? '' : 'tile-' + this.state.tileData[id]['status'] col_grids.push(<td key={id} id={id} className={'column column-25 tile ' + classVar} onClick={() => { this.handleClick(id) }}>{this.state.tileData[id]['status'] != 'hide' ? this.state.tileData[id]['letter'] : ''}</td>) } grid_rows.push(<tr key={row} className="row">{col_grids}</tr>) } return grid_rows }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderTiles() {\n removeChildren(tilesContainer);\n for (var i = 0, length = tiles.length; i < length; ++i) {\n tilesContainer.appendChild(tiles[i].elem);\n }\n}", "function render() {\n renderRegistry();\n renderDirectory();\n renderOverride();\n}", "function createTiles(){\n\t\n\t\n // figure out how wide and tall each tile should be based on the image with and height\n // then ceiling the float that will result from dividing the total size of the image\n // by the number of rows and columns needed\n \t_tile_width = Math.ceil(_image_width/_num_cols); // divide the total number of divs needed by the number of columns to get\n\t\t\t\t\t\t\t\t\t\t\t\t\t// the tile width\n \n\t_tile_height = Math.ceil(_image_height/_num_rows); // divide the total number of divs needed by the number of rows to get\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the tile height\n\n \n\t//Create the two dimensional array needed to save the tiles in\n\t tile_array = doubleArray(_num_rows, _num_cols);\n\t\n // add all of the tiles to your page using nested for loops and\n\tfor(var r=0; r<_num_rows ; r++) // to loop over each row\n\t{\n\t\tfor(var c=0; c<_num_cols ; c++) // to loop over each column\n\t\t{\n\t\t\tif(r === c && c === 0) // if we are in the first row and column, we mark it as the empty tile\n\t\t\t{\n\t\t\t\ttile_array[r][c] = 0; // we mark it by adding zero\n\t\t\t\tcontinue; //continue to the loop\n\t\t\t}\n\t\t\t\n\t\t\tvar container = document.getElementById(\"cont\"); // get the container div which we will place the other divs in\n\t\t\ttile_array[r][c] = createDiv(r,c); //save each div created into the array\n\t\t\tcontainer.appendChild(tile_array[r][c]); //append the div created and saved to the container\n\t\t\t\n\t\t}\n\t}\n\n\n\t\n}", "function tile() {\n tiles = document.createElement(\"div\");\n tiles.classList.add(\"tiles\");\n tiles.style.cssText += `\n width: 6.6%;\n background-color: rgb(246, 250, 232);\n height: 0vh;\n `;\n return tiles;\n }", "createHTML() {\n var tile = document.createElement('li'),\n targetElement = this.tilesView.tilesWrapper.querySelector(\n '.list.' + this.shader.status\n );\n\n if (!targetElement) {\n let list = document.createElement('ul'),\n listElement = document.createElement('li');\n\n list.classList.add('list', this.shader.status);\n list.setAttribute('data-status', this.shader.statusOrginal);\n listElement.appendChild(list);\n this.tilesView.tilesWrapper.appendChild(list);\n targetElement = list;\n }\n\n tile.classList.add('shader');\n tile.innerHTML = TILE_TEMPLATE.replace(\n '{previewUrl}',\n getPreviewUrlById(this.shader.id)\n )\n .replace('{shaderUrl}', getShaderUrlById(this.shader.id))\n .replace('{shaderTitle}', this.shader.title);\n targetElement.appendChild(tile);\n }", "function template(){\n canvas = document.getElementById('tiles');\n ctx = canvas.getContext('2d');\n createTile(ctx,'dirt',0,0);\n createTile(ctx,'grass',85,0);\n createTile(ctx,'water',170,0);\n}", "render() {}", "render() {}", "render() {}", "function draw() {\n for (let i=0; i<tiles.length; i++) {\n tiles[i].display();\n }\n}", "function render() {\n loop(function (row, col) {\n x = (col * tileSize);\n y = (row * tileSize);\n\n // draw placements\n if (map[row][col] == 1) {\n context.fillStyle = \"#aa0000\";\n context.fillRect(x + tileOffset, y + tileOffset, tileSize - tileOffset, tileSize - tileOffset);\n }\n });\n }", "_render() {}", "function renderMap(map){\n\tfor (var r = 0; r <= map.tiles.length; r++) {\n if (map.tiles[r] !== undefined) {\n for (var b = 0; b <= map.tiles[r].length; b++) {\n if (map.tiles[r][b] !== undefined) {\n map.tiles[r][b].image.x = r * map.tileSize;\n map.tiles[r][b].image.y = b * map.tileSize;\n map.container.addChild(map.tiles[r][b].image);\n }\n }\n }\n }\n}", "function render() {\n \n var d = new Date();\n var startTime = d.getTime(); \n \n baseImageLoaded = true;\n \n var firstTile = imageSliceData[0];\n \n var subImage = baseImage.get(firstTile.imageX, firstTile.imageY, firstTile.width / 2, firstTile.height / 2);\n \n var upsideDownImage = turnImageUpsideDown(subImage);\n var sidewaysImage = turnImageSideways(subImage);\n var upsideDownSidewaysImage = turnImageSideways(upsideDownImage);\n var resultImage = assembleTransform1(subImage, sidewaysImage, upsideDownImage, upsideDownSidewaysImage);\n \n for (var a = 0; a < imageSliceData.length; a++) {\n\n var tile = imageSliceData[a]\n\n image(resultImage, tile.componentX, tile.componentY);\n }\n \n var d = new Date();\n var stopTime = d.getTime(); \n}", "function ThumbnailRenderer() {\n\tbitsyLog(\"NEW THUMB RENDERER\", \"editor\");\n\n\tvar drawingThumbnailCanvas, drawingThumbnailCtx;\n\tdrawingThumbnailCanvas = document.createElement(\"canvas\");\n\tdrawingThumbnailCanvas.width = tilesize * scale; // TODO: scale constants need to be contained somewhere\n\tdrawingThumbnailCanvas.height = tilesize * scale;\n\tdrawingThumbnailCtx = drawingThumbnailCanvas.getContext(\"2d\");\n\n\tvar thumbnailRenderEncoders = {};\n\tvar cache = {};\n\n\tfunction thumbnailGetImage(drawing, frameIndex) {\n\t\tif (drawing.type === TileType.Sprite || drawing.type === TileType.Avatar) {\n\t\t\treturn getSpriteFrame(sprite[drawing.id], frameIndex);\n\t\t}\n\t\telse if(drawing.type === TileType.Item) {\n\t\t\treturn getItemFrame(item[drawing.id], frameIndex);\n\t\t}\n\t\telse if(drawing.type === TileType.Tile) {\n\t\t\treturn getTileFrame(tile[drawing.id], frameIndex);\n\t\t}\n\t\treturn null;\n\t}\n\n\tfunction thumbnailDraw(drawing, context, x, y, frameIndex) {\n\t\tvar renderedImg = renderTileToCanvas(drawing, frameIndex);\n\t\tif (renderedImg) {\n\t\t\tcontext.drawImage(renderedImg, x, y, tilesize * scale, tilesize * scale);\n\t\t}\n\t\telse {\n\t\t\tbitsyLog(\"oh no! image render for thumbnail failed\", \"editor\");\n\t\t}\n\t}\n\n\tfunction render(imgId,drawing,frameIndex,imgElement) {\n\t\tvar isAnimated = (frameIndex === undefined || frameIndex === null) ? true : false;\n\n\t\tvar palId = getRoomPal(state.room); // TODO : should NOT be hardcoded like this\n\n\t\tvar hexPalette = [];\n\t\tvar roomColors = getPal(palId);\n\t\tfor (i in roomColors) {\n\t\t\tvar hexStr = rgbToHex(roomColors[i][0], roomColors[i][1], roomColors[i][2]).slice(1);\n\t\t\thexPalette.push(hexStr);\n\t\t}\n\n\t\t// bitsyLog(id, \"editor\");\n\n\t\tvar drawingFrameData = [];\n\n\t\tif( isAnimated || frameIndex == 0 ) {\n\t\t\tthumbnailDraw(drawing, drawingThumbnailCtx, 0, 0, 0 /*frameIndex*/);\n\t\t\tdrawingFrameData.push( drawingThumbnailCtx.getImageData(0,0,tilesize*scale,tilesize*scale).data );\n\t\t}\n\t\tif( isAnimated || frameIndex == 1 ) {\n\t\t\tthumbnailDraw(drawing, drawingThumbnailCtx, 0, 0, 1 /*frameIndex*/);\n\t\t\tdrawingFrameData.push( drawingThumbnailCtx.getImageData(0,0,tilesize*scale,tilesize*scale).data );\n\t\t}\n\n\t\t// create encoder\n\t\tvar gifData = {\n\t\t\tframes: drawingFrameData,\n\t\t\twidth: tilesize*scale,\n\t\t\theight: tilesize*scale,\n\t\t\tpalette: hexPalette,\n\t\t\tloops: 0,\n\t\t\tdelay: animationTime / 10 // TODO why divide by 10???\n\t\t};\n\t\tvar encoder = new gif();\n\n\t\t// cancel old encoder (if in progress already)\n\t\tif( thumbnailRenderEncoders[imgId] != null )\n\t\t\tthumbnailRenderEncoders[imgId].cancel();\n\t\tthumbnailRenderEncoders[imgId] = encoder;\n\n\t\t// start encoding new GIF\n\t\tif (imgElement === undefined || imgElement === null) {\n\t\t\timgElement = document.getElementById(imgId);\n\t\t}\n\t\tencoder.encode( gifData, createThumbnailRenderCallback(imgElement) );\n\t}\n\tthis.Render = function(imgId,drawing,frameIndex,imgElement) {\n\t\trender(imgId,drawing,frameIndex,imgElement);\n\t};\n\n\tfunction createThumbnailRenderCallback(img) {\n\t\treturn function(uri) {\n\t\t\t// update image\n\t\t\timg.src = uri;\n\t\t\timg.style.background = \"none\";\n\n\t\t\t// update cache\n\t\t\tcache[img.id] = {\n\t\t\t\turi : uri,\n\t\t\t\toutOfDate : false\n\t\t\t};\n\t\t};\n\t}\n\n\tthis.GetCacheEntry = function(imgId) {\n\t\tif (!cache[imgId]) {\n\t\t\tcache[imgId] = {\n\t\t\t\turi : null,\n\t\t\t\toutOfDate : true\n\t\t\t};\n\t\t}\n\t\treturn cache[imgId];\n\t}\n}", "generateView(tile) {\n var piece = document.createElement('div');\n piece.style.backgroundImage = 'url(\\'img/pieces/' + this.color + '/' + this.type + '.svg\\')';\n piece.setAttribute('class', 'piece');\n tile.appendChild(piece);\n }", "renderTile(tile) {\n const graphics = tile.graphics;\n graphics.clear();\n tile.drawnAtScale = this._xScale.copy();\n\n // we're setting the start of the tile to the current zoom level\n const {tileX, tileWidth} = this.getTilePosAndDimensions(tile.tileData.zoomLevel,\n tile.tileData.tilePos, this.tilesetInfo.tile_size);\n\n const matrix = tile.matrix;\n const trackHeight = this.dimensions[1];\n const matrixDimensions = tile.tileData.shape;\n const colorScale = this.options.colorScale || scaleOrdinal(schemeCategory10);\n const valueToPixels = scaleLinear()\n .domain([0, this.maxAndMin.max])\n .range([0, trackHeight / matrixDimensions[0]]);\n\n for (let i = 0; i < matrix[0].length; i++) {\n const intervals = trackHeight / matrixDimensions[0];\n // calculates placement for a line in each interval; we subtract 1 so we can see the last line clearly\n const linePlacement = (i === matrix[0].length - 1) ?\n (intervals * i) + ((intervals * (i + 1) - (intervals * i))) - 1 :\n (intervals * i) + ((intervals * (i + 1) - (intervals * i)));\n graphics.lineStyle(1, this.colorHexMap[colorScale[i]], 1);\n\n for (let j = 0; j < matrix.length; j++) { // 3070 or something\n const x = this._xScale(tileX + (j * tileWidth / this.tilesetInfo.tile_size));\n const y = linePlacement - valueToPixels(matrix[j][i]);\n this.addSVGInfo(tile, x, y, colorScale[i]);\n // move draw position back to the start at beginning of each line\n (j === 0) ? graphics.moveTo(x, y) : graphics.lineTo(x, y);\n }\n }\n\n }", "render() {\n let tiles = [];\n for (let i = 0; i < this.props.products.length; i++) {\n const current_item = this.props.products[i];\n tiles.push(this.renderTile(current_item));\n }\n return tiles;\n }", "function CreateTileGrid() {\n\tvar gridHTML = \"\";\n\tfor(i=0; i<100; i++) {\n\t\tgridHTML += '<div class=\"grid\" id=\"t' + i +'\"></div>';\n\t}\n\tdocument.getElementById(\"tile-map\").innerHTML=gridHTML;\n\tvar gridHTMLz = \"\";\n\tfor(i=0; i<9; i++) {\n\t\tgridHTMLz += '<div class=\"grid-z\" id=\"tz' + i +'\"></div>';\n\t}\n\tdocument.getElementById(\"tile-map-z\").innerHTML=gridHTMLz;\n}", "function render() {\n debugMap(map, 10, 20);\n }", "function makeTileRender(gl) {\n var desiredMsPerTile = 21;\n var currentTile = -1;\n var numTiles = 1;\n var tileWidth;\n var tileHeight;\n var columns;\n var rows;\n var width = 0;\n var height = 0;\n var totalElapsedMs; // initial number of pixels per rendered tile\n // based on correlation between system performance and max supported render buffer size\n // adjusted dynamically according to system performance\n\n var pixelsPerTile = pixelsPerTileEstimate(gl);\n\n function reset() {\n currentTile = -1;\n totalElapsedMs = NaN;\n }\n\n function setSize(w, h) {\n width = w;\n height = h;\n reset();\n calcTileDimensions();\n }\n\n function calcTileDimensions() {\n var aspectRatio = width / height; // quantize the width of the tile so that it evenly divides the entire window\n\n tileWidth = Math.ceil(width / Math.round(width / Math.sqrt(pixelsPerTile * aspectRatio)));\n tileHeight = Math.ceil(tileWidth / aspectRatio);\n columns = Math.ceil(width / tileWidth);\n rows = Math.ceil(height / tileHeight);\n numTiles = columns * rows;\n }\n\n function updatePixelsPerTile() {\n var msPerTile = totalElapsedMs / numTiles;\n var error = desiredMsPerTile - msPerTile; // tweak to find balance. higher = faster convergence, lower = less fluctuations to microstutters\n\n var strength = 5000; // sqrt prevents massive fluctuations in pixelsPerTile for the occasional stutter\n\n pixelsPerTile += strength * Math.sign(error) * Math.sqrt(Math.abs(error));\n pixelsPerTile = clamp(pixelsPerTile, 8192, width * height);\n }\n\n function nextTile(elapsedFrameMs) {\n currentTile++;\n totalElapsedMs += elapsedFrameMs;\n\n if (currentTile % numTiles === 0) {\n if (totalElapsedMs) {\n updatePixelsPerTile();\n calcTileDimensions();\n }\n\n totalElapsedMs = 0;\n currentTile = 0;\n }\n\n var isLastTile = currentTile === numTiles - 1;\n var x = currentTile % columns;\n var y = Math.floor(currentTile / columns) % rows;\n return {\n x: x * tileWidth,\n y: y * tileHeight,\n tileWidth: tileWidth,\n tileHeight: tileHeight,\n isFirstTile: currentTile === 0,\n isLastTile: isLastTile\n };\n }\n\n return {\n nextTile: nextTile,\n reset: reset,\n setSize: setSize\n };\n }", "function render() {\n /* This array holds the relative URL to the image used\n * for that particular row of the game level.\n */\n\n /* TODO map drawing to use an array instead of loops so maps can be specified\n like: ['wwwww',\n 'sssss',\n 'ggggg',\n 'ggggg',\n 'ggggg',\n 'ggggg']\n\n where w, s, and g refer to water-block, stone-block, and grass-block.\n\n This will allow new levels/maps to be defined quickly as they will be easy\n to visualise.\n */\n\n var rowImages = [\n 'images/water-block.png', // Top row is water\n 'images/stone-block.png', // Row 1 of 3 of stone\n 'images/stone-block.png', // Row 2 of 3 of stone\n 'images/stone-block.png', // Row 3 of 3 of stone\n 'images/grass-block.png', // Row 1 of 2 of grass\n 'images/grass-block.png' // Row 2 of 2 of grass\n ],\n numRows = 6,\n numCols = 5,\n row, col;\n\n /* Loop through the number of rows and columns we've defined above\n * and, using the rowImages array, draw the correct image for that\n * portion of the \"grid\"\n */\n for (row = 0; row < numRows; row++) {\n for (col = 0; col < numCols; col++) {\n /* The drawImage function of the canvas' context element\n * requires 3 parameters: the image to draw, the x coordinate\n * to start drawing and the y coordinate to start drawing.\n * We're using our Resources helpers to refer to our images\n * so that we get the benefits of caching these images, since\n * we're using them over and over.\n */\n ctx.drawImage(Resources.get(rowImages[row]), col * tile.width, row * tile.height);\n }\n }\n\n renderEntities();\n\n hud.render();\n }", "function renderCurrentTerrain(viewportTop, viewportLeft, viewportWidth, \r\n viewportHeight, tileSide, tileClass, maxIndexX, maxIndexY){\r\n\r\n\tvar minX = Math.floor(viewportLeft / tileSide);\r\n\tvar maxX = Math.floor( (viewportLeft + viewportWidth) / tileSide ) + 1;\r\n\tvar minY = Math.floor(viewportTop / tileSide);\r\n\tvar maxY = Math.floor( (viewportTop + viewportHeight) / tileSide ) + 1;\r\n\tvar innerDiv = document.getElementById(\"map\");\r\n\tfor ( i = minX; i <= maxX; i++ ){\r\n\t\tif ((i <= maxIndexX)&&(i >= 0)){\r\n\t\t\tfor ( j = minY; j <= maxY; j++){\r\n\t\t\t\tif ((j <= maxIndexY)&&(j >= 0)){\r\n\t\t\t\t\tvar tileName = \"x\" + i + \"y\" + j + \"z0.jpg\";\r\n\t\t\t\t\tif (!$(tileName)){\r\n\t\t\t\t\t var terrain = document.createElement(\"img\");\r\n\t\t\t\t\t terrain.src = \"images/terrain/\" + tileName;\r\n\t\t\t\t\t terrain.style.position = \"absolute\";\r\n\t\t\t\t\t terrain.style.left = i*tileSide + \"px\";\r\n\t\t\t\t\t terrain.style.top = j*tileSide + \"px\";\r\n\t\t\t\t\t terrain.style.zIndex = 2;\r\n\t\t\t\t\t\tterrain.title = \"\";\r\n\t\t\t\t\t //terrain.setAttribute(\"class\", tileClass);\r\n\t\t\t\t\t\tterrain.setAttribute(\"id\", tileName);\r\n\t\t\t\t\t\tterrain.className = tileClass;\r\n\t\t\t\t\t innerDiv.appendChild(terrain);\r\n\t\t\t\t\t}\r\n\t\t\t }\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tvar terrains = document.getElementsByClassName(tileClass);\t\r\n\tfor (k = 0; k < terrains.length; k++){\r\n\t\tvar inside = false;\r\n\t\tvar xValue = terrains[k].id.replace(\"z0.jpg\",\"\");\r\n\t\tvar yValue = terrains[k].id.replace(\"z0.jpg\",\"\");\r\n\t\txValue = xValue.substring(1,xValue.indexOf(\"y\"));\r\n\t\tyValue = yValue.substring(yValue.indexOf(\"y\") + 1,yValue.length);\r\n\t\txValue = xValue*1;\r\n\t\tyValue = yValue*1;\r\n\t\tif ((xValue >= minX)&&(xValue <= maxX)&&(yValue >= minY)&&(yValue <= maxY)){\r\n\t\t\tinside = true;\r\n\t\t}\r\n\t\tif (inside === false){\r\n\t\t\tvar innerDiv = document.getElementById(\"map\");\r\n\t\t innerDiv.removeChild(terrains[k]);\r\n\t\t}\r\n\t}\r\n\t\r\n\t/////calculations////\r\n\tvar tnr = document.getElementsByClassName(tileClass);\r\n\ttnr = tnr.length;\r\n\t$('terrains_nr').innerHTML = tnr;\r\n\t//////////////////////\r\n\t\t\r\n}", "render(renderParameters) {\r\n\t\t\t\t var tileSize = this.layer.tileInfo.size[0];\r\n\t\t\t\t var state = renderParameters.state;\r\n\t\t\t\t var pixelRatio = state.pixelRatio;\r\n\t\t\t\t var width = state.size[0];\r\n\t\t\t\t var height = state.size[1];\r\n\t\t\t\t var context = renderParameters.context;\r\n\t\t\t\t var coords = [0, 0];\r\n\r\n\t\t\t\t context.fillStyle = \"rgba(0,0,0,0.25)\";\r\n\t\t\t\t context.fillRect(0, 0, width * pixelRatio, height * pixelRatio);\r\n\t\t\t\t }", "function render() {\n\t\t\n\t}", "function generateTiles() {\n formNode.style.display = \"none\";\n shuffleDinoObjectsArray();\n dinoObjects.slice(0,Math.ceil(dinoObjects.length / 2)).forEach(obj => addGridItems(obj));\n addGridItems(human);\n dinoObjects.slice(Math.ceil(dinoObjects.length / 2)).forEach(obj => addGridItems(obj));\n }", "function renderTiles() {\n var map_index = 0;\n\n // increment by actual TILE_SIZE to avoid multiplying on every iteration\n for (var top = 0; top < MAP.height; top += TILE_SIZE) {\n for (var left = 0; left < MAP.width; left += TILE_SIZE) {\n\n // if statement to draw the correct sprite to the correct idx position on the tile map\n if (MAP.tiles[map_index] === 0) {\n\n // draw background\n ctx.drawImage(background, left, top);\n\n } else if (MAP.tiles[map_index] === 2) {\n\n // draw platform\n ctx.drawImage(platform, left, top);\n\n new Obstacle(100, 100, left, top);\n\n } else if (MAP.tiles[map_index] === 3) {\n\n // draw ring\n ctx.drawImage(ring, left, top);\n //new Obstacle(100, 100, left, top);\n\n } else if (MAP.tiles[map_index] === 1) {\n\n // draw floor\n ctx.drawImage(floor, left, top);\n } else if (MAP.tiles[map_index] === 4) {\n\n ctx.drawImage(floor, left, top);\n new Obstacle(100, 100, left, top);\n }\n\n map_index++;\n }\n }\n}", "render() {\n let start = 0, end = this.props.width, rows = [];\n while (end <= (this.props.width * this.props.height)) {\n rows.push(this.props.tiles.slice(start, end));\n start += this.props.width;\n end += this.props.width;\n }\n return (\n <div>\n {rows.map((cols, y) => {\n return this.renderRow(y, cols);\n })}\n </div>\n );\n }", "function render()\n{\n requestAnimationFrame(render);\n\n\tctx.clearRect(0, 0, width, height);\n drawTiles();\n\tgui.draw(ctx, mouse);\n}", "function render() {\n\n\t\t\t}", "function makeTileRender(gl) {\n let currentTile = -1;\n let numTiles = 1;\n let tileWidth;\n let tileHeight;\n let columns;\n let rows;\n\n let firstTileTime = 0;\n\n let width = 0;\n let height = 0;\n\n // initial number of pixels per rendered tile\n // based on correlation between system performance and max supported render buffer size\n // adjusted dynamically according to system performance\n let pixelsPerTile = pixelsPerTileEstimate(gl);\n\n let pixelsPerTileQuantized = pixelsPerTile;\n\n let desiredTimePerTile = 22; // 45 fps\n\n let timePerPixelSum = desiredTimePerTile / pixelsPerTile;\n let samples = 1;\n let resetSum = true;\n\n function addToTimePerPixel(t) {\n if (resetSum) {\n timePerPixelSum = 0;\n samples = 0;\n resetSum = false;\n }\n\n timePerPixelSum += t;\n samples++;\n }\n\n function getTimePerPixel() {\n return timePerPixelSum / samples;\n }\n\n function reset() {\n currentTile = -1;\n firstTileTime = 0;\n resetSum = true;\n }\n\n function setSize(w, h) {\n width = w;\n height = h;\n reset();\n }\n\n function setTileDimensions(pixelsPerTile) {\n const aspectRatio = width / height;\n\n // quantize the width of the tile so that it evenly divides the entire window\n tileWidth = Math.ceil(width / Math.round(width / Math.sqrt(pixelsPerTile * aspectRatio)));\n tileHeight = Math.ceil(tileWidth / aspectRatio);\n pixelsPerTileQuantized = tileWidth * tileHeight;\n\n columns = Math.ceil(width / tileWidth);\n rows = Math.ceil(height / tileHeight);\n numTiles = columns * rows;\n }\n\n function initTiles() {\n if (firstTileTime) {\n const timeElapsed = Date.now() - firstTileTime;\n const timePerTile = timeElapsed / numTiles;\n const error = desiredTimePerTile - timePerTile;\n\n // higher number means framerate converges to targetRenderTime faster\n // if set too high, the framerate fluctuates rapidly with small variations in frame-by-frame performance\n const convergenceStrength = 1000;\n\n pixelsPerTile = pixelsPerTile + convergenceStrength * error;\n addToTimePerPixel(timePerTile / pixelsPerTileQuantized);\n }\n\n firstTileTime = Date.now();\n\n pixelsPerTile = clamp(pixelsPerTile, 8192, width * height);\n\n setTileDimensions(pixelsPerTile);\n }\n\n function nextTile() {\n currentTile++;\n\n if (currentTile % numTiles === 0) {\n initTiles();\n currentTile = 0;\n }\n\n const x = currentTile % columns;\n const y = Math.floor(currentTile / columns) % rows;\n\n return {\n x: x * tileWidth,\n y: y * tileHeight,\n tileWidth,\n tileHeight,\n isFirstTile: currentTile === 0,\n isLastTile: currentTile === numTiles - 1\n };\n }\n\n return {\n setSize,\n reset,\n nextTile,\n getTimePerPixel,\n restartTimer() {\n firstTileTime = 0;\n },\n setRenderTime(time) {\n desiredTimePerTile = time;\n },\n };\n }", "renderTiles (tiles, renderFunc) {\n if (!renderFunc || typeof renderFunc !== 'function') {\n throw new Error('Supply render function to Camera::renderTiles')\n }\n /**\n * This still does more than it needs to, in essence it should map a tiled\n * map on to the map of sprites. The SpritePool can remain an ndarray but,\n * we should access it linearly though ndarray.data[i] as that is faster than\n * using the strided approach (ndarray.get).\n * If zoom is disabled then we can position and size the SpritePool elements\n * up front, then Camera just handles culling the list of renderables by\n * iterating over the only relevant map section.\n */\n\n // @TODO if map is smaller than viewport then only iterate over the map,\n // otherwise, iterate over the viewport. This is all about iterating over\n // the minimum amount of tiles.\n\n // @TODO pull out only the viewport from the map\n let cell = null\n let sprite = null\n let exists = false\n for (let y = this.viewport.pos[1]; y < this.viewport.pos[3]; y++) {\n for (let x = this.viewport.pos[0]; x < this.viewport.pos[2]; x++) {\n cell = (x < tiles.shape[0] && y < tiles.shape[1])\n ? tiles.get(x, y)\n : null\n\n // Translate back to [0, 0] for pool access\n sprite = this.pool.get(x - this.viewport.pos[0], y - this.viewport.pos[1])\n\n exists = !(typeof cell === 'undefined' || cell === null)\n\n if (exists) {\n this.renderSprite(sprite, x, y)\n\n renderFunc(cell, sprite)\n }\n\n // Hide sprites that may have previously been rendered\n if (!exists) {\n sprite.visible = false\n }\n }\n }\n }", "display() {\r\n for (let i = 0; i < DIMENSIONS; i++) {\r\n for (let j = 0; j < DIMENSIONS; j++) {\r\n fill(TILE_COLOUR);\r\n rect(SCALE*i, SCALE*j, SCALE, SCALE);\r\n if (this.grid[i][j] > 0) {\r\n fill(TEXT_COLOUR);\r\n text(this.grid[i][j], SCALE*(i + 1/2), SCALE*(j + 1/2));\r\n }\r\n }\r\n }\r\n }", "static rendered () {}", "static rendered () {}", "HTMLrendering() {\n\t\tlet html = '';\n\t\tlet block;\n\t\thtml += '<table id=\"game-matrix-table\">';\n\t\tfor (let y = this.height-1; y >= 0; y--) {\n\t\t\thtml += '<tr class=\"game-matrix-row\">';\n\t\t\tfor (let x = 0; x < this.width; x++) {\n\t\t\t\tblock = this.getBlock({y, x});\n\t\t\t\thtml += `<td class=\"game-matrix-cell ${getType(block)}\">`;\n\t\t\t\thtml += block;\n\t\t\t\thtml += '</td>';\n\t\t\t}\n\t\t\thtml += '</tr>';\n\t\t}\n\t\thtml += '</table>';\n\t\treturn html;\n\t}", "function render() {\n /* This array holds the relative URL to the image used\n * for that particular row of the game level.\n */\n var rowImages = [\n 'images/water-block.png', // Top row is water\n 'images/stone-block.png', // Row 1 of 3 of stone\n 'images/stone-block.png', // Row 2 of 3 of stone\n 'images/stone-block.png', // Row 3 of 3 of stone\n 'images/grass-block.png', // Row 1 of 2 of grass\n 'images/grass-block.png' // Row 2 of 2 of grass\n ],\n numRows = Map.rows,\n numCols = Map.columns,\n row, col;\n // Clear top part of the canvas to avoid getting the characters head stuck in the top edge as there is no redraw.\n ctx.clearRect(0, 0, ctx.canvas.width, Map.BLOCKHEIGHT);\n /* Loop through the number of rows and columns we've defined above\n * and, using the rowImages array, draw the correct image for that\n * portion of the \"grid\"\n */\n for (row = 0; row < numRows; row++) {\n for (col = 0; col < numCols; col++) {\n /* The drawImage function of the canvas' context element\n * requires 3 parameters: the image to draw, the x coordinate\n * to start drawing and the y coordinate to start drawing.\n * We're using our Resources helpers to refer to our images\n * so that we get the benefits of caching these images, since\n * we're using them over and over.\n */\n ctx.drawImage(Resources.get(rowImages[row]), col * Map.BLOCKWIDTH, row * Map.BLOCKHEIGHT);\n }\n }\n\n renderEntities(Map.debug);\n renderStatus();\n }", "function addTiles(co,jk,jj,dp,dn,dq,dk,dj,dl,dh,dg,di){xc_eg(co,\"jn\",\"jn\",{\"width\":jk,\"height\":jj,\"jn\":[dp||\"\",dn||\"\",dq||\"\",dk||\"\",dj||\"\",dl||\"\",dh||\"\",dg||\"\",di||\"\"],\"ca\":0,\"bs\":0,\"id\":\"\"},0)}", "function render() {\n\t\t\t}", "function render() {\n\tvar containerWidth = $('#interactive-content').width();\n\n if (!containerWidth) {\n containerWidth = DEFAULT_WIDTH;\n }\n\n if (containerWidth <= MOBILE_BREAKPOINT) {\n isMobile = true;\n } else {\n isMobile = false;\n }\n\n // What kind of map are we making?\n var configuration = configure(containerWidth);\n\n // Render the map!\n renderMap(configuration, {\n container: '#graphic',\n width: containerWidth,\n data: topoData\n });\n\n // Resize\n fm.resize();\n}", "function render() {\n\t}", "function DrawMap() {\n\n map = document.createElement('div');\n\n let tiles = this.CreateTiles(gameData);\n\n for (let tile of tiles) {\n map.appendChild(tile);\n }\n\n document.body.appendChild(map);\n}", "displayTileInfo(){ //displays info about selected tile\n const selected = this.props.info.selectedTile\n const tile = this.props.tiles[selected]\n if (tile){\n const x = Math.floor(selected/1000000)\n const y = selected-x*1000000\n var capacitiesToDisplay=''\n if(tile['capacities']){\n capacitiesToDisplay = Object.keys(tile['capacities']).map(capacity => (<div> {capacity}: {tile['capacities'][capacity]} <br /> </div>))}\n const infoDiv = (<div>\n location: ({x}, {y}) <br/>\n type: {tile['type']} <br/>\n {capacitiesToDisplay}\n {this.displayTileActions(tile, x, y)}\n </div>)\n return infoDiv}\n return ('haha dude this tile is UNGENERATED! this is an error')}", "function render() {\n for (let i = 0; i < storedCreatedObj.length; i++) {\n storedCreatedObj[i].render_for_body();\n }\n storedCreatedObj[0].render_for_head();\n storedCreatedObj[0].render_for_foot();\n}", "function gen1(){\n\t// First tile\n\taddtile(0, 0, le, -le/2, -1.5388*le, 0);\n\t\n\t// Generating tiles around points\n\tfor(var i=0; i<iter; i++){\n\t\tif( isvisiblepoint(i,w,h) ){\n\t\t\tfor(var j=0; j<retries; j++){ fillpoint(i, le); }\n\t\t\t//if(masksum(i)<10){ destroypoint(i); } // optional destroying point if it can't be filled\n\t\t}\n\t}\n\t// Rendering SVG\n\tvar svgstr = createSVGString(w,h,stylepresets[stylepr],drawp);\n\t\n\t// Appending SVG string\n\tappendSVGString(svgstr,'mainbody');\n\t\n\t// Stats\n\tconsole.log('Number of tiles: '+tiles.length+' Number of points: '+points.length+' SVG string length: '+svgstr.length+' Avg. points/tiles: '+points.length/tiles.length+' Tiles/iter: '+tiles.length/iter);\n\n}// End of gen1()", "function renderImages() {\n //if ( viewSkins ) { renderSkins(); } // disabled here so plants can be rendered sequentially in plants.js\n if ( viewSpans ) { renderSpans(); }\n if ( viewPoints ) { renderPoints(); }\n if ( viewScaffolding ) { renderScaffolding(); }\n}", "define(name, x, y) { //creating a buffer where we keep the tile/subset derived from the big image so we don't have to draw from the big image every time.\n const buffer = document.createElement('canvas'); //programatically making a canvas element just like jsx behind the scenes.\n buffer.width = this.width;\n buffer.height = this.height;\n \n //now drawing the subset to the canvas, just like we did below in context.drawImage(..)\n buffer.\n getContext('2d')\n .drawImage(\n this.image,\n x * this.width,\n y* this.height,\n this.width,\n this.height,\n 0,\n 0,this.width,\n this.height\n );\n\n this.tiles.set(name, buffer);//add the buffer to the new map instantiated in the constructor above by using the \"tiles\" name.\n\n }", "function printBrickLayer(title , tiles){\r\n // String of whole output\r\n let output = ` ${title} <br>`;\r\n \r\n for (let y = 0; y < dimensions.height ; y++) {\r\n\r\n // String of output row\r\n let line = \"\";\r\n\r\n for (let x = 0; x < dimensions.width ; x++) {\r\n \r\n let brick = tiles[ x + (dimensions.width * y)];\r\n let outputTile = (brick > 9) ? brick.toString() : \"0\" + brick.toString();\r\n line += ` ${outputTile}`;\r\n }\r\n output += line + \"<br>\";\r\n } \r\n // DOM element\r\n let element = document.getElementById(\"output\");\r\n element.innerHTML += output + \"<br><br>\";\r\n}", "function createTileSheet()\n{\n let sheet = new PIXI.BaseTexture.from(app.loader.resources[\"tiles\"].url);\n let crateSheet = new PIXI.BaseTexture.from(app.loader.resources[\"crate\"].url);\n let spikeSheet = new PIXI.BaseTexture.from(app.loader.resources[\"spikes\"].url);\n let w = 80;\n let h = 80;\n \n tileSheet[\"platform\"] = [\n new PIXI.Texture(sheet, new PIXI.Rectangle(0, 0, w, h))\n ];\n tileSheet[\"crate\"] = [\n new PIXI.Texture(crateSheet, new PIXI.Rectangle(0, 0, w, h))\n ];\n\n tileSheet[\"spikes\"] = [\n new PIXI.Texture(spikeSheet, new PIXI.Rectangle(0, 0, w, 20))\n ];\n}", "displayData() {\n const tile = [];\n if (this.state.originalData && this.state.originalData.length) {\n _.each(this.state.originalData, (value, index) => {\n tile.push(<Tile key={'tile_' + index} data={value} click={this.detailPage} checkBox={this.checkBox} />);\n });\n } else {\n tile.push(<div className='noData'>No Data Found</div>);\n }\n return tile;\n }", "function createTiles() {\n var divName = \"puzzlearea\";\n var tileNumber = 1;\n for (var i = 0; i < NUMBER_OF_ROWS_AND_COLUMNS; i++) {\n for (var j = 0; j < NUMBER_OF_ROWS_AND_COLUMNS; j++) {\n\n var tileElement = document.createElement(\"div\");\n tileElement.classList.add(\"tile\");\n \n var top = WIDTH_HEIGHT_OF_TILE * i; // x value\n var left = WIDTH_HEIGHT_OF_TILE * j; // y value\n \n // Set the tile's position and its background position\n tileElement.style.top = top + \"px\";\n tileElement.style.left = left + \"px\";\n tileElement.style.backgroundPosition = -left + \"px \" + -top + \"px\";\n \n tileElement.innerHTML = \"<span>\" + tileNumber++ + \"</span>\"; // Update tile number\n \n tileElement.onmouseover = highlightTile; // Highlight tiles that are moveable \n tileElement.onmouseout = unHighlightTile; // Unhighlight those that cannot be moved\n tileElement.onclick = moveTile; // Movable tiles can be moved upon clicking them\n \n // Append tile to target div, skipping last (Empty) tile\n var lastTile = NUMBER_OF_ROWS_AND_COLUMNS - 1;\n if (!(i == lastTile && j == lastTile)) {\n $(divName).appendChild(tileElement);\n }\n }\n }\n }", "function generateTiles(){\n\n gridItems.splice(4,0,human);\n \n for(let item in gridItems){\n\n let appendString = '<div class=\\'grid-item\\'><h3>';\n \n gridItems[item] instanceof Human \n ? appendString += gridItems[item].name +'</h3><img src=' + gridItems[item].image + '>'\n\n : appendString+= gridItems[item].species +'</h3><img src=' + gridItems[item].image + '><p>' + gridItems[item].getAFact() + '</p>';\n\n grid.innerHTML += appendString + '</div>';\n \n }\n \n }", "generateTiles() {\n let self = this;\n forEach(self.tiles, (tile) => {\n self.addElement(tile);\n });\n }", "function render(selection) {\n\t var requests = [];\n\t var showDebug = context.getDebug('tile') && !source.overlay;\n\n\t if (source.validZoom(z)) {\n\t tile().forEach(function(d) {\n\t addSource(d);\n\t if (d[3] === '') return;\n\t if (typeof d[3] !== 'string') return; // Workaround for chrome crash https://github.com/openstreetmap/iD/issues/2295\n\t requests.push(d);\n\t if (cache[d[3]] === false && lookUp(d)) {\n\t requests.push(addSource(lookUp(d)));\n\t }\n\t });\n\n\t requests = uniqueBy(requests, 3).filter(function(r) {\n\t if (!!source.overlay && nearNullIsland(r[0], r[1], r[2])) {\n\t return false;\n\t }\n\t // don't re-request tiles which have failed in the past\n\t return cache[r[3]] !== false;\n\t });\n\t }\n\n\t var pixelOffset = [\n\t source.offset()[0] * Math.pow(2, z),\n\t source.offset()[1] * Math.pow(2, z)\n\t ];\n\n\t function load(d) {\n\t cache[d[3]] = true;\n\t d3.select(this)\n\t .on('error', null)\n\t .on('load', null)\n\t .classed('tile-loaded', true);\n\t render(selection);\n\t }\n\n\t function error(d) {\n\t cache[d[3]] = false;\n\t d3.select(this)\n\t .on('error', null)\n\t .on('load', null)\n\t .remove();\n\t render(selection);\n\t }\n\n\t function imageTransform(d) {\n\t var _ts = tileSize * Math.pow(2, z - d[2]);\n\t var scale = tileSizeAtZoom(d, z);\n\t return 'translate(' +\n\t ((d[0] * _ts) - tileOrigin[0] + pixelOffset[0]) + 'px,' +\n\t ((d[1] * _ts) - tileOrigin[1] + pixelOffset[1]) + 'px)' +\n\t 'scale(' + scale + ',' + scale + ')';\n\t }\n\n\t function debugTransform(d) {\n\t var _ts = tileSize * Math.pow(2, z - d[2]);\n\t var scale = tileSizeAtZoom(d, z);\n\t return 'translate(' +\n\t ((d[0] * _ts) - tileOrigin[0] + pixelOffset[0] + scale * (tileSize / 4)) + 'px,' +\n\t ((d[1] * _ts) - tileOrigin[1] + pixelOffset[1] + scale * (tileSize / 2)) + 'px)';\n\t }\n\n\t var image = selection\n\t .selectAll('img')\n\t .data(requests, function(d) { return d[3]; });\n\n\t image.exit()\n\t .style(transformProp, imageTransform)\n\t .classed('tile-removing', true)\n\t .each(function() {\n\t var tile = d3.select(this);\n\t window.setTimeout(function() {\n\t if (tile.classed('tile-removing')) {\n\t tile.remove();\n\t }\n\t }, 300);\n\t });\n\n\t image.enter().append('img')\n\t .attr('class', 'tile')\n\t .attr('src', function(d) { return d[3]; })\n\t .on('error', error)\n\t .on('load', load);\n\n\t image\n\t .style(transformProp, imageTransform)\n\t .classed('tile-debug', showDebug)\n\t .classed('tile-removing', false);\n\n\n\t var debug = selection.selectAll('.tile-label-debug')\n\t .data(showDebug ? requests : [], function(d) { return d[3]; });\n\n\t debug.exit()\n\t .remove();\n\n\t debug.enter()\n\t .append('div')\n\t .attr('class', 'tile-label-debug');\n\n\t debug\n\t .text(function(d) { return d[2] + ' / ' + d[0] + ' / ' + d[1]; })\n\t .style(transformProp, debugTransform);\n\t }", "function render(){ \n console.log('`render function` ran');\n const createdHtml = generateHtml(STORE); \n $('main').html(createdHtml);\n}", "render() { }", "function generateTiles()\r\n{\r\n\tfor(let i = 0;i < mapSize;i++){\r\n\tgenerateTileType();\t\r\n\t}\r\n}", "function MapTile(props) { \n return <div \n className={`tile ${getTileSprite(props.tile)}`}\n style={{\n height: SPRITE_SIZE,\n width: SPRITE_SIZE\n }}\n />\n }", "function render() {\n\t\treturn graphTpl;\n\t}", "tile(args) {\n return this.createGameObject(\"Tile\", tile_1.Tile, args);\n }", "function render() {\n // This array holds the relative URL to the image used\n // for that particular row of the game level.\n var rowImages = [\n 'images/water-block.png', // Top row is water\n 'images/stone-block.png', // Row 1 of 3 of stone\n 'images/stone-block.png', // Row 2 of 3 of stone\n 'images/stone-block.png', // Row 3 of 3 of stone\n 'images/grass-block.png', // Row 1 of 2 of grass\n 'images/grass-block.png' // Row 2 of 2 of grass\n ],\n\n numRows = 6,\n numCols = 5,\n row, col;\n\n // Before drawing, clear existing canvas\n ctx.clearRect(0,0,canvas.width,canvas.height);\n\n // Loop through the number of rows and columns defined above\n // and draw the image for that portion of the \"grid\"\n for (row = 0; row < numRows; row++) {\n for (col = 0; col < numCols; col++) {\n ctx.drawImage(Resources.get(rowImages[row]), col * 101, row * 83);\n }\n }\n renderEntities();\n }", "function renderEverything() {\n renderPepperonni()\n renderMushrooms()\n renderGreenPeppers()\n renderWhiteSauce()\n renderGlutenFreeCrust()\n\n renderButtons()\n renderPrice()\n}", "function renderEverything() {\n renderPepperonni()\n renderMushrooms()\n renderGreenPeppers()\n renderWhiteSauce()\n renderGlutenFreeCrust()\n\n renderButtons()\n renderPrice()\n}", "function Map(props) {\n return (\n <div style={{\n position: 'absolute',\n }}>\n {\n props.tiles.map((row, y) =>\n <div\n key={y}\n className='row'\n style={{\n height: `${TILE_SIZE}px`,\n lineHeight: `${TILE_SIZE}px`,\n }}\n >\n {row.map((tile, x) =>\n <div\n key={x}\n className={`tile ${getTileDisplay(tile)}`}\n style={{\n width: `${TILE_SIZE}px`,\n height: `${TILE_SIZE}px`,\n }}\n />)}\n </div>\n )\n }\n </div>\n )\n}", "function renderEverything() {\n renderPepperonni();\n renderMushrooms();\n renderGreenPeppers();\n renderWhiteSauce();\n renderGlutenFreeCrust();\n renderPrice();\n}", "render() {\n\n\t}", "render() {\n\n\t}", "function MapTile(props) {\n return <div\n className={`tile ${getTileSprite(props.tile)}`}\n style={{\n height: SPRITE_SIZE,\n width: SPRITE_SIZE\n }}\n />\n}", "function render() {\n var rowImages = [\n 'images/water-block.png', // Top row is water\n 'images/stone-block.png', // Row 1 of 3 of stone\n 'images/stone-block.png', // Row 2 of 3 of stone\n 'images/stone-block.png', // Row 3 of 3 of stone\n 'images/stone-block.png', // Row 3 of 3 of stone\n 'images/grass-block.png', // Row 1 of 2 of grass\n 'images/grass-block.png', // Row 2 of 2 of grass\n ],\n numRows = 6,\n numCols = 5,\n row, col;\n\n ctx.clearRect(0, 0, canvas.width, canvas.height)\n\n for (row = 0; row < numRows; row++) {\n for (col = 0; col < numCols; col++) {\n //Using Resources helpers for caching\n ctx.drawImage(Resources.get(rowImages[row]), col * 101, row * 83);\n }\n }\n\n renderEntities();\n }", "draw() {\n this.tiles.forEach(t => {\n var tileCoords = {\n x: this.origin.x + (t.x * 8) + 16,\n y: this.origin.y + (t.y * 8)\n }\n this.context.drawImage(RESOURCE.sprites, t.t * 8, 16, 8, 8, tileCoords.x, tileCoords.y, 8, 8);\n });\n }", "function setHtml() {\n\n\t\t//add html elements\n\t\tg_objWrapper.addClass(\"ug-theme-tiles\");\n\n\t\tg_objWrapper.append(\"<div class='ug-tiles-wrapper' style='position:relative'></div>\");\n\n\t\t//add preloader\n\t\tif (g_temp.showPreloader == true) {\n\t\t\tg_objWrapper.append(\"<div class='ug-tiles-preloader ug-preloader-trans'></div>\");\n\t\t\tg_objPreloader = g_objWrapper.children(\".ug-tiles-preloader\");\n\t\t\tg_objPreloader.fadeTo(0, 0);\n\t\t}\n\n\t\tg_objTilesWrapper = g_objWrapper.children(\".ug-tiles-wrapper\");\n\n\t\t//set padding\n\t\tif (g_options.theme_gallery_padding) g_objWrapper.css({\n\t\t\t\"padding-left\": g_options.theme_gallery_padding + \"px\",\n\t\t\t\"padding-right\": g_options.theme_gallery_padding + \"px\"\n\t\t});\n\n\t\tg_tiles.setHtml(g_objTilesWrapper);\n\t\tg_lightbox.putHtml();\n\t}", "function renderToStaticMarkup(element,options){var renderer=new ReactDOMServerRenderer(element,true,options);try{var markup=renderer.read(Infinity);return markup;}finally{renderer.destroy();}}", "function render() {\n /* This array holds the relative URL to the image used\n * for that particular row of the game level.\n */\n var rowImages = [\n 'images/water-block.png', // Row 1 is water\n 'images/stone-block.png', // Row 2 is stone\n 'images/stone-block.png', // Row 3 is stone\n 'images/stone-block.png', // Row 4 is stone\n 'images/grass-block.png', // Row 5 is grass\n 'images/grass-block.png' // Row 6 is grass\n ],\n numRows = 6,\n numCols = 8,\n row, col;\n\n /* Loop through the number of rows and columns we've defined above\n * and, using the rowImages array, draw the correct image for that\n * portion of the \"grid\"\n */\n for (row = 0; row < numRows; row++) {\n for (col = 0; col < numCols; col++) {\n /*\n The drawImage function of the canvas' context element requires 3 parameters:\n * the image to draw,\n * the x coordinate to start drawing and\n * the y coordinate to start drawing.\n We're using our Resources helpers to refer to our images\n so that we get the benefits of caching these images, since\n we're using them over and over.\n */\n ctx.drawImage(Resources.get(rowImages[row]), col * 101, row * 83);\n }\n }\n\n renderEntities();\n }", "render(map)\n\t{\n\t\tthrow new Error(\"Not implemented\");\n\t}", "render() {\n return (\n <div\n key={'row_' + this.props.y}\n className=\"board-row\"\n >\n {this.props.cols.map((value, x) => {\n return this.renderTile(x, this.props.y, value);\n })}\n </div>\n );\n }", "function render() {\n var createNodes = __webpack_require__(877);\n var createClusters = __webpack_require__(880);\n var createEdgeLabels = __webpack_require__(881);\n var createEdgePaths = __webpack_require__(882);\n var positionNodes = __webpack_require__(883);\n var positionEdgeLabels = __webpack_require__(884);\n var positionClusters = __webpack_require__(885);\n var shapes = __webpack_require__(886);\n var arrows = __webpack_require__(887);\n\n var fn = function(svg, g) {\n preProcessGraph(g);\n\n var outputGroup = createOrSelectGroup(svg, \"output\");\n var clustersGroup = createOrSelectGroup(outputGroup, \"clusters\");\n var edgePathsGroup = createOrSelectGroup(outputGroup, \"edgePaths\");\n var edgeLabels = createEdgeLabels(createOrSelectGroup(outputGroup, \"edgeLabels\"), g);\n var nodes = createNodes(createOrSelectGroup(outputGroup, \"nodes\"), g, shapes);\n\n layout(g);\n\n positionNodes(nodes, g);\n positionEdgeLabels(edgeLabels, g);\n createEdgePaths(edgePathsGroup, g, arrows);\n\n var clusters = createClusters(clustersGroup, g);\n positionClusters(clusters, g);\n\n postProcessGraph(g);\n };\n\n fn.createNodes = function(value) {\n if (!arguments.length) return createNodes;\n createNodes = value;\n return fn;\n };\n\n fn.createClusters = function(value) {\n if (!arguments.length) return createClusters;\n createClusters = value;\n return fn;\n };\n\n fn.createEdgeLabels = function(value) {\n if (!arguments.length) return createEdgeLabels;\n createEdgeLabels = value;\n return fn;\n };\n\n fn.createEdgePaths = function(value) {\n if (!arguments.length) return createEdgePaths;\n createEdgePaths = value;\n return fn;\n };\n\n fn.shapes = function(value) {\n if (!arguments.length) return shapes;\n shapes = value;\n return fn;\n };\n\n fn.arrows = function(value) {\n if (!arguments.length) return arrows;\n arrows = value;\n return fn;\n };\n\n return fn;\n}", "function render() {\n let bigString;\n console.log('render fxn ran')\n if (store.view === 'landing') {\n bigString = generateTitleTemplate(store);\n\n }\n else if (store.view === 'question') {\n bigString = generateQuestionTemplate(store);\n\n }\n else if (store.view === 'feedback') {\n bigString = generateFeedbackTemplate(store)\n\n }\n else if (store.view === 'results') {\n bigString = generateResultsTemplate(store);\n\n }\n $('main').html(bigString);\n\n //attach event listeners\n\n\n}", "function createTileDiv() {\n let tileDiv = document.createElement('div');\n tileDiv.setAttribute('class', 'tileDiv');\n container.appendChild(tileDiv);\n}", "createTiles()\n {\n //add tileset to map layer\n this.mapLayer = this.tilemap.createLayer('walls');\n this.mapLayer.resizeWorld();\n\n //add p2 physics to tilemap\n this.tilemap.setCollisionByExclusion([]);\n game.physics.p2.convertTilemap(this.tilemap, this.mapLayer);\n \n this.player.setTilemapCollisionGroup(this.collisionGroup);\n \n this.tilemapBodies = game.physics.p2.convertTilemap(this.tilemap, this.mapLayer, true, false);\n \n for(let body of this.tilemapBodies)\n {\n this.configureBody(body, 16, 16);\n }\n }", "function render() {\r\n\r\n}", "function render() {\r\n\r\n}", "function render(){\n\tvar src = \"\"\n\tfor(i in TodoList.items) src += ItemTemplate(TodoList.items[i]);\n\tel.innerHTML = src;\n}", "function webtiles_load($, grid, url, is_debug) {\n $(document).ready(function(){\n $(\"#\" + grid).addClass(\"webtiles-grid\");\n $.getJSON(url, function(result){\n var tiles = result.tiles;\n // console.log(result);\n for(var y=tiles[0].length - 1; y>= 0; y--){\n var row = $(\"<div></div>\");\n row.addClass(\"webtiles-row\");\n for(var x=0; x < tiles.length; x++){\n var debug_str = \"\";\n if(is_debug){\n debug_str = \"\" + tiles[x][y];\n }\n var tile = $(\"<div>\" + debug_str +\"</div>\");\n tile.addClass(\"webtile\");\n tile.addClass(\"wt-\" + tiles[x][y]);\n row.append(tile);\n }\n $(\"#grid\").append(row);\n }\n });\n });\n}", "function renderEverything() {\n renderPepperoni();\n renderMushrooms();\n renderGreenPeppers();\n renderWhiteSauce();\n renderGlutenFreeCrust();\n renderButtons();\n renderPrice();\n renderReceipt()\n}", "function render() {\n /* This array holds the relative URL to the image used\n * for that particular row of the game level.\n */\n var rowImages = [\n 'images/water-block.png',\n 'images/stone-block.png',\n 'images/stone-block.png',\n 'images/stone-block.png',\n 'images/stone-block.png',\n 'images/stone-block.png',\n 'images/grass-block.png',\n ],\n numRows = 7,\n numCols = 5,\n row, col;\n\n // Before drawing, clear existing canvas\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n\n for (row = 0; row < numRows; row++) {\n for (col = 0; col < numCols; col++) {\n ctx.drawImage(Resources.get(rowImages[row]), col * 101, row * 83);\n }\n }\n\n renderEntities();\n }", "draw() {\r\n\t\tthis.matrix.forEach((row, y) => row.forEach((tile, x) => {\r\n\t\t\tif (tile) {\r\n\t\t\t\tlet [tx, ty] = tile.position.get;\r\n\t\t\t\tif (tile.isEmpty) {\r\n\t\t\t\t\t//default\r\n\t\t\t\t\tmainCtx.fillStyle = this.baseColor;\r\n\t\t\t\t\tmainCtx.fillRect(\r\n\t\t\t\t\t\ttx * (this.tileSize + this.spacing),\r\n\t\t\t\t\t\tty * (this.tileSize + this.spacing),\r\n\t\t\t\t\t\tthis.tileSize,\r\n\t\t\t\t\t\tthis.tileSize\r\n\t\t\t\t\t);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t//draw gameobject\r\n\t\t\t\t\tmainCtx.fillStyle = tile.top.bgColor;\r\n\t\t\t\t\tmainCtx.fillRect(\r\n\t\t\t\t\t\ttx * (this.tileSize + this.spacing),\r\n\t\t\t\t\t\tty * (this.tileSize + this.spacing),\r\n\t\t\t\t\t\tthis.tileSize,\r\n\t\t\t\t\t\tthis.tileSize\r\n\t\t\t\t\t);\r\n\t\t\t\t\tmainCtx.fillStyle = tile.top.color;\r\n\t\t\t\t\tmainCtx.fillText(\r\n\t\t\t\t\t\ttile.top.glyph,\r\n\t\t\t\t\t\ttx * (this.tileSize + this.spacing) + this.tileSize / 2,\r\n\t\t\t\t\t\tty * (this.tileSize + this.spacing) + this.tileSize / 1.5\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}", "renderNoRequests() {\n const category = 'clothing';\n const clothingTiles = itemTypesByCategory[category];\n\n const renderTile = (itemType, index) => {\n const { displayName, icon } = itemInfo[itemType];\n return (\n <Col sm={3} xs={6} key={ index }>\n <Tile\n disabled\n side='donate'\n displayName={displayName}\n icon={ icon }\n hoverText={ '0 requests' }\n category={ category }\n subcategory={ itemType }\n />\n </Col>\n )\n };\n \n return (\n <React.Fragment>\n <div id=\"no-items\">\n <Row className=\"background\">\n {clothingTiles.slice(0, 4).map(renderTile)}\n </Row>\n <Row>\n <p className=\"col-sm-12 col-xs-12\">\n <span className=\"intro\">There are no needs right now</span>\n <Link to=\"/request\">Ask for an item</Link>\n </p>\n </Row>\n <Row className=\"background\">\n {clothingTiles.slice(4).map(renderTile)}\n </Row>\n </div>\n </React.Fragment>\n );\n }", "function renderAll(){\n renderHead();\n renderBody();\n renderFoot();\n}", "render() {\n\t\tthis.a1.render(this.context);\n\t\tthis.b1.render(this.context);\n\t\tthis.c1.render(this.context);\n\t\tthis.c2.render(this.context);\n\t\tthis.d1.render(this.context);\n\t\tthis.e1.render(this.context);\n\t\tthis.f1.render(this.context);\n\t\tthis.g1.render(this.context);\n\t\tthis.a1s.render(this.context);\n\t\tthis.c1s.render(this.context);\n\t\tthis.d1s.render(this.context);\n\t\tthis.f1s.render(this.context);\n\t\tthis.g1s.render(this.context);\n\n\t}", "generateView(parent, fileRow) {\n var tile = document.createElement('div');\n tile.setAttribute('class', 'tile ' + ((this.row * 9 + this.col) & 1 ? 'tile-white' : 'tile-black'));\n tile.setAttribute('id', 'tile' + this.row + this.col);\n parent.appendChild(tile);\n\n if (this.piece != null)\n this.piece.generateView(tile);\n\n // Generate file and rank tags\n if (this.row == fileRow)\n {\n var file = document.createElement('div');\n file.setAttribute('class', 'file');\n file.setAttribute('id', 'file' + this.row);\n file.textContent = String.fromCharCode(this.col + 96);\n tile.appendChild(file);\n }\n\n if (this.col == 8)\n {\n var rank = document.createElement('div');\n rank.setAttribute('class', 'rank');\n rank.setAttribute('id', 'rank' + this.col);\n rank.textContent = this.row;\n tile.appendChild(rank);\n }\n }", "buildTile(index){\n var imgRow = Math.floor(index / this.numColumns) | 0;\n var imgCol = (index % (this.sourceImage.width / this.tileW)) | 0;\n // console.log(`index: ${index}, imgRow: ${imgRow}, imgCol: ${imgCol}`)\n \n var sx = imgCol * this.tileW;\n var sy = imgRow * this.tileH;\n\n var cnvs = document.createElement(\"canvas\");\n cnvs.width = this.tileW;\n cnvs.height = this.tileH;\n var ctx = cnvs.getContext(\"2d\");\n ctx.imageSmoothingEnabled = false;\n ctx.drawImage(this.sourceImage, sx, sy, this.tileW, this.tileH, 0, 0, this.tileW, this.tileH);\n return cnvs;\n }", "function render(resortsArr) {\n resortsArr.map(resort => {\n getTemplate(resort);\n });\n}", "function displayRecipeTiles (template) {\n $('.displayBox').append(template);\n}", "renderMap() {\n $('#gameMap').append('<table></table>');\n for (let j = ((this.width - 1) / 2); j >= (-(this.width - 1) / 2); j--) {\n $('table').append('<tr></tr>');\n for (let i = (-(this.height - 1) / 2); i <= ((this.height - 1) / 2); i++) {\n $('tr:last').append('<td data-x=\"' + i + '\" data-y=\"' + j +\n '\" class=\"floorClass\"></td>');\n }\n }\n }", "drawTile(name, context, x, y) {\n this.draw(name, context, x * this.width, y * this.height); //must state the size(in this case it's 16) since the draw method doesn't take tile sizes as an argument like drawImage() does.\n }", "function renderEverything() {\n renderPepperoni();\n renderMushrooms();\n renderGreenPeppers();\n renderWhiteSauce();\n renderGlutenFreeCrust();\n\n renderButtons();\n renderPrice();\n}", "function renderEverything() {\n renderPepperoni();\n renderMushrooms();\n renderGreenPeppers();\n renderWhiteSauce();\n renderGlutenFreeCrust();\n\n renderButtons();\n renderPrice();\n}", "function renderEverything() {\n renderPepperoni();\n renderMushrooms();\n renderGreenPeppers();\n renderWhiteSauce();\n renderGlutenFreeCrust();\n\n renderButtons();\n renderPrice();\n}", "function renderEverything() {\n renderPepperoni();\n renderMushrooms();\n renderGreenPeppers();\n renderWhiteSauce();\n renderGlutenFreeCrust();\n\n renderButtons();\n renderPrice();\n}", "function renderEverything() {\n renderPepperoni();\n renderMushrooms();\n renderGreenPeppers();\n renderWhiteSauce();\n renderGlutenFreeCrust();\n\n renderButtons();\n renderPrice();\n}", "function renderEverything() {\n renderPepperoni();\n renderMushrooms();\n renderGreenPeppers();\n renderWhiteSauce();\n renderGlutenFreeCrust();\n\n renderButtons();\n renderPrice();\n}" ]
[ "0.6797765", "0.63694143", "0.63594025", "0.6326712", "0.6325823", "0.63210016", "0.6267395", "0.6267395", "0.6267395", "0.62603503", "0.6249606", "0.62444717", "0.6240857", "0.6232201", "0.6211645", "0.6190961", "0.6168772", "0.61627746", "0.6161931", "0.6124037", "0.6110909", "0.60605264", "0.60598207", "0.6049126", "0.60368705", "0.60230136", "0.6020822", "0.6013465", "0.6003782", "0.5980319", "0.5978931", "0.59551686", "0.5949711", "0.5946632", "0.5946632", "0.5926308", "0.5924773", "0.59246325", "0.59220326", "0.5900711", "0.58909816", "0.5866005", "0.58544576", "0.58449113", "0.58297026", "0.5828971", "0.5828372", "0.58251333", "0.58205664", "0.5814423", "0.58116204", "0.58109206", "0.5805242", "0.58048964", "0.5802154", "0.5794766", "0.57920545", "0.5789366", "0.57868755", "0.5766902", "0.5760432", "0.57541573", "0.57541573", "0.57531613", "0.573827", "0.5726436", "0.5726436", "0.57257724", "0.57256454", "0.57223415", "0.5715802", "0.57097447", "0.5703892", "0.5697459", "0.5696874", "0.5689453", "0.5687959", "0.5680659", "0.56794465", "0.5676253", "0.5676253", "0.56755745", "0.56735224", "0.5667919", "0.56658286", "0.5664654", "0.56597716", "0.5658509", "0.5655907", "0.5648816", "0.56466687", "0.5643666", "0.5643384", "0.56368506", "0.56342185", "0.5630889", "0.5630889", "0.5630889", "0.5630889", "0.5630889", "0.5630889" ]
0.0
-1
Utility to get the game instruction/reset/restart button based on game status
renderInstructionSection(gameStatus, STATUS) { if (gameStatus == STATUS.BEGIN) { return <span className="game-instruction">Click on any tile to begin the game</span> } else { let buttonLabel = (gameStatus == STATUS.COMPLETE) ? " Restart Game " : " Reset Game " let button = <button className="gameplay-btn" onClick={this.reset.bind(this)}>{buttonLabel}</button> return button } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static getButtonStatusText(challenge) {\n const [CCSTB, CCFB] = [this.Constants.STARTED.BUTTONS, this.Constants.FINISHED.BUTTONS];\n\n const uScore = this.getUser(challenge).score;\n const oScore = this.getOpponent(challenge).score;\n\n let statusTxt = null;\n\n if (ChallengeUtils.isNewChallenge(challenge)) {\n statusTxt = this.Constants.NEW.BUTTONS.TEXT.STATUS.READY;\n } else if (ChallengeUtils.isDeclinedChallenge(challenge)) {\n statusTxt = CCFB.TEXT.STATUS.DECLINED;\n } else if (ChallengeUtils.isFinishedChallenge(challenge)) {\n if (!_.isNil(challenge.winner)) {\n if (uScore !== oScore) {\n statusTxt = uScore > oScore ? CCFB.TEXT.STATUS.WON : CCFB.TEXT.STATUS.LOST;\n } else if (uScore === oScore) {\n statusTxt = CCFB.TEXT.STATUS.TIED;\n }\n }\n }\n\n if (_.isNil(statusTxt)) {\n statusTxt = _.isNil(oScore) ? CCSTB.TEXT.STATUS.THEM : CCSTB.TEXT.STATUS.YOU;\n }\n\n return statusTxt;\n }", "get Joystick7Button18() {}", "function buttonSaveCheck() {\n if (game.gameMessageBtn == 0) {\n gameMessageBtnDisabled();\n console.log(game.gameMessageBtn+\" gamemsg btn dis\");\n } else {\n gameMessageBtnEnabled();\n console.log(game.gameMessageBtn+\" gamemsg btn enb\");\n }\n if (game.encounterGenBtn == 0) {\n encounterGenBtnDisabled();\n console.log(game.encounterGenBtn+\" enc btn dis\");\n } else {\n encounterGenBtnEnabled();\n console.log(game.encounterGenBtn+\" enc btn enb\");\n }\n if (game.fightBattleBtn == 0) {\n fightBattleBtnDisabled();\n console.log(game.fightBattleBtn+\" fight btn dis\");\n } else {\n fightBattleBtnEnabled();\n console.log(game.fightBattleBtn+\" fight btn enb\");\n }\n if (game.runBattleBtn == 0) {\n runBattleBtnDisabled();\n console.log(game.runBattleBtn+\" run btn dis\");\n } else {\n runBattleBtnEnabled();\n console.log(game.runBattleBtn+\" run btn enb\");\n }\n}", "get Joystick7Button19() {}", "get Joystick7Button14() {}", "get Joystick7Button12() {}", "get Joystick7Button17() {}", "get Joystick7Button11() {}", "get Joystick7Button8() {}", "get Joystick8Button14() {}", "get Joystick6Button14() {}", "get Joystick6Button19() {}", "get Joystick6Button12() {}", "get Joystick6Button18() {}", "get Joystick8Button18() {}", "get JoystickButton14() {}", "get Joystick8Button12() {}", "get Joystick6Button17() {}", "chooseButton(){\n let {resetGame} = this.props\n let button = (this.props.reduxState.status.every(s=> s===gStatus.HEALTHY || s===gStatus.THIRSTY ||\n s===gStatus.HUNGRY || s===gStatus.STARVING ||s===gStatus.DEHYDRATED))?\n (<button key={'cont-btn'} data-test=\"continue-button\" onClick={()=> this.props.changePage('gameplay')}>Continue</button>): <button key={'reset-btn'} onClick={resetGame}>Start Over</button>\n return button;\n }", "get Joystick8Button19() {}", "get Joystick3Button14() {}", "get Joystick1Button14() {}", "get Joystick8Button17() {}", "get Joystick6Button11() {}", "get JoystickButton17() {}", "get Joystick7Button0() {}", "get JoystickButton18() {}", "get Joystick7Button13() {}", "function switchButtonState(text) {\n if (text == \"New Game\") {\n return \"Pause\";\n } else if (text == \"Pause\") {\n return \"Resume\";\n } else if (text == \"Resume\") {\n return \"Pause\";\n } else {\n return \"should never happen\";\n }\n}", "get JoystickButton12() {}", "get Joystick6Button8() {}", "get Joystick7Button1() {}", "get Joystick3Button18() {}", "get JoystickButton8() {}", "get JoystickButton19() {}", "get Joystick8Button11() {}", "get Joystick1Button18() {}", "get Joystick3Button19() {}", "get Joystick1Button19() {}", "get Joystick8Button0() {}", "get Joystick3Button8() {}", "get Joystick1Button17() {}", "get Joystick1Button12() {}", "get Joystick8Button7() {}", "get Joystick8Button13() {}", "get Joystick7Button9() {}", "get Joystick7Button10() {}", "get Joystick3Button17() {}", "get Joystick8Button6() {}", "get Joystick6Button1() {}", "get Joystick7Button16() {}", "get Joystick6Button13() {}", "get Joystick3Button12() {}", "addResetButton() {\n this.interface.gui.add(this.gameOrchestrator, 'reset').name('Restart Game');\n }", "get Joystick6Button0() {}", "get Joystick1Button8() {}", "get Joystick2Button14() {}", "get Joystick8Button1() {}", "get Joystick6Button10() {}", "get JoystickButton11() {}", "get JoystickButton7() {}", "function win() {\r\n //finds the 1 button and turns it into the restart button\r\n var button = buttons[numbers.findIndex(function (num) {return num == 1;})];\r\n update(button, \"Restart\");\r\n $(button).css(\"background-color\", \"#fcd303\");\r\n //formats stuff\r\n hasWon = true;\r\n update(\"#title\", \"YOU WIN! Press the \\\"Restart\\\" button to try again\");\r\n}", "get JoystickButton6() {}", "get Joystick8Button9() {}", "get Joystick7Button6() {}", "get Joystick1Button6() {}", "get Joystick2Button18() {}", "get Joystick2Button19() {}", "get Joystick8Button10() {}", "function togglePowerButton() {\n\tif(powerState == \"white\") { powerState = \"orange\"; }\n\telse if(powerState == \"orange\") { powerState = \"blue\"; }\n\telse if(powerState == \"blue\") { powerState = \"white\"; }\n\t\n\tdocument.getElementById(\"powerButton\").src = \"img/\"+powerState+\".png\";\n\t\n\tconsole.log(powerState);\n\t\n\tevalError();\n}", "get Joystick1Button7() {}", "get Joystick2Button17() {}", "get Joystick1Button11() {}", "get Joystick4Button18() {}", "get Joystick3Button11() {}", "get Joystick7Button15() {}", "get Joystick6Button9() {}", "get Joystick7Button2() {}", "get Joystick7Button7() {}", "get Joystick5Button14() {}", "get Joystick4Button14() {}", "function GetButton1() {\r\n if (LED3_state === 1) {\r\n LED3_state = 0;\r\n strLED3 = \"&LED3=0\";\r\n } else {\r\n LED3_state = 1;\r\n strLED3 = \"&LED3=1\";\r\n }\r\n}", "get Joystick5Button18() {}", "get Joystick1Button9() {}", "get Joystick3Button7() {}", "get JoystickButton9() {}", "get Joystick4Button17() {}", "get Joystick1Button0() {}", "function gameStatus() {\n\n if(play){ //game paused\n gameControll.innerHTML = 'Start';\n number.innerHTML ='?';\n }else{ //game continued\n gameControll.innerHTML = 'Pause';\n }\n play = !play;\n}", "get Joystick8Button3() {}", "get Joystick6Button16() {}", "function whichButton(z){\n\tsound(soundColor);\n\tflash(z);\n\tsequencePlayer.push(z);\n\tcheck();\n}", "get Joystick4Button19() {}", "get Joystick7Button3() {}", "get Joystick8Button8() {}", "get Joystick3Button6() {}", "get Joystick5Button19() {}", "get Joystick8Button2() {}", "get Joystick2Button12() {}", "get Joystick3Button9() {}" ]
[ "0.6413001", "0.6261465", "0.62492067", "0.6249016", "0.6231306", "0.62172127", "0.6195295", "0.6194462", "0.61833894", "0.6174551", "0.61691624", "0.61605155", "0.6137381", "0.61365545", "0.61361325", "0.6135666", "0.6132148", "0.61310554", "0.6119435", "0.6119396", "0.6119216", "0.6114742", "0.61105853", "0.6098953", "0.60953325", "0.6092486", "0.6087818", "0.60871536", "0.6081267", "0.6080111", "0.6069785", "0.6068118", "0.60671264", "0.606704", "0.60663426", "0.6064479", "0.6062906", "0.6057362", "0.6056504", "0.6043076", "0.60425204", "0.6039181", "0.60366154", "0.6035765", "0.60352755", "0.6034592", "0.6033397", "0.6032667", "0.6031814", "0.60310245", "0.6027514", "0.60218716", "0.60113734", "0.60090214", "0.600761", "0.6006609", "0.5996697", "0.599299", "0.5991768", "0.59898144", "0.5980996", "0.5980389", "0.59778714", "0.5977502", "0.5976297", "0.59708655", "0.5967179", "0.5966635", "0.5966586", "0.5964271", "0.59625715", "0.59582675", "0.5957197", "0.59554476", "0.5954029", "0.5953348", "0.5946654", "0.59434766", "0.5943302", "0.5941979", "0.5939414", "0.5938842", "0.59316784", "0.59315115", "0.59304035", "0.5921864", "0.5915955", "0.5915686", "0.5912294", "0.59055114", "0.59040153", "0.5903752", "0.5903693", "0.5902361", "0.58974314", "0.58931243", "0.58928126", "0.58901846", "0.588824", "0.58881634" ]
0.68386793
0
Utility for score rendering area. Not to display before the game begin
renderScoreArea(gameStatus, STATUS) { if (gameStatus != STATUS.BEGIN) { //When game completes let scoreLabel = (gameStatus == STATUS.COMPLETE) ? "Final Score" : "Score" let score = <span className="column column-100"><h1><u>{scoreLabel}</u></h1><h2>{this.getScore()}</h2></span>; return score } return <span></span> }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function scoreRender(){ \n scoreDiv.html(\"You got \" + score + \"/10 correct!\");\n}", "function render(){\n renderScores();\n adjustTurn();\n getWinner();\n clearSelection();\n}", "function renderScoreGraphics () {\n var originalFont = SI.game.Renderer.getScene().getContext().font;\n var originalFillStyle = SI.game.Renderer.getScene().getContext().fillStyle;\n \n SI.game.Renderer.getScene().getContext().font = SI.res.ResourceLoader.getResources().game.properties.HUDScoreFont;\n SI.game.Renderer.getScene().getContext().fillStyle = scoreColor;\n SI.game.Renderer.getScene().getContext().fillText(SI.res.ResourceLoader.getResources().game.properties.HUDScorePrefix + '' + score.toString(), SI.res.ResourceLoader.getResources().game.properties.HUDScoreX, SI.res.ResourceLoader.getResources().game.properties.HUDScoreY);\n \n SI.game.Renderer.getScene().getContext().font = originalFont;\n SI.game.Renderer.getScene().getContext().fillStyle = originalFillStyle;\n }", "function renderScore() {\n\n // Select the font face and size\n Frogger.drawingSurface.font = _font;\n\n // Right-align text at the position we define to draw the text at\n Frogger.drawingSurface.textAlign = \"end\";\n\n // Write the text \"1-UP\", right-aligned to the 4th column position and ending half\n // a row down from the top of the game board in white (hex color value #FFF)\n Frogger.drawingSurface.fillStyle = \"#FFF\";\n Frogger.drawingSurface.fillText(\"1-UP\", _gameBoard.columns[3], _gameBoard.grid.height / 2);\n\n // Write out the current score in red (hex color value #F00) right-aligned beneath\n // the \"1-UP\" text previously drawn to the <canvas>\n Frogger.drawingSurface.fillStyle = \"#F00\";\n Frogger.drawingSurface.fillText(_score, _gameBoard.columns[3], _gameBoard.grid.height);\n\n // Write the text \"HI-SCORE\", right-aligned to the 8th column position and ending\n // half a row down from the top of the game board in white (hex color value #FFF)\n Frogger.drawingSurface.fillStyle = \"#FFF\";\n Frogger.drawingSurface.fillText(\"HI-SCORE\", _gameBoard.columns[8], _gameBoard.grid.height / 2);\n\n // Write out the current high score in red (hex color value #F00) right-aligned\n // beneath the \"HI-SCORE\" text previously drawn to the <canvas>\n Frogger.drawingSurface.fillStyle = \"#F00\";\n Frogger.drawingSurface.fillText(_highScore, _gameBoard.columns[8], _gameBoard.grid.height);\n }", "function scoreRender(score) {\r\n document.querySelector(\".score-text\").textContent = `${score}/15`;\r\n}", "function renderScore() {\n ctx.font = '20px Time New Roman';\n\n // Draws the level information\n ctx.fillText(\"Level: \" + level, 10, 30);\n\n // Draws the time information\n ctx.fillText(time + \" seconds\", CANVAS_WIDTH / 2 - 30, 30);\n\n // Draws the collected key information\n ctx.drawImage(Resources.get(scoreKey), 780, 5);\n ctx.fillText('x ' + levelKey, 810, 30);\n\n // Draws the hearts (player lives) information\n ctx.drawImage(Resources.get(scoreHeart), 850, 5);\n ctx.fillText('x ' + lives, 880, 30);\n\n}", "function scoreRender() {\r\n scoreDiv.style.display = \"block\";\r\n quiz.style.display = \"none\";\r\n\r\n // calculate the final score\r\n var finalScore = score;\r\n\r\n scoreDiv.innerHTML += \"<p>\" + finalScore + \"</p>\";\r\n}", "function renderScore(){\r\n\tscore.innerHTML = \"<p>Score: \" + qscore + \"</p>\";\r\n}", "function renderScore() {\n scoreDiv.style.display = \"block\";\n initialsDiv.style.display = \"block\";\n quiz.style.display = \"none\";\n scoreDiv.textContent = \"Your score is \" + score;\n}", "function renderScore() {\n ctx.fillStyle = \"#FFF\";\n ctx.font = \"14px sans-serif\";\n ctx.fillText(\"Score: \", 150, 30);\n\n ctx.fillStyle = \"#FFF\";\n ctx.font = \"14px sans-serif\";\n ctx.fillText(score, 195, 31);\n}", "function scoreboard() {\n\n var scoreboard = document.getElementById('scoreboard');\n scoreboard.innerHTML = `${score}pts.`\n if (score >= 150) {\n bugSpray();\n }\n }", "drawScore() {\n\t\tthis.ctx.font = '500 16px Noto Sans JP';\n\t\tthis.ctx.fillStyle = 'white';\n\t\tthis.ctx.fillText(`Score : ${this.score}`, 10, 30);\n\t\tthis.ctx.fillText(`Highest Score : ${this.highestScore}`, 150, 30);\n\t}", "calculateDisplayScore() {\n // If the scre is not equal to 40 then\n if (this.score !== 40) {\n this.ctx.font = '17px Arial';\n this.ctx.fillStyle = '#0095DD';\n this.ctx.fillText(`Score: ${this.score}`, 975, 35);\n\n // If the score is = 40 then the user won so reset the bricks and score\n } else {\n this.score = 0;\n window.location.reload();\n }\n }", "function drawScore() {\n document.getElementById('score').innerText = score.toString();\n }", "function renderScore() {\n ctx.save();\n\n ctx.font = '25px Exo';\n ctx.textAlign = 'right';\n\n ctx.strokeStyle = '#00f';\n ctx.strokeText('Score: ' + score, canvas.width - 10, 30);\n\n ctx.fillStyle = '#333';\n ctx.fillText('Score: ' + score, canvas.width - 10, 30);\n\n ctx.restore();\n }", "function displayScore(){\n push();\n textFont(`Blenny`);\n fill(tileWhite.fill.r, tileWhite.fill.g, tileWhite.fill.b); // Same white as white tiles\n textSize(40);\n text(`${score} points`, 1050, 150);\n pop();\n}", "render() {\n\n ctx.drawImage(Resources.get(this.sprite), this.x, this.y);\n ctx.fillStyle = \"white\";\n ctx.font = \"16px Comic Sans MS\";\n ctx.fillText(`Score: ${score}`, 100, 70);\n ctx.fillText(`time: ${timeModel.min} mins ${timeModel.sec} sec` , 200, 70);\n\n // if score reach the win score, it will give a message and \n // hold the game\n // we can restart the game by press 'enter'\n if (score >= MAX_SCORE) {\n ctx.fillStyle = \"green\";\n ctx.font = \"20px Comic Sans MS\";\n ctx.fillText(`You win the Game with Score: ${score}`, 141, 200);\n ctx.fillText(`time takes: ${timeModel.min} mins ${timeModel.sec} sec` , 141, 225);\n canvas.clearTimer();\n timeModel.isStop = true; \n }\n }", "function renderScore(currentScore){\n currentScore.text(score);\n }", "function displayScore() {\n displayText(36, score, width / 2, height - 50);\n}", "displayScore(score, tileSize) {\n ctx.fillStyle = \"white\";\n ctx.fillRect(0, 0, this.rightBoundary, this.upperBoundary);\n\n ctx.fillStyle = this.scoreColor;\n ctx.font = this.scoreFont;\n ctx.fillText(\"score : \" + score, this.leftBoundary, this.leftBoundary);\n }", "displayScore() {\n this.ctx.font = '40px Arial';\n this.ctx.fillStyle = '#fff';\n this.ctx.fillText(`${this.score1}`, 10, 340);\n\n this.ctx.font = '40px Arial';\n this.ctx.fillStyle = '#fff';\n this.ctx.fillText(`${this.score2}`, 10, 440);\n }", "function renderStatus() {\n if (Map.collided === true) {\n ctx.font = '25pt Calibri';\n ctx.textAlign = 'center';\n ctx.fillStyle = 'black';\n ctx.fillText(\n 'YOU GOT STINKED!! Score: ' + Map.score,\n parseInt(Map.BLOCKWIDTH * Map.columns / 2),\n parseInt(Map.BLOCKHEIGHT * Map.rows * 2 / 3)\n );\n }\n else {\n ctx.font = '15pt Calibri';\n ctx.textAlign = 'right';\n ctx.fillStyle = 'white';\n ctx.fillText(\n 'Score: ' + Map.score,\n parseInt(Map.BLOCKWIDTH * Map.columns - (Map.BLOCKWIDTH * 1/8)),\n parseInt((Map.BLOCKHEIGHT / 2) + 40)\n );\n }\n }", "function render(){\n \n // this is a useful way to draw placeholder text in Phaser, but don't use it for a finished game! It's ugly.\n game.debug.text(\"Score: \" + score , 32, 32); //the numbers control where the text is drawn\n\n // for debugging purposes, we might want to show the collision boxes for the bodies in the game\n // this code will only run if the variable DEBUG (set at the top) is true\n if (DEBUG == true){ //show debug bodies\n game.debug.body(smiley); //this function draws the body's collision box\n\n //now let's do the same thing for every member of the platforms group that is currently alive\n platforms.forEachAlive(function(p){game.debug.body(p);},this); \n }\n}", "function drawScore () {\n ctx.font = '16px Arial';\n ctx.fillStyle = 'white';\n ctx.fillText ('Score: ' + store.state.score, 8, 20);\n}", "function displayScore() {\n\tctx.font = \"60px sans-serif\";\n\tctx.textAlign = \"end\";\n\tctx.fillStyle = \"white\";\n\tctx.fillText(points, 550, 55);\n}", "function renderGame({ scoreP1, scoreP2, p1x, p1y, ap1, p2x, p2y, ap2, obstacles }) {\n clearCanvas();\n showP1Score(scoreP1);\n showP2Score(scoreP2);\n showP1({ x: p1x, y: p1y, angle: ap1 });\n showP2({ x: p2x, y: p2y, angle: ap2 });\n showObstacles(obstacles);\n}", "function renderScoreUpdateLogic () {\n scoreUpdateDelta++;\n \n if (scoreUpdateDelta >= SI.res.ResourceLoader.getResources().game.properties.HUDScoreUpdateMaxDelta) {\n scoreUpdateDelta = 0;\n \n if (score != finalScore) {\n if (score < finalScore) {\n score += SI.res.ResourceLoader.getResources().game.properties.HUDScoreUpdateSpeed;\n \n if (score > finalScore) {\n score = finalScore;\n }\n } else {\n score -= SI.res.ResourceLoader.getResources().game.properties.HUDScoreUpdateSpeed;\n \n if (score < finalScore) {\n score = finalScore;\n }\n }\n }\n }\n }", "function showScore(){\n\tctx.fillStyle=\"black\";\n\tctx.fillRect(CANVAS_WIDTH-250, 10, 190, 40);\n\tctx.fillStyle = \"white\";\n\tctx.font = \"24px monospace\";\n\tctx.textAlign = \"left\";\n\tctx.fillText(\"score: \" + parseInt(score), CANVAS_WIDTH-250, 37);\n}", "function showCurrentScore(){\n game.innerHTML += '<div id=\"block1\"></div>'\n game.innerHTML += '<div id=\"block2\"></div>'\n game.innerHTML += `<p id=\"score-show1\"><strong>Score:\n ${gameData.score[0]}</strong></p>`\n game.innerHTML += `<p id=\"score-show2\"><strong>Score:\n ${gameData.score[1]}</strong></p>`;\n }", "function displayScore() {\n\ttheBoard.context.fillStyle = \"green\";\n\ttheBoard.context.font = \"bold 24px Times\";\n\ttheBoard.context.fillText(\"Score: \" + theBoard.score, 7, 22);\n\ttheBoard.context.fillText(\"Level: \" + theBoard.level, 700, 22);\n}", "function scoreRender(){\r\n totalScore = (score * 10) + count;\r\n quizEl.style.display = \"none\"; \r\n scoreEl.style.display = \"block\";\r\n document.getElementById(\"display\").textContent = \"Your Score: \" + totalScore + \" points\";\r\n if (totalScore > localStorage.getItem(\"highestScore\")){\r\n document.getElementById(\"userScore\").textContent = \"High Score! Please Enter Your Initials\" ;\r\n }else{\r\n document.getElementById(\"userScore\").textContent = \"Sorry No High Score\" ;\r\n document.getElementById(\"initials\").style.display = \"none\";\r\n document.getElementById(\"setHighScore\").style.display = \"none\";\r\n }\r\n}", "function displayscores() {\n\tlet timeto = endTime;\n\tif(!timeto)\n\t\ttimeto = Date.now();\n\tlet formattime = formatTime(timeto-startTime);\n\tlet t = statstext.replace(\"$score\",(score/100 | 0)).replace(\"$level\",\"\" + diffToLevel()).replace(\"$health\",health).replace(\"$kills\",kills).replace(\"$time\",formattime).replace(\"$difficulty\",difficultyGame);\n\tif(difficultyGame == \"easy\") {\n\t\tt = t.replace(\"Health\",\"Amount of Damage received\");\n\t}\n\ttext(t,0,0);\n}", "static displayScore(score) {\n document.getElementById('gameScore').innerHTML = `Score: ${score}`;\n }", "function updateScore() {\n if (draw) {\n document.getElementById(\"current_score\").innerHTML = score;\n }\n return;\n}", "function render(){\n drawRect(0, 0, canvas.width, canvas.height, \"BLACK\"); \n drawText(user.score, canvas.width/4, canvas.height/5, \"WHITE\"); \n drawText(com.score, 3*canvas.width/4, canvas.height/5, \"WHITE\"); \n drawNet();\n drawRect(user.x, user.y, user.width, user.height, user.color);\n drawRect( com.x, com.y, com.width, com.height, com.color);\n drawCircle(ball.x, ball.y, ball.radius, ball.color); \n}", "render() {\n\t\treturn (\n\t\t\t<div class={style.score}>\n <div class={style.container}>\n <h2>Time taken</h2>\n <h1>{this.score} seconds</h1>\n <span class={style.emoji}>\n {this.renderEmoji()}\n </span>\n \n </div>\n <FixedButton label=\"START OVER\" onClick={this.gotoGame} />\n\t\t\t</div>\n\t\t);\n\t}", "function displayScore() {\n titleEl.textContent = (\"High scores:\")\n titleEl.style = (\"color: black\");\n footerEl.style = (\"display: none\");\n timerEl.textContent = (JSON.stringify(highScores[0][\"initials\"]))\n penalty.textContent = (JSON.stringify(highScores[0][\"score\"]))\n penalty.style = (\"color: black\");\n}", "function updateScore() {\n\tctx.fillStlye = \"white\";\n\tctx.font = \"16px Arial, sans-serif\";\n\tctx.textAlign = \"left\";\n\tctx.textBaseline = \"top\";\n\tctx.fillText(\"Score: \" + points, 20, 20 );\n}", "function displayScore(ctx) {\n\n //Deffault font : size 40px Arial bold\n var fontSize = \"40px Arial bold\";\n\n // If the font gets more than 100 shrink the font for 5px\n // So the score will be more visible\n var cfg = 1.36;\n if(g_socre_paddle2 >= 10) {\n cfg += 0.05; //Move the score of p2 to the left\n } \n // Shrink to 30px \n if (g_socre_paddle2 >= 100) {\n fontSize = \"30px Arial bold\";\n } \n // Shrink the size to 28px, hope none will play more than 9999\n if(g_socre_paddle2 >= 1000) {\n fontSize = \"28px Arial bold\";\n }\n ctx.font = fontSize;\n ctx.fillText(\"p1:\" + g_socre_paddle1 , 0, g_canvas.height/12);\n ctx.fillText(\"p2:\" + g_socre_paddle2, g_canvas.width/cfg, g_canvas.height/12);\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 render() {\n ctx.clearRect(0, 0, W, H);\n\n ctx.textAlign = \"center\";\n ctx.font = \"25px Arial\";\n ctx.strokeText(\"Your score is: \" + myScore, 150, 100); // show the score inside of the canvas \n\n ctx.strokeStyle = 'lime';\n for (let x = 0; x < COLS; ++x) {\n for (let y = 0; y < ROWS; ++y) {\n if (board[y][x]) {\n ctx.fillStyle = colors[board[y][x] - 1];\n drawBlock(x, y);\n }\n }\n }\n\n ctx.fillStyle = 'red';\n ctx.strokeStyle = 'lime';\n for (let y = 0; y < 4; ++y) {\n for (let x = 0; x < 4; ++x) {\n if (current[y][x]) {\n ctx.fillStyle = colors[current[y][x] - 1];\n drawBlock(currentX + x, currentY + y);\n }\n }\n }\n}", "function displayScores() {\n // Current score, large and in the center\n push();\n fill(random(200, 255));\n textSize(800);\n textAlign(CENTER, CENTER);\n text(score, width / 2, height / 2);\n pop();\n\n // High score in the top left\n push();\n fill(random(200, 255));\n textSize(64);\n textAlign(LEFT, TOP);\n text(`High score: ${highScore}`, 0, 0);\n pop();\n}", "DrawScore() {\n /// char score[512];\n /// sprintf(score, \"Score: %d, Remaining Oil %d\",\n /// m_listener.GetScore(), m_listener.GetOil());\n /// const char *lines[] = { score, \"Move: a,s,d,w Fracking Fluid: e\" };\n /// for (uint32 i = 0; i < B2_ARRAY_SIZE(lines); ++i)\n /// {\n /// m_debugDraw.DrawString(5, m_textLine, lines[i]);\n /// m_textLine += DRAW_STRING_NEW_LINE;\n /// }\n testbed.g_debugDraw.DrawString(5, this.m_textLine, `Score: ${this.m_listener.GetScore()}, Remaining Oil ${this.m_listener.GetOil()}`);\n this.m_textLine += testbed.DRAW_STRING_NEW_LINE;\n testbed.g_debugDraw.DrawString(5, this.m_textLine, \"Move: a,s,d,w Fracking Fluid: e\");\n this.m_textLine += testbed.DRAW_STRING_NEW_LINE;\n }", "function showCurrentScore() {\n score1.innerHTML = `<p><strong>${gameData.score[0]}</strong><\\p>`;\n score2.innerHTML = `<p><strong>${gameData.score[1]}</strong><\\p>`;\n }", "function renderGame(){\n //Set target number and crystal values\n targetNum = makeRandomTarget();\n crystal1 = makeRandomGemNum();\n crystal2 = makeRandomGemNum();\n crystal3 = makeRandomGemNum();\n crystal4 = makeRandomGemNum();\n userScore = 0;\n\n //Set html values to newly created values\n $('#target-number').html(targetNum);\n $('#crystal1').attr('value', crystal1);\n $('#crystal2').attr('value', crystal2);\n $('#crystal3').attr('value', crystal3);\n $('#crystal4').attr('value', crystal4);\n $('#score').html(userScore);\n\n //Set wins and losses to what they are\n $('#wins').html('Wins: ' + wins);\n $('#losses').html('Losses: ' + losses);\n }", "function main() {\n\t\t// time delta information creates smooth animation based on time\n\t\tvar now = Date.now();\n\t\tvar dt = (now - lastTime) / 1000.0;\n\n\t\t/**\n\t\t * call update function with time delta parameter for smooth\n\t\t * animation and call render to load screen\n\t\t */\n\t\tupdate(dt);\n\t\trender();\n\n\t\t// set lastTime variable to now\n\t\tlastTime = now;\n\n\t\t/**\n\t\t * use browser's requestAnimationFrame function to call main\n\t\t * again when browswer can draw another frame\n\t\t */\n\t\twin.requestAnimationFrame(main);\n\n\t\tkeepScore();\n\t}", "function renderScores(){\n scoreElements.rpCount.innerText = scores.redPieceCount;\n scoreElements.bpTaken.innerText = scores.blackPiecesTaken;\n scoreElements.bpCount.innerText = scores.blackPieceCount;\n scoreElements.rpTaken.innerText = scores.redPiecesTaken;\n}", "function updateScore(){\n $('#js-score').html(myGame.score);\n }", "function drawScore() {\n if (cnvsWidth <= 600) {\n ctx.font = \"4vw Orbitron, sans-serif\";\n } else {\n ctx.font = \"2vw Orbitron, sans-serif\";\n }\n ctx.strokeText(\"SCORE:\" + score, 10, cnvsHeight - 10);\n ctx.strokeStyle = \"rgba(252, 252, 252, 0.486)\";\n}", "_updateScore() {\n\t\tthis._$scoreBoard.textContent= this._score+'';\n\t}", "function renderScoreDifferenceGraphics () {\n if (scoreDifferenceOpacity <= 0.0) {\n return;\n }\n \n var originalGlobalAlpha = SI.game.Renderer.getScene().getContext().globalAlpha;\n var originalFont = SI.game.Renderer.getScene().getContext().font;\n var originalFillStyle = SI.game.Renderer.getScene().getContext().fillStyle;\n \n SI.game.Renderer.getScene().getContext().globalAlpha = scoreDifferenceOpacity;\n SI.game.Renderer.getScene().getContext().font = SI.res.ResourceLoader.getResources().game.properties.HUDScoreDifferenceFont;\n SI.game.Renderer.getScene().getContext().fillStyle = scoreDifferenceColor;\n SI.game.Renderer.getScene().getContext().fillText(scoreDifference.toString(), SI.res.ResourceLoader.getResources().game.properties.HUDScoreDifferenceX, scoreDifferenceY);\n \n SI.game.Renderer.getScene().getContext().globalAlpha = originalGlobalAlpha;\n SI.game.Renderer.getScene().getContext().font = originalFont;\n SI.game.Renderer.getScene().getContext().fillStyle = originalFillStyle;\n }", "function displayScores() {\n score0El.innerText = score0;\n score1El.innerText = score1;\n }", "function displayScore() {\n //Display current score\n push();\n fill(255);\n textSize(500);\n textAlign(CENTER, CENTER);\n text(currentScore, width / 2, height / 2);\n pop();\n //Display high score\n push();\n fill(255);\n textSize(30);\n textAlign(CENTER, CENTER);\n text(`High score: ${bubbleData.highScore}`, width / 2, height / 2 + 200);\n pop();\n}", "function drawScore() {\r\n if (cnvsWidth <= 600) {\r\n ctx.font = \"4vw Orbitron, sans-serif\";\r\n } else {\r\n ctx.font = \"2vw Orbitron, sans-serif\";\r\n }\r\n ctx.strokeText(\"SCORE:\" + score, 10, cnvsHeight - 10);\r\n ctx.strokeStyle = \"rgba(252, 252, 252, 0.486)\";\r\n}", "function score() {\n\treturn `Human: ${playerPoints} Computer: ${computerPoints}`;\n}", "function score() {\n fill(51);\n rect(20, 20, 800, 200);\n\n\n fill(255);\n textSize(40);\n text(\"POINTS : \" + frameCount, 125, 50);\n text(\"HP : \" + 100, 125, 100);\n }", "function updateScoreDisplay()\n{\n\tif(isP2Mode)\n\t{\n\t\t$(\"#best_score\").text(\"\");\n\t\t$(\"#p1_score\").text(\"Blue : \" + snake1.score);\n\t\t$(\"#p2_score\").text(\"Purple : \" + snake2.score);\n\t\t$(\"#tie_score\").text(\"Ties : \" + tie_score);\n\t}\n\telse\n\t{\n\t\t$(\"#best_score\").text(\"High score : \" + highscore);\n\t\t$(\"#p1_score\").text(\"\");\n\t\t$(\"#p2_score\").text(\"\");\n\t\t$(\"#tie_score\").text(\"\");\n\t}\n}", "function renderCounter(){\r\n if(count >= questionTime){\r\n counter.innerHTML = count;\r\n count--\r\n }else{\r\n count = 10;\r\n levens--;\r\n lives.innerHTML = \"<p>Levens: \" + levens + \"</p>\";\r\n \r\n if (levens <= 0) {\r\n \t clearInterval(TIMER);\r\n \tgameOverRender();\r\n } // zolang de index van de huidige vraag kleiner dan de index is van de laatste vraag, dan springt ie\r\n // naar de volgende index en wordt de volgende vraag gegenereerd door de functie op te roepen.\r\n else if(runningQuestion < lastQuestion){\r\n runningQuestion++;\r\n renderQuestion();\r\n }else{\r\n // timer wordt gestopt en het eindscherm met de eindscore wordt gegenereerd.\r\n clearInterval(TIMER);\r\n endScoreRender();\r\n }\r\n }\r\n}", "function render() {\n renderScore();\n renderTimeLabel();\n\n if (!_gameStarted) {\n renderCenterText(\"READY!\");\n } else if (_gameOver) {\n // Only render the \"GAME OVER\" text if the game is actually over\n renderCenterText(\"GAME OVER!\");\n } else if (_gameWon) {\n // Only render the \"YOU WIN!\" text if the players has won the game\n renderCenterText(\"YOU WIN!\");\n } else if (_gamePaused) {\n // Only render the \"PAUSED\" text if the game is paused\n renderCenterText(\"PAUSED\");\n }\n }", "function DrawScore() {\n\tctx.clearRect(20, 20, 200, 200);\n\tctx.font = '500 20pt Courier New';\n\tctx.fillStyle = \"white\";\n\tctx.fillText('Score: ', 20, 40);\n\tctx.fillText(score, 120, 40);\n\tconsole.log(\"changing score\");\n\t\n}", "function updateScore() {\n scoreDom.innerHTML = score;\n }", "function check_score(){\n\t\tif (app.score >= app.base * 50){\n\t\t\tfor (i = 0; i < allStars.length; i++){\n\t\t\t\tallStars[i].render();\n\t\t\t\tallStars[i].update();\n\t\t\t}\n\t\t}\n\t\tif (allStars[0].pos_Y == 500){\n\t\t\tfor (i = 0; i < allStars.length; i++){\n\t\t\t\tallStars[i].reset();\n\t\t\t}\n\t\t\tapp.base = Math.round(app.score / 50) + 1;\n\t\t}\n\t}", "function generateCurrentScore() {\n let scores = getScoreHtml()\n $('.scores').html(scores);\n}", "function drawScore() {\n context.textAlign = \"center\";\n context.font = \"7px 'MS UI Gothic'\";\n context.fillStyle = \"#FFFFFF\";\n context.fillText(scoreLeft + \" - \" + scoreRight, gridSizeX * .5, 10);\n\n if (gameOver) {\n context.fillText(\"GG\", gridSizeX * .5, 20);\n }\n}", "function updateScore() {\n document.querySelector(\"#score\").innerHTML = \"Score: \" + score;\n }", "function updateScorecard() {\r\n\tvar i = strokesDisp.length - 1;\r\n\tif (hole != 10) {\r\n\t\ttotal = total + strokesDisp[i];\r\n\t}\r\n\tsw = total - TOTAL_PAR[i];\r\n\r\n\t// different colors if over or under par\r\n\tif (total > TOTAL_PAR[i]) {\r\n\t\tparScore.addColor('#228B22', 0);\r\n\t\tparScore.fontSize = 20 * HR;\r\n\t\tparScore.setText('+' + sw);\r\n\t} else if (total < TOTAL_PAR[i]) {\r\n\t\tparScore.addColor('#ff0000', 0);\r\n\t\tparScore.fontSize = 20 * HR;\r\n\t\tparScore.setText(sw);\r\n\t} else if (total == TOTAL_PAR[i]) {\r\n\t\tparScore.addColor('#000000', 0);\r\n\t\tparScore.fontSize = 21 * HR;\r\n\t\tparScore.setText('E');\r\n\t}\r\n\tif (strokesDisp.length < 9) {\r\n\t\tparScore.fontSize = 25 * HR;\r\n\t\tparScore.y = scorecard.y - 152 * HR + 48 * HR * i;\r\n\t} else {\r\n\t\tparScore.y = scorecard.y + 310 * HR;\r\n\t}\r\n\r\n\t// score on each hole shown on scorecard\r\n\tif (strokesDisp.length >= 9) {\r\n\t\tscorecolor();\r\n\t\tscore9.setText(strokesDisp[8])\r\n\t\tscore10.setText(total)\r\n\t\tif (total - TOTAL_PAR[i] > 0) {\r\n\t\t\tscore10.addColor('#228B22', 0);\r\n\t\t} else if (total - TOTAL_PAR[i] == 0) {\r\n\t\t\tscore10.addColor('#000000', 0);\r\n\t\t} else if (total - TOTAL_PAR[i] < 0) {\r\n\t\t\tscore10.addColor('#ff0000', 0);\r\n\t\t}\r\n\t} else if (strokesDisp.length >= 8) {\r\n\t\tscorecolor();\r\n\t\tscore8.setText(strokesDisp[7])\r\n\t} else if (strokesDisp.length >= 7) {\r\n\t\tscorecolor();\r\n\t\tscore7.setText(strokesDisp[6])\r\n\t} else if (strokesDisp.length >= 6) {\r\n\t\tscorecolor();\r\n\t\tscore6.setText(strokesDisp[5])\r\n\t} else if (strokesDisp.length >= 5) {\r\n\t\tscorecolor();\r\n\t\tscore5.setText(strokesDisp[4])\r\n\t} else if (strokesDisp.length >= 4) {\r\n\t\tscorecolor();\r\n\t\tscore4.setText(strokesDisp[3])\r\n\t} else if (strokesDisp.length >= 3) {\r\n\t\tscorecolor();\r\n\t\tscore3.setText(strokesDisp[2])\r\n\t} else if (strokesDisp.length >= 2) {\r\n\t\tscorecolor();\r\n\t\tscore2.setText(strokesDisp[1])\r\n\t} else if (strokesDisp.length >= 1) {\r\n\t\tscore1.setText(strokesDisp[0])\r\n\t\tif (strokesDisp[i] - TOTAL_PAR[i] > 0) {\r\n\t\t\tscore1.addColor('#228B22', 0);\r\n\t\t} else if (strokesDisp[i] - TOTAL_PAR[i] == 0) {\r\n\t\t\tscore1.addColor('#000000', 0);\r\n\t\t} else if (strokesDisp[i] - TOTAL_PAR[i] < 0) {\r\n\t\t\tscore1.addColor('#ff0000', 0);\r\n\t\t}\r\n\t}\r\n\r\n\t// sets color of number on scorecard\r\n\tfunction scorecolor() {\r\n\t\tfor (var i = 1; i < allScores.length - 1; i++) {\r\n\t\t\tif (strokesDisp[i] - (TOTAL_PAR[i] - TOTAL_PAR[i - 1]) > 0) {\r\n\t\t\t\tallScores[i].addColor('#228B22', 0);\r\n\t\t\t} else if (strokesDisp[i] - (TOTAL_PAR[i] - TOTAL_PAR[i - 1]) == 0) {\r\n\t\t\t\tallScores[i].addColor('#000000', 0);\r\n\t\t\t} else if (strokesDisp[i] - (TOTAL_PAR[i] - TOTAL_PAR[i - 1]) < 0) {\r\n\t\t\t\tallScores[i].addColor('#ff0000', 0);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}", "function renderTeamScoringData(){\n\t// TODO Update to have actual team scoring data\n\n}", "function renderBestScores() {\n if (gBestScoreEasy) elTopScores[0].innerText = gBestScoreEasy + ' sec';\n if (gBestScoreMedium) elTopScores[1].innerText = gBestScoreMedium + ' sec';\n if (gBestScoreHard) elTopScores[2].innerText = gBestScoreHard + ' sec';\n}", "render() {\n ctx.drawImage(Resources.get(this.sprite), this.x, this.y);// Draw player\n ctx.font = '24px arial';// Style level and score font\n ctx.strokeStyle = '#4caf50';//Style level color\n ctx.strokeText('Level: '+this.level, 200, 30);// Draw level\n ctx.fillText('Score: '+this.score, 350, 30);// Draw score\n }", "function PresentScoring() {\n basic.clearScreen()\n // plot minumum target (depending on current level)\n for (let r = 0; r <= level * 5 - 1; r++) {\n led.plotBrightness(r % 5, 4 - r / 5, 10)\n }\n basic.pause(250)\n for (let t = 0; t <= Math.min(24, 29 - score); t++) {\n led.plot(t % 5, 4 - t / 5)\n if (!(quiet)) {\n music.playTone(175 + t * 5, music.beat(BeatFraction.Sixteenth))\n } else {\n basic.pause(music.beat(BeatFraction.Sixteenth))\n }\n basic.pause(200 - 8 * t)\n }\n basic.pause(250)\n // Check if got top Scores\n if (score < 6) {\n for (let i0 = 0; i0 < 3; i0++) {\n basic.clearScreen()\n led.plot(1, 1)\n led.plot(3, 1)\n led.plot(1, 4)\n led.plot(2, 4)\n led.plot(3, 4)\n led.plot(0, 3)\n led.plot(4, 3)\n if (!(quiet)) {\n music.playTone(587, music.beat(BeatFraction.Whole))\n } else {\n basic.pause(music.beat(BeatFraction.Whole))\n }\n basic.pause(250)\n //basic.clearScreen()\n led.plotAll()\n //ToggleScreen()\n basic.pause(250)\n //ToggleScreen()\n\n }\n screen += 1\n }\n else {\n if (30 - score >= 5 * (level)) {\n if (!(quiet)) {\n music.playTone(587, music.beat(BeatFraction.Whole))\n } else {\n basic.pause(music.beat(BeatFraction.Whole))\n }\n screen += 1\n basic.pause(1000)\n }\n else {\n // \n basic.clearScreen()\n ShowSadFace()\n basic.pause(1000)\n }\n basic.pause(30)\n }\n\n basic.pause(1000)\n}", "function scoreDisplay() {\n textSize(16);\n fill(40,160,40);\n text(\"Score : \" + score,20,20);\n}", "function scoreScreen() {\n\n // removes questions from the page\n $(\"#game-screen\").empty();\n // updates empty divs with player's score\n $(\"#correct\").text(\"Correct Answers: \" + numCorrect);\n $(\"#incorrect\").text(\"Incorrect Answers: \" + numIncorrect);\n $(\"#unanswered\").text(\"Unanswered Questions: \" + numUnanswered);\n \n }", "function render() {\n context.clearRect(0, 0, game.size.width, game.size.height);\n\n displayBalls();\n displayPlayers();\n displayHUD();\n checkScore();\n\n if (debug) {\n displayTriggers();\n displayColliders();\n }\n if (game.state === state.STOP) {\n displayBackgroundAlpha();\n displayText(\"Pause\", game.size.width / 2.4, game.size.height / 2, color.WHITE, 100);\n displayText(\"Press any key to resume.\", game.size.width / 3.1, (game.size.height / 2) + (game.size.height / 4), color.WHITE);\n }\n\n}", "function drawScore(){\n document.getElementById('score').innerText = `Human vs Computer: ${score[0]} to ${score[1]}!`\n}", "function showScore() {\r\n\t var me = Math.floor(spin.score.toFixed(1));\r\n\t spinner(me)\r\n\t}", "function drawScore() {\n ctx.font = '16px ' + gameFont;\n ctx.fillStyle = '#0095DD';\n ctx.fillText(`Score: ${score}`, 8, 20) // score + scoreboard x, y\n}", "function drawScore() {\r\n c.font = '20px Arial';\r\n c.fillText(`Score: ${score}`, canvas.width - 100, 30);\r\n}", "_updateScore () {\n this._scoreBoard.innerHTML = this._score;\n }", "function render() {\n\t\t//Drawing background\n drawBackground();\n\t\t//Drawing player paddles\n\t\tdrawPaddles();\n\t\t//Drawing ball\n\t\tdrawBall();\n\n\t\t//If the game is running\n\t\tif(!started)\n\t\t{\n\t\t\tdrawInfo(); //Drawing information (Move your paddle...)\n\t\t\tdocument.getElementById('lifeActivity').style.opacity = 0;\n\t\t\tdocument.getElementById('universityActivity').style.opacity = 0;\n\t\t\tif(result != \"\")\n\t\t\t{\n\t\t\t\tfor(i = 0; i < universityHidden.length; i++) universityHidden[i] = false;\n\t\t\t\tfor(i = 0; i < lifeHidden.length; i++) lifeHidden[i] = false;\n\t\t\t\tdrawResult(); //Drawing result , who won\n\t\t\t}\n\t\t}\n}", "render(){\n ctx.drawImage(Resources.get(this.sprite), this.x, this.y);\n ctx.font = '16px arial';// Style score text font\n ctx.strokeStyle = 'red';// Style score text color\n ctx.strokeText('+'+this.score, this.x+35, this.y+110);// Draw The score text inside the star\n\n }", "function renderGame(){\n\n\t// questionOnScreen;\n\t// answerOnScreen;\n\t// timerId;\n\trightAnswers = 0;\n\twrongAnswers = 0;\n\tclicked = false;\n\t\tasked = 0;\n\t$( '#display' ).hide();\n\trandomOrder();\n\ttimerDisplay();\n\trenderQuestion();\n\trenderButtons();\n\tclickAnswer();\n\tnewQuestion();\n}", "function displayscore(){\n \t$('#playerscore').html('Correct Answer: ' + correctanswer + \n \t\t '<br>Wrong Answer: ' + wronganswer +\n '<br>Unanswer: ' + unanswered);\n }", "function updateScore() {\n ctx.fillStlye = \"white\";\n ctx.font = \"16px Arial, sans-serif\";\n ctx.textAlign = \"left\";\n ctx.textBaseline = \"top\";\n ctx.fillText(\"Score: \" + points, 20, 20);\n}", "function updateScore() {\n\tvar elScore = document.querySelector('#score');\n\tvar sHTML = (gBallsColected === 1)? gBallsColected +' ball' : gBallsColected +' balls';\n\t\n\telScore.innerHTML = sHTML;\n}", "function render() {\n if (bgReady) ctx.drawImage(bgImage, 0, 0);\n if (heroReady) ctx.drawImage(heroImage, hero.x, hero.y);\n if (monsterReady) ctx.drawImage(monsterImage, monster.x, monster.y);\n // Score Board\n ctx.fillStyle = \"rgb(200, 200, 200)\";\n ctx.font = \"24px Helvetica\";\n ctx.textAlign = \"left\";\n ctx.textBaseline = \"top\";\n ctx.fillText(\"High Score: \" + highScore + \" Level: \" + level + \" Time Remaining: \" + timeRemainingMin + \":\" + timeRemainingSec + \" Bad Guys in Jail: \" + monstersCaught, 32, 657 - 32);\n}", "function renderCounter(){\r\n if(count > 0 ){\r\n counter.innerHTML = count;\r\n count--;\r\n }else{\r\n clearInterval(timer);\r\n scoreRender();\r\n }\r\n}", "function showScore() {\n var scoreDiv = document.getElementById(\"scoreOutput\");\n var span = '<span id=\"score\">' + score + '</score>';\n scoreDiv.innerHTML = \"Score: \" + span;\n }", "scoreToDisplay() {\n let score = '';\n\n if (this.P1point === this.P2point && this.P1point < 3) {\n if (this.P1point === 0)\n score = 'Love';\n if (this.P1point === 1)\n score = 'Fifteen';\n if (this.P1point === 2)\n score = 'Thirty';\n score += '-All';\n }\n if (this.P1point === this.P2point && this.P1point > 2)\n score = 'Deuce';\n\n if (this.P1point > 0 && this.P2point === 0) {\n if (this.P1point === 1)\n this.P1res = 'Fifteen';\n if (this.P1point === 2)\n this.P1res = 'Thirty';\n if (this.P1point === 3)\n this.P1res = 'Forty';\n\n this.P2res = 'Love';\n score = this.P1res + '-' + this.P2res;\n }\n if (this.P2point > 0 && this.P1point === 0) {\n if (this.P2point === 1)\n this.P2res = 'Fifteen';\n if (this.P2point === 2)\n this.P2res = 'Thirty';\n if (this.P2point === 3)\n this.P2res = 'Forty';\n\n this.P1res = 'Love';\n score = this.P1res + '-' + this.P2res;\n }\n\n if (this.P1point > this.P2point && this.P1point < 4) {\n if (this.P1point === 2)\n this.P1res = 'Thirty';\n if (this.P1point === 3)\n this.P1res = 'Forty';\n if (this.P2point === 1)\n this.P2res = 'Fifteen';\n if (this.P2point === 2)\n this.P2res = 'Thirty';\n score = this.P1res + '-' + this.P2res;\n }\n if (this.P2point > this.P1point && this.P2point < 4) {\n if (this.P2point === 2)\n this.P2res = 'Thirty';\n if (this.P2point === 3)\n this.P2res = 'Forty';\n if (this.P1point === 1)\n this.P1res = 'Fifteen';\n if (this.P1point === 2)\n this.P1res = 'Thirty';\n score = this.P1res + '-' + this.P2res;\n }\n\n if (this.P1point > this.P2point && this.P2point >= 3) {\n score = 'Advantage ' + this.player1Name;\n }\n\n if (this.P2point > this.P1point && this.P1point >= 3) {\n score = 'Advantage ' + this.player2Name;\n }\n\n if (this.P1point >= 4 && this.P2point >= 0 && (this.P1point - this.P2point) >= 2) {\n score = 'Win for ' + this.player1Name;\n }\n if (this.P2point >= 4 && this.P1point >= 0 && (this.P2point - this.P1point) >= 2) {\n score = 'Win for ' + this.player2Name;\n }\n return score;\n }", "function endScoreRender(){\r\n endScore.style.display = \"block\";\r\n endScore.innerHTML += \"<p>Hoera! Je bent coronavrij! <br> Eindscore: \"+ qscore +\"</p>\";\r\n}", "function scores(){\r\n \t//score\r\n scoreString = 'Score : ';\r\n scoreText = game.add.text(10, 10, scoreString + score, { font: '34px Arial', fill: '#0f0' });\r\n\r\n //lives\r\n lives = game.add.group();\r\n game.add.text(game.world.width - 100, 10, 'Lives : ', { font: '34px Arial', fill: '#0f0' });\r\n\r\n //text\r\n stateText = game.add.text(game.world.centerX,game.world.centerY,' ', { font: '84px Arial', fill: '#0f0' });\r\n stateText.anchor.setTo(0.5, 0.5);\r\n stateText.visible = false;\r\n\r\n for (var i = 0; i < 3; i++) \r\n {\r\n var ship = lives.create(game.world.width - 100 + (30 * i), 60, 'ship');\r\n ship.anchor.setTo(0.5, 0.5);\r\n ship.angle = 90;\r\n ship.alpha = 0.4;\r\n }\r\n }", "function displayScores() {\n fill(\"black\");\n textSize(25);\n text(`lives = ${lives}`, 575, 30);\n text(`score = ${score}`, 565, 60);\n text(\"press backspace to return to menu\", 230, 490);\n}", "function render(){\n ctx.fillStyle = s_bg.color;\n ctx.fillRect(0,0,width, height);\n s_bg.draw(ctx,0,height - s_bg.height);\n s_bg.draw(ctx,s_bg.width,height - s_bg.height);\n \n if(currentstate !== states.Start && currentstate !==states.HighScore){\n pipe.draw(ctx);\n bird.draw(ctx);\n } \n s_fg.draw(ctx, fgpos, height - s_fg.height);\n s_fg.draw(ctx, fgpos + s_fg.width , height - s_fg.height);\n \n if(currentstate === states.Start){\n s_text.FlappyBird.draw(ctx, width/2 - s_text.GetReady.width/2 - 5, height/4 );\n s_buttons.Start.draw(ctx, startbtn.x,startbtn.y);\n s_buttons.Score.draw(ctx,scorebtn.x,scorebtn.y);\n saved= false; \n }\n if(currentstate === states.HighScore){\n drawHighScore(ctx);\n s_buttons.Menu.draw(ctx, menubtn.x, menubtn.y);\n s_buttons.Reset.draw(ctx, resetbtn.x, resetbtn.y);\n } \n else{ \n if(currentstate === states.Splash){\n s_splash.draw(ctx,width/2 - s_splash.width/2,height/3);\n s_text.GetReady.draw(ctx, width/2 - s_text.GetReady.width/2, height/4 );\n \n }\n if(currentstate === states.Score){ \n if(!saved){\n setDate();\n saveScore();\n saved = true;\n }\n s_text.GameOver.draw(ctx, width/2 - s_text.GameOver.width/2, height/4);\n s_score.draw(ctx, width/2 - s_score.width/2, height/3);\n s_buttons.Ok.draw(ctx, okbtn.x, okbtn.y);\n s_numberS.draw(ctx,width/2 - s_score.width/5,height/4 + s_score.height/1.3, score.value, null,10);\n s_numberS.draw(ctx,width/2 - s_score.width/5,height/4 + s_score.height*1.14, best, null,10);\n if(score.value === best){\n s_new.draw(ctx,width/2 + s_new.width/2,height/4 + s_score.height*0.985);\n }\n drawMedal(ctx); \n } \n if(currentstate === states.Game){\n s_numberB.draw(ctx,null, 20, score.value, width/2); \n } \n } \n}", "function renderScreen()\r\n{\r\n\t// draw canvas\r\n\tfor(var i = 0; i < worms.length; i++)\r\n\t{\r\n\t\tif(players[i] && worms[i].score > maxScore)\r\n\t\t{\r\n\t\t\trenderWorm(worms[i]);\r\n\t\t\t//maxScore = worms[i].score;\r\n\t\t}\r\n\t}\r\n}", "function updateScore() {\n document.getElementById(\"demo9\").innerHTML = \"Score: \" + score;\n }", "function displayHighScores() {\n\n gameover.visible = false;\n yourScore.visible = false;\n scoresTitle = game.add.text(game.width/2, game.height/2 - 150, 'HIGHSCORES', { font: \"70px Chalkduster\", fill: \"#ffffff\" });\n scoresTitle.anchor.setTo(0.5);\n\n hiScore1 = game.add.text(game.width/2, game.height/2 - 50, '1: ' + testScores[0], highScoreText);\n hiScore1.anchor.setTo(0.5);\n hiScore2 = game.add.text(game.width/2, game.height/2, '2: ' + testScores[1], highScoreText);\n hiScore2.anchor.setTo(0.5);\n hiScore3 = game.add.text(game.width/2, game.height/2 + 50, '3: ' + testScores[2], highScoreText);\n hiScore3.anchor.setTo(0.5);\n hiScore4 = game.add.text(game.width/2, game.height/2 + 100, '4: ' + testScores[3], highScoreText);\n hiScore4.anchor.setTo(0.5);\n hiScore5 = game.add.text(game.width/2, game.height/2 + 150, '5: ' + testScores[4], highScoreText);\n hiScore5.anchor.setTo(0.5);\n\n game.time.events.stop();\n\n\n}", "function displayScore() {\n // Create the score\n $('.score').append(`<b>${followers}</b><p>Followers</p>`);\n // Create the post counter\n $('.numPosts').append(`<b>${posts.length}</b><p>Posts</p>`);\n // Create the follower counter\n $('.following').append(`<b>644</b><p>Following</p>`);\n}", "function DrawScore(score) {\n image(numbers[floor(score % 10)], width / 2 - 12, 25);\n if (score > 9) image(numbers[floor((score / 10) % 10)], width / 2 - 37, 25);\n if (score > 99) image(numbers[floor((score / 100) % 10)], width / 2 - 62, 25);\n if (score > 999) image(numbers[floor((score / 1000) % 10)], width / 2 - 87, 25);\n if (score > 9999) image(numbers[floor((score / 10000) % 10)], width / 2 - 112, 25);\n}", "function score() {\r\n\t\tvar score = \"Score:\" + food.score;\r\n\t\tctx.fillStyle = \"#ccc\";\r\n\t\tctx.font = \"20px Lucida Console\";\r\n\t\tctx.fillText(score, d, d);\r\n\t}", "_draw_scores () {\n\n\t\tvar cw = this._deck_blue ['musician'].w\n\t\tvar ch = this._deck_blue ['musician'].h\n\t\tvar colors = [\"rgba(200, 0, 0, 0.6)\", \"rgba(0, 0, 200, 0.6)\"]\n\n\t\tvar font_height = ch/3\n\t\tcanvas.style.font = this.context.font;\n\t\tcanvas.style.fontSize = `${font_height}px`;\n\t\tthis.context.font = canvas.style.font;\n\t\tthis.context.textAlign = \"center\";\n\t\tthis.context.textBaseline = \"middle\"; \n\n\t\tfor (let i = 0; i < this._scores.length; i +=1) {\n\n\t\t\tvar [x0, y0] = this.get_slot_coo (i, 0)\n\t\t\tvar [x1, y1] = this.get_slot_coo (i, 1)\n\t\t\tif (this._scores [i] > 0) {\n\t\t\t\t\n\t\t\t\tthis.context.fillStyle = colors [this._swap_color]\n\t\t\t\tthis.context.fillRect (x0 - cw/2, y0-cw/4, cw, cw/2);\n\t\t\t\tthis.context.fillStyle = \"white\";\n\t\t\t\tthis.context.fillText (`+${this._scores [i]}`, x0, y0); \t\n\n\t\t\t\tthis.context.fillStyle = \"rgba(0, 0, 0, 0.4)\"\n\t\t\t\tthis.context.fillRect (x1 - cw/2, y1-ch/2, cw, ch);\n\t\t\t}\n\t\t\tif (this._scores [i] < 0) {\n\t\t\t\t\n\t\t\t\tthis.context.fillStyle = colors [1 - this._swap_color]\n\t\t\t\tthis.context.fillRect (x1 - cw/2, y1-cw/4, cw, cw/2);\n\t\t\t\tthis.context.fillStyle = \"white\";\n\t\t\t\tthis.context.fillText (`+${-this._scores [i]}`, x1, y1); \t\n\n\t\t\t\tthis.context.fillStyle = \"rgba(0, 0, 0, 0.4)\"\n\t\t\t\tthis.context.fillRect (x0 - cw/2, y0-ch/2, cw, ch);\n\t\t\t}\n\t\t}\n\t}", "function renderRecorePage() {\n endingSound.play();\n landingPage.style.display = \"none\";\n quizPage.style.display = \"none\";\n initialenterpage.style.display = \"none\";\n header.style.display = \"none\";\n finalPage.style.display = \"block\";\n record = JSON.parse(localStorage.getItem(\"data\"));\n record.sort(compare); // sort in decending order by score\n for (var i = 0; i < record.length; i++) {\n var currentScore = document.createElement(\"div\");\n if (i === 0) { //highest\n currentScore.textContent = \"🏅\" + (i + 1) + \". \" + record[i].initialName + \" - \" + record[i].score;\n currentScore.style.backgroundColor = \"gold\";\n } else if (i === 1) { //second highest\n currentScore.textContent = \"🥈\" + (i + 1) + \". \" + record[i].initialName + \" - \" + record[i].score;\n currentScore.style.backgroundColor = \"silver\";\n } else if (i === 2) { //third highest\n currentScore.textContent = \"🥉\" + (i + 1) + \". \" + record[i].initialName + \" - \" + record[i].score;\n currentScore.style.backgroundColor = \"#b87333\"; //copper\n } else {\n currentScore.textContent = (i + 1) + \". \" + record[i].initialName + \" - \" + record[i].score;\n currentScore.style.backgroundColor = \"green\";\n }\n scoreList.appendChild(currentScore);\n currentScore.style.marginBottom = \"10px\";\n }\n}" ]
[ "0.7573157", "0.7391558", "0.7367558", "0.73445344", "0.72942644", "0.7290855", "0.7253499", "0.7232288", "0.7207954", "0.72028106", "0.71698767", "0.71345186", "0.71263814", "0.71216327", "0.71057963", "0.70842415", "0.7072993", "0.7070774", "0.70565134", "0.7042944", "0.70037466", "0.6963366", "0.6962374", "0.6926358", "0.69235444", "0.6916425", "0.6913746", "0.68762183", "0.6876036", "0.68709385", "0.6851548", "0.68486476", "0.68416804", "0.6830709", "0.68094385", "0.6800777", "0.67896384", "0.6785795", "0.6775886", "0.6761687", "0.67587507", "0.6756026", "0.6743308", "0.67333126", "0.67199016", "0.6710007", "0.6707661", "0.67065436", "0.6706377", "0.66991156", "0.66938615", "0.6688886", "0.66804117", "0.6677466", "0.6669538", "0.66694266", "0.6667999", "0.6654848", "0.66529286", "0.6636502", "0.6635577", "0.6627263", "0.66252005", "0.6623614", "0.6608687", "0.66046137", "0.6604011", "0.66011256", "0.6594009", "0.6591532", "0.658009", "0.65796953", "0.65794474", "0.6576247", "0.65760726", "0.6574968", "0.65731066", "0.65728533", "0.65661615", "0.655702", "0.65496045", "0.65479183", "0.6546225", "0.6540266", "0.6536282", "0.65336305", "0.6531257", "0.6528582", "0.65246624", "0.6521531", "0.6519822", "0.65147626", "0.65130645", "0.6510803", "0.6506797", "0.65012836", "0.6498307", "0.64958507", "0.6493793", "0.6491255" ]
0.67100775
45
================================================================================ Prepares the view for displaying the results. ================================================================================
function prepareView() { //loadScript(); resultTap(1); drawCrater(-1);//-1 as nothing has been selected yet. /////////////// lang = getParameterByName("lang"); if (lang == "") lang = "English"; var param = getParameterByName("dist"); if (param == "" ) dist = 0; else dist = parseInt(param); param = getParameterByName("diam"); if (param == "") diam = 0; else diam = parseInt(param); param = getParameterByName("trag") if (param == "") traj = 90; else traj = parseInt(param); param = getParameterByName("velo"); if (param == "") velo = 0; else velo = parseInt(param); param = getParameterByName("pjd"); if (param == "") pjd = 0; else pjd= parseInt(param); param = getParameterByName("tjd") if (param == "") tgd = 0; else tgd = parseInt(param); //else tgDens++; param = getParameterByName("wlvl"); if (param == "") wlvl = 0; else wlvl = parseInt(param); /////////////// /* $.ajaxSetup({ cache: false }); $.ajax({ type: "GET", url: "lang/" + lang +".xml", dataType: "xml", success: parseXml }); */ var browserHeight = $(window).height(); if( browserHeight < 600) { document.getElementById('header').style.display = 'none' document.getElementById('footer').style.display = 'none'; } }//================================================================================
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initializeResults() {\n resultsContainer.empty();\n var restaurantsToAdd = [];\n for (var i = 0; i < restaurants.length; i++) {\n restaurantsToAdd.push(createResults(restaurants[i]));\n }\n resultsContainer.append(restaurantsToAdd);\n }", "function displayQueryResults() {\n\t\t\t$scope.resultsAvailable = true;\n\t\t\tresultsOffset = 0;\n\t\t\t$scope.getNextResultsPage();\n\n\t\t}", "function View() {\n // FIXME\n // Store base view elements\n\n // Store resuable view templates (result card, expanded profile cards, forms)\n\n // Render base view elements\n\n // Render\n}", "function renderResults(results) {\n\n}", "function renderView() {\n return require([contentViewUrl, topBarViewUrl, collectionUrl], function (contentView, topBarView, contentCollection) {\n var collection;\n\n App.filtersObject.filter = filter;\n\n collection = new contentCollection({\n viewType : 'list',\n page : page,\n reset : true,\n count : count,\n filter : filter,\n parrentContentId: parrentContentId,\n contentType : contentType,\n showMore : false\n });\n\n collection.bind('reset', _.bind(createViews, self));\n\n custom.setCurrentVT('list');\n\n function createViews() {\n var topbarView;\n var contentview;\n\n collection.unbind('reset');\n\n topbarView = new topBarView({\n actionType: 'Content',\n collection: collection\n });\n\n contentview = new contentView({\n collection: collection,\n startTime : startTime,\n filter : filter\n });\n\n eventsBinder.subscribeTopBarEvents(topbarView, contentview);\n eventsBinder.subscribeCollectionEvents(collection, contentview);\n\n collection.trigger('fetchFinished', {\n totalRecords: collection.totalRecords,\n currentPage : collection.currentPage,\n pageSize : collection.pageSize\n });\n\n context.changeView(contentview);\n context.changeTopBarView(topbarView);\n }\n });\n }", "function initData(){\n container.prepend(progressInfo);\n jQuery.get(getPageURL(0, resource)).done(function(data) {\n records = processData(data, true);\n initView(new recline.Model.Dataset({records:records}));\n numReq = getRequestNumber(data.result.total, pageSize);\n for (var i = 1; i <= numReq; i++) {\n requestData(getPageURL(i, resource));\n };\n });\n }", "start() {\n this.model.start(\"results\", [\"data\", \"value\", \"filter\"], { copy: 'none' }, this.normalizeResultsFn);\n }", "function renderResults(result) {\n\t\tif(result && result.searchHits && result.searchHits.length) {\t\n\t\t\tlistOfMyListItems = result.searchHits;\n\t\t\tdisplayMyList(result.searchHits);\n\t\t\tpagingControl.updatePaging(result);\n\t\t}\n\t}", "function initResults() {\n\tstoredPackageSubmit(); //bind add to trip button function\n\tinitPaging(); //paging\n\topenTaxesAndFeesToolTip(); //bind taxes and tools popup\n\tinitRightSideBasket();\n}", "initViews() {\n this.views = this.generateViews();\n this.prepareViewsModelsFields();\n }", "function setupPersonFullView() {\r\n populatePersonFullData();\r\n}", "view(headers, input) {\n const type = input.type;\n\n const viewConfig = this.searchConfig.views.types[type];\n const indexTypeConfig = viewConfig.indexType;\n\n const filter = this.filterPart(viewConfig, input);\n const postFilters = this.postFilters(viewConfig, input);\n\n const query = {\n sort: this.sortPart(viewConfig, input) || undefined,\n query: {\n bool: {filter}\n }\n };\n\n const finalResponse = {\n totalResults: 0,\n results: []\n };\n\n console.log('=======> View: ', JSON.stringify(indexTypeConfig));\n\n return this.esClient.allPages(indexTypeConfig.index, indexTypeConfig.type, query, 100,\n (response) => {\n if (response && response.hits && response.hits.hits) {\n const hits = response.hits.hits;\n if (hits) {\n _.forEach(hits, (hit) => {\n const doc = hit._source;\n if (!postFilters || _.every(postFilters, postFilter => postFilter(doc))) {\n finalResponse.totalResults++;\n finalResponse.results.push(doc);\n }\n });\n }\n }\n })\n .then(() => finalResponse);\n }", "function _showResults(response){\r\n\t\r\n\t\r\n\t$('#sql-query').text(response.data.qberesult.query);\r\n\tvar resultColumns = response.data.qberesult.values;\r\n\r\n\tif(resultColumns.length > 1){\r\n\t\tvar htmlString = '<table class=\"table table-bordered caption-bottom\"><thead><tr>';\r\n\t\tfor(var i in resultColumns[0]){\r\n\t\t\thtmlString += '<th>'+resultColumns[0][i] + '</th>';\r\n\t\t}\r\n\t\thtmlString += '</thead><tbody>';\r\n\t\tfor(i=1;i<resultColumns.length;i++){\r\n\t\t\thtmlString += '<tr>';\r\n\t\t\tfor(var j in resultColumns[i]){\r\n\t\t\t\thtmlString += '<td>' + resultColumns[i][j] + '</td>';\r\n\t\t\t}\r\n\t\t\thtmlString += '</tr>';\r\n\t\t}\r\n\t\thtmlString += '</tbody></table>';\r\n\t\t$('#results').html(htmlString);\r\n\t}\r\n\telse{\r\n\t\t$('#results').html(\"No results found.\");\r\n\t}\r\n\t\r\n\t\r\n\t$('#qbe-result').show();\r\n\t\r\n $('html, body').animate({\r\n scrollTop: $(\"#qbe-result\").offset().top\r\n }, 2000);\r\n\r\n\r\n}", "function search_results_ui(view) {\n\t\n\t// Presets\n\tvar $error = $('#error');\n\tif (jQuery.isEmptyObject(do_search.results) && $error.is(':hidden')) {};\n\tif ('undefined'==typeof(view)) view = $('#search_spreadsheet').find('.view-buttons').find('button[class*=\"btn-primary\"]').attr('id');\n\tif ('undefined'!=typeof($.fn.spreadsheet_view)) $.fn.spreadsheet_view.remove();\n\t// Sort results, but only if there's more than one archive being search\n\tif (do_search.total > 1) do_search.results = sort_rdfjson_by_prop(do_search.results, 'http://purl.org/dc/terms/title');\n\t// Set num results\n\t$('.num_results').html( $.map(do_search.results, function(n, i) { return i; }).length );\n\t// Pagination\n\t$('.page').css('visibility','hidden');\n\tif (do_search.page > 1) $('.prev-page').css('visibility','visible').find('.num').html(do_search.page-1);\n\t$('.next-page').css('visibility','visible').find('.num').html(do_search.page+1);\n\t// Load current view\n\tvar view_path = $('link#base_url').attr('href')+'application/views/templates/jquery.'+view+'.js';\n\t$.getScript(view_path, function() {\n\t\t$('#search_spreadsheet_content').attr('class',view+'_view').spreadsheet_view({rows:do_search.results,check:get_imported(),num_archives:do_search.total});\n\t});\t\n\t\n}", "function createHTMLLayout(data) {\n createSearch();\n personData = data.results;\n createGallery(data.results,'');\n}", "function displayResults(resJson) {\n // if there are previous results, remove them\n $(\"#starting-screen\").hide();\n $(\"#js-error-screen\").empty();\n // iterate through the items array\n\n let records = shuffleArray(resJson.records);\n let ages = {};\n let races = {};\n let genders = {};\n records.forEach((record) => {\n if (genders[record.fields.gender]) {\n genders[record.fields.gender]++;\n } else {\n genders[record.fields.gender] = 1;\n }\n if (races[record.fields.raceethnicity]) {\n races[record.fields.raceethnicity]++;\n } else {\n races[record.fields.raceethnicity] = 1;\n }\n const age = Math.floor(record.fields.computedmissingmaxage / 10) * 10;\n if (ages[age]) {\n ages[age]++;\n } else {\n ages[age] = 1;\n }\n });\n createAgeChart(ages);\n createRaceChart(races);\n createPieChart(genders);\n\n state.records = records;\n state.page = 0;\n if (records.length > 10) {\n records = records.slice(0, 10);\n }\n\n renderItems(records);\n\n // 7. display new search button\n // 8. Show CTA message to user\n $(\"#new-search-section\").append(\n `<section class=\"new-search-container\">\n <h2 class=\"message-footer title\">Want to search in a new location?</h2>\n <button class=\"new-search-btn\">Let's Go!</button>\n </section>`\n );\n //display the results section\n $(\".results-txt\").removeClass(\"hidden\").show();\n $(\".results-container\").removeClass(\"hidden\").show();\n $(\".results\").show();\n $(\"#new-search-section\").show();\n}", "function loadView() {\n\t\tvar srv1 = comc.request('cuen/list', $scope.cntx);\n\t\t\n\t\t$q.all([srv.stResp(true, srv1)]).then(function() {\n\t\t\tview();\n\t\t});\n\t}", "function loadView() {\n\t\tvar srv1 = comc.requestLiteList('HCONLTTIPO', $scope.cntx);\n\t\tvar srv2 = comc.requestLiteList('ANUALIDAD', $scope.cntx);\n\t\tvar srv3 = comc.requestLiteList('MES', $scope.cntx); \n\t\tvar srv4 = comc.request('cate/list', $scope.cntx);\n\t\tvar srv5 = comc.request('conc/full', $scope.cntx);\n\t\t\n\t\t$q.all([srv.stResp(true, srv1,srv2,srv3,srv4,srv5)]).then(function() {\n\t\t\tview();\n\t\t});\n\t}", "function DisplayResults(response, queryContents) { \n if (response != null) {\n // let's us know which nodes to show\n MasterViewModel.noteListViewModel.paginatedMerging(response, queryContents);\n LimitTextAreaMaxLength();\n }\n}", "function results() {\n\t//hide modal if the user just finished the survey\n\tlet active_modal = document.getElementById(\"modal\"+step);\n\tif(active_modal != null) active_modal.style.display = 'none';\n\t//generate the results\n\tdocument.body.innerHTML += results_html;\n\tlet table = getEl('results').getElementsByTagName('th');\n\ttable[0].innerHTML = 'Name';\n\ttable[1].innerHTML = name;\n\ttable[2].innerHTML = 'E-mail';\n\ttable[3].innerHTML = email;\n\ttable[4].innerHTML = 'Age';\n\ttable[5].innerHTML = age;\n\ttable[6].innerHTML = 'About me';\n\ttable[7].innerHTML = aboutme;\n\ttable[8].innerHTML = 'Address';\n\ttable[9].innerHTML = address;\n\ttable[10].innerHTML = 'Gender';\n\ttable[11].innerHTML = gender;\n\ttable[12].innerHTML = 'Favourite book';\n\ttable[13].innerHTML = favbook;\n\ttable[14].innerHTML = 'Favourite colours';\n\ttable[15].innerHTML = favcolors;\n}", "function renderBufferInit(bs){\n // Make new table and initialize with empty rows\n var $collection = $resultsArea.children('.collection' + resultCollections);\n $collection.append(\"<table><tbody></tbody></table>\");\n var table = $(\"#page-replace-visualizer tbody\").last();\n var data = \"\";\n for (var i = 0; i <= bs+2; i++){\n data += \"<tr></tr>\";\n }\n table.append(data);\n}", "function renderResults(){\n console.log(results)\n}", "function buildNoResultsView()\r\n\t{\r\n\t\tvar\t\trow;\r\n\t\tvar\t\tcell;\r\n\t\tvar\t\tinnerHTMLStr;\r\n\t\tvar\t\ttbl;\r\n\t\tvar\t\ttblBody;\r\n\t\tvar\t\tinnertbl;\r\n\t\tvar\t\tinnertblBody;\r\n\t\tvar\t\ttheDiv;\r\n\t\t\r\n\t\tvar\t\tcellCount = 0;\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\tif ( class_myRows != null && ( class_myRows.length > 0 || ( objFilter.length === 0 && filterValue.length === 0 ) ) )\r\n\t\t\t{\r\n\t\t\t\t// there is something to display return false to indicate this fucntion is not going to do something\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t// Turn of the multi select buttons\r\n\t\t\ttheDiv = document.getElementById('MultiDetailOperations2');\r\n\t\t\ttheBottomRow = document.getElementById(\"MultiOperationBar1RowBottom2\");\r\n\t\t\ttheMiniPager = document.getElementById('MiniPageTableCell2');\r\n\r\n\t\t\tif (theDiv != null)\r\n\t\t\t{\r\n\t\t\t\ttheDiv.style.display = 'none';\r\n\t\t\t}\r\n\t\t\tif (theBottomRow != null)\r\n\t\t\t{\r\n\t\t\t\ttheBottomRow.style.display = 'none';\r\n\t\t\t}\r\n\r\n\t\t\tif ( null !== theMiniPager )\r\n\t\t\t{\r\n\t\t\t\ttheMiniPager.style.display = 'none';\r\n\t\t\t}\r\n\r\n\t\t\t// Need to clear the paging footer as well\r\n\t\t\t// Try and get the reference to the table showing the details. If it exists then\r\n\t\t\t// remove the rows and if not then create a new one\r\n\t\t\ttbl = document.getElementById(\"BrowsePageRowPagingSectionCellTable2\");\r\n\t\t\tif ( null !== tbl )\r\n\t\t\t{\r\n\t\t\t\t// clear the rows of the existing table to recreate the rows\r\n\t\t\t\tvar x = tbl.rows.length;\r\n\r\n\t\t\t\tfor( i=0; i<x; i++ )\r\n\t\t\t\t{\r\n\t\t\t\t\ttbl.deleteRow(0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Try and get the reference to the table showing the details. If it exists then\r\n\t\t\t// remove the rows and if not then create a new one\r\n\t\t\ttbl = document.getElementById( \"browseViewCoreTable2\" );\r\n\t\t\tif ( null !== tbl )\r\n\t\t\t{\r\n\t\t\t\ttbl.parentNode.removeChild(tbl);\r\n\t\t\t}\r\n\r\n\t\t\t// Create the table for the data\r\n\t\t\ttbl = document.createElement(\"table\");\r\n\t\t\ttblBody = document.createElement(\"tbody\");\r\n\t\t\ttbl.className = \"browseTable updatedBrowse\";\r\n\t\t\ttbl.id = 'browseViewCoreTable2';\r\n\r\n\t\t\t// Draw the header row\r\n\t\t\trow = tbl.insertRow(tbl.rows.length);\r\n\r\n\t\t\t// add the cell for the checkmark\r\n\t\t\tcell = row.insertCell(cellCount++);\r\n\r\n\t\t\t// now create a new table for the suggestions on what to do next. It\r\n\t\t\t// will defined as three columns wide\r\n\t\t\tinnertbl = document.createElement(\"table\");\r\n\t\t\tinnertblBody = document.createElement(\"tbody\");\r\n\t\t\tinnertbl.appendChild( innertblBody );\r\n\t\t\tinnertbl.width = \"100%\";\r\n\t\t\tinnertbl.setAttribute(\"cellPadding\", \"10px\");\r\n\t\t\ttbl.setAttribute(\"cellSpacing\", \"10px\");\r\n\r\n\t\t\tcell.appendChild(innertbl);\r\n\r\n\t\t\t// insert a spacer row/cell\r\n\t\t\taddSuggestionRow( innertbl );\r\n\r\n\t\t\tif ( objFilter.length > 0 && filterValue.length > 0 )\r\n\t\t\t{\r\n\t\t\t\taddSuggestionRow( innertbl, String.formatLoc( 'No matches found for &ldquo;%1&rdquo; items and &ldquo;%2&rdquo;.', myTypes[objFilter], filterValue ) );\r\n\t\t\t\taddSuggestionRow( innertbl );\r\n\t\t\t\taddSuggestionRow( innertbl, String.formatLoc( 'Change the search criteria, or' ) );\r\n\t\t\t\taddSuggestionRow( innertbl );\r\n\r\n\t\t\t\tinnerHTMLStr = \"<a href='javascript:void(0)' onclick='javascript:browsesearch.clearFld(true);return false;'>\";\r\n\t\t\t\tinnerHTMLStr += String.formatLoc( \"Show only &ldquo;%1&rdquo; items\", myTypes[objFilter] );\r\n\t\t\t\tinnerHTMLStr += \"</a>\";\r\n\t\t\t\taddSuggestionRow( innertbl, null, innerHTMLStr );\r\n\r\n\t\t\t\taddSuggestionRow( innertbl );\r\n\t\t\t\tinnerHTMLStr = \"<a href='javascript:void(0)' onclick='javascript:ChangeBrowsePageObjectFilter( \\\"0\\\", \\\"\\\");return false;'>\";\r\n\t\t\t\tinnerHTMLStr += String.formatLoc( 'Show only items that match &ldquo;%1&rdquo;', filterValue );\r\n\t\t\t\tinnerHTMLStr += \"</a>\";\r\n\t\t\t\taddSuggestionRow( innertbl, null, innerHTMLStr );\r\n\r\n\t\t\t\taddSuggestionRow( innertbl );\r\n\r\n\t\t\t\tinnerHTMLStr = \"<a href='javascript:void(0)' onclick='javascript:browsesearch.clearFld(false);ChangeBrowsePageObjectFilter( \\\"0\\\", \\\"\\\");return false;'>\";\r\n\t\t\t\tinnerHTMLStr += String.formatLoc( 'Show all items' );\r\n\t\t\t\tinnerHTMLStr += \"</a>\";\r\n\t\t\t\taddSuggestionRow( innertbl, null, innerHTMLStr );\r\n\r\n\t\t\t\taddSuggestionRow( innertbl );\r\n\t\t\t}\r\n\t\t\telse if ( objFilter.length > 0 )\r\n\t\t\t{\r\n\t\t\t\taddSuggestionRow( innertbl, String.formatLoc( 'No matches found for &ldquo;%1&rdquo; items.', myTypes[objFilter] ) );\r\n\t\t\t\taddSuggestionRow( innertbl );\r\n\t\t\t\taddSuggestionRow( innertbl, String.formatLoc( 'Change the search criteria, or' ) );\r\n\t\t\t\taddSuggestionRow( innertbl );\r\n\t\t\t\tinnerHTMLStr = \"<A HREF='javascript:void(0)' ONCLICK='javascript:ChangeBrowsePageObjectFilter( \\\"0\\\", \\\"\\\");return false;'>\";\r\n\t\t\t\tinnerHTMLStr += String.formatLoc( 'Show all items' );\r\n\t\t\t\tinnerHTMLStr += \"</A>\";\r\n\t\t\t\taddSuggestionRow( innertbl, null, innerHTMLStr );\r\n\t\t\t\taddSuggestionRow( innertbl );\r\n\t\t\t}\r\n\t\t\telse if ( filterValue.length > 0 )\r\n\t\t\t{\r\n\t\t\t\taddSuggestionRow( innertbl, String.formatLoc( 'No matches found for &ldquo;%1&rdquo;.', filterValue ) );\r\n\t\t\t\taddSuggestionRow( innertbl );\r\n\t\t\t\taddSuggestionRow( innertbl, String.formatLoc( 'Change the search criteria, or' ) );\r\n\t\t\t\taddSuggestionRow( innertbl );\r\n\r\n\t\t\t\tinnerHTMLStr = \"<A HREF='javascript:void(0)' ONCLICK='javascript:browsesearch.clearFld(true);return false;'>\";\r\n\t\t\t\tinnerHTMLStr += String.formatLoc( 'Show all items' );\r\n\t\t\t\tinnerHTMLStr += \"</A>\";\r\n\t\t\t\taddSuggestionRow( innertbl, null, innerHTMLStr );\r\n\t\t\t\taddSuggestionRow( innertbl );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (document.getElementById(\"browseCoreDiv2\") != null)\r\n\t\t\t{\r\n\t\t\t\tdocument.getElementById(\"browseCoreDiv2\").appendChild(tbl);\r\n\t\t\t}\r\n\t\t\telse if ($(\".browseNoItems\").length > 0)\r\n\t\t\t{\r\n\t\t\t\t$(\".browseNoItems\")[0].innerHTML = String.formatLoc( 'There are no items to display.' );\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(e)\r\n\t\t{\r\n\t\t\texceptionAlert( e, \"Issue occured in classbrowse.js/buildNoResultsView. An issue has occured in creating the no results information.\" );\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}", "function populateResults(data)\n{\n if (data.length === 0) {\n return;\n }\n\n var template = $(\"#results-template\").html(),\n target = $(\"#results-container\");\n\n var formatResults = Handlebars.compile(template);\n var formattedResults = formatResults(data);\n\n target.html(\"\").append(formattedResults);\n\n}", "function createView(doc) {\r\n var allResults = document.querySelector(\".allResults\");\r\n let li = document.createElement(\"li\");\r\n let date = document.createElement(\"span\");\r\n let weight = document.createElement(\"span\");\r\n\r\n date.textContent = doc.data().date.toDate().toLocaleDateString(\"en-GB\", dateOptions) + \": \";\r\n weight.textContent = doc.data().weight;\r\n\r\n li.appendChild(date)\r\n li.appendChild(weight)\r\n allResults.appendChild(li);\r\n}", "function RESULTSGRID_buildoneupview(item) {\n //Draw the ONEUP header\n this.drawHeader(item);\n\n //Draw the time grid and day headers\n this.drawGrid();\n\n //Draw the elements on the screen\n this.drawEvents(item.eventsList);\n\n //Set the size of the ONEUPGRID_itinerary\n document.getElementById(\"ONEUPGRID_itinerary\").style.height = (window.innerHeight - 75).toString() + \"px\";\n document.getElementById(\"ONEUPGRID_itinerary\").style.paddingTop = \"80px\";\n }", "get results() {\n return (\n this.data\n // get a copy of the data for this view (.sort() modifies arrays in place)\n .slice()\n\n // sort alphabetically\n .sort((a, b) => (this.sortAsc ? a.title.localeCompare(b.title) : b.title.localeCompare(a.title)))\n\n // filter by query match\n .filter((item) => (this.query ? matches(this.query, item.title) : true))\n\n // filter by filters state\n .filter((item) =>\n Object.entries(this.filtersState).every(([key, filter]) =>\n Object.entries(item).every(([prop, value]) => {\n if (key === prop && filter) {\n return filter === value\n }\n\n return true\n })\n )\n )\n )\n }", "requestView(){\t\t\n\t\tthis.trigger('requestView');\n\t}", "function fetchResults() {\n // Backbone fetch for more results from API\n Alloy.Collections.entry.fetch({\n urlparams: {\n \"numResults\":10,\n \"page\":pager.page()\n },\n\n add: true, // Don't reset the collection, but add to it (in theory to prevent setItems and use appendItems...?)\n\n silent: true, // Don't trigger an \"add\" event for every model, but just one \"fetch\" (prevent multiple binding events)\n\n success : function(e) {\n //Ti.API.log(JSON.stringify(e));\n\n // init setMarker of ListView for lazy loading of more entries\n var markerVal = pager.page() * 10 -1; // always 1 less than length of list\n $.lvEntries.setMarker({sectionIndex:0, itemIndex: markerVal });\n\n // Move on pager for next API call\n pager.next();\n\n }, error : function() {\n alert('error');\n }\n });\n}", "initView () {\n // check if model run exists and run entity microdata is included in model run results\n if (!this.initRunEntity()) return // exit on error\n\n this.isPages = this.runEntity.RowCount > SMALL_PAGE_SIZE // disable pages for small microdata\n this.pageStart = 0\n this.pageSize = this.isPages ? SMALL_PAGE_SIZE : 0\n\n this.isNullable = true // entity always nullabale, value can be NULL\n this.isScalar = false // microdata never scalar, it always has at least one attribute\n\n // adjust controls\n this.pvc.rowColMode = !this.isScalar ? Pcvt.SPANS_AND_DIMS_PVT : Pcvt.NO_SPANS_NO_DIMS_PVT\n this.ctrl.isRowColModeToggle = !this.isScalar\n this.ctrl.isRowColControls = !this.isScalar\n this.pvKeyPos = []\n\n // default pivot table options\n let lc = this.uiLang || this.$q.lang.getLocale() || ''\n if (lc) {\n try {\n const cla = Intl.getCanonicalLocales(lc)\n lc = cla?.[0] || ''\n } catch (e) {\n lc = ''\n console.warn('Error: undefined canonical locale:', e)\n }\n }\n this.pvc.formatter = Pcvt.formatDefault({ isNullable: this.isNullable, locale: lc })\n this.pvc.cellClass = 'pv-cell-right' // numeric cell value style by default\n this.ctrl.formatOpts = void 0\n\n this.pvc.processValue = Pcvt.asIsPval // no value conversion required, only formatting\n\n // make dimensions:\n // [0] entity key dimension\n // [1, rank - 1] enum-based dimensions\n // [rank] measure attributes dimension: list of non-enum based attributes, e.g. int, double,... attributes\n this.attrCount = 0\n this.rank = 0\n this.dimProp = []\n\n // entity key dimension at [0] position: initially empty\n const fk = {\n name: KEY_DIM_NAME,\n label: (Mdf.descrOfDescrNote(this.entityText) || this.$t('Entity')) + ' ' + this.$t('keys'),\n enums: [],\n selection: [],\n singleSelection: {},\n filter: (val, update, abort) => {}\n }\n this.dimProp.push(fk)\n\n // measure attributes dimension\n const fa = {\n name: ATTR_DIM_NAME,\n label: Mdf.descrOfDescrNote(this.entityText) || this.$t('Attribute'),\n enums: [],\n options: [],\n selection: [],\n singleSelection: {},\n filter: (val, update, abort) => {}\n }\n const aEnums = []\n const aFmt = {} // formatters for built-in attributes\n let nPos = 0 // attribute position in microdata row\n\n for (const ea of this.entityText.EntityAttrTxt) {\n if (!Mdf.isNotEmptyEntityAttr(ea)) continue\n if (this.runEntity.Attr.findIndex(name => ea.Attr.Name === name) < 0) continue // skip: this attribute is not included in run microdata\n\n // find attribute type text\n const tTxt = Mdf.typeTextById(this.theModel, ea.Attr.TypeId)\n\n if (!Mdf.isBuiltIn(tTxt.Type)) { // enum based attribute: use it as dimension\n const f = {\n name: ea.Attr.Name || '',\n label: Mdf.descrOfDescrNote(ea) || ea.Attr.Name || '',\n enums: [],\n options: [],\n selection: [],\n singleSelection: {},\n filter: (val, update, abort) => {},\n attrPos: nPos++\n }\n\n const eLst = Array(tTxt.TypeEnumTxt.length)\n for (let j = 0; j < tTxt.TypeEnumTxt.length; j++) {\n const eId = tTxt.TypeEnumTxt[j].Enum.EnumId\n eLst[j] = {\n value: eId,\n name: tTxt.TypeEnumTxt[j].Enum.Name || eId.toString(),\n label: Mdf.enumDescrOrCodeById(tTxt, eId) || tTxt.TypeEnumTxt[j].Enum.Name || eId.toString()\n }\n }\n f.enums = Object.freeze(eLst)\n f.options = f.enums\n f.filter = Puih.makeFilter(f)\n\n this.dimProp.push(f)\n } else { // built-in attribute type: add to attributes measure dimension\n const aId = ea.Attr.AttrId\n\n aEnums.push({\n value: aId,\n name: ea.Attr.Name || aId.toString(),\n label: Mdf.descrOfDescrNote(ea) || ea.Attr.Name || '' || aId.toString(),\n attrPos: nPos++\n })\n\n // setup process value and format value handlers:\n // if parameter type is one of built-in then process and format value as float, int, boolen or string\n if (Mdf.isFloat(tTxt.Type)) {\n // this.pvc.processValue = Pcvt.asFloatPval\n aFmt[aId] = Pcvt.formatFloat({ isNullable: this.isNullable, locale: lc, isAllDecimal: true }) // show all deciamls for the float value\n this.pvc.cellClass = 'pv-cell-right' // numeric cell value style by default\n }\n if (Mdf.isInt(tTxt.Type)) {\n // this.pvc.processValue = Pcvt.asIntPval\n aFmt[aId] = Pcvt.formatInt({ isNullable: this.isNullable, locale: lc })\n this.pvc.cellClass = 'pv-cell-right' // numeric cell value style by default\n }\n if (Mdf.isBool(tTxt.Type)) {\n // this.pvc.processValue = Pcvt.asBoolPval\n aFmt[aId] = Pcvt.formatBool({})\n this.pvc.cellClass = 'pv-cell-center'\n }\n if (Mdf.isString(tTxt.Type)) {\n // this.pvc.processValue = Pcvt.asIsPval\n aFmt[aId] = Pcvt.formatDefault({ isNullable: this.isNullable, locale: lc })\n this.pvc.cellClass = 'pv-cell-left' // no process or format value required for string type\n }\n }\n }\n this.rank = this.dimProp.length\n this.attrCount = aEnums.length\n\n // if there are any attributes of built-in type then\n // append measure dimension to dimension list at [rank] position\n if (this.attrCount > 0) {\n fa.enums = Object.freeze(aEnums)\n fa.options = fa.enums\n fa.filter = Puih.makeFilter(fa)\n\n this.dimProp.push(fa) // measure attributes dimension at [rank] position\n }\n\n // setup formatter\n this.pvc.formatter = Pcvt.formatByKey({\n isNullable: this.isNullable,\n isByKey: true,\n isRawUse: true,\n isRawValue: false,\n locale: lc,\n formatter: aFmt\n })\n this.ctrl.formatOpts = this.pvc.formatter.options()\n this.pvc.dimItemKeys = Pcvt.dimItemKeys(ATTR_DIM_NAME)\n this.pvc.cellClass = 'pv-cell-right' // numeric cell value style by default\n this.pvc.processValue = Pcvt.asIsPval // no value conversion required, only formatting\n\n // read microdata rows, each row is { Key: integer, Attr:[{IsNull: false, Value: 19},...] }\n // array of attributes:\n // dimensions are enum-based attributes\n // meausre dimension values are values of built-in types attributes\n this.pvc.reader = (src) => {\n // no data to read: if source rows are empty or invalid return undefined reader\n if (!src || (src?.length || 0) <= 0) return void 0\n\n // entity key dimension is at [0] position\n // attribute id's: [1, rank - 1] enum based dimensions\n let dimPos = []\n if (this.rank > 1) {\n dimPos = Array(this.rank - 1)\n\n for (let k = 1; k < this.rank; k++) {\n dimPos[k - 1] = this.dimProp[k].attrPos\n }\n }\n\n // measure dimension at [rank] position: attribute id's are enum values of measure dimension\n const mIds = Array(this.attrCount)\n const attrPos = Array(this.attrCount)\n\n if (this.attrCount > 0) {\n let n = 0\n for (const e of this.dimProp[this.rank].enums) {\n mIds[n] = e.value\n attrPos[n++] = e.attrPos\n }\n }\n\n const srcLen = src.length\n let nSrc = 0\n let nAttr = -1 // after first read row must be nAttr = 0\n\n const rd = { // reader to return\n readRow: () => {\n nAttr++\n if (nAttr >= this.attrCount) {\n nAttr = 0\n nSrc++\n }\n return (nSrc < srcLen) ? (src[nSrc] || void 0) : void 0 // microdata row: key and array of enum-based attributes as dimensions and buit-in types attributes as values\n },\n readDim: {},\n readValue: (r) => {\n const a = r?.Attr || void 0\n const v = (a && !a[attrPos[nAttr]].IsNull) ? a[attrPos[nAttr]].Value : void 0 // measure value: built-in type attribute value\n return v\n }\n }\n\n // read entity key dimension\n rd.readDim[KEY_DIM_NAME] = (r) => r?.Key\n\n // read dimension item value: enum id for enum-based attributes\n for (let n = 1; n < this.rank; n++) {\n rd.readDim[this.dimProp[n].name] = (r) => {\n const a = r?.Attr || void 0\n const cv = (a && dimPos[n - 1] < a.length) ? a[dimPos[n - 1]] : void 0\n return (cv && !cv.IsNull) ? cv.Value : void 0\n }\n }\n\n // read measure dimension: attribute id\n rd.readDim[ATTR_DIM_NAME] = (r) => (nAttr < mIds.length ? mIds[nAttr] : void 0)\n\n return rd\n }\n }", "function View() {\n }", "function handleViewResultsButtonClicked() {\n $('.page').on('click', '.view-results', function (event) {\n event.preventDefault();\n STORE.view = 'results';\n STORE.button = { class: 'start-over', label: 'Start Over' };\n STORE.currentQuestion = null;\n STORE.userChoice = null;\n renderPage();\n });\n}", "function displayResults(data) {\n // Add to the table here...\n}", "function displayResults(data) {\n console.log('Results that will be displayed in HTML looks like this first:', data);\n $('#results').append(resultsHTML(data));\n }", "function render() {\n res.render('socList', {\n title: 'Sentinel Project: SOC Manager',\n socs: socs,\n datapoints: resultsDatapoints\n });\n }", "function showResult() {\n $('main').html(resultTemplate());\n}", "function onShowSearchResultPanel() {\n mediator.getView('searchResult');\n }", "function initViewData() {\n loadDataChart();\n displayLogIn();\n}", "function challenges_view(res) {\n //Building preferences view with the database information\n var sql_select = \"SELECT * FROM challenge\";\n con.query(sql_select, function(err, result_challenges) {\n if (err) throw err;\n console.log(result_challenges);\n res.render(\"challenges\", { challenges: result_challenges });\n });\n}", "function fillOutResults(row_num) {\n\t\tvar row = row_num;\n\t\tvar col = 0;\n\t\t\n\t\tvar currentResult = qResults.results[row];\n\t\t$(\"#resultsTable\").find(\"td\").each(function() {\n\t\t\tif(row < qResults.results.length){\n\t\t\t\tif(col === 0){\n\t\t\t\t\t$(this).html((row+1) + \"\");\n\t\t\t\t\tcol+=1;\n\t\t\t\t}\t\t\t\n\t\t\t\telse if(col === 1) {\n\t\t\t\t\t$(this).html(currentResult.title);\n\t\t\t\t\tcol++;\n\t\t\t\t}\n\t\t\t\telse if(col === 2) {\n\t\t\t\t\t$(this).html(currentResult.vote_average);\n\t\t\t\t\tcol++\n\t\t\t\t}\n\t\t\t\telse if(col === 3) {\n\t\t\t\t\tvar over = currentResult.overview;\n\t\t\t\t\tif(over === \"\"){\n\t\t\t\t\t\tover = \"N/A\";\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t\t$(this).html(over);\n\t\t\t\t\tcol++;\n\t\t\t\t}\n\t\t\t\telse if(col == 4){\n\t\t\t\t\t$(this).html(currentResult.release_date);\n\t\t\t\t\tcol++;\n\t\t\t\t}\n\t\t\t\telse if(col ==5){\n\t\t\t\t\tcol = 0;\n\t\t\t\t\trow += 1;\n\t\t\t\t\t$(this).text(\"?\")\n\t\t\t\t\tif(qResults.results.length > row){\n\t\t\t\t\t\tcurrentResult = qResults.results[row];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}); \n\t\t$Container.show();\n\t}", "function displayResults() {\n\n $('.btn').focus();\n $('#top-result').fadeIn();\n $('.container__outside--output').fadeIn();\n $('#map').html('<img src=' + mapUrl + '>');\n $('#result').text(venue.name);\n $('#location').text(venue.address);\n $('#url').html('<a href=\"' + venue.url + '\" target=\"_blank\">Vist website</a>');\n $('#category').html('<img src=\"' + venue.icon + '64.png\">');\n \n }", "function materializeViewResults(tView, lView, tQuery, queryIndex) {\n const lQuery = lView[QUERIES].queries[queryIndex];\n if (lQuery.matches === null) {\n const tViewData = tView.data;\n const tQueryMatches = tQuery.matches;\n const result = [];\n for (let i = 0; i < tQueryMatches.length; i += 2) {\n const matchedNodeIdx = tQueryMatches[i];\n if (matchedNodeIdx < 0) {\n // we at the <ng-template> marker which might have results in views created based on this\n // <ng-template> - those results will be in separate views though, so here we just leave\n // null as a placeholder\n result.push(null);\n }\n else {\n ngDevMode && assertIndexInRange(tViewData, matchedNodeIdx);\n const tNode = tViewData[matchedNodeIdx];\n result.push(createResultForNode(lView, tNode, tQueryMatches[i + 1], tQuery.metadata.read));\n }\n }\n lQuery.matches = result;\n }\n return lQuery.matches;\n}", "function materializeViewResults(tView, lView, tQuery, queryIndex) {\n const lQuery = lView[QUERIES].queries[queryIndex];\n if (lQuery.matches === null) {\n const tViewData = tView.data;\n const tQueryMatches = tQuery.matches;\n const result = [];\n for (let i = 0; i < tQueryMatches.length; i += 2) {\n const matchedNodeIdx = tQueryMatches[i];\n if (matchedNodeIdx < 0) {\n // we at the <ng-template> marker which might have results in views created based on this\n // <ng-template> - those results will be in separate views though, so here we just leave\n // null as a placeholder\n result.push(null);\n }\n else {\n ngDevMode && assertIndexInRange(tViewData, matchedNodeIdx);\n const tNode = tViewData[matchedNodeIdx];\n result.push(createResultForNode(lView, tNode, tQueryMatches[i + 1], tQuery.metadata.read));\n }\n }\n lQuery.matches = result;\n }\n return lQuery.matches;\n}", "function materializeViewResults(tView, lView, tQuery, queryIndex) {\n const lQuery = lView[QUERIES].queries[queryIndex];\n if (lQuery.matches === null) {\n const tViewData = tView.data;\n const tQueryMatches = tQuery.matches;\n const result = [];\n for (let i = 0; i < tQueryMatches.length; i += 2) {\n const matchedNodeIdx = tQueryMatches[i];\n if (matchedNodeIdx < 0) {\n // we at the <ng-template> marker which might have results in views created based on this\n // <ng-template> - those results will be in separate views though, so here we just leave\n // null as a placeholder\n result.push(null);\n }\n else {\n ngDevMode && assertIndexInRange(tViewData, matchedNodeIdx);\n const tNode = tViewData[matchedNodeIdx];\n result.push(createResultForNode(lView, tNode, tQueryMatches[i + 1], tQuery.metadata.read));\n }\n }\n lQuery.matches = result;\n }\n return lQuery.matches;\n}", "function materializeViewResults(tView, lView, tQuery, queryIndex) {\n const lQuery = lView[QUERIES].queries[queryIndex];\n if (lQuery.matches === null) {\n const tViewData = tView.data;\n const tQueryMatches = tQuery.matches;\n const result = [];\n for (let i = 0; i < tQueryMatches.length; i += 2) {\n const matchedNodeIdx = tQueryMatches[i];\n if (matchedNodeIdx < 0) {\n // we at the <ng-template> marker which might have results in views created based on this\n // <ng-template> - those results will be in separate views though, so here we just leave\n // null as a placeholder\n result.push(null);\n }\n else {\n ngDevMode && assertIndexInRange(tViewData, matchedNodeIdx);\n const tNode = tViewData[matchedNodeIdx];\n result.push(createResultForNode(lView, tNode, tQueryMatches[i + 1], tQuery.metadata.read));\n }\n }\n lQuery.matches = result;\n }\n return lQuery.matches;\n}", "function materializeViewResults(tView, lView, tQuery, queryIndex) {\n const lQuery = lView[QUERIES].queries[queryIndex];\n if (lQuery.matches === null) {\n const tViewData = tView.data;\n const tQueryMatches = tQuery.matches;\n const result = [];\n for (let i = 0; i < tQueryMatches.length; i += 2) {\n const matchedNodeIdx = tQueryMatches[i];\n if (matchedNodeIdx < 0) {\n // we at the <ng-template> marker which might have results in views created based on this\n // <ng-template> - those results will be in separate views though, so here we just leave\n // null as a placeholder\n result.push(null);\n }\n else {\n ngDevMode && assertIndexInRange(tViewData, matchedNodeIdx);\n const tNode = tViewData[matchedNodeIdx];\n result.push(createResultForNode(lView, tNode, tQueryMatches[i + 1], tQuery.metadata.read));\n }\n }\n lQuery.matches = result;\n }\n return lQuery.matches;\n}", "function materializeViewResults(tView, lView, tQuery, queryIndex) {\n const lQuery = lView[QUERIES].queries[queryIndex];\n if (lQuery.matches === null) {\n const tViewData = tView.data;\n const tQueryMatches = tQuery.matches;\n const result = [];\n for (let i = 0; i < tQueryMatches.length; i += 2) {\n const matchedNodeIdx = tQueryMatches[i];\n if (matchedNodeIdx < 0) {\n // we at the <ng-template> marker which might have results in views created based on this\n // <ng-template> - those results will be in separate views though, so here we just leave\n // null as a placeholder\n result.push(null);\n }\n else {\n ngDevMode && assertIndexInRange(tViewData, matchedNodeIdx);\n const tNode = tViewData[matchedNodeIdx];\n result.push(createResultForNode(lView, tNode, tQueryMatches[i + 1], tQuery.metadata.read));\n }\n }\n lQuery.matches = result;\n }\n return lQuery.matches;\n}", "function updateResultsListing() {\n\n var listingText,\n allItems = yearDimension.top(Infinity),\n makeSceneLink = function (scene) {\n if (scene !== '[Non-panorama history]')\n return '<a target=\"_blank\" href=\"' + \n SCENE_URL_BASE + scene + '\">' + scene + \n '</a>';\n else return scene;\n };\n\n // Update results count\n\n $('#active').text(allItems.length);\n\n // List entries in results box\n\n $('#resource-list').empty();\n\n yearDimension.top(INIT_LISTING_COUNT).forEach(function (item) {\n listingText = '<p>' +\n '<strong>' +\n '<a href=\"' + RESOURCE_URL_BASE + item.URLID + '\" target=\"_BLANK\">' + \n item.short_title + '</a>' +\n '</strong>' +\n ' (' + item.year.getFullYear() + ')<br />' +\n (item.author ? item.author + '<br />' : '') +\n 'Scenes: ' + item.scene.map(makeSceneLink).join(', ') +\n '</p>';\n $('#resource-list').append(listingText); \n }); \n }", "function loadView() {\n\t\tvar srv1 = comc.requestLiteList('ANUALIDAD', $scope.cntx);\n\t\tvar srv2 = comc.requestLiteList('MES', $scope.cntx); \n\t\tvar srv3 = comc.requestLiteList('PRESESTA', $scope.cntx);\n\t\tvar srv4 = comc.request('cate/list', $scope.cntx);\n\t\tvar srv5 = comc.request('conc/full', $scope.cntx);\n\t\t\n\t\t$q.all([srv.stResp(true, srv1,srv2,srv3,srv4,srv5)]).then(function() {\n\t\t\tvar srv6 = comc.requestParaGet('I', 'PERIPRESUP', '', $scope.cntx);\n\t\t\t\n\t\t\t$q.all([srv.stResp(false, srv6)]).then(function() {\n\t\t\t\tif ($scope.cntx.data.get('prPeripresup').pval.anac !== 'undefined' &&\n\t\t\t\t\t$scope.cntx.data.get('prPeripresup').pval.anac > 0) {\n\t\t\t\t\tif ($scope.cntx.form.get('anua').data === 0) {\n\t\t\t\t\t\t$scope.cntx.form.get('anua').data = $scope.cntx.data.get('prPeripresup').pval.anac;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tvar srv7 = comc.request('pres/anua', $scope.cntx);\n\t\t\t\t\n\t\t\t\t$q.all([srv.stResp(true, srv7)]).then(function() {\n\t\t\t\t\tview();\n\t\t\t\t\tpresAnuaChart();\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t}", "function renderResults(){\n resultsContent.innerHTML = '';\n viewResultsButton.innerHTML = '';\n for(let i =0; i < allItems.length; i++){\n let p = document.createElement('p');\n p.textContent = `${allItems[i].name} : ${allItems[i].clicked} / ${allItems[i].viewed}`;\n viewResultsButton.appendChild(p);\n }\n}", "function buildTableFromResults(results){\n results.forEach(function(result){\n var tableRow = buildTableRow(result)\n $('#search-results-table tr:last').after(tableRow)\n })\n}", "function renderResult(results){\n listHead.innerHTML=\"\";\n if(results.length>0)\n results.forEach(displayResult);\n else{\n let listItem = document.createElement('p');\n listItem.innerHTML = 'No Result Found';\n listHead.appendChild(listItem);\n }\n }", "function View() {\n var self = this;\n this.currentDate = new Date();\n this.currentReport = {\n needToPickupList: [],\n absenceList: [],\n pickedUpList: []\n };\n }", "function postShowQueryResultsPreview(data, textStatus, jqXHR, param) {\n\tvar totalRows = data[0]['id'];\n\tshowQueryResultsTable(param.predUrl, param.limit, totalRows, param.offset);\n}", "function buildResultsView(missingResults = false) {\n const bars = STORE.brewResults;\n $('.resultsList').html('');\n $('.map').html('');\n let resultView = [];\n for (let i = 0; i < bars.length; i++) {\n resultView.push(`\n <li class=\"barCardItem\" id=List${i + 1}>\n <div class=\"orderNumber\">${i + 1}\n </div>\n <div class=\"barContainer\">\n <h3 class=\"barTitle barLink\">\n <a href=\"${bars[i].website_url}\" class=\"barName\" target=\"_blank\">${bars[i].name}</a>\n </h3>\n <p class=\"barAddress\">${bars[i].street}</p>\n <p class=\"barAddress\">${bars[i].city}, ${bars[i].state}, ${bars[i].postal_code}</p>\n <p class=\"barPhone\">${bars[i].phone}</p>\n <button type=\"button\" id=\"removeButton\" class=\"removeButton\">X</button>\n </li>`);\n }\n if (missingResults) {\n // TODO - fade this out after timeout\n $('.resultsList').html(`<div class=\"alert\">\n Some results were removed due to missing location information.\n </div>\n ${resultView.join('')}`);\n }\n else {\n $('.resultsList').html(resultView.join(''));\n }\n removeBar();\n let mapCenter = [STORE.brewResults[0].longitude, STORE.brewResults[0].latitude];\n STORE.map;\n STORE.addNav();\n STORE.nav = true;\n STORE.recenter(mapCenter);\n let initialBars = [];\n STORE.brewResults.forEach(bar => {\n initialBars.push([bar.longitude, bar.latitude, bar.name]);\n });\n STORE.addMarker(initialBars);\n}", "function materializeViewResults(tView, lView, tQuery, queryIndex) {\n var lQuery = lView[QUERIES].queries[queryIndex];\n\n if (lQuery.matches === null) {\n var tViewData = tView.data;\n var tQueryMatches = tQuery.matches;\n var result = [];\n\n for (var i = 0; i < tQueryMatches.length; i += 2) {\n var matchedNodeIdx = tQueryMatches[i];\n\n if (matchedNodeIdx < 0) {\n // we at the <ng-template> marker which might have results in views created based on this\n // <ng-template> - those results will be in separate views though, so here we just leave\n // null as a placeholder\n result.push(null);\n } else {\n ngDevMode && assertIndexInRange(tViewData, matchedNodeIdx);\n var tNode = tViewData[matchedNodeIdx];\n result.push(createResultForNode(lView, tNode, tQueryMatches[i + 1], tQuery.metadata.read));\n }\n }\n\n lQuery.matches = result;\n }\n\n return lQuery.matches;\n}", "renderContents() {\n // columns shown, hidden or reordered\n this.init();\n }", "renderContents() {\n // columns shown, hidden or reordered\n this.init();\n }", "function materializeViewResults(tView, lView, tQuery, queryIndex) {\n var lQuery = lView[QUERIES].queries[queryIndex];\n\n if (lQuery.matches === null) {\n var tViewData = tView.data;\n var tQueryMatches = tQuery.matches;\n var result = [];\n\n for (var i = 0; i < tQueryMatches.length; i += 2) {\n var matchedNodeIdx = tQueryMatches[i];\n\n if (matchedNodeIdx < 0) {\n // we at the <ng-template> marker which might have results in views created based on this\n // <ng-template> - those results will be in separate views though, so here we just leave\n // null as a placeholder\n result.push(null);\n } else {\n ngDevMode && assertIndexInRange(tViewData, matchedNodeIdx);\n var tNode = tViewData[matchedNodeIdx];\n result.push(createResultForNode(lView, tNode, tQueryMatches[i + 1], tQuery.metadata.read));\n }\n }\n\n lQuery.matches = result;\n }\n\n return lQuery.matches;\n }", "function _drawResults() {\n let songs = store.State.songs;\n console.log(songs);\n let template = \"\";\n songs.forEach(song => (template += song.Template));\n document.getElementById(\"search-results\").innerHTML = template;\n}", "initialise_view(user) {\n this.refresh_view(user);\n }", "handleResponse(results) {\n // load the bootstrap table div\n if (this.table === null) {\n this.setTable();\n }\n this.table = $('#searchtable');\n // Get new columns\n let cols = results.columns;\n cols = [];\n results.columns.forEach((name, index)=>{\n let colmap = {};\n colmap.field = name;\n colmap.title = name;\n colmap.sortable = true;\n cols.push(colmap);\n });\n\n // Load new options\n this.table.bootstrapTable('refreshOptions', {'columns': cols, 'totalRows': results.total});\n\n return results;\n }", "function renderResultsPage(results) {\r\n console.log(results);\r\n\t\r\n var resultsContainer = $('#container');\r\n\tvar did_you_mean = '';\r\n\t\r\n\tif(results.did_you_mean != null)\r\n\t{\r\n\t\tif(results.did_you_mean.length > 0)\r\n\t\t{\t\r\n\t\t\tfor(i=0;i<results.did_you_mean.length;i++) {\r\n\t\t\t if (i != 0) {\r\n\t\t\t did_you_mean += ', ';\r\n }\r\n\r\n\t\t\t did_you_mean += '<a href=\"#brm-search?request_type=search&search_type=keyword&q=' + results.did_you_mean[i] + '&l=' + results.did_you_mean[i] + '\">' + results.did_you_mean[i] + '</a>';\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n // remove previous results\r\n $('#filter_category').html('');\r\n $('#filter_brand').html('');\r\n $('#product_list').html('');\r\n $('#filter_size').html('');\r\n $('#filter_price').html('');\r\n $('#filter_colorGroup').html('');\r\n $('#filter_current').html('');\r\n $('#pagination_top').html('');\r\n $('#pagination_bottom').html('');\r\n $('#sort_options').html('');\r\n\t$('#m_recommendation').html('');\r\n\t\r\n\t/* did you mean */\r\n\tif (did_you_mean != '') {\r\n\t renderRecommendation(did_you_mean);\r\n\t $('#m_recommendation').css('display', 'block');\r\n\t}\r\n\telse {\r\n\t $('#m_recommendation').css('display', 'none');\r\n\t}\r\n\t\r\n if (results.numResults == 0) {\r\n $('#contents_left').css('display', 'none');\r\n $('#contents_right').css('display', 'none');\r\n $('#contents_center').css('display', 'none');\r\n\r\n var typedText = '';\r\n typedText = window.location.hash.match(/&q=([^&]+)/)[1].replace(/%20/g, \" \");\r\n //alert(BR.mobile.getJfyUrl(\"jfy,dynamic_categories\"));\r\n location.href = 'NoResult.aspx?searchTerm=' + typedText + BR.mobile.getJfyUrl(\"jfy,dynamic_categories\");\r\n //location.href = 'NoResult.aspx?searchTerm=' + typedText + '#brm-search?request_type=jfy';\r\n }\r\n else {\r\n $('#contents_left').css('display', 'block');\r\n $('#contents_right').css('display', 'block');\r\n $('#contents_center').css('display', 'none');\r\n\r\n /* Filters */\r\n var filtersContainer = $('#filter_category');\r\n\r\n renderFilters(results.availableFilters, results.currentFilters, filtersContainer);\r\n\r\n setPagination(results.numResults, results.startIndex);\r\n // console.log(filtersContainer);\r\n\t\t\r\n /* Sorting */\r\n renderSort(results.availableSorts, results.currentSort);\r\n\r\n /* Products */\r\n var contents_rightContainer = $('#product_list');\r\n var productGrid = $('<div></div>', { class: 'productgridpage' });\r\n contents_rightContainer.append($('<div></div>', { class: 'productgrid mw-three-up' }).append(productGrid));\r\n renderProducts(results.products, productGrid, results.brTrkData);\r\n\r\n brmSearchContainer.trigger('brm-rendered');\r\n }\r\n\r\n}", "function displayUserResults() {\n state.userResults.forEach(function (item) {\n let htmlItem = $('.js-userResult.templ').clone();\n htmlItem.find('.js-name-title').append(`${item.firstName} ${item.lastName}`);\n htmlItem.find('.js-name').attr('uid', item._id);\n htmlItem.find('.js-name').attr('firstName', item.firstName);\n htmlItem.find('.js-username').append(`(${item.username})`);\n if (item.watchlist.length === 1) {\n htmlItem.find('.js-listCount').append(`${item.watchlist.length} item in their Watchlist.`);\n } else {\n htmlItem.find('.js-listCount').append(`${item.watchlist.length} items in their Watchlist.`);\n }\n htmlItem.removeClass('templ');\n $('.js-userResults-list').append(htmlItem);\n $('.js-userResults').removeClass('hidden');\n $('.js-userResults').show();\n });\n $('.js-noUsers').addClass('hidden');\n $('.js-watchlist').hide();\n $('.js-watchlist-results').html('');\n $('.results').hide();\n $('.js-results-container').html('');\n $('.js-returnButton').removeClass('hidden');\n $('.js-welcome').addClass('hidden');\n}", "setInitialPageView () {\n // all dimensions on rows, entity key dimension is at last row, measure dimension on columns\n const rf = []\n const cf = []\n const tf = []\n\n // rows: rank dimensions\n for (let nDim = 1; nDim < this.rank; nDim++) {\n rf.push(this.dimProp[nDim])\n }\n if (this.dimProp.length > 0) rf.push(this.dimProp[0]) // entity key dimension at rows on last position\n\n // columns: measure attribute dimension, it is at [rank] position in dimensions array\n if (this.dimProp.length > this.rank) cf.push(this.dimProp[this.rank])\n\n // for rows and columns select all items\n for (const f of cf) {\n f.selection = Array.from(f.enums)\n f.singleSelection = (f.selection.length > 0) ? f.selection[0] : {}\n }\n for (const f of rf) {\n f.selection = Array.from(f.enums)\n f.singleSelection = (f.selection.length > 0) ? f.selection[0] : {}\n }\n // other dimensions are empty by default\n this.rowFields = rf\n this.colFields = cf\n this.otherFields = tf\n\n // default row-column mode: row-column headers without spans\n // as it is today microdata cannot be scalar, always has at least one attribute\n this.pvc.rowColMode = !this.isScalar ? Pcvt.SPANS_AND_DIMS_PVT : Pcvt.NO_SPANS_NO_DIMS_PVT\n\n // store pivot view\n const vs = Pcvt.pivotStateFromFields(this.rowFields, this.colFields, this.otherFields, this.ctrl.isRowColControls, this.pvc.rowColMode, KEY_DIM_NAME)\n vs.pageStart = 0\n vs.pageSize = this.isPages ? this.pageSize : SMALL_PAGE_SIZE\n\n this.dispatchMicrodataView({\n key: this.routeKey,\n view: vs,\n digest: this.digest || '',\n modelName: Mdf.modelName(this.theModel),\n runDigest: this.runDigest || '',\n entityName: this.entityName || ''\n })\n\n // refresh pivot view: both dimensions labels and table body\n this.ctrl.isPvDimsTickle = !this.ctrl.isPvDimsTickle\n this.ctrl.isPvTickle = !this.ctrl.isPvTickle\n }", "function populateView(gridView) {\n for (let i = 0; json.content.length > i; i++) {\n if (loadedDecks.includes(json.content[i].vaultId)) {\n // load thumbnail or list-item depending on user selection\n const html = gridView ? thumbnailTemplate({ entry: json.content[i] }) : listItemTemplate({ entry: json.content[i] });\n gridView? $('.content').append(html) : $('ul.mdl-list').append(html);\n $('label#category, li#category').each(function () {\n // compare loaded slide against the json data\n const decks = $(this).data('content');\n if (decks.includes(json.content[i].vaultId)) {\n $(this).show();\n if ($(this).prop('tagName') === 'LI') {\n $(this).parents('.category-content').siblings('label').show();\n }\n }\n });\n }\n }\n }", "async show({ params, request, response, view }) {}", "function buildTemplates(filteredResults){\n\n var numberOfResults;\n // Setup my template\n if(filteredResults){\n numberOfResults = filteredResults.length;\n } else {\n numberOfResults = lastResults.count;\n }\n\n var searchTerm = lastResults[\"params\"].keywords;\n\n var activeSortFilterTerm = lastResults[\"params\"].sort_on;\n activeSortFilterTerm = activeSortFilterTerm.charAt(0).toUpperCase() + activeSortFilterTerm.slice(1);\n var sortOrder = lastResults[\"params\"].sort_order;\n\n if(activeSortFilterTerm == \"Price\") {\n if(sortOrder == \"down\") {\n activeSortFilterTerm = \"Price (Highest First)\";\n } else {\n activeSortFilterTerm = \"Price (Lowest First)\";\n }\n } else if(activeSortFilterTerm == \"Created\") {\n activeSortFilterTerm = \"Date (Newest First)\";\n } else if(activeSortFilterTerm == \"Score\") {\n activeSortFilterTerm = \"Relevance\";\n }\n\n var searchHeaderSource = $(\"#search-header-template\").html();\n var searchHeaderTemplate = handlebars.compile(searchHeaderSource);\n var searchHeaderRenderedTemplate = searchHeaderTemplate(\n {\n \"activeSortFilterTerm\": activeSortFilterTerm,\n \"numberOfResults\": numberOfResults,\n \"searchTerm\": searchTerm}\n );\n\n $('.search-area').html(searchHeaderRenderedTemplate);\n $('.price-sorter-high').click(priceHighButtonHandler);\n $('.price-sorter-low').click(priceLowButtonHandler);\n $('.date-sorter').click(dateButtonHandler);\n $('.relevance-sorter').click(relevanceButtonHandler);\n\n var resultsArray;\n\n if(filteredResults){\n resultsArray = filteredResults;\n } else {\n resultsArray = lastResults[\"results\"];\n }\n\n var searchImagesSource = $(\"#search-images-template\").html();\n var searchImagesTemplate = handlebars.compile(searchImagesSource);\n var searchImagesRenderedTemplate = searchImagesTemplate({\"results\": resultsArray});\n\n $('.search-area').append(searchImagesRenderedTemplate);\n\n }", "function render() {\n //empty existing posts from view\n $nationalparks.empty();\n\n //pass 'allParks' into template function\n var parksHtml = getAllNationalparksHtml(allParks);\n\n //append html to view\n $nationalparks.append(parksHtml);\n}", "function showResultsPage(data) {\n state = 1;\n locations = [];\n errorMessage = '';\n\n // if search was by term, stores it in recent searches\n if (searchTerm !== '') {\n rss.store({\n term: searchTerm,\n results: data.results \n });\n }\n\n // prepare next page data\n app.template7Data['page:results'] = ps.getLastQueryResults();\n app.template7Data['page:results'].loadMore = {\n label: 'Load more ...',\n canLoad: app.template7Data['page:results'].page < app.template7Data['page:results'].pages\n };\n\n app.hidePreloader();\n\n window.mainView.router.loadPage('pages/results/results.html');\n }", "async patientsView (ctx) {\n console.log('CONTROLLER HIT: PatientView::patientsView');\n return new Promise ((resolve, reject) => {\n const query = 'SELECT * FROM patient_view';\n\n chpConnection.query(query, (err, res) => {\n if (err){\n reject(`Error querying CHP.patient_view: ${err}`);\n }\n\n ctx.body = res;\n ctx.status = 200;\n\n resolve();\n\n });\n }).catch(err => {\n ctx.status = 500;\n ctx.body = err;\n });\n }", "function renderInitialResult(results) {\n const result = results[0]\n // provides a result if the user enters something that isn't a book or author, or if the API doesn't have that particular book in the system\n if (!results) {\n $(\".bookSuggest\").addClass(\"hidden\");\n $('.book-results').html(\"\");\n $(\".book-results\").append(\"Your entry wasn\\'t found! Please make a new search and try again.\");\n } else {\n\n // provides a recommendation to the user for a book or series\n $('.book-results').html(\"\");\n $(\".book-results\").append(`<h3>${result.Name}</h3>`);\n $(\".book-results\").append(`<p class=\"suggestion\">${result.wTeaser}</p>` + '<br>');\n $(\".book-results\").append(\"<a class=\\\"bookLink\\\" href=\\\"\" + `${result.wUrl}` + \"\\\" target=\\\"_blank\\\">Click here to learn more!</a>\");\n tryAnotherBook(results);\n}\n}", "function refreshResults() {\n\tif (_dataSource) {\n\t\t_pager.page(0);\n\t\t_dataSource.fetch(function(){\n\t\t // if callback is needed, place it here\n\t\t});\n\t}\t\n}", "async index({ request, response, view }) {\n \t\tconst kajians = await Kajian.all()\n\n \t\treturn view.render('kajian.index', { kajians: kajians.rows })\n\t}", "function _drawResults() {\n let template = ''\n let results = store.State.songs\n results.forEach(song => template += song.Template)\n document.querySelector(\"#songs\").innerHTML = template\n}", "function loadResults(){\n //console.log(\"loadQuantity\");\n var $results = $('.' + _results);\n for(var i = 0; i < $results.length; i++){\n var $result = $($results[i]);\n var datas = $result.data();\n if (!datas[_resController]\n || !datas[_resTempHeader]\n || !datas[_resTempHeaderId]\n || !datas[_resTempItem]\n || !datas[_resTempItemId]\n || !datas[_resTempPagination]\n || !datas[_resTempPaginationId]) {\n throw Error(\"Resuts \" + _results + \" do not define datas correctly\");\n }\n\n var ctxt = {\n \"_resTempHeaderId\": _resTempHeaderId,\n \"_resTempItemId\": _resTempItemId,\n \"_resTempPaginationId\": _resTempPaginationId\n };\n var jCookie = getJCookie(_cookieName);\n var jResources = jCookie[_jResources];\n if (jResources) {\n var ids = Object.keys(jResources).join(\"|\");\n ctxt[\"ids\"] = ids;\n $.get(datas[_resController], ctxt)\n .done(function(data){\n $('#' + ctxt[_resTempHeaderId]).empty().append(data);\n $('#' + ctxt[_resTempItemId]).append(data);\n $('#' + ctxt[_resTempPaginationId]).empty().append(data);\n })\n .fail(function(err){\n console.error(\"loading resources\", ctxt, err);\n })\n }\n }\n }", "function showResults()\n{\n\n\tvar perviousTitle = '',\n\tresultsToShow = getSortedResults(), \n\tunits = localStorage[BG_UNITS_LOCAL_STORAGE];\n\t\n\tresetList();\n\t\n\tfor(i in resultsToShow)\n\t{\n\t\tvar title = resultsToShow[i].groupingdate;\n\t\t\n\t\tif(perviousTitle != title)\n\t\t{\n\t\t\tvar seperator = '<li class=\"sep\">'+title+'</li>';\n\t\t\tvar seperatorItem = $(seperator);\n\t\t\t$('#resultslist').append(seperatorItem);\n\t\t\tperviousTitle = title;\n\t\t}\n\t\t\n\t\tvar result = '<li class=\"arrow\"><a href=\"#edit\" id=\"result\">'+resultsToShow[i].sugar+' '+units+'<small>'+resultsToShow[i].displaytime +'</small></a></li>';\n\t\tvar resultItem = $(result);\n\t\tresultItem.bind('click',{IdForResult:resultsToShow[i].id},showResultForEditing);\n\t\t\n\t\t$('#resultslist').append(resultItem);\n\t\t\n\t}\n}", "function ResultsController($scope, matchmedia, ChallengeService, Utils, ConfigService, resolvedChallengeResults, resolvedCurrentChallenge) {\n var vm = this;\n vm.results = resolvedChallengeResults.content;\n vm.totalCount = resolvedChallengeResults.metadata.totalCount;\n vm.challenge = resolvedCurrentChallenge;\n vm.tcChallengeDetailsUrl = tcChallengeDetailsUrl;\n vm.tcMemberProfileUrl = tcMemberProfileUrl;\n vm.download = download;\n\n //user-agent stuff\n vm.browser = Utils.getBrowser();\n vm.phone = matchmedia.isPhone();\n\n activate();\n\n function activate() {\n //TODO(DG: 10/15/2014): replace w/ ng-grid\n //table stuff\n var headers = [\n {\n \"colName\": \"Place\",\n \"col\": \"scorecard.place\"\n },\n {\n \"colName\": \"Prize\",\n \"col\": \"scorecard.prize\"\n },\n {\n \"colName\": \"Submitter\",\n \"col\": \"submitterId\"\n },\n {\n \"colName\": \"Score\",\n \"col\": \"scorecard.scoreSum\"\n }\n ];\n\n var sort = {'scorecard.place': 'asc'};\n Utils.handleTable(vm, $scope, headers, vm.results, vm.totalCount, sort);\n }\n\n //helper functions\n function tcChallengeDetailsUrl(challenge) {\n return ConfigService.getBaseChallengeDetailsUrl() + challenge.id + '?type=develop&lc=true';\n }\n\n function tcMemberProfileUrl(memberHandle) {\n return ConfigService.getBaseMemberProfileUrl() + memberHandle;\n }\n\n function download(fileDownloadUrl) {\n ChallengeService.getSignedUrl(fileDownloadUrl).then(function(url) {\n window.location = url;\n })\n }\n\n }", "function output_table(res,results) {\n\tres.render('query.jade',\n\t\t { results: results }\n\t );\n}", "function displayResult(results) {\n $(\"#songs\").html(\"\");\n\n for (i = 0 ; i < 20 && i < results.length ; i++) {\n $(\"#songs\").append(composeSongHTML(results[i], currIndex++));\n }\n bindEvents();\n}", "function displayResults (data) {\n displayList(data);\n initMap(data);\n unhideHtml();\n}", "function renderResults(data){\n var resultsDiv = document.getElementById('results');\n for(var i = 0; i < data.streams.length; i++){\n //build a result row\n var oneResult = document.createElement('div'),\n imgContainer = buildimage(data, i),\n textContainer = buildText(data, i);\n\n oneResult.setAttribute(\"class\", \"row one-result\");\n oneResult.appendChild(imgContainer);\n oneResult.appendChild(textContainer);\n resultsDiv.appendChild(oneResult);\n }\n}", "render(){\n presenter.getStructuredData()\n .then((structuredData) => {\n // console.log(structuredData);\n return this.createTable(structuredData);\n })\n .then((tables) => {\n $('main').append(tables);\n });\n //Link mainToggle switches to tables\n presenter.linkMainToggleSwitchToTables();\n //Link Individual switches to table\n presenter.listenForIndividualSwitchEvents();\n }", "buildTop() {\n this.rootEl_.prepend(buildResultsTopTemplate(this.element));\n }", "function View(){}", "function createResultsPanel(permalinkProvider) {\n metadataResultsView = new GeoNetwork.MetadataResultsView({\n catalogue: catalogue,\n displaySerieMembers: true,\n autoScroll: true,\n tpl: GeoNetwork.Templates.FULL,\n featurecolor: GeoNetwork.Settings.results.featurecolor,\n colormap: GeoNetwork.Settings.results.colormap,\n featurecolorCSS: GeoNetwork.Settings.results.featurecolorCSS\n });\n \n catalogue.resultsView = metadataResultsView;\n \n tBar = new GeoNetwork.MetadataResultsToolbar({\n catalogue: catalogue,\n searchFormCmp: Ext.getCmp('searchForm'),\n sortByCmp: Ext.getCmp('E_sortBy'),\n metadataResultsView: metadataResultsView,\n permalinkProvider: permalinkProvider,\n withPaging: true,\n searchCb: search\n });\n \n \n var resultPanel = new Ext.Panel({\n id: 'resultsPanel',\n border: false,\n hidden: true,\n bodyCssClass: 'md-view',\n autoWidth: true,\n layout: 'fit',\n tbar: tBar,\n items: metadataResultsView\n });\n return resultPanel;\n }", "function initResultList(resultObjects, lastQuery) {\n hideProgressFromSideBar();\n var topicIdsToShow = new Array();\n jQuery(\"#sideBarCategories\").empty();\n jQuery(\"#sideBarCategories\").append('&nbsp;<b class=\\\"redTitle\\\">' + resultObjects.length + '</b> ');\n jQuery(\"#sideBarCategories\").append('Suchergebnisse f&uuml;r <b class=\\\"redTitle\\\">\\\"' + lastQuery + '\\\"</b><p/>');\n jQuery(\"#sideBarCategories\").append('<table width=\"100%\" cellpadding=\"2\" cellspacing=\"0\" ' +\n 'id=\"sideBarCategoriesTable\"></table>');\n for (var i=0; i < resultObjects.length; i++) {\n var resultBaseTopic = resultObjects[i];\n if (resultBaseTopic.lat == 0.0 || resultBaseTopic.long == 0.0) {\n if (debug) log('..initResultList - skipping ' + resultBaseTopic.name );\n } else {\n jQuery(\"#sideBarCategoriesTable\").append('<tr id=\"topicRow-'+resultBaseTopic.id+'\" width=\"100%\" '\n + ' class=\"topicRowDeselected\"><td width=\"20px\" valign=\"center\" align=\"center\"><b>'+(i+1)+'. </b></td>'\n + '<td valign=\"center\"><a href=\"#\" id=\"topicRowHref-'+resultBaseTopic.id+'\">' + resultBaseTopic.name + '</a><br/><small>'\n + resultBaseTopic.lat + ', ' + resultBaseTopic.long + '</small></td></tr>');\n jQuery(\"#topicRow-\"+resultBaseTopic.id).attr('onclick', 'javascript:showTopicInMap(\"' + resultBaseTopic.id + '\");');\n jQuery(\"#topicRowHref-\"+resultBaseTopic.id).attr('href', 'javascript:showTopicInMap(\"' + resultBaseTopic.id + '\");');\n topicIdsToShow.push(resultBaseTopic.id);\n }\n }\n // showTopicsInMap(resultObjects);\n showTopicFeatures(topicIdsToShow, \"\");\n }", "function constructResultsTemplate() {\n\treturn new Promise ( (resolve, reject) => {\n\t queryResponse = JSON.parse(localStorage.getItem(\"queryResponse\"));\n\t\tlet numberNeeded = queryResponse.result.officials.length;\n\t\tlet template = document.querySelector(\".contentCard\");\n\t\tlet contentWrapper = document.querySelector(\".contentWrapper\");\n\t\tlet templateArray = [];\n\n\t\tfor (var i = 0; i <= (numberNeeded - 2); i++) {\n\t\t\ttemplateArray[i] = template.cloneNode(true);\n\t\t\tcontentWrapper.appendChild(templateArray[i]);\n\t\t}\n\n\t\tif (templateArray.length > 1) {\n resolve(queryResponse);\n\t\t} else {\n\t\t\treject(\"Oops! Something went wrong!\");\n\t\t}\n\t});\n}", "function querySucceeded(data) {\n vm.cities(data.results);\n vm.show(true); // show the view\n }", "function initialDisplay() {\n \tcountLinks();\n \tgetDropDowns();\n \tgetList(\"id\");\n }", "function renderView() {\n const questionArray = generateQuestions();\n generateQuiz(questionArray, 0);\n}", "function renderResults(recName, recSource, recYeild, recTime, recImage, recURL, recIngs, index) {\n var resultBlock = document.createElement('div');\n resultBlock.setAttribute('class','columns');\n resultsContainer.appendChild(resultBlock);\n\n var resultCol = document.createElement('div');\n resultCol.setAttribute('class', 'column');\n resultBlock.appendChild(resultCol);\n\n var resultHeader = document.createElement('article');\n resultHeader.setAttribute('class', 'message is-success');\n resultCol.appendChild(resultHeader);\n\n var resultHeaderText = document.createElement('div');\n resultHeaderText.setAttribute('class', 'message-header');\n resultHeaderText.textContent = recName;\n resultHeader.appendChild(resultHeaderText);\n\n var resultBody = document.createElement('div');\n resultBody.setAttribute('class', 'message-body');\n resultHeader.appendChild(resultBody);\n\n var resultBodyRow = document.createElement('div');\n resultBodyRow.setAttribute('class', 'columns');\n resultBody.appendChild(resultBodyRow);\n\n // begin image column\n var imageColumn = document.createElement('div');\n imageColumn.setAttribute('class', 'column is-one-quarter image-column');\n resultBodyRow.appendChild(imageColumn);\n\n var imageContainer = document.createElement('figure');\n imageContainer.setAttribute('class', 'image is-128x128 is-full-width');\n imageColumn.appendChild(imageContainer);\n\n var imageActual = document.createElement('img');\n imageActual.setAttribute('src', recImage);\n imageContainer.appendChild(imageActual);\n // end image block\n // begin list block\n \n var listColumn = document.createElement('div');\n listColumn.setAttribute('class', 'column is-half');\n resultBodyRow.appendChild(listColumn);\n\n var listEl = document.createElement('ul');\n listColumn.appendChild(listEl);\n //cook time\n var cookTimeEl = document.createElement('li')\n listEl.appendChild(cookTimeEl);\n var cookTimeStrong = document.createElement('strong');\n cookTimeStrong.textContent = 'Cook Time: '\n cookTimeEl.appendChild(cookTimeStrong);\n \n var cookTimeText = document.createElement('p');\n cookTimeText.textContent = 'approximately ' + recTime + ' minutes';\n cookTimeEl.appendChild(cookTimeText);\n // yeild\n var yieldEl = document.createElement('li')\n listEl.appendChild(yieldEl);\n var yieldStrong = document.createElement('strong');\n yieldStrong.textContent = 'Number of Servings: ';\n yieldEl.appendChild(yieldStrong);\n \n var yieldText = document.createElement('p');\n yieldText.textContent = 'about ' + recYeild;\n yieldEl.appendChild(yieldText);\n //source\n var sourceEl = document.createElement('li')\n listEl.appendChild(sourceEl);\n var sourceStrong = document.createElement('strong');\n sourceStrong.textContent = 'Source: ';\n sourceEl.appendChild(sourceStrong);\n \n var sourceText = document.createElement('p');\n sourceText.textContent = recSource;\n sourceEl.appendChild(sourceText);\n\n //end list block\n\n // begin button block\n\n var buttonEl = document.createElement('div');\n buttonEl.setAttribute('class', 'column is-one-quarter');\n resultBodyRow.appendChild(buttonEl);\n\n var buttonRow = document.createElement('div');\n buttonRow.setAttribute('class', 'columns is-multiline');\n buttonEl.appendChild(buttonRow);\n\n //link button block\n var buttonCol1 = document.createElement('div');\n buttonCol1.setAttribute('class', ' column is-full');\n buttonRow.appendChild(buttonCol1);\n\n var linkButton = document.createElement('button');\n linkButton.setAttribute('class', 'button is-success');\n linkButton.textContent = 'Go to recipe';\n linkButton.addEventListener('click', function(){\n window.open(recURL)\n });\n buttonCol1.appendChild(linkButton);\n // add recipe button block\n var buttonCol2 = document.createElement('div');\n buttonCol2.setAttribute('class', ' column is-full');\n buttonRow.appendChild(buttonCol2);\n\n var addButton = document.createElement('button');\n addButton.setAttribute('class', 'button is-success');\n addButton.textContent = 'Add to recipe book';\n addButton.addEventListener('click', addRecipe);\n buttonCol2.appendChild(addButton);\n\n //end button block\n \n function addRecipe() {\n var savedRecipes = JSON.parse(localStorage.getItem('saved-recipes'));\n if (savedRecipes !== null) {\n recipeList = savedRecipes;\n console.log(recipeList);\n }\n\n var recipeInfo = {\n 'recipeLabel': recName,\n 'recipeSource': recSource,\n 'recipeYield': recYeild,\n 'recipeTime': recTime,\n 'recipeImage': recImage,\n 'recipeIngredients': recIngs,\n 'recipeUrl': recURL\n }\n recipeList.push(recipeInfo);\n localStorage.setItem('saved-recipes', JSON.stringify(recipeList));\n console.log(recName + ' added to recipe list');\n console.log(recipeList);\n }\n}", "function loadView() {\t\t\n\t\tvar srv1 = comc.requestLiteList('MENUPERF', $scope.cntx);\n\t\tvar srv2 = comc.requestLiteList('BOOL' , $scope.cntx);\n\t\t\n\t\t$q.all([srv.stResp(false, srv1)]).then(function(){\n\t\t\t$scope.cntx.form.get('perf').data = $scope.cntx.data.get('ltLMenuperf')[0].clav;\n\t\t\tvar srv3 = comc.request('ctmn/list', $scope.cntx);\n\t\t\t\n\t\t\t$q.all([srv.stResp(true, srv3)]).then(function(){\n\t\t\t\tview();\n\t\t\t});\n\t\t});\n\t}", "function initialize(results) {\n var licenses = getHighscores(results, \"license\", 5);\n var authors = getHighscores(results, \"author\", 7);\n var tags = getHighscores(results, \"tags\", 20);\n var category = getHighscores(results, \"category\", 20);\n var formats = getHighscores(results, \"formats\", 7);\n var activity = getTimestamps(results);\n var newest5 = findNewest(results);\n\n makeChart(getHighscores(results, \"author\", 7));\n makeDonut(category);\n makeTagCloud(getHighscores(results, \"tags\", 20));\n makeActivity(getTimestamps(results));\n last30Days(results);\n //Fill HTML\n document.getElementById(\"totalDatasets\").innerHTML = getTotalNumber(results);\n document.getElementById(\"last30\").innerHTML =\n \"+\" + getTotalNumber(last30Days(results));\n\n for (var i = 0; i < 5; i++) {\n document.getElementById(\"newest\" + i).innerHTML =\n \"<span>\" +\n newest5[i].title +\n \"</span>\" +\n \"<a class='dl-arrow right cross-link' href='\" +\n newest5[i].url +\n \"' target='_blank'><div></div></a><br />\";\n }\n}", "function prepareToShow() {}", "async function setupAndStart() {\n showLoadingView();\n $(\"table\").empty();\n categories = [];\n await fillTable();\n hideLoadingView()\n}", "function viewProducts() {\n var query = \"SELECT * from products\";\n connection.query(query, function (error, results) {\n if (error) throw error;\n\n //Print updated table everytime initialized\n console.table(results)\n\n //Return to main screen\n initialize()\n })\n}", "function renderEntriesForLessons(tx,results){\n console.log(\"Rendering entries for lessons.\");\n if (results.rows.length == 0) {\n $(\"#lessonsList\").html(\"<p>レッスンはまだないです。</p>\");\n } else {\n var s = \"<table id='lessons'><tr>\";\n console.log(\"Number of lessons = \" + results.rows.length);\n for(var i=0; i<results.rows.length; i++) {\n //console.log(\"resuts:\" + results.rows.item(i).name);\n s = s + \"<div id ='lesson\"+ i +\"'>\"+\n \"<li>\" +\n \"<img height='100' width='100' src='\" + results.rows.item(i).exercise_image + \"' ><br>\" +\n \"<p>\" +\n \"<a href='#lesson?id=\" + results.rows.item(i).lesson_id + \"'>レッスン \" + results.rows.item(i).lesson_id + \"</a>\" +\n \"</p>\" +\n \"</li>\" +\n \"</div>\";\n }\n s += \"</tr></table>\";\n $(\"#lessonsList\").html(s);\n $(\"#lessonsList\").listview().listview(\"refresh\");\n }\n}", "function renderResults(res) {\n $(\"#results-area\").empty();\n for (var i = 0; i < res.matches.length; i++) {\n var matches = res.matches[i];\n\n var div = $(\"<div>\");\n div.addClass(\"result\");\n\n var ul = $(\"<ul>\");\n ul.attr(\"recipe-id\", matches.id);\n\n var liImage = $(\"<li>\");\n var image = $(\"<img>\");\n image.attr(\"src\", matches.smallImageUrls);\n liImage.append(image);\n\n var liName = $(\"<li>\");\n liName.text(\"Name: \" + matches.recipeName);\n\n var liRating = $(\"<li>\");\n liRating.text(\"Rating: \" + matches.rating);\n\n var liTime = $(\"<li>\");\n liTime.text(\"Preparation Time: \" + matches.totalTimeInSeconds + \" minutes.\");\n\n ul.append(liImage, liName, liRating, liTime);\n div.append(ul);\n $(\"#results-area\").append(div);\n }\n}", "function _drawResults() { \n let template=\"\"\n ProxyState.songs.forEach(s => template += s.allMusicTemplate)\n document.getElementById('songs').innerHTML = template\n}" ]
[ "0.6344768", "0.6292762", "0.5986847", "0.59257215", "0.59213674", "0.5910389", "0.58190703", "0.5777775", "0.57730466", "0.57617235", "0.5760622", "0.57475954", "0.56855047", "0.56663126", "0.5661669", "0.56513184", "0.5636928", "0.56290144", "0.5624522", "0.56067926", "0.5592103", "0.5585745", "0.5578605", "0.5569626", "0.55578226", "0.55508274", "0.5526111", "0.55018723", "0.5481318", "0.54755616", "0.54639804", "0.5461771", "0.5460515", "0.54578626", "0.54553634", "0.5452068", "0.5445843", "0.54453206", "0.5436502", "0.5419182", "0.5419116", "0.53898656", "0.53898656", "0.53898656", "0.53898656", "0.53898656", "0.53898656", "0.5373326", "0.53733194", "0.5369949", "0.53677964", "0.5355859", "0.53429973", "0.53418875", "0.53412384", "0.5338538", "0.5333216", "0.5333216", "0.53302896", "0.53298086", "0.5325428", "0.5324735", "0.5321404", "0.5318029", "0.53168046", "0.5316758", "0.5315599", "0.5315084", "0.5314347", "0.53087926", "0.53080887", "0.5307598", "0.53070813", "0.5306942", "0.53040224", "0.52993387", "0.52948", "0.52918947", "0.5284631", "0.52818877", "0.5280595", "0.5280085", "0.5271075", "0.52680564", "0.52655643", "0.52611595", "0.5260408", "0.5256553", "0.52487236", "0.5247161", "0.5245268", "0.523816", "0.5232623", "0.52290463", "0.5226391", "0.5224103", "0.5223541", "0.52219784", "0.5221631", "0.52177656" ]
0.60822725
2
Normalizes the tile URL so that tiles repeat across the x axis (horizontally) like the standard Google map tiles.
function getHorizontallyRepeatingTileUrl(coord, zoom, urlfunc) { var y = coord.y; var x = coord.x; // tile range in one direction range is dependent on zoom level // 0 = 1 tile, 1 = 2 tiles, 2 = 4 tiles, 3 = 8 tiles, etc var tileRange = 1 << zoom; // don't repeat across y-axis (vertically) if (y < 0 || y >= tileRange) { return null; } // repeat across x-axis if (x < 0 || x >= tileRange) { x = (x % tileRange + tileRange) % tileRange; } return urlfunc({x:x,y:y}, zoom) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getHorizontallyRepeatingTileUrl(coord, zoom, urlfunc) {\n var y = coord.y;\n var x = coord.x;\n \n // tile range in one direction range is dependent on zoom level\n // 0 = 1 tile, 1 = 2 tiles, 2 = 4 tiles, 3 = 8 tiles, etc\n var tileRange = 1 << zoom;\n \n // don't repeat across y-axis (vertically)\n if (y < 0 || y >= tileRange) {\n //return null;\n y = (y % tileRange + tileRange) % tileRange;\n }\n \n // repeat across x-axis\n if (x < 0 || x >= tileRange) {\n // return null;\n x = (x % tileRange + tileRange) % tileRange;\n }\n \n return urlfunc({x:x,y:y}, zoom)\n }", "function getNormalizedTiles( zoom, x, y ) {\n\t// tile range in one direction range is dependent on zoom level\n\t// 0 = 1 tile, 1 = 2 tiles, 2 = 4 tiles, 3 = 8 tiles, etc\n\ttileRange = get_tile_range( zoom );\n\t// don't repeat across y-axis (vertically)\n\tif (y < 0 || y >= tileRange)\n\t\treturn null;\n\t// repeat across x-axis\n\tif (x < 0 || x >= tileRange)\n\t\tx = (x % tileRange + tileRange) % tileRange;\n\t// Return maps Point\n\treturn new google.maps.Point( x, y );\n}", "function xyz_getTileURL(bounds) {\n\tvar res = this.map.getResolution();\n\tvar x = Math.round((bounds.left - this.maxExtent.left) / (res * this.tileSize.w));\n\tvar y = Math.round((this.maxExtent.top - bounds.top) / (res * this.tileSize.h));\n\tvar z = this.map.getZoom();\n\t\n\tif (this.map.baseLayer.name == 'Bing Roads' || this.map.baseLayer.name == 'Bing Aerial' || this.map.baseLayer.name == 'Bing Aerial With Labels') {\n\t z = z + 1;\n\t}\n\t\n\tvar limit = Math.pow(2, z);\n\tconsole.log(\"xyz: \"+ this.url + z + \"/\" + x + \"/\" + y + \".\" + this.type);\n\t x = ((x % limit) + limit) % limit;\n\t y = Math.pow(2,z) - y - 1;\n\t return this.url + z + \"/\" + x + \"/\" + y + \".\" + this.type;\n}", "tileHorizontally(time) {\n const images = [...this.imageUrls];\n\n // Randomize which image is shown first by rotating the array a random\n // number of times.\n randomRotate(images);\n\n const wall = wallGeometry.extents;\n let totalWidth = 0;\n while (totalWidth < wall.w) {\n const image = this.images[images[0]];\n // fit to height\n const scale = wall.h / image.height;\n const x = wall.x + totalWidth;\n // Limit the width to the remaining width on the wall.\n const w = Math.min(\n Math.floor(image.width * scale),\n wall.w - totalWidth /* this is the remaining width */);\n\n const index = this.instances.length;\n this.instances.push({\n url: images[0],\n scale,\n x,\n y: 0,\n });\n debug(\"tile horizontal\", images[0], scale, x, w);\n\n // Make a polygon for the image.\n var poly = new Polygon([\n {x: x, y: 0},\n {x: x + w, y: 0},\n {x: x + w, y: wall.y + wall.h},\n {x: x, y: wall.y + wall.h},\n ]);\n\n this.polygons.push(this.processPolygon(initPolygon(poly, time, index, {\n counted: 1,\n r: 0,\n g: 0,\n b: 0\n })));\n\n // update totalWidth to advance the next image to the right.\n totalWidth += w;\n\n // rotate the images array to cycle through the given images.\n images.push(images.shift());\n }\n }", "renderTile(tile) {\n const graphics = tile.graphics;\n graphics.clear();\n tile.drawnAtScale = this._xScale.copy();\n\n // we're setting the start of the tile to the current zoom level\n const {tileX, tileWidth} = this.getTilePosAndDimensions(tile.tileData.zoomLevel,\n tile.tileData.tilePos, this.tilesetInfo.tile_size);\n\n const matrix = tile.matrix;\n const trackHeight = this.dimensions[1];\n const matrixDimensions = tile.tileData.shape;\n const colorScale = this.options.colorScale || scaleOrdinal(schemeCategory10);\n const valueToPixels = scaleLinear()\n .domain([0, this.maxAndMin.max])\n .range([0, trackHeight / matrixDimensions[0]]);\n\n for (let i = 0; i < matrix[0].length; i++) {\n const intervals = trackHeight / matrixDimensions[0];\n // calculates placement for a line in each interval; we subtract 1 so we can see the last line clearly\n const linePlacement = (i === matrix[0].length - 1) ?\n (intervals * i) + ((intervals * (i + 1) - (intervals * i))) - 1 :\n (intervals * i) + ((intervals * (i + 1) - (intervals * i)));\n graphics.lineStyle(1, this.colorHexMap[colorScale[i]], 1);\n\n for (let j = 0; j < matrix.length; j++) { // 3070 or something\n const x = this._xScale(tileX + (j * tileWidth / this.tilesetInfo.tile_size));\n const y = linePlacement - valueToPixels(matrix[j][i]);\n this.addSVGInfo(tile, x, y, colorScale[i]);\n // move draw position back to the start at beginning of each line\n (j === 0) ? graphics.moveTo(x, y) : graphics.lineTo(x, y);\n }\n }\n\n }", "function gridify(x_tiles, t_width, t_height){\n var posX = 0;\n var posY = 0;\n var i = 0;\n\n $(\".loading-logo .tile\").each(function (ind, el) {\n $(this).css(\"background-position\", posX.toString() + \"px \" + posY.toString() + \"px\");\n\n posX -= t_width;\n i++;\n\n if (i == x_tiles) {\n i = 0;\n posX = 0;\n posY -= t_height;\n }\n });\n}", "function landCustomGetTileUrl(pos, zoom) \n{\n var sl_zoom = slConvertGMapZoomToSLZoom(zoom);\n\n var regions_per_tile_edge = Math.pow(2, sl_zoom - 1);\n \n var x = pos.x * regions_per_tile_edge;\n var y = pos.y * regions_per_tile_edge;\n\n // Adjust Y axis flip location by zoom value, in case the size of the whole\n // world is not divisible by powers-of-two.\n var offset = slGridEdgeSizeInRegions;\n offset -= offset % regions_per_tile_edge;\n y = offset - y;\n\n // Google tiles are named (numbered) based on top-left corner, but ours\n // are named by lower-left corner. Since we flipped in Y, correct the\n // name. JC\n y -= regions_per_tile_edge;\n \n // We name our tiles based on the grid_x, grid_y of the region in the\n // lower-left corner.\n x -= x % regions_per_tile_edge;\n y -= y % regions_per_tile_edge; \n\n // Pick a server\n \n if (((x / regions_per_tile_edge) % 2) == 1)\n var host_name = slTileHost1;\n else\n var host_name = slTileHost2; \n\n // Get image tiles from Amazon S3\n f = host_name + \"/map-\" + sl_zoom + \"-\" + x + \"-\" + y + \"-objects.jpg\";\n return f;\n}", "function scaleCoords(c, url){\n\t\tvar x = c.x;\n\t\tvar y = c.y;\n\t\tvar w = c.w;\n\t\tvar h = c.h;\n\t\tvar split = url.split('/');\n\t\tvar pctStr = split[split.length-3];\n\t\tif (pctStr != \"full\"){\n\t\t\tvar pct = pctStr.split(':')[1];\n\t\t\tvar scale = 100/pct;\n\t\t\tx *= scale;\n\t\t\ty *= scale;\n\t\t\tw *= scale;\n\t\t\th *= scale;\n\t\t}\n\t\tx = Math.round(x);\n\t\ty = Math.round(y);\n\t\tw = Math.round(w);\n\t\th = Math.round(h);\n\n\t\treturn {'x':x, 'y':y, 'w':w, 'h':h}\n\t}", "function url(x, y, z) {\n return `https://api.mapbox.com/styles/v1/mapbox/streets-v11/tiles/${z}/${x}/${y}${devicePixelRatio > 1 ? \"@2x\" : \"\"}?access_token=pk.eyJ1IjoicGF3YXJvIiwiYSI6ImNramI5NDIyMDdqMGYydnBkeGVrcGNydDUifQ.k7aT1uH2iIZEAnUC38-QJw`\n }", "function getNormalizedCoord(coord, zoom) {\n var y = coord.y;\n var x = coord.x;\n\n // tile range in one direction range is dependent on zoom level\n // 0 = 1 tile, 1 = 2 tiles, 2 = 4 tiles, 3 = 8 tiles, etc\n var tileRange = 2 << zoom;\n\n // don't repeat across y-axis (vertically)\n if (y < 0 || y >= tileRange) {\n return null;\n }\n\n // repeat across x-axis\n if (x < 0 || x >= tileRange) {\n /*x = (x % tileRange + tileRange) % tileRange;*/\n\t\t return null;\n }\n\n return {\n x: x,\n y: y\n };\n\t\t\n\t }", "function getNormalizedCoord(coord, zoom) {\n var y = coord.y;\n var x = coord.x;\n\n // tile range in one direction range is dependent on zoom level\n // 0 = 1 tile, 1 = 2 tiles, 2 = 4 tiles, 3 = 8 tiles, etc\n var tileRange = 1 << zoom;\n\n // don't repeat across y-axis (vertically)\n if (y < 0 || y >= tileRange) {\n return null;\n }\n\n // repeat across x-axis\n if (x < 0 || x >= tileRange) {\n // x = (x % tileRange + tileRange) % tileRange;\n return null;\n }\n\n return {x: x, y: y};\n}", "placeholderArtwork(url) {\n if(!url) return \"http://placehold.it/100x100\";\n\n // const regx = /(-large)/;\n // const str = url.replace(regx, \"-crop\");\n\n return url;\n }", "function getNormalizedCoord(coord, zoom) {\n var y = coord.y;\n var x = coord.x;\n\n // tile range in one direction range is dependent on zoom level\n // 0 = 1 tile, 1 = 2 tiles, 2 = 4 tiles, 3 = 8 tiles, etc\n var tileRange = 1 << zoom;\n\n // don't repeat across y-axis (vertically)\n if (y < 0 || y >= tileRange) {\n return null;\n }\n\n // repeat across x-axis\n if (x < 0 || x >= tileRange) {\n x = (x % tileRange + tileRange) % tileRange;\n }\n\n return {x: x, y: y};\n}", "resetWindowing(props) {\n const {\n tilewidth,\n numtiles: inputNumtiles,\n width: inputWidth,\n } = props;\n\n // Get sizing\n let width, pixelWidth;\n\n // Width\n if (inputWidth) {\n width = inputWidth;\n pixelWidth = getWidth(inputWidth);\n } else if (tilewidth && inputNumtiles) {\n width = _.toInteger(tilewidth) * _.toInteger(inputNumtiles);\n pixelWidth = width;\n } else {\n width = '100%';\n pixelWidth = getWidth(width);\n }\n\n // Number of horizontal tiles\n let numtiles;\n if (inputNumtiles) {\n numtiles = inputNumtiles;\n } else if (tilewidth) {\n numtiles = _.toInteger(pixelWidth / tilewidth);\n } else {\n numtiles = 50;\n }\n\n return { xStart: -0.5, xEnd: numtiles + 0.5 };\n }", "adjustTile(sprite) {\n // set origin at the top left corner\n sprite.setOrigin(0);\n\n // set display width and height to \"tileSize\" pixels\n sprite.displayWidth = this.tileSize;\n sprite.displayHeight = this.tileSize;\n }", "function getNormalizedCoord(coord, zoom) {\n if (!repeatOnXAxis) return coord\n\n var y = coord.y\n var x = coord.x\n\n // tile range in one direction range is dependent on zoom level\n // 0 = 1 tile, 1 = 2 tiles, 2 = 4 tiles, 3 = 8 tiles, etc\n var tileRange = 1 << zoom\n\n // don't repeat across Y-axis (vertically)\n if (y < 0 || y >= tileRange) {\n return null\n }\n\n // repeat across X-axis\n if (x < 0 || x >= tileRange) {\n x = (x % tileRange + tileRange) % tileRange\n }\n\n return {\n x: x,\n y: y\n }\n\n}", "swapXLast(tile, lastElement, len) {\r\n tile.setAttribute(\"x\", parseInt(tile.getAttribute(\"x\")) + len);\r\n lastElement.setAttribute(\"x\", parseInt(lastElement.getAttribute(\"x\")) - len);\r\n }", "function reloadTiles() {\n var pages = ntpApiHandle.mostVisited;\n var cmds = [];\n for (var i = 0; i < Math.min(MAX_NUM_TILES_TO_SHOW, pages.length); ++i) {\n cmds.push({cmd: 'tile', rid: pages[i].rid});\n }\n cmds.push({cmd: 'show'});\n\n $(IDS.TILES_IFRAME).contentWindow.postMessage(cmds, '*');\n}", "static getUrlMapStatic(refW, urlStaticMap) {\n var scale = 1;\n var reqPictureWidth = refW;\n \n if (refW > 640) {\n reqPictureWidth = parseInt(refW/2);\n scale = 2;\n }\n \n const urlImgMap = urlStaticMap + \"&size=\" + reqPictureWidth + \"x120&scale=\" + scale;\n // console.log(\"url static map: \" + urlImgMap);\n return urlImgMap;\n}", "function getRawImageTileUrl(level, x, y) {\r\n return this.src;\r\n }", "function osm_getTileURL(bounds) {\n var res = this.map.getResolution();\n var x = Math.round((bounds.left - this.maxExtent.left) / (res * this.tileSize.w));\n var y = Math.round((this.maxExtent.top - bounds.top) / (res * this.tileSize.h));\n var z = this.map.getZoom();\n var limit = Math.pow(2, z);\n //\n if (y < 0 || y >= limit) {\n return OpenLayers.Util.getImagesLocation() + \"404.png\";\n } else {\n x = ((x % limit) + limit) % limit;\n return this.url + z + \"/\" + x + \"/\" + y + \".\" + this.type;\n }\n }", "function remapUrl(url) {\n if (url.startsWith('http://25.media')) {\n url = url.replace('http://25.media', 'http://40.media');\n }\n //else if (url.startsWith('http://31.media')) {\n // url = url.replace('http://31.media', 'http://40.media');\n //}\n return url;\n }", "function mapResize(newSize){\r\n\r\n // Get current position\r\n var map_x = unsafeWindow.mapX;\r\n var map_y = unsafeWindow.mapY;\r\n var map_s = unsafeWindow.mapSize;\r\n\r\n // Calculate new X and Y\r\n var delta = parseInt((map_s - newSize) / 2);\r\n\r\n // Overwrite values\r\n map_x += delta;\r\n map_y += delta;\r\n\r\n // InnerHTML\r\n var ihtml = \"\";\r\n ihtml += '<tr>';\r\n ihtml += '<td height=\"38\">' + map_y + '</td>';\r\n ihtml += '<td colspan=\"' + newSize + '\" rowspan=\"' + newSize + '\">';\r\n ihtml += '<div style=\"background-image:url(graphic/map/gras4.png); position:relative; width:' + (53 * newSize) + 'px; height:' + (38 * newSize) +'px; overflow:hidden\" id=\"map\">';\r\n ihtml += '<div id=\"mapOld\" style=\"position:absolute; left:0px; top:0px\">';\r\n ihtml += '<div style=\"color:white; margin:10px\">Lade Karte...</div>';\r\n ihtml += '</div>';\r\n ihtml += '<div id=\"mapNew\" style=\"position:absolute; left:0px; top:0px\"></div>';\r\n ihtml += '</div>';\r\n ihtml += '</td>';\r\n ihtml += '</tr>';\r\n for(jj=1; jj<newSize; jj++){\r\n ihtml += '<tr><td width=\"20\" height=\"38\">' + (map_y + jj) + '</td></tr>';\r\n }\r\n ihtml += '<tr id=\"map_x_axis\">';\r\n ihtml += '<td height=\"20\"></td>';\r\n for(jj=0; jj<newSize; jj++){\r\n ihtml += '<td align=\"center\" width=\"53\">' + (map_x + jj) + '</td>';\r\n }\r\n ihtml += '</tr>';\r\n var tmp = document.getElementById(\"mapCoords\").innerHTML = ihtml;\r\n\r\n // Update data\r\n var url = \"http://\"+(\"\"+location.href).split(\"/\")[2] + \"/\" + unsafeWindow.mapURL + '&start_x=' + map_x + '&start_y=' + map_y + '&size_x=' + newSize + '&size_y=' + newSize;\r\n GM_xmlhttpRequest({\r\n method:\"GET\",\r\n url:url,\r\n onload:function(details){\r\n document.getElementById(\"mapOld\").innerHTML = details.responseText;\r\n }\r\n });\r\n\r\n // mapMoveTopo()\r\n var scrollX = map_x;\r\n var scrollY = map_y;\r\n unsafeWindow.scrollX = scrollX;\r\n unsafeWindow.scrollY = scrollY;\r\n var topoX = parseInt(document.getElementsByName('min_x')[0].value); //minimalstes x auf Karte rechts\r\n var topoY = parseInt(document.getElementsByName('min_y')[0].value); //minimalstes y auf Karte rechts\r\n\r\n var relX = scrollX - topoX;\r\n if(unsafeWindow.globalYDir == 1){\r\n var relY = scrollY - topoY;\r\n }else{\r\n var relY = (45-mapSize) - (scrollY-topoY);\r\n }\r\n \r\n // Rechteck verschieben\r\n document.getElementById('topoRect').style.left = (5*(relX)) + 'px';\r\n document.getElementById('topoRect').style.top = (5*(relY)) + 'px';\r\n document.getElementById('topoRect').style.width = (5*(newSize)) + 'px';\r\n document.getElementById('topoRect').style.height = (5*(newSize)) + 'px';\r\n\t \r\n\t unsafeWindow.ajaxMapInit(parseInt(unsafeWindow.mapX), parseInt(unsafeWindow.mapY), parseInt(newSize) , \"game.php?\"+getUrlParam(\"village\")+\"&screen=map&xml\", 1, 1);\r\n\t \r\n }", "function createPermalink(){\n\tvar visibleLayers = Array();\n\tvar permalink;\n\tvar permalinkParams = {};\n\tvisibleLayers = getVisibleLayers(visibleLayers, layerTree.root.firstChild);\n\tvisibleLayers = uniqueLayersInLegend(visibleLayers);\n\tvar visibleBackgroundLayer = getVisibleBackgroundLayer();\n\tvar startExtentArray = geoExtMap.map.getExtent().toArray();\n\tvar startExtent = startExtentArray[0] + \",\" + startExtentArray[1] + \",\" + startExtentArray[2] + \",\" + startExtentArray[3];\n\n\tif (!norewrite){\n\t\tvar servername = location.href.split(/\\/+/)[1];\n\t\tpermalink = \"http://\"+servername;\n\t\tif (gis_projects) {\n\t\t\tpermalink += gis_projects.path + \"/\";\n\t\t}\n\t\telse {\n\t\t\tpermalink += \"/\";\n\t\t}\n\t\tpermalink += wmsMapName+\"?\";\n\t} else {\n\t\tpermalink = urlArray[0] + \"?map=\";\n\t\tpermalink = permalink + \"/\" + wmsMapName.replace(\"/\", \"\");\n\t\t//add .qgs if it is missing\n\t\tif (!permalink.match(/\\.qgs$/)) {\n\t\t\tpermalink += \".qgs\";\n\t\t}\n\t\tpermalink += \"&\";\n\t}\n\n\t// extent\n\tpermalinkParams.startExtent = startExtent;\n\n\t// visible BackgroundLayer\n\tpermalinkParams.visibleBackgroundLayer = visibleBackgroundLayer;\n \n\t// visible layers and layer order\n\tpermalinkParams.visibleLayers = visibleLayers.toString();\n\n\t// layer opacities as hash of <layername>: <opacity>\n\tvar opacities = null;\n\tfor (layer in wmsLoader.layerProperties) {\n\t\tif (wmsLoader.layerProperties.hasOwnProperty(layer)) {\n\t\t\tvar opacity = wmsLoader.layerProperties[layer].opacity;\n\t\t\t// collect only non-default values\n\t\t\tif (opacity != 255) {\n\t\t\t\tif (opacities == null) {\n\t\t\t\t\topacities = {};\n\t\t\t\t}\n\t\t\t\topacities[layer] = opacity;\n\t\t\t}\n\t\t}\n\t}\n\tif (opacities != null) {\n\t\tpermalinkParams.opacities = Ext.util.JSON.encode(opacities);\n\t}\n\t\n\t//layer order\n\tpermalinkParams.initialLayerOrder = layerOrderPanel.orderedLayers().toString();\n\n\t// selection\n\tpermalinkParams.selection = thematicLayer.params.SELECTION;\t\n\tif (permaLinkURLShortener) {\n\t\tpermalink = encodeURIComponent(permalink + decodeURIComponent(Ext.urlEncode(permalinkParams)));\n\t}\n\telse {\n\t\tpermalink = permalink + Ext.urlEncode(permalinkParams);\t\n\t}\n\t\n\treturn permalink;\n}", "static WorldToTile(position, x, y) {\n // Translate relative to the world center and scale based upon the\n // tile size.\n const bottomLeft = new b2.Vec2();\n Fracker.GetBottomLeft(bottomLeft);\n x[0] = Math.floor(((position.x - bottomLeft.x) /\n FrackerSettings.k_tileWidth) +\n FrackerSettings.k_tileHalfWidth);\n y[0] = Math.floor(((position.y - bottomLeft.y) /\n FrackerSettings.k_tileHeight) +\n FrackerSettings.k_tileHalfHeight);\n }", "function Permalink(url) {\n var center = null, zoom = null, gp = null, tp = null, p = null, bl = null;\n var graphs = [];\n var layers = [];\n var scales = {};\n if ('zoom' in url.params) {\n zoom = parseInt(url.params.zoom, 10);\n }\n if ('center' in url.params) {\n center = url.params.center.split(',').map(function(s) { return parseFloat(s); });\n }\n if ('gp' in url.params) {\n var fields = url.params.gp.split(':');\n gp = {\n 'open' : parseInt(fields[0],10) !== 0\n };\n if (fields.length > 1) {\n gp.width = parseInt(fields[1],10);\n }\n }\n if ('tp' in url.params) {\n tp = url.params.tp;\n }\n if ('p' in url.params) {\n if (url.params.p === \"L\") {\n p = ceui.LAYERS_PERSPECTIVE;\n } else {\n p = ceui.GRAPHS_PERSPECTIVE;\n }\n }\n if ('graphs' in url.params) {\n url.params.graphs.split(',').forEach(function(graphString) {\n var fields = graphString.split(':');\n graphs.push({id:fields[0], type:fields[1]});\n });\n }\n if ('scales' in url.params) {\n url.params.scales.split(',').forEach(function(scale) {\n var fields = scale.split(':');\n /////////////////////////////////////////////////////////////////////////////\n // temporary patch to provide backward compatibility with permalink URLs that\n // used the old vertical axis binding names (\"tempc\", \"ytd-prcpmm\", etc):\n if (fields[0] === \"tempc\") { fields[0] = \"temp\"; }\n else if (fields[0] === \"ytd-prcpmm\") { fields[0] = \"ytd-prcp\"; }\n else if (fields[0] === \"prcpmm\") { fields[0] = \"prcp\"; }\n else if (fields[0] === \"snowmm\") { fields[0] = \"snow\"; }\n // end of temporary patch; remove this patch once all links have been changed;\n // see https://github.com/nemac/climate-explorer/issues/26\n /////////////////////////////////////////////////////////////////////////////\n scales[fields[0]] = { min : fields[1], max : fields[2] };\n });\n }\n if ('layers' in url.params) {\n url.params.layers.split(',').forEach(function(layerString) {\n var fields = layerString.split(':');\n layers.push({id:fields[0], opacity:fields[1]});\n });\n }\n if ('bl' in url.params) {\n bl = url.params.bl;\n }\n return {\n 'toString' : function() { return url.toString(); },\n 'haveCenter' : function() { return center !== null; },\n 'getCenter' : function() { return center; },\n 'setCenter' : function(c) {\n center = c;\n url.params.center = sprintf(\"%.1f\", center[0]) + \",\" + sprintf(\"%.1f\", center[1]);\n },\n 'haveZoom' : function() { return zoom !== null; },\n 'getZoom' : function() { return zoom; },\n 'setZoom' : function(z) {\n zoom = z;\n url.params.zoom = zoom.toString();\n },\n 'haveTp' : function() { return tp !== null; },\n 'getTp' : function() { return tp; },\n 'setTp' : function(t) {\n tp = t;\n url.params.tp = t;\n },\n 'havePerspective' : function() { return p !== null; },\n 'getPerspective' : function() { return p; },\n 'setPerspective' : function(q) {\n p = q;\n if (p === ceui.LAYERS_PERSPECTIVE) {\n url.params.p = \"L\";\n } else {\n url.params.p = \"G\";\n }\n },\n 'haveGp' : function() { return gp !== null; },\n 'getGp' : function() { return gp; },\n 'setGp' : function(g) {\n gp = g;\n url.params.gp = gp.open ? \"1\" : \"0\";\n if ('width' in gp) {\n url.params.gp = url.params.gp + \":\" + gp.width;\n }\n },\n 'haveGraphs' : function() { return graphs.length > 0; },\n 'getGraphs' : function() { return graphs; },\n 'addGraph' : function(graph) {\n var i;\n // don't add this graph if it's already in the list\n for (i=0; i<graphs.length; ++i) {\n if (graphs[i].id === graph.id && graphs[i].type == graph.type) {\n return;\n }\n }\n graphs.push(graph);\n url.params.graphs = graphs.map(function(g) { return g.id + \":\" + g.type; }).join(\",\");\n },\n 'removeGraph' : function(graph) {\n for ( var i = graphs.length - 1; i >= 0; i-- ) {\n if (graphs[i].type === graph.type && graphs[i].id === graph.id) {\n graphs.splice ( i, 1 );\n break;\n }\n }\n\n if (graphs.length > 0) {\n url.params.graphs = graphs.map(function(g) { return g.id + \":\" + g.type; }).join(\",\");\n } else {\n delete url.params.graphs;\n }\n },\n 'removeStation' : function(id) {\n for ( var i = graphs.length - 1; i >= 0; i-- ) {\n if (graphs[i].id === id) {\n graphs.splice ( i, 1 );\n }\n }\n\n if (graphs.length > 0) {\n url.params.graphs = graphs.map(function(g) { return g.id + \":\" + g.type; }).join(\",\");\n } else {\n delete url.params.graphs;\n }\n },\n 'setScales' : function(aR) {\n var bindingId;\n for (bindingId in aR) {\n if (!(bindingId in scales)) {\n scales[bindingId] = {};\n }\n scales[bindingId].min = aR[bindingId].min;\n scales[bindingId].max = aR[bindingId].max;\n }\n url.params.scales = Object.keys(scales).map(function(bindingId) {\n return bindingId.replace(\"-binding\", \"\") + \":\" +\n sprintf(\"%.1f\", Number(scales[bindingId].min)) + \":\" +\n sprintf(\"%.1f\", Number(scales[bindingId].max));\n }).join(\",\");\n },\n 'haveScales' : function() {\n return Object.keys(scales).length > 0;\n },\n 'getScales' : function() { return scales; },\n 'haveLayers' : function() { return layers.length > 0; },\n 'getLayers' : function() { return layers; },\n 'addLayer' : function(layerId) {\n var i;\n // don't add this layer if it's already in the list\n for (i=0; i<layers.length; ++i) {\n if (layers[i].id === layerId) {\n return;\n }\n }\n layers.push({id : layerId, opacity : 1});\n url.params.layers = layers.map(function(lyr) { return lyr.id + \":\" + lyr.opacity; }).join(\",\");\n },\n 'setLayerOpacity' : function(layerId, opacity) {\n var i;\n // don't add this layer if it's already in the list\n for (i=0; i<layers.length; ++i) {\n if (layers[i].id === layerId) {\n layers[i].opacity = opacity;\n url.params.layers = layers.map(function(g) { return g.id + \":\" + g.opacity; }).join(\",\");\n return;\n }\n }\n },\n 'clearLayers' : function() {\n layers = [];\n delete url.params.layers;\n },\n 'removeLayer' : function(layerId) {\n for ( var i = layers.length - 1; i >= 0; i-- ) {\n if (layers[i].id === layerId) {\n layers.splice ( i, 1 );\n break;\n }\n }\n if (layers.length > 0) {\n url.params.layers = layers.map(function(g) { return g.id + \":\" + g.opacity; }).join(\",\");\n } else {\n delete url.params.layers;\n }\n },\n 'setBl': function(bl) {\n\turl.params.bl = bl;\n },\n 'haveBl': function() { return bl !== null; },\n 'getBl': function() { return bl }\n };\n }", "function tileCoordinateToTileId(tilesBetween){\r\n var activeRow = 0;\r\n var bottomTile = 0;\r\n var columnOffset = 1;\r\n var topTile = 0;\r\n \r\n //remove tile overlays, before re-generating them\r\n $('.map .tile-overlay').remove();\r\n \r\n $.each(tilesBetween,function(index,value){\r\n //apply tile overlay functionality\r\n columnOffset++;\r\n \r\n if(index%(config.columnsWide+1)==0){\r\n activeRow++;\r\n columnOffset = 1;\r\n };\r\n\r\n var tileLeftPixel = (0 - (nwPixelCoordinate.x%config.tileSize) + ((columnOffset-1)*config.tileSize));\r\n var tileTopPixel = (0 - (nwPixelCoordinate.y%config.tileSize) + ((activeRow-1)*config.tileSize));\r\n var tileId = (parseInt(tilesBetween[index].y) * (Math.pow(2,config.currentZoomLevel)) + parseInt(tilesBetween[index].x));\r\n \r\n addTileOverlay({\r\n coordinateX:tilesBetween[index].x,\r\n coordinateY:tilesBetween[index].y,\r\n left:tileLeftPixel,\r\n tileId:tileId,\r\n tilePosition:index+1,\r\n top:tileTopPixel,\r\n zoomLevel:config.currentZoomLevel\r\n });\r\n \r\n if(index == 0){topTile = tileId;}\r\n if(index == tilesBetween.length-1){bottomTile = tileId;}\r\n\r\n $.logEvent('[$.tileCoordinateToTileId]: Map columns: ' + (config.columnsWide+1) + ', tile y coordinate: ' + parseInt(tilesBetween[index].y) + ' tiles in map: ' + (Math.pow(2,config.currentZoomLevel)) + ', tile x coordinate: ' + parseInt(tilesBetween[index].x) + ', tile id(' + tilesBetween[index].x + ',' + tilesBetween[index].y + ') = ' + tileId);\r\n\r\n //if the map is rendering for the first time, load the tiles based on the tile bounds\r\n if(config.loaded){\r\n //only request tile data if has not previously been requested\r\n if($.inArray(config.currentZoomLevel + '/' + tileId,config.tilesPreviouslyLoaded) == -1){\r\n $.logEvent('[$.tileCoordinateToTile]: subsequent map load');\r\n \r\n $.ajax({\r\n dataType:'jsonp',\r\n success:function(data){\r\n $.each(data.serviceResponse.body.teams,function(index,value){\r\n //build markers for each location\r\n renderMarker({\r\n latitude:this.lat,\r\n longitude:this.lon,\r\n teamId:this.id\r\n });\r\n }); \r\n //config.markerClusterObj = new MarkerClusterer(config.map,config.markersObj);\r\n },\r\n url:config.webservices.teams + '?tile=' + tileId + '&zoom=' + config.currentZoomLevel + '&number=100&reduced=true'\r\n });\r\n \r\n //stored new tileId into array, so that this tile is never re-requested\r\n config.tilesPreviouslyLoaded.push(config.currentZoomLevel + '/' + tileId);\r\n }\r\n }\r\n else{ \r\n //stored new tileId into array, so that this tile is never re-requested\r\n config.tilesPreviouslyLoaded.push(config.currentZoomLevel + '/' + tileId);\r\n }\r\n });\r\n \r\n //set boolean to indicate that the map has had its bounds changed at least once, so that a different type of data request can be made\r\n if(!config.loaded){\r\n $.logEvent('[$.tileCoordinateToTile]: initial map load');\r\n \r\n //load map for the first time, using the bounds of the map\r\n $.ajax({\r\n dataType:'jsonp',\r\n success:function(data){\r\n $.each(data.serviceResponse.body.teams,function(index,value){\r\n //build markers for each location\r\n renderMarker({\r\n latitude:this.lat,\r\n longitude:this.lon,\r\n teamId:this.id\r\n });\r\n }); \r\n //config.markerClusterObj = new MarkerClusterer(config.map,config.markersObj);\r\n },\r\n url:config.webservices.teamsCombined + '?zoom=' + config.currentZoomLevel + '&number=250&topTile=' + topTile + '&bottomTile=' + bottomTile\r\n });\r\n \r\n config.loaded = true;\r\n }\r\n }", "function getLayerURL() {\n if(mapCX===undefined || mapCY===undefined) {\n return layerURL = \"/wmts/{Layer}/{Style}/{TileMatrix}/{TileCol}/{TileRow}.png\";\n } else {\n return layerURL = \"/wmts/{Layer}/{Style}/{CX}/{CY}/{TileMatrix}/{TileCol}/{TileRow}.png\";\n }\n }", "function ShortenLink (url) {\n var yourlsLink;\n\n // Get Yourls API from XNa.me\n // You can use your own API as well\n yourlsLink = siteName + '/yourls-api.php?format=simple&action=shorturl&url=' + url;\n\n\n var rqst = new XMLHttpRequest();\n rqst.onreadystatechange = function () {\n if (rqst.readyState == 4 && rqst.status == 200) {\n $xlink.val(rqst.responseText);\n }\n }\n rqst.open(\"GET\", yourlsLink, false);\n rqst.send();\n\n}", "function resetMap() {\n\ttileScale = 24;\n\ttileSize = Math.round(2**(tileScale*.25));\n\tmapUpdate();\n\tupdateTileSize(tileSize);\n\t$(\"#mapSize\").text(\"Map tile size: \" + tileScale + \"(\"+tileSize+\")\");\n}", "getNormTileAt(x, y){\n\t\treturn this.getTileAt(y / MapContext.getTileSize(), x / MapContext.getTileSize());\n\t}", "function getNormalizedCoord(coord, zoom) {\n var y = coord.y;\n var x = coord.x;\n\n // tile range in one direction range is dependent on zoom level\n // 0 = 1 tile, 1 = 2 tiles, 2 = 4 tiles, 3 = 8 tiles, etc\n // from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Bitwise_Operators#Left_shift\n // Bitwise shifting any number x to the left by y bits yields x * 2^y.\n var tileRange = 1 << zoom;\n\n // don't repeat across y-axis (vertically)\n if (y < 0 || y >= tileRange) {\n return null;\n }\n\n // repeat or not across x-axis\n if (x < 0 || x >= tileRange) {\n //x = (x % tileRange + tileRange) % tileRange;\n return null;\n }\n\n return {\n x: x,\n y: y\n };\n}", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function main() {\n const width = $( window ).width();\n let zoom = 12\n if (width <= 400) {\n zoom = 11\n }\n const map = new L.Map('map', {\n center: [44.9457,-93.2750],\n zoom: zoom\n });\n\n map.scrollWheelZoom.disable()\n\n L.tileLayer(tilesUrl).addTo(map)\n\n createLayers(map)\n\n window.invalidateMapSize = function() {\n map.invalidateSize()\n }\n }", "function MapTypeCGTilesPlus1() {\n\tthis.tileSize = new google.maps.Size( tile_size/2, tile_size/2 );\n}", "function populateUrlTemplate(template, extent, width, height) {\n let bbox = [extent.xmin, extent.ymin, extent.xmax, extent.ymax].map(x => x.toFixed(5));\n let result = template.replace(\"${bbox}\", bbox.join(','));\n result = result.replace(\"${width}\", width);\n result = result.replace(\"${height}\", height);\n return(result);\n }", "function normalizeImageUrl(data) {\n\t return data.replace('www.dropbox.com', 'dl.dropboxusercontent.com');\n\t}", "updateTileUrls() {\n var filters = {};\n\n // Check acvitve sensors\n var activeSensors = [];\n for(let i = 0; i < this.sensorSection.children.length; i++) {\n let sensorToggle = this.sensorSection.children[i];\n\n if(sensorToggle.isActive()) {\n activeSensors.push(sensorToggle.innerText);\n }\n }\n\n // sensor_platform is an UrtheCast value\n filters.sensor_platform = activeSensors.join(',');\n\n // Add cloud coverage filter\n var cloudCoverageLTE = parseFloat(this.cloudCoverageSection.querySelector('input[name=cloud-coverage]').value);\n if(typeof cloudCoverageLTE !== 'number' || isNaN(cloudCoverageLTE)) {\n cloudCoverageLTE = 100; // Most permisve value\n }\n filters.cloud_coverage_lte = cloudCoverageLTE;\n\n // Add sun angle filter\n var sunElevationLTE = parseFloat(this.sunElevationSection.querySelector('input[name=sun-elevation]').value);\n if(typeof sunElevationLTE !== 'number' || isNaN(sunElevationLTE)) {\n sunElevationLTE = 90; // Most permisve value\n }\n filters.sun_elevation_lte = sunElevationLTE;\n\n // Give each layer a new url based on our known filter situation\n for(let i = 0; i < this.layerSection.children.length; i++) {\n let layerToggle = this.layerSection.children[i];\n let newUrl = LayerToggleProto.createUrl(layerToggle.innerText, filters)\n layerToggle.layer.setUrl(newUrl);\n }\n }", "function addXYZTileLayer({\n title = 'xyz', url, tileSize = 256, visible = true, base = false, attribution = '',\n}) {\n const attributions = [attribution];\n const source = new XYZ({\n url,\n tileSize,\n attributions,\n });\n const layer = new TileLayer({\n title,\n source,\n visible,\n type: base ? 'base' : 'normal',\n });\n return layer;\n}", "fitToTile() {\n const scaleX = Game.TILESIZE / this.getUnscaledWidth() * this.scaleModifier;\n const scaleY = Math.abs(scaleX);\n this.scale.set(scaleX, scaleY);\n }", "function getCustomPanoramaTileUrl(pano, zoom, tileX, tileY) {\r\n // return \"images/\"+pano+\"/\"+ (tileY + 1) + \"_\" + (tileX + 1)+ '.jpg';\r\n return \"images/\" + pano + \".jpg\";\r\n}", "function MapTypeCGTiles() {\n\tthis.tileSize = new google.maps.Size( tile_size, tile_size );\n}", "static normalizeURL(url) {\n if (url == null)\n return null;\n let pos1 = url.indexOf('//');\n if (pos1 == -1)\n return null;\n let pos2 = url.indexOf('/', pos1 + 2);\n if (pos2 == -1)\n return url;\n let pkgName = url.substr(pos1 + 2, pos2 - pos1 - 2);\n let srcName = url.substr(pos2 + 1);\n return UIPackage.getItemURL(pkgName, srcName);\n }", "url(urls: Array<string>, scheme: ?string) {\n const bbox = WhooTS.getTileBBox(this.x, this.y, this.z);\n const quadkey = getQuadkey(this.z, this.x, this.y);\n\n return urls[(this.x + this.y) % urls.length]\n .replace('{prefix}', (this.x % 16).toString(16) + (this.y % 16).toString(16))\n .replace('{z}', String(this.z))\n .replace('{x}', String(this.x))\n .replace('{y}', String(scheme === 'tms' ? (Math.pow(2, this.z) - this.y - 1) : this.y))\n .replace('{quadkey}', quadkey)\n .replace('{bbox-epsg-3857}', bbox);\n }", "function _setLabelTileLayer() {\n\n var options = { uriConstructor: 'http://localhost:31975/tile/{quadkey}', width: 256, height: 256 };\n var tileSource = new Microsoft.Maps.TileSource(options);\n var tilelayer = new Microsoft.Maps.TileLayer({ mercator: tileSource });\n map.entities.push(tilelayer);\n }", "function urlX(url) { if(/^https?:\\/\\//.test(url)) { return url }}", "function translateCoords(sc, oldURL){\n\t\tvar x = parseInt(sc.x);\n\t\tvar y = parseInt(sc.y);\n\t\tvar w = parseInt(sc.w);\n\t\tvar h = parseInt(sc.h);\n\n\t\tvar oldCoords = oldURL.split('/')[oldURL.split('/').length - 4]\n\n\t\tif (oldCoords != \"full\"){\n\t\t\tvar split = oldCoords.split(',');\n\t\t\tx += parseInt(split[0]);\n\t\t\ty += parseInt(split[1]);\n\t\t}\n\t\treturn {'x':x, 'y':y, 'w':w, 'h':h}\n\t}", "function make2x(url) {\n return shouldUse2x() ? make2xUrl(url) : url;\n }", "function horizontal_location(x, sizex){\n\t \tif(((x+sizex)/tileWidth)%1 >= 0.5){\n\t \t\treturn Math.ceil((x+sizex)/tileWidth)+1;\n\t \t} else {\n\t \t\treturn Math.floor((x+sizex)/tileWidth)+1;\n\t \t}\n\t }", "function getSquareUrl(url, templateUrl) {\n var sizes = url.match(/\\/[ps]([0-9]+)x([0-9]+)\\//);\n if (!sizes || sizes.length < 3) return templateUrl;\n\n var size = Math.round(Math.max(\n parseInt(sizes[1], 10),\n parseInt(sizes[2], 10)\n ));\n\n return templateUrl.replace(\n /\\/[ps][0-9]+x[0-9]+\\//,\n \"/s\" + size + \"x\" + size + \"/\"\n );\n}", "function createTile(array) {\n array.forEach(element => {\n let tile = document.createElement(\"div\");\n tile.addEventListener(\"click\",()=>window.location.href = element.src);\n tile.setAttribute(\"class\", \"tile-style\");\n \n let a = document.createElement(\"a\");\n a.style.width = \"100%\";\n a.style.height = \"100%\";\n a.setAttribute(\"href\", element.src);\n\n //background-image of the tile\n let image = document.createElement(\"img\");\n image.setAttribute(\"class\", \"tile-image\");\n image.setAttribute(\"src\", element.img);\n image.setAttribute(\"alt\", element.alt)\n\n //the icon on top of the image\n let icon = document.createElement(\"img\");\n icon.setAttribute(\"class\", \"tile-icon\");\n icon.setAttribute(\"src\", element.icon);\n icon.setAttribute(\"alt\", element.icon_alt);\n\n //To make hovering over all the elements in the tile easier, we made this div.\n let hoverDiv = document.createElement(\"div\");\n hoverDiv.setAttribute(\"class\", \"hover_div\");\n hoverDiv.style.width = \"100%\";\n hoverDiv.style.height = \"100%\";\n //z-index over all the other elements in the tile to make the hover div on top.\n hoverDiv.style.zIndex = \"90\";\n\n //append the elements to the tile\n tile.appendChild(image);\n tile.appendChild(icon);\n tile.appendChild(hoverDiv);\n\n //Display is the text on the tile.\n let display = document.createElement(\"h3\");\n display.setAttribute(\"class\", \"tile-header\");\n display.textContent = element.display;\n tile.appendChild(display);\n TILE_DIV.appendChild(tile);\n\n //when mouse over the div, toggle the css \n hoverDiv.addEventListener(\"mouseover\", () =>{\n image.classList.toggle(\"tile-image-rotate\");\n tile.classList.toggle(\"tile-style-hover\");\n });\n //when mouse leave the div, toggle it off\n hoverDiv.addEventListener(\"mouseleave\", () =>{\n image.classList.toggle(\"tile-image-rotate\");\n tile.classList.toggle(\"tile-style-hover\");\n });\n });\n console.log(tile_array);\n }", "function normalizeUrl(url) {\n return (url.indexOf('/') === 0 ? url.substr(1) : url);\n }", "function CreateTileGrid() {\n\tvar gridHTML = \"\";\n\tfor(i=0; i<100; i++) {\n\t\tgridHTML += '<div class=\"grid\" id=\"t' + i +'\"></div>';\n\t}\n\tdocument.getElementById(\"tile-map\").innerHTML=gridHTML;\n\tvar gridHTMLz = \"\";\n\tfor(i=0; i<9; i++) {\n\t\tgridHTMLz += '<div class=\"grid-z\" id=\"tz' + i +'\"></div>';\n\t}\n\tdocument.getElementById(\"tile-map-z\").innerHTML=gridHTMLz;\n}", "function zoomToInitialExtent() {\n// GET MAP\nvar map = getMap(_menuContentPane.id);\nif (map) {\n // GET PREVIOUSLY STORED WEBMAPITEM \n var itemExtent = dijit.byId(map.id).webMapItem.item.extent;\n // WEBMAP EXTENT IS GEOGRAPHIC\n var webMapExtent = new esri.geometry.Extent(itemExtent[0][0], itemExtent[0][1], itemExtent[1][0], itemExtent[1][1], {\n\t'wkid': 4326\n });\n // CHECK MAP SPATIAL REFERENCE\n if (map.spatialReference.wkid === 4326) {\n\t// WGS84\n\tmap.setExtent(webMapExtent);\n } else if (isWebMercator(map.spatialReference)) {\n\t// WEB MERCATOR\n\tmap.setExtent(esri.geometry.geographicToWebMercator(webMapExtent));\n } else {\n\t// OTHER\n\tvar geomSrv = new esri.tasks.GeometryService(userConfig.geometryServiceURL);\n\tgeomSrv.project([webMapExtent], map.spatialReference, function (projectedGeoms) {\n\t map.setExtent(projectedGeoms[0]);\n\t});\n }\n}\n}", "prepareExternalUrl(url) {\n if (url && url[0] !== '/') {\n url = '/' + url;\n }\n\n return this._platformStrategy.prepareExternalUrl(url);\n }", "function clean_feed_url(feed)\n{\n\tfeed = feed.replace(/itpc/i,\"http\");\n\tfeed = feed.replace(/pcast/i,\"http\");\n\tfeed = feed.replace(/feed/i,\"http\");\n\treturn feed;\n}" ]
[ "0.6843974", "0.61374843", "0.58517843", "0.56534225", "0.55879474", "0.556825", "0.5466736", "0.5306864", "0.5253604", "0.52235794", "0.516368", "0.5154958", "0.51505864", "0.5102653", "0.51008755", "0.5099507", "0.5058561", "0.5058543", "0.5027266", "0.50181586", "0.50178444", "0.501723", "0.5015211", "0.50135267", "0.5008576", "0.50078255", "0.4956768", "0.49553242", "0.49451542", "0.49331918", "0.49124283", "0.4870925", "0.48519918", "0.48519918", "0.48519918", "0.48519918", "0.48519918", "0.48519918", "0.48519918", "0.48519918", "0.48519918", "0.48519918", "0.48519918", "0.48519918", "0.48519918", "0.48519918", "0.48519918", "0.48519918", "0.48519918", "0.48519918", "0.48519918", "0.48519918", "0.48519918", "0.48519918", "0.48519918", "0.48519918", "0.48519918", "0.48519918", "0.48519918", "0.48519918", "0.48519918", "0.48519918", "0.48519918", "0.48519918", "0.48519918", "0.48519918", "0.48519918", "0.48519918", "0.48519918", "0.48519918", "0.48519918", "0.48519918", "0.48519918", "0.48519918", "0.48519918", "0.48519918", "0.48519918", "0.4851148", "0.48498452", "0.48265496", "0.48054293", "0.4795968", "0.47702295", "0.4754307", "0.4736007", "0.47145224", "0.47049564", "0.4704462", "0.47008225", "0.4700763", "0.4690289", "0.46728495", "0.46672416", "0.46559235", "0.4646434", "0.4636977", "0.46281242", "0.46151468", "0.46063238", "0.45951056" ]
0.6820857
1
Use regular expressions to extract the parameters by name
function getParameterByName(name) { name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]"); var regexS = "[\\?&]" + name + "=([^&#]*)"; var regex = new RegExp(regexS); var results = regex.exec(window.location.search); if(results == null) return ""; else return decodeURIComponent(results[1].replace(/\+/g, " ")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "extractParameters(url, routePattern) {\n var result = {};\n let names = routePattern.trimAll(\"/\").split(\"/\");\n let values = url.trimAll(\"/\").split(\"/\");\n\n for (var i=0; i<names.length; i++) {\n var name = names[i];\n if ((new RegExp(\"<.+?>\")).test(name)) {\n var trimmedName = name.replaceAll(\"<\", \"\").replaceAll(\">\", \"\");\n result[trimmedName] = values[i];\n }\n }\n return result;\n }", "_getRuleParameters()\n {\n let parameters = null;\n let parametersMatch = this.originalData.match(/(?:.*[:])(?<parameters>.*)/);\n\n if (parametersMatch && parametersMatch.groups.parameters) {\n parameters = parametersMatch.groups.parameters.split(',');\n };\n\n return parameters;\n }", "_getParams(route) {\n var matches = route.match(/:\\w+/g)\n return (matches || []).map(match => {\n return match.substring(1, match.length)\n })\n }", "function imagenameParams(imagename, picPattern, reParam, opts) {\n\t// Non-repeating params\n\tconst basicParams = imagename.match(picPattern)\n\tlet params = {\n\t\tname: basicParams[1],\n\t\text: basicParams[3]\n\t}\n\n\t// Repeating params\n\tconst paramPattern = new RegExp(`${reParam}`, 'g')\n\tlet auxParam\n\twhile ((auxParam = paramPattern.exec(imagename)) !== null) {\n\t\tconst paramName = auxParam[0].match(/[a-z]+/)[0]\n\t\tlet paramValue = auxParam[0].match(/[0-9,]+/)[0]\n\t\t// Special param: Width is an array\n\t\tif ('w' === paramName) {\n\t\t\tparamValue = _.map(paramValue.split(','), (val) => Number(val))\n\t\t} else {\n\t\t\tparamValue = Number(paramValue)\n\t\t}\n\n\t\tparams[paramName] = paramValue\n\t}\n\n\t// Add in default file params\n\tconst defaults = { jpg: opts.jpg, webp: opts.webp }\n\tparams = _.assignIn(defaults, params)\n\n\t// Return constructed params object\n\treturn params\n}", "function getParam(paramArray,name){\n for(var i= 0;i<paramArray.length;i++){ \n var param=paramArray[i].split(\"=\");\n if(param[0]==name)return param[1];\n } \n return \"\";\n}", "getParameters() {\n assert(typeof this.link === 'string', 'You must provide at least one string as link!');\n const matches = this.REGEX_MATCHER_CURIE_PARAMS.exec(this.link);\n if (!matches || !matches[1]) return [];\n return matches[1].split(this.REGEX_MATCHER_PARAM_SPIT);\n }", "function pj_get_params(args) {\n var rxp = /\\+([a-z][a-z0-9_]*(?:=[^\\s]*)?)/gi;\n var params = {};\n var match;\n while (match = rxp.exec(args)) {\n pj_mkparam(params, match[1]);\n }\n return params;\n}", "function prepare_param(param){\n var sub = param.substring(1),\n group = sub.match(/.{1,2}/g);\n\n return group;\n }", "function Params() {\n if (currentToken() == \"(\") {\n nextToken();\n ArgList();\n if (currentToken() == \")\") {\n nextToken();\n return;\n } else {\n let errorMessage = \"Não foi encontrado o fechamento da lista de parâmetros da função\";\n handleError(errorMessage);\n nextToken();\n }\n } else {\n return;\n }\n }", "function parse_get_parameters() {\n if (location.search.length < 1) {\n return null;\n }\n else {\n var parameters = [];\n location.search\n .substr(1)\n .split(\"&\")\n .forEach(function (item) {\n let temp = item.split(\"=\");\n parameters.push(\n {\n parameter_name: temp[0],\n parameter_value: temp[1]\n }\n )\n });\n\n return parameters;\n }\n}", "function layers_get_parameter_by_name(name, url) {\n\t\tname = name.replace(/[\\[]/, \"\\\\[\").replace(/[\\]]/, \"\\\\]\");\n\t\tvar regex = new RegExp(\"[\\\\?&]\" + name + \"=([^&#]*)\"),\n\t\t\tresults = regex.exec(url);\n\t\treturn results === null ? \"\" : decodeURIComponent(results[1].replace(/\\+/g, \" \"));\n\t}", "function _getParamNames(func) {\n var funStr = func.toString();\n return funStr.slice(funStr.indexOf('(')+1, funStr.indexOf(')')).match(/([^\\s,]+)/g);\n}", "function getParam(name,url){\n\tname=name.replace(/[\\[]/,\"\\\\\\[\").replace(/[\\]]/,\"\\\\\\]\");\n\tvar regexS=\"[\\\\?&]\"+name+\"=([^&#]*)\";\n\tvar regex=new RegExp(regexS);\n\tvar results=regex.exec(url);\n\treturn(results==null)?\"\":results[1];\n}", "function params(name) {\r\n name = name.replace(/[\\[]/, \"\\\\\\[\").replace(/[\\]]/, \"\\\\\\]\");\r\n var regexS = \"[\\\\?&]\" + name + \"=([^&#]*)\";\r\n var regex = new RegExp(regexS);\r\n var results = regex.exec(document.location.href);\r\n if (results == null)\r\n return \"\";\r\n else\r\n return results[1];\r\n }", "parseParams(location){\n let route = this; \n var keys=[],params={};\n var tokens = this.getMatch(location.pathname);\n if (tokens && tokens.keys.length!=0){\n var i = 1;\n var keys = tokens.keys;\n keys.forEach((e) => params[e.name] = tokens.token[i++] );\n }\n this.params = params;\n return params;\n }", "parameterParse(str, name = `Unknown Component`){\n\t\t\tlet obj = {}\n\t\t\t// merge spaces\n\t\t\tstr = str.replace(/\\s+/g, ` `);\n\t\t\t// delete extra spaces\n\t\t\tstr = str.replace(/(^\\s*)|(\\s*$)/g,``);\n\t\t\t// convert to obj-like format\n\t\t\tstr = str.replace(/\\ /g, \";\");\n\t\t\tstr = str.replace(/\\=/g, \":\");\n\t\t\ttry{\n\t\t\t\tlet r = {};\n\t\t\t\teval(`r = {${str}};`);\n\t\t\t\t// check if `name` set\n\t\t\t\tif(typeof(r.name) == 'undefined')\n\t\t\t\t\tthrow 'Missing nessary parameter \"name\"';\n\t\t\t\treturn r;\n\t\t\t}catch(err){\n\t\t\t\tconsole.error(new Error(`Wrong component parameters declare in ${name}`));\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "function getParam(regex){\r\n\treturn document.location.pathname.match(regex);\r\n}", "function getParamNames(query) {\n var re = /%(\\w+)/g;\n var m = re.exec(query);\n var names = [];\n while (m) {\n names.push(m[1]);\n m = re.exec(query);\n }\n return names;\n}", "function getParamNames(func) {\r\n var fnStr = func.toString().replace(STRIP_COMMENTS, '')\r\n var result = fnStr.slice(fnStr.indexOf('(')+1, fnStr.indexOf(')')).match(ARGUMENT_NAMES)\r\n if(result === null)\r\n result = []\r\n return result\r\n }", "function userParamsOf(expr){\n let userRx = RegExp('[#\\$]([A-Za-z_]+)', 'g');\n let list = expr.match(userRx) || [];\n return list.map(str => str.substr(1));\n}", "function extractParameters(route, fragment) {\n var params = route.exp.exec(fragment);\n\n if (!params) {\n return false;\n }\n\n params = params.slice(1);\n\n return Object.keys(route.keys).reduce(function(memo, key, i) {\n var param = params[i];\n\n if (param) {\n\n if (key[0] === '*') {\n param = param.split('/').map(decodeURIComponent);\n } else {\n param = decodeURIComponent(param);\n }\n\n\n memo[key.substr(1)] = param;\n }\n\n return memo;\n }, {});\n}", "function getRequiredParameterNames(template) {\n\n const params = [];\n\n var matches;\n while ((matches = rg.exec(template)) != null) {\n params.push(matches[1]);\n }\n\n return params;\n}", "function getURLparams() {\n var paramsArray = getURLSearch().split('&');\n var returnArray = [];\n\n paramsArray.forEach(function(param) {\n \n splitedParams = param.split('=');\n\n returnArray.push({\n name: splitedParams[0],\n value: splitedParams[1]\n });\n\n });\n\n return returnArray;\n}", "function getUrlParameters(name) {\r\n name = name.replace(/[\\[]/, '\\\\[').replace(/[\\]]/, '\\\\]');\r\n var regex = new RegExp('[\\\\?&]' + name + '=([^&#]*)');\r\n var results = regex.exec(location.search);\r\n return results === null ? '' : decodeURIComponent(results[1].replace(/\\+/g, ' '));\r\n}", "static parseVariables(parameters, usedVariables){\n let variables = [];\n\n let splittedParameter;\n for(let parameter of parameters){\n splittedParameter = parameter.split(' ');\n\n for(let word of splittedParameter){\n if(usedVariables[word]){\n variables.push(word);\n }\n }\n }\n\n return variables;\n }", "function getNamedParams(pathName = '') {\n if (pathName.trim().length === 0) return []\n const namedUrlParams = getPathNames(pathName);\n return namedUrlParams.reduce((validParams, param) => {\n if (param[0] === ':') {\n validParams.push(param.slice(1));\n }\n\n return validParams\n }, [])\n }", "function parseParameters(def, spec, scope) {\n var params = {}, pdef, i, n;\n for (i=0, n=def.params.length; i<n; ++i) {\n pdef = def.params[i];\n params[pdef.name] = parseParameter$1(pdef, spec, scope);\n }\n return params;\n }", "function parse_parameters(message){\n parameters = message.replace(/^(!{1}|'{1}|#{1}|\\]{1}|\\${1}(\\${2})?|>{1})\\w*/,\"\");\n parameters = parameters.match(/\\S(.)+/);\n return parameters && parameters[0]\n}", "static parse(text) {\n const result = new URLQuery();\n if (text) {\n if (text.startsWith(\"?\")) {\n text = text.substring(1);\n }\n let currentState = \"ParameterName\";\n let parameterName = \"\";\n let parameterValue = \"\";\n for (let i = 0; i < text.length; ++i) {\n const currentCharacter = text[i];\n switch (currentState) {\n case \"ParameterName\":\n switch (currentCharacter) {\n case \"=\":\n currentState = \"ParameterValue\";\n break;\n case \"&\":\n parameterName = \"\";\n parameterValue = \"\";\n break;\n default:\n parameterName += currentCharacter;\n break;\n }\n break;\n case \"ParameterValue\":\n switch (currentCharacter) {\n case \"&\":\n result.set(parameterName, parameterValue);\n parameterName = \"\";\n parameterValue = \"\";\n currentState = \"ParameterName\";\n break;\n default:\n parameterValue += currentCharacter;\n break;\n }\n break;\n default:\n throw new Error(\"Unrecognized URLQuery parse state: \" + currentState);\n }\n }\n if (currentState === \"ParameterValue\") {\n result.set(parameterName, parameterValue);\n }\n }\n return result;\n }", "static parse(text) {\n const result = new URLQuery();\n if (text) {\n if (text.startsWith(\"?\")) {\n text = text.substring(1);\n }\n let currentState = \"ParameterName\";\n let parameterName = \"\";\n let parameterValue = \"\";\n for (let i = 0; i < text.length; ++i) {\n const currentCharacter = text[i];\n switch (currentState) {\n case \"ParameterName\":\n switch (currentCharacter) {\n case \"=\":\n currentState = \"ParameterValue\";\n break;\n case \"&\":\n parameterName = \"\";\n parameterValue = \"\";\n break;\n default:\n parameterName += currentCharacter;\n break;\n }\n break;\n case \"ParameterValue\":\n switch (currentCharacter) {\n case \"&\":\n result.set(parameterName, parameterValue);\n parameterName = \"\";\n parameterValue = \"\";\n currentState = \"ParameterName\";\n break;\n default:\n parameterValue += currentCharacter;\n break;\n }\n break;\n default:\n throw new Error(\"Unrecognized URLQuery parse state: \" + currentState);\n }\n }\n if (currentState === \"ParameterValue\") {\n result.set(parameterName, parameterValue);\n }\n }\n return result;\n }", "function getParamValue(name) {\r\n var location = decodeURI(window.location.toString());\r\n var index = location.indexOf(\"?\") + 1;\r\n var subs = location.substring(index, location.length);\r\n var splitted = subs.split(\"&\");\r\n\r\n for (i = 0; i < splitted.length; i++) {\r\n var s = splitted[i].split(\"=\");\r\n var pName = s[0];\r\n var pValue = s[1];\r\n if (pName == name) {\r\n console.log(pValue);\r\n return pValue;\r\n }\r\n }\r\n}", "function getParameter(url, name) {\n\t\t// scheme : // [username [: password] @] hostname [: port] [/ [path] [? query] [# fragment]]\n\t\tvar e = new RegExp('^(?:https?|ftp)(?::/*(?:[^?]+)[?])([^#]+)'),\n\t\t\tmatches = e.exec(url),\n\t\t\tf = new RegExp('(?:^|&)' + name + '=([^&]*)'),\n\t\t\tresult = matches ? f.exec(matches[1]) : 0;\n\n\t\treturn result ? SnowPlow.decodeWrapper(result[1]) : '';\n\t}", "function matchDetails(m, isSearch) {\n var id, regexp, segment, type, cfg, arrayMode;\n id = m[2] || m[3]; // IE[78] returns '' for unmatched groups instead of null\n cfg = config.params[id];\n segment = pattern.substring(last, m.index);\n regexp = isSearch ? m[4] : m[4] || (m[1] == '*' ? '.*' : null);\n type = $$UMFP.type(regexp || \"string\") || inherit($$UMFP.type(\"string\"), { pattern: new RegExp(regexp) });\n return {\n id: id, regexp: regexp, segment: segment, type: type, cfg: cfg\n };\n }", "function matchDetails(m, isSearch) {\n var id, regexp, segment, type, cfg, arrayMode;\n id = m[2] || m[3]; // IE[78] returns '' for unmatched groups instead of null\n cfg = config.params[id];\n segment = pattern.substring(last, m.index);\n regexp = isSearch ? m[4] : m[4] || (m[1] == '*' ? '.*' : null);\n type = $$UMFP.type(regexp || \"string\") || inherit($$UMFP.type(\"string\"), { pattern: new RegExp(regexp) });\n return {\n id: id, regexp: regexp, segment: segment, type: type, cfg: cfg\n };\n }", "function matchDetails(m, isSearch) {\n var id, regexp, segment, type, cfg, arrayMode;\n id = m[2] || m[3]; // IE[78] returns '' for unmatched groups instead of null\n cfg = config.params[id];\n segment = pattern.substring(last, m.index);\n regexp = isSearch ? m[4] : m[4] || (m[1] == '*' ? '.*' : null);\n type = $$UMFP.type(regexp || \"string\") || inherit($$UMFP.type(\"string\"), { pattern: new RegExp(regexp) });\n return {\n id: id, regexp: regexp, segment: segment, type: type, cfg: cfg\n };\n }", "function variables(name, str) {\n var re = new RegExp(name + '\\\\.([a-zA-Z_][a-zA-Z_0-9]*)', 'g');\n var nameVar = {}, varname, vartype;\n var match = null;\n while (match = re.exec(str)) {\n if (!(match[1] in nameVar)) {\n varname = name + '_' + match[1] + '_' + (variables.count++);\n nameVar[match[1]] = varname;\n }\n }\n return nameVar; \n}", "function GetParameters(name) {\n var reg = new RegExp(\"(^|&)\" + name + \"=([^&]*)(&|$)\");\n var r = window.location.search.substr(1).match(reg);\n if (r != null) {\n return decodeURI(r[2]);//解决中文乱码\n\n } else {\n return null;\n }\n }", "function GetParameters(name) {\n var reg = new RegExp(\"(^|&)\" + name + \"=([^&]*)(&|$)\");\n var r = window.location.search.substr(1).match(reg);\n if (r != null) {\n return decodeURI(r[2]);//解决中文乱码\n\n } else {\n return null;\n }\n }", "function GetParameters(name) {\n var reg = new RegExp(\"(^|&)\" + name + \"=([^&]*)(&|$)\");\n var r = window.location.search.substr(1).match(reg);\n if (r != null) {\n return decodeURI(r[2]);//解决中文乱码\n\n } else {\n return null;\n }\n }", "getParameters() {\n\t\treturn this.paramDefs.map((param) => param.name);\n\t}", "getParameterByName(name, search) {\n const match = RegExp(\"[?&]\" + name + \"=([^&]*)\").exec(search);\n return match && decodeURIComponent(match[1].replace(/\\+/g, \" \"));\n }", "function matchDetails(m, isSearch) {\n var id, regexp, segment, type, cfg, arrayMode;\n id = m[2] || m[3]; // IE[78] returns '' for unmatched groups instead of null\n cfg = config.params[id];\n segment = pattern.substring(last, m.index);\n regexp = isSearch ? m[4] : m[4] || (m[1] == '*' ? '.*' : null);\n type = $$UMFP.type(regexp || \"string\") || inherit($$UMFP.type(\"string\"), { pattern: new RegExp(regexp, config.caseInsensitive ? 'i' : undefined) });\n return {\n id: id, regexp: regexp, segment: segment, type: type, cfg: cfg\n };\n }", "function matchDetails(m, isSearch) {\n var id, regexp, segment, type, cfg, arrayMode;\n id = m[2] || m[3]; // IE[78] returns '' for unmatched groups instead of null\n cfg = config.params[id];\n segment = pattern.substring(last, m.index);\n regexp = isSearch ? m[4] : m[4] || (m[1] == '*' ? '.*' : null);\n type = $$UMFP.type(regexp || \"string\") || inherit($$UMFP.type(\"string\"), { pattern: new RegExp(regexp, config.caseInsensitive ? 'i' : undefined) });\n return {\n id: id, regexp: regexp, segment: segment, type: type, cfg: cfg\n };\n }", "function getUrlParam(url){\n var obj = {},\n \tarr = url.match(/[?|&][^&=]+=[^&=]+/g);\n\t\tif(getVarType(arr) === \"array\"){\n\t\t for(let i=0; i<arr.length; i++){\n\t\t let param = arr[i].slice(1);\n\t\t obj[param.split(\"=\")[0]] = param.split(\"=\")[1];\n\t\t }\n\t\t}\n\t\treturn obj;\n }", "function namedParamsValues() {\n const allPathName = pathNames();\n const allNamedParamsKeys = namedParamsWithIndex();\n\n return allNamedParamsKeys.reduce((values, paramKey) => {\n values.push(allPathName[paramKey.index]);\n return values;\n }, []);\n }", "function matchDetails(m, isSearch) {\n var id, regexp, segment, type, cfg, arrayMode;\n id = m[2] || m[3]; // IE[78] returns '' for unmatched groups instead of null\n cfg = config.params[id];\n segment = pattern.substring(last, m.index);\n regexp = isSearch ? m[4] : m[4] || (m[1] == '*' ? '.*' : null);\n type = $$UMFP.type(regexp || \"string\") || inherit($$UMFP.type(\"string\"), {pattern: new RegExp(regexp)});\n return {\n id: id, regexp: regexp, segment: segment, type: type, cfg: cfg\n };\n }", "function namedParams() {\n const allPathName = pathNames();\n const allNamedParamsKeys = namedParamsWithIndex();\n\n return allNamedParamsKeys.reduce((values, paramKey) => {\n values[paramKey.value] = allPathName[paramKey.index];\n return values;\n }, {});\n }", "function getUrlParameter(url, name) {\r\n\tname = name.replace(/[\\[]/, \"\\\\\\[\").replace(/[\\]]/, \"\\\\\\]\");\r\n\tvar regexS = \"[\\\\?&]\" + name + \"=([^&#]*)\";\r\n\tvar regex = new RegExp(regexS);\r\n\tvar results = regex.exec(url);\r\n\tif (results == null)\r\n\t\treturn \"\";\r\n\telse\r\n\t\treturn results[1];\r\n}", "function namedParamsValues() {\n const allPathName = pathNames();\n const allNamedParamsKeys = namedParamsWithIndex();\n\n return allNamedParamsKeys.reduce((values, paramKey) => {\n values.push(allPathName[paramKey.index]);\n return values;\n }, []);\n }", "function matchDetails(m, isSearch) {\n\t var id, regexp, segment, type, cfg, arrayMode;\n\t id = m[2] || m[3]; // IE[78] returns '' for unmatched groups instead of null\n\t cfg = config.params[id];\n\t segment = pattern.substring(last, m.index);\n\t regexp = isSearch ? m[4] : m[4] || (m[1] == '*' ? '.*' : null);\n\t type = $$UMFP.type(regexp || \"string\") || inherit($$UMFP.type(\"string\"), { pattern: new RegExp(regexp) });\n\t return {\n\t id: id, regexp: regexp, segment: segment, type: type, cfg: cfg\n\t };\n\t }", "function namedParams() {\n const allPathName = pathNames();\n const allNamedParamsKeys = namedParamsWithIndex();\n\n return allNamedParamsKeys.reduce((values, paramKey) => {\n values[paramKey.value] = allPathName[paramKey.index];\n return values;\n }, {});\n }", "function matchDetails(m, isSearch) {\n var id, regexp, segment, type, cfg, arrayMode;\n id = m[2] || m[3]; // IE[78] returns '' for unmatched groups instead of null\n cfg = config.params[id];\n segment = pattern.substring(last, m.index);\n regexp = isSearch ? m[4] : m[4] || (m[1] == '*' ? '.*' : null);\n\n if (regexp) {\n type = $$UMFP.type(regexp) || inherit($$UMFP.type(\"string\"), { pattern: new RegExp(regexp, config.caseInsensitive ? 'i' : undefined) });\n }\n\n return {\n id: id, regexp: regexp, segment: segment, type: type, cfg: cfg\n };\n }", "function matchDetails(m, isSearch) {\n var id, regexp, segment, type, cfg, arrayMode;\n id = m[2] || m[3]; // IE[78] returns '' for unmatched groups instead of null\n cfg = config.params[id];\n segment = pattern.substring(last, m.index);\n regexp = isSearch ? m[4] : m[4] || (m[1] == '*' ? '.*' : null);\n\n if (regexp) {\n type = $$UMFP.type(regexp) || inherit($$UMFP.type(\"string\"), { pattern: new RegExp(regexp, config.caseInsensitive ? 'i' : undefined) });\n }\n\n return {\n id: id, regexp: regexp, segment: segment, type: type, cfg: cfg\n };\n }", "function matchDetails(m, isSearch) {\n var id, regexp, segment, type, cfg, arrayMode;\n id = m[2] || m[3]; // IE[78] returns '' for unmatched groups instead of null\n cfg = config.params[id];\n segment = pattern.substring(last, m.index);\n regexp = isSearch ? m[4] : m[4] || (m[1] == '*' ? '.*' : null);\n\n if (regexp) {\n type = $$UMFP.type(regexp) || inherit($$UMFP.type(\"string\"), { pattern: new RegExp(regexp, config.caseInsensitive ? 'i' : undefined) });\n }\n\n return {\n id: id, regexp: regexp, segment: segment, type: type, cfg: cfg\n };\n }", "function matchDetails(m, isSearch) {\n var id, regexp, segment, type, cfg, arrayMode;\n id = m[2] || m[3]; // IE[78] returns '' for unmatched groups instead of null\n cfg = config.params[id];\n segment = pattern.substring(last, m.index);\n regexp = isSearch ? m[4] : m[4] || (m[1] == '*' ? '.*' : null);\n\n if (regexp) {\n type = $$UMFP.type(regexp) || inherit($$UMFP.type(\"string\"), { pattern: new RegExp(regexp, config.caseInsensitive ? 'i' : undefined) });\n }\n\n return {\n id: id, regexp: regexp, segment: segment, type: type, cfg: cfg\n };\n }", "function matchDetails(m, isSearch) {\n var id, regexp, segment, type, cfg, arrayMode;\n id = m[2] || m[3]; // IE[78] returns '' for unmatched groups instead of null\n cfg = config.params[id];\n segment = pattern.substring(last, m.index);\n regexp = isSearch ? m[4] : m[4] || (m[1] == '*' ? '.*' : null);\n\n if (regexp) {\n type = $$UMFP.type(regexp) || inherit($$UMFP.type(\"string\"), { pattern: new RegExp(regexp, config.caseInsensitive ? 'i' : undefined) });\n }\n\n return {\n id: id, regexp: regexp, segment: segment, type: type, cfg: cfg\n };\n }", "function matchDetails(m, isSearch) {\n var id, regexp, segment, type, cfg, arrayMode;\n id = m[2] || m[3]; // IE[78] returns '' for unmatched groups instead of null\n cfg = config.params[id];\n segment = pattern.substring(last, m.index);\n regexp = isSearch ? m[4] : m[4] || (m[1] == '*' ? '.*' : null);\n\n if (regexp) {\n type = $$UMFP.type(regexp) || inherit($$UMFP.type(\"string\"), { pattern: new RegExp(regexp, config.caseInsensitive ? 'i' : undefined) });\n }\n\n return {\n id: id, regexp: regexp, segment: segment, type: type, cfg: cfg\n };\n }", "function matchDetails(m, isSearch) {\n var id, regexp, segment, type, cfg, arrayMode;\n id = m[2] || m[3]; // IE[78] returns '' for unmatched groups instead of null\n cfg = config.params[id];\n segment = pattern.substring(last, m.index);\n regexp = isSearch ? m[4] : m[4] || (m[1] == '*' ? '.*' : null);\n\n if (regexp) {\n type = $$UMFP.type(regexp) || inherit($$UMFP.type(\"string\"), { pattern: new RegExp(regexp, config.caseInsensitive ? 'i' : undefined) });\n }\n\n return {\n id: id, regexp: regexp, segment: segment, type: type, cfg: cfg\n };\n }", "function matchDetails(m, isSearch) {\n var id, regexp, segment, type, cfg, arrayMode;\n id = m[2] || m[3]; // IE[78] returns '' for unmatched groups instead of null\n cfg = config.params[id];\n segment = pattern.substring(last, m.index);\n regexp = isSearch ? m[4] : m[4] || (m[1] == '*' ? '.*' : null);\n\n if (regexp) {\n type = $$UMFP.type(regexp) || inherit($$UMFP.type(\"string\"), { pattern: new RegExp(regexp, config.caseInsensitive ? 'i' : undefined) });\n }\n\n return {\n id: id, regexp: regexp, segment: segment, type: type, cfg: cfg\n };\n }", "function matchDetails(m, isSearch) {\n var id, regexp, segment, type, cfg, arrayMode;\n id = m[2] || m[3]; // IE[78] returns '' for unmatched groups instead of null\n cfg = config.params[id];\n segment = pattern.substring(last, m.index);\n regexp = isSearch ? m[4] : m[4] || (m[1] == '*' ? '.*' : null);\n\n if (regexp) {\n type = $$UMFP.type(regexp) || inherit($$UMFP.type(\"string\"), { pattern: new RegExp(regexp, config.caseInsensitive ? 'i' : undefined) });\n }\n\n return {\n id: id, regexp: regexp, segment: segment, type: type, cfg: cfg\n };\n }", "function matchDetails(m, isSearch) {\n var id, regexp, segment, type, cfg, arrayMode;\n id = m[2] || m[3]; // IE[78] returns '' for unmatched groups instead of null\n cfg = config.params[id];\n segment = pattern.substring(last, m.index);\n regexp = isSearch ? m[4] : m[4] || (m[1] == '*' ? '.*' : null);\n\n if (regexp) {\n type = $$UMFP.type(regexp) || inherit($$UMFP.type(\"string\"), { pattern: new RegExp(regexp, config.caseInsensitive ? 'i' : undefined) });\n }\n\n return {\n id: id, regexp: regexp, segment: segment, type: type, cfg: cfg\n };\n }", "function matchDetails(m, isSearch) {\n var id, regexp, segment, type, cfg, arrayMode;\n id = m[2] || m[3]; // IE[78] returns '' for unmatched groups instead of null\n cfg = config.params[id];\n segment = pattern.substring(last, m.index);\n regexp = isSearch ? m[4] : m[4] || (m[1] == '*' ? '.*' : null);\n\n if (regexp) {\n type = $$UMFP.type(regexp) || inherit($$UMFP.type(\"string\"), { pattern: new RegExp(regexp, config.caseInsensitive ? 'i' : undefined) });\n }\n\n return {\n id: id, regexp: regexp, segment: segment, type: type, cfg: cfg\n };\n }", "function matchDetails(m, isSearch) {\n var id, regexp, segment, type, cfg, arrayMode;\n id = m[2] || m[3]; // IE[78] returns '' for unmatched groups instead of null\n cfg = config.params[id];\n segment = pattern.substring(last, m.index);\n regexp = isSearch ? m[4] : m[4] || (m[1] == '*' ? '.*' : null);\n\n if (regexp) {\n type = $$UMFP.type(regexp) || inherit($$UMFP.type(\"string\"), { pattern: new RegExp(regexp, config.caseInsensitive ? 'i' : undefined) });\n }\n\n return {\n id: id, regexp: regexp, segment: segment, type: type, cfg: cfg\n };\n }", "function matchDetails(m, isSearch) {\n var id, regexp, segment, type, cfg, arrayMode;\n id = m[2] || m[3]; // IE[78] returns '' for unmatched groups instead of null\n cfg = config.params[id];\n segment = pattern.substring(last, m.index);\n regexp = isSearch ? m[4] : m[4] || (m[1] == '*' ? '.*' : null);\n\n if (regexp) {\n type = $$UMFP.type(regexp) || inherit($$UMFP.type(\"string\"), { pattern: new RegExp(regexp, config.caseInsensitive ? 'i' : undefined) });\n }\n\n return {\n id: id, regexp: regexp, segment: segment, type: type, cfg: cfg\n };\n }", "function parseTparam(s) {\n\n\tvar tset= {PSTART:true, PNAME: true, PEND:true}\n\n\tvar object= {name:\"tparam\",pname:null}\n\n\tvar tk= scaner(s.substr(counter),tset)\n\n\tif(tk.token==\"PNAME\"){\n\t\tcounter+=tk.value.length //increment counter\n\t\tobject.pname=tk.value.trim()\n\t}\n\tif(tk.token==\"PEND\"){ \n\t\tcounter+= 3 // increment counter for \"}}}\"\n\t\treturn object\n\t}\n\n\treturn object\n\n}", "function readListParam( name, params ) {\n let array = [];\n\n const INDEXED_PARAM_REGEX = new RegExp( '^' + name + '\\\\[([0-9]+)\\\\]$' );\n for( let property of Object.keys(params) ) {\n let matches = INDEXED_PARAM_REGEX.exec( property );\n if( matches !== null ) {\n let index = matches[1];\n array[ index ] = params[ property ];\n }\n }\n\n if ( params.hasOwnProperty( name ) ) {\n let value = params[ name ];\n if ( typeof value === \"string\" ) {\n array.push( value );\n } else if ( Array.isArray( value ) ) {\n array = array.concat( value );\n }\n }\n\n return array;\n}", "function parseParameters(def, spec, scope) {\n var params = {}, pdef, i, n;\n for (i=0, n=def.params.length; i<n; ++i) {\n pdef = def.params[i];\n params[pdef.name] = parseParameter(pdef, spec, scope);\n }\n return params;\n}", "function parseParameters(def, spec, scope) {\n var params = {}, pdef, i, n;\n for (i=0, n=def.params.length; i<n; ++i) {\n pdef = def.params[i];\n params[pdef.name] = parseParameter(pdef, spec, scope);\n }\n return params;\n}", "function matchDetails(m, isSearch) {\n var id, regexp, segment, type, cfg, arrayMode;\n id = m[2] || m[3]; // IE[78] returns '' for unmatched groups instead of null\n cfg = config.params[id];\n segment = pattern.substring(last, m.index);\n regexp = isSearch ? m[4] : m[4] || (m[1] == '*' ? '.*' : null);\n type = $$UMFP.type(regexp || \"string\") || inherit($$UMFP.type(\"string\"), { pattern: new RegExp(regexp, config.caseInsensitive ? 'i' : undefined) });\n return {\n id: id, regexp: regexp, segment: segment, type: type, cfg: cfg\n };\n }", "function getParamNames(func) {\n const fnStr = func.toString().replace(STRIP_COMMENTS, '');\n let result = fnStr\n .slice(fnStr.indexOf('(') + 1, fnStr.indexOf(')'))\n .split(',')\n .map(content => {\n return content.trim().replace(/\\s?=.*$/, '');\n });\n if (result.length === 1 && result[0] === '') {\n result = [];\n }\n return result;\n}", "function parameters(lexer) {\n\tconst type = require('./type')\n\n\tconst params = [ ]\n\tlexer.expect('(')\n\n\twhile (true) {\n\t\tif (lexer.peek().type == ')')\n\t\t\tbreak\n\n\t\tconst name = lexer.expect('ID').match\n\t\tlet optional = false\n\t\tif (lexer.peek().type == '?') {\n\t\t\toptional = true\n\t\t\tlexer.next()\n\t\t}\n\n\t\tlexer.expect(':')\n\t\tconst paramType = type(lexer)\n\n\t\tparams.push({ name, optional, type: paramType })\n\t}\n\n\tlexer.expect(')')\n\treturn params\n}", "function getParameter(url, name) {\n var regex_search = \"[\\\\?&#]\" + name + \"=([^&#]*)\";\n var regex = new RegExp(regex_search);\n var results = regex.exec(url);\n return results ? decode_wrapper(results[1]) : '';\n }", "function getParameterByName(name, queryString) {\n name = name.replace(/[\\[]/, \"\\\\\\[\").replace(/[\\]]/, \"\\\\\\]\");\n var regexS = '(?:\\\\?|&(?:amp;)?)(' + name + ')(?:=?([^&#]*))';\n var regex = new RegExp(regexS, 'g');\n var results;\n var resultsAsAList = [];\n queryString = queryString || window.location.search;\n while (results = regex.exec(queryString)) {\n resultsAsAList.push(decodeURIComponent(results[2].replace(/\\+/g, \" \")));\n }\n return resultsAsAList;\n}", "function GetArgument(name)\r\n {\r\n name = \"/\" + name + \"=\";\r\n for(var each = new Enumerator(WScript.Arguments); !each.atEnd(); each.moveNext())\r\n {\r\n var item = \"\"+each.item();\r\n var start = item.search(new RegExp(name, \"i\"));\r\n if(start >= 0)\r\n {\r\n return item.substr(start+name.length);\r\n }\r\n }\r\n\r\n return null;\r\n }", "function get_param(name) {\n var params_str = get_params();\n if (params_str === \"\") {\n return \"\";\n }\n var params = params_str.split('&');\n for (var i = 0; i < params.length; ++i) {\n var param = params[i];\n var pair = param.split('=');\n if (pair.length !== 2) {\n continue;\n }\n if (pair[0] === name) {\n return decodeURIComponent(pair[1]);\n }\n }\n return \"\";\n}", "function matchDetails(m, isSearch) {\n var id,\n regexp,\n segment,\n type,\n cfg;\n\n id = m[2] || m[3]; // IE[78] returns '' for unmatched groups instead of null\n cfg = config.params[id];\n segment = pattern.substring(last, m.index);\n regexp = isSearch ? m[4] : m[4] || (m[1] === '*' ? '.*' : null);\n\n if (regexp) {\n type = $$UMFP.type(regexp) || inherit($$UMFP.type(\"string\"), { pattern: new RegExp(regexp, config.caseInsensitive ? 'i' : undefined) });\n }\n\n return {\n id: id,\n regexp: regexp,\n segment: segment,\n type: type,\n cfg: cfg\n };\n }", "function process_parameters(command_obj, given_params){\n var param_set = {}\n for(var i=0; i < command_obj['parameters'].length; i++){\n key = command_obj['parameters'][i]\n switch(command_obj['param_types'][i]){\n case \"username\":\n value = given_params[i].match(/^<@(\\d+)(?:>)$/)\n if(value) param_set[key] = value[1]\n else return null;\n break;\n case \"number\":\n value = given_params[i].match(/^\\d+$/g)\n if(value) param_set[key] = parseInt(value[0])\n else return null;\n break;\n case \"word\":\n value = given_params[i].match(/^\\S+$/g)\n if(value) param_set[key] = value[0]\n else return null;\n break;\n }\n }\n return param_set\n}", "function getParameterByFromString(name,urlParamString){\n\tname = name.replace(/[\\[]/, \"\\\\\\[\").replace(/[\\]]/, \"\\\\\\]\");\n\tvar regexS = \"[\\\\?&]\" + name + \"=([^&#]*)\";\n\tvar regex = new RegExp(regexS);\n\tvar results = regex.exec(urlParamString);\n\tif(results == null) return \"\";\n\telse return decodeURIComponent(results[1].replace(/\\+/g, \" \"));\n}", "function getParams(url, param) { \n var valueArray = new Array();\n urlArray = url.split(\"?\")\n if (urlArray.length > 1) {\n var queryString = urlArray[1]; \n var hash = queryString.lastIndexOf('#');\n if (hash >= 0) // remove boomark reference\n queryString = queryString.substring(0, hash);\n var qsArray = queryString.split(\"&\");\n for (var i = 0 ; i < qsArray.length; i++) {\n attrValue = qsArray[i];\n avArray = attrValue.split(\"=\");\n if (avArray[0].toLowerCase() == param.toLowerCase()) { \n valueArray[valueArray.length] = avArray[1];\n } \n }\n }\n return valueArray;\n}", "function matchDetails(m, isSearch) {\n\t var id, regexp, segment, type, cfg, arrayMode;\n\t id = m[2] || m[3]; // IE[78] returns '' for unmatched groups instead of null\n\t cfg = config.params[id];\n\t segment = pattern.substring(last, m.index);\n\t regexp = isSearch ? m[4] : m[4] || (m[1] == '*' ? '.*' : null);\n\n\t if (regexp) {\n\t type = $$UMFP.type(regexp) || inherit($$UMFP.type(\"string\"), { pattern: new RegExp(regexp, config.caseInsensitive ? 'i' : undefined) });\n\t }\n\n\t return {\n\t id: id, regexp: regexp, segment: segment, type: type, cfg: cfg\n\t };\n\t }", "function getParameterByName(name) {\n \tname = name.replace(/[\\[]/, \"\\\\[\").replace(/[\\]]/, \"\\\\]\");\n \tvar regex = new RegExp(\"[\\\\?&]\" + name + \"=([^&#]*)\"),\n \tresults = regex.exec(location.search);\n \treturn results === null ? \"\" : decodeURIComponent(results[1].replace(/\\+/g, \" \"));\n \t}", "function parseParameters(url){\n\t\tif(url.indexOf(\"?\") !== -1){\n\t\tcallbackResponse = url.split(\"?\")[1];\n\t\tvar responseParameters = (callbackResponse).split(\"&\");\n\t\tvar parameterMap = [];\n\t\tfor(var i = 0; i < responseParameters.length; i++) {\n\t\t\tparameterMap[decodeURI(responseParameters[i].split(\"=\")[0])] = decodeURI(responseParameters[i].split(\"=\")[1]);\n\t\t}\n\t\treturn parameterMap;\n\t\t}else{\n\t\t\treturn \"\";\n\t\t}\n\t}", "function getParameterByName(name) {\n \n \treturn decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search)||[,\"\"])[1].replace(/\\+/g, '%20'))||null;\n \n}", "function searchParams(name, url) {\n if (!url) url = location.href;\n name = name.replace(/[\\[]/, \"\\\\\\[\").replace(/[\\]]/, \"\\\\\\]\");\n var regexS = \"[\\\\?&]\" + name + \"=([^&#]*)\";\n var regex = new RegExp(regexS);\n var results = regex.exec(url);\n return results == null ? null : results[1];\n}", "function nodeParamsOf(expr){\n let userRx = RegExp('@([A-Za-z_]+)', 'g');\n let list = expr.match(userRx) || [];\n return list.map(str => str.substr(1));\n}", "getParameterByName(name, url) {\n if (!url) url = location.href;\n name = name.replace(/[\\[\\]]/g, '\\\\$&');\n const regex = new RegExp(`[?&]${name}(=([^&#]*)|&|#|$)`);\n const results = regex.exec(url);\n if (!results) return null;\n if (!results[2]) return '';\n return decodeURIComponent(results[2].replace(/\\+/g, ' '));\n }", "function parseParameter(spec, ctx, params) {\n if (!spec || !vegaUtil.isObject(spec)) return spec;\n\n for (var i=0, n=PARSERS.length, p; i<n; ++i) {\n p = PARSERS[i];\n if (vegaUtil.hasOwnProperty(spec, p.key)) {\n return p.parse(spec, ctx, params);\n }\n }\n return spec;\n }", "getParameter (\n\t\trequest // command to parse\n\t) {\n\t\t// return all string (parameter) after # character (# isn't include)\n\t\treturn request.substring(request.lastIndexOf(\"#\") + 1); \n\t}", "function getParam(name)\n{\n let start=location.search.indexOf(\"?\"+name+\"=\");\n if (start<0){\n start=location.search.indexOf(\"&\"+name+\"=\");\n }\n if (start<0){\n return '';\n }\n start += name.length+2;\n let end=location.search.indexOf(\"&\",start)-1;\n if (end<0){\n end=location.search.length;\n }\n let result='';\n for(let i=start;i<=end;i++) {\n let c=location.search.charAt(i);\n result=result+(c=='+'?' ':c);\n }\n return unescape(result);\n}", "function getParam( name )\n{\n name = name.replace(/[\\[]/,\"\\\\\\[\").replace(/[\\]]/,\"\\\\\\]\");\n var regexS = \"[\\\\?&]\"+name+\"=([^&#]*)\";\n var regex = new RegExp( regexS );\n var results = regex.exec( window.location.href );\n if( results == null )\n return \"\";\n else\n return results[1];\n}", "getParameterByName(name, url = window.location.href) {\n name = name.replace(/[\\[\\]]/g, '\\\\$&');\n var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),\n results = regex.exec(url);\n if (!results) return null;\n if (!results[2]) return '';\n return decodeURIComponent(results[2].replace(/\\+/g, ' '));\n }", "function parseArgs() {\n var args = {};\n var query = document.location.search.substring(1);\n var pairs = query.split('&');\n for (var i = 0; i < pairs.length; i++) {\n pos = pairs[i].indexOf('=');\n if (pos == -1) continue;\n var argname = pairs[i].substring(0, pos);\n var value = pairs[i].substring(pos+1);\n args[argname] = value;\n }\n return args;\n }", "function getURLParameter(name) {\r\n\t\treturn decodeURI((new RegExp(name + '=' + '(.+?)(&|$)').exec(location.search) || [, ''])[1]);\r\n\t}", "function getParameterByName(name) {\n\t\t\tname = name.replace(/[\\[]/, \"\\\\[\").replace(/[\\]]/, \"\\\\]\");\n\t\t\tvar regex = new RegExp(\"[\\\\?&]\" + name + \"=([^&#]*)\"),\n\t\t\t results = regex.exec(location.search);\n\t\t\treturn results === null ? \"\" : decodeURIComponent(results[1].replace(/\\+/g, \" \"));\n\t\t}", "function getParameter(name){\n var a_param=getParamsArray();\n return getParam(a_param,name);\n}", "function getParameterByName(name, url) {\n name = name.replace(/[\\[\\]]/g, \"\\\\$&\")\n var regex = new RegExp(\"[?&]\" + name + \"(=([^&#]*)|&|#|$)\"),\n results = regex.exec(url)\n if (!results) return null\n if (!results[2]) return ''\n return decodeURIComponent(results[2].replace(/\\+/g, \" \"))\n}", "function parseParam(param) {\n\t var parts = param.match(/\\s*(.+)\\s*=\\s*\"?([^\"]+)\"?/);\n\t if (!parts) return null;\n\n\t return {\n\t key: parts[1],\n\t value: parts[2]\n\t };\n\t}", "function getParameterByName(name) {\n name = name.replace(/[\\[]/, \"\\\\[\").replace(/[\\]]/, \"\\\\]\");\n var regex = new RegExp(\"[\\\\?&]\" + name + \"=([^&#]*)\");\n var results = regex.exec(location.search);\n return results == null ? \"\" : decodeURIComponent(results[1].replace(/\\+/g, \" \"));\n}", "getParameterByName(name, url) {\n if (!url) url = window.location.href;\n name = name.replace(/[\\[\\]]/g, \"\\\\$&\");\n var regex = new RegExp(\"[?&]\" + name + \"(=([^&#]*)|&|#|$)\"),\n results = regex.exec(url);\n if (!results) return null;\n if (!results[2]) return '';\n return decodeURIComponent(results[2].replace(/\\+/g, \" \"));\n }", "get_args(src) {\n let reg = this.regex_clone(FDEFS1)\n reg.lastIndex = 0\n\n let m = reg.exec(src)\n if (!m[3].trim().length) return []\n let arr = m[3].split(',')\n .map(x => x.trim())\n .filter(x => x !== '_id' && x !== '_tf')\n return arr\n }", "function getParameterByName(name) {\n name = name.replace(/[\\[]/, \"\\\\[\").replace(/[\\]]/, \"\\\\]\");\n var regex = new RegExp(\"[\\\\?&]\" + name + \"=([^&#]*)\"),\n results = regex.exec(location.search);\n return results == null ? \"\" : decodeURIComponent(results[1].replace(/\\+/g, \" \"));\n }" ]
[ "0.6831164", "0.65833646", "0.64589727", "0.6265143", "0.62453675", "0.62131315", "0.61607796", "0.6096688", "0.5997581", "0.59180355", "0.5914052", "0.58954144", "0.5886781", "0.5879769", "0.5852887", "0.5850394", "0.5848297", "0.58256835", "0.5807743", "0.57947236", "0.5784929", "0.5779367", "0.57721126", "0.5771565", "0.5763322", "0.5759962", "0.5714444", "0.56676775", "0.5667658", "0.5667658", "0.566418", "0.5643727", "0.5626834", "0.5626834", "0.5626834", "0.56161356", "0.5612949", "0.5612949", "0.5612949", "0.5608722", "0.5605604", "0.5600061", "0.5600061", "0.5574159", "0.5554127", "0.55403686", "0.55310816", "0.55308026", "0.55305874", "0.55281895", "0.5524003", "0.55234474", "0.55234474", "0.55234474", "0.55234474", "0.55234474", "0.55234474", "0.55234474", "0.55234474", "0.55234474", "0.55234474", "0.55234474", "0.55234474", "0.55234474", "0.5511905", "0.5511733", "0.5508913", "0.5508913", "0.54998815", "0.54891235", "0.5480442", "0.5479486", "0.54734117", "0.54613775", "0.5443148", "0.5439093", "0.5434174", "0.5433267", "0.54315704", "0.5403413", "0.53978866", "0.53950334", "0.53930104", "0.5391131", "0.53896606", "0.53880954", "0.53827614", "0.53667766", "0.5366581", "0.53620684", "0.5350554", "0.53500295", "0.5337727", "0.5336433", "0.53362983", "0.5334036", "0.53309816", "0.5330949", "0.532745", "0.53259665", "0.5324977" ]
0.0
-1
========================================================================================== Called when the go back button is pressed. ==========================================================================================
function goBack() { window.location = "input.html?lang=" + lang +"&dist=" + dist +"&diam=" + diam + "&trag=" + traj + "&velo=" + velo + "&pjd=" + pjd + "&tjd=" + tgd + "&wlvl=" + wlvl + "&planet=" + planet; }//=========================================================================================
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onBack() {\n resetPageState();\n }", "function goBack() {\n\t\t\t$window.history.back();\n\t\t}", "function goBack() {\n\t\ttogglePage();\n\t\tdisposeThrownShurikens();\n\t\tupdateThrownShurikenCount();\n\t\tcleanBelt();\n\t}", "function onBackKeyDown() {\n\t//alert(\"Back Pressed\");\n\tgo_back();\n}", "function goBack(){\n // *Navigating back:\n window.history.back();\n }", "function goBack() { $window.history.back(); }", "function onBackKey(){\n\tif(app.session.data.extra_prev_state > 0){\n\t\tback_to_pre();\n\t}else{\n\t\thide_all_pages();\n\t\tif(app.session.data.cstate > 0){\n\t\t\tvar callback = app.session.data.state_back_callback[app.session.data.cstate];\n\t\t\tif(callback !== null)\n\t\t\t\tcallback();\n\t\t}\n\t\tstop_processing();\n\t}\n}", "function onBackKeyDown() {\n \tif($.mobile.activePage.is(\"#start\")) {\n \t\tnavigator.app.exitApp(); // Exit app if current page is start Page\n \t} else {\n \t\tnavigator.app.backHistory(); // Go back in history in any other case\n \t}\n }", "function goBack() {\n window.history.back();\n }", "function goBack() {\n history.go(-1);\n }", "function onBackKeyDown() {\n goBack();\n}", "function goBack() {\n $ionicHistory.goBack();\n }", "function back () {\n\t\n\t window.history.back();\n\t \n}", "function goBack() {\n window.history.back();\n }", "function goBack() {\n window.history.back();\n }", "function goBack() {\n window.history.back();\n }", "function handleBackButton(event) {\n var currState = state.get();\n \n switch( state.get() ) {\n case \"info\":\n toggleInfo(false);\n break;\n case \"browse\":\n state.change(\"video\");\n hideNavOverVideo();\n break;\n case \"video\":\n if(video.isAdPlaying()) {\n video.clearAd(); // clear the setting of current playing ad.\n video.handleComplete();\n }\n\n // console.log( 'resetting start index' );\n list.resetStartIndex();\n LG.List.getCurrent().resetStartIndex();\n\n video.stop();\n LG.Info.getCurrent() && LG.Info.getCurrent().hide();\n hidePlayer();\n state.change(\"main\");\n break;\n case \"error\":\n hideError();\n state.restore();\n focusActiveSlide();\n break;\n }\n }", "function backAction(e) {\r\n\r\n\tif(e != null)\r\n\t\te.preventDefault();\r\n\r\n\tif(History.size() == 0) {\r\n\t\tnavigator.app.exitApp();\r\n\t} else {//Hay historia (Vaciar siempre la pila antes de cambiar)\r\n\t\tif(History.topPage() == '#index') {\r\n\t\t\t//Como es index, vacio la pila\r\n\t\t\tHistory.clear();\r\n\t\t\tbrowse($.mobile.path.get() + \"../index/index.html\", \"none\");\r\n\r\n\t\t} else if(History.topPage() == '#typeList') {\r\n\t\t\tHistory.pop();\r\n\t\t\tbrowse($.mobile.path.get() + \"../typeList/typeList.html\", \"none\");\r\n\r\n\t\t} else if(History.topPage() == '#settings') {\r\n\t\t\tHistory.pop();\r\n\t\t\tbrowse($.mobile.path.get() + \"../settings/settings.html\", \"none\");\r\n\r\n\t\t}\r\n\t}\r\n}", "function onGoBack() {\n setFormDataEdit(null);\n setStep('Menu');\n }", "goback() { this.back = true; }", "function onBackKeyDown() {\n\t// Handle the back button\n\tconsole.log('device.onBackKeyDown');\n\twindow.history.back();\n}", "function onBtnBackClicked() {\n btnFooterLeft.enabled = false;\n AppCsf.navigator.gotoPreviousPage();\n }", "function onBackButton() {\r\n\t\t\tnavigator.app.exitApp();\r\n\t\t}", "function OnAndroidBackButton_Click( e )\r\n{\r\n Back() ;\r\n}", "function onBack (e) {\n\t// get the previous URL\n chrome.runtime.sendMessage({method: 'get', key: 'currentUrl'}, function (response) {\n\t\t// update server of user's click, and send user back to previous page\n\t\tvar currentUrl = response.currentUrl;\n chrome.runtime.sendMessage({method: 'set', key: 'ignore', value: currentUrl});\n chrome.runtime.sendMessage({method: 'logAction', action: 'image_process_choice', data: 'back', hostname: new URL(currentUrl).hostname});\n\t\twindow.location.assign(currentUrl);\n\t});\n}", "function goBack() {\n\t\t\t$state.go('^');\n\t\t}", "function navigateOnePageBack() {\n window.history.back();\n}", "function OnBtnBack_Click( e )\r\n{\r\n Back() ;\r\n}", "function OnBtnBack_Click( e )\r\n{\r\n Back() ;\r\n}", "function OnBtnBack_Click( e )\r\n{\r\n Back() ;\r\n}", "function OnBtnBack_Click( e )\r\n{\r\n Back() ;\r\n}", "function OnBtnBack_Click( e )\r\n{\r\n Back() ;\r\n}", "function OnBtnBack_Click( e )\r\n{\r\n Back() ;\r\n}", "function goBack() {\n\tloadElements();\n}", "function previousPage()\r\n{\r\n\thistory.go(-1);\r\n}", "handleBackButton() {\n // ToastAndroid.show('Back button is pressed', ToastAndroid.SHORT);\n // return false;\n }", "handleBackAction() {\n this._triggerOnBack();\n }", "goBackToPreviousPage() {\n this.location.back();\n }", "goBackToPreviousPage() {\n this.location.back();\n }", "function pageBackAction() {\n if (typeof(navigator) != 'undefined' && typeof(navigator.app) != 'undefined' && typeof(navigator.app.backHistory) == 'function')\n navigator.app.backHistory();\n else\n history.go(-1);\n}", "function backAction() {\n switch (navigation[navigation.length-1]) {\n case \"list\":\n listAvailableQuizzes();\n break;\n case \"question\":\n showMore(quizNumber);\n break;\n case \"leaderboard\":\n showMore(quizNumber);\n break;\n\n }\n navigation.pop();\n if (navigation.length <= 0) {\n backButton.style.display = \"none\";\n }\n}", "back()\n {\n\n\n history.back();\n\n\n }", "function back(){\r\n window.history.back();\r\n}", "function goBack() {\r\n window.history.back();\r\n}", "function back(){\n\twindow.history.back();\n}", "goBack() {\n history.back();\n window.scroll(0,0);\n }", "function back() {\n if (history.length > 1) {\n setHistory(prev => prev.slice(0, prev.length - 1));\n }\n }", "back() {\n this.page = 0;\n }", "function goBack() {\r\n\twindow.history.back();\r\n}", "function goBack(){\n\twindow.history.back();\n}", "function onBackKeyDown(){\n //if($.mobile.activePage.attr('id') == 'home'){ // PARA AÑADIR MAS USAR SEPARADORES \"||\"\n // navigator.notification.confirm(\n // '¿Salir de la aplicación?', \n // function(button) {\n // if (button == 2) {\n // navigator.app.exitApp();\n // }\n // }, \n // 'Salir', 'No,Si');return false;\n // }\n // else { //else if ($.mobile.activePage.attr('id') == 'charlas'){\n //$.mobile.changePage('#home');\n //}else\n\t\tnavigator.app.exitApp();\n // }\n }", "function onBack() {\n\n\t\tif (step > 1) {\n\t\t\tdispatch(DECREMENT_STEP(step)).then( (response) => {\n\t\t\t\t// update button state\n\t\t\t\tsetBackButtonDisabled(response.payload === 1);\n\t\t\t});\n\t\t}\n\t}", "function onBackButton(oEvent) {\n\t\t\t\t\toEvent.preventDefault();\n\t\t\t\t}", "function onBack() {\r\n \tLogger.getInstance().info(\"ref=error-delegate at=on-back\");\r\n \tUi.popView(Ui.SLIDE_IMMEDIATE);\r\n \treturn true;\r\n }", "function navBack(prevState) {\n $state.go(prevState, {}, {reload: true}); // reload to get reslove data again\n }", "function onGoBack() {\n // history.goBack();\n history.push(location?.state?.from ?? \"/\");\n }", "function goBack() {\r\n window.history.go(-1)\r\n}", "function goBack() {\n window.history.go(-1);\n}", "function goBack() {\r\n window.history.back();\r\n}", "function goBack() {\n window.location.reload();\n }", "function goBack() {\n window.history.back();\n}", "function goBack() {\n window.history.back();\n}", "function goBack() { // go back function\n history.go(-1);\n}", "function goback() \n{\nhistory.go(-1);\n}", "function OnAndroidBackButton_Click( e )\r\n{\r\n // We can go back only if a saving is not in progress\r\n if( !bIsWorkInProgress )\r\n {\r\n Back() ;\r\n }\r\n}", "function OnAndroidBackButton_Click( e )\r\n{\r\n // We can go back only if a saving is not in progress\r\n if( !bIsWorkInProgress )\r\n {\r\n Back() ;\r\n }\r\n}", "function OnAndroidBackButton_Click( e )\r\n{\r\n // We can go back only if a saving is not in progress\r\n if( !bIsWorkInProgress )\r\n {\r\n Back() ;\r\n }\r\n}", "function OnAndroidBackButton_Click( e )\r\n{\r\n // We can go back only if a saving is not in progress\r\n if( !bIsWorkInProgress )\r\n {\r\n Back() ;\r\n }\r\n}", "function OnAndroidBackButton_Click( e )\r\n{\r\n // We can go back only if a saving is not in progress\r\n if( !bIsWorkInProgress )\r\n {\r\n Back() ;\r\n }\r\n}", "function back() {\n setMode(history.pop());\n setHistory(history);\n }", "function goBack() {\n window.history.back();\n}", "function goBack() {\n window.history.back();\n}", "function goBack() {\n window.history.back();\n}", "function goBack() {\n window.history.back();\n}", "function goBack() {\n window.history.back();\n}", "function goBack() {\n window.history.back();\n}", "function onBackKeyDown() {\n window.location.href = \"index.html\";\n}", "navigateBack() {\r\n this.isExplicitNavigationBack = true;\r\n this.history.navigateBack();\r\n }", "function onBackKeyDown() {\r\n}", "navigateBack() {\n this.props.clearSearch(3);\n this.props.dashboardNavigateBack();\n this.props.disableSelectionMode();\n this.props.setDashboardBucketId(null);\n }", "function voltarHistory()\n\t{\n\t\twindow.history.back();\n\t}", "function returnBack() {\n window.history.back()\n}", "_onBack () {\n this.props.navigator.pop();\n }", "function goBack(){\n window.history.back();\n}", "function back() {\n if (history.length > 1) {\n\n setMode(history[history.length - 2]);\n setHistory(prev => [...prev.slice(0, -1)]);\n }\n }", "back() {\n // if we're on the first page of a step, return to the previous step.\n // otherwise, if we're still navigating within the same step, just update the page number.\n if (scope.currentStep().currentPageIndex == 0) {\n scope.currentStepIndex--;\n }\n\n else {\n scope.currentStep().currentPageIndex--;\n }\n }", "_onBack () { \n this.props.navigator.pop();\n }", "return() {\n this.location.back();\n }", "back() {\n window.history.back();\n }", "back() {\n window.history.back();\n }", "back() {\n window.history.back();\n }", "back() {\n window.history.back();\n }", "back() {\n window.history.back();\n }", "back() {\n window.history.back();\n }", "back() {\n window.history.back();\n }", "back() {\n window.history.back();\n }", "back() {\n window.history.back();\n }", "back() {\n window.history.back();\n }", "back() {\n window.history.back();\n }", "back() {\n window.history.back();\n }", "back() {\n window.history.back();\n }" ]
[ "0.85363877", "0.81332374", "0.8117902", "0.809075", "0.80466723", "0.79605484", "0.7934213", "0.7921901", "0.7905417", "0.78705794", "0.78627366", "0.7856675", "0.78442496", "0.783533", "0.783533", "0.783533", "0.7789205", "0.77861273", "0.776468", "0.7760706", "0.77428174", "0.77416474", "0.7739183", "0.7732174", "0.7730908", "0.7728685", "0.77274334", "0.7722986", "0.7722986", "0.7722986", "0.7722986", "0.7722986", "0.7722986", "0.7719041", "0.77082795", "0.7687594", "0.7686099", "0.768059", "0.768059", "0.7676739", "0.7674946", "0.7669827", "0.7665756", "0.7664409", "0.7657356", "0.765504", "0.7646756", "0.76456815", "0.76320654", "0.76234215", "0.76192325", "0.76181024", "0.7614307", "0.7608326", "0.7594031", "0.7591653", "0.75904924", "0.7580333", "0.7567825", "0.7566114", "0.7566024", "0.7566024", "0.7558173", "0.7549114", "0.7533636", "0.7533636", "0.7533636", "0.7533636", "0.7533636", "0.75246125", "0.7523055", "0.7523055", "0.7523055", "0.7523055", "0.7523055", "0.7523055", "0.75207996", "0.7518436", "0.7517277", "0.75155973", "0.75063145", "0.7491533", "0.7490804", "0.7488352", "0.74511325", "0.74476683", "0.74398726", "0.74323297", "0.7430632", "0.7430632", "0.7430632", "0.7430632", "0.7430632", "0.7430632", "0.7430632", "0.7430632", "0.7430632", "0.7430632", "0.7430632", "0.7430632", "0.7430632" ]
0.0
-1
================================================================================== Adds a crater on the map at the selected location to the calculated size. ==================================================================================
function addCrater(location_) { var location1 = location_; dataProvider.setCbSelectDepthObject(parseInt(selectedBuilding)); var lat = location1.lat(); var lng = location1.lng(); dataProvider.setLatitude(parseFloat(lat)); dataProvider.setLongitude( parseFloat(lng)); dataProvider.setCbLocation(parseInt(cmbLocation)); lox = location_; //if crater exists remove from map. if (crater != null ) crater.setMap(null); var zoom = map.getZoom(); var lat = lox.lat(); var lng = lox.lng(); /* if (planet=='Earth') { var imageBounds = new google.maps.LatLngBounds ( new google.maps.LatLng(lat-0.09,lng-0.15), new google.maps.LatLng(lat+0.09,lng +0.15) ); crater = new google.maps.GroundOverlay('imgs/craterImpact.png',imageBounds); } else if (planet=='Moon') { var imageBounds = new google.maps.LatLngBounds ( new google.maps.LatLng(lat-0.45,lng-0.75), new google.maps.LatLng(lat+0.45,lng +0.75) ); crater = new google.maps.GroundOverlay('imgs/craterImpact.png',imageBounds); } else if (planet=='Mars') { var imageBounds = new google.maps.LatLngBounds ( new google.maps.LatLng(lat-0.45,lng-0.75), new google.maps.LatLng(lat+0.45,lng +0.75) ); crater = new google.maps.GroundOverlay('imgs/craterImpact.png',imageBounds); } */ var imageBounds = craterBounds(lat,lng, dataProvider.impactor.crDiam); crater = new google.maps.GroundOverlay('imgs/craterImpact.png',imageBounds); // //Add new ground overlay for the crater. crater.setMap(map); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function increaseSize() {\n\tif (selectedShape) {\n\t\tselectedShape.resize(5);\n\t\tdrawShapes();\n\t}\n}", "radiusResized() {\n\t\tif( this.searchRadius.getRadius() > locsearch.map_attributes.max_radius * 1000 ) {\n\t\t\tthis.searchRadius.setRadius( locsearch.map_attributes.max_radius * 1000 );\n\t\t}\n\t\tthis.checkZoomLevel();\n\t}", "function markerSize(earthquake_size) {\n return 200;\n}", "updateSize() {\n this.map.invalidateSize()\n }", "function setMapSize() {\n detail = +document.getElementById(\"detail\").value;\n ctx.canvas.width = document.getElementById(\"width_slider\").value;\n ctx.canvas.height = document.getElementById(\"height_slider\").value;\n}", "function addLocation() {\n\tvar i = locations.length;\n\tvar location = new Object();\n\tlocation.x = newLocationX;\n\tlocation.y = newLocationY;\n\tlocation.facing = facing;\n\t$(\"#fullBodymap\").append(\"<img src='resources/images/positionMarker.png' id='marker\"+i+facing+\"' />\");\n\tvar img = $(\"#marker\"+i+facing);\n\t$(\"#fullBodymap\").append(\"<img src='resources/images/markerButtonNormal.png' id='square\"+i+facing+\"' />\");\n\tvar square = $(\"#square\"+i+facing);\n\t$(\"#fullBodymap\").append(\"<div id='line\"+i+facing+\"' class='locationConnectorLine' />\");\n\tvar line = $(\"#line\"+i+facing);\n\t$(\"#square\"+i+facing).css('position','absolute');\n\t$(\"#marker\"+i+facing).css('position','absolute');\n\tvar loc = new Location(location.x, location.y, img, square, line);\n\tlocation.element = loc;\n\tlocations.push(location);\n}", "function resize() {\n\tmap.setSize();\n}", "function updateRacketSize(e) {\n if (gDebugging) console.log(\"Novo tamanho da raquete:\", gRacket.w);\n\n var newW = parseFloat(e.target.value);\n generateRacket(newW);\n render();\n}", "function mapResize(newSize){\r\n\r\n // Get current position\r\n var map_x = unsafeWindow.mapX;\r\n var map_y = unsafeWindow.mapY;\r\n var map_s = unsafeWindow.mapSize;\r\n\r\n // Calculate new X and Y\r\n var delta = parseInt((map_s - newSize) / 2);\r\n\r\n // Overwrite values\r\n map_x += delta;\r\n map_y += delta;\r\n\r\n // InnerHTML\r\n var ihtml = \"\";\r\n ihtml += '<tr>';\r\n ihtml += '<td height=\"38\">' + map_y + '</td>';\r\n ihtml += '<td colspan=\"' + newSize + '\" rowspan=\"' + newSize + '\">';\r\n ihtml += '<div style=\"background-image:url(graphic/map/gras4.png); position:relative; width:' + (53 * newSize) + 'px; height:' + (38 * newSize) +'px; overflow:hidden\" id=\"map\">';\r\n ihtml += '<div id=\"mapOld\" style=\"position:absolute; left:0px; top:0px\">';\r\n ihtml += '<div style=\"color:white; margin:10px\">Lade Karte...</div>';\r\n ihtml += '</div>';\r\n ihtml += '<div id=\"mapNew\" style=\"position:absolute; left:0px; top:0px\"></div>';\r\n ihtml += '</div>';\r\n ihtml += '</td>';\r\n ihtml += '</tr>';\r\n for(jj=1; jj<newSize; jj++){\r\n ihtml += '<tr><td width=\"20\" height=\"38\">' + (map_y + jj) + '</td></tr>';\r\n }\r\n ihtml += '<tr id=\"map_x_axis\">';\r\n ihtml += '<td height=\"20\"></td>';\r\n for(jj=0; jj<newSize; jj++){\r\n ihtml += '<td align=\"center\" width=\"53\">' + (map_x + jj) + '</td>';\r\n }\r\n ihtml += '</tr>';\r\n var tmp = document.getElementById(\"mapCoords\").innerHTML = ihtml;\r\n\r\n // Update data\r\n var url = \"http://\"+(\"\"+location.href).split(\"/\")[2] + \"/\" + unsafeWindow.mapURL + '&start_x=' + map_x + '&start_y=' + map_y + '&size_x=' + newSize + '&size_y=' + newSize;\r\n GM_xmlhttpRequest({\r\n method:\"GET\",\r\n url:url,\r\n onload:function(details){\r\n document.getElementById(\"mapOld\").innerHTML = details.responseText;\r\n }\r\n });\r\n\r\n // mapMoveTopo()\r\n var scrollX = map_x;\r\n var scrollY = map_y;\r\n unsafeWindow.scrollX = scrollX;\r\n unsafeWindow.scrollY = scrollY;\r\n var topoX = parseInt(document.getElementsByName('min_x')[0].value); //minimalstes x auf Karte rechts\r\n var topoY = parseInt(document.getElementsByName('min_y')[0].value); //minimalstes y auf Karte rechts\r\n\r\n var relX = scrollX - topoX;\r\n if(unsafeWindow.globalYDir == 1){\r\n var relY = scrollY - topoY;\r\n }else{\r\n var relY = (45-mapSize) - (scrollY-topoY);\r\n }\r\n \r\n // Rechteck verschieben\r\n document.getElementById('topoRect').style.left = (5*(relX)) + 'px';\r\n document.getElementById('topoRect').style.top = (5*(relY)) + 'px';\r\n document.getElementById('topoRect').style.width = (5*(newSize)) + 'px';\r\n document.getElementById('topoRect').style.height = (5*(newSize)) + 'px';\r\n\t \r\n\t unsafeWindow.ajaxMapInit(parseInt(unsafeWindow.mapX), parseInt(unsafeWindow.mapY), parseInt(newSize) , \"game.php?\"+getUrlParam(\"village\")+\"&screen=map&xml\", 1, 1);\r\n\t \r\n }", "function RadiusWidget(map, center, selectedPictures) {\r\n\tvar color;\r\n\tvar raza;\r\n\tif (selectedPictures >= 100000) {\r\n\t\tcolor = '#CC0000'; // red\r\n\t}\r\n\tif ((selectedPictures >= 10000) && (selectedPictures <= 99999)) {\r\n\t\tcolor = '#CCFF00'; // yellow\r\n\t}\r\n\tif ((selectedPictures >= 1000) && (selectedPictures <= 9999)) {\r\n\t\tcolor = '#00FF00'; // green\r\n\t}\r\n\tif ((selectedPictures >= 1) && (selectedPictures <= 999)) {\r\n\t\tcolor = '#0000CC'; // blue\r\n\t}\r\n\tif (selectedPictures == 0) {\r\n\t\tcolor = '#FFFFFF'; // white\r\n\t}\r\n\tif (map.getZoom() == 1) {\r\n\t\t$(\"#zoomMapLevel\").html(\" \" + map.getZoom());\r\n\t\t// $(\"#legendInfo\").append(\" here1 \");\r\n\t\traza = 320000;\r\n\t}\r\n\tif (map.getZoom() == 2) {\r\n\t\t$(\"#zoomMapLevel\").html(\" \" + map.getZoom());\r\n\t\traza = 320000\r\n\t}\r\n\tif (map.getZoom() == 3) {\r\n\t\t$(\"#zoomMapLevel\").html(\" \" + map.getZoom());\r\n\t\traza = 160000;\r\n\t}\r\n\tif (map.getZoom() == 4) {\r\n\t\t$(\"#zoomMapLevel\").html(\" \" + map.getZoom());\r\n\t\traza = 80000;\r\n\t}\r\n\tif (map.getZoom() == 5) {//\r\n\t\t$(\"#zoomMapLevel\").html(\" \" + map.getZoom());\r\n\t\traza = 40000;\r\n\t}\r\n\tif (map.getZoom() == 6) {//ok\r\n\t\t$(\"#zoomMapLevel\").html(\" \" + map.getZoom());\r\n\t\traza = 20000;\r\n\t}\r\n\tif (map.getZoom() == 7) {//ok\r\n\t\t$(\"#zoomMapLevel\").html(\" \" + map.getZoom());\r\n\t\traza = 10000;\r\n\t}\r\n\tif (map.getZoom() == 8) {//ok\r\n\t\t$(\"#zoomMapLevel\").html(\" \" + map.getZoom());\r\n\t\traza = 5000;\r\n\t}\r\n\tif (map.getZoom() == 9) {//ok\r\n\t\t$(\"#zoomMapLevel\").html(\" \" + map.getZoom());\r\n\t\traza = 2500;\r\n\t}\r\n\tif (map.getZoom() == 10) {//ok\r\n\t\t$(\"#zoomMapLevel\").html(\" \" + map.getZoom());\r\n\t\traza = 1250;\r\n\t}\r\n\tif (map.getZoom() == 11) {//ok\r\n\t\t$(\"#zoomMapLevel\").html(\" \" + map.getZoom());\r\n\t\traza = 625;\r\n\t}\r\n\tif (map.getZoom() == 12) {//ok\r\n\t\t$(\"#zoomMapLevel\").html(\" \" + map.getZoom());\r\n\t\traza = 312.5;\r\n\t}\r\n\tif (map.getZoom() == 13) {//ok\r\n\t\t$(\"#zoomMapLevel\").html(\" \" + map.getZoom());\r\n\t\traza = 156.25;\r\n\t}\r\n\tif (map.getZoom() == 14) {//ok\r\n\t\t$(\"#zoomMapLevel\").html(\" \" + map.getZoom());\r\n\t\traza = 78.125;\r\n\t}\r\n\tif (map.getZoom() == 15) {\r\n\t\t$(\"#zoomMapLevel\").html(\" \" + map.getZoom());\r\n\t\traza = 78.125;\r\n\t}\r\n\tif (map.getZoom() == 16) {\r\n\t\t$(\"#zoomMapLevel\").html(\" \" + map.getZoom());\r\n\t\traza = 78.125;\r\n\t}\r\n\tif (map.getZoom() == 17) {\r\n\t\t$(\"#zoomMapLevel\").html(\" \" + map.getZoom());\r\n\t\traza = 78.125;\r\n\t}\r\n\tif (map.getZoom() == 18) {\r\n\t\t$(\"#zoomMapLevel\").html(\" \" + map.getZoom());\r\n\t\traza = 78.125;\r\n\t}\r\n\tif (map.getZoom() == 19) {\r\n\t\t$(\"#zoomMapLevel\").html(\" \" + map.getZoom());\r\n\t\traza = 78.125;\r\n\t}\r\n\tif (map.getZoom() == 20) {\r\n\t\t$(\"#zoomMapLevel\").html(\" \" + map.getZoom());\r\n\t\traza = 78.125;\r\n\t}\r\n\tif (map.getZoom() == 21) {\r\n\t\t$(\"#zoomMapLevel\").html(\" \" + map.getZoom());\r\n\t\traza = 78.125;\r\n\t}\r\n\t// max 21 zoom levels\r\n\r\n\tvar circle = new google.maps.Circle( {\r\n\t\tmap : map,\r\n\t\tstrokeWeight : 2,\r\n\t\tfillOpacity : 0.6,\r\n\t\tcenter : center,\r\n\t\t//inverse projectiong scale\r\n\t\tradius : raza * map.getProjection().fromLatLngToPoint(new google.maps.LatLng(Math.abs(center.lat()), center.lng())).y / 100,\r\n\t\tfillColor : color,\r\n\t\tzIndex : 1\r\n\t});\r\n\r\n\tcircles.push(circle);\r\n\r\n\tcircles[circles.length - 1].setMap(map);\r\n}", "function UpdateRubberbandSizeData(loc) {\r\n // Height & width are the difference between were clicked\r\n // and current mouse position\r\n shapeBoundingBox.width = Math.abs(loc.x - mousedown.x)\r\n shapeBoundingBox.height = Math.abs(loc.y - mousedown.y)\r\n \r\n // If mouse is below where mouse was clicked originally\r\n if(loc.x > mousedown.x) {\r\n // Store mousedown because it is farthest left\r\n shapeBoundingBox.left = mousedown.x\r\n } else {\r\n // Store mouse location because it is most left\r\n shapeBoundingBox.left = loc.x\r\n }\r\n // If mouse location is below where clicked originally\r\n if(loc.y > mousedown.y) {\r\n // Store mousedown because it is closer to the top of the canvas\r\n shapeBoundingBox.top = mousedown.y\r\n } else {\r\n // Otherwise store mouse position\r\n shapeBoundingBox.top = loc.y\r\n }\r\n}", "function renderSize() {\n let sLinearScale = sizeScale();\n // Render transition between circle size change\n d3.selectAll(\".countryCircle\")\n .transition()\n .duration(1000)\n .attr(\"r\", d => sLinearScale(d[chosenSize]));\n // Refresh legend: size\n // d3.select(\"#sizeLegend\").html(\"\");\n createSizeLegend();\n}", "grow(){\n this.size.x += 5;\n this.size.y += 5;\n }", "function markerSize(size) {\n return size*1000;\n }", "function addNewLocation(event) {\n event.preventDefault();\n var location = event.target.location.value;\n var minCustomers = parseInt(event.target.minimumCustomers.value);\n var maxCustomers = parseInt(event.target.maximumCustomers.value);\n var averagePurchase = parseFloat(event.target.averagePurchase.value);\n\n new CookiesPerLocation(location,minCustomers,maxCustomers,averagePurchase);\n allLocationObjects[allLocationObjects.length-1].render();\n\n replaceHourlyTotals('cookieChart');\n replaceHourlyTotals('cookieStaff');\n}", "function markerSize(population) {\n return population / 60;\n}", "function adicionar_busca_raio()\n{\n\tremover_poligono();\n\tdistanceWidget = new DistanceWidget({\n map: map,\n distance: $(\"#default_distance\").val(), //define o raio em km da circunferencia\n maxDistance: 10,\n color: '#000000',\n activeColor: '#5599bb',\n icon: '/Content/images/maps_center_icon.png',\n sizerIcon: new google.maps.MarkerImage('http://code.google.com/intl/pt-BR/apis/maps/articles/mvcfun/resize-off.png'),\n activeSizerIcon: new google.maps.MarkerImage('http://code.google.com/intl/pt-BR/apis/maps/articles/mvcfun/resize.png')\n });\n\n\n map.fitBounds(distanceWidget.get('bounds'));\n //google.maps.event.addListener(distanceWidget, 'position_changed', updatePosition);\n}", "function markerSize(magnitude){\n return magnitude * 2\n}", "function pickLocation(){\n\n var cols = floor(width/sz);\n var rows = floor(height/sz);\n//create a spot on the canvas for the food to fill\n food= createVector(floor(random(cols)),floor(random(rows)));\n food.mult(sz);\n }", "function markerSize(magnitude) {\n return magnitude * 5;\n}", "function markerSize(magnitude) {\n return magnitude * 4;\n}", "renderMap(){\n if(this.props.trails.length>0) this.mapRendered=true //in some cases, trail data won't be available when component mounts, and if it doesn't then the code from componentDidMount will run in componenentDidUpdate\n if(this.props.trails.length===1) return //if there is only one marker, don't adjust size of the map\n\n //this sizes the map to fit all the markers\n const bounds = new window.google.maps.LatLngBounds()\n this.props.trails.map((trail)=>{\n bounds.extend(new window.google.maps.LatLng(\n trail.latitude,\n trail.longitude\n ))\n return null\n })\n\n this.refs.resultMap.map.fitBounds(bounds)\n }", "function range() {\n var p = document.getElementById('resize');\n var res = document.getElementById('radiusVal');\n rad = p.value;\n res.innerHTML=p.value+ \" m\";\n cityCircle.setMap(null);//deletes the origial circle to avoid redraws\n createCityCircle();\n}//range", "function markerSize(mag){\n return mag * 5\n}", "function markerSize(magnitude) {\n return magnitude * 5;\n}", "function markerSize(population) {\n return population / 40;\n }", "function craterBounds(lat_, lon_ ,craterDiameter){\n\n\tvar lat1 = lat_;\n\tvar lon1 = lon_;\n\tvar d = Math.SQRT2*craterDiameter/2.0;\n\tvar R = 6370000;\n\tvar brng1 = 45*Math.PI/180;\n\tvar brng2 = 225*Math.PI/180;\n\tlat1 = lat1*Math.PI/180;\n\tlon1 = lon1*Math.PI/180;\n\t\n\tvar lat2 = Math.asin( Math.sin(lat1)*Math.cos(d/R) + Math.cos(lat1)*Math.sin(d/R)*Math.cos(brng1) );\n\tvar lon2 = lon1 + Math.atan2(Math.sin(brng1)*Math.sin(d/R)*Math.cos(lat1), Math.cos(d/R)-Math.sin(lat1)*Math.sin(lat2));\n \n\tvar lat3 = Math.asin( Math.sin(lat1)*Math.cos(d/R) + Math.cos(lat1)*Math.sin(d/R)*Math.cos(brng2) );\n var lon3 = lon1 + Math.atan2(Math.sin(brng2)*Math.sin(d/R)*Math.cos(lat1), Math.cos(d/R)-Math.sin(lat1)*Math.sin(lat2));\n \n \tlat2 = lat2/(Math.PI/180);\n\tlon2 = lon2/(Math.PI/180);\n\tlat3 = lat3/(Math.PI/180);\n\tlon3 = lon3/(Math.PI/180);\n \n var bound = new google.maps.LatLngBounds( new google.maps.LatLng(lat3, lon3), new google.maps.LatLng(lat2,lon2));\t\t\n\n\treturn bound;\n}", "function markerSize(magnitude) {\n return magnitude * 5\n }", "function radwegHinzufuegen(clicked_id){\n if (clicked_id == \"themenradweg_1\"){\n themenradweg_1.addTo(map);\n map.fitBounds(themenradweg_1.getBounds());\n\n \n }if (clicked_id ==\"themenradweg_2\"){\n themenradweg_2.addTo(map);\n map.fitBounds(themenradweg_2.getBounds());\n\n\n }if(clicked_id ==\"themenradweg_3\"){\n themenradweg_3.addTo(map);\n map.fitBounds(themenradweg_3.getBounds());\n\n\n }if(clicked_id ==\"themenradweg_4\"){\n themenradweg_4.addTo(map);\n map.fitBounds(themenradweg_4.getBounds());\n \n\n }if(clicked_id ==\"themenradweg_5\"){\n themenradweg_5.addTo(map);\n map.fitBounds(themenradweg_5.getBounds());\n\n }if(clicked_id ==\"themenradweg_6\"){\n themenradweg_6.addTo(map);\n map.fitBounds(themenradweg_6.getBounds());\n\n }\n\n}", "function changeMapSize() {\n console.log('changeMapSize')\n\n let zoomScrollBar = document.getElementById('zoom')\n zoomScrollBar.style.display = 'block'\n zoomScrollBar.value = '6'\n\n if (mapSetting != mapSize) {\n mapSize = mapSetting\n let areaDiv = document.getElementById('area')\n $('.grid-piece').remove();\n if (mapSize == 'large') {\n gridDown = 180\n gridUp = -180\n numberOfDivs = 180 * 110\n $('#area').css( \"grid-template-columns\", \"repeat(180, 6px)\" );\n $('#area').css( \"grid-template-rows\", \"repeat(110, 6px)\" );\n addDivs(110 * 180);\n } else if (mapSize == 'medium') {\n gridDown = 130\n gridUp = -130\n numberOfDivs = 105 * 130\n $('#area').css( \"grid-template-columns\", \"repeat(130, 6px)\" );\n $('#area').css( \"grid-template-rows\", \"repeat(105, 6px)\" );\n addDivs(105 * 130);\n } else {\n gridDown = 100\n gridUp = -100\n numberOfDivs = 100 * 100\n $('#area').css( \"grid-template-columns\", \"repeat(100, 6px)\" );\n $('#area').css( \"grid-template-rows\", \"repeat(100, 6px)\" );\n addDivs(100 * 100);\n }\n mapSize = mapSetting\n }\n}", "function markerSize(magnitude) {\n return magnitude* 1300;\n}", "getMarkerSize(el, marker){\n\n const startValue=23;\n const rateIncrease=2;\n\n let projectsNumber= marker.properties.projects_number; \n\n\n if(projectsNumber){\n let markerSize=(projectsNumber*rateIncrease)+startValue;\n //console.log(markerSize);\n //console.log(projectsNumber)\n el.style.width =markerSize + 'px';\n el.style.height = markerSize + 'px';\n this.createMarker(el, marker); \n\n }\n \n \n\n\n\n\n\n }", "function markerSize(magnitude) {\n\n // multiply magnitude by a large number so we can actually see it on the map\n return magnitude * 25000;\n \n}", "size(r) {\n this._mass = r;\n this._radius = r;\n return this;\n }", "function resizeCanvas(size)\n{\n\t$(\"#map-canvas\").attr(\"width\", size);\n\t$(\"#map-canvas\").attr(\"height\", size);\n\t$(\"#map-canvas\").css(\"width\", size + \"px\");\n\t$(\"#map-canvas\").css(\"height\", size + \"px\");\n\t\n\t$(\"#map-container\").css(\"width\", size + \"px\");\n\t$(\"#map-container\").css(\"height\", size + \"px\");\n\t$(\"#map-container\").css(\"flex-basis\", size + \"px\");\n\t\n\t$(\"#map-content\").css(\"width\", size + \"px\");\n\t$(\"#map-content\").css(\"height\", size + \"px\");\n\t\n\t$(\"#map-canvas\").css(\"width\", size + \"px\");\n\t$(\"#map-canvas\").css(\"height\", size + \"px\");\n\t\n\t$(\"#map-image\").css(\"width\", size + \"px\");\n\n\t$(\"#map-canvas\").css(\"width\", size + \"px\");\n\t$(\"#map-canvas\").css(\"height\", size + \"px\");\n}", "function markerSize(mag) {\n return mag * 20000;\n}", "function InvalidateMapSize() {\n map.invalidateSize();\n }", "function markerSize(mag){\n return mag * 2\n }", "function addSirkel( lat, lng ){\n // Add a Circle overlay to the map.\n var radius = new google.maps.Circle({\n center: new google.maps.LatLng(lat, lng),\n radius: 1609 * 3,\n fillColor: \"#257bfa\",\n fillOpacity: 0.2,\n strokeColor: \"#257bfa\",\n strokeWeight: 0,\n zIndex: 0,\n });\n \n $.sirkel.radius = radius;\n radius.setMap( $.sirkel.map );\n \n }", "function markerSize(magnitude) {\n return magnitude * 3;\n}", "function captureSize() {\n\tchoice = sizeSelector.value;\n\tproduct.label = product.name + choice;\n\tproduct.size = choice;\n}", "setSize(size) {\n this.size = size;\n }", "function setBounds() {\n let bounds = new google.maps.LatLngBounds();\n\n flightMarkers.forEach((flightMarker) => {\n bounds.extend(flightMarker.position);\n });\n\n map.fitBounds(bounds);\n}", "function addLocation() \n{\n\t// Hide the dialog\n\ttoggleAddDialog();\n\n\t//Arène\n\tconst select = document.getElementById('selectRaidToAdd');\n\tconst selected = select.options[select.selectedIndex];\n\t//Position GPS\n\tconst geo = selected.value;\n\t//Nom de l'arène\n\tconst arene = selected.textContent;\n\n\t//Heure du Raid\n\tconst clock = document.getElementById('clockpicker');\n\tconst heureLancement = clock.value;\n\n\t//Niveau du Raid\n\tconst selectLevel = document.getElementById('levelRaidToAdd');\n\tconst selectedLevel = selectLevel.options[selectLevel.selectedIndex];\n\tconst valueLevel = selectedLevel.value;\n\n\tvar date = getDate()\n\n\tconst raid = {arene: arene, geo: geo, heureLancement:heureLancement, niveau:valueLevel, date:date};\n\n\t// Create a new card \n\tconst card = getRaidCard(raid);\n\n\t//& get the weather data from the server\n\t//getRaidFromNetwork(geo).then((forecast) => {\n\t// renderForecast(card, forecast);\n\t//});\n\n\trenderRaid(card, raid);\n\n\tconst id = raid.geo + raid.date + raid.heureLancement;\n\n\t// Save the updated list of selected raid.\n\traidApp.selectedLocations[id] = raid;\n\tsaveRaidList(raidApp.selectedLocations);\n\n\tdocument.getElementById('main').scrollTop = document.getElementById('main').scrollHeight + 100 ;\n}", "function getSize(sizeModLoc){\n return map(sizeModLoc, 400, 570, 100, 3)\n}", "function onLocationFound(e) {\n\n currentLocation = L.marker(e.latlng).addTo(map);\n radiusLocation = L.circle(e.latlng, {\n radius: 5000,\n opacity: 0,\n fillOpacity: 0\n });\n radiusLocation.addTo(map);\n radiusLocation.bringToBack();\n\n map.setZoom(15);\n var bounds = map.getBounds();\n //console.log(bounds);\n\n queryFloodMap(radiusLocation.getBounds());\n }", "function setMapSize(){\n\t//si la fenetre est inferieur a x alors on met la carte en largeur max (typiquement on est sur un smartphone)\n\tif(window.innerWidth < 769){\n\t\tvar largeur_a_enlever_a_la_carte = 0;\n\t\tvar hauteur_a_rajouter_a_la_liste = 50;\n\t}\n\telse{\n\t\tvar largeur_a_enlever_a_la_carte = 300;\n\t\tvar hauteur_a_rajouter_a_la_liste = 0;\n\t}\n\t//si le navigateur est internet explorer\n\tif (MQA.browser.name == \"msie\"){\n\t\tdocument.getElementById('map').style.width = document.body.offsetWidth - 20 - largeur_a_enlever_a_la_carte;\n\t\tdocument.getElementById('map').style.height = document.body.offsetHeight - $('#offset').height() - 20;\n\t\talert(\"Internet Explorer ne permet pas d'afficher les équipes et leur parcours. Utilisez un navigateur plus récent comme Chrome ou Firefox.\");\n\t\t//meme chose pour la liste\n\t\tdocument.getElementById('userlist').style.height = document.body.offsetHeight - $('#offset').height() - 20;\n\t} else {\n\t\tdocument.getElementById('map').style.width = window.innerWidth - largeur_a_enlever_a_la_carte;\n\t\tdocument.getElementById('map').style.height = window.innerHeight - $('#offset').height();\n\t\t//meme chose pour la liste\n\t\tdocument.getElementById('userlist').style.height = window.innerHeight - $('#offset').height() + hauteur_a_rajouter_a_la_liste;\t\n\t}\n\t\n}", "function update() {\n var bounds = getBounds(features);\n var radius = gridSize / 120000 * Math.pow(2, map.getZoom());\n\n var width = Math.abs((bounds.max[0] - bounds.min[0]) + 2 * radius);\n var height = Math.abs((bounds.max[1] - bounds.min[1]) + 2 * radius);\n var left = bounds.min[0] - radius;\n var top = bounds.min[1] - radius;\n\n svg.attr('width', width).attr('height', height)\n .style('left', left + 'px')\n .style('top', top + 'px');\n\n g.attr('transform', 'translate(' + -bounds.min[0] + ',' + -bounds.min[1] + ')');\n\n g.selectAll('circle')\n .attr('cx', function(d) { return map.latLngToLayerPoint(d.LatLng).x + radius; })\n .attr('cy', function(d) { return map.latLngToLayerPoint(d.LatLng).y + radius;})\n .attr('r', radius);\n }", "grow(factor) {\n this.radius = this.radius * factor\n }", "setSize(size) {\n this.size = size;\n }", "function LocationShifter(me, loc, size) {\n me.loc = loc;\n me.width = size[0];\n me.height = size[1];\n me.collide = collideLocationShifter;\n me.hidden = true;\n setSolid(me, \"blue\");\n return;\n}", "function refreshMapPosition() {\n //alert(\"on Map\");\n roeMapRadon.resize();\n roeMapRadon.reposition();\n }", "setSize() {\n this.size.D1 = this.shape.D1*this.unit.X;\n this.size.D2 = this.shape.D2*this.unit.Y;\n }", "function setZoom(){\r\n \r\n\r\n if (marker != null){\r\n mymap.removeLayer(marker)\r\n }\r\n\r\n if (circle != null){\r\n mymap.removeLayer(circle)\r\n }\r\n \r\n removeRoutingControl()//Remove Last Route if changed\r\n var radius=25000;//50 Kilometers\r\n var coordinatesArr=formControl.value.split(',');\r\n var lat_a=parseFloat(coordinatesArr[0]);\r\n var lng_a=parseFloat(coordinatesArr[1]);\r\n mymap.setView([lng_a,lat_a], 10);\r\n \r\n marker=new L.marker([lng_a,lat_a],{icon:mapLocation})\r\n mymap.addLayer(marker)\r\n circle=L.circle([lng_a,lat_a], radius).addTo(mymap);\r\n if (changer <= 1){\r\n \r\n Swal.fire({\r\n title: '!שימו לב',\r\n text: 'כל המקומות בתוך הרדיוס הכחול הם בטווח נסיעה של חצי שעה בממוצע מעיר מגוריכם',\r\n icon: 'info',\r\n confirmButtonText: 'אישור'\r\n })\r\n }\r\n changer++;\r\n \r\n \r\n \r\n \r\n\r\n}", "function markerSize(mag){\n return mag * 35000\n }", "function addMoreInSize() {\n if (typeof utag_data.product_attribute !== undefined) {\n if (\n utag_data.product_attribute == \"bed\" ||\n utag_data.product_attribute == \"bedroom set\"\n ) {\n var size = utag_data.size;\n var productAttribute = titleCase(utag_data.product_attribute);\n var colorFamily = utag_data.colorfamily;\n var queryUrl =\n \"https://brm-core-0.brsrvr.com/api/v1/core/?account_id=5221&auth_key=o5xlkgn7my5fmr5c&domain_key=livingspaces_com&request_id=fd8d6a02a5764b7995c600e766a38bda&url=%2fbr-checker&_br_uid_2=uid%253D4961390647524%253Av%253D11.8%253Ats%253D1463613117510%253Ahc%253D3145&ptype=other&request_type=search&q=%22\" +\n size +\n \"%22&start=0&rows=13&search_type=keyword&fl=title,pid,url,price,sale_price,reviews,reviews_count,thumb_image&fq=product_attribute%3A%22\" +\n productAttribute +\n \"%22&fq=color_groups%3A%22\" +\n colorFamily;\n var appendTarget = $(\"#moreLikeThis\").parent();\n constructRecSlider(\n queryUrl,\n \"moreSize\",\n \"More In This Size\",\n appendTarget,\n true\n );\n }\n }\n}", "function handleMapUpdate() {\n\t\t\tmap.theMap.updateSize();\n\t\t}", "function _refresh() {\n google.maps.event.trigger(_mapDOM.map, 'resize');\n _mapDOM.map.fitBounds(_markerBounds);\n}", "function markerSize(magnitude) {\n if (magnitude < 1) {\n return 5;\n }\n else if (magnitude < 2) {\n return 10;\n }\n else if (magnitude < 3) {\n return 20;\n }\n else if (magnitude < 4) {\n return 30;\n }\n else if (magnitude < 5) {\n return 40;\n }\n else {\n return 50;\n }\n}", "function onGeocode(r) {\n if (r.bbox) {\n const [west, south, east, north] = r.bbox\n p.save(roundBbox({north, south, east, west}))\n } else {\n const c1 = turfDestination(r.center, 5, 45)\n const c2 = turfDestination(r.center, 5, -135)\n const [east, north] = c1.geometry.coordinates\n const [west, south] = c2.geometry.coordinates\n const newBounds = roundBbox({north, south, east, west})\n p.save(newBounds)\n p.leaflet.map.fitBounds(toLatLngBounds(newBounds))\n }\n }", "function refreshMapPosition() {\n //alert(\"on Map\");\n roeMapRel.resize();\n roeMapRel.reposition();\n }", "function markerSize(magnitude) {\n return magnitude / 0.00005;\n }", "function refreshMapPosition() {\n //alert(\"on Map\");\n roeMapSulf.resize();\n roeMapSulf.reposition();\n }", "function resize() {\n width = parseInt(d3.select('#viz').style('width'));\n width = width - margin.left - margin.right;\n height = width * mapRatio;\n\n // update projection\n projection.translate([width / 2, height / 2])\n .center(ca_center)\n .scale(width * [mapRatio + mapRatioAdjuster]);\n\n // resize map container\n svg.style('width', width + 'px')\n .style('height', height + 'px');\n\n // resize map\n svg.selectAll(\"path\").attr('d', path);\n}", "function draw() {\n background(0);\n translate(width / 2., height / 2.);\n imageMode(CENTER);\n image(mapImg,0,0);\n for (var i = 0; i < locationData.length; i++)\n {\n //console.log(\"Drawing: \" + locationData[i].name);\n radius = map(locationData[i].checkins, checkInMin.value(), checkInMax.value(), rMin.value(), rMax.value());\n drawLocation(locationData[i], radius);\n }\n}", "function updateSize() {\n innerRadius = innerRadiusArg * canvas.width / 2;\n outerRadius = outerRadiusArg * canvas.width / 2;\n \n centerX = centerXArg * canvas.width;\n centerY = centerYArg * canvas.height;\n }", "function refreshMapPosition() {\n //alert(\"on Map\");\n roeMapNLCD.resize();\n roeMapNLCD.reposition();\n }", "updateSize() {\n this.w = this.ent.width + this.wo;\n this.h = this.ent.height + this.ho;\n }", "function refreshMapPosition() {\n //alert(\"on Map\");\n roeMapGulf.resize();\n roeMapGulf.reposition();\n }", "function edit_location_map() {\n initialize_add_location_map();\n convert_points_to_markers();\n if (typeof triangles != 'undefined') {\n createCurrentPolygons(triangles);\n placeCurrentPolygonsOnMap(map);\n }\n}", "setSizeBounds() {\n const cosAngle = Math.cos(this.angle * Math.PI / 180);\n const sinAngle = Math.sin(this.angle * Math.PI / 180);\n this.sizeBounds.alongX = this.size.D1*cosAngle;\n this.sizeBounds.alongY = this.size.D1*sinAngle + this.size.D2;\n }", "function UpdateRubberbandOnMove(loc) {\r\n // Stores changing height, width, x & y position of most \r\n // top left point being either the click or mouse location\r\n UpdateRubberbandSizeData(loc)\r\n\r\n // Redraw the shape\r\n drawRubberbandShape(loc)\r\n}", "function refreshMapPosition() {\n //alert(\"on Map\");\n roeMapLong.resize();\n roeMapLong.reposition();\n }", "function setMiniMapBounds(onResizingProcess) {\n\t\tvar mapClientWidth = document.getElementById(MAP).clientWidth;\n\t\tvar mapClientHeight = document.getElementById(MAP).clientHeight;\n\t\tif (onResizingProcess) {\n\t\t\tmapClientWidth -= document.getElementById(MAP).map.mapHeight > document.getElementById(MAP).clientHeight ? 17 : 0;\n\t\t\tmapClientHeight -= document.getElementById(MAP).map.mapWidth > mapClientWidth ? 17 : 0;\n\t\t}\n\t\tvar mapWidth = mapClientWidth > document.getElementById(MAP).map.mapWidth ? mapClientWidth : document.getElementById(MAP).map.mapWidth;\n\t\tvar mapHeight = mapClientHeight > document.getElementById(MAP).map.mapHeight ? mapClientHeight : document.getElementById(MAP).map.mapHeight;\n\t\tthis.xRate = document.getElementById(MINIMAP).clientWidth / mapWidth;\n\t\tthis.yRate = document.getElementById(MINIMAP).clientHeight / mapHeight;\n\t}", "function markerSize(count) {\n return 35000 + count*300;\n}", "function refreshMapPosition() {\n //alert(\"on Map\");\n roeMapAcid.resize();\n roeMapAcid.reposition();\n }", "function markerSize(eq) {\n return (Math.pow(eq, 3) / 2.3);\n}", "function markerSize(magnitud) {\n return magnitud;\n}", "function refreshMapPosition() {\n //alert(\"on Map\");\n roeMapBio.resize();\n roeMapBio.reposition();\n }", "function RectPackingMap(size,margin){if(margin===void 0){margin=0;}var _this=_super.call(this,null,null,BABYLON.Vector2.Zero(),size)||this;_this._margin=margin;_this._root=_this;return _this;}", "function addMarker(location) {\n\t\t\t\t\tif (supertargetPage > 1) {\n\t\t\t\t\t\tvar marker = new google.maps.Marker({\n\t\t\t\t\t\t\tmap: map,\n\t\t\t\t\t\t\tanchorPoint: new google.maps.Point(0, -29),\n\t\t\t\t\t\t\ticon: '../img/icons/map-marker-transparent.svg',\n\t\t\t\t\t\t\tposition: location\n\t\t\t\t\t\t});\n\t\t\t\t\t\tmarkers = [];\n\t\t\t\t\t\tmarkers.push(marker);\n\n\t\t\t\t\t\tvar cityCircle = new google.maps.Circle({\n\t strokeColor: '#FFFFFF',\n\t strokeOpacity: 0.1,\n\t strokeWeight: 0,\n\t fillColor: '#FFFFFF',\n\t fillOpacity: 0.1,\n\t map: map,\n\t center: location,\n\t\t\t\t\t\t\tradius: 25\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\t$('.radius-hidden').show();\n\n\t\t\t\t\t\t$('.range-slider.container__radius.irs-hidden-input').on('change', function() {\n\t\t\t\t\t\t\tcityCircle.setRadius = $(this).val();\n\t\t\t\t\t\t\tcityCircle.set('radius', parseInt($(this).val(), 10) );\n\t\t\t\t\t\t});\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar marker = new google.maps.Marker({\n\t\t\t\t\t\t\tmap: map,\n\t\t\t\t\t\t\tanchorPoint: new google.maps.Point(0, -29),\n\t\t\t\t\t\t\ticon: '../img/icons/map-marker.svg',\n\t\t\t\t\t\t\tposition: location\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tmarkers.push(marker);\n\n\t\t\t\t\t\tvar infowindow = new google.maps.InfoWindow();\n\t\t\t\t\t\tvar infowindowTemplate = $(infoWindowInner).clone();\n\t\t\t\t\t\tinfowindowTemplate.find('.place-count').attr('data-address-id-count-marker', $('.place-count').length)\n\t\t\t\t\t\tvar infowindowContent = `${infowindowTemplate[0].innerHTML}`;\n\n\t\t\t\t\t\tinfowindow.setContent(infowindowContent);\n\t\t\t\t\t\tinfowindow.open(map, marker);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}", "function markerSize(mag) {\n return mag*10000;\n}", "function updateGeo() {\r\n Graph.nodeRelSize(nodeSize); \r\n }", "function refreshMapPosition() {\n //alert(\"on Map\");\n roeMapFAL.resize();\n roeMapFAL.reposition();\n }", "function refreshMapPosition() {\n //alert(\"on Map\");\n roeMapTemp.resize();\n roeMapTemp.reposition();\n }", "addMap() {\n const {createMap} = this.props;\n\n let bounds = {\n north: this.state.bounds.north === '' ? undefined : parseFloat(this.state.bounds.north),\n south: this.state.bounds.south === '' ? undefined : parseFloat(this.state.bounds.south),\n east: this.state.bounds.east === '' ? undefined : parseFloat(this.state.bounds.east),\n west: this.state.bounds.west === '' ? undefined : parseFloat(this.state.bounds.west),\n centerLat: this.state.bounds.centerLat === '' ? undefined : parseFloat(this.state.bounds.centerLat),\n centerLon: this.state.bounds.centerLon === '' ? undefined : parseFloat(this.state.bounds.centerLon),\n range: this.state.bounds.range === '' ? undefined : parseFloat(this.state.bounds.range),\n scale: this.state.bounds.scale === '' ? undefined : parseFloat(this.state.bounds.scale)\n };\n\n let blankBounds = true;\n for (let prop in bounds) {\n if (typeof bounds[prop] !== 'undefined') {\n blankBounds = false;\n break;\n }\n }\n if (blankBounds) {\n bounds = undefined;\n }\n\n createMap(bounds, this.state.engineId === '' ? undefined : this.state.engineId,\n false, this.state.recorder, parseInt(this.state.brightness), parseInt(this.state.midDistanceThreshold),\n parseInt(this.state.farDistanceThreshold));\n }", "applyDistance(loc, distance) {\r\n let r = loc.w; //(loc.w / 0x8000) * Math.PI;\r\n loc.x += Math.cos(r) * distance;\r\n loc.y += Math.sin(r) * distance;\r\n return loc;\r\n }", "function DrawMiniMap()\n{\n\tvar localPosition = WorldToLocal(mapOrigin.x, mapOrigin.y, 1);\n\tvar color=0x47474F;\n\tvar size= miniMapBorder;\n\te.lineStyle(size, color);\n\te.beginFill(0x40420);\n\te.drawCircle(mapOrigin.x, mapOrigin.y, miniMapRadius);\n\te.endFill();\n}", "function AddBus(Coordinates,label_marker) {\n\n var icon = { // car icon\n path: 'M29.395,0H17.636c-3.117,0-5.643,3.467-5.643,6.584v34.804c0,3.116,2.526,5.644,5.643,5.644h11.759 c3.116,0,5.644-2.527,5.644-5.644V6.584C35.037,3.467,32.511,0,29.395,0z M34.05,14.188v11.665l-2.729,0.351v-4.806L34.05,14.188z M32.618,10.773c-1.016,3.9-2.219,8.51-2.219,8.51H16.631l-2.222-8.51C14.41,10.773,23.293,7.755,32.618,10.773z M15.741,21.713 v4.492l-2.73-0.349V14.502L15.741,21.713z M13.011,37.938V27.579l2.73,0.343v8.196L13.011,37.938z M14.568,40.882l2.218-3.336 h13.771l2.219,3.336H14.568z M31.321,35.805v-7.872l2.729-0.355v10.048L31.321,35.805',\n scale: 0.4,\n fillColor: \"#000000\", //<-- Car Color, you can change it \n fillOpacity: 1,\n strokeWeight: 1,\n anchor: new google.maps.Point(0, 5),\n };\n\n\n\n var marker = new google.maps.Marker({\n position: Coordinates,\n icon: icon,\n //label:label_marker,\n map: map\n });\n\n\n // infoWindows are the little helper windows that open when you click\n // or hover over a pin on a map. They usually contain more information\n // about a location.\n addInfoWindow(marker, label_marker);\n\n}", "function pickLocation(){\n var cols = floor(width/scl);\n var rows = floor(height/scl);\n food = createVector(floor(random(cols)), floor(random(rows)));\n food.mult(scl);\n}", "function markerSize(magnituge) {\n return magnituge*5;\n}", "_updateSize() {\n this._size = this._bottomRight.$subtract(this._topLeft).abs();\n this._updateCenter();\n }", "function updateSize() {\n\t\t// $log.log(preDebugMsg + \"updateSize\");\n\t\tfontSize = parseInt($scope.gimme(\"FontSize\"));\n\t\tif(fontSize < 5) {\n\t\t\tfontSize = 5;\n\t\t}\n\n\t\tvar rw = $scope.gimme(\"DrawingArea:width\");\n\t\tif(typeof rw === 'string') {\n\t\t\trw = parseFloat(rw);\n\t\t}\n\t\tif(rw < 1) {\n\t\t\trw = 1;\n\t\t}\n\n\t\tvar rh = $scope.gimme(\"DrawingArea:height\");\n\t\tif(typeof rh === 'string') {\n\t\t\trh = parseFloat(rh);\n\t\t}\n\t\tif(rh < 1) {\n\t\t\trh = 1;\n\t\t}\n\n\t\tif(myCanvas === null) {\n\t\t\tvar myCanvasElement = $scope.theView.parent().find('#theCanvas');\n\t\t\tif(myCanvasElement.length > 0) {\n\t\t\t\tmyCanvas = myCanvasElement[0];\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//$log.log(preDebugMsg + \"no canvas to resize!\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tmyCanvas.width = rw;\n\t\tmyCanvas.height = rh;\n\t\tvar W = myCanvas.width;\n\t\tvar H = myCanvas.height;\n\n\t\tif((dataBase.length + 1) * (spacing + fontSize) + 3*marg > H) {\n\t\t\t$scope.set(\"DrawingArea:height\", Math.ceil((dataBase.length + 1) * (spacing + fontSize) + 3*marg));\n\t\t\tH = Math.ceil((dataBase.length + 1) * (spacing + fontSize) + 3*marg);\n\t\t}\n\n\t\tdrawW = W;\n\t\tdrawH = H;\n\n\t\tdrawBackground(W,H);\n\n\t\tvar iv = $scope.gimme(\"InputVector\");\n\t\tvar t = \"\";\n\t\tif(iv.length <= 0 && dataBase.length <= 0) {\n\t\t\tt = \"No data\";\n\t\t}\n\t\telse {\n\t\t\tt = dataBase.length.toString() + \" vectors. \" + iv.length.toString() + \" data items in selected vector.\";\n\t\t}\n\n\t\tvar maxTW = 0;\n\t\tctx.font = fontSize + \"px Arial\";\n\t\tctx.fillStyle = \"black\";\n\t\tvar tw = legacyDDSupLib.getTextWidthCurrentFont(ctx, t);\n\t\tif(tw > maxTW) {\n\t\t\tmaxTW = tw;\n\t\t}\n\n\t\tvar x = 0;\n\t\tif(tw < drawW) {\n\t\t\tMath.floor(x = (drawW - tw) / 2);\n\t\t}\n\t\tvar y = marg;\n\t\tctx.fillText(t, x, y + fontSize);\n\n\t\tfor(var i = 0; i < dataBase.length; i++) {\n\t\t\tt = dataBase[i][0];\n\n\t\t\tif(i == selectedIdx) {\n\t\t\t\tctx.font = \"bold \" + fontSize + \"px Arial\";\n\t\t\t\tctx.fillStyle = \"red\";\n\t\t\t}\n\n\t\t\tvar tw = legacyDDSupLib.getTextWidthCurrentFont(ctx, t);\n\t\t\tif(tw > maxTW) {\n\t\t\t\tmaxTW = tw;\n\t\t\t}\n\n\t\t\tvar x = marg;\n\t\t\tvar y = marg*2 + (i + 1) * (spacing + fontSize);\n\n\t\t\tctx.fillText(t, x, y + fontSize);\n\n\t\t\tif(i == selectedIdx) {\n\t\t\t\tctx.font = fontSize + \"px Arial\";\n\t\t\t\tctx.fillStyle = \"black\";\n\t\t\t}\n\t\t}\n\n\t\tif(maxTW + 2*marg > W) {\n\t\t\t$scope.set(\"DrawingArea:width\", Math.ceil(maxTW + 2*marg));\n\t\t}\n\t}", "function updateRadius(){\n var zoom = mymap.getZoom();\n \n switch(zoom) {\n case 13 : return 8;\n case 14 : return 10;\n case 15 : return 12;\n case 16 : return 14;\n case 17 : return 16;\n case 18 : return 18;\n default : return 8; \n }\n }", "function changeCircleRadius(e) {\n//alert(\"radius change!\");\n // Determine which geocode box is filled\n // And fire click event\n \n // This will determine how many markers are within the circle\n pointsInCircle(circle, milesToMeters( $('#radius-selected').val() ) )\n \n // Set radius of circle only if we already have one on the map\n if (circle) {\n circle.setRadius( milesToMeters( $('#radius-selected').val() ) );\n }\n\n}", "function clickZoom(e) {\r\n map.setView(e.target.getLatLng(),13);\r\n var clicked_lat = (e.target.getLatLng()['lng']);\r\n var clicked_lng = (e.target.getLatLng()['lat']);\r\n\r\n //console.log(\"got here\")\r\n \r\n // remove everything inside #gauge so we can update it with new info\r\n d3.selectAll('#gauge > *').remove();\r\n // Calling gauge functions\r\n buildGauge(gaugeSetup(clicked_lat,clicked_lng));\r\n }", "function refreshMapPosition() {\n //alert(\"on Map\");\n roeMapTNit.resize();\n roeMapTNit.reposition();\n }", "function sz(ft){var area = ft.area(5);\n return ft.set({'area':area});\n}", "function refreshMapPosition() {\n //alert(\"on Map\");\n roeMapCarbon.resize();\n roeMapCarbon.reposition();\n }", "function markerSize(mag) {\n return mag * 10000;\n }" ]
[ "0.5915427", "0.590992", "0.5751164", "0.57064664", "0.57052106", "0.5687674", "0.5662098", "0.5610895", "0.55383986", "0.5504745", "0.54977345", "0.5489173", "0.5481716", "0.54469305", "0.5397067", "0.5388447", "0.5388419", "0.5376396", "0.5376353", "0.5343446", "0.5329552", "0.5321554", "0.5320687", "0.5306709", "0.53022265", "0.5298543", "0.5293638", "0.52909744", "0.5287377", "0.52864635", "0.5280138", "0.5273398", "0.5261188", "0.5252024", "0.52366674", "0.5236667", "0.52257395", "0.5218535", "0.5213102", "0.5205736", "0.5204986", "0.5198583", "0.5197385", "0.5181918", "0.51787484", "0.5177553", "0.5172696", "0.5163472", "0.5159368", "0.5145947", "0.51427317", "0.5140092", "0.5139411", "0.51317775", "0.5129064", "0.51284343", "0.5127481", "0.512739", "0.5126879", "0.51255155", "0.5123538", "0.5123246", "0.5121873", "0.511758", "0.5117417", "0.51132864", "0.51044613", "0.5102897", "0.5100411", "0.5084785", "0.5082786", "0.5076799", "0.5074895", "0.5064731", "0.50647086", "0.50618154", "0.5054446", "0.5054014", "0.5050022", "0.504515", "0.5045136", "0.5041085", "0.5036967", "0.5036864", "0.5034755", "0.5027328", "0.50259465", "0.5022224", "0.50205153", "0.50196546", "0.5018911", "0.5016696", "0.5014279", "0.50079435", "0.50045055", "0.49950758", "0.4993986", "0.49937305", "0.4990934", "0.49843502" ]
0.6280322
0
================================================================================= =================================================================================== Calculate the crater bounds. ===================================================================================
function craterBounds(lat_, lon_ ,craterDiameter){ var lat1 = lat_; var lon1 = lon_; var d = Math.SQRT2*craterDiameter/2.0; var R = 6370000; var brng1 = 45*Math.PI/180; var brng2 = 225*Math.PI/180; lat1 = lat1*Math.PI/180; lon1 = lon1*Math.PI/180; var lat2 = Math.asin( Math.sin(lat1)*Math.cos(d/R) + Math.cos(lat1)*Math.sin(d/R)*Math.cos(brng1) ); var lon2 = lon1 + Math.atan2(Math.sin(brng1)*Math.sin(d/R)*Math.cos(lat1), Math.cos(d/R)-Math.sin(lat1)*Math.sin(lat2)); var lat3 = Math.asin( Math.sin(lat1)*Math.cos(d/R) + Math.cos(lat1)*Math.sin(d/R)*Math.cos(brng2) ); var lon3 = lon1 + Math.atan2(Math.sin(brng2)*Math.sin(d/R)*Math.cos(lat1), Math.cos(d/R)-Math.sin(lat1)*Math.sin(lat2)); lat2 = lat2/(Math.PI/180); lon2 = lon2/(Math.PI/180); lat3 = lat3/(Math.PI/180); lon3 = lon3/(Math.PI/180); var bound = new google.maps.LatLngBounds( new google.maps.LatLng(lat3, lon3), new google.maps.LatLng(lat2,lon2)); return bound; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get bounds() {}", "function bounds() {\n return {\n start: conductor.displayStart(),\n end: conductor.displayEnd(),\n domain: conductor.domain().key\n };\n }", "get boundsValue() {}", "get localBounds() {}", "calcBounds() {\n\n\t\tvar horizOffset = Math.floor(window.innerWidth / 6);\n\n\t\tif (this.player.seatNumber == 0) {\n\t\t\tthis.leftBound = this.player.x + 50;\n\t\t\tthis.rightBound = window.innerWidth - 50;\n\t\t}\n\n\t\tif (this.player.seatNumber == 1) {\n\t\t\tthis.leftBound = this.player.x + 50;\n\t\t\tthis.rightBound = theTable.seats[0][0] - 50;\n\t\t}\n\n\t\tif (this.player.seatNumber == 2) {\n\t\t\tthis.leftBound = this.player.x + 50;\n\t\t\tthis.rightBound = theTable.seats[1][0] - 50;\n\t\t}\n\n\t\tif (this.player.seatNumber == 3 || this.player.seatNumber == 4 || this.player.seatNumber == 5) {\n\t\t\tthis.leftBound = this.player.x + 50;\n\t\t\tthis.rightBound = this.leftBound + horizOffset;\n\t\t}\n\n\t\tif (this.player.seatNumber == 6) {\n\t\t\tthis.leftBound = 50;\n\t\t\tthis.rightBound = this.player.x - 50;\n\t\t}\n\n\t\tif (this.player.seatNumber == 7) {\n\t\t\tthis.leftBound = theTable.seats[6][0] + 50;\n\t\t\tthis.rightBound = this.player.x - 50;\n\t\t}\n\n\t\tif (this.player.seatNumber == 8) {\n\t\t\tthis.leftBound = theTable.seats[7][0] + 50;\n\t\t\tthis.rightBound = this.player.x - 50;\n\t\t}\n\n\t\tif (this.player.seatNumber == 9 || this.player.seatNumber == 10 || this.player.seatNumber == 11) {\n\t\t\tthis.rightBound = this.player.x - 50;\n\t\t\tthis.leftBound = this.rightBound - horizOffset;\n\t\t}\n\n\t\t// position the HandMasks\n\n\t\tthis.handMaskLeft.x = this.leftBound + 20;\n\t\tthis.handMaskLeft.y = this.player.y;\n\n\t\tthis.handMaskRight.x = this.rightBound - 20;\n\t\tthis.handMaskRight.y = this.player.y;\n\t}", "function bound() {\n ['top', 'bottom', 'tlc', 'left', 'blc', 'trc', 'right', 'brc'].forEach((piece) => {\n equilibriate(piece, 0, params.u0, 1);\n });\n}", "_calculateBounds() {\n // FILL IN//\n }", "getLatLngBounds() {\n let bounds = new google.maps.LatLngBounds();\n // If the flight is big just having the two end points will cut off part of the route\n for(let i = 0; i <= 1; i+= 0.1) {\n bounds.extend(this.getIntermediatePoint(i));\n }\n return bounds;\n }", "getBounds() {}", "function computeBounds(latlng,rad) {\n\tvar radlatlng = { lat : latlng.lat * Math.PI / 180, lng : latlng.lng * Math.PI / 180 };\n\t\n\tvar rsw = getCoordAtRad(radlatlng,rad,Math.PI * 1.5);\n\t//console.log(sw);\n\trsw = getCoordAtRad(rsw,rad,Math.PI);\n\tvar rne = getCoordAtRad(radlatlng,rad,Math.PI * 0.5);\n\t//console.log(ne);\n\trne = getCoordAtRad(rne,rad,0);\n\t\n\t//all inputs must be radians (except radius which is converted in-function)\n\tfunction getCoordAtRad(coord,radius,angle) {\n\t\tvar nlat, nlng;\n\t\tvar radDist = radius * angle;//arc length\n\t\tnlat = Math.asin(Math.sin(coord.lat) * Math.cos(radDist) \n\t\t\t\t + Math.cos(coord.lat) * Math.sin(radDist) * Math.cos(angle));\n\t\tnlng = (Math.cos(nlat) == 0) ? coord.lng : \n\t\tmod(coord.lng + Math.PI - Math.asin(Math.sin(angle) \n\t\t* Math.sin(radDist) / Math.cos(nlat)), 2 * Math.PI) - Math.PI;\n\t\treturn { lat : nlat, lng : nlng };\n\t}\n\t\n\tfunction mod(x,y) {\n\t\treturn x - y * Math.floor(x / y);\n\t}\n\t\n\tvar sw = { lat : rsw.lat * 180 / Math.PI, lng : rsw.lng * 180 / Math.PI };\n\tvar ne = { lat : rne.lat * 180 / Math.PI, lng : rne.lng * 180 / Math.PI };\n\t\n\treturn { sw : sw, ne : ne };\n}", "calc_range() {\n let z = this.zoom / this.drug.z\n let zk = (1 / z - 1) / 2\n\n let range = this.y_range.slice()\n let delta = range[0] - range[1]\n range[0] = range[0] + delta * zk\n range[1] = range[1] - delta * zk\n\n return range\n }", "carregaBoundaries() {\n\n //Modifica o tamanho do estagio baseado no tamanho do elemento div do bird\n this.maxBoundsWidth = this.getEstagio().clientWidth - this.getBird().getTamanhoWidth();\n this.maxBoundsHeight = this.getEstagio().clientHeight - this.getBird().getTamanhoHeight();\n\n // console.log(\"Max width da arena: \" + this.maxBoundsWidth);\n // console.log(\"Max height da arena: \" + this.maxBoundsHeight);\n\n //Verifico se o passaro esta dentro as boundaries(caso o usuario de resize)\n this.estaForaDasBounds()\n }", "function getBounds(features) {\n var bounds = { min: [999, 999], max: [-999, -999] };\n\n _.each(features, function(element) {\n var point = map.latLngToLayerPoint(element.LatLng);\n\n bounds.min[0] = Math.min(bounds.min[0], point.x);\n bounds.min[1] = Math.min(bounds.min[1], point.y);\n bounds.max[0] = Math.max(bounds.max[0], point.x);\n bounds.max[1] = Math.max(bounds.max[1], point.y);\n });\n\n return bounds;\n }", "function findBoundaries() {\n\tgoogle.maps.event.addListener(map, 'bounds_changed', function() {\n\t \tconst bounds = map.getBounds();\n\t \tconst NE = bounds.getNorthEast();\n\t\tconst SW = bounds.getSouthWest();\n\t\tconst coordinates = [`${SW}`, `${NE}`];\n\t\tconst fixed = coordinates.map(e => e.replace(/[{()}]/g, '')).map(e => e.split(', ')).flat();\n\t\tconst parsed = fixed.map(e => parseFloat(e));\n\t\t[parsed[0], parsed[1]] = [parsed[1], parsed[0]];\n\t\t[parsed[2], parsed[3]] = [parsed[3], parsed[2]];\n\t\tconst formattedBounds = parsed.join();\n\t\tgetWheelMapNodes(formattedBounds);\n\t});\n}", "function getBounds(x, y, z) {\n\t\ty = Math.pow(2, z) - y - 1; // Translate Y value\n\t\t\n\t\tvar resolution = (CIRCUMFERENCE / TILE_SIZE) / Math.pow(2, z); // meters per pixel\n\t\t\n\t\tvar swPoint = getMercatorCoord(x, y, resolution);\n\t\tvar nePoint = getMercatorCoord(x + 1, y + 1, resolution);\n\t\t\n\t\tvar bounds = {\n\t\t\t\tswX : swPoint.x,\n\t\t\t\tswY : swPoint.y,\n\t\t\t\tneX : nePoint.x,\n\t\t\t\tneY : nePoint.y\n\t\t};\n\t\t\n\t\treturn bounds;\n\t}", "get bounds() { return this._bounds; }", "calculateBounds() {\n var minX = Infinity;\n var maxX = -Infinity;\n var minY = Infinity;\n var maxY = -Infinity;\n if (this.graphicsData.length) {\n var shape = null;\n var x = 0;\n var y = 0;\n var w = 0;\n var h = 0;\n for (var i = 0; i < this.graphicsData.length; i++) {\n var data = this.graphicsData[i];\n var type = data.type;\n var lineWidth = data.lineStyle ? data.lineStyle.width : 0;\n shape = data.shape;\n if (type === ShapeSettings_1.ShapeSettings.SHAPES.RECT || type === ShapeSettings_1.ShapeSettings.SHAPES.RREC) {\n x = shape.x - (lineWidth / 2);\n y = shape.y - (lineWidth / 2);\n w = shape.width + lineWidth;\n h = shape.height + lineWidth;\n minX = x < minX ? x : minX;\n maxX = x + w > maxX ? x + w : maxX;\n minY = y < minY ? y : minY;\n maxY = y + h > maxY ? y + h : maxY;\n }\n else if (type === ShapeSettings_1.ShapeSettings.SHAPES.CIRC) {\n x = shape.x;\n y = shape.y;\n w = shape.radius + (lineWidth / 2);\n h = shape.radius + (lineWidth / 2);\n minX = x - w < minX ? x - w : minX;\n maxX = x + w > maxX ? x + w : maxX;\n minY = y - h < minY ? y - h : minY;\n maxY = y + h > maxY ? y + h : maxY;\n }\n else if (type === ShapeSettings_1.ShapeSettings.SHAPES.ELIP) {\n x = shape.x;\n y = shape.y;\n w = shape.width + (lineWidth / 2);\n h = shape.height + (lineWidth / 2);\n minX = x - w < minX ? x - w : minX;\n maxX = x + w > maxX ? x + w : maxX;\n minY = y - h < minY ? y - h : minY;\n maxY = y + h > maxY ? y + h : maxY;\n }\n else {\n // POLY\n var points = shape.points;\n var x2 = 0;\n var y2 = 0;\n var dx = 0;\n var dy = 0;\n var rw = 0;\n var rh = 0;\n var cx = 0;\n var cy = 0;\n for (var j = 0; j + 2 < points.length; j += 2) {\n x = points[j];\n y = points[j + 1];\n x2 = points[j + 2];\n y2 = points[j + 3];\n dx = Math.abs(x2 - x);\n dy = Math.abs(y2 - y);\n h = lineWidth;\n w = Math.sqrt((dx * dx) + (dy * dy));\n if (w < 1e-9) {\n continue;\n }\n rw = ((h / w * dy) + dx) / 2;\n rh = ((h / w * dx) + dy) / 2;\n cx = (x2 + x) / 2;\n cy = (y2 + y) / 2;\n minX = cx - rw < minX ? cx - rw : minX;\n maxX = cx + rw > maxX ? cx + rw : maxX;\n minY = cy - rh < minY ? cy - rh : minY;\n maxY = cy + rh > maxY ? cy + rh : maxY;\n }\n }\n }\n }\n else {\n minX = 0;\n maxX = 0;\n minY = 0;\n maxY = 0;\n }\n var padding = this.boundsPadding;\n this._bounds.minX = minX - padding;\n this._bounds.maxX = maxX + padding;\n this._bounds.minY = minY - padding;\n this._bounds.maxY = maxY + padding;\n }", "function computeBounds(x1, x2, y1, y2) {\n return [[x1, y1], [x2, y1], [x2, y2], [x1,y2]];\n }", "function normBounds( bounds ) {\n\n\t\tfor ( var i = ticks.length; i >= 0; i-- ) {\n\t\t\tif ( bounds[0] + unit / 2 >= ticks[i] ) {\n\t\t\t\tbounds[0] = ticks[i] - 1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tfor ( var i = 0; i <= ticks.length; i++ ) {\n\t\t\tif ( bounds[1] - unit / 2 <= ticks[i] ) {\n\t\t\t\tbounds[1] = ticks[i] + 1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn bounds;\n\t}", "_calculateBounds() {\n this.calculateVertices();\n this._bounds.addVertexData(this.vertexData, 0, this.vertexData.length);\n }", "get bounds () {\n const xMin = Math.min.apply(null, this.pointArr.map(pt => pt.x))\n const yMin = Math.min.apply(null, this.pointArr.map(pt => pt.y))\n const xMax = Math.max.apply(null, this.pointArr.map(pt => pt.x))\n const yMax = Math.max.apply(null, this.pointArr.map(pt => pt.y))\n\n return {\n x: xMin,\n y: yMin,\n width: xMax - xMin,\n height: yMax - yMax\n }\n }", "bounds() {\n if(this.isEmpty()) return null;\n // maximum boundaries possible\n let min = Number.POSITIVE_INFINITY\n let max = Number.NEGATIVE_INFINITY\n\n return [min, max] = this.forEachNode( (currentNode) => {\n if(currentNode.value < min) min = currentNode.value;\n if(currentNode.value > max) max = currentNode.value;\n return [min, max]\n }, min, max)\n \n }", "getBounds() {\n return new Rectangle(new Point(this.x, this.y), new Vector(0, 0));\n }", "function get_bounds(){\n\t\t\t\t\n\t\t\t\treturn {\n\t\t\t\t\t\n\t\t\t\t\tsw_lat : map.getBounds().getSouthWest().lat(),\n\t\t\t\t\t\n\t\t\t\t\tsw_lng : map.getBounds().getSouthWest().lng(),\n\t\t\t\t\t\n\t\t\t\t\tne_lat : map.getBounds().getNorthEast().lat(),\n\t\t\t\t\t\n\t\t\t\t\tne_lng : map.getBounds().getNorthEast().lng()\n\t\t\t\t\n\t\t\t\t};\n\t\t\t\n\t\t\t}", "function bezier_bounds(p0, p1, p2, p3, width)\n{\n\t// This computes the coefficients of the derivative of the bezier curve.\n\t// We will use this to compute the zeroes to get the maxima.\n\tlet a = -p0 + 3 * p1 - 3 * p2 + p3;\n\tlet b = 2 * p0 - 4 * p1 + 2 * p2;\n\tlet c = p1 - p0;\n\n\t// Compute the discriminant.\n\tlet d = b*b - 4*a*c;\n\t// If there are no maxima or minima, just return the end points.\n\tif(d < 0 || a == 0)\n\t{\n\t\treturn {min: Math.min(p0, p3) - width, max: Math.max(p0, p3) + width};\n\t}\n\t// Square root the discriminant so we don't need to recompute it.\n\td = Math.sqrt(d);\n\t// Compute the \"time\" of the critical points by solving the quadrating equation.\n\tlet crit1 = (-b + d) / (2*a);\n\tlet crit2 = (-b - d) / (2*a);\n\t// Use the \"time\" of the critical points to compute the critical points themselves..\n\tif(crit1 >= 0 && crit1 <= 1)\n\t{\n\t\tcrit1 = compute_bezier(p0, p1, p2, p3, crit1, 1 - crit1);\n\t}\n\telse\n\t{\n\t\tcrit1 = undefined;\n\t}\n\tif(crit2 >= 0 && crit2 <= 1)\n\t{\n\t\tcrit2 = compute_bezier(p0, p1, p2, p3, crit2, 1 - crit2);\n\t}\n\telse\n\t{\n\t\tcrit2 = undefined;\n\t}\n\n\t// Start by just using the end points as the bounds.\n\tlet m = Math.min(p0, p3);\n\tlet M = Math.max(p0, p3);\n\t// If the critical point is valid, ensure it is included in the bounds.\n\tif(crit1)\n\t{\n\t\tm = Math.min(m, crit1);\n\t\tM = Math.max(M, crit1);\n\t}\n\t// If the critical point is valid, ensure it is included in the bounds.\n\tif(crit2)\n\t{\n\t\tm = Math.min(m, crit2);\n\t\tM = Math.max(M, crit2);\n\t}\n\t// Return the bounds.\n\treturn {min: m - width, max: M + width};\n}", "getBounds(){\n let rect = new Rectangle()\n\t\trect.setRect(this.x, this.y, this.size, this.size)\n\t\treturn rect\n }", "getBounds(){\n let rect = new Rectangle()\n\t\trect.setRect(this.x, this.y, this.size, this.size)\n\t\treturn rect\n }", "function calculateBound(d) {\n\t\n\tvar bound = {width: d.width, height: d.height};\n\n\tif (bound.width>d.boundWidth || bound.height>d.boundHeight) {\n\t\t\n\t\tvar rel = bound.width/bound.height;\n\n\t\tif (d.boundWidth/rel>d.boundHeight && d.boundHeight*rel<=d.boundWidth) {\n\t\t\t\n\t\t\tbound.width = Math.round(d.boundHeight*rel);\n\t\t\tbound.height = d.boundHeight;\n\n\t\t} else {\n\t\t\t\n\t\t\tbound.width = d.boundWidth;\n\t\t\tbound.height = Math.round(d.boundWidth/rel);\n\t\t\n\t\t}\n\t}\n\t\t\n\treturn bound;\n}", "function compute_bound(bbox) {\n var offset = 0.01;\n var southWest = new L.LatLng(bbox[0][0] - offset, bbox[0][1] - offset);\n var northEast = new L.LatLng(bbox[2][0] + offset, bbox[2][1] + offset);\n return new L.LatLngBounds(southWest, northEast);\n}", "function getExtendedBounds(bnds){\n // get the coordinates for the sake of readability\n var swlat = bnds._southWest.lat;\n var swlng = bnds._southWest.lng;\n var nelat = bnds._northEast.lat;\n var nelng = bnds._northEast.lng;\n\n // Increase size of bounding box in each direction by 50%\n swlat = swlat - Math.abs(0.5*(swlat - nelat)) > -90 ? swlat - Math.abs(0.5*(swlat - nelat)) : -90;\n swlng = swlng - Math.abs(0.5*(swlng - nelng)) > -180 ? swlng - Math.abs(0.5*(swlng - nelng)) : -180;\n nelat = nelat + Math.abs(0.5*(swlat - nelat)) < 90 ? nelat + Math.abs(0.5*(swlat - nelat)) : 90;\n nelng = nelng + Math.abs(0.5*(swlng - nelng)) < 180 ? nelng + Math.abs(0.5*(swlng - nelng)) : 180;\n\n return L.latLngBounds(L.latLng(swlat, swlng), L.latLng(nelat, nelng));\n }", "getBounds() {\n return this.state[CIRCLE].getBounds()\n }", "function calculateBound(d) {\n\tvar bound = {width: d.width, height: d.height};\n\tif (bound.width > d.boundWidth || bound.height > d.boundHeight) {\n\t\tvar rel = bound.width / bound.height;\n\t\tif (d.boundWidth / rel > d.boundHeight && d.boundHeight * rel <= d.boundWidth) {\n\t\t\tbound.width = Math.round(d.boundHeight * rel);\n\t\t\tbound.height = d.boundHeight;\n\t\t} else {\n\t\t\tbound.width = d.boundWidth;\n\t\t\tbound.height = Math.round(d.boundWidth / rel);\n\t\t}\n\t}\n\treturn bound;\n}", "function calculateBounds (geojson) {\n if(geojson.type){\n switch (geojson.type) {\n case 'Point':\n return [ geojson.coordinates[0], geojson.coordinates[1], geojson.coordinates[0], geojson.coordinates[1]];\n\n case 'MultiPoint':\n return calculateBoundsFromArray(geojson.coordinates);\n\n case 'LineString':\n return calculateBoundsFromArray(geojson.coordinates);\n\n case 'MultiLineString':\n return calculateBoundsFromNestedArrays(geojson.coordinates);\n\n case 'Polygon':\n return calculateBoundsFromNestedArrays(geojson.coordinates);\n\n case 'MultiPolygon':\n return calculateBoundsFromNestedArrayOfArrays(geojson.coordinates);\n\n case 'Feature':\n return geojson.geometry? calculateBounds(geojson.geometry) : null;\n\n case 'FeatureCollection':\n return calculateBoundsForFeatureCollection(geojson);\n\n case 'GeometryCollection':\n return calculateBoundsForGeometryCollection(geojson);\n\n default:\n throw new Error(\"Unknown type: \" + geojson.type);\n }\n }\n return null;\n }", "function calculateBounds (geojson) {\n if(geojson.type){\n switch (geojson.type) {\n case 'Point':\n return [ geojson.coordinates[0], geojson.coordinates[1], geojson.coordinates[0], geojson.coordinates[1]];\n\n case 'MultiPoint':\n return calculateBoundsFromArray(geojson.coordinates);\n\n case 'LineString':\n return calculateBoundsFromArray(geojson.coordinates);\n\n case 'MultiLineString':\n return calculateBoundsFromNestedArrays(geojson.coordinates);\n\n case 'Polygon':\n return calculateBoundsFromNestedArrays(geojson.coordinates);\n\n case 'MultiPolygon':\n return calculateBoundsFromNestedArrayOfArrays(geojson.coordinates);\n\n case 'Feature':\n return geojson.geometry? calculateBounds(geojson.geometry) : null;\n\n case 'FeatureCollection':\n return calculateBoundsForFeatureCollection(geojson);\n\n case 'GeometryCollection':\n return calculateBoundsForGeometryCollection(geojson);\n\n default:\n throw new Error(\"Unknown type: \" + geojson.type);\n }\n }\n return null;\n }", "function calculateBounds (geojson) {\n if(geojson.type){\n switch (geojson.type) {\n case 'Point':\n return [ geojson.coordinates[0], geojson.coordinates[1], geojson.coordinates[0], geojson.coordinates[1]];\n\n case 'MultiPoint':\n return calculateBoundsFromArray(geojson.coordinates);\n\n case 'LineString':\n return calculateBoundsFromArray(geojson.coordinates);\n\n case 'MultiLineString':\n return calculateBoundsFromNestedArrays(geojson.coordinates);\n\n case 'Polygon':\n return calculateBoundsFromNestedArrays(geojson.coordinates);\n\n case 'MultiPolygon':\n return calculateBoundsFromNestedArrayOfArrays(geojson.coordinates);\n\n case 'Feature':\n return geojson.geometry? calculateBounds(geojson.geometry) : null;\n\n case 'FeatureCollection':\n return calculateBoundsForFeatureCollection(geojson);\n\n case 'GeometryCollection':\n return calculateBoundsForGeometryCollection(geojson);\n\n default:\n throw new Error(\"Unknown type: \" + geojson.type);\n }\n }\n return null;\n }", "function computeBounds(constraint, model) {\n let coefs = constraint.variables;\n let currentTotal = 0;\n let positiveUnassigned = 0;\n let negativeUnassigned = 0;\n let ids = Object.keys(coefs);\n let id, value, coef;\n for (var i = 0; i < ids.length; i++) {\n id = ids[i];\n value = model[id];\n coef = coefs[id];\n if (value === true) {\n currentTotal += coef;\n } else if (value !== false) {\n if (coef < 0) {\n negativeUnassigned += coef;\n } else {\n positiveUnassigned += coef;\n }\n }\n }\n return [currentTotal + negativeUnassigned, currentTotal + positiveUnassigned];\n}", "_calculateBounds()\n {\n const trim = this._texture.trim;\n const orig = this._texture.orig;\n\n // First lets check to see if the current texture has a trim..\n if (!trim || (trim.width === orig.width && trim.height === orig.height))\n {\n // no trim! lets use the usual calculations..\n this.calculateVertices();\n this._bounds.addQuad(this.vertexData);\n }\n else\n {\n // lets calculate a special trimmed bounds...\n this.calculateTrimmedVertices();\n this._bounds.addQuad(this.vertexTrimmedData);\n }\n }", "calculateBounds() {\n this._bounds.clear();\n this._calculateBounds();\n for (var i = 0; i < this.children.length; i++) {\n var child = this.children[i];\n if (!child.visible || !child.renderable) {\n continue;\n }\n child.calculateBounds();\n // TODO: filter+mask, need to mask both somehow\n if (child._mask) {\n child._mask.calculateBounds();\n this._bounds.addBoundsMask(child._bounds, child._mask._bounds);\n }\n else if (child.filterArea) {\n this._bounds.addBoundsArea(child._bounds, child.filterArea);\n }\n else {\n this._bounds.addBounds(child._bounds);\n }\n }\n this._lastBoundsID = this._boundsID;\n }", "function cloudBounds(bounds, d) {\n var b0 = bounds[0],\n b1 = bounds[1];\n if (d.x + d.x0 < b0.x) b0.x = d.x + d.x0;\n if (d.y + d.y0 < b0.y) b0.y = d.y + d.y0;\n if (d.x + d.x1 > b1.x) b1.x = d.x + d.x1;\n if (d.y + d.y1 > b1.y) b1.y = d.y + d.y1;\n }", "calculateBounds_() {\n const bounds = new google.maps.LatLngBounds(this.center_, this.center_);\n this.bounds_ = this.markerClusterer_.getExtendedBounds(bounds);\n }", "function getBounds(bounds){\n\t var bbox = [];\n\t\n\t bbox.push(parseFloat(bounds.attrib[\"minlon\"]));\n\t bbox.push(parseFloat(bounds.attrib[\"minlat\"]));\n\t bbox.push(parseFloat(bounds.attrib[\"maxlon\"]));\n\t bbox.push(parseFloat(bounds.attrib[\"maxlat\"]));\n\t\n\t return bbox;\n\t}", "function getBounds(coordArr) {\n\t\t\tlet leftBound;\n\t\t\tlet rightBound;\n\t\t\tlet upperBound;\n\t\t\tlet lowerBound;\n\t\t\tcoordArr.forEach((pt, i) => {\n\t\t\t\tconst { x, y } = pt;\n\t\t\t\tif (i === 0) {\n\t\t\t\t\t// Sets default values\n\t\t\t\t\tleftBound = rightBound = x;\n\t\t\t\t\tupperBound = lowerBound = y;\n\t\t\t\t} else {\n\t\t\t\t\tleftBound = Math.min(leftBound, x);\n\t\t\t\t\trightBound = Math.max(rightBound, x);\n\t\t\t\t\tupperBound = Math.min(upperBound, y);\n\t\t\t\t\tlowerBound = Math.max(lowerBound, y);\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn {\n\t\t\t\tleftBound,\n\t\t\t\trightBound,\n\t\t\t\tupperBound,\n\t\t\t\tlowerBound\n\t\t\t};\n\t\t}", "getBounds() {\n const bounds = this.options.bounds\n ? L.latLngBounds(this.options.bounds)\n : this._clusters.getBounds()\n\n if (bounds.isValid()) {\n return toLngLatBounds(bounds)\n }\n }", "get bounds() {\n // Optimization to reduct calculations.\n // The result should be exactly the same if this is removed.\n if (this._bounds !== undefined) {\n return this._bounds;\n }\n\n if (this.$el == null) {\n return this.preAttachedBounds;\n }\n else {\n return Bounds.fromAttrs(this.$el.attrs);\n }\n }", "function calculateBoundsForFeatureCollection(featureCollection){\n var extents = [], extent;\n for (var i = featureCollection.features.length - 1; i >= 0; i--) {\n extent = calculateBounds(featureCollection.features[i].geometry);\n extents.push([extent[0],extent[1]]);\n extents.push([extent[2],extent[3]]);\n }\n\n return calculateBoundsFromArray(extents);\n }", "function calculateBoundsForFeatureCollection(featureCollection){\n var extents = [], extent;\n for (var i = featureCollection.features.length - 1; i >= 0; i--) {\n extent = calculateBounds(featureCollection.features[i].geometry);\n extents.push([extent[0],extent[1]]);\n extents.push([extent[2],extent[3]]);\n }\n\n return calculateBoundsFromArray(extents);\n }", "function calculateBoundsForFeatureCollection(featureCollection){\n var extents = [], extent;\n for (var i = featureCollection.features.length - 1; i >= 0; i--) {\n extent = calculateBounds(featureCollection.features[i].geometry);\n extents.push([extent[0],extent[1]]);\n extents.push([extent[2],extent[3]]);\n }\n\n return calculateBoundsFromArray(extents);\n }", "boundaries() {\n if (this.x - this.w/2 < -this.exceedLimit) this.x = this.w/2 - this.exceedLimit;\n if (this.x + this.w/2 > world.width+this.exceedLimit) this.x = world.width+this.exceedLimit - this.w/2;\n if (this.y - this.h/2 < -this.exceedLimit) this.y = this.h/2 - this.exceedLimit;\n if (this.y + this.h/2 > world.height+this.exceedLimit) this.y = world.height+this.exceedLimit - this.h/2;\n }", "getBounds(bounds) {\n if (this.objects !== undefined) {\n for (let i = 0; i < this.objects.length; i++) {\n this.objects[i].getBounds(bounds);\n }\n }\n }", "setBounds() {\n let x = this.position.getX();\n let y = this.position.getY();\n let s = Game.Settings().UnitSize;\n let hs = s / 2;\n\n //generate Individual Bounds\n this.bounds = new Bounds(x - hs, y - hs, x + hs, y + hs);\n }", "_calculateBounds() {\n var trim = this._texture.trim;\n var orig = this._texture.orig;\n // First lets check to see if the current texture has a trim..\n if (!trim || (trim.width === orig.width && trim.height === orig.height)) {\n // no trim! lets use the usual calculations..\n this.calculateVertices();\n this._bounds.addQuad(this.vertexData);\n }\n else {\n // lets calculate a special trimmed bounds...\n this.calculateTrimmedVertices();\n this._bounds.addQuad(this.vertexTrimmedData);\n }\n }", "function findExtremeBounds(bounds) {\n\t var extrema = {\n\t left: 0,\n\t right: SIZE,\n\t top: 0,\n\t bottom: SIZE\n\t };\n\n\t for (var i = 0; i < bounds.length; i++) {\n\t var bound = bounds[i];\n\t extrema = {\n\t left: Math.min(extrema.left, bound.left),\n\t right: Math.max(extrema.right, bound.right),\n\t top: Math.min(extrema.top, bound.top),\n\t bottom: Math.max(extrema.bottom, bound.bottom)\n\t };\n\t }\n\t return extrema;\n\t }", "findGridLimits () {\n let residue = this.getResidueProxy()\n let atom = this.getAtomProxy()\n for (let iRes = 0; iRes < this.getResidueCount(); iRes += 1) {\n residue.iRes = iRes\n if (residue.ss === 'G') {\n atom.iAtom = residue.iAtom\n if (!(atom.elem in this.grid.isElem)) {\n this.grid.isElem[atom.elem] = true\n }\n if (this.grid.bMin === null) {\n this.grid.bMin = atom.bfactor\n this.grid.bMax = atom.bfactor\n } else {\n if (atom.bfactor > this.grid.bMax) {\n this.grid.bMax = atom.bfactor\n }\n if (atom.bfactor < this.grid.bMin) {\n this.grid.bMin = atom.bfactor\n }\n }\n }\n }\n\n if (this.grid.bMin === null) {\n this.grid.bMin = 0\n }\n if (this.grid.bMax === null) {\n this.grid.bMin = 0\n }\n this.grid.bCutoff = this.grid.bMin\n }", "set bounds(value) {}", "function getBounds() {\n let body = d3.select('body');\n let bounds = body.node().getBoundingClientRect();\n\n let bound = {height: bounds.height, width: bounds.width, margin:\n {top: 50, right: 30, bottom: 30, left: 100}};\n\n bound.height -= 100; // because of header\n bound.width -= (bound.margin.left + bound.margin.right);\n bound.height -= (bound.margin.top + bound.margin.bottom);\n\n return bound;\n}", "function brickCalculator (floor) {\n let perFeetBrick = 1000;\n let upperFloorFeet = 10;\n let middleFloodFeet = 12;\n let lowerFloorFeet = 15;\n\n if (floor < 0){\n console.log(\"floor can not be in negative\");\n\n }else if (floor > 20) {\n upperFloor = floor - 20;\n\n upperFloorBrick = upperFloor * upperFloorFeet * perFeetBrick;\n\n middleFloor = floor - upperFloor - 10;\n\n middleFloorBrick = middleFloor * middleFloodFeet * perFeetBrick;\n\n lowerFloor = middleFloor;\n\n lowerFloorBrick = lowerFloor * lowerFloorFeet * perFeetBrick;\n\n return totalBrick = upperFloorBrick + middleFloorBrick + lowerFloorBrick; \n\n }else if (floor <= 20 && floor > 10){\n middleFloor = floor - 10;\n\n middleFloorBrick = middleFloor * middleFloodFeet * perFeetBrick;\n\n lowerFloor = floor - middleFloor;\n\n lowerFloorBrick = lowerFloor * lowerFloorFeet * perFeetBrick;\n\n return total = middleFloorBrick + lowerFloorBrick;\n\n }else if (floor <= 10) {\n lowerFloor = floor;\n\n return lowerFloor * lowerFloorFeet * perFeetBrick;\n\n }\n}", "defineMapBounds() {\n \n const coordinates = this.state.options.map(i => i.coordinates);\n\n let maxX = 0,\n minX = 0,\n maxY = 0,\n minY = 0;\n\n coordinates.forEach(coord => {\n if (coord[0] > maxY) {\n maxY = coord[0];\n }\n \n if (coord[0] < minY) {\n minY = coord[0];\n }\n\n if (coord[1] > maxX) {\n maxX = coord[1];\n }\n \n if (coord[1] < minX) {\n minX = coord[1];\n }\n })\n\n // Bounds are defined by two coordinates:\n // position1: the most W and N\n // position2: the most E and S\n this.setState({\n bounds: [[maxY, minX], [minY, maxX]],\n center: [(maxY - minY) / 2, (maxX - minX) / 2]\n })\n }", "function getBounds(firstIndex, lastIndex)\n{\nvar maxlat = 0;\n\tvar\tmaxlng = 0;\n\tvar\tminlat = 10000;\n\tvar\tminlng = 10000;\n\tvar bounds;\n\t\n\tfor (var i = firstIndex; i < lastIndex; i++)\n\t{\n\t\tvar lat = pointarray[i].LatLng.lat();\n\t\tvar lng = pointarray[i].LatLng.lng();\n\t\tif (lat > maxlat)\n\t\t{\n\t\t\tmaxlat = lat;\n\t\t} \n\t\tif (lat < minlat)\n\t\t{\n\t\t\tminlat = lat;\n\t\t}\n\t\tif (lng > maxlng)\n\t\t{\n\t\t\tmaxlng = lng;\n\t\t}\n\t\tif (lng < minlng)\n\t\t{\n\t\t\tminlng = lng;\n\t\t}\n\t}\n\t\n\tbounds = new google.maps.LatLngBounds(new google.maps.LatLng(minlat, minlng), \n\t\t\t\t\t\t\t\t\t\t new google.maps.LatLng(maxlat, maxlng));\t\n\t\n\treturn bounds;}", "get bounds() {\r\n\t\treturn {\r\n\t\t\tx: this.origin.x * (this.tileSize + this.spacing),\r\n\t\t\ty: this.origin.y * (this.tileSize + this.spacing),\r\n\t\t\tw: this.w * (this.tileSize + this.spacing) - this.spacing,\r\n\t\t\th: this.h * (this.tileSize + this.spacing) - this.spacing\r\n\t\t};\r\n\t}", "_calculateBounds() {\n this.finishPoly();\n var lb = this.geometry.bounds;\n this._bounds.addFrame(this.transform, lb.minX, lb.minY, lb.maxX, lb.maxY);\n }", "function brickCalculator(floorCount)\n{\n //first condition to check if the bulding is more than 20 floors and then calculate needed bricks. for first 20 floor needed bricks are pre-defined.\n if(floorCount>20)\n {\n var excess = floorCount - 20;\n var feetCount = excess*10;\n var totalFeet = feetCount + (10*12) + (10*15);\n var neededBricks = totalFeet*1000;\n }\n //second condition to check if the building is more than 10 floors but less than or equal 20 floors. For first 10 floors needed bricks are pre-defined.\n else if(floorCount>10 && floorCount<=20)\n {\n var excess = floorCount - 10;\n var feetCount = excess*12;\n var totalFeet = feetCount + (10*15);\n var neededBricks = totalFeet*1000;\n }\n //third condition to check if the bulding is less than or equal 10 floors.\n else if(floorCount>0 && floorCount<=10)\n {\n var feetCount = floorCount*15;\n var neededBricks = feetCount*1000;\n }\n //if input is invalid necessary warnings are given.\n else\n {\n return \"Floor can not be negative or you do not need any bricks\";\n }\n return neededBricks;\n}", "function getBounds(feature) {\n var bounds = { min: [999, 999], max: [-999, -999] };\n\n _.each(feature, function(path) {\n _.each(path, function(point) {\n point = map.latLngToLayerPoint(new L.LatLng(point.x, point.y));\n\n bounds.min[0] = Math.min(bounds.min[0], point.x);\n bounds.min[1] = Math.min(bounds.min[1], point.y);\n bounds.max[0] = Math.max(bounds.max[0], point.x);\n bounds.max[1] = Math.max(bounds.max[1], point.y);\n });\n });\n\n return bounds;\n }", "getBounds() {\n throw \"Abstract method\" \n }", "extendLimits(r) {\n if (r.left < this.limits.left + this.options.margin) {\n this.limits.left = r.left - this.options.gridStep;\n }\n if (r.right > this.limits.right - this.options.margin) {\n this.limits.right = r.right + this.options.margin;\n }\n if (r.top < this.limits.top + this.options.margin) {\n this.limits.top = r.top - this.options.margin;\n }\n if (r.bottom > this.limits.bottom - this.options.margin) {\n this.limits.bottom = r.bottom + this.options.margin;\n }\n\n // Recompute the cost of passing through an obstacle\n const width = this.limits.right - this.limits.left;\n const height = this.limits.bottom - this.limits.top;\n this.obstacleCost = width * height / this.options.gridStep + width + height;\n }", "get pointsToApply() {\n let pointsToApply = this.unmodifiedPointsToApply\n if (this._parent.useLocationModifiers) {\n if ([hitlocation.EXTREMITY, hitlocation.LIMB].includes(this._parent.hitLocationRole)) {\n return Math.min(pointsToApply, Math.floor(this._parent.locationMaxHP))\n }\n }\n return pointsToApply\n }", "bounds() {\n const _bounds = new HRect(this.rect);\n _bounds.offsetTo(0, 0);\n return _bounds;\n }", "function mapFitBounds() {\n\t// bounds\n\tvar b = {\n\t north: 0,\n\t south: 0,\n\t east: 0,\n\t west: 0\n\t};\n\t\n\t// is bound came?\n\tvar c = {\n\t\t north: false,\n\t\t south: false,\n\t\t east: false,\n\t\t west: false\t\t\t\n\t};\n\t\n\t// get bounds if any\n\tfor (key in participants) {\n\t\tx = participants[key].geox;\n\t\ty = participants[key].geoy;\n\t\t\n\t\tif (x == 0 || y == 0) continue;\n\t\t\n\t\t// north\n\t\tif (c.north == false) {\n\t\t\tc.north = true; b.north = y;\n\t\t} else {\n\t\t\tb.north = Math.max(b.north,y);\n\t\t}\n\t\t\n\t\t// south\n\t\tif (c.south == false) {\n\t\t\tc.south = true; b.south = y;\n\t\t} else {\n\t\t\tb.south = Math.min(b.south,y);\n\t\t}\n\n\t\t// east\n\t\tif (c.east == false) {\n\t\t\tc.east = true; b.east = x;\n\t\t} else {\n\t\t\tb.east = Math.max(b.east,x);\n\t\t}\n\t\t\n\t\t// west\n\t\tif (c.west == false) {\n\t\t\tc.west = true; b.west = x;\n\t\t} else {\n\t\t\tb.west = Math.min(b.west,x);\n\t\t}\t\t\n\t}\n\t\n\tif (b.east == b.west && b.north == b.south) {\n\t\t// only one point\n\t\tmapObject.setZoom(5);\n\t\tmapObject.setCenter(new google.maps.LatLng(b.south, b.east));\n\t\treturn;\n\t} \n\n\tif (c.east && c.west && c.north && c.south) {\n\t\tmapObject.fitBounds(b);\n\t\t//mapObject.panToBounds(b);\n\t}\n}", "function getBounds (points) {\n\n var north = Infinity, south = 0, east = 0, west = Infinity;\n\n points.forEach(function(point){\n if (point.x < west) west = point.x;\n if (point.x > east) east = point.x;\n if (point.y < north) north = point.y;\n if (point.y > south) south = point.y;\n });\n\n return {north: north, south: south, east: east, west: west};\n}", "calculateRange() {\n if (!this.grid || !this.grid[0]) {\n return\n }\n let rows = this.grid.length\n let cols = this.grid[0].length\n // const vectors = [];\n let min\n let max\n // @from: https://stackoverflow.com/questions/13544476/how-to-find-max-and-min-in-array-using-minimum-comparisons\n for (let j = 0; j < rows; j++) {\n for (let i = 0; i < cols; i++) {\n let vec = this.grid[j][i]\n if (vec !== null) {\n let val = vec.m || vec.magnitude()\n // vectors.push();\n if (min === undefined) {\n min = val\n } else if (max === undefined) {\n max = val\n // update min max\n // 1. Pick 2 elements(a, b), compare them. (say a > b)\n min = Math.min(min, max)\n max = Math.max(min, max)\n } else {\n // 2. Update min by comparing (min, b)\n // 3. Update max by comparing (max, a)\n min = Math.min(val, min)\n max = Math.max(val, max)\n }\n }\n }\n }\n return [min, max]\n }", "function findBounds(lat_min,lat_max, lng_min, lng_max, map, maps) {\n\tmap.setCenter(maps.LatLng(((lat_max + lat_min) / 2.0),((lng_max + lng_min) / 2.0)));\n\tmap.fitBounds(maps.LatLngBounds(\n\t\t//bottom left\n\t\tmaps.LatLng(lat_min, lng_min),\n\t\t//top right\n\t\tmaps.LatLng(lat_max, lng_max)\n\t));\n}", "function calcCircleRadius() {\n\t/* Calc max radius: */\n\tvar latLng1 = myMap.getBounds().getNorthEast();\n\tvar latLng2 = myMap.getBounds().getSouthWest();\n\tvar distance = distanceInMeter(latLng1.lat(), latLng1.lng(), \n\t\t\tlatLng2.lat(), latLng2.lng());\n\t\n\tvar maxRadius = distance * 0.22; // 22% fits very well..\n\t// TODO zoom level 0 und 1 passen hier fuer nicht ganz..\n\tvar radInM = ((currentSliderValue) / MAX_SLIDER_VALUE) * maxRadius;\n\tcurrentRange = Math.round(radInM);\n\treturn radInM;\n}", "function computeBounds_old(constraint, model) {\n let coefs = constraint.variables;\n let currentTotal = 0;\n let positiveUnassigned = 0;\n let negativeUnassigned = 0;\n Object.keys(coefs).forEach(id => {\n switch(model[id]) {\n case true:\n currentTotal += coefs[id];\n break;\n case false:\n break;\n default:\n if (coefs[id] < 0) {\n negativeUnassigned += coefs[id];\n } else {\n positiveUnassigned += coefs[id];\n }\n break;\n }\n });\n return [currentTotal + negativeUnassigned, currentTotal + positiveUnassigned];\n}", "computeRefuel() {\n return ((100 - this._fuelLevel) / 100) * this._capacity;\n }", "function getBounds (markers) {\n\n // [longitude, latitude]\n var max = [-Number.MAX_VALUE, -Number.MAX_VALUE]\n var min = [Number.MAX_VALUE, Number.MAX_VALUE];\n\n for (var i = 0; i < markers.length; i++) {\n max[0] = Math.max(max[0], markers[i].latitude);\n max[1] = Math.max(max[1], markers[i].longitude);\n min[0] = Math.min(min[0], markers[i].latitude);\n min[1] = Math.min(min[1], markers[i].longitude);\n }\n\n return {\n max: max,\n min: min\n };\n}", "function getBounds(num, d)\n{\n\tvar slop = d > 1 ? d - 1 : d; // slop factor is d-1 for 2 or greater\n\tvar exponent = d - 1;\n num = Number(num);\n strExp = num.toExponential();\n\n\tif (strExp != \"\")\n\t{\n\t\tvar matches = ePattern.exec(strExp);\n\t\tif (matches)\n\t\t{\n\t\t\tvar pow10 = Math.pow(10, parseInt(matches[1], 10));\n\t\t\tnum /= pow10;\n\t\t\tvar exp = Math.pow(10, exponent);\n\t\t\tvar lowerBound = num - slop / exp; // get the lower bound\n\t\t\tvar upperBound = num + slop / exp;\n\t\t\tlowerBound = lowerBound * pow10;\n\t\t\tupperBound = upperBound * pow10;\n\t\t}\n\t}\n\telse\n\t{\n\t\tvar exp = Math.pow(10, d);\n\t\tlowerBound = num - slop / exp;\n\t\tupperBound = num + slop / exp;\n\t}\n\n\treturn [mathTools.fixJSMath(lowerBound), mathTools.fixJSMath(upperBound)];\n}", "function getRangeAccuracy() {\n\tvar visible = parseInt($(\"#baseRange\").val());\n\tvar potRange = $(\"#potRange option:selected\").text();\n\n\tif (potRange.indexOf(\"No Potion\")) {\n\t\tvisible = calculateVisible(visible, potRange);\n\t}\n\n\tvar p1 = $(\"#p1 option:selected\").text();\n\tvar pAcc = 1;\n\tif (p1.indexOf(\"No Prayer\")) {\n\t\tpAcc = parseFloat(p1.substr(p1.search(/([\\d]\\.?[\\d]*)/)));\n\t}\n\t\n\tvar style = 0;\n\tif($(\"#radioAccurate\").is(':checked')) { style = 3; }\n else if($(\"#radioRapid\").is(':checked')) { style = 0; }\n\telse if($(\"#radioLongrange\").is(':checked')) { style = 0; }\n\telse { alert(\"No style\"); }\n\t\n\tvar v = $(\"#checkVoid\").is(':checked') ? 1.1 : 1;\n\tvar gear = $(\"#checkSalve\").is(':checked') ? 1.2 : $(\"#checkSlay\").is(':checked') ? 1.15 : 1;\n\tvar bonus = $(\"#total\").find(\".ra\").val() || \"0\";\n\t\n\tvar load = {visible, pAcc, style, v, bonus, gear};\n\treturn calculateRoll(load);\n}", "function calculateRange(upperOrLower, series) {\n if (upperOrLower === 'upper') {\n highestPoint = _.max(_.pluck(series, 'y'))\n return Math.ceil(highestPoint/5)*5;\n }\n else if (upperOrLower === 'lower') {\n lowestPoint = _.min(_.pluck(series, 'y'))\n return Math.floor(lowestPoint/5)*5;\n }\n else {\n return 0;\n }\n }", "function getLayerBounds(lyr, arcs) {\n var bounds = null;\n if (lyr.geometry_type == 'point') {\n bounds = getPointBounds$1(lyr.shapes);\n } else if (lyr.geometry_type == 'polygon' || lyr.geometry_type == 'polyline') {\n bounds = getPathBounds(lyr.shapes, arcs);\n } else {\n // just return null if layer has no bounds\n // error(\"Layer is missing a valid geometry type\");\n }\n return bounds;\n }", "function waterArea(heights) {\n // Write your code here.\n\n let leftmaxes = [];\n let lMax = 0;\n\n for (let i = 0; i < heights.length; i++) {\n leftmaxes[i] = lMax;\n lMax = Math.max(heights[i], lMax);\n }\n console.log(\"leftmaxes\", leftmaxes);\n let rightMaxes = [];\n let rMax = 0;\n\n for (let i = heights.length - 1; i >= 0; i--) {\n rightMaxes[i] = rMax;\n rMax = Math.max(rMax, heights[i]);\n }\n console.log(\"rightmaxes\", rightMaxes);\n let area = 0;\n let res = [];\n for (let i = 0; i < heights.length; i++) {\n //now looking at current el let's calculate the area of water above it\n let minHeight = Math.min(leftmaxes[i], rightMaxes[i]); //take the min Height on both sides of current el\n if (heights[i] < minHeight) {\n //find the difference between the minHeight and the current el(how much water will be stored)\n //and add it to the prev area\n area += minHeight - heights[i]; // skip+skip+8+8+3+8+8+skip+3+3+2+2+3=>48\n }\n }\n return area;\n}", "function brickCalculator(floor){ \n var numOfBricks = 0; \n for (var i = 1; i <= floor; i++) {\n if (i <= 10) {\n numOfBricks = numOfBricks + 1500;\n \n} else if (i <= 20 && i > 10 ) {\n numOfBricks = numOfBricks + 1200;\n \n} else \n numOfBricks = numOfBricks + 1000;\n\n}\n return numOfBricks;\n}", "calcTroops(villageId,buildings)\n {\n let barrackList =[]\n let barrackQ;\n let barrack = this.troopres['club'].split(',');\n let res = m.villageData[villageId][\"res\"];\n console.log(barrack)\n \n barrackList.push(parseInt(res.wood/barrack[0]))\n barrackList.push(parseInt(res.clay/barrack[1]))\n barrackList.push(parseInt(res.iron/barrack[2]))\n barrackList.push(parseInt(res.crop/barrack[3]))\n barrackQ = Math.min.apply(null, barrackList);\n console.log(barrackQ)\n let rcrop = parseInt(res.crop) - barrackQ*barrack[3]; \n if(rcrop>200)\n {\n \n return barrackQ;\n }\n else\n {\n return 0;\n }\n }", "function calculate_minmax(data) {\n\n bound = [];\n bound.max = Math.max.apply(Math, data);\n bound.min = Math.min.apply(Math, data);\n return bound;\n\n}", "function calculateBoundsForGeometryCollection(geometryCollection){\n var extents = [], extent;\n\n for (var i = geometryCollection.geometries.length - 1; i >= 0; i--) {\n extent = calculateBounds(geometryCollection.geometries[i]);\n extents.push([extent[0],extent[1]]);\n extents.push([extent[2],extent[3]]);\n }\n\n return calculateBoundsFromArray(extents);\n }", "function calculateBoundsForGeometryCollection(geometryCollection){\n var extents = [], extent;\n\n for (var i = geometryCollection.geometries.length - 1; i >= 0; i--) {\n extent = calculateBounds(geometryCollection.geometries[i]);\n extents.push([extent[0],extent[1]]);\n extents.push([extent[2],extent[3]]);\n }\n\n return calculateBoundsFromArray(extents);\n }", "function calculateBoundsForGeometryCollection(geometryCollection){\n var extents = [], extent;\n\n for (var i = geometryCollection.geometries.length - 1; i >= 0; i--) {\n extent = calculateBounds(geometryCollection.geometries[i]);\n extents.push([extent[0],extent[1]]);\n extents.push([extent[2],extent[3]]);\n }\n\n return calculateBoundsFromArray(extents);\n }", "function getBoundsForArray(a)\n{\n\tvar maxlat = 0;\n\tvar\tmaxlng = 0;\n\tvar\tminlat = 10000;\n\tvar\tminlng = 10000;\n\tvar bounds;\n\t\n\tfor (var i = 0; i < a.length; i++)\n\t{\n\t\tvar lat = a[i].lat();\n\t\tvar lng = a[i].lng();\n\t\tif (lat > maxlat)\n\t\t{\n\t\t\tmaxlat = lat;\n\t\t} \n\t\tif (lat < minlat)\n\t\t{\n\t\t\tminlat = lat;\n\t\t}\n\t\tif (lng > maxlng)\n\t\t{\n\t\t\tmaxlng = lng;\n\t\t}\n\t\tif (lng < minlng)\n\t\t{\n\t\t\tminlng = lng;\n\t\t}\n\t}\n\t\n\tbounds = new google.maps.LatLngBounds(new google.maps.LatLng(minlat, minlng), \n\t\t\t\t\t\t\t\t\t\t new google.maps.LatLng(maxlat, maxlng));\t\n\t\n\treturn bounds;\n}", "function createBounds(bits) {\n\t return {\n\t min: -1 * Math.pow(2, bits - 1),\n\t max: Math.pow(2, bits - 1) - 1\n\t };\n\t}", "function createBounds(bits) {\n\t return {\n\t min: -1 * Math.pow(2, bits - 1),\n\t max: Math.pow(2, bits - 1) - 1\n\t };\n\t}", "_getRange() {\n const that = this;\n\n if (that.logarithmicScale) {\n that._range = that._drawMax - that._drawMin;\n return;\n }\n\n if (that.scaleType === 'floatingPoint') {\n that._range = (that._drawMax - that._drawMin).toString();\n }\n else {\n that._range = new JQX.Utilities.BigNumber(that._drawMax).subtract(that._drawMin).toString();\n }\n }", "getLoopBounds(index) {\n this.maxX = MIN_FLOAT;\n this.maxY = MIN_FLOAT;\n this.minX = MAX_FLOAT;\n this.minY = MAX_FLOAT;\n //get extreems and load into PVector Array\n for (let i = 0; i < this.loop.body.size(); i++) {\n if (this.maxX < this.loop.body[i].loc.x + 4) this.maxX = loop.body[i].loc.x;\n if (this.maxY < this.loop.body[i].loc.y) this.maxY = loop.body[i].loc.y;\n if (this.minX > this.loop.body[i].loc.x - 4) this.minX = loop.body[i].loc.x;\n if (this.minY > this.loop.body[i].loc.y) this.minY = loop.body[i].loc.y;\n }\n this.loopBounds[0].x = this.maxX;\n this.loopBounds[0].y = this.maxY;\n this.loopBounds[1].x = this.minX;\n this.loopBounds[1].y = this.minY;\n }", "function updateBounds(memoBounds, bounds) {\n for (let lim = 0; lim < 2; lim++) { // limit (0 = min; 1 = max)\n for (let dim = 0; dim < 2; dim++) { // dimension (0 = x; 1 = y)\n memoBounds[lim][dim] =\n Math[lim === 0 ? 'min' : 'max'](memoBounds[lim][dim], bounds[lim][dim])\n }\n }\n}", "function getBoundParams(){\n var bounds = map.getBounds(),\n padding = .00;\n console.log(bounds);\n return { neLat: (bounds._northEast.lat + padding).toFixed(6),\n neLon: (bounds._northEast.lng + padding).toFixed(6),\n swLat: (bounds._southWest.lat - padding).toFixed(6),\n swLon: (bounds._southWest.lng - padding).toFixed(6)\n }\n }", "estaForaDasBounds() {\n if (this.getBird().getPosHeigth() > this.getMaxHeightArena()) {\n // console.log(\"height do passaro fora dos bounds (abaixo)\");\n this.getBird().setPosHeight(this.getMaxHeightArena());\n } else if (this.getBird().getPosWidth() > this.getMaxWidthArena()) {\n // console.log(\"width do passaro fora dos bounds (direita)\");\n this.getBird().setPosWidth(this.getMaxWidthArena());\n }\n }", "function checkBoundaries() {\n let left = tabuleiroBounds.x,\n right = tabuleiroBounds.width,\n top = 0,\n bottom = tabuleiroBounds.height;\n\n disco.vy += gravity;\n disco.x += disco.vx;\n disco.y += disco.vy;\n if (disco.x + disco.radius > right) {\n disco.x = right - disco.radius;\n disco.vx *= bounce;\n } else if (disco.x - disco.radius < left) {\n disco.x = left + disco.radius;\n disco.vx *= bounce;\n }\n if (disco.y + disco.radius > bottom) {\n disco.y = bottom - disco.radius;\n disco.vy *= bounce;\n disco.vx = 0;\n } else if (disco.y - disco.radius < top) {\n disco.y = top + disco.radius;\n disco.vy *= bounce;\n }\n}", "function calcualteCavity(casting_length,casting_breadth,length,breadth)\r\n{\r\n var temp_casting_length=casting_length+30;\r\n var temp_casting_breadth=casting_breadth+30;\r\n row_count=0,column_count=0;\r\n temp_casting_length=parseInt(temp_casting_length);\r\n temp_casting_breadth=parseInt(temp_casting_breadth);\r\n if(length>temp_casting_length&&breadth>temp_casting_breadth)\r\n {\r\n while((length - 30) > temp_casting_length)\r\n {\r\n column_count++;\r\n temp_casting_length+=casting_length+30;\r\n }\r\n while((breadth - 30) > temp_casting_breadth)\r\n {\r\n row_count++;\r\n temp_casting_breadth += casting_breadth + 30;\r\n }\r\n }\r\n else if(length<temp_casting_length&&breadth>temp_casting_breadth)\r\n {\r\n length=parseInt(length)-30;\r\n breadth=parseInt(breadth)-30;\r\n length=Math.sqrt(parseFloat(length*length)+parseFloat(breadth*breadth));\r\n while((length - 30) > temp_casting_length)\r\n {\r\n column_count++;\r\n temp_casting_length+=casting_length+30;\r\n }\r\n /*while((breadth - 30) > temp_casting_breadth)\r\n {\r\n row_count++;\r\n temp_casting_breadth += casting_breadth + 30;\r\n }*/\r\n }\r\n else if(breadth<temp_casting_breadth&&length>temp_casting_length)\r\n {\r\n length=parseInt(length)-30;\r\n breadth=parseInt(breadth)-30;\r\n length=Math.sqrt(parseFloat(length*length)+parseFloat(breadth*breadth));\r\n while((breadth - 30) > temp_casting_breadth)\r\n {\r\n row_count++;\r\n temp_casting_breadth += casting_breadth + 30;\r\n }\r\n }\r\n if(row_count == 1 && column_count ==1)\r\n {\r\n return row_count;\r\n }\r\n //drawDiagram(casting_length,casting_breadth,avl_length,avl_breadth,dimension[0],dimension[1],row_count,column_count,(column_count*row_count));\r\n if(row_count == 0)\r\n {\r\n return column_count;\r\n }\r\n if(column_count == 0)\r\n {\r\n return row_count;\r\n }\r\n return column_count*row_count;\r\n}", "function brickCalculator(floorCount) {\n\n var bricksPerFloor = floorCount * 1000;\n var floorLength;\n\n if(floorCount >= 0 && floorCount <= 10) {\n floorLength = bricksPerFloor * 15;\n }\n else if(floorCount > 10 && floorCount <= 20) {\n floorLength = (bricksPerFloor * 12) + 30000;\n }\n else if(floorCount > 20) {\n floorLength = (bricksPerFloor * 10) + 70000;\n }\n else {\n console.log('Error: Physical quantities can never be negative.')\n }\n return floorLength;\n \n}", "function determineRr (loadedDataset){\n\t\t//Determines hexagon radius 'r' from min distance of neighbours\n\t\tvar borders = [];\n\t\tvar hexes = loadedDataset.conceptsData;\n\t\t//Find distance between immediate neighbours\n\t\tvar d2 = 0, dMin2 = 100000000000000000000000000000;\n\t\tfor (var n =0; n < hexes.length; n++){\n\t\t\tfor (var m =n+1; m < hexes.length; m++){\n\t\t\t\tvar dx = hexes[n].hexCoordinates.x -hexes[m].hexCoordinates.x;\n\t\t\t\tvar dy = hexes[n].hexCoordinates.y -hexes[m].hexCoordinates.y;\n\t\t\t\td2 = dx*dx + dy*dy;\n\t\t\t\tif (d2 < dMin2) dMin2 = d2;\n\t\t\t}\n\t\t}\n\t\treturn Math.sqrt(dMin2)/2;\n\t}", "function BoundingBoxRect() { }", "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 getMapBounds(){\n\tvar bounds = myMap.getBounds();\n\tvar nWlat = bounds.getNorthWest().lat;\n\tvar nWlon = bounds.getNorthWest().lng;\n\tvar sElat = bounds.getSouthEast().lat;\n\tvar sElon = bounds.getSouthEast().lng;\n\tvar boundArray = [nWlat,nWlon, sElat, sElon];\n\treturn boundArray\n}" ]
[ "0.681576", "0.6706417", "0.660061", "0.63839865", "0.63708615", "0.6307134", "0.62913907", "0.6281191", "0.61922103", "0.6177425", "0.6169913", "0.6135824", "0.6122678", "0.6122418", "0.6114216", "0.60479003", "0.6044865", "0.59958386", "0.59903866", "0.5989155", "0.5986858", "0.59599847", "0.59544015", "0.59493643", "0.59393394", "0.5917901", "0.5917901", "0.5915504", "0.58531654", "0.58525854", "0.58267564", "0.5826153", "0.5823308", "0.5823308", "0.5823308", "0.58038247", "0.580307", "0.58022875", "0.5797416", "0.5769814", "0.57695436", "0.57515717", "0.57198733", "0.57086945", "0.56921077", "0.56921077", "0.56921077", "0.5683689", "0.5676846", "0.5672704", "0.5670077", "0.5663414", "0.5651825", "0.56490517", "0.564292", "0.5618922", "0.56188047", "0.56156534", "0.5607754", "0.56050664", "0.5599572", "0.55824685", "0.5565597", "0.5558131", "0.5556579", "0.55534697", "0.5552537", "0.55465895", "0.55276996", "0.5517429", "0.55144536", "0.5510296", "0.55050206", "0.5496585", "0.5493863", "0.5491954", "0.5462674", "0.54616314", "0.5460245", "0.545491", "0.5453651", "0.5438485", "0.54368144", "0.54368144", "0.54368144", "0.54364544", "0.5431302", "0.5431302", "0.5428227", "0.54258275", "0.5417164", "0.54167837", "0.5413904", "0.54038733", "0.5402914", "0.5401649", "0.53959113", "0.53821546", "0.5382108", "0.53757864" ]
0.7160708
0
======================================================================================= ====================================================================================== Scroll the map to a predefined location on the map ======================================================================================
function selectLocation(location) { cmbLocation = location; //if (map == null) return; // map = new google.maps.Map(document.getElementById('map_canvas'),mapOptions); if (map == null) initialize(); switch (location.selectedIndex) { case 1: map.setCenter(new google.maps.LatLng(51.390209,-3.179855), 11);//Cardiff break; case 2: map.setCenter(new google.maps.LatLng(51.495065,-0.282898), 11);//London break; case 3: map.setCenter(new google.maps.LatLng(48.767957,2.272797), 11);//Paris break; case 4: map.setCenter(new google.maps.LatLng(40.720201,-73.755341), 11);//New York break; case 5: map.setCenter(new google.maps.LatLng(34.988941,-110.99556), 11);//Berringer Meteor Crater, Arizona break; case 6: map.setCenter(new google.maps.LatLng(19.120841,19.267273), 11);//Aorounga, Chad , Africa break; case 7: map.setCenter(new google.maps.LatLng(19.093335,19.242731), 11);//Wolfe Creak, Austrailia break; case 8: map.setCenter(new google.maps.LatLng(-27.722436,16.369629), 11);//Roter Kamm, Namibia break; case 9: map.setCenter(new google.maps.LatLng(55.920354,-63.199539), 11);//Mistastin Lake, Canada break; case 10: map.setCenter(new google.maps.LatLng(6.50431,-1.378098), 11);//Bosumtwi, Ghana break; case 11: map.setCenter(new google.maps.LatLng(39.03572,73.464203), 12);//Kara-Kul, Tajikstan break; }//end switch }//=========================================================================================
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function gotoMap() {\n $anchorScroll('map-canvas');\n }", "function scrollMapTo(x, y) {\n\t\tvar scl = eval(x) / this.minimap.xRate;\n\t\tvar sct = eval(y) / this.minimap.yRate;\n\t\tdocument.getElementById(MAP).scrollLeft = scl;\n\t\tdocument.getElementById(MAP).scrollTop = sct;\n\t}", "function scrollToMap() {\n\t$('.map-link a').on('click', function (e) {\n\t\tvar $target = $('.branches-section');\n\n\t\tif ($target.length) {\n\t\t\te.preventDefault();\n\n\t\t\tvar scrollTop = $target.offset().top - $('.nav').outerHeight() - 40;\n\n\t\t\tTweenMax.to(window, 1, {scrollTo: {y: scrollTop}, ease: Power2.easeInOut});\n\t\t}\n\t})\n}", "function locate() {\nmap.locate({setView: true, maxZoom: 16});\n}", "function locate() {\n mymap.locate({setView: true, maxZoom: 18});\n }", "function readyToSearchScrollPosition() {\n window.scrollTo({\n 'top': scrollAnchor.offsetTop,\n 'left': 0,\n 'behavior': 'auto',\n });\n }", "function ScrollPosition() {}", "_moveToMarker(e) {\r\n if ((e.target.closest(\".fav_icon\"))) return;\r\n const targetEl = e.target.closest(\".workout_entry\");\r\n if (!targetEl) return;\r\n\r\n const target = e.target.closest(\".workout_entry\");\r\n if (target) {\r\n mapContainer.scrollIntoView({\r\n behavior: \"smooth\"\r\n });\r\n }\r\n const targetedID = targetEl.dataset.id;\r\n const targetCoords = this.#workouts.find(workout => workout.id === targetedID).coords; //[lat,lng] of targeted workout\r\n this.#map.setView(targetCoords, this.#mapZoomLevel, {\r\n animate: true,\r\n pan: {\r\n duration: 1\r\n }\r\n })\r\n\r\n }", "function readyToSearchScrollPosition() {\n window.scrollTo({\n top: scrollAnchor.offsetTop,\n left: 0,\n behavior: 'auto',\n });\n }", "function jumpToPosition(){\n flexImages3.scrollIntoView({behavior: \"smooth\", block: 'center',inline: 'center'});\n}", "function gotoNode() {\n map.panTo({lat: JSON.parse(this.value).lat, lng: JSON.parse(this.value).lng});\n map.setZoom(15);\n}", "function scrollIntoView(cm, x1, y1, x2, y2) {\n\t\t var scrollPos = calculateScrollPos(cm, x1, y1, x2, y2);\n\t\t if (scrollPos.scrollTop != null) setScrollTop(cm, scrollPos.scrollTop);\n\t\t if (scrollPos.scrollLeft != null) setScrollLeft(cm, scrollPos.scrollLeft);\n\t\t }", "function scrollToMap() {\n if ( $('.hamburger').is(':visible') ) {\n $('html,body').stop().animate( { scrollTop: $('.stickyWrapper').offset().top - ( $('header').outerHeight() + 25 - $('.stickyWrapper').outerHeight() ) }, 777 );\n $('.locationNav').slideUp(350);\n $('.mobileStickynav b').html($('.setMapLocation.mapCountry option:selected').html());\n $('.mobileStickynav .angleIconDown').removeClass('rotate');\n } else {\n $('html,body').stop().animate( { scrollTop: $('.stickyWrapper').offset().top - ( $('header').outerHeight() - $('.headerTopBar').outerHeight() ) }, 777 );\n }\n }", "function scroll() {\n\t\telement.scrollIntoView({behavior: \"smooth\"});\n\t\t\n\t}", "function scrollIntoView(cm, x1, y1, x2, y2) {\n\t var scrollPos = calculateScrollPos(cm, x1, y1, x2, y2);\n\t if (scrollPos.scrollTop != null) setScrollTop(cm, scrollPos.scrollTop);\n\t if (scrollPos.scrollLeft != null) setScrollLeft(cm, scrollPos.scrollLeft);\n\t }", "function scrollIntoView(cm, x1, y1, x2, y2) {\n\t var scrollPos = calculateScrollPos(cm, x1, y1, x2, y2);\n\t if (scrollPos.scrollTop != null) setScrollTop(cm, scrollPos.scrollTop);\n\t if (scrollPos.scrollLeft != null) setScrollLeft(cm, scrollPos.scrollLeft);\n\t }", "function scrollIntoView(cm, x1, y1, x2, y2) {\n\t var scrollPos = calculateScrollPos(cm, x1, y1, x2, y2);\n\t if (scrollPos.scrollTop != null) setScrollTop(cm, scrollPos.scrollTop);\n\t if (scrollPos.scrollLeft != null) setScrollLeft(cm, scrollPos.scrollLeft);\n\t }", "function scrollIntoView(cm, x1, y1, x2, y2) {\n var scrollPos = calculateScrollPos(cm, x1, y1, x2, y2);\n if (scrollPos.scrollTop != null) setScrollTop(cm, scrollPos.scrollTop);\n if (scrollPos.scrollLeft != null) setScrollLeft(cm, scrollPos.scrollLeft);\n }", "function scrollIntoView(cm, x1, y1, x2, y2) {\n var scrollPos = calculateScrollPos(cm, x1, y1, x2, y2);\n if (scrollPos.scrollTop != null) setScrollTop(cm, scrollPos.scrollTop);\n if (scrollPos.scrollLeft != null) setScrollLeft(cm, scrollPos.scrollLeft);\n }", "function scrollIntoView(cm, x1, y1, x2, y2) {\n var scrollPos = calculateScrollPos(cm, x1, y1, x2, y2);\n if (scrollPos.scrollTop != null) setScrollTop(cm, scrollPos.scrollTop);\n if (scrollPos.scrollLeft != null) setScrollLeft(cm, scrollPos.scrollLeft);\n }", "function scrollIntoView(cm, x1, y1, x2, y2) {\n var scrollPos = calculateScrollPos(cm, x1, y1, x2, y2);\n if (scrollPos.scrollTop != null) setScrollTop(cm, scrollPos.scrollTop);\n if (scrollPos.scrollLeft != null) setScrollLeft(cm, scrollPos.scrollLeft);\n }", "function scrollIntoView(cm, x1, y1, x2, y2) {\n var scrollPos = calculateScrollPos(cm, x1, y1, x2, y2);\n if (scrollPos.scrollTop != null) setScrollTop(cm, scrollPos.scrollTop);\n if (scrollPos.scrollLeft != null) setScrollLeft(cm, scrollPos.scrollLeft);\n }", "function scrollIntoView(cm, x1, y1, x2, y2) {\n var scrollPos = calculateScrollPos(cm, x1, y1, x2, y2);\n if (scrollPos.scrollTop != null) setScrollTop(cm, scrollPos.scrollTop);\n if (scrollPos.scrollLeft != null) setScrollLeft(cm, scrollPos.scrollLeft);\n }", "function scrollIntoView(cm, x1, y1, x2, y2) {\n var scrollPos = calculateScrollPos(cm, x1, y1, x2, y2);\n if (scrollPos.scrollTop != null) setScrollTop(cm, scrollPos.scrollTop);\n if (scrollPos.scrollLeft != null) setScrollLeft(cm, scrollPos.scrollLeft);\n }", "function scrollIntoView(cm, x1, y1, x2, y2) {\r\n var scrollPos = calculateScrollPos(cm, x1, y1, x2, y2);\r\n if (scrollPos.scrollTop != null) setScrollTop(cm, scrollPos.scrollTop);\r\n if (scrollPos.scrollLeft != null) setScrollLeft(cm, scrollPos.scrollLeft);\r\n }", "function goToByScroll(id) {\n $('html,body').animate({scrollTop: $(id).offset().top - 70}, 'slow');\n }", "function goToByScroll(id) {\n $('html,body').animate({scrollTop: $(id).offset().top - 70}, 'slow');\n }", "function jumpto(coordinates, zoom){\n let position = fromLonLat(coordinates)\n if (zoom)\n view.animate({zoom: zoom, center: position});\n else\n view.animate({center: position});\n}", "function moveTo(latitude,longitude){\r\n\tmap.setZoom(16);\r\n\tlet position = {lat:latitude,lng:longitude};\r\n\tmap.panTo(position);\r\n}", "function skipMap(){\r\n document.getElementById(\"more-anchor\").focus();\r\n}", "function scrollToObject() {\n\t\t\t$q.all([\n\t\t\t FindElement.byId(\"resultTableWrapper\"),\n\t\t\t FindElement.byQuery(\"#resultsTable .selectedRow\")\n\t\t\t ]).then(function(elements) {\n\t\t\t\t var table = angular.element(elements[0]);\n\t\t\t\t var selected = angular.element(elements[1]);\n\t\t\t\t var offset = 30;\n\t\t\t\t table.scrollToElement(selected, offset, 0);\n\t\t\t });\n\t\t\t//setFocus();\n\t\t}", "function scrollIntoView(cm, rect) {\n\t\t var scrollPos = calculateScrollPos(cm, rect);\n\t\t if (scrollPos.scrollTop != null) { updateScrollTop(cm, scrollPos.scrollTop); }\n\t\t if (scrollPos.scrollLeft != null) { setScrollLeft(cm, scrollPos.scrollLeft); }\n\t\t }", "function scrollToObject() {\n\t\t\t$q.all([\n\t\t\t FindElement.byId(\"resultTableWrapper\"),\n\t\t\t FindElement.byQuery(\"#resultsTable .selectedRow\")\n\t\t\t ]).then(function(elements) {\n\t\t\t\t var table = angular.element(elements[0]);\n\t\t\t\t var selected = angular.element(elements[1]);\n\t\t\t\t var offset = 30;\n\t\t\t\t table.scrollToElement(selected, offset, 0);\n\t\t\t });\n\t\t\tsetFocus();\n\t\t}", "function showCoords() {\n // TODO: Set the map center to the latitude / longitude position of your own home\n\n\n // TODO: Zoom the map close enough\n\n}", "function scrollIntoView(cm, x1, y1, x2, y2) {\n var scrollPos = calculateScrollPos(cm, x1, y1, x2, y2)\n if (scrollPos.scrollTop != null) { setScrollTop(cm, scrollPos.scrollTop) }\n if (scrollPos.scrollLeft != null) { setScrollLeft(cm, scrollPos.scrollLeft) }\n}", "function scrollIntoView(cm, rect) {\n var scrollPos = calculateScrollPos(cm, rect);\n if (scrollPos.scrollTop != null) { updateScrollTop(cm, scrollPos.scrollTop); }\n if (scrollPos.scrollLeft != null) { setScrollLeft(cm, scrollPos.scrollLeft); }\n }", "function scrollIntoView(cm, rect) {\n var scrollPos = calculateScrollPos(cm, rect);\n if (scrollPos.scrollTop != null) { updateScrollTop(cm, scrollPos.scrollTop); }\n if (scrollPos.scrollLeft != null) { setScrollLeft(cm, scrollPos.scrollLeft); }\n }", "function scrollIntoView(cm, rect) {\n var scrollPos = calculateScrollPos(cm, rect);\n if (scrollPos.scrollTop != null) { updateScrollTop(cm, scrollPos.scrollTop); }\n if (scrollPos.scrollLeft != null) { setScrollLeft(cm, scrollPos.scrollLeft); }\n }", "function scrollIntoView(cm, rect) {\n var scrollPos = calculateScrollPos(cm, rect);\n if (scrollPos.scrollTop != null) { updateScrollTop(cm, scrollPos.scrollTop); }\n if (scrollPos.scrollLeft != null) { setScrollLeft(cm, scrollPos.scrollLeft); }\n }", "function scrollIntoView(cm, rect) {\n var scrollPos = calculateScrollPos(cm, rect);\n if (scrollPos.scrollTop != null) { updateScrollTop(cm, scrollPos.scrollTop); }\n if (scrollPos.scrollLeft != null) { setScrollLeft(cm, scrollPos.scrollLeft); }\n }", "function scrollIntoView(cm, rect) {\n var scrollPos = calculateScrollPos(cm, rect);\n if (scrollPos.scrollTop != null) { updateScrollTop(cm, scrollPos.scrollTop); }\n if (scrollPos.scrollLeft != null) { setScrollLeft(cm, scrollPos.scrollLeft); }\n }", "function scrollIntoView(cm, rect) {\n var scrollPos = calculateScrollPos(cm, rect);\n if (scrollPos.scrollTop != null) { updateScrollTop(cm, scrollPos.scrollTop); }\n if (scrollPos.scrollLeft != null) { setScrollLeft(cm, scrollPos.scrollLeft); }\n }", "function scrollIntoView(cm, rect) {\n var scrollPos = calculateScrollPos(cm, rect);\n if (scrollPos.scrollTop != null) { updateScrollTop(cm, scrollPos.scrollTop); }\n if (scrollPos.scrollLeft != null) { setScrollLeft(cm, scrollPos.scrollLeft); }\n }", "function scrollIntoView(cm, rect) {\n var scrollPos = calculateScrollPos(cm, rect);\n if (scrollPos.scrollTop != null) { updateScrollTop(cm, scrollPos.scrollTop); }\n if (scrollPos.scrollLeft != null) { setScrollLeft(cm, scrollPos.scrollLeft); }\n }", "function scrollIntoView(cm, rect) {\n var scrollPos = calculateScrollPos(cm, rect);\n if (scrollPos.scrollTop != null) { updateScrollTop(cm, scrollPos.scrollTop); }\n if (scrollPos.scrollLeft != null) { setScrollLeft(cm, scrollPos.scrollLeft); }\n }", "function scrollIntoView(cm, rect) {\n var scrollPos = calculateScrollPos(cm, rect);\n if (scrollPos.scrollTop != null) { updateScrollTop(cm, scrollPos.scrollTop); }\n if (scrollPos.scrollLeft != null) { setScrollLeft(cm, scrollPos.scrollLeft); }\n }", "function scrollIntoView(cm, rect) {\n var scrollPos = calculateScrollPos(cm, rect);\n if (scrollPos.scrollTop != null) { updateScrollTop(cm, scrollPos.scrollTop); }\n if (scrollPos.scrollLeft != null) { setScrollLeft(cm, scrollPos.scrollLeft); }\n }", "function scrollIntoView(cm, rect) {\n var scrollPos = calculateScrollPos(cm, rect);\n if (scrollPos.scrollTop != null) { updateScrollTop(cm, scrollPos.scrollTop); }\n if (scrollPos.scrollLeft != null) { setScrollLeft(cm, scrollPos.scrollLeft); }\n }", "function scrollIntoView(cm, rect) {\n var scrollPos = calculateScrollPos(cm, rect);\n if (scrollPos.scrollTop != null) { updateScrollTop(cm, scrollPos.scrollTop); }\n if (scrollPos.scrollLeft != null) { setScrollLeft(cm, scrollPos.scrollLeft); }\n }", "function scrollIntoView(cm, rect) {\n var scrollPos = calculateScrollPos(cm, rect);\n if (scrollPos.scrollTop != null) { updateScrollTop(cm, scrollPos.scrollTop); }\n if (scrollPos.scrollLeft != null) { setScrollLeft(cm, scrollPos.scrollLeft); }\n }", "function scrollIntoView(cm, rect) {\n var scrollPos = calculateScrollPos(cm, rect);\n if (scrollPos.scrollTop != null) { updateScrollTop(cm, scrollPos.scrollTop); }\n if (scrollPos.scrollLeft != null) { setScrollLeft(cm, scrollPos.scrollLeft); }\n }", "function scrollIntoView(cm, rect) {\n var scrollPos = calculateScrollPos(cm, rect);\n if (scrollPos.scrollTop != null) { updateScrollTop(cm, scrollPos.scrollTop); }\n if (scrollPos.scrollLeft != null) { setScrollLeft(cm, scrollPos.scrollLeft); }\n }", "function resolveScrollToPos(cm) {\n\t\t var range = cm.curOp.scrollToPos;\n\t\t if (range) {\n\t\t cm.curOp.scrollToPos = null;\n\t\t var from = estimateCoords(cm, range.from), to = estimateCoords(cm, range.to);\n\t\t scrollToCoordsRange(cm, from, to, range.margin);\n\t\t }\n\t\t }", "function scrollTo( id ) {\n scroller.scrollTo( id );\n}", "function resolveScrollToPos(cm) {\n var range$$1 = cm.curOp.scrollToPos;\n if (range$$1) {\n cm.curOp.scrollToPos = null;\n var from = estimateCoords(cm, range$$1.from), to = estimateCoords(cm, range$$1.to);\n scrollToCoordsRange(cm, from, to, range$$1.margin);\n }\n }", "function resolveScrollToPos(cm) {\n var range$$1 = cm.curOp.scrollToPos;\n if (range$$1) {\n cm.curOp.scrollToPos = null;\n var from = estimateCoords(cm, range$$1.from), to = estimateCoords(cm, range$$1.to);\n scrollToCoordsRange(cm, from, to, range$$1.margin);\n }\n }", "function resolveScrollToPos(cm) {\n var range$$1 = cm.curOp.scrollToPos;\n if (range$$1) {\n cm.curOp.scrollToPos = null;\n var from = estimateCoords(cm, range$$1.from), to = estimateCoords(cm, range$$1.to);\n scrollToCoordsRange(cm, from, to, range$$1.margin);\n }\n }", "function resolveScrollToPos(cm) {\n var range$$1 = cm.curOp.scrollToPos;\n if (range$$1) {\n cm.curOp.scrollToPos = null;\n var from = estimateCoords(cm, range$$1.from), to = estimateCoords(cm, range$$1.to);\n scrollToCoordsRange(cm, from, to, range$$1.margin);\n }\n }", "function resolveScrollToPos(cm) {\n var range$$1 = cm.curOp.scrollToPos;\n if (range$$1) {\n cm.curOp.scrollToPos = null;\n var from = estimateCoords(cm, range$$1.from), to = estimateCoords(cm, range$$1.to);\n scrollToCoordsRange(cm, from, to, range$$1.margin);\n }\n }", "function resolveScrollToPos(cm) {\n var range$$1 = cm.curOp.scrollToPos;\n if (range$$1) {\n cm.curOp.scrollToPos = null;\n var from = estimateCoords(cm, range$$1.from), to = estimateCoords(cm, range$$1.to);\n scrollToCoordsRange(cm, from, to, range$$1.margin);\n }\n }", "function resolveScrollToPos(cm) {\n var range$$1 = cm.curOp.scrollToPos;\n if (range$$1) {\n cm.curOp.scrollToPos = null;\n var from = estimateCoords(cm, range$$1.from), to = estimateCoords(cm, range$$1.to);\n scrollToCoordsRange(cm, from, to, range$$1.margin);\n }\n }", "function resolveScrollToPos(cm) {\n var range$$1 = cm.curOp.scrollToPos;\n if (range$$1) {\n cm.curOp.scrollToPos = null;\n var from = estimateCoords(cm, range$$1.from), to = estimateCoords(cm, range$$1.to);\n scrollToCoordsRange(cm, from, to, range$$1.margin);\n }\n }", "function resolveScrollToPos(cm) {\n var range$$1 = cm.curOp.scrollToPos;\n if (range$$1) {\n cm.curOp.scrollToPos = null;\n var from = estimateCoords(cm, range$$1.from), to = estimateCoords(cm, range$$1.to);\n scrollToCoordsRange(cm, from, to, range$$1.margin);\n }\n }", "function resolveScrollToPos(cm) {\r\n var range$$1 = cm.curOp.scrollToPos;\r\n if (range$$1) {\r\n cm.curOp.scrollToPos = null;\r\n var from = estimateCoords(cm, range$$1.from), to = estimateCoords(cm, range$$1.to);\r\n scrollToCoordsRange(cm, from, to, range$$1.margin);\r\n }\r\n}", "function scrollIntoView(cm, rect) {\n var scrollPos = calculateScrollPos(cm, rect)\n if (scrollPos.scrollTop != null) { setScrollTop(cm, scrollPos.scrollTop) }\n if (scrollPos.scrollLeft != null) { setScrollLeft(cm, scrollPos.scrollLeft) }\n}", "function resolveScrollToPos(cm) {\n var range$$1 = cm.curOp.scrollToPos;\n if (range$$1) {\n cm.curOp.scrollToPos = null;\n var from = estimateCoords(cm, range$$1.from), to = estimateCoords(cm, range$$1.to);\n scrollToCoordsRange(cm, from, to, range$$1.margin);\n }\n}", "function resolveScrollToPos(cm) {\n var range$$1 = cm.curOp.scrollToPos;\n if (range$$1) {\n cm.curOp.scrollToPos = null;\n var from = estimateCoords(cm, range$$1.from), to = estimateCoords(cm, range$$1.to);\n scrollToCoordsRange(cm, from, to, range$$1.margin);\n }\n}", "function resolveScrollToPos(cm) {\n var range$$1 = cm.curOp.scrollToPos;\n if (range$$1) {\n cm.curOp.scrollToPos = null;\n var from = estimateCoords(cm, range$$1.from), to = estimateCoords(cm, range$$1.to);\n scrollToCoordsRange(cm, from, to, range$$1.margin);\n }\n}", "function resolveScrollToPos(cm) {\n var range$$1 = cm.curOp.scrollToPos;\n if (range$$1) {\n cm.curOp.scrollToPos = null;\n var from = estimateCoords(cm, range$$1.from), to = estimateCoords(cm, range$$1.to);\n scrollToCoordsRange(cm, from, to, range$$1.margin);\n }\n}", "function resolveScrollToPos(cm) {\n var range$$1 = cm.curOp.scrollToPos;\n if (range$$1) {\n cm.curOp.scrollToPos = null;\n var from = estimateCoords(cm, range$$1.from), to = estimateCoords(cm, range$$1.to);\n scrollToCoordsRange(cm, from, to, range$$1.margin);\n }\n}", "function resolveScrollToPos(cm) {\n var range$$1 = cm.curOp.scrollToPos;\n if (range$$1) {\n cm.curOp.scrollToPos = null;\n var from = estimateCoords(cm, range$$1.from), to = estimateCoords(cm, range$$1.to);\n scrollToCoordsRange(cm, from, to, range$$1.margin);\n }\n}", "function resolveScrollToPos(cm) {\n var range$$1 = cm.curOp.scrollToPos;\n if (range$$1) {\n cm.curOp.scrollToPos = null;\n var from = estimateCoords(cm, range$$1.from), to = estimateCoords(cm, range$$1.to);\n scrollToCoordsRange(cm, from, to, range$$1.margin);\n }\n}", "function resolveScrollToPos(cm) {\n var range$$1 = cm.curOp.scrollToPos;\n if (range$$1) {\n cm.curOp.scrollToPos = null;\n var from = estimateCoords(cm, range$$1.from), to = estimateCoords(cm, range$$1.to);\n scrollToCoordsRange(cm, from, to, range$$1.margin);\n }\n}", "function resolveScrollToPos(cm) {\n var range$$1 = cm.curOp.scrollToPos;\n if (range$$1) {\n cm.curOp.scrollToPos = null;\n var from = estimateCoords(cm, range$$1.from), to = estimateCoords(cm, range$$1.to);\n scrollToCoordsRange(cm, from, to, range$$1.margin);\n }\n}", "function resolveScrollToPos(cm) {\n var range$$1 = cm.curOp.scrollToPos;\n if (range$$1) {\n cm.curOp.scrollToPos = null;\n var from = estimateCoords(cm, range$$1.from), to = estimateCoords(cm, range$$1.to);\n scrollToCoordsRange(cm, from, to, range$$1.margin);\n }\n}", "function resolveScrollToPos(cm) {\n var range$$1 = cm.curOp.scrollToPos;\n if (range$$1) {\n cm.curOp.scrollToPos = null;\n var from = estimateCoords(cm, range$$1.from), to = estimateCoords(cm, range$$1.to);\n scrollToCoordsRange(cm, from, to, range$$1.margin);\n }\n}", "function goToLondon(){\n\tvar position = findPos(document.getElementById(\"London\"));\n\teasingScrollAction(position,2000);\n}", "function moveMap(coords) {\n map.panTo(coords);\n}", "function Fly(Long, Lat){\n map.flyTo({\n center: [Long, Lat],\n zoom: (10)\n });\n}", "function scrolldiv() {\n window.scroll(0, findPosition(matches[i]));\n }", "function resolveScrollToPos(cm) {\n\t\t var range = cm.curOp.scrollToPos;\n\t\t if (range) {\n\t\t cm.curOp.scrollToPos = null;\n\t\t var from = estimateCoords(cm, range.from), to = estimateCoords(cm, range.to);\n\t\t var sPos = calculateScrollPos(cm, Math.min(from.left, to.left),\n\t\t Math.min(from.top, to.top) - range.margin,\n\t\t Math.max(from.right, to.right),\n\t\t Math.max(from.bottom, to.bottom) + range.margin);\n\t\t cm.scrollTo(sPos.scrollLeft, sPos.scrollTop);\n\t\t }\n\t\t }", "_onMoveEnd() {\n this._map.locate({\n 'watch': true,\n 'setView': false,\n 'enableHighAccuracy': true,\n });\n }", "function toggleScrollMap() {\n scrollMap.canvas.style.setProperty('display', this.checked ? 'block' : 'none');\n}", "function goTo(geometry) {\n mapview.goTo({\n target: geometry,\n }, {\n duration: 2000,\n easing: \"ease-in-out\"\n });\n }", "function projectSection() {\n window.scrollTo({ top: 2250, behavior: 'smooth' })\n}", "function scrollIntoView(cm, rect) {\r\n var scrollPos = calculateScrollPos(cm, rect);\r\n if (scrollPos.scrollTop != null) { updateScrollTop(cm, scrollPos.scrollTop); }\r\n if (scrollPos.scrollLeft != null) { setScrollLeft(cm, scrollPos.scrollLeft); }\r\n}", "function myPanto(lat, lng) {\n let zoom = 13;\n\n \n map.setView([lat, lng], zoom, {\n animate: true,\n noMoveStart: true\n });\n map.closePopup();\n}", "function resolveScrollToPos(cm) {\n var range = cm.curOp.scrollToPos;\n if (range) {\n cm.curOp.scrollToPos = null;\n var from = estimateCoords(cm, range.from), to = estimateCoords(cm, range.to);\n scrollToCoordsRange(cm, from, to, range.margin);\n }\n }", "function resolveScrollToPos(cm) {\n var range = cm.curOp.scrollToPos;\n if (range) {\n cm.curOp.scrollToPos = null;\n var from = estimateCoords(cm, range.from), to = estimateCoords(cm, range.to);\n scrollToCoordsRange(cm, from, to, range.margin);\n }\n }", "function resolveScrollToPos(cm) {\n var range = cm.curOp.scrollToPos;\n if (range) {\n cm.curOp.scrollToPos = null;\n var from = estimateCoords(cm, range.from), to = estimateCoords(cm, range.to);\n scrollToCoordsRange(cm, from, to, range.margin);\n }\n }", "function resolveScrollToPos(cm) {\n var range = cm.curOp.scrollToPos;\n if (range) {\n cm.curOp.scrollToPos = null;\n var from = estimateCoords(cm, range.from), to = estimateCoords(cm, range.to);\n scrollToCoordsRange(cm, from, to, range.margin);\n }\n }", "function resolveScrollToPos(cm) {\n var range = cm.curOp.scrollToPos;\n if (range) {\n cm.curOp.scrollToPos = null;\n var from = estimateCoords(cm, range.from), to = estimateCoords(cm, range.to);\n scrollToCoordsRange(cm, from, to, range.margin);\n }\n }", "function resolveScrollToPos(cm) {\n var range = cm.curOp.scrollToPos;\n if (range) {\n cm.curOp.scrollToPos = null;\n var from = estimateCoords(cm, range.from), to = estimateCoords(cm, range.to);\n scrollToCoordsRange(cm, from, to, range.margin);\n }\n }", "function resolveScrollToPos(cm) {\n var range = cm.curOp.scrollToPos;\n if (range) {\n cm.curOp.scrollToPos = null;\n var from = estimateCoords(cm, range.from), to = estimateCoords(cm, range.to);\n scrollToCoordsRange(cm, from, to, range.margin);\n }\n }", "function resolveScrollToPos(cm) {\n var range = cm.curOp.scrollToPos;\n if (range) {\n cm.curOp.scrollToPos = null;\n var from = estimateCoords(cm, range.from), to = estimateCoords(cm, range.to);\n scrollToCoordsRange(cm, from, to, range.margin);\n }\n }", "function moveMap(loc){\n\n\tvar point = map.getCenter();\n\n\teasingAnimator.easeProp({\n\t\tlat: point.lat(),\n\t\tlng: point.lng()\n\t}, {lat: loc.lat(), lng: loc.lng() });\n\n}", "function scrollDown(){\n window.scroll({ top:532, left:0, behavior: 'smooth'});\n }", "function scrollIntoView(cm, rect) {\n var scrollPos = calculateScrollPos(cm, rect);\n if (scrollPos.scrollTop != null) { updateScrollTop(cm, scrollPos.scrollTop); }\n if (scrollPos.scrollLeft != null) { setScrollLeft(cm, scrollPos.scrollLeft); }\n}", "function scrollIntoView(cm, rect) {\n var scrollPos = calculateScrollPos(cm, rect);\n if (scrollPos.scrollTop != null) { updateScrollTop(cm, scrollPos.scrollTop); }\n if (scrollPos.scrollLeft != null) { setScrollLeft(cm, scrollPos.scrollLeft); }\n}", "function scrollIntoView(cm, rect) {\n var scrollPos = calculateScrollPos(cm, rect);\n if (scrollPos.scrollTop != null) { updateScrollTop(cm, scrollPos.scrollTop); }\n if (scrollPos.scrollLeft != null) { setScrollLeft(cm, scrollPos.scrollLeft); }\n}", "function scrollIntoView(cm, rect) {\n var scrollPos = calculateScrollPos(cm, rect);\n if (scrollPos.scrollTop != null) { updateScrollTop(cm, scrollPos.scrollTop); }\n if (scrollPos.scrollLeft != null) { setScrollLeft(cm, scrollPos.scrollLeft); }\n}" ]
[ "0.8091349", "0.7295453", "0.6643882", "0.62716085", "0.62675714", "0.62139004", "0.6201851", "0.6195447", "0.6162689", "0.61540633", "0.61435235", "0.60954684", "0.6071221", "0.6055957", "0.60186976", "0.60186976", "0.60186976", "0.59974647", "0.59974647", "0.59974647", "0.59974647", "0.59974647", "0.59974647", "0.59974647", "0.5974951", "0.5918918", "0.5918918", "0.5903833", "0.59037364", "0.58979756", "0.5891309", "0.5883904", "0.5883797", "0.58807033", "0.5869148", "0.58666384", "0.58666384", "0.58666384", "0.58666384", "0.58666384", "0.58666384", "0.58666384", "0.58666384", "0.58666384", "0.58666384", "0.58666384", "0.58666384", "0.58666384", "0.58666384", "0.58666384", "0.58666384", "0.58666384", "0.5854985", "0.5843718", "0.5831728", "0.5831728", "0.5831728", "0.5831728", "0.5831728", "0.5831728", "0.5831728", "0.5831728", "0.5831728", "0.58186466", "0.5807494", "0.5807032", "0.5807032", "0.5807032", "0.5807032", "0.5807032", "0.5807032", "0.5807032", "0.5807032", "0.5807032", "0.5807032", "0.5807032", "0.5800786", "0.5798256", "0.5794307", "0.57923526", "0.57880586", "0.57861954", "0.577281", "0.5771912", "0.57688767", "0.57637197", "0.57566196", "0.57552075", "0.57552075", "0.57552075", "0.57552075", "0.57552075", "0.57552075", "0.57552075", "0.57552075", "0.57536715", "0.57458234", "0.5732254", "0.5732254", "0.5732254", "0.5732254" ]
0.0
-1
============================================ Parse the XML for this page =============================================
function parseXml(xml) { console.log('parsing xml'); //var x = $(xml).find("btStart").text(); var x = $(xml).find("result").text(); $("#Crater_Size_Title").html(x); $("#Crater_Depth_Title").html(x); $("#Data_Title").html(x); x = $(xml).find("lblImpactVal").text(); $("#InputValues_Title").html(x); x = $(xml).find("htParameter").text(); $("#Thead_param").html(x); $("#Thead_param1").html(x); $("#Thead_param3").html(x); $("#Thead_param4").html(x); x = $(xml).find("htValue").text(); $("#Thead_value").html(x); $("#Thead_value1").html(x); $("#Thead_value3").html(x); $("#Thead_value4").html(x) x = $(xml).find("lblSelect").text(); $("#SelectLM_Title").html(x); $("#cpp_0").html(x); $("#cpl_0").html(x); x = $(xml).find("lblSphinx").text(); $("#cpl_1").html(x); x = $(xml).find("lblBen").text(); $("#cpl_2").html(x); x = $(xml).find("lblEiffel").text(); $("#cpl_3").html(x); x = $(xml).find("lblEmpireSt").text(); $("#cpl_4").html(x); x = $(xml).find("lblCN").text(); $("#cpl_5").html(x); x = $(xml).find("lblBurj").text(); $("#cpl_6").html(x); x = $(xml).find("lblClickMap").text(); $("#MapInst").html(x); x = $(xml).find("btBack").text(); $("#BT_Back").html(x); x = $(xml).find("cvsData").text(); $("#BT_Data").html(x); $("#Data_Title").append(" - " + x); x = $(xml).find("cvsDepth").text(); $("#BT_CraterDepth").html(x); $("#Crater_Depth_Title").append(" - " + x); x = $(xml).find("cvsSize").text(); $("#BT_CraterPlace").html(x); $("#Crater_Size_Title").append(" - " +x); x = $(xml).find("lblLandmark").text(); $("#LB_SelectLandmark").html(x); x = $(xml).find("lblInVals").text(); $("#LB_InpactValues").html(x); x = $(xml).find("damage1").text(); damage1 = x; $("#LB_Damage").html(x); x = $(xml).find("damage2").text(); damage2 = x; $("#LB_Damage").append( " " + x + " " + x); x = $(xml).find("lblImpEnergy").text(); $("#LB_InputEnergy").html(x); x = $(xml).find("lblWhatImpactor").text(); $("#LB_Impactor").html(x); x = $(xml).find("lblFireball").text(); $("#LB_Fireball").html(x); //////////////////////////// onLoadComplete(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parseXML(xml) {\r\n\r\n \"use strict\";\r\n\t$(\"#loading\").hide();\t\t\t\t//hide the loading animation\r\n /*------------------------------------------------------------------------------------\r\n HTML Head:\r\n \r\n Any content that is suitable for the head will be parsed in this section. \r\n This includes the title, the authors, and the favicon.\r\n -----------------------------------------------------------------------------------*/\r\n var headArray = [];\r\n\r\n //Title\r\n\theadArray.push(\"<title>\" + $(xml).find('about').find('title').text() + \"</title>\");\r\n\r\n //loop for adding creators to the meta tag\r\n $(xml).find('about').find('creators').find('creator').each(function() {\r\n\t headArray.push(\"<meta name='author' content='\" + $(this).attr('creator_name') + \"'>\");\r\n\t});\r\n\t\r\n\t//Favicon\r\n\tif($(xml).find('overall_style').find('favicon')) {\r\n\t\t\r\n\t\tvar faviconType = $(xml).find('overall_style').find('favicon').attr('file_format');\r\n\t\tvar faviconHref = $(xml).find('overall_style').find('favicon').attr('href');\r\n\t\t\r\n\t\tif(faviconType == \".ico\"){\r\n\t\t\theadArray.push(\"<link rel='shortcut icon' href='\" + faviconHref + \"'>\");\r\n\t\t}\r\n\t\telse if(faviconType == \".gif\"){\r\n\t\t\theadArray.push(\"<link rel='icon' type='image/gif' href='\" + faviconHref + \"'>\");\r\n\t\t}\r\n\t}\r\n\t\r\n\t//Append to head so it doesn't overwrite stylesheets\r\n\t$('head').append(headArray.join(''));\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t/*------------------------------------=-------------------------------------------------\r\n\tTitle page:\r\n\t\r\n\tThe user can choose to include a title page on their website with predetermined styling.\r\n\tThis is an optional choice that the user can opt out of, but is convenient for having\r\n\ta consistent style for title pages. This includes the title, subtitle (if it exists), \r\n\tand the creators. \r\n\t--------------------------------------=-----------------------------------------------*/\r\n\tif ($(xml).find('about').attr('include_title_page') == \"yes\") {\r\n\t\tvar titleArray = Array();\r\n\t\t\r\n\t\t//Add title to title div\r\n\t\ttitleArray.push(\"<h1>\" + $(xml).find('title').text() + \"</h1>\");\r\n\t\t\r\n\t\t//Add subtitle if it exists\r\n\t\tif($(xml).find('subtitle')) {\r\n\t\t\ttitleArray.push(\"<h2>\" + $(xml).find('subtitle').text() + \"</h2>\");\r\n\t\t}\r\n\t\t\t\t\t\r\n\t\t/*Add the creators' names*/\t\t\r\n\t\t//Create an array to hold the names of the creators so it can be joined properly\r\n\t\tvar creatorsArray = Array();\r\n\t\t\r\n\t\t//loop to add every creator\r\n\t\t$(xml).find('about').find('creator').each(function(){\r\n\t\t\tcreatorsArray.push($(this).attr('creator_name'));\r\n\t\t});\r\n\t\t\r\n\t\ttitleArray.push(\"<h3>Created by \" + creatorsArray.join(', ') + \"</h3>\");\r\n\t\t$(\"#about-content\").append(titleArray.join(''));\r\n\t\t\r\n\t\t//check for title styling in overall_style\r\n\t\tif ($(xml).find('overall_style').find('title_page_style')){\r\n\t\t\t\r\n\t\t\t//Call the appendClass function to append every class chosen to the title div\r\n\t\t\tappendClass($(xml).find('title_page_style'));\t//call appendClass, pass through overall_font\r\n\t\t\tvar titleClassString = classArray.join(' ');\t//join all the classes that are chosen\r\n\t\t\t$(\"#about\").addClass(titleClassString);\t\t//append class to container\r\n\t\t\tclassArray = [];\t\t\t\t\t\t\t\t//reset array for next class\r\n\t\t}\r\n\t}\r\n\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t/*------------------------------------------------------------------------------\r\n\tOverall Style:\r\n\t\r\n\tThe overall style will append all of the content from the overall_style section\r\n\tfrom the XML file. This includes the overall font defaults and the audio.\r\n\t------------------------------------------------------------------------------*/\r\n\t\r\n\t/*Overall Font\r\n\tAll of the options for overall font are classes found in style.css, rather than creating\r\n\tthem dynamically e.g. the cssStyling function. This section takes the chosen option,\r\n\tand adds the class to the div. It uses the appendClass function.*/\r\n\tif($(xml).find('overall_style')){\r\n\t\t\r\n\t\tif($(xml).find('overall_font')){\r\n\t\t\t\r\n\t\t\t//Call the appendClass function to append every class chosen to the scene div\r\n\t\t\tappendClass($(xml).find('overall_font'));\t//call appendClass, pass through overall_font\r\n\t\t\tvar classString = classArray.join(' ');\t\t//join all the classes that are chosen\r\n\t\t\t$(\"#container\").addClass(classString);\t\t//append class to container\r\n\t\t\tclassArray = [];\t\t\t\t\t\t\t//reset array for next class\r\n\t\t\t\r\n\t\t} //end of if overall_font exists\r\n\t} //end of overall_style\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t/*--------------------------------------------------------------------------------------------\r\n\tAudio:\r\n\t\r\n\tIf the user wants audio to be included in their story, they have the option to include it.\r\n\tTwo different formats are needed due to browser compatability. For more information on this,\r\n\tplease check out: http://www.w3schools.com/html/html5_audio.asp#gsc.tab=0 \r\n\tI expect this issue to be resolved as browsers add more support, but as it stands, it's required\r\n\tfor the user to include an .mp3 and either a .wav or an .ogg. \r\n\t----------------------------------------------------------------------------------------------*/\r\n\t\r\n\tvar audioOptionsArray = new Array();\t\t\t\t//array to hold control options for audio element (i.e. autoplay, loop)\r\n\tvar audioArray = new Array();\t\t\t\t\t\t//array to hold the complete audio tag\r\n\t\r\n\t//add audio only if there is an audio element\r\n\tif($(xml).find('overall_style').find('audio').length){\r\n\t\r\n\t\t//check for autoplay and loop, add to array if yes\r\n\t\tif($(xml).find('audio').attr('autoplay') == \"yes\" ){\r\n\t\t\taudioOptionsArray.push(\"autoplay='true'\");\r\n\t\t}\r\n\t\tif($(xml).find('audio').attr('loop') == \"yes\" ){\r\n\t\t\taudioOptionsArray.push(\"loop='true'\");\r\n\t\t}\r\n\t\t\r\n\t\t//if there is autoplay or loop, add to audio div\r\n\t\tif(audioOptionsArray.length > 0) {audioArray.push(\"<audio controls \" + audioOptionsArray.join(' ') + \">\");}\r\n\t\telse {audioArray.push(\"<audio controls>\");}\r\n\t\t\r\n\t\t//check file formats, then add to html\r\n\t\tif( ($(xml).find('mp3_file').size() == 1) && ($(xml).find('wav_file').size() == 1)){\r\n\t\t\taudioArray.push(\"<source src='\" + $(xml).find('mp3_file').attr('href') + \"' type='audio/mpeg'>\");\r\n\t\t\taudioArray.push(\"<source src='\" + $(xml).find('wav_file').attr('href') + \"' type='audio/wav'>\");\r\n\t\t}\r\n\t\tif( ($(xml).find('mp3_file').size() == 1) && ($(xml).find('ogg_file').size() == 1) ){\r\n\t\t\taudioArray.push(\"<source src='\" + $(xml).find('mp3_file').attr('href') + \"' type='audio/mpeg'>\");\r\n\t\t\taudioArray.push(\"<source src='\" + $(xml).find('ogg_file').attr('href') + \"' type='audio/ogg'>\");\r\n\t\t}\r\n\t\t\r\n\t\taudioArray.push(\"Your browser does not support the audio element.\");\t//message if browser doesn't support HTML5 audio\r\n\t\taudioArray.push(\"</audio>\");\t\t\t\t\t\t\t\t\t\t\t//close audio tag\r\n\t\t$(\"#audio\").html(audioArray.join(''));\t\t\t\t\t\t\t\t\t//append audio\r\n\t}\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t/*------------------------------------------------------------------------------\r\n\tThe Story Itself:\r\n\t\r\n\tThis is the bulk of the parsing. This will loop through the whole story to parse \r\n\tand append the content added by the user. \r\n\t----------------------------------------------------------------------------- */\r\n\tvar sceneNumber = 1;\t\t\t\t\t//keep tally of the scene number for the class\r\n\tvar sceneArray = Array();\t\t\t\t//array to hold each scene\r\n\tvar sceneClassArray = Array();\t\t\t//array to hold the classes for divs\r\n\tvar scroll_id = \"\";\t\t\t\t\t\t//string to hold the ID that links the scrolling animation to the element\r\n\tvar textIDNum = 1;\t\t\t\t\t\t//keep tally of the text ID number\r\n\tvar imageIDNum = 1;\t\t\t\t\t\t//keep tally of the image ID number\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t//Loop through each scene.\r\n\t$(xml).find('story').find('scene').each(function(){\r\n\t\t\r\n\t\t/*-------------------------------------------------------------------------------------\r\n\t\tScene\r\n\t\t\r\n\t\tThis section will create the scene div and add any classes/styles to it. There aren't\r\n\t\tmany, but the most notable ones are setting the height and background color. \r\n\t\t-------------------------------------------------------------------------------------*/\r\n\t\t\r\n\t\t/*sceneNumberComplete is the combination of \"scene\" and the scene number, e.g. \"scene2\"\r\n\t\tThis will make it easier to keep track of later when using the scene ID often.*/\r\n\t\tvar sceneNumberComplete = \"scene\" + sceneNumber;\t\t\r\n\t\t\r\n\t\tvar sceneDivString = \"<div id='\" + sceneNumberComplete + \"'\";\t//create scene div, leave it open in case user wants to add classes\r\n\t\tvar sceneStyleArray = [];\t\t\t\t\t\t\t\t\t//this array holds the css of the scene\r\n\t\t\r\n\t\tsceneStyleArray.push(\"#scene\" + sceneNumber + \"{\")\r\n\t\t\r\n\t\t//Call the appendClass function to append every class chosen to the scene div\r\n\t\tappendClass($(this));\r\n\t\t\r\n\t\tif($(this).attr('height')){\r\n\t\t\tvar sceneHeight = $(this).attr('height');\r\n\t\t\tsceneHeight = keepPosOnly(sceneHeight);\r\n\t\t\tsceneStyleArray.push(\"\\theight: \" + sceneHeight + \"px;\");\r\n\t\t}\r\n\t\t\r\n\t\t//If there are any elements that aren't in the window, it will hide it.\r\n\t\tsceneStyleArray.push(\"\\toverflow: hidden;\");\r\n\t\t\r\n\t\t//If there are any classes, append it to div.\r\n\t\tif(classArray.length > 0){\r\n\t\t\tsceneDivString += \" class='\" + classArray.join(' ') + \"'\";\r\n\t\t}\r\n\t\t\r\n\t\tsceneDivString += \">\";\r\n\t\tsceneArray.push(sceneDivString);\r\n\t\tclassArray=[];\t\t\t\t\t\t\t//reset array for next class grouping (e.g. text)\r\n\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//loop through all the texts groups...\r\n\t\t$(this).find('texts').each(function(){\r\n\t\t\t\r\n\t\t\t/*...then loop through all the text elements.\r\n\t\t\tThis creates text divs, adds the desired IDs and classes, then appends it to the HTML*/\r\n\t\t\t$(this).find('text').each(function(){\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tvar textID = \"text\" + textIDNum;\t\t\t//creates textID name, e.g. text4\r\n\t\t\t\t\r\n\t\t\t\t\r\n\r\n\t\t\t\t/*----------------\r\n\t\t\t\t----Functions-----\r\n\t\t\t\t----------------*/\r\n\t\t\t\tappendClass($(this));\t\t\t\t\t\t//Call the appendClass function to append every class\r\n\t\t\t\tcssStyling(textID, $(this));\t\t\t\t//send any styling options to cssStyling function\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t//If there is an attached scrolling animation for the text div, send the data to the scrollScript function to create the controller lines.\r\n\t\t\t\tif($(this).find('text_scrolling_animation')){\r\n\t\t\t\t\tvar scrollElement = $(this).find('text_scrolling_animation');\t//get the whole text_scrolling_animation object\r\n\t\t\t\t\tscrollScript(textID, scrollElement);\t\t\t\t\t\t\t//send ID and scrolling object to scrollScript function\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t//IMPORTANT! \r\n\t\t\t\t//Create div for text, don't close it so we can add classes and ids\r\n\t\t\t\tvar textDiv = \"<div id='\" + textID + \"'\";\r\n\t\t\t\t\r\n\t\t\t\t//If there are any classes, append it to div.\r\n\t\t\t\tif(classArray.length > 0){\r\n\t\t\t\t\ttextDiv += \" class='\" + classArray.join(' ') + \"'\";\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//close textDiv\r\n\t\t\t\ttextDiv += \">\";\r\n\t\t\t\tsceneArray.push(textDiv);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t/*----------WORK HERE-----------\r\n\t\t\t\t//if parallax is found, append their content.\r\n\t\t\t\tif($(this).find('text_scrolling_animation').find('parallax_group')){\r\n\t\t\t\t\t$(this).find('text_scrolling_animation').find('parallax_group').find('parallax_element').each(function() {\r\n\t\t\t\t\t\tconsole.log(\"Element: \" + $(this).find('text_element').attr('text_content'));\r\n\t\t\t\t\t});\r\n\t\t\t\t}*/\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif($(this).find('text_content')){\r\n\t\t\t\t\t\r\n\t\t\t\t\t$(this).find('text_content').each(function(){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t/*------------------------------------------------------------------------------------------\r\n\t\t\t\t\t\tMixed content\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tJavaScript doesn't play too friendly with mixed content. Rather than being able to call \r\n\t\t\t\t\t\tinnerHTML, you need to tak a few extra steps. Essentially it turns it into a workable \r\n\t\t\t\t\t\tstring, from which you can manipulate by replacing the text. \r\n\t\t\t\t\t\t------------------------------------------------------------------------------------------*/\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar xmlString;\r\n\t\t\t\t\t\tvar xmlObject= this;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\twhile(xmlObject.nodeType!=1){xmlObject=xmlObject.nextSibling;}\r\n\t\t\t\t\t\txmlString=(xmlObject.xml)?xmlObject.xml:(new XMLSerializer()).serializeToString(xmlObject);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//Get rid of \"<text_content>\"\r\n\t\t\t\t\t\txmlString = xmlString.replace(\"<text_content>\", \"\");\r\n\t\t\t\t\t\txmlString = xmlString.replace(\"</text_content>\", \"\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//Bold\r\n\t\t\t\t\t\tif (xmlString.indexOf(\"<bold>\") >= 0){\r\n\t\t\t\t\t\t\tvar count = xmlString.match(/<bold>/g); \r\n\t\t\t\t\t\t\tfor(var i=0;i<count.length;i++){\r\n\t\t\t\t\t\t\t\txmlString = xmlString.replace(\"<bold>\", \"<b>\");\r\n\t\t\t\t\t\t\t\txmlString = xmlString.replace(\"</bold>\", \"</b>\");\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//Italic\r\n\t\t\t\t\t\tif (xmlString.indexOf(\"<italic>\") >= 0){\r\n\t\t\t\t\t\t\tvar count = xmlString.match(/<italic>/g); \r\n\t\t\t\t\t\t\tfor(var i=0;i<count.length;i++){\r\n\t\t\t\t\t\t\t\txmlString = xmlString.replace(\"<italic>\", \"<i>\");\r\n\t\t\t\t\t\t\t\txmlString = xmlString.replace(\"</italic>\", \"</i>\");\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//Bold italic\r\n\t\t\t\t\t\tif (xmlString.indexOf(\"<bold_italic>\") >= 0){\r\n\t\t\t\t\t\t\tvar count = xmlString.match(/<bold_italic>/g); \r\n\t\t\t\t\t\t\tfor(var i=0;i<count.length;i++){\r\n\t\t\t\t\t\t\t\txmlString = xmlString.replace(\"<bold_italic>\", \"<b><i>\");\r\n\t\t\t\t\t\t\t\txmlString = xmlString.replace(\"</bold_italic>\", \"</i></b>\");\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//New lines and carriage returns\r\n\t\t\t\t\t\tif (xmlString.indexOf(\"<new_line/>\") >= 0){\r\n\t\t\t\t\t\t\tvar count = xmlString.match(/<new_line\\/>/g); \r\n\t\t\t\t\t\t\tfor(var i=0;i<count.length;i++){\r\n\t\t\t\t\t\t\t\txmlString = xmlString.replace(\"<new_line/>\", \"<br/>\");\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//Font size\r\n\t\t\t\t\t\tif (xmlString.indexOf(\"<font-size\") >= 0){\r\n\t\t\t\t\t\t\tvar count = xmlString.match(/<font-size/g); \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t//For each instance of font size... \r\n\t\t\t\t\t\t\tfor(var i=0;i<count.length;i++){\r\n\t\t\t\t\t\t\t\t//Find the class name and separate it from the string\r\n\t\t\t\t\t\t\t\tvar firstSplit = xmlString.split('font_size=');\r\n\t\t\t\t\t\t\t\tvar secondSplit = firstSplit[1].split('>');\r\n\t\t\t\t\t\t\t\tvar finalSplit = secondSplit[0];\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t//Replace the quotes so we're left with the number, e.g. 44px\r\n\t\t\t\t\t\t\t\tvar finalString = finalSplit.replace(\"\\\"\", \"\");\r\n\t\t\t\t\t\t\t\tfinalString = finalString.replace(\"px\\\"\", \"px\");\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t//Add the \"fs_\" for the CSS class\r\n\t\t\t\t\t\t\t\tfinalString = \"'fs_\" + finalString + \"'\";\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t/*finalSplit has quotes, finalString removes them.*/\r\n\t\t\t\t\t\t\t\txmlString = xmlString.replace(\"<font-size font_size=\" + finalSplit + \">\", \"<span class=\" + finalString + \">\");\r\n\t\t\t\t\t\t\t\txmlString = xmlString.replace(\"</font-size>\", \"</span>\");\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//Font color\r\n\t\t\t\t\t\tif (xmlString.indexOf(\"<font-color\") >= 0){\r\n\t\t\t\t\t\t\tvar count = xmlString.match(/<font-color/g); \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t//For each instance of font color... \r\n\t\t\t\t\t\t\tfor(var i=0;i<count.length;i++){\r\n\t\t\t\t\t\t\t\t//Find the class name and separate it from the string\r\n\t\t\t\t\t\t\t\tvar firstSplit = xmlString.split('font_color=');\r\n\t\t\t\t\t\t\t\tvar secondSplit = firstSplit[1].split('>');\r\n\t\t\t\t\t\t\t\tfinalSplit = secondSplit[0];\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t//Replace the quotes so we're left with the color, e.g. White\r\n\t\t\t\t\t\t\t\tvar finalString = finalSplit.replace(\"\\\"\", \"\");\r\n\t\t\t\t\t\t\t\tfinalString = finalString.replace(\"\\\"\", \"\");\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t/*finalSplit has quotes, finalString removes them.*/\r\n\t\t\t\t\t\t\t\txmlString = xmlString.replace(\"<font-color font_color=\" + finalSplit + \">\", \"<span class=\" + finalSplit + \">\");\r\n\t\t\t\t\t\t\t\txmlString = xmlString.replace(\"</font-color>\", \"</span>\");\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\r\n\t\t\t\t\t\t//Whether or not there is any mixed content, append the text content.\r\n\t\t\t\t\t\tsceneArray.push(\"<p>\" + xmlString + \"</p>\");\r\n\t\t\t\t\t}); //end of each loop\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t\r\n\t\t\t\tsceneArray.push(\"</div>\");\t\t\t\t\t//Close the div for the array\r\n\t\t\t\tclassArray=[];\t\t\t\t\t\t\t\t//Reset class array so it doesn't affect other classes\r\n\t\t\t\ttextIDNum++;\t\t\t\t\t\t\t\t//Increment the text number\r\n\t\t\t});\t\t//end of text loop */\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\t//end of texts loop\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//Image loop\r\n\t\t$(this).find('images').each(function(){\r\n\r\n\t\t\t$(this).find('image').each(function(){\r\n\t\t\t\t\r\n\t\t\t\tvar source = $(this).attr('source');\r\n\t\t\t\tvar alt = $(this).attr('alt');\r\n\t\t\t\tvar imageID = \"image\" + imageIDNum;\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t/*Send the loop and the imageID to the cssStyling function, \r\n\t\t\t\twhich will create the style rules for each image.*/\r\n\t\t\t\tcssStyling(imageID, $(this));\r\n\r\n\t\t\t\t\r\n\t\t\t\t//NEED THIS CODE to ensure the text div has an ID\r\n\t\t\t\t//If there are any scrolling animations, send it to the scrollScript function to properly add the controller statements.\r\n\t\t\t\tif($(this).find('image_scrolling_animation')){\r\n\t\t\t\t\tvar scrollElement = $(this).find('image_scrolling_animation');\r\n\t\t\t\t\tscrollScript(imageID, scrollElement);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t\r\n\t\t\t\t//Create div for images\r\n\t\t\t\tsceneArray.push(\"<div id=\" + imageID + \">\");\r\n\t\t\t\tsceneArray.push(\"<img src='\" + source + \"' alt='\" + alt + \"'>\");\r\n\t\t\t\tsceneArray.push(\"</div>\");\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t//increment imageIDNum for next image ID\r\n\t\t\t\timageIDNum++;\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----- Background images - if they exist ----\r\n\t\t\t------------------------------------------*/\r\n\t\t\tif($(this).find('background_image')){\r\n\t\t\t\t\r\n\t\t\t\t//Keep an empty array to hold all of the background properties\r\n\t\t\t\tvar backgroundArray = Array();\r\n\t\t\t\t\r\n\t\t\t\t//Loop through each background image\r\n\t\t\t\t$(this).find('background_image').each(function(){\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\t//Check for every property\r\n\t\t\t\t\tvar bgImageSource = $(this).attr('source');\r\n\t\t\t\t\tsceneStyleArray.push(\"\\tbackground-image: url('\" + bgImageSource + \"');\");\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Check to see if there is any repeat attribute defined\r\n\t\t\t\t\tif($(this).attr('repeat')){\r\n\t\t\t\t\t\tsceneStyleArray.push(\"\\tbackground-repeat: \" + $(this).attr('repeat') + \";\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tsceneStyleArray.push(\"\\tbackground-repeat: repeat;\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Background position\r\n\t\t\t\t\tif($(this).find('background_position')){\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t//Background presets\r\n\t\t\t\t\t\tif($(this).find('background_position').find('bg_preset').length > 0){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t//We need to replace the original attribute to include spaces, e.g. 'center-bottom' becomes 'center bottom'\r\n\t\t\t\t\t\t\tvar bgPreset = $(this).find('background_position').find('bg_preset').attr('position_presets');\r\n\t\t\t\t\t\t\tbgPreset = bgPreset.replace(/-/g, \" \")\r\n\t\t\t\t\t\t\tsceneStyleArray.push(\"\\tbackground-position: \" + bgPreset+ \";\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//Set background values\r\n\t\t\t\t\t\telse if ($(this).find('background_position').find('bg_set_values').length > 0){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t//check for if it's in percentage or pixels\r\n\t\t\t\t\t\t\tvar percentageOrPixels = $(this).find('background_position').find('bg_set_values').attr('percentage_or_pixels');\r\n\t\t\t\t\t\t\tif(percentageOrPixels == \"pixels\"){\r\n\t\t\t\t\t\t\t\tpercentageOrPixels = \"px\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse if(percentageOrPixels == \"percentage\"){\r\n\t\t\t\t\t\t\t\tpercentageOrPixels = \"%\";\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\r\n\t\t\t\t\t\t\t//Retrieve the horizontal value\r\n\t\t\t\t\t\t\tvar horizontalBgValue = \"\";\r\n\t\t\t\t\t\t\tif($(this).find('background_position').find('bg_set_values').find('horizontal').length > 0){\r\n\t\t\t\t\t\t\t\thorizontalBgValue = $(this).find('background_position').find('bg_set_values').find('horizontal').text();\r\n\t\t\t\t\t\t\t\thorizontalBgValue = keepPosOnly(horizontalBgValue) + percentageOrPixels;\r\n\t\t\t\t\t\t\t\tkeepPosOnly(horizontalBgValue);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\thorizontalBgValue = 0 + percentageOrPixels;\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\r\n\t\t\t\t\t\t\t//Retrieve the vertical value\r\n\t\t\t\t\t\t\tvar verticalBgValue = \"\";\r\n\t\t\t\t\t\t\tif($(this).find('background_position').find('bg_set_values').find('vertical').length > 0){\r\n\t\t\t\t\t\t\t\tverticalBgValue = $(this).find('background_position').find('bg_set_values').find('vertical').text();\r\n\t\t\t\t\t\t\t\tverticalBgValue = keepPosOnly(verticalBgValue) + percentageOrPixels;\r\n\t\t\t\t\t\t\t\tkeepPosOnly(verticalBgValue);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\tverticalBgValue = 0 + percentageOrPixels;\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\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t//Add values to background-position\r\n\t\t\t\t\t\t\tsceneStyleArray.push(\"\\tbackground-position: \" + horizontalBgValue + \" \" + verticalBgValue + \";\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} //end of background position\r\n\t\t\t\t\t\r\n\t\t\t\t}); //loop through background image\r\n\t\t\t} //end of if background image exist\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//Close the CSS, add it to cssScriptArray\t\t\t\t\t\r\n\t\t\tsceneStyleArray.push(\"}\");\r\n\t\t\tvar backgroundString = sceneStyleArray.join('\\n');\r\n\t\t\tcssScriptArray.push(backgroundString);\r\n\t\t\t\r\n\t\t}); //end of images loop\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//end scene div, increment sceneNumber\r\n\t\tsceneArray.push(\"</div>\");\r\n\t\tsceneNumber++;\r\n\t\tsceneNumberComplete++;\r\n\t});\r\n\t//end of story loop\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t//append the complete scene to the story div\r\n\t$('#story').html(sceneArray.join(''));\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t//close scrolling script before adding it\r\n\tscrollScriptArray.push(\"<\\/script>\");\r\n\t$(\"body\").append(scrollScriptArray.join('\\n'));\r\n\t\r\n\t\r\n\r\n\t\r\n\t\r\n\t/*----------------------------------------------------------------------\r\n\tCredits:\r\n\t\r\n\tAt the end of each story, there will be a credits section. This will\r\n\tensure that everyone involved with the story is given due credit. The \r\n\tsections included are the creators, the sources, the date, and any other\r\n\tnotes that are added. \r\n\t--------------------------------------------------------------------- */\r\n\tvar credits = [];\r\n\t\r\n\t/*Creators*/\r\n\tcredits.push(\"<div id='creators-credits'><h2>Creators</h2>\");\r\n\t$(xml).find('about').find('creator').each(function(){\r\n\t\tvar creatorTypeString = \"\";\r\n\t\tif($(this).attr('creator_type') == \"Audio\"){creatorTypeString = \"Audio\";}\r\n\t\tif($(this).attr('creator_type') == \"Author\"){creatorTypeString = \"Written\";}\r\n\t\tif($(this).attr('creator_type') == \"Creator\"){creatorTypeString = \"Created\";}\r\n\t\tif($(this).attr('creator_type') == \"Designer\"){creatorTypeString = \"Designed\";}\r\n\t\tif($(this).attr('creator_type') == \"Other\"){creatorTypeString = \"Other work\";}\r\n\t\t\r\n\t\tvar creatorName = $(this).attr('creator_name');\r\n\t\t\r\n\t\t//if the creator has a website\r\n\t\tif ($(this).attr('creators_website')){\r\n\t\t\tcredits.push(\"<div id='creator'>\" + creatorTypeString + \" by <a href='\" + $(this).attr('creators_website') + \"' title=\\\"\" + creatorName + \"'s website\\\">\" + creatorName + \"</a></div>\");\r\n\t\t}\r\n\t\telse{\r\n\t\t\tcredits.push(\"<div id='creator'>\" + creatorTypeString + \" by \" + creatorName + \"</div>\");\r\n\t\t}\r\n\t});\r\n\tcredits.push(\"</div>\");\r\n\t\r\n\t\r\n\t/*Sources*/\r\n\tif($(xml).find('about').find('source').length > 0) {\r\n\t\tcredits.push(\"<div id='sources-credits'>\");\r\n\t\tcredits.push(\"<h2>Sources</h2>\");\r\n\t\t\r\n\t\t$(xml).find('about').find('source').each(function(){\r\n\t\t\t\r\n\t\t\t//variables for source fields required\r\n\t\t\tvar sourceTitle = $(this).attr('source_title');\r\n\t\t\tvar sourceCreator = $(this).attr('source_creator');\r\n\t\t\tvar sourceType = $(this).attr('source_type');\r\n\t\t\tcredits.push(\"<div class='source'>\");\r\n\t\t\t\r\n\t\t\t//if there's a URL for the source\r\n\t\t\tif ($(this).attr('source_link')) {\r\n\t\t\t\tcredits.push(\"<a href='\" + $(this).attr(\"source_link\") + \"' title=\\\"\" + sourceTitle + \"\\\">\" + sourceType + \": \\\"\" + sourceTitle + \"\\\" by \" + sourceCreator + \"</a>\");\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tcredits.push(sourceType + \": \\\"\" + sourceTitle + \"\\\" by \" + sourceCreator);\r\n\t\t\t}\r\n\t\t\tif ($(this).attr('source_notes')) {\r\n\t\t\t\tcredits.push(\"<div class='note'>\\u27A5 Note: \" + $(this).attr('source_notes') + \"</div>\");\r\n\t\t\t\t/*Types of arrows:\r\n\t\t\t\tRegular arrow: \\u2794\r\n\t\t\t\tArrow curved up: \\u27A5\r\n\t\t\t\tArrow down, right angle: \\u21b3*/\r\n\t\t\t}\r\n\t\t\tcredits.push(\"</div>\");\r\n\t\t});\r\n\t\tcredits.push(\"</div>\");\r\n\t}\r\n\t\r\n\t/*Other*/\r\n\tif($(xml).find('about').find('other').length > 0) {\r\n\t\tcredits.push(\"<div id='other'><h2>Other</h2>\");\r\n\t\t$(xml).find('about').find('other').each(function(){\r\n\t\t\tcredits.push($(xml).find('about').find('other').text());\r\n\t\t});\r\n\t\tcredits.push(\"</div>\");\r\n\t}\r\n\t\r\n\t/*Tools*/\r\n\tcredits.push(\"<h2>Tools</h2>\");\r\n\tcredits.push(\"<p>Digital storytelling created by Mike Maether</p>\");\r\n\tcredits.push(\"<p><a href='http://johnpolacek.github.io/superscrollorama/' title='SUPERSCROLLORAMA website'>SUPERSCROLLORAMA</a> by John Polacek</p>\");\r\n\t\r\n\t/*Date*/\r\n\tvar dateMonth = $(xml).find('about').find('date').attr('month');\r\n\tvar dateDay = $(xml).find('about').find('date').attr('day');\r\n\tvar dateYear = $(xml).find('about').find('date').attr('year');\r\n\tvar totalDate = dateMonth + \" \" + dateDay + \", \" + dateYear;\r\n\tcredits.push(\"<div id='date-credits'>\\u00A9 \" + totalDate + \"</div>\");\r\n\t\r\n\t\t\r\n\t/*Credits - combine everything*/\r\n\t$(\"#credits\").append(credits.join(''));\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t//Close up many arrays and add them to HTML\r\n\tcssScriptArray.push(\"</style>\");\r\n\t$(\"head\").append(cssScriptArray.join('\\n'));\r\n}", "function parseData(xmldoc) {\r\n updateStatus('parsing Custom node');\r\n var root = xmldoc.getElementsByTagName('root').item(0);\r\n base_url = root.getAttribute('anidb');\r\n var t1 = new Date();\r\n parseCustom(root.getElementsByTagName('custom').item(0));\r\n var parseCustomNode = (new Date()) - t1;\r\n replaceGlobals(document.body);\r\n updateStatus('Processing anime...');\r\n t1 = new Date();\r\n parseAnimes(root.getElementsByTagName('animes'));\r\n var parseAnimeNode = (new Date()) - t1;\r\n updateStatus('Processing user information...');\r\n if (seeTimes) { alert('Processing...'+\r\n '\\n\\tanime: '+parseAnimeNode+'ms'+\r\n '\\n\\tcustom: '+parseCustomNode+' ms'+\r\n '\\nTotal: '+(parseAnimeNode+parseCustomNode)+' ms'); }\r\n updateStatus('');\r\n renderPage();\r\n}", "function xml_loaded (e, request) \n{\n\n\txml_request = null;\n\tif (request.responseXML)\n\t{\t\t\n\t\t// Clear the results array\n\t\twhile(results.length > 0)\n\t\t{\n\t\t\tresults.pop();\n\t\t}\n\t\t\n\t\t// Get the top level <rss> element \n\t\tvar rss = findChild(request.responseXML, 'rss');\n\t\tif (!rss) return;\n\t\t\n\t\t// Get single subordinate channel element\n\t\tvar channel = findChild( rss, 'channel');\n\t\tif (!channel) return;\n\t\t\n\t\t// Store the podcast description for use on the widget back\n\t\tpodcast_description = findChild(channel, 'description');\n\t\tif( (podcast_description == null) || (podcast_description.firstChild == null) ) \n\t\t{ \n\t\t\tpodcast_description = \"No podcast description provided\"; \n\t\t}\n\t\telse {\n\t\t\tpodcast_description = podcast_description.firstChild.data;\n\t\t}\n\t\t\t\t\t\t\t\n\t\t// Get all item elements subordinate to the channel element.\n\t\t// For each element, get title, pubDate, subtitle, description, and episode URL. \n\t\tfor( var item = channel.firstChild; item != null; item = item.nextSibling)\n\t\t{\n\t\t\tif( item.nodeName == 'item' ) \n\t\t\t{\n\t\t\t\tvar title = findChild (item, 'title');\n\t\t\t\n\t\t\t\t// we have to have the title to include the item in the list \n\t\t\t\tif( title != null ) \n\t\t\t\t{\n\t\t\t\t\tvar title = findChild(item, 'title');\n\t\t\t\t\tif( (title == null) || (title.firstChild == null) ) \n\t\t\t\t\t{ \n\t\t\t\t\t\ttitle = \"No episode title provided\"; \n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\ttitle = title.firstChild.data;\n\t\t\t\t\t}\n\n\t\t\t\t\tvar date = findChild(item, 'pubDate');\n\t\t\t\t\tvar dateString = null;\n\t\t\t\t\tif( (date == null) || (date.firstChild == null) )\n\t\t\t\t\t{\n\t\t\t\t\t\tdateString = null;\n\t\t\t\t\t\tdate = null;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tdateString = date.firstChild.data;\n\t\t\t\t\t\tdate = new Date(Date.parse(date.firstChild.data));\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tvar description = findChild(item, 'description');\n\t\t\t\t\tif( (description == null) || (description.firstChild == null) ) \n\t\t\t\t\t{ \n\t\t\t\t\t\tdescription = \"No episode description provided\"; \n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tdescription = description.firstChild.data;\n\t\t\t\t\t}\n\n\t\t\t\t\tvar subtitle = findChild(item, 'itunes:subtitle');\n\t\t\t\t\tif( (subtitle == null) || (subtitle.firstChild == null) ) \n\t\t\t\t\t{\n\t\t\t\t\t\tsubtitle = description;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tsubtitle = subtitle.firstChild.data;\n\t\t\t\t\t}\n\n\t\t\t\t\tvar link = findChild (item, 'link');\n\t\t\t\t\tif(link == null) \n\t\t\t\t\t{ \n\t\t\t\t\t\tlink = null; \n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tlink = link.firstChild.data;\n\t\t\t\t\t}\n\n\t\t\t\t\tvar enclosure = findChild(item, 'enclosure')\n\t\t\t\t\tif(enclosure == null) \n\t\t\t\t\t{\n\t\t\t\t\t\t// if there's no enclosure, there's no episode to play; ignore the entry and move on.\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tenclosure = enclosure.getAttribute('url');\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tresults[results.length] = {\n\t\t\t\t\t\ttitle:title,\n\t\t\t\t\t\tdate:date,\n\t\t\t\t\t\tdateString:dateString,\n\t\t\t\t\t\tsubtitle:subtitle,\n\t\t\t\t\t\tdescription:description,\n\t\t\t\t\t\tlink:link,\n\t\t\t\t\t\ttrack:enclosure\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Sort by date\n\t\tresults.sort(compFunc);\n\t\t\n\t\t// Since we have results, pause the loading animation\n\t\tstopLoadingAnimation();\n\t\t\n\t\t// Copy titles into the pop-up menu\n\t\tpopulate_menu(results);\n\t\t\n\t\t// Place the most recent episode's information on the widget\n\t\tupdate_episode(results[0]);\n\t\t\n\t\t// Reset the last updated value track how often the widget refreshes\n\t\tlast_updated = (new Date).getTime();\n\t}\n}", "function prepPage() {\r\n uriObj = parseURI();\r\n if (uriObj['show'] && uriObj['show'] != 'ep' && !uriObj['eid'] && !uriObj['aid']) return;\r\n\tinitTooltips();\r\n loadData('anime/a'+uriObj['aid']+'.xml',parseData);\r\n}", "function PageGetPrices(xml)\n{ \n var pricesOnPage=[];\n \n // fuck hardcore parsing libraries --- FOR NOW\n // we'll do it live!\n while(1)\n {\n // Make sure our dollar signs are in the <title>\n var i=xml.indexOf(\"<title>\");\n if(i==-1) break;\n xml=xml.slice(i+7);\n \n // Find the dollar sign.\n var i=xml.indexOf(\"$\");\n if(i==-1) break;\n xml=xml.slice(i+1);\n \n var j=xml.indexOf(\"</\");\n var listingPrice=parseFloat(xml.substring(0,j));\n if(!isNaN(listingPrice)) pricesOnPage.push(listingPrice);\n xml=xml.slice(j+8);\n }\n \n var itemLastDate=xml.substring(xml.lastIndexOf(\"<dc:date>\")+9,xml.lastIndexOf(\"</dc:date>\"));\n //console.log(pricesOnPage.length);\n \n return {\n pricesOnPage:pricesOnPage,\n itemLastDate:itemLastDate\n };\n}", "function parseDetails(xml) {\n var details, id, summary, folder, open;\n for (var i = 0; i < xml.children.length; i++) {\n details = xml.children[i];\n folder = details.nodeName;\n id = details.getAttribute(\"id\");\n summary = details.getAttribute(\"summary\");\n open = details.getAttribute(\"open\");\n createDetails(id, summary, open);\n parseItems(details.children, folder, id);\n }\n}", "function getXML(file){\n reader.onload = function (file) {\n var xmlDoc = $.parseXML( file.target.result),\n $xml = $( xmlDoc );\n $xml.find( \"result\" ).each(function () {\n $title = $(this).find( \"title\" ).text();\n $url = $(this).find( \"url\" ).text();\n $description = $(this).find( \"description\" ).text();\n appendToScreen($title, $url, $description);\n });\n };\n reader.readAsText(file);\n}", "function xmlLoaded(xmlRequest) \n{\n\tif (xmlRequest.status == 200) {\n\t\t// Parse and interpret results\n\t\t// XML results found in xmlRequest.responseXML\n\t\t// Text results found in xmlRequest.reponseText\n\t\tvar r=xmlRequest.responseText;\n\t\tvar a=r.split('\\n');\n\t\tvar n=a.length;\n\t\tvar i,l,b;\n\t\tfor (i=0;i<n;i++)\n\t\t{\n\t\t\tl=a[i];\n\t\t\tif (l.length>0)\n\t\t\t{\n\t\t\t\tb=l.split(',');\n\t\t\t\tif (b[0]=='might')\n\t\t\t\t\tdocument.getElementById('txtMight').innerText=b[2]+'\\n'+b[3]+' '+b[4];\n\t\t\t\tif (b[0]=='expand')\n\t\t\t\t\tdocument.getElementById('txtExpand').innerText=b[2]+'\\n'+b[3]+' '+b[4];\n\t\t\t\tif (b[0]=='wealth')\n\t\t\t\t\tdocument.getElementById('txtWealth').innerText=b[2]+'\\n'+b[3]+' '+b[4];\n\t\t\t}\n\t\t}\n\t}\n\telse {\n\t\talert(\"Error fetching data: HTTP status \" + xmlRequest.status);\n\t}\n}", "function finishLoadXmlPage() {\n /// Warn if image not loaded ///\n $(pageSvg).find('.page_img').on('error', function () {\n self.warning( 'failed to load image: '+image.attr('xlink:href') );\n } );\n\n /// Load the Page SVG in the canvas ///\n self.loadXmlSvg(pageSvg);\n self.svgPanZoom( -1.5, -1.5, imgSize.W+2, imgSize.H+2 );\n self.positionText();\n\n /// Set currently selected mode ///\n self.mode.current();\n\n /// Scale font size ///\n fontSize = 0.010 * Math.min( imgSize.H, imgSize.W );\n scaleFont(1);\n\n /// Gamma filter ///\n var\n defs = $('#'+pageContainer.id+'_defs'),\n comps = [ 'feFuncR', 'feFuncG', 'feFuncB' ];\n\n var\n transf = $(document.createElementNS( self.util.sns, 'feComponentTransfer' ));\n for ( var n = 0; n<comps.length; n++ )\n $(document.createElementNS(self.util.sns,comps[n]))\n .attr('type','gamma')\n .attr('amplitude','1')\n .attr('exponent',1)\n .appendTo(transf);\n $(document.createElementNS(self.util.sns,'filter'))\n .attr('id',pageContainer.id+'_gamma')\n .append(transf)\n .appendTo(defs);\n\n self.util.clearChangeHistory();\n self.util.pushChangeHistory('page load');\n }", "extractData (text) {\n var doc = new DOMParser().parseFromString(text, 'text/xml');\n var items_array = [];\n var items = doc.getElementsByTagName('item');\n for (var i=0; i < items.length; i++) {\n items_array.push({\n title: items[i].getElementsByTagName('title')[0].lastChild.data,\n description: items[i].getElementsByTagName('description')[0].lastChild.data,\n thumbnail: items[i].getElementsByTagName('enclosure')[0].getAttribute('url'),\n link: items[i].getElementsByTagName('link')[0].textContent,\n date: items[i].getElementsByTagName('pubDate')[0].textContent, \n })\n }\n\t var channel = doc.getElementsByTagName('channel');\n //console.log(channel);\n this.setState({title: channel[0].getElementsByTagName('title')[0].textContent});\n return items_array;\n }", "function parseNodes()\r\n{\r\n\tvar browser = gBrowser.mCurrentBrowser;\t\r\n\tdisplayNodes(browser.contentDocument);\r\n\tcreateWindow();\r\n}", "get outerHTML(){ \n\t\t return this.xml; \n\t\t \n\t }", "get outerHTML(){ \n\t\t return this.xml; \n\t\t \n\t }", "onXMLReady() {\n console.log(\"XML Loading finished.\");\n\n const rootElement = this.reader.xmlDoc.documentElement;\n\n console.groupCollapsed(\"XMLYas Parsing\");\n this.parseXMLFile(rootElement);\n console.groupEnd();\n\n this.scene.onGraphLoaded();\n }", "function getPages() {\n return JSON.parse(xmlhttp.responseText).pages\n} // returns all pages", "function parseXML(XMLDoc) {\n\t\t// Clear the exist dir content\n\t\t/*\n\t\tdir_content = {\n\t\t\tpath: ['dir', 'subDir', 'subSubDir'], // Path to current dir\n\t\t\tinf: {\n\t\t\t\t\tis_writable: 1 // The current dir is writable (1) or not (0)\n\t\t\t\t},\n\t\t\tdirs:[\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'fauna', // Dir name\n\t\t\t\t\t\tempty: 0, // Directory is empty (1) or not (0)\n\t\t\t\t\t\treadable: 1, // Directoy is readable\n\t\t\t\t\t\tdate: 1253824760 // Dir date as unix timestamp\n\t\t\t\t\t},\n\t\t\t\t\t{name: 'flora', empty: 1, readable: 1},\n\t\t\t\t\t{name: 'biiiiiig foldeeeeeeeer nameeeeeeeeeeeeee ', empty: 1, readable: 1}\n\t\t\t\t]\n\t\t\t},\n\t\t\tfiles:[\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'filename', // File name\n\t\t\t\t\t\tfilesize: 100, // File size in bytes\n\t\t\t\t\t\tdate: 1253824760, // File date as unix timestamp\n\t\t\t\t\t\timg_size: '1024x768', // If file is image contains the image size\n\t\t\t\t\t\tthumb: '/thmb/filename.jpg' // If file is image contains the path to image thumbnail\n\t\t\t\t\t}\n\t\t\t]\n\t\t}\n\t\t*/\n\n\t\tvar\n\t\t\trootNodeName,\n\t\t\txmlRoot,\n\t\t\tpath,\n\t\t\tinf,\n\t\t\tdirs,\n\t\t\tfiles,\n\t\t\ti\n\t\t;\n\t\t// Create the template\n\t\tdir_content = {\n\t\t\tpath: [],\n\t\t\tinf: {},\n\t\t\tdirs: [],\n\t\t\tfiles: []\n\t\t};\n\n\t\t// Parse the XML Document\n\n\t\t// catching potential errors with IE and Opera\n\t\tif (!XMLDoc || !XMLDoc.documentElement) {\n\t\t\tthrow 'Invalid XML structure:\\n' + XMLDoc.responseText;\n\t\t}\n\t\t// catching potential errors with Firefox\n\t\trootNodeName = XMLDoc.documentElement.nodeName;\n\t\tif (rootNodeName == 'parsererror') {\n\t\t\tthrow 'Invalid XML structure';\n\t\t}\n\t\t// obtain the XML's document element\n\t\txmlRoot = XMLDoc.documentElement;\n\n\t\t// Get the XML elements\n\t\tpath = xmlRoot.getElementsByTagName('path');\n\t\tinf = xmlRoot.getElementsByTagName('inf');\n\t\tdirs = xmlRoot.getElementsByTagName('dirs');\n\t\tfiles = xmlRoot.getElementsByTagName('files');\n\n\t\t/*------------------------------- Path ---------------------------------------------------*/\n\t\tif (path && path.length > 0) {\n\t\t\tpath = path.item(0).getElementsByTagName('dir');\n\t\t\tfor (i = 0; i < path.length; i++) {\n\t\t\t\tdir_content.path[dir_content.path.length] = path.item(i).getAttribute('name');\n\t\t\t}\n\t\t}\n\n\t\t/*------------------------------- Inf ---------------------------------------------------*/\n\t\tif (inf && inf.length > 0) {\n\t\t\tdir_content.inf = getAttributes(inf.item(0));\n\t\t}\n\n\t\t/*--------------------------------- Dirs -------------------------------------------------*/\n\t\tif (dirs && dirs.length > 0) {\n\t\t\tdirs = dirs.item(0).getElementsByTagName('dir');\n\t\t\tfor (i = 0; i < dirs.length; i++) {\n\t\t\t\tdir_content.dirs[dir_content.dirs.length] = getAttributes(dirs.item(i));\n\t\t\t}\n\t\t}\n\n\t\t/*------------------------- Files --------------------------------------------------------*/\n\t\tif (files && files.length > 0) {\n\t\t\tfiles = files.item(0).getElementsByTagName('file');\n\t\t\tfor (i = 0; i < files.length; i++) {\n\t\t\t\tdir_content.files[dir_content.files.length] = getAttributes(files.item(i));\n\t\t\t}\n\t\t}\n\t}", "async load (filename) {\n const xml = await fs.readFile(filename, { encoding: \"utf8\" })\n this.options.log(2, `loading XML file ${chalk.blue(filename)}: ${xml.length} bytes`)\n const dom = slimdomSAX.sync(xml, { position: false })\n let m\n if ((m = xml.match(/^(<\\?xml.+?\\?>\\r?\\n)/)) !== null)\n dom.PI = m[1]\n return dom\n }", "getNodeValue() {}", "function processFeed(text)\n{\n var parser = new DOMParser();\n var dom = parser.parseFromString(text, 'application/xml');\n results = [];\n imgs = xpath('//item', dom, SNAP);\n if (!imgs) return null;\n for (var i = 0; i < imgs.snapshotLength; i++) {\n thisImg = imgs.snapshotItem(i);\n results[i] = {\n name: getTagValue(thisImg, 'title'),\n thumb_uri: getTagValue(thisImg,'guid')\n };\n }\n return results;\n}", "onXMLReady() {\n this.log(\"XML Loading finished.\");\n var rootElement = this.reader.xmlDoc.documentElement;\n\n // Here should go the calls for different functions to parse the various blocks\n var error = this.parseXMLFile(rootElement);\n\n if (error != null) {\n this.onXMLError(error);\n return;\n }\n\n this.loadedOk = true;\n\n // As the graph loaded ok, signal the scene so that any additional initialization depending on the graph can take place\n this.scene.onGraphLoaded();\n }", "onXMLReady() {\n this.log(\"XML Loading finished.\");\n var rootElement = this.reader.xmlDoc.documentElement;\n\n // Here should go the calls for different functions to parse the various blocks\n var error = this.parseXMLFile(rootElement);\n\n if (error != null) {\n this.onXMLError(error);\n return;\n }\n\n this.loadedOk = true;\n\n // As the graph loaded ok, signal the scene so that any additional initialization depending on the graph can take place\n this.scene.onGraphLoaded();\n }", "onXMLReady() {\n this.log(\"XML Loading finished.\");\n var rootElement = this.reader.xmlDoc.documentElement;\n\n // Here should go the calls for different functions to parse the various blocks\n var error = this.parseXMLFile(rootElement);\n\n if (error != null) {\n this.onXMLError(error);\n return;\n }\n\n this.loadedOk = true;\n\n // As the graph loaded ok, signal the scene so that any additional initialization depending on the graph can take place\n this.scene.onGraphLoaded();\n }", "onXMLReady() {\n this.log(\"XML Loading finished.\");\n var rootElement = this.reader.xmlDoc.documentElement;\n\n // Here should go the calls for different functions to parse the various blocks\n var error = this.parseXMLFile(rootElement);\n\n if (error != null) {\n this.onXMLError(error);\n return;\n }\n\n this.loadedOk = true;\n\n // As the graph loaded ok, signal the scene so that any additional initialization depending on the graph can take place\n this.scene.onGraphLoaded();\n }", "onXMLReady() {\n this.log(\"XML Loading finished.\");\n var rootElement = this.reader.xmlDoc.documentElement;\n\n // Here should go the calls for different functions to parse the various blocks\n var error = this.parseXMLFile(rootElement);\n\n if (error != null) {\n this.onXMLError(error);\n return;\n }\n\n this.loadedOk = true;\n\n // As the graph loaded ok, signal the scene so that any additional initialization depending on the graph can take place\n this.scene.onGraphLoaded();\n }", "onXMLReady() {\n this.log(\"XML Loading finished.\");\n var rootElement = this.reader.xmlDoc.documentElement;\n\n // Here should go the calls for different functions to parse the various blocks\n var error = this.parseXMLFile(rootElement);\n\n if (error != null) {\n this.onXMLError(error);\n return;\n }\n\n this.loadedOk = true;\n\n // As the graph loaded ok, signal the scene so that any additional initialization depending on the graph can take place\n this.scene.onGraphLoaded();\n }", "__normalizeResponseXML() {\n // BUGFIX: IE\n // IE does not recognize +xml extension, resulting in empty responseXML.\n //\n // Check if Content-Type is +xml, verify missing responseXML then parse\n // responseText as XML.\n if (\n qx.core.Environment.get(\"engine.name\") == \"mshtml\" &&\n (this.getResponseHeader(\"Content-Type\") || \"\").match(\n /[^\\/]+\\/[^\\+]+\\+xml/\n ) &&\n this.responseXML &&\n !this.responseXML.documentElement\n ) {\n var dom = new window.ActiveXObject(\"Microsoft.XMLDOM\");\n dom.async = false;\n dom.validateOnParse = false;\n dom.loadXML(this.responseText);\n this.responseXML = dom;\n }\n }", "static toDOM(theXML, errCB = null) {\nvar doc, errMsg, i, len, pErr, pErrs;\ndoc = DOMParse.parseFromString(theXML, \"text/xml\");\npErrs = doc.getElementsByTagName(\"parsererror\");\nif (pErrs.length > 0) {\nerrMsg = \"\";\nfor (i = 0, len = pErrs.length; i < len; i++) {\npErr = pErrs[i];\nerrMsg += Access._justText(pErr);\n}\nif (typeof lggr.trace === \"function\") {\nlggr.trace(`Access.XHR: ${errMsg}`);\n}\nif (errCB) {\nerrCB(\"error\", errMsg);\n}\nreturn null;\n} else {\nreturn doc;\n}\n}", "function wearMLParser(e, element) {\n\n var attributes = \"\";\n\n /**\n * If we cant find a value and we have a root value use this....\n */\n var get_root = e != undefined ? e.getPropertyValue(root).trim() : \"\";\n var get_text_field = e != undefined ? e.getPropertyValue(text_field).trim() : root_text_field;\n var get_overlay_show_number = e != undefined ? e.getPropertyValue(overlay_show_number).trim() : root_overlay_show_number;\n var get_overlay_show_text = e != undefined ? e.getPropertyValue(overlay_show_text).trim() : root_overlay_show_text;\n var get_overlay_persists = e != undefined ? e.getPropertyValue(overlay_persists).trim() : root_overlay_persists;\n var get_overlay_orientation = e != undefined ? e.getPropertyValue(overlay_orientation).trim() : root_overlay_orientation;\n var get_overlay_background_color = e != undefined ? e.getPropertyValue(overlay_background_color).trim() : root_overlay_background_color;\n var get_overlay_text_color = e != undefined ? e.getPropertyValue(overlay_text_color).trim() : root_overlay_text_color;\n var get_overlay_border_color = e != undefined ? e.getPropertyValue(overlay_border_color).trim() : root_overlay_border_color;\n var get_overlay_anchor_hv = e != undefined ? e.getPropertyValue(overlay_anchor_hv).trim() : root_overlay_anchor_hv;\n var get_overlay_show_dot = e != undefined ? e.getPropertyValue(overlay_show_dot).trim() : root_overlay_show_dot;\n var get_overlay_show_icon = e != undefined ? e.getPropertyValue(overlay_show_icon).trim() : root_overlay_show_icon;\n var get_overlay_offset = e != undefined ? e.getPropertyValue(overlay_offset).trim() : root_overlay_offset;\n var get_hf_scroll = e != undefined ? e.getPropertyValue(hf_scroll).trim() : root_hf_scroll;\n var get_barcode = e != undefined ? e.getPropertyValue(barcode).trim() : \"\";\n var get_global = e != undefined ? e.getPropertyValue(global).trim() : \"\";\n var get_hide_help = e != undefined ? e.getPropertyValue(hide_help).trim() : \"\";\n var get_broadcast_results = e != undefined ? e.getPropertyValue(broadcast_results).trim() : \"\";\n\n /**\n Input type\n ***/\n if(get_root != \"\"){\n if(get_root == \"true\"){\n root_text_field = get_text_field;\n root_overlay_show_number = get_overlay_show_number;\n root_overlay_show_text = get_overlay_show_text;\n root_overlay_persists = get_overlay_persists;\n root_overlay_orientation = get_overlay_orientation;\n root_overlay_background_color = get_overlay_background_color;\n root_overlay_text_color = get_overlay_text_color;\n root_overlay_border_color = get_overlay_border_color;\n root_overlay_anchor_hv = get_overlay_anchor_hv;\n root_overlay_show_dot = get_overlay_show_dot;\n root_overlay_show_icon = get_overlay_show_icon;\n root_overlay_offset = get_overlay_offset;\n root_hf_scroll = get_hf_scroll;\n root_hide_help = get_hide_help;\n }\n }\n\n /**\n Input type\n ***/\n if(get_text_field != \"\"){\n attributes += \"text_field=\"+ get_text_field + \" \";\n }\n\n /**\n Show Number\n ***/\n if(get_overlay_show_number != \"\"){\n if(get_overlay_show_number == \"true\"){\n attributes += \"overlay_show_number=\\\"yes\\\" \";\n }\n else{\n attributes += \"overlay_show_number=\\\"no\\\" \";\n }\n }\n\n\n /**\n Show Text\n **/\n if(get_overlay_show_text != \"\"){\n if(get_overlay_show_text == \"true\")\n attributes += \"overlay_show_text=\\\"yes\\\" \";\n else{\n attributes += \"overlay_show_text=\\\"no\\\" \";\n }\n }\n\n\n /**\n Show Overlay\n **/\n if(get_overlay_persists != \"\"){\n if(get_overlay_persists == \"true\")\n attributes += \"overlay_persists=\\\"yes\\\" \";\n else{\n attributes += \"overlay_persists=\\\"no\\\" \";\n }\n }\n\n /**\n Overlay Orientation\n **/\n if(get_overlay_orientation != \"\"){\n attributes += \"overlay_orientation=\"+ get_overlay_orientation + \" \";\n }\n\n /**\n Overlay background color\n **/\n if(get_overlay_background_color != \"\"){\n attributes += \"overlay_background_color=\"+ get_overlay_background_color + \" \";\n }\n\n\n /**\n Overlay text color\n */\n if(get_overlay_text_color != \"\"){\n attributes += \"overlay_text_color=\"+ get_overlay_text_color + \" \";\n }\n\n\n /**\n Overlay border color\n */\n if(get_overlay_border_color != \"\"){\n attributes += \"overlay_border_color=\"+ get_overlay_border_color + \" \";\n }\n\n /**\n Overlay anchor percent\n */\n if(get_overlay_anchor_hv != \"\"){\n attributes += \"overlay_anchor=\"+ get_overlay_anchor_hv + \" \";\n }\n\n /**\n Overlay show dot\n **/\n if(get_overlay_show_dot != \"\"){\n if(get_overlay_show_dot == \"true\")\n attributes += \"overlay_show_dot=\\\"yes\\\" \";\n else{\n attributes += \"overlay_show_dot=\\\"no\\\" \";\n }\n }\n\n /**\n Overlay show icon\n **/\n if(get_overlay_show_icon != \"\"){\n if(get_overlay_show_icon == \"true\")\n attributes += \"overlay_show_icon=\\\"yes\\\" \";\n else{\n attributes += \"overlay_show_icon=\\\"no\\\" \";\n }\n }\n\n /**\n Overlay offset\n **/\n if(get_overlay_offset != \"\"){\n attributes += \"overlay_offset=\"+ get_overlay_offset + \" \";\n }\n\n /**\n HF Scroll\n **/\n if(get_hf_scroll != \"\"){\n attributes += \"scroll=\"+ get_hf_scroll + \" \";\n }\n\n /**\n Barcode Reader\n **/\n if(get_barcode != \"\"){\n attributes += \"barcode=\"+ get_barcode + \" \";\n\n }\n\n /**\n Hide Help\n */\n if(get_hide_help != \"\"){\n attributes += \"barcode=\"+ get_barcode + \" \";\n\n }\n\n /**\n Global Commands\n **/\n if(get_global != \"\"){\n if(get_global == \"true\")\n attributes += \"global_commands=\\\"yes\\\" \";\n else{\n attributes += \"global_commands=\\\"no\\\" \";\n }\n }\n\n /**\n BroadCast Commands\n **/\n if(get_broadcast_results != \"\"){\n if(get_broadcast_results == \"true\")\n attributes += \"broadcast_results=\\\"yes\\\" \";\n else{\n attributes += \"broadcast_results=\\\"no\\\" \";\n }\n }\n return attributes;\n}", "function readMediaInfo(xml) {\n\tvar elt = xml.getElementsByTagName(\"TEI\");\n\tif (!elt || elt.length < 1) {\n\t\ttrjs.data.setRecordingLang('unk');\n/*\n if (trjs.log)\n \t\ttrjs.log.alert(trjs.messgs.noteif);\n else\n \t\tconsole.log(trjs.messgs.noteif);\n*/\n\t\treturn;\n\t}\n\ttrjs.data.setRecordingLang(elt[0].getAttribute('xml:lang'));\n\tvar ver = elt[0].getAttribute('version');\n\tif (ver)\n\t\ttrjs.data.version = ver;\n\telse\n\t\ttrjs.data.version = 'unknown';\n\telt = xml.getElementsByTagName(\"publicationStmt\");\n\tif (elt && elt.length > 0)\n\t\ttrjs.data.publicationStmt = elt[0].innerHTML;\n\telse\n\t\ttrjs.data.publicationStmt = '';\n\telt = xml.getElementsByTagName(\"settingDesc\");\n\tif (elt && elt.length > 0) {\n\t\telt2 = elt[0].getElementsByTagName(\"place\");\n\t\tif (elt2 && elt2.length>0) {\n\t\t\tvar pn = elt2[0].getElementsByTagName('placeName');\n\t\t\tif (pn && pn.length>0)\n\t\t\t\ttrjs.data.setRecordingPlaceName(pn[0].textContent); // elt2.textContent;\n\t\t}\n\t\telt2 = xml.getElementsByTagName(\"setting\");\n\t\tif (elt2 && elt2.length>0) {\n\t\t\ttrjs.data.textDesc = [];\n\t\t\tfor (var i = 0; i < elt2.length; i++) {\n\t\t\t\tvar tdiv = new TextDesc();\n\t\t\t\ttdiv['xml_id'] = elt2[i].getAttribute('xml:id');\n\t\t\t\tvar desc = elt2[i].getElementsByTagName(\"activity\");\n\t\t\t\tif (desc && desc.length>0)\n\t\t\t\t\ttdiv['text'] = desc[0].textContent;\n\t\t\t\telse\n\t\t\t\t\ttdiv['text'] = \"\";\n\t\t\t\ttrjs.data.textDesc.push(tdiv);\n\t\t\t}\n\t\t}\n\t} else\n\t\ttrjs.data.textDesc = null;\n\t/*\n\t * load the headers (with the exception of template already read)\n\t */\n\telt = xml.getElementsByTagName(\"title\");\n\tif (elt != null && elt.length > 0)\n\t\ttrjs.data.setRecordingTitle(trjs.dataload.checkstring(elt[0].textContent));\n\tvar eltStmt = xml.getElementsByTagName(\"recordingStmt\");\n \tif (eltStmt != null && eltStmt.length > 0) {\n elt = eltStmt[0].getElementsByTagName(\"recording\");\n if (elt != null && elt.length > 0) {\n // get information about media\n var elt2 = elt[0].getElementsByTagName(\"date\");\n if (elt2 && elt2.length > 0) {\n trjs.data.setRecordingDate(trjs.dataload.checkstring(elt2[0].textContent));\n trjs.data.setMediaDuration(elt2[0].getAttribute('dur'));\n }\n elt2 = elt[0].getElementsByTagName(\"time\");\n if (elt2 && elt2.length > 0) {\n trjs.data.setRecordingTime(elt2[0].getAttribute('when'));\n }\n\n // there can be an unlimited number of <media> fields\n elt2 = elt[0].getElementsByTagName(\"media\");\n if (elt2 && elt2.length > 0) {\n trjs.data.media = new Array(elt2.length);\n for (var k=0; k<elt2.length; k++) {\n trjs.data.media[k] = new MediaDesc();\n var url = trjs.dataload.checkstring(elt2[0].getAttribute('url'));\n if (!url) {\n trjs.data.media[k].name = trjs.dataload.checkstring(elt2[0].getAttribute('mediaName'));\n trjs.data.media[k].loc = trjs.dataload.checkstring(elt2[0].getAttribute('mediaLocation'));\n } else {\n var fp = trjs.utils.urlToPath(url);\n trjs.data.media[k].name = fp.name;\n trjs.data.media[k].loc = fp.loc;\n }\n trjs.data.media[k].type = elt2[0].getAttribute('mimeType');\n trjs.data.media[k].realFile = trjs.data.media[k].loc + '/' + trjs.data.media[k].name;\n }\n }\n }\n }\n\t/*\n\t * load the encoding information (information about the sofware)\n\t */\n\telt = xml.getElementsByTagName(\"encodingDesc\");\n\tif (elt != null && elt.length != 0) {\n\t\telt2 = elt[0].getElementsByTagName(\"appInfo\");\n\t\tif (elt2 && elt2.length != 0) {\n\t\t\tvar elt3 = elt2[0].getElementsByTagName(\"application\");\n\t\t\tif (elt3 && elt3.length != 0) {\n\t\t\t\ttrjs.data.setAppInfo(elt3[0].getAttribute('ident'));\n\t\t\t}\n\t\t}\n\t}\n\n\t/*\n\t * load the revision information (information about the sofware)\n\t */\n trjs.data.revision = [];\n\telt = xml.getElementsByTagName(\"revisionDesc\");\n\tif (elt != null && elt.length != 0) {\n \telt = elt[0].getElementsByTagName(\"list\");\n \tif (elt != null && elt.length != 0) {\n elt2 = elt[0].getElementsByTagName(\"note\");\n if (elt2 && elt2.length != 0) {\n for (var k=0; k < elt2.length; k++) {\n var a = elt2[k].getAttribute('type');\n if (a === 'url' || a === 'name' || a === 'lastsave') continue;\n var c = elt2[k].textContent;\n trjs.data.revision.push({type: a, value: c});\n }\n }\n }\n\t}\n if (trjs.data.getAppInfo() !== trjs.data.appName) {\n trjs.data.revision.push({ type: 'original', value: trjs.data.getAppInfo()});\n trjs.data.setAppInfo(trjs.data.appName);\n }\n}", "onXMLReady() {\n this.log(\"XML Loading finished.\");\n var rootElement = this.reader.xmlDoc.documentElement;\n\n var error = this.parseXMLFile(rootElement);\n if (error != null) {\n this.onXMLError(error);\n return;\n }\n\n // Signal the scene so that any additional initialization depending on the data can take place\n this.scene.onDataLoaded();\n }", "function parsePageInfo() {\n\n //MDS is not enabled, no need for any special processing\n if (window.location.href.indexOf(\"start.aspx\") == -1) {\n return {};\n }\n\n var path = window.location.pathname;\n var qry = window.location.search;\n var hash = window.location.hash;\n\n var a = document.createElement(\"a\");\n a.href = hash.substring(1);\n\n var apath = a.pathname;\n var aqry = a.search\n var ahash = a.hash;\n\n //Add the path portion of the anchor to the main path\n var dcsuri = path + ((apath) ? (\"#\" + apath) : \"\");\n\n //Add the anchor's query string to the main query string \n var dcsqry = qry.concat(\n (aqry ? (qry ? (\"&\" + aqry.substr(1)) : aqry) : \"\")\n );\n\n return {\n \"DCS.dcssip\": location.hostname,\n \"DCS.dcsuri\": dcsuri,\n \"DCS.dcsqry\": dcsqry,\n \"WT.ti\": document.title,\n \"WT.es\": location.hostname + dcsuri\n };\n}", "function parseXML(xml){\r\n\tconsole.log(\"in parseXML\");\r\n\t\r\n\t$(\"h1\").html(\"Final Project Assignment<br>\" + \"Kody Scharf, Andrew Lee<br>\" + \"991455754, 991457820<br>\");\r\n\r\n\t\r\n}", "function investigatePage() {\r\n var rows = document.evaluate(\"//div[@class='objectinfo']\", document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);\r\n for (var i=0;i<rows.snapshotLength;i++) {\r\n pageIDs[i] = /immo(\\d+)/.exec(rows.snapshotItem(i).id)[1];\r\n lastSeenIDs[pageIDs[i]] = new Date().getTime();\r\n }\r\n rows = document.evaluate(\"//div[@class='titel']/a\", document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);\r\n for (var i=0;i<rows.snapshotLength;i++) {\r\n pageTitles[i] = rows.snapshotItem(i).textContent.toString();\r\n }\r\n rows = document.evaluate(\"//div[@class='adresse']\", document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);\r\n for (var i=0;i<rows.snapshotLength;i++) {\r\n pageLocations[i] = rows.snapshotItem(i).textContent.toString();\r\n }\r\n if (lastSeenIDs) GM_setValue('lastSeenIDs',lastSeenIDs.toSource());\r\n}", "onXMLReady() {\n\t\tthis.log(\"XML Loading finished.\");\n\t\tvar rootElement = this.reader.xmlDoc.documentElement;\n\n\t\t// Here should go the calls for different functions to parse the various blocks\n\t\tvar error = this.parseXMLFile(rootElement);\n\n\t\tif (error != null) {\n\t\t\tthis.onXMLError(error);\n\t\t\treturn;\n\t\t}\n\n\t\tthis.loadedOk = true;\n\n\t\t// As the graph loaded ok, signal the scene so that any additional initialization depending on the graph can take place\n\t\tthis.scene.onGraphLoaded();\n\t}", "onXMLReady()\r\n {\r\n this.log(\"XML Loading finished.\");\r\n var rootElement = this.reader.xmlDoc.documentElement;\r\n \r\n var error = this.parseXMLFile(rootElement); // Here should go the calls for different functions to parse the various blocks\r\n if (error != null) { this.onXMLError(error); return; }\r\n this.loadedOk = true;\r\n \r\n /**\r\n * As the graph loaded ok, signal the scene so that any\r\n * additional initialization depending on the graph can take place */\r\n this.scene.onGraphLoaded();\r\n }", "function readElement(tree){\n\t\t\t if(!tree.content){\n\t\t\t for(var key in tree){\n\t\t\t readElement(tree[key]);\n\t\t\t }\n\t\t\t }else{\n\t\t\t if(tree.content.type){\n\t\t\t if(tree.content.type==\"summary\" ||\n\t\t\t tree.content.type==\"carousel\" ||\n\t\t\t tree.content.type==\"cardCarousel\" ||\n\t\t\t tree.content.type==\"iconView\" ||\n\t\t\t tree.content.type==\"landingPage\")\n\t\t\t summariesToFetch.push(tree.content);\n\t\t\t }\n\t\t\t }\n\t\t\t}", "function parseData(xmldoc) {\r\n\tvar root = xmldoc.getElementsByTagName('root').item(0);\r\n\tif (!root) { errorAlert(\"parseData\",'Could not get root node'); return; }\r\n\t//updateStatus('Processing anime data...');\r\n\tglobalStatus.loadingbar_color = 'green';\r\n\tglobalStatus.updateBarWithText('Parsing Custom node',15,'Total progress: ');\r\n\tt1 = new Date();\r\n\tparseAnimes(root.getElementsByTagName('animes'));\r\n\tvar parseAnimeNode = (new Date()) - t1;\r\n\tvar filedataNodes = root.getElementsByTagName('filedata');\r\n\tfor (var k = 0; k < filedataNodes.length; k++) parseFiledata(filedataNodes[k], aid);\r\n\t//updateStatus('Processing user data...');\r\n\tvar t1 = new Date();\r\n\tparseCustom(root.getElementsByTagName('custom').item(0));\r\n\tvar parseCustomNode = (new Date()) - t1;\r\n\tglobalStatus.updateBarWithText('Processing animes...',45,'Total progress: ');\r\n\t// do some triming of the definition cols if possible\r\n\tif (!uid)\r\n\t\tremoveColAttribute('expand',groupCols);\r\n\t// Okay now that i have the preferences i can rebuild fileCols\r\n\tvar newFileCols = new Array();\r\n\tfor (var i = 0; i < animePage_curLayout.length; i++) {\r\n\t\tvar name = animePage_curLayout[i];\r\n\t\tnewFileCols = addColAttribute(name,fileCols,newFileCols);\r\n\t}\r\n\tfileCols = newFileCols;\r\n\tfileSkips = buildSkipCols(fileCols);\r\n\t//updateStatus('');\r\n\tvar aid = root.getElementsByTagName('anime')[0];\r\n\tif (!aid) { errorAlert('parseData','no anime node'); return; }\r\n\taid = Number(aid.getAttribute('id'));\r\n\tt1 = new Date();\r\n\tglobalStatus.updateBarWithText('Rendering...',65,'Total progress: ');\r\n\tvar t2 = new Date();\r\n\tupdateGroupTable();\r\n\tvar uGT = new Date() - t2;\r\n\tt2 = new Date();\r\n\tupdateEpisodeTable();\r\n\tvar uET = new Date() - t2;\r\n\tt2 = new Date();\r\n\t// fetch group data if needed\r\n\tfor (var g = 0; g < updateGroupTable.length; g++) {\r\n\t\t// i hope this is just one group, but you never know\r\n\t\tvar gid = groupsNeedingExpand[g];\r\n\t\tvar a = document.getElementById('href_gid_'+gid);\r\n\t\texpandedGroups--;\r\n\t\tif (a) {\r\n\t\t\ta.onclick = expandFilesByGroup;\r\n\t\t\ta.onclick();\r\n\t\t\ta.onclick = foldFilesByGroup;\r\n\t\t}\r\n\t}\r\n\tvar gEGD = new Date() - t2;\r\n\tt2 = new Date();\r\n\tupdateAddToMylistBox();\r\n\tvar uAB = new Date() - t2;\r\n\tvar preparingPage = (new Date() - t1);\r\n\tglobalStatus.updateBarWithText('Done.',100,'Total progress: ');\r\n\tglobalStatus.clearAfterTimeout('globalStatus',1000);\r\n\tif (seeTimes) alert('Processing...\\n'+\r\n\t\t\t\t\t\t'\\n\\tanimes: '+parseAnimeNode+'ms'+\r\n\t\t\t\t\t\t'\\n\\tcustom: '+parseCustomNode+' ms'+\r\n\t\t\t\t\t\t'\\n\\tpreping: '+preparingPage+' ms'+\r\n\t\t\t\t\t\t'\\n\\t\\tupdateGroupTable: '+uGT+' ms'+\r\n\t\t\t\t\t\t'\\n\\t\\tupdateEpisodeTable: '+uET+' ms'+\r\n\t\t\t\t\t\t'\\n\\t\\tupdateAddToMylistBox: '+uAB+' ms'+\r\n\t\t\t\t\t\t'\\n\\t\\tgetExtraGroupData: '+gEGD+' ms'+\r\n\t\t\t\t\t\t'\\n\\tTotal: '+(parseAnimeNode+parseCustomNode+preparingPage)+' ms');\r\n}", "function gLyphsParseStreamProcssingXML(spstreamXML) {\n if(!spstreamXML) { return undefined; }\n\n var parser = new DOMParser();\n var spstreamDOM = parser.parseFromString(spstreamXML, \"text/xml\");\n if(!spstreamDOM) { return undefined; }\n if(!spstreamDOM.documentElement) { return undefined; }\n if(spstreamDOM.documentElement.tagName != \"zenbu_script\") { return undefined; }\n\n return spstreamDOM;\n}", "function gLyphsParseStreamProcssingXML(spstreamXML) {\n if(!spstreamXML) { return undefined; }\n\n var parser = new DOMParser();\n var spstreamDOM = parser.parseFromString(spstreamXML, \"text/xml\");\n if(!spstreamDOM) { return undefined; }\n if(!spstreamDOM.documentElement) { return undefined; }\n if(spstreamDOM.documentElement.tagName != \"zenbu_script\") { return undefined; }\n\n return spstreamDOM;\n}", "function loadXML(url) {\n\t//Creating a Native empty Dom Element\n\tvar xml = $.ajax({\n\t\turl: url,\n\t\tdataType: \"xml\",\n\t\tasync: false,\n\t\terror: function() {\n\t\t\tlogJS('XML retrieval error')\n\t\t}\n\t}).responseXML;\n\t//logJS(pnxRecord);\n\treturn xml;\n}", "function loadXML(){\n XMLrequest(link);\n console.log('loadXML -- OK');\n}", "function scrapeXmlDoc(dir, xml) {\n \n var grade\n var surname\n \n if (xml) {\n var nodes = XmlService.parse(dir.getDataAsString()).getDescendants()\n \n var grade = nodes[0].getValue().match(/grade in box below\\: *(([0-3]{1}\\.?[0-9]{0,2})|(<?[AB]{1}[\\+\\-]?))/)\n \n if (!grade) { \n grade = nodes[0].getValue().match(/Grade\\: *([0-3]{1}\\.?[0-9]{0,2})/)\n }\n \n if (grade == 'A') {\n var grade = 3\n } else if (grade == 'A-') {\n var grade = 2\n } else if (grade == 'B+') {\n var grade = 1\n } else if (grade == '<B+') {\n var grade = 0 \n }\n \n var surname = nodes[0].getValue().match(/Name\\: *[A-Z]?[a-z]*( [A-Z]{1}\\.?)? ([A-Z]?[a-z]*)\\t*/).pop()\n\n return Array(grade, surname)\n \n } else {\n \n var grade = dir.match(/(Feedback \\(optional\\)\\:\\t*([0-3]{1}\\.?[0-9]{0,2}))|(grade in box below\\: *([0-3]{1}\\.?[0-9]{0,2}))/)\n if (!grade) { \n grade = dir.match(/Grade\\: *([0-3]{1}\\.?[0-9]{0,2})/)\n }\n // test\n Logger.log('grade match: '+grade) \n var surname = dir.match(/Name\\: *[A-Z]?[a-z]*( [A-Z]{1}\\.?)? ([A-Z]?[a-z]*)\\t*/)\n if (!!surname) { surname = surname.pop() } else { surname = 'noname' }\n\n // test\n // Logger.log('surname: '+surname)\n return Array(grade, surname)\n }\n}", "function ms_epg_entry(prg) {\n // attributes start=\"20170623025000\" stop=\"20170623025300\" channel=\"562954320954462\"\n let result = {}\n if (prg.nodeType == 1) { // element\n // fetch attributes\n el_getattributes(prg, result);\n result['title'] = el_gettext(prg, 'title', true);\n result['event'] = el_gettext(prg, 'event', true);\n result['description'] = el_gettext(prg, 'description');\n\n } else {\n result['errorcode'] = 'wrong nodeType in ms_epg_entry - xmlparser.js';\n }\n return result;\n}", "function parsificaXml( xml ) {\n \n\t// variabili di funzione\n\tvar\n\n\t\t// Otteniamo la lista degli item dall'RSS 2.0 di edit\n\t\titems = xml.getElementsByTagName(\"item\"),\n\n\t\t// Predisponiamo una struttura dati in cui memorrizzare le informazioni di interesse\n\t\titemNodes = new Array(),\n\n\t\t// la variabile di ritorno, in questo esempio, e' testuale\n\t\trisultato = \"\";\n\n\t// ciclo di lettura degli elementi\n\tfor ( var a = 0, b = items.length; a < b; a++ ) {\n\t\t// [length al posto di push serve per evitare errori con vecchi browser]\n\t\titemNodes[a] = new Object();\n\t\titemNodes[a].title = leggiContenuto(items[a],\"title\");\n\t\titemNodes[a].description = leggiContenuto(items[a],\"description\");\n\t\titemNodes[a].link = leggiContenuto(items[a],\"link\");\n\t}// for ( items )\n\n\t// non resta che popolare la variabile di ritorno\n\t// con una lista non ordinata di informazioni\n\n\t// apertura e chiusura della lista sono esterne al ciclo for \n\t// in modo che eseguano anche in assenza di items\n\trisultato = \"<ul>\";\n\n\tfor( var c = 0; c < itemNodes.length; c++ ) {\n\t\trisultato += '<li class=\"item\"><strong>' + itemNodes[c].title +'</strong><br/>';\n\t\trisultato += itemNodes[c].description +\"<br/>\";\n\t\trisultato += '<a href=\"' + itemNodes[c].link + '\">approfondisci</a><br/></li>';\n\t};\n\n\t// chiudiamo la lista creata\n\trisultato += \"</ul>\";\n\n // restituzione dell'html da aggiungere alla pagina\n return risultato;\n\n}", "function CallbackFunction(ajax)\n{\n var objDoc = ajax.GetXmlDoc();\n //alert(objDoc.childNodes[0].nodeName );\n alert(ajax.GetResponse());\n //alert(ajax.GetCustomParam());\n \n //alert( objDom.selectSingleNode( \"//xmlRoot/a\" ).text );\n \n //alert(xmlHttp.responseText);\n //alert(xmlHttp.responseXML.xml);\n //alert(xmlHttp.status);\n //alert(xmlHttp.statusText);\n \n \n}", "function getXSL(xmlUrl) {\n\tvar xhr = $.ajax({\n\t\turl: xmlUrl,\n\t\tdatatype: \"xml\",\n\t\tcontentType: \"application/xml\",\n\t\tasync: false,\n\t\tsuccess: function(response) {\n }\n\t});\n\n\tvar parser = new DOMParser();\n\tvar doc = parser.parseFromString(xhr.responseText, \"application/xml\");\n\treturn doc;\n}", "function parseXML(url) {\n var parser = new xml2js.Parser();\n var deferred = Q.defer();\n\n request(url, function (error, response, body) {\n if (error) {\n deferred.reject(new Error(error));\n } else if (response.statusCode == 200) {\n parser.parseString(body, function (error, result) {\n if (error) {\n deferred.reject(new Error(error));\n } else {\n deferred.resolve(result);\n }\n });\n } else {\n deferred.reject(new Error(\"Invalid response code\"));\n }\n });\n return deferred.promise;\n}", "function load_news(page,xml){\n \n // Load xml file value in a global variable\n if(xml_news==\"\"){\n xml_news = xml;\n }\n\n // Default values for xml and page variables: \n xml = typeof xml !== \"undefined\" ? xml : xml_news;\n page = typeof page !== \"undefined\" ? page : 1;\n\n \n var news = $(xml),\n start = 0+page-1,\n end = news_per_pages + page-1,\n html = \"\"; \n \n var all_news = $('new',xml),\n count = all_news.length;\n\n news = all_news.slice(start,end);\n\n // Build news blocks.\n news.each(function(){\n html = html+\"<div class='row'><div class='twelve columns'>\";\n html = html + \"<h3>\"+$(\"title\",this).text()+\"</h3>\";\n html = html + unescape($(\"body\",this).text()) +\"\";\n html = html + '</div></div>';\n }); \n\n // Build pagination menu\n if(count > news_per_pages){\n html = html + news_paginations(all_news,page); \n }\n\n $('#center').html(html);\n}", "function parseResponse(xml) {\n var xmlDoc = xml.responseXML;\n if (!xmlDoc) {\n console.log('There was an error loading that file.');\n return;\n }\n\n var atoms = Array.from(xmlDoc.getElementsByTagName('atom'));\n\n atoms.forEach(function(atom) {\n drawAtom(atom);\n });\n}", "function parseEventPage($) {\n $(\"div[class='col50 m-cola']\").each(function(element, index, callback) {\n let el = $(this); \n let allPosts = el[0].children;\n \n for (var i = 0, len = allPosts.length; i < len; i++) {\n let post = allPosts[i];\n try {\n if(i % 2 == 1) {\n parseEventPost(post);\n }\n } catch (error) {\n logger.error('Couldnt parse post: ' + i);\n }\n }\n });\n showEventInfo(posts);\n }", "parseDataFromXML(responseXML){\n\t\tlet titlePath = \"//html/body/div/a/div[@class='T']/text()\";\n\t\tlet title2Path = \"//html/body/div/div[@class='S']/text()\";\n\t\tlet tunerTitlePath = \"//html/body/div/div[@class='T']/text()\";\n\t\tlet statusElementsPath = \"//html/body/div/table/tbody/tr[not(@class)]\";\n\t\t\t\n\t\tlet xPathTitleResult = document.evaluate(titlePath, responseXML);\n\t\tlet title = xPathTitleResult.iterateNext();\n\t\tlet tunerStatus = new Status()\n\t\tlet keys = Object.keys(tunerStatus);\n\t\tif(title){\n\t\t\tlet tunerStatusText = document.evaluate(tunerTitlePath, responseXML).iterateNext();\n\t\t\tlet tunerNumber = Number.parseInt(tunerStatusText.nodeValue.split(\" \")[1]);\n\t\t\tlet statusElements = document.evaluate(statusElementsPath, responseXML);\n\t\t\tlet statusElement = statusElements.iterateNext();\n\t\t\twhile(statusElement){\n\t\t\t\tlet elementTitle = statusElement.childNodes[0].innerText.replace(' ', '');\n\t\t\t\tlet elementValue = statusElement.childNodes[1].innerText;\n\t\t\t\tswitch(elementTitle){\n\t\t\t\t\tcase \"Frequency\":\n\t\t\t\t\t\ttunerStatus[elementTitle] = Number.parseFloat(elementValue);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"VirtualChannel\":\n\t\t\t\t\tcase \"ModulationLock\":\n\t\t\t\t\tcase \"ResourceLock\":\n\t\t\t\t\t\ttunerStatus[elementTitle] = elementValue;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\ttunerStatus[elementTitle] = Number.parseInt(elementValue);\n\t\t\t\t}\n\t\t\t\tstatusElement = statusElements.iterateNext();\n\t\t\t}\n\t\t\tif(true/*validate capture*/){\n\t\t\t\ttunerStatus.Time = new Date();\n\t\t\t\tthis.tuner[tunerNumber].addStatus(tunerStatus);\n\t\t\t}\n\t\t}\n\t}", "function load(url) { \r\n\tvar xmlHTTP;\r\n\tif (window.XMLHttpRequest) {\r\n\t\txmlHTTP = new XMLHttpRequest();\r\n\t}\r\n\telse {\r\n\t\txmlHTTP = new ActiveXObject(\"Microsoft.XMLHTTP\");\r\n\t}\r\n\txmlHTTP.open(\"GET\", url, false);\r\n\txmlHTTP.send(null);\r\n\tparser = new DOMParser();\r\n\txmlDoc = parser.parseFromString(xmlHTTP.responseText, \"application/xml\");\r\n}", "function parseXML(){\n\tdescribe(\"Parse XML\", function(){\n\t\tit(\"Game XML should parse without errors\", function(done){\n\n\t\t\tparser.parseString(xmlString, function(err, result){\n\n\t\t\t\tif (err) throw err;\n\n\t\t\t\txmlData = result.math;\n\n\t\t\t\tdone();\n\t\t\t});\n\t\t});\n\t});\n}", "function parseXML(){\n\tdescribe(\"Parse XML\", function(){\n\t\tit(\"Game XML should parse without errors\", function(done){\n\n\t\t\tparser.parseString(xmlString, function(err, result){\n\n\t\t\t\tif (err) throw err;\n\n\t\t\t\txmlData = result.math;\n\n\t\t\t\tdone();\n\t\t\t});\n\t\t});\n\t});\n}", "function getMyPosts() {\n var element = document.getElementById(\"display-container\");\n xmlRequest(\"GET\", \"myposts.php\", element);\n}", "function Xparse(src) {\r\n var frag = new _frag();\r\n // remove bad \\r characters and the prolog\r\n frag.str = _prolog(src);\r\n // create a root element to contain the document\r\n var root = new _element();\r\n root.name=\"ROOT\";\r\n // main recursive function to process the xml\r\n frag = _compile(frag);\r\n // all done, lets return the root element + index + document\r\n root.contents = frag.ary;\r\n root.index = _Xparse_index;\r\n _Xparse_index = new Array();\r\n return root;\r\n}", "async function analysePage() {\n [rootContext, allContexts] = DOMTraversal.getContextsFromPage();\n}", "function getXML(url){\n\tvar xml=Asiainfo.remoteData(url,false);\n\tif (xml != null && xml.length > 0) {\n var doc = mxUtils.parseXml(xml);\n var dec = new mxCodec(doc);\n dec.decode(doc.documentElement, graph.getModel());\n }\n}", "function buildPageElements() {\n \n var pageHeader = document.getElementsByTagName(\"header\")\n if(pageHeader.length > 1) { console.log(\"Page out of spec: Too many <header> elements.\") }\n else { buildGlobalNavigation('header') }\n\n var pageTitle = document.getElementsByClassName('page-title')\n if(pageTitle.length !== 1) { console.log(\"Page out of spec: A page must have exactlly 1 Page-Title elements.\") }\n else { buildPageTitle('page-title') }\n\n var contactInfo = document.getElementsByClassName('contact-info')\n if(contactInfo.length < 1) { console.log('Page out of spec: There are no Company-Info (<address class=\"contact-info\">) elements on this page.') }\n else { buildContactInfo('contact-info') }\n\n}", "function showXMLinfo (plik, aleCo) {\n var xhttp,\n xmlDoc,\n txt,\n x,\n i;\n xhttp = new XMLHttpRequest();\n xhttp.onreadystatechange = function() {\n if (this.readyState == 4 && this.status == 200) {\n xmlDoc = this.responseXML;\n txt = \"\";\n x = xmlDoc.getElementsByTagName(aleCo);\n for (i = 0; i < x.length; i++) {\n txt = txt + x[i].childNodes[0].nodeValue + \"<br>\";\n }//for\n document.getElementById(\"ajax-i-xml-store\").innerHTML = txt;\n }//if\n };//function\n xhttp.open(\"GET\", plik, true);\n xhttp.send();\n}//showXMLinfo", "function $xmlParser(txt) {\r\n\t\txmlObj = false;\r\n\t\tif (ActiveXObject(\"Microsoft.XMLDOM\")) {\r\n\t\t\txmlObj = new ActiveXObject(\"Microsoft.XMLDOM\");\r\n\t\t\txmlObj.async = false;\r\n\t\t\txmlObj.loadXML(txt);\r\n\t\t}\r\n\t\tif (DOMParser) {\r\n\t\t\txmlParser = new DOMParser();\r\n\t\t\txmlObj = xmlParser.parserFromString(txt,\"text/xml\");\r\n\t\t}\r\n\t\treturn xmlObj;\r\n\t}", "function xmlDocReady(xml) {\n xmlDoc = xml.responseXML;\n initQuiz();\n}", "function ReadXML( r:XmlReader )\n\t{\n\t\tif( r != null )\n\t\t{\n\t\t\tnumQuants = parseInt( r.GetAttribute(\"numQuants\") );\n\t\t\tchords = parseFloat( r.GetAttribute(\"chords\") );\n\t\t\tdexterity = parseFloat( r.GetAttribute(\"dexterity\") );\n\t\t\tsustain = parseFloat( r.GetAttribute(\"sustain\") );\n\t\t\trhythm = parseFloat( r.GetAttribute(\"rhythm\") );\n\t\t\tnoteValuePdf = Utils.ParseFloatArray( r.GetAttribute(\"noteValuePdf\"), ','[0] );\n\t\t\tnoteValuePdfSampler.Reset( noteValuePdf );\n\t\t\tmaxScore = parseInt( r.GetAttribute('maxScore') );\n\t\t}\n\t\telse\n\t\t\tDebug.LogError('given node was null..');\n\t}", "function extractXmlInfo(doc_object){\r\n\tvar titleinfo;\r\n\tvar descriptinfo;\r\n\tvar dateinfo;\r\n\tvar authorinfo;\r\n\tvar linkinfo;\r\n\t\r\n\t\r\n\tdoc_childs = doc_object.childNodes;\r\n\t\r\n\t// Vaatleme \"doc\" tagi kõiki alamaid ja väärtustame muutujad\r\n\tfor (i=0;i<doc_childs.length;i++){\r\n\t\tif (doc_childs[i].nodeName == \"str\"){\r\n\t\t\tif (doc_childs[i].getAttribute(\"name\")== \"title\"){\r\n\t\t\t\ttitleinfo = doc_childs[i].childNodes[0].nodeValue;\r\n\t\t\t}\r\n\t\t\telse if (doc_childs[i].getAttribute(\"name\")== \"description\"){\r\n\t\t\t\tdescriptinfo = doc_childs[i].childNodes[0].nodeValue;\r\n\t\t\t}\r\n\t\t\telse if (doc_childs[i].getAttribute(\"name\")== \"author\"){\r\n\t\t\t\tauthorinfo = doc_childs[i].childNodes[0].nodeValue;\r\n\t\t\t}\r\n\t\t\telse if (doc_childs[i].getAttribute(\"name\")== \"link\"){\r\n\t\t\t\tlinkinfo = doc_childs[i].childNodes[0].nodeValue;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\telse if (doc_childs[i].nodeName == \"date\"){\r\n\t\t\tif(doc_childs[i].getAttribute(\"name\")== \"date\"){\r\n\t\t\t\tdateinfo = doc_childs[i].childNodes[0].nodeValue;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t// Tagastame uudise : pealkirja, kirjelduse, aja, autori, lingi uudise lehele\r\n\treturn [titleinfo,descriptinfo,dateinfo,authorinfo,linkinfo];\r\n}", "init() {\n super.init();\n // set the default engine page\n this.xmlConfig = this.gps.xmlConfig;\n let id = this._defaultPanelID;\n let engineDisplayPages = this.xmlConfig.getElementsByTagName(\"EngineDisplayPage\");\n if (engineDisplayPages.length == 0) {\n engineDisplayPages = this.xmlConfig.getElementsByTagName(\"EngineDisplay\");\n this.engineDisplayPages[id] = {\n title: \"Default\",\n node: this.xmlConfig.getElementsByTagName(\"EngineDisplay\"),\n buttons: []\n };\n this.selectedEnginePage = id;\n } else {\n for (let i = 0; i < engineDisplayPages.length; i++) {\n let engineDisplayPageRoot = engineDisplayPages[i];\n let id = engineDisplayPageRoot.getElementsByTagName(\"ID\")[0].textContent;\n let engineDisplayPage = {\n title: engineDisplayPageRoot.getElementsByTagName(\"Title\")[0].textContent,\n node: engineDisplayPageRoot.getElementsByTagName(\"Node\")[0].textContent,\n buttons: []\n };\n let buttonNodes = engineDisplayPageRoot.getElementsByTagName(\"Button\");\n for (let buttonNode of buttonNodes) {\n engineDisplayPage.buttons.push({\n text: buttonNode.getElementsByTagName(\"Text\")[0].textContent\n });\n }\n this.engineDisplayPages[id] = engineDisplayPage;\n if (i == 0) {\n this.selectEnginePage(id);\n }\n };\n }\n }", "parse () {\n const place = [];\n const texts = [];\n const ids = {};\n\n const htmlParser = new htmlparser2.Parser({\n onopentag(tagname, attributes) {\n let id = uuid();\n\n ids[id] = {\n id: id,\n tag: tagname.toLowerCase(),\n attributes: attributes,\n text: null,\n descendants: []\n };\n\n // add it to all ancestors\n place.forEach(anscestorId => {\n ids[anscestorId].descendants.push(id);\n });\n\n place.push(id);\n },\n ontext(text) {\n texts.push(text.trim());\n },\n onclosetag() {\n let id = place.pop();\n\n if (id && (typeof ids[id] !== 'undefined')) {\n ids[id].text = texts.pop();\n }\n }\n });\n\n htmlParser.write(this.html);\n\n this.items = Object.values(ids);\n }", "parseUrl () {\r\n this.currentIndex = this.getParameter(\"index\");\r\n this.currentFolder = this.findSubnavFolderByIndex(this.currentIndex);\r\n\r\n const page = this.getParameter(\"page\");\r\n\r\n if (this.currentFolder) {\r\n const target = document.querySelector(`#${page}`);\r\n\r\n this.toggleActivePages(target);\r\n this.toggleActiveSubnav(this.currentIndex);\r\n } else {\r\n const target = document.querySelector(\"#flight-ops-home\");\r\n\r\n this.toggleActivePages(target);\r\n this.toggleActiveSubnav(0);\r\n }\r\n }", "function zXmlDom() {\n\n}", "function parseXMLDoc(xmlString) {\n var xmlDoc;\n try //Internet Explorer\n {\n xmlDoc = new ActiveXObject(\"Microsoft.XMLDOM\");\n xmlDoc.async = \"false\";\n xmlDoc.loadXML(xmlString);\n }\n catch (e) {\n try //Firefox, Mozilla, Opera, etc.\n {\n parser = new DOMParser();\n xmlDoc = parser.parseFromString(xmlString, \"text/xml\");\n }\n catch (e) {}\n }\n return xmlDoc;\n }", "function getPage() {\n\t return document.getElementById(\"dynamic\").getAttribute(\"page\");\n\t}", "function parseXML(xml) \n{\n var parserConfig = {\n tagNameProcessors: [stripNS],\n ignoreAttrs: true,\n explicitArray: false,\n emptyTag: null\n };\n\n return new Promise((resolve, reject) => {\n parseString(xml, parserConfig, function (err, json) {\n if (err)\n {\n reject(err);\n }\n else\n {\n resolve(json);\n }\n });\n });\n}", "function hc_nodeelementnodevalue() {\n var success;\n var doc;\n var elementNode;\n var elementValue;\n doc = load(\"hc_staff\");\n elementNode = doc.documentElement;\n\n elementValue = elementNode.nodeValue;\n\n assertNull(\"elementNodeValue\",elementValue);\n \n}", "function parser_page(navInfo, $timeinterval){\n\n\trequest(navInfo['page']['currentPage'], function (error, response, html) {\n\t if (!error && response.statusCode == 200) {\n\t\t// parsing the html page with cheerio\n\t\tlet $ = cheerio.load(html);\n\t\t\n\t\tlet articles = $(navInfo['page']['path_liste_articles']);\n\t\t//let nextPage = $(navInfo['page']['path_url_next_page']);\n\t\t\n\t\tarticles.each(function(index, element){\n\t\t\tlet navInfoArticle = copyArray(navInfo);\n\t\t\tnavInfoArticle['page']['currentPage'] = 'https:' + $(element).attr('href');\n\t\t\tsetTimeout(function(){parser_article(navInfoArticle)}, $timeinterval*index);\n\t\t});\n/*\n\t\tif(typeof nextPage != 'undefined' && nextPage.attr('href') != 'undefined'){\n\t\t\tconsole.log('[DEBUG] Next page find: ' + 'https:' + nextPage.attr('href'));\n\t\t\tlet navInfoNextPage = copyArray(navInfo);\n\t\t\tnavInfoNextPage['page']['currentPage'] = 'https:' + nextPage.attr('href');\n\t\t\tparser_page(navInfoNextPage, $timeinterval);\n\t\t}\n*/\n\t }\n\t});\n}", "onPageReady () {}", "function parseConfig(xml) { \r\n\t\t\txml.children().each(function(i) {\r\n\t\t\t\tsetConfigOption($(this),self.options);\r\n\t\t\t});\r\n\t\t\t// now that the configuration is set up jPlayer instance can be created\r\n\t\t\tinitializePlayer();\r\n\t\t}", "function examinePage() {\n\n var pd = {};\n\n {\n // search for text that might indicate an article requires sourcing...\n var indicators = [\"scientists have\", \"scientists say\", \"paper published\", \"research suggests\", \"latest research\", \"researchers\", \"the study\"]\n /* other possibilities:\n \"according to a new study\"\n \"the study\"\n \"findings\"\n */\n\n /* TODO: could check for obvious containers, to exclude menus, sidebars and other cruft */\n var hits = searchHTML(document.body, indicators);\n if(hits.length>0) {\n // looks like sourcing is needed...\n pd.indicatorsFound = true;\n } else {\n pd.indicatorsFound = false;\n }\n }\n\n\n // is an og:type metatag present?\n {\n pd.ogType = null;\n var meta_ogtype = document.querySelector('meta[property=\"og:type\"]');\n if( meta_ogtype != null ) {\n if(meta_ogtype.content !== undefined) {\n pd.ogType = meta_ogtype.content;\n }\n }\n }\n\n // how about a schema.org type?\n {\n var container = document.querySelector('[itemscope][itemtype]')\n if( container != null ) {\n pd.schemaType = container.getAttribute('itemtype');\n } else {\n pd.schemaType = null;\n }\n }\n\n // hNews?\n {\n hnews = document.querySelector('.hnews')\n if( hnews != null ) {\n pd.hnews = true;\n } else {\n pd.hnews = false;\n }\n }\n\n\n var schemaorg_art_types = [\n \"http://schema.org/Article\",\n \"http://schema.org/NewsArticle\",\n \"http://schema.org/BlogPosting\",\n \"http://schema.org/ScholarlyArticle\",\n \"http://schema.org/MedicalScholarlyArticle\" ];\n\n /* now make a call - are we confident it is or isn't an article? */\n pd.isDefinitelyArticle = false;\n pd.isDefinitelyNotArticle = false;\n\n if(pd.schemaType !== null ) {\n if(schemaorg_art_types.indexOf(pd.schemaType) > -1 ) {\n pd.isDefinitelyArticle = true;\n } else {\n pd.isDefinitelyNotArticle = true;\n }\n }\n\n if( pd.ogType !== null ) {\n if( pd.ogType=='article' || pd.ogType=='tumblr-feed:entry') {\n pd.isDefinitelyArticle = true;\n }\n\n if( pd.ogType=='website') {\n pd.isDefinitelyNotArticle = true;\n }\n }\n\n if( pd.hnews==true ) {\n pd.isDefinitelyArticle = true;\n }\n\n // could have conflicting info...\n if( pd.isDefinitelyArticle && pd.isDefinitelyNotArticle ) {\n // ignore all!\n pd.isDefinitelyArticle = false;\n pd.isDefinitelyNotArticle = false;\n }\n\n return pd;\n}", "function parseXML(text) {\n var xmlDoc;\n\n if (typeof DOMParser != \"undefined\") {\n var parser = new DOMParser();\n xmlDoc = parser.parseFromString(text, \"text/xml\");\n } else {\n xmlDoc = new ActiveXObject(\"Microsoft.XMLDOM\");\n xmlDoc.async = \"false\";\n xmlDoc.loadXML(text);\n }\n\n return xmlDoc;\n}", "function parseXML(text) {\n var xmlDoc;\n\n if (typeof DOMParser != \"undefined\") {\n var parser = new DOMParser();\n xmlDoc = parser.parseFromString(text, \"text/xml\");\n } else {\n xmlDoc = new ActiveXObject(\"Microsoft.XMLDOM\");\n xmlDoc.async = \"false\";\n xmlDoc.loadXML(text);\n }\n\n return xmlDoc;\n}", "onparserinit(){\n this.document = new XNode('document', { format: this.options.format })\n this._tagStack = [this.document]\n }", "function loadXMLDocument( url )\n{\n var xmlHttpRequest = new XMLHttpRequest();\n xmlHttpRequest.open( \"get\", url, false );\n xmlHttpRequest.send( null );\n doc = xmlHttpRequest.responseXML;\n} // end function loadXMLDocument", "async getPageData() {\n\t\treturn this.#browser.execute(function() {\n\t\t\tconst assets = Array.from(document.querySelectorAll('*[src], link[rel=\"shortcut icon\"], link[rel=stylesheet], *[href][download]')).map(el => el.src || el.href);\n\t\t\tconst links = Array.from(document.querySelectorAll('a[href]:not(a[download]), area[href]:not(area[download])')).map(el => el.href).filter(link => {\n\t\t\t\tconst m = new URL(link).pathname.match(/\\.[a-z0-9]+$|^\\/biblio\\/export\\/|^\\/blog\\/([0-9]+\\/)?feed$|^\\/taxonomy\\/term\\/[0-9]+\\/feed$/);\n\t\t\t\tif(m) {\n\t\t\t\t\tassets.push(link);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn !link.match(/\\/event\\/(day|week|month)\\/.*$/);\n\t\t\t});\n\n\t\t\treturn {\n\t\t\t\thtml: (document.doctype ? new XMLSerializer().serializeToString(document.doctype) : '') + document.documentElement.outerHTML,\n\t\t\t\tassets,\n\t\t\t\tlinks\n\t\t\t}\n\t\t});\n\t}", "function init_page(findings){\n \"use strict\";\n var urltarget, sorttype;\n urltarget = document.location.search;\n\n /*Apply event on window resize to help correct package viewer size.\n Because the size of the frames in package explorer is calculated as percentage of the parent div\n element, but the .dummydiv section has a static size, when resizing the browser window, the frame's size\n need to be recalculated. This causes a lot of CPU usage, but fortunately no user should be constantly \n resizing their window...*/\n $(window).resize(function() {\n //If we have switched to package frame\n if ($('.package_explorer').is(\":visible\")){\n resizePackageFrames();\n }\n });\n\n //Produces a short summary of the xml file in the bottom left corner.\n produce_summary(findings);\n\n //Code for opening a specific node.\n if (urltarget !== \"\"){\n sorttype = urltarget.replace(/\\?/g,'').split('/')[0];\n //Check if sort type is valid\n if (['by-type','by-class','by-cat','by-sev'].indexOf(sorttype) !== -1){\n display_all(findings, sorttype, true);\n //If we want to open a specific node, we need to be able to load the specific tree\n } else {\n display_all(findings, 'by-type', false);\n }\n } else {\n display_all(findings, 'by-type');\n }\n}", "function getXMLObject(){\n\tif (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari\n\t\txmlhttp=new XMLHttpRequest();\n\t}else{// code for IE6, IE5\n\t\txmlhttp=new ActiveXObject(\"Microsoft.XMLHTTP\");\n\t}\n\txmlhttp.open(\"GET\",\"d.xml\",false);\n\txmlhttp.send();\n\txmlDoc=xmlhttp.responseXML;\n\t\n\tpitanja = xmlDoc.getElementsByTagName(\"pitanje\"); //array koji drzi sva pitanja\n}", "function xmlParser(xml) {\n let vps = [];\n let normies = [];\n $(xml)\n .find(\"directory\")\n .find(\"employees\")\n .find(\"employee\")\n .each(function (i, element) {\n let department = element.children.department.innerHTML;\n let title = element.children.jobTitle.innerHTML;\n let name = element.children.displayName.innerHTML;\n if (\n name.includes(\"Nicole\") ||\n name.includes(\"Cory\") ||\n name.includes(\"Euricelia\") ||\n name.includes(\"Michael\") ||\n name.includes(\"Mark\") ||\n name.includes(\"Langager\") ||\n name.includes(\"Brent\") ||\n name.includes(\"Marcin\") ||\n name.includes(\"O'Brien\") ||\n name.includes(\"Lucas\")\n ) { \n vps.push(element);\n } else if (\n department.includes(\"Technology - Alta\") ||\n department.includes(\"Data Science\") ||\n department.includes(\"Finance\") ||\n department.includes(\"Culture\") ||\n department.includes(\"Development\") || \n department.includes(\"Product - Alta\") || \n department.includes(\"Project - Alta\") || \n department.includes(\"Marketing\") || \n department.includes(\"Research\") || \n department.includes(\"Management\") || \n name.includes(\"Koehn\") \n ) {\n if (\n !(\n name.includes(\"Juliano\") || name.includes(\"Brenda\")\n )\n ) {\n normies.push(element);\n }\n }\n });\n var ordering = {}\n let customSortOrder = ['Nicole', 'Cory', 'Euricelia', 'Michael', 'Mark', 'Chad', 'Brent', 'Marcin', 'Christopher', 'Lucas'];\n for (var i=0; i<customSortOrder.length; i++)\n {\n ordering[customSortOrder[i]] = i;\n }\n vps.sort( function(a, b) {\n return (ordering[a.children.firstName.innerHTML] - ordering[b.children.firstName.innerHTML]);\n }); \n appendVPList(vps);\n appendTeamList(normies);\n}", "function parseStatisticPage(pageText){\n\nvar pop = gval(\"ctl00_ContentPlaceHolder1_CAdvisor1_lblPopulation\",pageText);\nvar land = gval(\"ctl00_ContentPlaceHolder1_CAdvisor1_lblLand\",pageText);\nvar turns = gval(\"ctl00_lblTurns\",pageText);\nif (!pop || !land || !turns) {\n\tpop = -1;\n\tland = -1;\n\tturns = -1;\n}\nreturn { pop:pop,land:land,turns:turns};\n}", "documentParser(content) {\n let $, body;\n try {\n $ = cheerio.load(content, { xmlMode: true })\n body = $('mj-body')\n } catch (e) {\n throw new ParseError('Error while parsing the file')\n }\n\n if (!body) {\n throw new EmptyMJMLError('No mj-body found in the file')\n }\n\n return internals.mjmlElementParser(body.get(0))\n }", "function parseXML(xmlText){\n var xmlDoc;\n try{\n xmlDoc=new ActiveXObject(\"Microsoft.XMLDOM\");\n xmlDoc.async=\"false\";\n xmlDoc.loadXML(xmlText);\n }\n\n catch(e){\n try{\n parser=new DOMParser();\n xmlDoc=parser.parseFromString(xmlText,\"text/xml\");\n }\n catch(e){\n alert(e.message);\n return;\n }\n }\n return xmlDoc;\n}", "function getXML(id){\n var httpURL = \"http://video.google.com/timedtext?lang=en&v=\" + id;\n var getCC = new XMLHttpRequest();\n\n getCC.onreadystatechange = function(){\n if(this.readyState == 4 && this.status == 200){\n $(\"#handler\").text(getCC.responseText);\n }\n }\n getCC.open(\"GET\", httpURL, false);\n getCC.send();\n\n var rawXmlTxt = $(\"#handler\").text();\n\n $(\"#handler\").text(\"\");\n\n parser = new DOMParser();\n\n xmlDoc = parser.parseFromString(rawXmlTxt, \"text/xml\");\n\n return xmlDoc;\n}", "function cargarRSS() {\n var xhr = new XMLHttpRequest();\n xhr.onreadystatechange = function () {\n if (this.readyState == 4) {\n cargarXML(this);\n }\n };\n xhr.open(\"GET\", \"colombia.xml\", true);\n xhr.send();\n }", "function parseFileXML( xmlNode ) {\n\n\t\tgbjson = XML2jsobj( xmlNode );\n\t\t//console.log( 'gbjson', gbjson );\n\n\t\tparseGbJson( gbjson );\n\n\t\treturn gbjson;\n\n\t}", "async processXmlFile(xmlFile) {\n const response = await fetch(xmlFile);\n const xmlData = await response.text();\n\n const parser = new DOMParser();\n const doc = parser.parseFromString(xmlData, \"text/xml\");\n\n this.processDoc(xmlFile, doc);\n }", "function ParseXMLString(str)\n{\n if (window.ActiveXObject)\n {\n xmlDoc = new ActiveXObject(\"Microsoft.XMLDOM\"); \n xmlDoc.async = false;\n xmlDoc.loadXML(str);\n }\n else if (document.implementation && document.implementation.createDocument) \n {\n var parser = new DOMParser(); \n xmlDoc = parser.parseFromString(str, \"text/xml\"); \n }\n else \n return null;\n \n return xmlDoc; \n}", "jsx_parseElement() {\n var startPos = this.start, startLoc = this.startLoc;\n this.next();\n return this.jsx_parseElementAt(startPos, startLoc);\n }", "function pageholder(){\treturn document.getElementsByTagName('html')[0];\t}", "function gotBlog(xmlDoc)\n{\n var evtForm = document.evtForm;\n var root = xmlDoc.documentElement;\n var messageElt = document.getElementById('PostBlog');\n var msg = \"\";\n\n if (root && root.nodeName == 'blog')\n {\n for(var i = 0; i < root.childNodes.length; i++)\n {\t\t// loop through children\n var node = root.childNodes[i];\n if (node.nodeName == 'msg')\n msg += node.textContent;\n }\t\t// loop through children\n }\n else\n {\t\t// error\n if (root)\n {\n for(var i = 0; i < root.childNodes.length; i++)\n {\t\t// loop through children\n var node = root.childNodes[i];\n if (node.nodeValue != null)\n msg += node.nodeValue;\n }\t\t// loop through children\n }\n else\n msg += root;\n }\t\t// error\n\n if (msg.length > 0)\n popupAlert(msg, messageElt);\n \n location = location;\n}", "function getTopRatedGames() {\n let xmlContent = \"\";\n fetch(\"https://gamezone.ninja/Resources/games.xml\").then((response) => {\n response.text().then((xml) => {\n xmlContent = xml;\n let parser = new DOMParser();\n let xmlDOM = parser.parseFromString(xmlContent, \"application/xml\");\n let games = xmlDOM.querySelectorAll(\"game\");\n var xmlContent2 = \"\";\n\n xmlContent2 = assembleContent(\"top\", xmlContent2, games);\n document.getElementById(\"games-game-list\").innerHTML = xmlContent2;\n });\n });\n}", "function handleResponse(xml) {\n\t\tconsole.log(\"in hr\");\n\t\t\n\t\t\t$(\"#movie2\").append(\"<p class='imgformat'>\" +\n\t\t\t\t\t\t\t\t\t\t\t \"<img src='_images/\" +\n\t\t\t\t\t\t\t\t\t\t\t $(xml).find(\"moviePoster:nth(1)\").text() +\n\t\t\t\t\t\t\t\t\t\t\t \"' width='100'>\" + \n\t\t\t\t\t\t\t\t\t\t\t\"</p>\"\n\t\t\t\t\t\t\t\t\t\t\t);\t\t\n\t\t\t\n\t\t\t$(\"h2\").css(\"text-align\", \"center\").css(\"font-weight\", \"bold\");\n\t\t\t\n\t\t\t$(\"h2\").append(\"MovieName: \" + $(xml).find(\"movie:nth(1)\").attr(\"movieName\") +\t// +1\n\t\t\t\t\t\t\t\t\t\t\t\t\"<br><br>\"); \n\t\t\t$(xml).find(\"movie:nth(1)\").each(function() {\n\t\t\t\t$(\"h2\").append(\"Movie Director: <span style='text-decoration:underline;'>\" +\n\t\t\t\t\t\t\t\t\t\t\t\t\t$(xml).find(\"movieDirector:nth(1)\").text() + \n\t\t\t\t\t\t\t\t\t\t\t\t\t\"</span><br><br>\");\n\t\t\t\t$(\"h2\").append(\"Movie Type:\" + $(xml).find(\"movieType:nth(1)\").text() + \n\t\t\t\t\t\t\t\t\t\t\t\t\t\"<br><br>\");\t\n\t\t\t\t\n\t\t\t});\t\t\t\t\t\t\n\t}", "function parse_score_from_page(resp) {\n var parser = new DOMParser();\n var doc = parser.parseFromString(resp, \"text/html\");\n score = doc.getElementsByClassName(score_class_name);\n alert(score[0].innerText);\n}", "function parseXML(xml) {\n\t\tif ( window.DOMParser == undefined && window.ActiveXObject ) {\n\t\t\tDOMParser = function() { };\n\t\t\tDOMParser.prototype.parseFromString = function( xmlString ) {\n\t\t\t\tvar doc = new ActiveXObject('Microsoft.XMLDOM');\n\t\t\t\tdoc.async = 'false';\n\t\t\t\tdoc.loadXML( xmlString );\n\t\t\t\treturn doc;\n\t\t\t};\n\t\t}\n\n\t\ttry {\n\t\t\tvar xmlDoc = ( new DOMParser() ).parseFromString( xml, 'text/xml' );\n\t\t\tif ( $.isXMLDoc( xmlDoc ) ) {\n\t\t\t\tvar err = $('parsererror', xmlDoc);\n\t\t\t\tif ( err.length == 1 ) {\n\t\t\t\t\tthrow new Error('Error: ' + $(xmlDoc).text() );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new Error('Unable to parse XML');\n\t\t\t}\n\t\t\treturn xmlDoc;\n\t\t} catch( e ) {\n\t\t\tvar msg = ( e.name == undefined ? e : e.name + ': ' + e.message );\n\t\t\t$(document).trigger('xmlParseError', [ msg ]);\n\t\t\treturn undefined;\n\t\t}\n\t}", "function parseXML(xml) {\n\t\tif ( window.DOMParser == undefined && window.ActiveXObject ) {\n\t\t\tDOMParser = function() { };\n\t\t\tDOMParser.prototype.parseFromString = function( xmlString ) {\n\t\t\t\tvar doc = new ActiveXObject('Microsoft.XMLDOM');\n\t\t\t\tdoc.async = 'false';\n\t\t\t\tdoc.loadXML( xmlString );\n\t\t\t\treturn doc;\n\t\t\t};\n\t\t}\n\n\t\ttry {\n\t\t\tvar xmlDoc = ( new DOMParser() ).parseFromString( xml, 'text/xml' );\n\t\t\tif ( $.isXMLDoc( xmlDoc ) ) {\n\t\t\t\tvar err = $('parsererror', xmlDoc);\n\t\t\t\tif ( err.length == 1 ) {\n\t\t\t\t\tthrow new Error('Error: ' + $(xmlDoc).text() );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new Error('Unable to parse XML');\n\t\t\t}\n\t\t\treturn xmlDoc;\n\t\t} catch( e ) {\n\t\t\tvar msg = ( e.name == undefined ? e : e.name + ': ' + e.message );\n\t\t\t$(document).trigger('xmlParseError', [ msg ]);\n\t\t\treturn undefined;\n\t\t}\n\t}" ]
[ "0.62727344", "0.6039646", "0.58391625", "0.5662551", "0.56107163", "0.56022674", "0.5525346", "0.5497171", "0.5448213", "0.54243463", "0.53641415", "0.5303763", "0.5303763", "0.52939785", "0.5283942", "0.52834886", "0.52475715", "0.5243695", "0.52159095", "0.5197498", "0.5197498", "0.5197498", "0.5197498", "0.5197498", "0.5197498", "0.51771295", "0.5174926", "0.516452", "0.516075", "0.5151672", "0.513407", "0.5104461", "0.5095735", "0.5090914", "0.50865006", "0.50840724", "0.5059885", "0.5059833", "0.5059833", "0.505603", "0.5045264", "0.504309", "0.5042441", "0.50179136", "0.5015131", "0.49916482", "0.4990204", "0.4989673", "0.4987503", "0.49808922", "0.49799505", "0.49749112", "0.49429366", "0.49429366", "0.493961", "0.49365005", "0.4936039", "0.4931456", "0.49234706", "0.49222055", "0.491623", "0.49122182", "0.49078912", "0.49051303", "0.4883484", "0.4883175", "0.48824573", "0.4878711", "0.48784858", "0.48725677", "0.48564944", "0.4845635", "0.48441854", "0.4842778", "0.48392576", "0.48369104", "0.48345447", "0.48345447", "0.4830773", "0.48293698", "0.4825968", "0.48190844", "0.4810151", "0.48067504", "0.480157", "0.47975153", "0.47955412", "0.47930998", "0.47863021", "0.47809005", "0.47718358", "0.4767718", "0.476535", "0.4763341", "0.47606784", "0.47572097", "0.47557488", "0.47532177", "0.47454122", "0.47454122" ]
0.5849096
2
============================================== =============================================== Once loadinf is complete calculate results. ===============================================
function onLoadComplete() { ////////////////////////////// //Pass values to data provider ////////////////////////////// //Values from prev screen. dataProvider.setSelected_language(lang); dataProvider.setImpactDist(parseInt(dist)); dataProvider.setProjDiam(parseInt(diam)); dataProvider.setProjAngle(parseInt(traj)); dataProvider.setProjVel(parseInt(velo)); dataProvider.setCbPjDens(parseInt(pjd)); dataProvider.setCbTgDens(parseInt(tgd)); dataProvider.setSlTgDepth(parseInt(wlvl)); //////////////// //DO THE CALCS //////////////// if (planet == 'Earth'){ calcs = new CraterCalcs(); //Do calculation calcs.getData(dataProvider);//From CraterCalcs.js } else if (planet == 'Moon'){ calcs = new MoonCraterCalcs(); calcs.getData(dataProvider);//From CraterCalcs.js } else if (planet == 'Mars'){ calcs = new MarsCraterCalcs(); //Do calculation calcs.getData(dataProvider);//From CraterCalcs.js } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calcResults() {\n\t\trbAge.innerText = parseInt(currentAge)+parseInt(yearsToRetirement);\n\t\trbIncome.innerText = rawNestAmount*targetRetirementIncomePercentage;\n\t\trbInterest.innerText = (rawNestAmount-(rawNestAmount*targetRetirementIncomePercentage))*targetInterestRateToNest;\n\t\trbBalance.innerText = (rawNestAmount-(rawNestAmount*targetRetirementIncomePercentage))+(rawNestAmount-(rawNestAmount*targetRetirementIncomePercentage))*targetInterestRateToNest;\n\t}", "function calculateResults() {\n return;\n}", "function computeValues(){\n //Removes loading\n open();\n checkReady()\n\n}", "function loadResults(){\n //console.log(\"loadQuantity\");\n var $results = $('.' + _results);\n for(var i = 0; i < $results.length; i++){\n var $result = $($results[i]);\n var datas = $result.data();\n if (!datas[_resController]\n || !datas[_resTempHeader]\n || !datas[_resTempHeaderId]\n || !datas[_resTempItem]\n || !datas[_resTempItemId]\n || !datas[_resTempPagination]\n || !datas[_resTempPaginationId]) {\n throw Error(\"Resuts \" + _results + \" do not define datas correctly\");\n }\n\n var ctxt = {\n \"_resTempHeaderId\": _resTempHeaderId,\n \"_resTempItemId\": _resTempItemId,\n \"_resTempPaginationId\": _resTempPaginationId\n };\n var jCookie = getJCookie(_cookieName);\n var jResources = jCookie[_jResources];\n if (jResources) {\n var ids = Object.keys(jResources).join(\"|\");\n ctxt[\"ids\"] = ids;\n $.get(datas[_resController], ctxt)\n .done(function(data){\n $('#' + ctxt[_resTempHeaderId]).empty().append(data);\n $('#' + ctxt[_resTempItemId]).append(data);\n $('#' + ctxt[_resTempPaginationId]).empty().append(data);\n })\n .fail(function(err){\n console.error(\"loading resources\", ctxt, err);\n })\n }\n }\n }", "function loadMiniStats(results) {\r\n if(results == null){\r\n document.querySelector(\"#documents\").innerHTML = \"0\";\r\n document.querySelector(\"#sentences\").innerHTML = \"0\";\r\n document.querySelector(\"#words\").innerHTML = \"0\";\r\n }\r\n else if(results[0].sum != 0) {\r\n document.querySelector(\"#documents\").innerHTML = numberWithCommas(results[0].sum);\r\n document.querySelector(\"#sentences\").innerHTML = numberWithCommas(results[0].lauseid);\r\n document.querySelector(\"#words\").innerHTML = numberWithCommas(results[0].sonu);\r\n\r\n }else{\r\n document.querySelector(\"#documents\").innerHTML = \"0\";\r\n document.querySelector(\"#sentences\").innerHTML = \"0\";\r\n document.querySelector(\"#words\").innerHTML = \"0\";\r\n }\r\n}", "function calculate() {\n\tgetTempBonuses();\n\tgetNumberBoonsValues();\n\tgetRelicBonuses();\n\tgetFatebondBonuses();\n\tgetCoreTraitsValues();\n\tgetAttributesValues();\n\tgetSkillsValues();\n\tgetVirtuesValues();\n\tgetBoonsDiceValues();\n\tgetPresetRolls();\n\tgetAttackBonuses();\n}", "function getMoreData() {\n //so long as we are getting listings, continue...\n if (response.features.length > 0) {\n let percent = (lastFID / 15000) * 100;\n\n percent = Math.floor(percent);\n if (percent > 100) {\n percent = 100;\n }\n document.getElementById('loaderText').textContent = \"Loading \" + percent + \"%\";\n\n updateResult(businesses.length);\n getData();\n }\n //else stop.\n}", "function calculate(){}", "function loadData (results) {\n\t\t\tself.isWaiting = false;\n\t\t\tself.error = null;\n\t\t\tfirstSearch = false;\n\n\t\t\t// If this was the first page, it includes record count and total pages .\n\t\t\tif (results.complete) {\n\t\t\t\tself.totalRecordCount = results.recordCount;\n\t\t\t\tself.dataResolvingParams.total(self.totalRecordCount);\n\t\t\t}\n\t\t\tif (results.data.length === 0) {\n\t\t\t\tself.data = null;\n\t\t\t\tself.dataResolvingParams.data = [];\n\t\t\t\tbuildErrorWithMessage(\"No records found.\");\n\t\t\t} else {\n\t\t\t\tself.error = null;\n\t\t\t\tself.data = results.data;\n\t\t\t\tself.defer.resolve(results.data);\n\t\t\t}\n\t\t}", "function getProcessResults() {\n StatusService.stopWaiting();\n getFlowRows();\n if ( $scope.paramGrid.dissipation) {\n $scope.compositionFlow = CompositionFlowService.get($scope.process.compositionFlowID);\n $scope.paramGrid.dissipation.extractData();\n }\n getLciaResults();\n }", "function loadData() {\n consolidatedresults.loaded = false;\n dataService.getConsolidatedResults()\n .then(function(response) {\n //handle the success condition here\n var data = response.data;\n consolidatedresults.realdata = data[0];\n consolidatedresults.col_names = data[1];\n consolidatedresults.loaded = true;\n // console.log(consolidatedresults.realdata);\n // console.log(consolidatedresults.col_names);\n });\n }", "function process() {\n\t// Get current page's data\n\toverallResult = overallResult.concat(getPrices());\n\n\tvar morePages = nextPage();\n\n\tif(morePages) {\n\t\t// Wait then call this method again\n\t\twaitCallback();\n\t} else {\n\t\t// Print results and exit\n\t\tconsole.log(overallResult.join(\"\"));\n\t\treturn;\n\t}\n}", "function onLoad2(){\n calculateFinal();\n}", "function getAllResult(){\r\n\t\r\n\tif (processDone) {\r\n for(var key in Obj_Fetch)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\tvar temp_var={};\r\n\t\t\t\t\t\ttemp_var.cancertype=key;\r\n\t\t\t\t\t\ttemp_var.male=Obj_Fetch[key].MALE;\r\n\t\t\t\t\t\ttemp_var.female=Obj_Fetch[key].FEMALE;\r\n\t\t\t\t\t\tfetch_data_array.push(temp_var);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\taddAllScatterPlot(fetch_data_array);\r\n\t\t\t\t\t\t\r\n } else {\r\n setTimeout(getResult, 250);\r\n }\r\n }", "function load() {\n var apiurl_c = ENTRYPOINT + 'diseases/?type=c&top=5';\n var apiurl_d = ENTRYPOINT + 'diseases/?type=d&top=5';\n var apiurl_u = ENTRYPOINT + 'users/?type=status';\n\n personalAlert(\"CARGANDO \", \" -- Generando resultados...Cargando gráficas\", \"info\", 2000, true);\n\n rankingDead_db(apiurl_d);\n rankingContagion_db(apiurl_c);\n allUsers(apiurl_u);\n}", "function calculate_results() {\n let e_val = 20 + r[0] - r[5] + r[10] - r[15] + r[20] - r[25] + r[30] - r[35] + r[40] - r[45];\n let a_val = 14 - r[1] + r[6] - r[11] + r[16] - r[21] + r[26] - r[31] + r[36] + r[41] + r[46];\n let c_val = 14 + r[2] - r[7] + r[12] - r[17] + r[22] - r[27] + r[32] - r[37] + r[42] + r[47];\n let n_val = 38 - r[3] + r[8] - r[13] + r[18] - r[23] - r[28] - r[33] - r[38] - r[43] - r[48];\n let o_val = 8 + r[4] - r[9] + r[14] - r[19] + r[24] - r[29] + r[34] + r[39] + r[44] + r[49];\n\n o_val = Math.round((o_val/40)*100);\n c_val = Math.round((c_val/40)*100);\n e_val = Math.round((e_val/40)*100);\n a_val = Math.round((a_val/40)*100);\n n_val = Math.round((n_val/40)*100);\n\n console.log(e_val + \" \" + a_val + \" \" + c_val + \" \" + n_val + \" \" + o_val);\n\n save_results(e_val, a_val, c_val, n_val, o_val);\n}", "function calculateLoad(porterC, porterSc, foodSc, toolSc, ironSc, weaponSc, cost, max_cost, form, outId){\r\n out = new ObjectById(outId);\r\n\r\n food = (form.food.value == \"\")? 0: form.food.value;\r\n tools = (form.tools.value == \"\")? 0: form.tools.value;\r\n iron = (form.iron.value == \"\")? 0: form.iron.value;\r\n weapon = (form.weapon.value == \"\")? 0: form.weapon.value;\r\n \r\n if(Math.ceil(food)!=food) food+='a';\r\n if(Math.ceil(tools)!=tools) tools+='a';\r\n if(Math.ceil(iron)!=iron) iron+='a';\r\n if(Math.ceil(weapon)!=weapon) weapon+='a';\r\n \r\n var loadScoresNeeded = food*foodSc + tools*toolSc + iron*ironSc + weapon*weaponSc;\r\n var porterNeeded = Math.ceil(loadScoresNeeded/porterSc);\r\n if(porterNeeded > porterC){\r\n out.reference.innerHTML = '<span style=\"color: red\">' + porterNeeded + '</span><br>';\r\n }else{\r\n out.reference.innerHTML = '' + porterNeeded + '<br>';\r\n }\r\n if(cost*porterNeeded > max_cost){\r\n out.reference.innerHTML += '<span style=\"color: red\">'+ (cost*porterNeeded) +'</span>';\r\n }else{\r\n out.reference.innerHTML += ''+ (cost*porterNeeded);\r\n }\r\n}", "function refreshResults() {\n\tif (_dataSource) {\n\t\t_pager.page(0);\n\t\t_dataSource.fetch(function(){\n\t\t // if callback is needed, place it here\n\t\t});\n\t}\t\n}", "function loadOccAvailData__06(data) {\n\n let parsed_data = JSON.parse(data);\n \n //Factors for RevPar vs Rev Graph\n let occ = [];\n let mon = [];\n let avail = [];\n\n let occ_pid_1 = []; let occ_pid_2 = []; let occ_pid_all = [];\n let mon_pid_1 = []; let mon_pid_2 = []; let mon_pid_all = [];\n let avail_pid_1 = []; let avail_pid_2 = []; let avail_pid_all = [];\n\n if(parsed_data.length === 0){\n document.write('no data');\n }else{\n \n //Data Splitter\n dataSplittor_Occ__06(parsed_data, occ_pid_1, avail_pid_1, occ_pid_2, avail_pid_2, occ_pid_all, avail_pid_all, mon_pid_all);\n //Data Loader\n dataLoader_Occ__06(occ, avail, mon, occ_pid_1, avail_pid_1, occ_pid_2, avail_pid_2, occ_pid_all, avail_pid_all, mon_pid_all);\n }\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}", "function loadStats() {\n\n d3.json(\"../data/reducedMonthStationHour2003_2004.json\", function(error,data){\n completeDataSet= data;\n all_array = [];\t \n for (i in completeDataSet)\n {\n all_array.push(completeDataSet[i]['sum']) \n \n }\n loadStations();\n\n })}", "function loadComplete() {\n cnt--;\n if (!cnt) {\n execComplete();\n }\n }", "function loadTotals( collection, loadData ){\n\t\t\t\tangular.forEach( loadData, function(loadItem, key){\n\t\t\t\t\tif( typeof loadItem.total != 'undefined' ){\n\t\t\t\t\t\tcollection[key].total = loadItem.total;\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}", "function loadOccAvailData__03(data) {\n\n let parsed_data = JSON.parse(data);\n \n //Factors for RevPar vs Rev Graph\n let occ = [];\n let mon = [];\n let avail = [];\n\n let occ_pid_1 = []; let occ_pid_2 = []; let occ_pid_all = [];\n let mon_pid_1 = []; let mon_pid_2 = []; let mon_pid_all = [];\n let avail_pid_1 = []; let avail_pid_2 = []; let avail_pid_all = [];\n\n if(parsed_data.length === 0){\n document.write('no data');\n }else{\n \n //Data Splitter\n dataSplittor_Occ__03(parsed_data, occ_pid_1, avail_pid_1, occ_pid_2, avail_pid_2, occ_pid_all, avail_pid_all, mon_pid_all);\n //Data Loader\n dataLoader_Occ__03(occ, avail, mon, occ_pid_1, avail_pid_1, mon_pid_1, occ_pid_2, avail_pid_2, mon_pid_2, occ_pid_all, avail_pid_all, mon_pid_all);\n }\n \n}", "function loadData() {\n loadNYTData();\n loadParselyData();\n loadEtsyData();\n loadTumblrData();\n loadBitlyData();\n loadFoursquareData();\n loadexfmData();\n page++;\n\n if (isLoading) $('#loaderCircle').show();\n}", "function populateResults() {\n\n\n\n //display the loading div\n showLoadingDiv(true);\n\n //get the path\n var value = $(idSearchBoxJQ).val();\n previousSearchValue = value; //store this value in the previous value.\n\n\n getData(value);\n\n\n }", "function loadData(xmlData) {\n var nmtAvailability = 0.0;\n var curNMT = xmlData.documentElement.getElementsByTagName('currentNMT');\n if (curNMT && curNMT[0] && curNMT[0].getAttribute('availability') != '') {\n nmtAvailability = parseFloat(curNMT[0].getAttribute('availability'));\n }\n\n loadNMTData(xmlData);\n\n if (nmtAvailability >= 50.0) {\n loadLMaxFrequency(xmlData);\n loadNoiseStat(xmlData);\n } else {\n clearTableData(tableDataFrequency);\n clearTableData(tableDataFrequencyForTable);\n clearTableData(tableDataFrequency6vM);\n clearTableData(tableDataFrequencyForTable6vM);\n $('#freqchart_div').hide();\n $('#freqtable_div').hide();\n clearTableData(tableDataFrequencyHistDay);\n clearTableData(tableDataFrequencyHistNight);\n clearTableData(tableDataFrequencyHistDay6vM);\n clearTableData(tableDataFrequencyHistNight6vM);\n $('#freqhistdaytable_div').hide();\n $('#freqhistnighttable_div').hide();\n $('#txtLMaxFrequency').html('Noise Event Distribution of Departures');\n\n clearTableData(tableDataNoiseStatEU);\n clearTableData(tableDataNoiseStatEUForTable);\n $('#noisechartFLG_div').hide();\n $('#noisetableFLG_div').hide();\n $('#noisechartEU_div').hide();\n $('#noisetableEU_div').hide();\n $('#txtNoiseStatEU').html('Equivalent continuous sound levels of aircraft sound');\n\n $('#freqchart_div').slideUp(200);\n $('#freqtable_div').slideUp(200);\n $('#freqhistdaytable_div').slideUp(200);\n $('#freqhistnighttable_div').slideUp(200);\n $('#lmaxFreqNoData').show();\n $('#lmaxFreqHistNoData').show();\n $('#noiseStatEUNoData').show();\n }\n\n loadFlightCountData(xmlData);\n loadTypemix(xmlData);\n loadRouteUsage(xmlData);\n}", "function calculate() {\n\t\tvar servings = 0;\n\t\tvar standardDrinks = 0;\n\t\tvar calories = 0;\n\n\t\t$('.calculator-carousel .single-drink').each(function(){\n\t\t\tvar currentDrinkType = $(this).data('drinktypes').split(',')[$(this).data('currenttype')].split('|');\n\t\t\tservings += $(this).data('quantity');\n\t\t\tstandardDrinks += $(this).data('quantity') * (currentDrinkType[2] / 1000) * drinkDefinitions[currentDrinkType[1]]['abv'] * 0.789;\n\t\t\tcalories += $(this).data('quantity') * (currentDrinkType[2] / 100) * drinkDefinitions[currentDrinkType[1]]['calories'];\n\t\t\t//Only render if the values change\n\t\t\tvar renderId = String(servings) + \",\" + String(standardDrinks) + \",\" + String(calories);\n\t\t\tif (renderId != calculationId) {\t\t\t\n\t\t\t\t\n\t\t\t\trenderResults(servings, standardDrinks, calories);\n\t\t\t}\n\t\t\tcalculationId = renderId;\n\t\t});\n\t}", "addTotalFetched() { this.totalFetched.value++; this.updateStatNav(this.totalFetched); }", "function loadStatistics() {\n var queryGebruikers = \"SELECT COUNT(ID_GEBRUIKER) AS aantalGebruikers FROM gebruiker\";\n var queryBestemmingen = \"SELECT COUNT(ID_BESTEMMINGEN) AS aantalBestemmingen FROM bestemmingen\";\n var queryInteresses = \"SELECT COUNT(ID_INTERESSES) AS aantalInteresses FROM interesses\";\n var queryMatches = \"SELECT COUNT(ID_MATCH) AS aantalMatches FROM matches\";\n\n databaseManager\n .query(queryGebruikers)\n .done(function (data) {\n aantalGebruikers = data[0].aantalGebruikers;\n adminHomeView.find('.aantalGebruikers').append(aantalGebruikers);\n })\n .fail(function (err) {\n console.log(err);\n });\n\n databaseManager\n .query(queryBestemmingen)\n .done(function (data) {\n aantalBestemmingen = data[0].aantalBestemmingen;\n adminHomeView.find('.aantalDestinations').append(aantalBestemmingen);\n })\n .fail(function (err) {\n console.log(err);\n });\n\n databaseManager\n .query(queryInteresses)\n .done(function (data) {\n aantalInteresses = data[0].aantalInteresses;\n adminHomeView.find('.aantalInterests').append(aantalInteresses);\n })\n .fail(function (err) {\n console.log(err);\n });\n\n databaseManager\n .query(queryMatches)\n .done(function (data) {\n aantalMatches = data[0].aantalMatches;\n adminHomeView.find('.aantalMatches').append(aantalMatches);\n })\n .fail(function (err) {\n console.log(err);\n });\n\n $(\".content\").empty().append(AdminStatistieken);\n }", "function CalculateResults()\r\n {\r\n var inputsAllValid;\r\n\r\n // Fetch all input values from the on-screen form.\r\n\r\n inputsAllValid = FetchInputValues();\r\n\r\n // If the fetched input values are all valid...\r\n\r\n if (inputsAllValid)\r\n {\r\n // Do the natural gas pressure loss calculation.\r\n\r\n DoCalculation();\r\n\r\n // Display the results of the calculation.\r\n\r\n DisplayResults();\r\n }\r\n }", "function handleLoad( result, idCounter, item, parentId ) {\n\n // create an entity for the source dataset\n const sourceId = '_:source' + idCounter['entity']++;\n result['entity'][ sourceId ] = {\n 'prov:atLocation': item.getData( 'source/url' ),\n 'yavaa:type': item.getData( 'source/type' ),\n 'yavaa:datasetId': item.getData( 'source/datasetId' ),\n 'yavaa:distrId': item.getData( 'source/distrId' ),\n 'dct:publisher': item.getData( 'source/publisher' ),\n 'dct:title': item.getData( 'source/title' )\n };\n\n // activity for loading\n const actId = '_:load' + idCounter['activity']++,\n actStartTime = (new Date( item.getData( 'startTime' ) )).toISOString(),\n actEndTime = (new Date( item.getData( 'endTime' ) )).toISOString();\n result['activity'][ actId ] = {\n 'prov:startTime': actStartTime,\n 'prov:endTime': actEndTime,\n 'prov:type': { '$': convertType( item.getData( 'type' ) ), 'type': 'xsd:QName' },\n 'yavaa:action': item.getData( 'action' ),\n 'yavaa:columns': JSON.stringify( item.getData( 'columns' ) ),\n 'yavaa:params': JSON.stringify( item.getData('params') ),\n };\n\n // add connection between activity and loaded resource\n result['used'][ '_:used' + idCounter['relation']++ ] = {\n 'prov:activity': actId,\n 'prov:entity': sourceId\n };\n\n // resulting (intermediate?) entity\n const newEntId = '_:result' + idCounter['entity']++;\n result['entity'][ newEntId ] = {\n 'prov:type': { '$': 'prov:Collection', 'type': 'xsd:QName' },\n };\n\n // link to resulting entity\n result['wasGeneratedBy'][ '_:wasGeneratedBy' + idCounter['relation']++ ] = {\n 'prov:entity': newEntId,\n 'prov:activity': actId\n };\n\n // add links\n linkToParent( result, idCounter, newEntId, actId, parentId );\n linkToProv( item, actId, newEntId );\n\n return null;\n }", "function onCalcComplete()\n\t{\n\t\t////////////////////////////////\n\t\t//Display Results\n\t\t////////////////////////////////\n\t\t\n\t\t//The data on the map screen.\n\t\tsetImpactValues(dataProvider.getDgOutputs());\n\t\t\n\t\t//The inputValues\n\t\tsetInputValues(dataProvider.getDgInputs());\n\t\t\n\t\t//The damage table\n\t\tsetDamage(dataProvider.getTxtDamage());\n\t\t\n\t\t//Set Impact Energy Table\n\t\tsetEnergyValues(dataProvider.getDgEnergy());\n\t\t\n\t\t//Get the what happenes to the impactor text.\n\t\t setImpactorText(dataProvider.getTxtImpactor());\n\t\t \n\t\t// get fireball dats.\n\t\t setFireballSeen(dataProvider.getDgFirevall());\n\t\t\n\t\tdrawScale();\n\t\t\n\t}", "function doneFetch() {\n var sublists = createSublists(candidates);\n\n createStudentGenderChart('.student-gender-chart', sublists['genderList']);\n createStudentEthnicityChart('.student-enthnicty-chart', sublists['ethnicityList']);\n createStudentScoresChart('.student-scores-chart', sublists['satScoresList']);\n createStudentDepartmentsChart('.student-departments-chart', sublists['departmentCandidateList']);\n createDepartmentGenderChart('.department-gender-chart', sublists['departmentGenderList']);\n\n d3.select('.main').style('z-index', '1');\n d3.select('.loading').style('display', 'none');\n }", "function fetchUpdate(){\n var t = Date.now();\n request.get( 'http://tools.amsterdamopendata.nl/ndw/data/reistijdenAmsterdam.geojson', function( err, response ){\n //console.log(err || 'no error');\n var features;\n \n try{\n features = JSON.parse( response.body ).features;\n } catch( e ) {\n console.log( e );\n return;\n }\n\n //console.log(features.length);\n\n var responseTime = Date.now() - t,\n crunched = crunch( features ),\n kmhAvg = 60 / crunched.travelTimeAvg * 60,\n kmhAvgH = 60 / crunched.statsByType.H.travelTimeAvg * 60,\n kmhAvgO = 60 / crunched.statsByType.O.travelTimeAvg * 60;\n\n extremes[ 0 ] = Math.min( kmhAvg, extremes[ 0 ] );\n extremes[ 1 ] = Math.max( kmhAvg, extremes[ 1 ] );\n extremesH[ 0 ] = Math.min( kmhAvgH, extremesH[ 0 ]);\n extremesH[ 1 ] = Math.max( kmhAvgH, extremesH[ 1 ]);\n extremesO[ 0 ] = Math.min( kmhAvgO, extremesO[ 0 ]);\n extremesO[ 1 ] = Math.max( kmhAvgO, extremesO[ 1 ]);\n\n fs.writeFile( './storedData.json', JSON.stringify( {\n extremes: extremes,\n extremesH: extremesH,\n extremesO: extremesO\n } ) );\n\n constipation = fit( kmhAvg, extremes[ 0 ], extremes[ 1 ], min, max );\n constipationH = fit( kmhAvgH, extremesH[ 0 ], extremesH[ 1 ], min, max );\n constipationO = fit( kmhAvgO, extremesO[ 0 ], extremesO[ 1 ], min, max );\n console.log( 'constipation:', constipation, kmhAvg, extremes );\n console.log( 'constipationH:', constipationH, kmhAvgH, extremesH );\n console.log( 'constipationO:', constipationO, kmhAvgO, extremesO );\n\n fs.exists( valueStoreFilename, function( exists ){\n if( !exists ) fs.writeFileSync( valueStoreFilename, [\n 'time',\n 'km/h',\n 'constipation',\n 'km/h H',\n 'constipation H',\n 'km/h O',\n 'constipation O',\n 'responseTime'\n ].join( ', ' ) + '\\n', 'utf8' );\n\n fs.appendFile( valueStoreFilename, [\n new Date().toISOString(),\n kmhAvg,\n constipation,\n kmhAvgH,\n constipationH,\n kmhAvgO,\n constipationO,\n responseTime\n ].join( ', ' ) + '\\n' );\n } );\n } );\n}", "function initData(){\n container.prepend(progressInfo);\n jQuery.get(getPageURL(0, resource)).done(function(data) {\n records = processData(data, true);\n initView(new recline.Model.Dataset({records:records}));\n numReq = getRequestNumber(data.result.total, pageSize);\n for (var i = 1; i <= numReq; i++) {\n requestData(getPageURL(i, resource));\n };\n });\n }", "async function get_loads(pageCursor){\n var q_full = datastore.createQuery(LOAD);\n var total_num = await datastore.runQuery(q_full).then( (results) => {\n return results[0].length;\n });\n\n var q = datastore.createQuery(LOAD).limit(PAGE_SIZE);\n if(pageCursor){\n q = q.start(pageCursor);\n }\n\treturn datastore.runQuery(q).then( (results) => {\n const entities = results[0].map(fromDatastore);\n const info = [results[1], total_num];\n\t\treturn [entities, info];\n\t});\n}", "function loadRetailData (results) {\n\t\t\tself.isRetailWaiting = false;\n\t\t\tself.error = null;\n\t\t\tfirstRetailSearch = false;\n\n\t\t\t// If this was the first page, it includes record count and total pages .\n\t\t\tif (results.complete) {\n\t\t\t\tself.totalRetailRecordCount = results.recordCount;\n\t\t\t\tself.retailDataResolvingParams.total(self.totalRetailRecordCount);\n\t\t\t}\n\t\t\tif (results.data.length === 0) {\n\t\t\t\tself.retailData = null;\n\t\t\t\tself.retailDataResolvingParams.data = [];\n\t\t\t\tbuildErrorWithMessage(\"No records found.\");\n\t\t\t} else {\n\t\t\t\tself.error = null;\n\t\t\t\tself.retailData = results.data;\n\t\t\t\tself.retailDefer.resolve(results.data);\n\t\t\t}\n\t\t}", "function getDataAndApply() {\n getModelKey();\n for (var i = 0; i < toggleSection.length; i++) {\n toggleSection[i].classList.remove('loaded');\n }\n getData(modelKey,\n getSelectedTrimId(),\n getSelectedEngineId(),\n function (status, response) { \n apply(response, $stats); \n setTimeout(function(){\n setUpHeight();\n for (var i = 0; i < toggleSection.length; i++) {\n toggleSection[i].classList.add('loaded');\n }\n }, 400);\n },\n function () { console.log(\"getDataAndApply fail\"); });\n }", "function calculateAll() {\n\t\tcalculatePrice();\n\t\tcompileSpecs();\n\t\tcalculateUSD();\n\t}", "function calcular() {\n num2 = obtenerResultado();\n resolver();\n}", "async function fetchResults() {\n setIsLoading(true);\n try {\n const response = await Axios.get(URL); // Axios request\n // Sort data in descending order\n const sortedData = response.data.data\n .slice(0, 5)\n .sort((a, b) => b.association_score.overall - a.association_score.overall);\n setData(sortedData);\n setIsLoading(false);\n } catch (e) {\n throw new Error(e);\n }\n }", "loadingData() {}", "loadingData() {}", "function dataLoaded(err,data,m){\n}", "function getRoadStats(routename) {\r\n for (var s = 1; s < 11; s++) {\r\n var getUrl = StatsUrl +s + \"/\" + routeName;\r\n var thisArray = [];\r\n \r\n $.ajaxSetup({ \"async\": false });\r\n $.getJSON(getUrl, function (data) {\r\n var prevVal = null;\r\n var prevEnd = null;\r\n $.each(data[0].DATA, function (key, val) {\r\n var sn = new Object();\r\n \r\n if (val.ELEM_VALUE != prevVal) {\r\n for (ea in val) { \r\n sn[ea] = val[ea];\r\n if (prevEnd != null) {\r\n thisArray[thisArray.length - 1].ENDREFPT = prevEnd;\r\n }\r\n }\r\n //if (sn.ENDREFPT != prevEnd) {\r\n // sn.ENDREFPT = prevEnd;\r\n //}\r\n \r\n prevVal = sn.ELEM_VALUE;\r\n thisArray.push(sn);\r\n \r\n }\r\n prevEnd = val.ENDREFPT;\r\n \r\n });\r\n\r\n });\r\n $.ajaxSetup({ \"async\": true });\r\n \r\n switch (s) {\r\n case 1:\r\n costCenter = thisArray;\r\n break;\r\n case 2:\r\n constYear = thisArray;\r\n break;\r\n case 3:\r\n array3 = thisArray;\r\n break;\r\n case 4:\r\n medianType = thisArray;\r\n break;\r\n case 5:\r\n medianWidth = thisArray;\r\n break;\r\n case 6:\r\n array6 = thisArray;\r\n break;\r\n case 7:\r\n array7 = thisArray;\r\n break;\r\n case 8:\r\n suffRate = thisArray;\r\n break;\r\n case 9:\r\n surfMat = thisArray;\r\n break;\r\n case 10:\r\n numLanes = thisArray;\r\n break;\r\n }\r\n\r\n }\r\n\r\n\r\n}", "function calculateResults() {\n document.getElementById('answer').style.display = 'block';\n\n document.getElementById('loading').style.display = 'none';\n\n document.getElementById('calc').style.display = 'none';\n\n inputProgress.style.display = 'none';\n progress.style.display = 'none';\n var showTable = document.getElementById('table');\n showTable.classList.remove('invisible');\n\n caclRiskProfile();\n}", "function setup() {\n for (var i = 0; i < restaurantFile.results.length; i++) {\n restaurantInfo.push(restaurantFile.results[i].rating);\n }\n linearSearch(); //run the linearSearch function\n}", "function onload() {\n\n\tvar res = sentimentalTotal();\t\n\t//alert(JSON.stringify(res));\n\t$('#results').html(JSON.stringify(res));\n\n}", "async loadAPI(searchValues) {\n\n let anunciosCount = 0;\n let anunciosData = [];\n\n console.log(\"TCL: ListResults -> loadAPI -> searchValues.length\", searchValues)\n\n if(!this.isEmpty(searchValues)) {\n\t\t\t\t\n anunciosData = await this.getAnunciosDataWithSearchParams(searchValues);\n anunciosCount = await this.getAnunciosCountWithSearchParams(searchValues);\n \n }\n else\n {\n anunciosData = await this.getAnunciosData();\n anunciosCount = await this.getAnunciosCount();\n \n }\n\n\n \n console.log(\"TCL: ListResults -> loadAPI -> anunciosData\", anunciosData)\n \n \n this.setState({\n searchResults : anunciosData,\n anunciosCount: anunciosCount.count,\n isLoaded : true\n })\n }", "function executeAfterFetch(){\n\n hiddenLoader();\n getPartyMembers();\n myArrAtt = getArray(membersSenate);\n myArrLoyalty = getArray(membersSenate);\n someName();\n\n}", "function LoadData(){\n\tLoadDataFiles();\n\tExtractDataFromFiles();\n}", "dataLoadedPercentage() {\n\n return this.total == 0 ? 0 :\n this.loaded/this.total;\n }", "updateResults() {\n if (this.reindexFlag_) {\n this.reindex();\n }\n\n var results = [];\n if (this.timeModel_ && this.binMethod) {\n // make sure the source time model is filtered on the correct range\n if (this.source) {\n this.source.getFilteredFeatures();\n }\n\n var tempFilters = {};\n var filters = this.getParentFilters();\n if (filters) {\n for (var id in filters) {\n if (filters[id] != null) {\n this.timeModel_.filterDimension(id, filters[id]);\n } else {\n // there's a disturbance in the force - don't return any bins! see getParentFilters for details.\n this.results = [];\n return;\n }\n }\n }\n\n // clear the filters to get all of the data, reapply them a little farther down\n if (this.forceAllData_ == true) {\n tempFilters = this.timeModel_.clearAllFilters();\n }\n\n if (this.secondaryBinMethod) {\n results = /** @type {!Array<!os.histo.Result<!ol.Feature>>} */ (this.timeModel_.groupData(this.multiId_,\n this.combinedKeyMethod.bind(this), this.reduceAdd.bind(this),\n this.reduceRemove.bind(this), this.reduceInit.bind(this)));\n } else {\n results = /** @type {!Array<!os.histo.Result<!ol.Feature>>} */ (this.timeModel_.groupData(this.id_,\n this.binMethod.getBinKey.bind(this.binMethod), this.reduceAdd.bind(this),\n this.reduceRemove.bind(this), this.reduceInit.bind(this)));\n }\n\n // reapply the filters\n if (this.source && this.forceAllData_ == true) {\n this.timeModel_.applyFilters(tempFilters);\n }\n\n if (filters) {\n for (var id in filters) {\n this.timeModel_.filterDimension(id, undefined);\n }\n }\n\n\n results = /** @type {!Array<!ColorBin>} */ (results.map(this.map, this).filter(function(item) {\n return item != undefined;\n }));\n\n if (this.sortFn) {\n googArray.sort(results, this.sortFn);\n }\n }\n\n this.results = results;\n }", "function loadResults() {\n /*$loadMoreButton.attr('disabled', 'disabled'); //disable 'load more' button while processing results and awaiting response\n\n $loadMoreButton.find('.loader').show();\n $loadMoreButton.find('.show-label').hide();*/\n\n // load product search results\n /*jshint validthis:true */\n queryParam = {\n 'site': 'default_collection',\n 'client': client + '-' + globalSearch.myConfig.site,\n 'q': globalSearch.myConfig.q,\n 'start': resultCount,\n 'num': globalSearch.myConfig.resultsPerRequest\n };\n\n $.ajax({\n type: 'GET',\n url: resultsUrl,\n data: queryParam,\n dataType: 'json',\n jsonp: true,\n async: true,\n cache: false,\n beforeSend: function(evt) {},\n success: function(data) {\n try {\n if (data.GSP.RES && data.GSP.RES.M) {\n totalCount = parseInt(data.GSP.RES.M, 10);\n\n //append results\n if (data.GSP.RES.R) {\n appendResults(data.GSP.RES.R);\n }\n\n //enable button\n $loadMoreButton.removeAttr('disabled');\n $loadMoreButton.find('.loader').hide();\n $loadMoreButton.find('.show-label').show();\n $loadMoreButton.addClass('show');\n $loadMoreButton.addClass(client);\n\n //console.log('resultCount=' + resultCount + '|totalCount=' + totalCount);\n\n if (client === 'products') {\n globalSearch.setupProductCarousel();\n } else {\n if (resultCount >= totalCount) {\n //done loading results, hide 'more' button\n $loadMoreButton.hide();\n }\n }\n } else {\n showNoResult();\n }\n\n } catch (err) {\n //console.log('err');\n showNoResult();\n }\n },\n error: function(data) {\n //console.log('error');\n showNoResult();\n },\n complete: function(){\n\n }\n });\n }", "function callMonthlyInfo() {\n var period = dateFormat(new Date());\n var query = BuildingInfo.Income.find({'period': period});\n query.exec(function (err, incomes) {\n if (err) {\n res.send(err);\n }\n //console.log(\"incomes .. \", incomes);\n var totalIncome = calculateTotal(incomes);\n callMonthlyExpenditure(totalIncome, period);\n });\n}", "getResult() {\n var nominator = 0;\n var denominator = 0;\n\n const criteriaList = [\n this.criteriaCloud,\n this.criteriaWind,\n this.criteriaHumidity,\n this.criteriaVisibility\n ]\n\n criteriaList.forEach((criteria) => {\n nominator += criteria.getScore() * criteria.weight;\n denominator += criteria.weight;\n });\n return Math.floor((nominator/denominator));\n }", "function getResultDetailed(){\r\n\t\r\n\tif (processDone) {\r\n \r\n\t\t for(var key in Obj_Fetch)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\tvar temp_var={};\r\n\t\t\t\t\t\ttemp_var.cancertypedetailed=key;\r\n\t\t\t\t\t\ttemp_var.male=Obj_Fetch[key].MALE;\r\n\t\t\t\t\t\ttemp_var.female=Obj_Fetch[key].FEMALE;\r\n\t\t\t\t\t\tfetch_data_array.push(temp_var);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\taddScatterPlotDetailed(fetch_data_array);\r\n\t\t\t\t\t\tconsole.log(fetch_data_array);\r\n\r\n } else {\r\n setTimeout(getResult, 250);\r\n }\r\n }", "function refreshResult() {\n\n //console.log(\"start refresh\");\n\tengine.initialize();\n\t//console.log(\"must start moms\");\n\tengine.interpol();\n\tengine.gearInitialize();\n\tengine.drawMomentum();\n\tengine.drawGears();\n\t\n\t$(\"#resTable1\").html(engine.findCross());\n\t$(\"#resTable2\").html(engine.findCross2());\n\t\n} // refreshResult", "forAllDays() {\n if (this.breakDown() !== 'No Information to display') {\n let totalCost = this.breakDown().reduce((acc, item) => acc += item.totalCost, 0)\n return totalCost || 0;\n }\n }", "async postParsingAnalysis () {\n var mapped = Object.keys(this.results).map(addr => {return { addr: addr, count: this.results[addr] }})\n var sortedByCount = this.sortEntriesByCount(mapped)\n var topNentries = this.getTopN(sortedByCount, N)\n\n var fileName = `${this.baseOutPath}-${analysisName}.json`\n var fileContent = {\n // Signal and format to visualize as piechart\n piechart: {\n datasets: [{\n backgroundColor: ['#D33F49', '#77BA99', '#23FFD9', '#27B299', '#831A49'],\n data: this.formatData(topNentries)\n }],\n labels: await this.formatLabelsForPieChart(topNentries)\n },\n hint: 'The labels of this chart have been computed using temporally sensitive data'\n }\n var summary = {\n fileName: fileName,\n attackCategory: 'Network State',\n analysisName: `Top ${N} sources by traffic`,\n supportedDiagrams: ['PieChart']\n }\n return await this.storeAndReturnResult(fileName, fileContent, summary)\n }", "loadFactor() {\n return this.elements / this.capacity;\n }", "loadFactor() {\n return this.elements / this.capacity;\n }", "complete() {\n\n if (!this._running) return;\n this._running = false;\n\n // get sure all measures are completed\n this.completeMeasure();\n\n let values = [];\n\n for (let profile of this._profiles) {\n values.push(profile.elapsed);\n }\n\n // Build report data\n this._data = {\n 'name': this._name,\n 'entries': this._profiles.length,\n 'median': Util.median(values),\n 'max': values[0],\n 'min': values[values.length - 1]\n };\n\n this.dispatch();\n }", "function pm40Data(){ \n //Texas\n fetch('./results.json')\n .then(function (response) {\n return response.json();\n })\n .then(function (myJson) {\n console.log(\"pm40__1\");\n sizeT.push(myJson[\"PMS_40_19_tx\"][\"texasDataLength\"][0]);\n console.log(sizeT);\n let counter = 90858;\n for(let i = 0; i < 90858; i++){ //90858\n classA.push(parseInt(myJson[\"PMS_40_19_tx\"][\"fatalitiesT\"][i]));\n dateT.push(myJson[\"PMS_40_19_tx\"][\"dateT\"][i]);\n typeT.push(myJson[\"PMS_40_19_tx\"][\"typeT\"][i]);\n longT.push(parseFloat(myJson[\"PMS_40_19_tx\"][\"longT\"][i]));\n latT.push(parseFloat(myJson[\"PMS_40_19_tx\"][\"latT\"][i]));\n classA_T.push(parseInt(myJson[\"PMS_40_19_tx\"][\"classA_T\"][i])); \n classB_T.push(parseInt(myJson[\"PMS_40_19_tx\"][\"classB_T\"][i]));\n classC_T.push(parseInt(myJson[\"PMS_40_19_tx\"][\"classC_T\"][i]));\n unknownT.push(parseInt(myJson[\"PMS_40_19_tx\"][\"unknownT\"][i])); // these 2 are combined to make O\n Non_InjuriesT.push(parseInt(myJson[\"PMS_40_19_tx\"][\"Non_InjuriesT\"][i]));\n loadClassOTexas(i);\n \n }\n //New Mexico\n for(let i = 0; i < 25263; i++){ \n classA.push(parseInt(myJson[\"PMS_40_19_nm\"][\"fatalitiesNM\"][i]));\n dateT.push((myJson[\"PMS_40_19_nm\"][\"dateNM\"][i])).toString();\n PEDinv.push(myJson[\"PMS_40_19_nm\"][\"PED_NM\"][i]);\n PECinv.push(myJson[\"PMS_40_19_nm\"][\"PEC_NM\"][i]);\n TRKinv.push(myJson[\"PMS_40_19_nm\"][\"TRK_NM\"][i]);\n longT.push(parseFloat(myJson[\"PMS_40_19_nm\"][\"longNM\"][i]));\n latT.push(parseFloat(myJson[\"PMS_40_19_nm\"][\"latNM\"][i]));\n classA_T.push(parseInt(myJson[\"PMS_40_19_nm\"][\"classA_NM\"][i]));\n classB_T.push(parseInt(myJson[\"PMS_40_19_nm\"][\"classB_NM\"][i]));\n classC_T.push(parseInt(myJson[\"PMS_40_19_nm\"][\"classC_NM\"][i]));\n classO_T.push(parseInt(myJson[\"PMS_40_19_nm\"][\"classO_NM\"][i]));\n CreateTypeNM(counter); // update type at the same time at same index\n counter++;\n }\n console.log(\"new mexico loaded\");\n \n });\n}", "checkLoadingStatus(){\n\t\t\tif(this.substancesList.length && this.materialsList.length && this.measureUnitsList.length){\n\t\t\t\tthis.currentView = 'analyzes-monitor';\n\t\t\t\tthis.fetchAnalyzes();\n\t\t\t}\n\t\t}", "function handleinformation(data, loadinfo){\n\tif(!data.question){}else{\n\t\tloadinfo = findmatch(data.question, loadinfo, 'includes');\n\t};\n\tif(data.rip == \"false\" || !data.rip){\n\t\tvar ripedit = [];\n\t\tfor (var i = 0; i < loadinfo.length; i++){\n\t\t\tif(!loadinfo[i].rip){\n\t\t\t\tripedit.push(loadinfo[i]);\n\t\t\t};\n\t\t};\n\t\tloadinfo = ripedit;\n\t};\n\tif(data.ex == \"true\"){\n\t\tvar exraidedit = [];\n\t\tfor (var i = 0; i < loadinfo.length; i++){\n\t\t\tif(loadinfo[i].exraid){\n\t\t\t\texraidedit.push(loadinfo[i]);\n\t\t\t};\n\t\t};\n\t\tloadinfo = exraidedit;\n\t};\n\tif(data.lat == '0' || data.lon == '0' || !data.lon || !data.lat){}else{\n\t\tvar gymbykm = [];\n\t\tfor (var i = 0; i < loadinfo.length; i++){\n\t\t\tvar km = Math.round(getDistanceFromLatLonInKm(loadinfo[i].location.lon,loadinfo[i].location.lat,data.lon,data.lat) * 10);\n\t\t\tgymbykm.push(pad(km, 10) + '|||' + i);\n\t\t\tloadinfo[i].distans = Number(km / 10);\n\t\t};\n\t\tgymbykm.sort();\n\t};\n\tif(data.todo == 'normal' || !data.todo || !data.lon || !data.lat){\n\t\tvar loadinfo = sortgymbyname(loadinfo);\n\t\treturn loadinfo;\n\t}else if(data.todo == 'km'){\n\t\tif(data.lat == '0' && data.lon == '0'){\n\t\t\tvar loadinfo = sortgymbyname(loadinfo);\n\t\t\treturn loadinfo;\n\t\t}else{\n\t\t\tvar gymstoreturn = [];\n\t\t\tfor (var i = 0; i < gymbykm.length; i++){\n\t\t\t\tvar datasplit = gymbykm[i].split('|||');\n\t\t\t\tgymstoreturn.push(loadinfo[datasplit[1]]);\n\t\t\t};\n\t\t\treturn gymstoreturn;\n\t\t};\n\t}else{\n\t\treturn false;\n\t};\n}", "function calculateResults() {\n //UI vars\n const height = document.querySelector('#height').value;\n const weight = document.querySelector('#weight').value;\n const age = document.querySelector('#age').value;\n const sex = document.querySelector('#sex').value;\n const activity = document.querySelector('#activity').value;\n\n //Output vars\n const dailyCalorieRequirements = document.querySelector('#dailyCalorie');\n const daliyProteinIntake = document.querySelector('#dailyProtein');\n const dailyCarbsIntake = document.querySelector('#dailyCarbs');\n const dailyFatIntake = document.querySelector('#dailyFat');\n\n //calculating basal metabolic rate\n const bmr = ((10 * weight) + (6.25 * height) - (5 * age)) + parseFloat(sex);\n \n if (isFinite(bmr)) {\n let dailyCalorie = bmr * parseFloat(activity);\n dailyCalorieRequirements.value = Math.round(dailyCalorie);\n daliyProteinIntake.value = getAmountOfMacronutrient(dailyCalorieRequirements.value, 25, 'p');\n dailyCarbsIntake.value = getAmountOfMacronutrient(dailyCalorieRequirements.value, 35, 'c');\n dailyFatIntake.value = getAmountOfMacronutrient(dailyCalorieRequirements.value, 40, 'f');\n displayResults();\n hideLoading();\n displayMacrosRatioChart();\n } else {\n showError('Please check your numbers');\n }\n}", "function lotTotalArea() {\nvar total_affected_area = {\nonStatisticField: \"AffectedArea\",\noutStatisticFieldName: \"total_affected_area\",\nstatisticType: \"sum\"\n}\n\nvar total_handover_area = {\nonStatisticField: \"HandOverArea\",\noutStatisticFieldName: \"total_handover_area\",\nstatisticType: \"sum\"\n};\n\nvar query = lotLayer.createQuery();\nquery.outStatistics = [total_affected_area, total_handover_area];\n\nreturn lotLayer.queryFeatures(query).then(function(response) {\nvar stats = response.features[0].attributes;\n\nconst totalAffected = stats.total_affected_area;\nconst totalHandedOver = stats.total_handover_area;\n//const LOT_HANDOVER_PERC = (handedOver/affected)*100;\nreturn totalAffected;\n});\n}", "function LocalSearchLengthCalculation(){\n var myData = $filter('filter')(CycleCountLineCtrl.ePage.Entities.Header.Data.UIWmsCycleCountLine, CycleCountLineCtrl.ePage.Masters.SearchTable);\n CycleCountLineCtrl.ePage.Masters.Pagination.LocalSearchLength = myData.length;\n }", "do_calculation( bunch_of_numerical_data)\n {\n var total = 0 ;\n bunch_of_numerical_data.forEach(element => {\n total += element\n });\n return total ;\n }", "function check() {\n\n // decrement number of founded processing datasets\n counter--;\n\n // finished processing of all founded datasets? => perform callback\n if ( counter === 0 && callback) callback( results );\n\n }", "function loadOccAvailData__ThisYear(data) {\n\n let parsed_data = JSON.parse(data);\n \n //Factors for RevPar vs Rev Graph\n let occ = [];\n let mon = [];\n let avail = [];\n\n let occ_pid_1 = []; let occ_pid_2 = []; let occ_pid_all = [];\n /*--------------------------------------------*/ let mon_pid_all = [];\n let avail_pid_1 = []; let avail_pid_2 = []; let avail_pid_all = [];\n\n if(parsed_data.length === 0){\n document.write('no data');\n }else{\n \n //Data Splitter\n dataSplittor_Occ__ThisYear(parsed_data, occ_pid_1, avail_pid_1, occ_pid_2, avail_pid_2, occ_pid_all, avail_pid_all, mon_pid_all);\n //Data Loader\n dataLoader_Occ__ThisYear(occ, avail, mon, occ_pid_1, avail_pid_1, occ_pid_2, avail_pid_2, occ_pid_all, avail_pid_all, mon_pid_all);\n }\n \n}", "function loadData()\n{\n\tdb.collection('all').find().toArray(function(err, data){\n\t\tfor(var j in data)\n\t\t{ \n\t\t\tif(data[j]['name']==undefined)\n\t\t\t\tcontinue;\n\t\t\tvarUsage.names.push(data[j]['name'])\n\t\t\tvarUsage.amounts.push(0);\n\t\t\tvarUsage.dataIn.push(false);\n\t\t\tvarUsage.dimensions.push({});\n\t\t\tvarUsage.sources.push(data[j].source)\n\t\t\tvarUsage.bounds.push([0,0]);\n\t\t}\n endLoad();\n\t})\n\t\n\tdb.collection('allsuper').find().toArray(function(err, data){\n\t\tfor(var j in data)\n\t\t{\n\t\t\tsuperUsage.names.push(data[j]['name'])\n\t\t\tsuperUsage.amounts.push(0);\n\t\t\tsuperUsage.dataIn.push(false);\n\t\t\tsuperUsage.dimensions.push({});\n\t\t\tsuperUsage.dependancies.push(data[j]['dependancies']);\n\t\t\tsuperUsage.sources.push(data[j].source);\n\t\t}\n endLoad();\n\t})\n\t\n\tdb.collection('var').find({name:'Population'}).toArray(function(err, d){\n\t\tvar data=d[0].data;\n\t\tfor(var j in data)\n\t\t{\n\t\t\tfor(var k=0;k<data[j]/1000;k++)\n\t\t\t{\n\t\t\t\tpeople.push({fip:j})\n\t\t\t}\n\t\t}\n endLoad();\n\t})\n}", "loadQuery(id){\n $.ajax({\n type: 'GET',\n url: 'query/'+id,\n context: this,\n dataType: 'json',\n cache: false,\n success: function (data) {\n\n var metricas = [];\n var finalmet = [];\n var metH = [];\n if(data.metrica != null){\n for(var i=0; i<data.metrica.length; i++){\n metricas.push({\n value: data.metrica[i].id,\n label: data.metrica[i].clave,\n name: data.metrica[i].nombre,\n tipo: data.metrica[i].tipo\n });\n finalmet.push(data.metrica[i].clave);\n metH.push(data.metrica[i].nombre);\n }\n }\n\n var finaldim =[];\n var dimension = [];\n var dimH = [];\n if(data.dimension.length > 0){\n for(var i=0; i<data.dimension.length; i++){\n dimension.push({\n value: data.dimension[i].id,\n label: data.dimension[i].clave,\n name: data.dimension[i].nombre,\n tipo: data.dimension[i].tipo\n });\n finaldim.push(data.dimension[i].clave);\n dimH.push(data.dimension[i].nombre);\n }\n }\n\n var segmento = [];\n if(data.segmentos.length > 0){\n for(var i=0; i<data.segmentos.length; i++){\n segmento.push({\n value: data.segmentos[i].id,\n label: data.segmentos[i].clave,\n name: data.segmentos[i].nombre,\n })\n }\n }\n\n var columnig = [];\n if(data.columns_ignore){\n for(var i=0; i<data.columns_ignore.length; i++){\n columnig.push({\n nombre: data.columns_ignore[i].nombre,\n label: data.columns_ignore[i].label\n })\n }\n }\n\n var sort = [];\n if (data.sort){\n sort.push({\n label: data.sort,\n });\n }\n\n //Guardo los datos y cambio estados de la modal y de la accion\n this.setState({\n id: data.id,\n nombre: data.nombre,\n filters: data.filtro,\n maxresults: data.max_results,\n siteId: this.state.selectedCuentaLbl,\n reporte_id:data.reporte_id,\n selectedMetricas: metricas,\n selectedDimensions: dimension,\n selectedSort: sort,\n selectedSegment: segmento,\n selectedColumnsignore: columnig,\n finalMet: finalmet,\n finalDim: finaldim,\n openModal: true,\n metHead: metH,\n dimHead: dimH\n }, function () {\n this.cargarSort();\n this.cargarColumnsIgnore();\n this.loadTableQuery();\n\n });\n\n }.bind(this),\n error: function (xhr, status, err) {\n //Error\n console.error(this.props.url, status, err.toString());\n }.bind(this)\n });\n }", "computeTotals()\n {\n if (this.file.transactions.length == 0)\n return\n\n this.totalSpendings = this.file.transactions\n .map(x => Math.min(x.amount, 0))\n .reduce((acc, x) => acc + x)\n\n this.totalIncome = this.file.transactions\n .map(x => Math.max(x.amount, 0))\n .reduce((acc, x) => acc + x)\n }", "function getData() {\r\n\r\n //count each time a case is taught at HKS\r\n //In other words, number of sessions in which a case was used duirng a specified academic year\r\n //these numbers may reflect a sigle session thatused multiple cases,\r\n //or an individual case that is used multiple times in multiple places\r\n //vars reset each time function is called \r\n var pubCount5 = 0;\r\n var pubCount10 = 0;\r\n var pubCount15 = 0;\r\n var pubCount20 = 0;\r\n var pubCount25 = 0;\r\n var pubCount30 = 0;\r\n var pubCount35 = 0;\r\n var pubCount40 = 0;\r\n var pubCount40more = 0;\r\n var all = 0;\r\n var lessThanTen = 0;\r\n\r\n //unique cases\r\n var UpubCount5 = 0;\r\n var UpubCount10 = 0;\r\n var UpubCount15 = 0;\r\n var UpubCount20 = 0;\r\n var UpubCount25 = 0;\r\n var UpubCount30 = 0;\r\n var UpubCount35 = 0;\r\n var UpubCount40 = 0;\r\n var UpubCount40more = 0;\r\n\r\n var yearAll = 0;\r\n var noPubDate = 0;\r\n var UnoPubDate = 0;\r\n var UlessThanTen = 0;\r\n\r\n //unique cases used in EE\r\n var UpubCount5_EE = 0;\r\n var UpubCount10_EE = 0;\r\n var UpubCount15_EE = 0;\r\n var UpubCount20_EE = 0;\r\n var UpubCount25_EE = 0;\r\n var UpubCount30_EE = 0;\r\n var UpubCount35_EE = 0;\r\n var UpubCount40_EE = 0;\r\n var UpubCount40more_EE = 0;\r\n var UnoPubDate_EE = 0;\r\n\r\n //unique cases used in DP\r\n var UpubCount5_DP = 0;\r\n var UpubCount10_DP = 0;\r\n var UpubCount15_DP = 0;\r\n var UpubCount20_DP = 0;\r\n var UpubCount25_DP = 0;\r\n var UpubCount30_DP = 0;\r\n var UpubCount35_DP = 0;\r\n var UpubCount40_DP = 0;\r\n var UpubCount40more_DP = 0;\r\n var UnoPubDate_DP = 0;\r\n\r\n var yearlyCaseNames = [];\r\n\r\n //Initialize chart with data and settings\r\n //fill pubDate var with publication dates from case data list\r\n for (var i = 0; i < caseData.length; ++i) {\r\n\r\n //make the date string from the case data list a usable formatted date - see moment.js\r\n var pubDate = moment(new Date(caseData[i].PubDate));\r\n\r\n //fill pubDateYear var with just the years of the publication dates from pubDate\r\n var pubDateYear = pubDate._i.getFullYear();\r\n\r\n //iterate through the data, and if the AY matches the selected year, populate var based on time/ age\r\n //want to consolidate into a different more effecient function - feedback welcome\r\n if (caseData[i].AY == currentYear) {\r\n all++;\r\n yearCount++;\r\n if (pubDateYear >= pastTen) {\r\n lessThanTen ++;\r\n }\r\n if (pubDateYear <= todayYear && pubDateYear >= pastFive ) {\r\n pubCount5++;\r\n }\r\n else if (pubDateYear < pastFive && pubDateYear >= pastTen) {\r\n pubCount10++;\r\n }\r\n else if (pubDateYear < pastTen && pubDateYear >= pastFifteen) {\r\n pubCount15++;\r\n }\r\n else if (pubDateYear < pastFifteen && pubDateYear >= pastTwenty) {\r\n pubCount20++;\r\n }\r\n else if (pubDateYear < pastTwenty && pubDateYear >= pastTwentyFive) {\r\n pubCount25++;\r\n }\r\n else if (pubDateYear < pastTwentyFive && pubDateYear >= pastThirty) {\r\n pubCount30++;\r\n }\r\n else if(pubDateYear < pastThirty && pubDateYear >= pastThirtyFive) {\r\n pubCount35++;\r\n }\r\n else if (pubDateYear < pastThirtyFive && pubDateYear >= pastForty) {\r\n pubCount40++;\r\n }\r\n else if (caseData[i].PubDate == \"00-Jan-1900\") { \r\n noPubDate++;\r\n }\r\n else if (caseData[i].PubDate == \"0\") {\r\n noPubDate++;\r\n }\r\n else if (caseData[i].PubDate ==\"\") {\r\n noPubDate++;\r\n }\r\n else {\r\n pubCount40more++;\r\n }\r\n\r\n //array with records of ay, case title, and pub date in selected AY\r\n yearlyCaseNames.push({caseTitle: caseData[i].CaseTitle, pubDate: caseData[i].PubDate, ay: caseData[i].AY, dept: caseData[i].Department});\r\n \r\n }\r\n }\r\n \r\n //Remove duplicates from the yearlyCaseNames array. Resulting object should be list of unique\r\n //case titles from selected AY with pubdate if applicable \r\n var auxArr = {};\r\n\r\n for ( var i=0, len=yearlyCaseNames.length; i < len; i++ )\r\n auxArr[yearlyCaseNames[i]['caseTitle']] = yearlyCaseNames[i];\r\n\r\n yearlyCaseNames = new Array();\r\n for ( var key in auxArr )\r\n yearlyCaseNames.push(auxArr[key]);\r\n \r\n console.log(\"yearlyCaseNames\");\r\n console.log(yearlyCaseNames);\r\n console.log(\"auxArr\");\r\n console.log(auxArr);\r\n\r\n \r\n\r\n //age tally for full list of uniqe case titles taught in specified AY\r\n for (var i = 0; i < yearlyCaseNames.length; ++i) {\r\n //make the date string from the case data list a usable formatted date - see moment.js\r\n var UpubDate = moment(new Date(yearlyCaseNames[i].pubDate));\r\n\r\n //fill UpubDateYear var with just the years of the publication dates from UpubDate\r\n var UpubDateYear = UpubDate._i.getFullYear();\r\n \r\n yearAll++\r\n\r\n\r\n if (UpubDateYear >= pastTen) {\r\n UlessThanTen ++;\r\n }\r\n if (UpubDateYear <= todayYear && UpubDateYear >= pastFive ) {\r\n UpubCount5++;\r\n }\r\n else if (UpubDateYear < pastFive && UpubDateYear >= pastTen) {\r\n UpubCount10++;\r\n }\r\n else if (UpubDateYear < pastTen && UpubDateYear >= pastFifteen) {\r\n UpubCount15++;\r\n }\r\n else if (UpubDateYear < pastFifteen && UpubDateYear >= pastTwenty) {\r\n UpubCount20++;\r\n }\r\n else if (UpubDateYear < pastTwenty && UpubDateYear >= pastTwentyFive) {\r\n UpubCount25++;\r\n }\r\n else if (UpubDateYear < pastTwentyFive && UpubDateYear >= pastThirty) {\r\n UpubCount30++;\r\n }\r\n else if(UpubDateYear < pastThirty && UpubDateYear >= pastThirtyFive) {\r\n UpubCount35++;\r\n }\r\n else if (UpubDateYear < pastThirtyFive && UpubDateYear >= pastForty) {\r\n UpubCount40++;\r\n }\r\n else if (UpubDateYear == \"00-Jan-1900\") { \r\n UnoPubDate++;\r\n }\r\n else if (UpubDateYear == \"0\") {\r\n UnoPubDate++;\r\n }\r\n else if (UpubDateYear == \"\") {\r\n UnoPubDate++;\r\n }\r\n else if (isNaN(UpubDateYear) == true) {\r\n UnoPubDate++;\r\n }\r\n else {\r\n UpubCount40more++;\r\n }\r\n\r\n //age tally for uniqe case titles taught at Executive Education in specified AY \r\n if (yearlyCaseNames[i].dept == \"Executive Education\") {\r\n\r\n if (UpubDateYear <= todayYear && UpubDateYear >= pastFive ) {\r\n UpubCount5_EE++;\r\n }\r\n else if (UpubDateYear < pastFive && UpubDateYear >= pastTen) {\r\n UpubCount10_EE++;\r\n }\r\n else if (UpubDateYear < pastTen && UpubDateYear >= pastFifteen) {\r\n UpubCount15_EE++;\r\n }\r\n else if (UpubDateYear < pastFifteen && UpubDateYear >= pastTwenty) {\r\n UpubCount20_EE++;\r\n }\r\n else if (UpubDateYear < pastTwenty && UpubDateYear >= pastTwentyFive) {\r\n UpubCount25_EE++;\r\n }\r\n else if (UpubDateYear < pastTwentyFive && UpubDateYear >= pastThirty) {\r\n UpubCount30_EE++;\r\n }\r\n else if(UpubDateYear < pastThirty && UpubDateYear >= pastThirtyFive) {\r\n UpubCount35_EE++;\r\n }\r\n else if (UpubDateYear < pastThirtyFive && UpubDateYear >= pastForty) {\r\n UpubCount40_EE++;\r\n }\r\n else if (UpubDateYear == \"00-Jan-1900\") { \r\n UnoPubDate_EE++;\r\n }\r\n else if (UpubDateYear == \"0\") {\r\n UnoPubDate_EE++;\r\n }\r\n else if (UpubDateYear == \"\") {\r\n UnoPubDate_EE++;\r\n }\r\n else if (isNaN(UpubDateYear) == true) {\r\n UnoPubDate_EE++;\r\n }\r\n else {\r\n UpubCount40more_EE++;\r\n }\r\n } \r\n\r\n //age tally for uniqe case titles taught at Degree Programs in specified AY \r\n if (yearlyCaseNames[i].dept == \"Degree Program\" || yearlyCaseNames[i].dept == \"Degree Programs\") {\r\n\r\n if (UpubDateYear <= todayYear && UpubDateYear >= pastFive ) {\r\n UpubCount5_DP++;\r\n }\r\n else if (UpubDateYear < pastFive && UpubDateYear >= pastTen) {\r\n UpubCount10_DP++;\r\n }\r\n else if (UpubDateYear < pastTen && UpubDateYear >= pastFifteen) {\r\n UpubCount15_DP++;\r\n }\r\n else if (UpubDateYear < pastFifteen && UpubDateYear >= pastTwenty) {\r\n UpubCount20_DP++;\r\n }\r\n else if (UpubDateYear < pastTwenty && UpubDateYear >= pastTwentyFive) {\r\n UpubCount25_DP++;\r\n }\r\n else if (UpubDateYear < pastTwentyFive && UpubDateYear >= pastThirty) {\r\n UpubCount30_DP++;\r\n }\r\n else if(UpubDateYear < pastThirty && UpubDateYear >= pastThirtyFive) {\r\n UpubCount35_DP++;\r\n }\r\n else if (UpubDateYear < pastThirtyFive && UpubDateYear >= pastForty) {\r\n UpubCount40_DP++;\r\n }\r\n else if (UpubDateYear == \"00-Jan-1900\") { \r\n UnoPubDate_DP++;\r\n }\r\n else if (UpubDateYear == \"0\") {\r\n UnoPubDate_DP++;\r\n }\r\n else if (UpubDateYear == \"\") {\r\n UnoPubDate_DP++;\r\n }\r\n else if (isNaN(UpubDateYear) == true) {\r\n UnoPubDate_DP++;\r\n }\r\n else {\r\n UpubCount40more_DP++;\r\n }\r\n }\r\n\r\n\r\n\r\n }\r\n\r\n\r\n\r\n //testing for the counting vars\r\n console.log(\"Cases in 0-5 years: \" + pubCount5);\r\n console.log(\"Cases in 5-10 years: \" + pubCount10);\r\n console.log(\"Cases in 10-15 years: \" + pubCount15);\r\n console.log(\"Cases in 15-20 years: \" + pubCount20);\r\n console.log(\"Cases in 20-25 years: \" + pubCount25);\r\n console.log(\"Cases in 25-30 years: \" + pubCount30);\r\n console.log(\"Cases in 30-35 years: \" + pubCount35);\r\n console.log(\"Cases in 35-40 years: \" + pubCount40);\r\n console.log(\"Cases in 40+ years: \" + pubCount40more);\r\n console.log(\"No pub date: \" + noPubDate);\r\n console.log(\"PUBDATE: \" + pubDate);\r\n\r\n\r\n withData = (all - noPubDate);\r\n console.log(\"all: \" + all);\r\n console.log(\"no pub: \" + noPubDate);\r\n console.log(all);\r\n console.log(\"wiz with: \" + withData);\r\n console.log(\"No pub date: \" + noPubDate);\r\n console.log(\"PUBDATE: \" + pubDate);\r\n console.log(\"past 10:\" + pastTen);\r\n console.log(\"les than:\" + lessThanTen);\r\n\r\n\r\n\r\n\r\n console.log(\"Cases in 0-5 yearsUUUU: \" + UpubCount5);\r\n console.log(\"Cases in 5-10 yearsUUUU: \" + UpubCount10);\r\n console.log(\"Cases in 10-15 yearsUUUU: \" + UpubCount15);\r\n console.log(\"Cases in 15-20 yearsUUUU: \" + UpubCount20);\r\n console.log(\"Cases in 20-25 yearsUUUU: \" + UpubCount25);\r\n console.log(\"Cases in 25-30 yearsUUUU: \" + UpubCount30);\r\n console.log(\"Cases in 30-35 yearsUUUU: \" + UpubCount35);\r\n console.log(\"Cases in 35-40 yearsUUUU: \" + UpubCount40);\r\n console.log(\"Cases in 40+ years: \" + UpubCount40more);\r\n console.log(\"No pub date: \" + UnoPubDate);\r\n console.log(\"UPUBDATE: \" + UpubDate);\r\n\r\n\r\n\r\n console.log(\"Cases in 0-5 yearsUUUU_EE: \" + UpubCount5_EE);\r\n console.log(\"Cases in 5-10 yearsUUUU_EE: \" + UpubCount10_EE);\r\n console.log(\"Cases in 10-15 yearsUUUU_EE: \" + UpubCount15_EE);\r\n console.log(\"Cases in 15-20 yearsUUUU_EE: \" + UpubCount20_EE);\r\n console.log(\"Cases in 20-25 yearsUUUU_EE: \" + UpubCount25_EE);\r\n console.log(\"Cases in 25-30 yearsUUUU_EE: \" + UpubCount30_EE);\r\n console.log(\"Cases in 30-35 yearsUUUU_EE: \" + UpubCount35_EE);\r\n console.log(\"Cases in 35-40 yearsUUUU_EE: \" + UpubCount40_EE);\r\n\r\n console.log(\"Cases in 0-5 yearsUUUU_DP: \" + UpubCount5_DP);\r\n console.log(\"Cases in 5-10 yearsUUUU_DP: \" + UpubCount10_DP);\r\n console.log(\"Cases in 10-15 yearsUUUU_DP: \" + UpubCount15_DP);\r\n console.log(\"Cases in 15-20 yearsUUUU_DP: \" + UpubCount20_DP);\r\n console.log(\"Cases in 20-25 yearsUUUU_DP: \" + UpubCount25_DP);\r\n console.log(\"Cases in 25-30 yearsUUUU_DP: \" + UpubCount30_DP);\r\n console.log(\"Cases in 30-35 yearsUUUU_DP: \" + UpubCount35_DP);\r\n console.log(\"Cases in 35-40 yearsUUUU_DP: \" + UpubCount40_DP);\r\n//chartjs config\r\n\r\n\r\n\r\n\r\n/*****************\r\nBAR CHART - Unique values\r\n*****************/\r\nvar barChartData_Unique = {\r\n labels: [\"0-5 Years\", \"5-10 Years\", \"10-15 Years\", \"15-20 Years\", \"20-25 Years\", \"25-30 Years\", \"30-35 Years\", \"35-40 Years\", \"40 + years\"],\r\n datasets: [\r\n {\r\n fillColor: \"#D55C19\",\r\n data: [UpubCount5, UpubCount10, UpubCount15, UpubCount20, UpubCount25, UpubCount30, UpubCount35, UpubCount40, UpubCount40more]\r\n },\r\n ]\r\n\r\n };\r\n\r\nvar ctx = document.getElementById(\"barCanvasUnique\").getContext(\"2d\");\r\nconsole.log(\"ctxORING: \" + ctx);\r\nvar myLine = new Chart(ctx).Bar(barChartData_Unique, {\r\n showTooltips: false,\r\n scaleOverride : false,\r\n scaleSteps : 10,\r\n scaleStepWidth : 30,\r\n scaleStartValue : 0,\r\n //stacked: true,\r\n onAnimationComplete: function () {\r\n\r\n var ctx = this.chart.ctx;\r\n ctx.font = this.scale.font;\r\n //ctx.fillStyle = this.scale.textColor\r\n ctx.textAlign = \"center\";\r\n ctx.textBaseline = \"bottom\";\r\n\r\n this.datasets.forEach(function (dataset) {\r\n dataset.bars.forEach(function (bars) {\r\n ctx.fillText(bars.value, bars.x, bars.y - 10);\r\n });\r\n })\r\n }\r\n\r\n});\r\n\r\n// ======================================================\r\n// Doughnut Chart 2\r\n// ======================================================\r\n\r\n// Doughnut Chart Options\r\nvar doughnutOptions2 = {\r\n //Boolean - Whether we should show a stroke on each segment\r\n segmentShowStroke : true,\r\n \r\n //String - The colour of each segment stroke\r\n segmentStrokeColor : \"#fff\",\r\n \r\n //Number - The width of each segment stroke\r\n segmentStrokeWidth : 2,\r\n \r\n //The percentage of the chart that we cut out of the middle.\r\n percentageInnerCutout : 50,\r\n \r\n //Boolean - Whether we should animate the chart \r\n animation : true,\r\n \r\n //Number - Amount of animation steps\r\n animationSteps : 50,\r\n \r\n //String - Animation easing effect\r\n animationEasing : \"easeOutBounce\",\r\n \r\n //Boolean - Whether we animate the rotation of the Doughnut\r\n animateRotate : true,\r\n\r\n //Boolean - Whether we animate scaling the Doughnut from the centre\r\n animateScale : true,\r\n \r\n //Function - Will fire on animation completion.\r\n onAnimationComplete : null,\r\n\r\n tooltipTemplate: \"<%= label %> <%= value %>\",\r\n \r\n onAnimationComplete: function()\r\n {\r\n this.showTooltip(this.segments, true);\r\n },\r\n \r\n tooltipEvents: [],\r\n \r\n showTooltips: true\r\n }\r\nvar uAll = yearlyCaseNames.length;\r\nvar uWithPubDate = (uAll - UnoPubDate);\r\n// Doughnut Chart Data\r\nvar doughnutData2 = [\r\n {\r\n value : UnoPubDate,\r\n color : \"#E0E0EB\"\r\n },\r\n {\r\n label: \"w/ Publication Date: \",\r\n value: uWithPubDate,\r\n color:\"#D55C19\"\r\n },\r\n/*\r\nvar doughnutData2 = [\r\n {\r\n value : UmoreThanTen_NOay,\r\n color : \"#E0E0EB\"\r\n },\r\n {\r\n label: \"< 10 Years: \",\r\n value: UlessThanTen_NOay,\r\n color:\"#6A7F10\"\r\n },\r\n*/\r\n]\r\n\r\n//Get the context of the Doughnut Chart canvas element we want to select\r\nvar ctx = document.getElementById(\"pieCanvas2\").getContext(\"2d\");\r\n\r\n// Create the Doughnut Chart\r\nvar mydoughnutChart2 = new Chart(ctx).Doughnut(doughnutData2, doughnutOptions2);\r\n\r\n/*****************\r\n\r\nLINE CHART\r\n\r\n*****************/\r\n$( document ).ready(function() {\r\n\r\nvar lineChartData = {\r\n labels: [\"0-5 Years\", \"5-10 Years\", \"10-15 Years\", \"15-20 Years\", \"20-25 Years\", \"25-30 Years\", \"30-35 Years\", \"35-40 Years\", \"40 + years\"],\r\n \r\n datasets: [{\r\n fillColor: \"transparent\",\r\n pointColor: \"black\",\r\n strokeColor: \"#003946\",\r\n data: [UpubCount5_EE, UpubCount15_EE, UpubCount10_EE, UpubCount20_EE, UpubCount25_EE, UpubCount30_EE, UpubCount35_EE, UpubCount40_EE, UpubCount40more_EE]\r\n \r\n },\r\n {\r\n fillColor: \"transparent\",\r\n pointColor: \"black\",\r\n strokeColor: \"#A71930\",\r\n data: [UpubCount5_DP, UpubCount10_DP, UpubCount15_DP, UpubCount20_DP, UpubCount25_DP, UpubCount30_DP, UpubCount35_DP, UpubCount40_DP, UpubCount40more_DP]\r\n }]\r\n };\r\n\r\nvar ctx = document.getElementById(\"lineCanvas\").getContext(\"2d\");\r\nvar myLine = new Chart(ctx).Line(lineChartData, {\r\n showTooltips: false,\r\n bezierCurve: false,\r\n \r\n onAnimationComplete: function () {\r\n\r\n var ctx = this.chart.ctx;\r\n ctx.font = this.scale.font;\r\n //ctx.fillStyle = this.scale.textColor\r\n ctx.textAlign = \"center\";\r\n ctx.textBaseline = \"bottom\";\r\n\r\n this.datasets.forEach(function (dataset) {\r\n dataset.points.forEach(function (points) {\r\n ctx.fillText(points.value, points.x, points.y - 10);\r\n });\r\n })\r\n },\r\n\r\n\r\n});\r\n\r\n});\r\n\r\n/*****************\r\nBAR CHART - Unique values - DEPT=EE\r\n*****************/\r\nvar barChartData_Unique_EE = {\r\n labels: [\"0-5 Years\", \"5-10 Years\", \"10-15 Years\", \"15-20 Years\", \"20-25 Years\", \"25-30 Years\", \"30-35 Years\", \"35-40 Years\", \"40 + years\"],\r\n datasets: [\r\n {\r\n fillColor: \"red\",\r\n data: [UpubCount5_EE, UpubCount15_EE, UpubCount10_EE, UpubCount20_EE, UpubCount25_EE, UpubCount30_EE, UpubCount35_EE, UpubCount40_EE, UpubCount40more_EE]\r\n },\r\n ]\r\n\r\n };\r\n\r\nvar ctx = document.getElementById(\"barCanvasUniqueEE\").getContext(\"2d\");\r\nconsole.log(\"ctxORING: \" + ctx);\r\nvar myLine = new Chart(ctx).Bar(barChartData_Unique_EE, {\r\n showTooltips: false,\r\n scaleOverride : false,\r\n scaleSteps : 10,\r\n scaleStepWidth : 30,\r\n scaleStartValue : 0,\r\n //stacked: true,\r\n onAnimationComplete: function () {\r\n\r\n var ctx = this.chart.ctx;\r\n ctx.font = this.scale.font;\r\n //ctx.fillStyle = this.scale.textColor\r\n ctx.textAlign = \"center\";\r\n ctx.textBaseline = \"bottom\";\r\n\r\n this.datasets.forEach(function (dataset) {\r\n dataset.bars.forEach(function (bars) {\r\n ctx.fillText(bars.value, bars.x, bars.y - 10);\r\n });\r\n })\r\n }\r\n\r\n});\r\n\r\n\r\n/*****************\r\nBAR CHART - Unique values - DEPT=DP\r\n*****************/\r\nvar barChartData_Unique_DP = {\r\n labels: [\"0-5 Years\", \"5-10 Years\", \"10-15 Years\", \"15-20 Years\", \"20-25 Years\", \"25-30 Years\", \"30-35 Years\", \"35-40 Years\", \"40 + years\"],\r\n datasets: [\r\n {\r\n fillColor: \"green\",\r\n data: [UpubCount5_DP, UpubCount10_DP, UpubCount15_DP, UpubCount20_DP, UpubCount25_DP, UpubCount30_DP, UpubCount35_DP, UpubCount40_DP, UpubCount40more_DP]\r\n },\r\n ]\r\n\r\n };\r\n\r\nvar ctx = document.getElementById(\"barCanvasUniqueDP\").getContext(\"2d\");\r\nconsole.log(\"ctxORING: \" + ctx);\r\nvar myLine = new Chart(ctx).Bar(barChartData_Unique_DP, {\r\n showTooltips: false,\r\n scaleOverride : false,\r\n scaleSteps : 10,\r\n scaleStepWidth : 30,\r\n scaleStartValue : 0,\r\n //stacked: true,\r\n onAnimationComplete: function () {\r\n\r\n var ctx = this.chart.ctx;\r\n ctx.font = this.scale.font;\r\n //ctx.fillStyle = this.scale.textColor\r\n ctx.textAlign = \"center\";\r\n ctx.textBaseline = \"bottom\";\r\n\r\n this.datasets.forEach(function (dataset) {\r\n dataset.bars.forEach(function (bars) {\r\n ctx.fillText(bars.value, bars.x, bars.y - 10);\r\n });\r\n })\r\n }\r\n\r\n});\r\n\r\n\r\n//EMND BAR CHARTS\r\n\r\n\r\n\r\nconsole.log(\"%^%*@%*@%@&*%@*&@%&*@%@^&%@&*@%@&*^%@&*%\");\r\nconsole.log(\"yearAll\" + yearAll);\r\n document.getElementById(\"uCasesAll\").innerHTML = yearAll;\r\n \r\nconsole.log(UlessThanTen);\r\n document.getElementById(\"lessTenAll\").innerHTML = UlessThanTen;\r\n\r\nconsole.log(UnoPubDate);\r\n\r\n document.getElementById(\"noPubAll\").innerHTML = UnoPubDate;\r\n \r\n\r\n}", "function fnOnload(){\n\tsortRows();\n\tsearchRows();\n}", "function compute(){\n var newLocations = locations;\n newLocations.forEach(function(currentValue,currentIndex){\n for(num in currentValue.loc){\n if (num == \"latitude\"){\n var c = currentValue.loc.latitude;\n lat.push(c);\n } else if (num == \"longitude\") {\n var d = currentValue.loc.longitude;\n lon.push(d);\n }\n }\n});\n}", "function calculationLoop() {\n\n function updateTime() {\n updateTimeInToolbar();\n setTimeout(updateTime, 1000);\n }\n setTimeout(updateTime, 1000);\n \t\t\n\t\tfunction calc() {\n\t\t\tcalculate(false);\n\t\t\tsetTimeout(calc, AGSETTINGS.getRefreshTimerInterval());\n\t\t}\n\t\tsetTimeout(calc, AGSETTINGS.getRefreshTimerInterval());\n\t}", "function calcRatio(){\n var nh = 100;\n var nw = 100; \n\n //var ext = v1.split('.').pop();\n //console.log('ext:'+ext);\n //if((ext == 'mp4')||(ext == 'gifv')||(ext == 'webm')){\n // $('.imagescontainer').css({'height':'60vw','width':'90vw'});\n // createflickr();\n //}else{\n var totalImgs = imgs.length;\n //console.log('length: '+totalImgs);\n var imgCount = 0;\n imgs.forEach(function(el,index){\n //console.log(index + ': ' + el);\n loading_gif = new Image();\n loading_gif.src = el;\n\n $(loading_gif).on('load',function () {\n \n imgCount ++;\n allLoaded(true,totalImgs);\n //console.log(loading_gif.src + ' loaded');\n //console.log(imgCount + ' imgcount!'); \n //$('.progress').html(totalImgs/imgCount + '%');\n }).on('error',function () {\n \n imgCount ++;\n allLoaded(true,totalImgs);\n console.log(loading_gif.src + ' won\\'t load');\n });\n });\n var vAll = 0;\n function allLoaded(el,all){\n if(el){\n vAll ++;\n //console.log((vAll/all)*100);\n $('.progress').html('preloading '+Math.round((vAll/all)*100) + '% (click to dismiss)')\n if(vAll == all){\n //console.log('tadaa');\n $('.loading').fadeOut();\n createflickr();\n \n }\n }\n }\n\n }", "function loadComplete() {\n if ($('#abAutoRefresh:checked').length) {\n window.clearTimeout(refreshTimer);\n refreshTimer = window.setTimeout(loadData, config.interval * 1000);\n }\n // Update last update status\n $('#ab_update img').hide();\n $('#abLastUpdate').text((new Date()).toLocaleTimeString());\n }", "function loadaverage() {\n console.log('processing load average');\n var msg = \"Load average:\\n\\n\";\n var min = [1,5,15];\n var i = 0;\n getOid(['1.3.6.1.4.1.2021.10.1.3.1', '1.3.6.1.4.1.2021.10.1.3.2', '1.3.6.1.4.1.2021.10.1.3.3'], function(data) {\n msg += min[i]+\" minute(s): \"+data+\"\\n\";\n if( i == 2)\n {\n bot.sendMessage(getChatId(),msg);\n }\n i = i+1;\n });\n}", "calculate() {\n\treturn this.exercise.calculate(this.weight, this.distance, this.time);\n }", "getResult() {}", "function tddCalculator () {\n const username = $(\"#signup-username\").val();\n\n let bolusGET = $.ajax({\n type: 'GET',\n url: `/logs-bolus/${username}`,\n dataType: 'json',\n contentType: 'application/json'\n }),\n basalGET = $.ajax({\n type: 'GET',\n url: `/logs-basal/${username}`,\n dataType: 'json',\n contentType: 'application/json'\n })\n\n $.when(bolusGET, basalGET).done(function(bolus, basal) {\n console.log(bolus[0]);\n console.log(basal[0]);\n\n //Update average TDD per 24hrs on screen\n\n $('#user-dashboard').hide();\n $('#logs').show();\n }).fail(function (jqXHR, error, errorThrown) {\n console.log(jqXHR, error, errorThrown);\n });\n //TDD calculations?\n let tddBolus = bolus[0].reduce((acc, currentVal, currentIndex) => {\n console.log(acc, currentVal.bolusAmount);\n return acc + currentVal.bolusAmount;\n }, 0)\n console.log(tddBolus);\n let tddBasal = basal[0].reduce((acc, currentVal, currentIndex) => {\n console.log(acc, currentVal.insulinUnits);\n return acc + currentVal.insulinUnits;\n }, 0)\n console.log(tddBasal);\n}", "function graphsLoadCompleteHandler(){\n $engine.log('DASHBOARD > LOADER: '+objloadedArr.length + ' / ' + loadCount)\n if(objloadedArr.length == loadCount){\n $engine.toggleViewLoader(false);\n $('.drilldown-button').show();\n loadCount=0;\n objloadedArr.length = null;\n }\n }", "function onReaderLoad(event){\n \n //PASSING DATA FROM FILE\n mainDataGlobal = JSON.parse(event.target.result);\n //SETTING THE MAXIMUM TIME\n maxTimeGlobal=mainDataGlobal.max_czas_przejazdu;\n\n //VALIDATION OF THE DATA- JSON FILE HAS TO HAVE THIS STRUCTURE\n if(mainDataGlobal.miasta && mainDataGlobal.drogi && mainDataGlobal.max_czas_przejazdu){\n \n //FOR EACH CITY PROGRAM CHECKS THE REACHABLE CITIES \n mainDataGlobal.miasta.forEach(function(obj){\n \n //CITY JSON OBJECT TO MAKE ALGORITHM EASIER\n var city={\n name:\"\",\n hasFirebrigade: \"\",\n reachableCities: [],\n unreachableCities: [],\n reachableFrom:[]\n }\n \n //ASSIGNING VALUES OF CITY NAME AND IF THE CITY HAS A FIRE BRIGADE\n city.name=obj.nazwa;\n city.hasFirebrigade=obj.ma_jednostke;\n \n \n //MAIN PROCESSING ALGORITHM\n if(city.hasFirebrigade){\n mainDataGlobal.drogi.forEach(function(obj){\n if(city.name==obj.miasta[0] || city.name==obj.miasta[1]){\n if(maxTimeGlobal>=obj.czas_przejazdu){\n var support= mainAlgorithmSupport(city,obj,\"reachableCities\");\n if(support[0]){\n city.reachableCities.push(support[1]);\n }\n }else{\n var support= mainAlgorithmSupport(city,obj,\"unreachableCities\");\n if(support[0]){\n city.unreachableCities.push(support[1]);\n }\n }\n }\n });\n }else{\n //THE VARIABLE IS USED FOR CREATING BLACK LIST\n citiesWithoutFirebrigade.push(city.name);\n \n mainDataGlobal.drogi.forEach(function(obj){\n if(city.name==obj.miasta[0] || city.name==obj.miasta[1]){\n if(maxTimeGlobal>=obj.czas_przejazdu){\n var support= mainAlgorithmSupport(city,obj,\"reachableFrom\");\n if(support[0]){\n city.reachableFrom.push(support[1]);\n }\n }\n }\n });\n }\n processedDataGlobal.push(city);\n })\n \n \n //BLACK LIST- CITIES THAT CAN'T BE REACHED FROM ANYWHERE\n processedDataGlobal.forEach(function(obj){\n if(obj.hasFirebrigade){\n obj.reachableCities.forEach(function(obj){\n removeA(citiesWithoutFirebrigade, obj.name);\n })\n }\n })\n blackList=citiesWithoutFirebrigade;\n \n \n //DATA INSERT PANEL FADE OUT\n $('#data-insert').fadeOut(1000);\n \n \n //--------------------------------------------------------------------\n //DATA DISPLAY SECTION START\n \n //DISPLAY THE CRITICAL TIME ON THE WEB PAGE\n $('#time-span')[0].innerHTML=maxTimeGlobal;\n \n //DISPLAY BLACK LIST\n if(blackList.length==0){\n $('#black-list-header').after(\"<div class=\\\"black-list-positive\\\"><p>Good news! Every city, even without fire brigade is save, travel time from other cities is smaller than critical time!</p></div>\" );\n }else{\n $('#black-list-header').after(\"<div class=\\\"black-list-negative\\\"><p>Bad news! These cities have no fire brigade and travel time from another cities exceeds critical time:</p><ul></ul></div>\" );\n blackList.forEach(function(obj){\n $('.black-list-negative ul').append(\"<li>City \\\"\"+obj+\"\\\"</li>\\n\");\n })\n }\n \n //DISPLAY THE CITIES REPORT\n processedDataGlobal.forEach(function(obj,index){\n var hasFirebrigade;\n var temporaryReachableCities=[];\n var temporaryUnreachableCities=[];\n var temporaryReachableFromCities=[];\n var temporaryCityParameter={\n name:\"\",\n time:\"\"\n };\n if(obj.hasFirebrigade==true){\n \n //CITY TITLE\n $('.cities-report').append(\"<div id=\\\"city-\"+obj.name+\"\\\" class=\\\"positive-check\\\"><h3>City\\\"\"+obj.name+\"\\\"</h3></div>\");\n \n //CONFIRMATION THAT CITY IS SAVE\n $('#city-'+obj.name).append(\"<p><i class=\\\"fa fa-check fa-2x\\\" aria-hidden=\\\"true\\\"></i>City is save.</p>\\n\");\n \n //CONFIRMATION THE CITY HAS A FIRE BRIGADE\n $('#city-'+obj.name).append(\"<p><i class=\\\"fa fa-fire-extinguisher fa-2x\\\" aria-hidden=\\\"true\\\"></i>City has a fire brigade</p><hr>\\n\");\n \n if(obj.reachableCities.length!=0){\n $('#city-'+obj.name).append(\"<div id=\\\"reachable-city-\"+(index+1)+\"\\\" class=\\\"cities-positive\\\"><p>Reachable cities from city \\\"\"+obj.name+\"\\\" are:</p><ul id=\\\"reachable-city-list\"+(index+1)+\"\\\"></ul></div>\\n\");\n \n obj.reachableCities.forEach(function(objInner){\n $('#reachable-city-list'+(index+1)).append(\"<li>City \\\"\"+objInner.name+\"\\\" in <span>\"+objInner.time+\"</span> time units</li>\");\n })\n \n }else{\n $('#city-'+obj.name).append(\"<div class=\\\"cities-negative\\\"><p>No reachable cities in such short time!</p></div>\\n\");\n }\n }else{\n if(obj.reachableFrom.length!=0){\n //CITY TITLE\n $('.cities-report').append(\"<div id=\\\"city-\"+obj.name+\"\\\" class=\\\"positive-check\\\"><h3>City \\\"\"+obj.name+\"\\\"</h3></div>\");\n \n //CONFIRMATION THAT CITY IS SAVE\n $('#city-'+obj.name).append(\"<p><i class=\\\"fa fa-check fa-2x\\\" aria-hidden=\\\"true\\\"></i>City is save.</p>\\n\");\n \n //CONFIRMATION THE CITY HAS NO FIRE BRIGADE\n $('#city-'+obj.name).append(\"<p><i class=\\\"fa fa-times fa-2x\\\" aria-hidden=\\\"true\\\"></i>City has no fire brigade</p><hr>\\n\");\n \n $('#city-'+obj.name).append(\"<div id=\\\"reachable-from-city-\"+(index+1)+\"\\\" class=\\\"cities-positive\\\"><p>This city is reachable from cities:</p><ul id=\\\"reachable-from-city-list\"+(index+1)+\"\\\"></ul></div>\\n\");\n obj.reachableFrom.forEach(function(objInner){\n $('#reachable-from-city-list'+(index+1)).append(\"<li>From city \\\"\"+objInner.name+\"\\\" in <span>\"+objInner.time+\"</span> time units</li>\");\n })\n \n }else{\n \n //CITY TITLE\n $('.cities-report').append(\"<div id=\\\"city-\"+obj.name+\"\\\" class=\\\"negative-check\\\"><h3>City \\\"\"+obj.name+\"\\\"</h3></div>\");\n \n //CONFIRMATION THAT CITY IS NOT SAVE\n $('#city-'+obj.name).append(\"<p><i class=\\\"fa fa-times fa-2x\\\" aria-hidden=\\\"true\\\"></i>City is not save.</p>\\n\");\n \n //CONFIRMATION THE CITY HAS NO FIRE BRIGADE\n $('#city-'+obj.name).append(\"<p><i class=\\\"fa fa-times fa-2x\\\" aria-hidden=\\\"true\\\"></i>City has no fire brigade</p><hr>\\n\");\n \n $('#city-'+obj.name).append(\"<div id=\\\"reachable-from-city-\"+(index+1)+\"\\\" class=\\\"cities-negative\\\"><p>DANGER! City is not reachable from anywhere in such short time!</p></div>\\n\");\n }\n }\n \n $('.cities-report').append(\"<hr>\\n\");\n })\n \n //DATA DISPLAY SECTION END\n //--------------------------------------------------------------------\n \n }else{\n //ERROR - WRONG FORMAT\n $('#data-insert-panel h2').after( \"<p>ERROR! <br>YOUR FILE HAS BAD FORMAT. <br>CHECK OUT EXAMPLE FILE \\\"data.json\\\" </p>\" );\n }\n \n}", "function checkLoading() {\n\n\t if(iLoaded == iTotal){\n\n\t $folioItems.each(function(){\n\n\t TweenMax.to($(this)[0], .2, {\n\t opacity: 1,\n\t delay: .2+$(this).index()*.1,\n\t onCompleteScope: $(this), \n\t onComplete: function(){\n\t $(this).removeClass('isotope-hidden');\n\t }\n\t });\n\n\t });\n\n\t $loader.fadeOut(150);\n\n\t }\n\n\t }", "setResultsToLoad() {\n const resultsLoaded = this.page * this.resultsPerPage;\n const resultsRemaining = this.totalResults - resultsLoaded;\n\n this.resultsToLoad = resultsRemaining < this.resultsPerPage\n ? resultsRemaining\n : this.resultsPerPage;\n }", "function main5() {\n csv()\n .fromFile(MATCHES_FILE_PATH)\n .then(matches => {\n let res =totalMatchesCity(matches);\n console.log(\"last\")\n console.log(totalMatchesCity(matches));\n saveTotalMatchesCity(res);\n \n });\n}", "function calculate() {\r\n\teval();\r\n\tstopAll();\r\n}", "getData(page) {\n console.log('Current page is ', page);\n let aTotalActualWeight = 0;\n let aNumRequiredItems = 0;\n let aTotalCubicWeight = 0;\n let aIterationTotal = 0;\n\n this.fetchItems(page).then(result => {\n if (result && result.data && result.data.objects) {\n aIterationTotal = this.state.numItems + result.data.objects.length;\n\n let filteredItems = this.filterItems(result.data.objects);\n\n filteredItems.forEach(function (productSpec) {\n aTotalActualWeight += productSpec.weight;\n aNumRequiredItems++;\n aTotalCubicWeight += this.calculateCubicWeight(productSpec.size);\n }.bind(this));\n this.setState({\n numItems: aIterationTotal,\n totalActualWeight: aTotalActualWeight + this.state.totalActualWeight,\n numRequiredItems: aNumRequiredItems + this.state.numRequiredItems,\n totalCubicWeight: aTotalCubicWeight + this.state.totalCubicWeight,\n currentPage: (result.data.next ? result.data.next : null)\n });\n }\n }).catch(failure => {\n console.debug('Something bad happened talking to AWS', failure);\n });\n }", "function loaded(err, result) {\n if (errors.length) return;\n\n if (err) {\n errors.push({\n msg: err.responseText,\n details: [ t('save.status_code', { code: err.status }) ]\n });\n showErrors();\n\n } else {\n var loadMore = [];\n _.each(result.data, function(entity) {\n remoteGraph.replace(entity);\n toLoad = _.without(toLoad, entity.id);\n\n // Because loadMultiple doesn't download /full like loadEntity,\n // need to also load children that aren't already being checked..\n if (!entity.visible) return;\n if (entity.type === 'way') {\n loadMore.push.apply(loadMore,\n _.difference(entity.nodes, toCheck, toLoad, loadMore));\n } else if (entity.type === 'relation' && entity.isMultipolygon()) {\n loadMore.push.apply(loadMore,\n _.difference(_.map(entity.members, 'id'), toCheck, toLoad, loadMore));\n }\n });\n\n if (loadMore.length) {\n toLoad.push.apply(toLoad, loadMore);\n context.connection().loadMultiple(loadMore, loaded);\n }\n\n if (!toLoad.length) {\n checkConflicts();\n }\n }\n }", "function loadSingleData (results) {\n\t\t\tself.isWaiting = false;\n\t\t\tself.error = null;\n\n\t\t\tself.totalRecordCount = 1;\n\t\t\tself.dataResolvingParams.total(1);\n\n\t\t\tself.data = [];\n\t\t\tself.data.push(results);\n\t\t\tself.defer.resolve(results.data);\n\t\t}", "function loadInc() {\n\tif (state.loading === 0) {\n\t\tele(\"mainProgressBar\").style.display = \"\";\n\t}\n\tstate.loading++;\n}", "function loadData() {\n $scope.loading.inc();\n $scope.selectedComparison = [];\n APIEvalService.getAllAPIs().then(function (apis) {\n $scope.apis = apis;\n }).catch(function (error) {\n console.error(error);\n }).finally(function () {\n $scope.loading.dec();\n });\n }", "function fetchResults() {\n // Backbone fetch for more results from API\n Alloy.Collections.entry.fetch({\n urlparams: {\n \"numResults\":10,\n \"page\":pager.page()\n },\n\n add: true, // Don't reset the collection, but add to it (in theory to prevent setItems and use appendItems...?)\n\n silent: true, // Don't trigger an \"add\" event for every model, but just one \"fetch\" (prevent multiple binding events)\n\n success : function(e) {\n //Ti.API.log(JSON.stringify(e));\n\n // init setMarker of ListView for lazy loading of more entries\n var markerVal = pager.page() * 10 -1; // always 1 less than length of list\n $.lvEntries.setMarker({sectionIndex:0, itemIndex: markerVal });\n\n // Move on pager for next API call\n pager.next();\n\n }, error : function() {\n alert('error');\n }\n });\n}", "function dataLoader_Occ__06(occ, avail, mon, occ_pid_1, avail_pid_1, occ_pid_2, avail_pid_2, occ_pid_all, avail_pid_all, mon_pid_all){\n let c = 0;\n\n if ($('#occ-all-pid').is(':checked') === true){ //Load pid-all OCC data\n \n c=0;\n\n for (let i = 0; i < mon_pid_all.length; i++) {\n occ[i] = occ_pid_all[i];\n avail[i] = avail_pid_all[i];\n mon[i] = mon_pid_all[i];\n }\n c+=1;\n\n occVAvailGraph(occ, mon, avail, c);\n delete ( occ, mon, avail );\n }\n\n $('#occ-all-pid').change(function () {\n if ( $(this).is(':checked')) { //Load pid-all OCC data\n\n c = 0;\n\n document.getElementById('occ-canvas').style.display = 'block';\n \n $('#occ-pid-1').prop('checked', true);\n $('#occ-pid-2').prop('checked', true);\n\n for (let i = 0; i < mon_pid_all.length; i++) {\n occ[i] = occ_pid_all[i];\n avail[i] = avail_pid_all[i];\n mon[i] = mon_pid_all[i];\n }\n\n c+=1;\n\n occVAvailGraph(occ, mon, avail, c);\n delete ( occ, mon, avail );\n\n }else{ //If unchecked, load none\n \n $('#occ-pid-1').prop('checked', false);\n $('#occ-pid-2').prop('checked', false);\n \n //Display none\n let a=[];let b=[];let d=[];let e=[]; \n occVAvailGraph(a, b, d, e, c);\n delete (a, b, d, e, c);\n }\n });\n \n $('#occ-pid-1').change(function () {\n if ( $(this).is(':checked')) {\n c = 0;\n\n if ($('#occ-pid-2').is(':checked') === false) { //if 2 is not checked, load only pid 1 data\n \n $('#occ-all-pid').prop('checked', false);\n $('#occ-pid-2').prop('checked', false);\n \n document.getElementById('occ-canvas').style.display = 'block';\n\n for (let i = 0; i < mon_pid_all.length; i++) {\n occ[i] = occ_pid_1[i];\n avail[i] = avail_pid_1[i];\n mon[i] = mon_pid_all[i];\n }\n c+=1;\n\n occVAvailGraph(occ, mon, avail, c);\n delete ( occ, mon, avail );\n }else{ //if 2 is checked, load pid all data\n\n document.getElementById('occ-canvas').style.display = 'block';\n\n $('#occ-all-pid').prop('checked', true);\n\n for (let i = 0; i < mon_pid_all.length; i++) {\n occ[i] = occ_pid_all[i];\n avail[i] = avail_pid_all[i];\n mon[i] = mon_pid_all[i];\n }\n c+=1;\n \n occVAvailGraph(occ, mon, avail, c);\n delete ( occ, mon, avail );\n }\n \n\n }else{\n c = 0;\n \n if ( ($('#occ-pid-2').is(':checked') === false) && ($('#occ-all-pid').is(':checked') === false) ) {\n c =0;\n //Display none\n let a=[];let b=[];let d=[];let e=[];\n c+=1;\n occVAvailGraph(a, b, d, e, c);\n delete (a, b, d, e, c);\n\n }else if ( $('#occ-pid-2').is(':checked') === true ){ //Load pid 2 data\n c = 0;\n\n $('#occ-all-pid').prop('checked', false);\n \n document.getElementById('occ-canvas').style.display = 'block';\n \n for (let i = 0; i < mon_pid_all.length; i++) {\n occ[i] = occ_pid_2[i];\n avail[i] = avail_pid_2[i];\n mon[i] = mon_pid_all[i];\n }\n c+=1;\n \n occVAvailGraph(occ, mon, avail, c);\n delete (occ, mon, avail);\n }\n\n }\n });\n \n $('#occ-pid-2').change(function () {\n if ( $(this).is(':checked')) {\n c = 0;\n\n if ( $('#occ-pid-1').is(':checked') === false && $('#occ-all-pid').is(':checked') === false ) {\n //Then display only pid 2 data\n c = 0;\n\n document.getElementById('occ-canvas').style.display = 'block';\n \n for (let i = 0; i < mon_pid_all.length; i++) {\n occ[i] = occ_pid_2[i];\n avail[i] = avail_pid_2[i];\n mon[i] = mon_pid_all[i];\n }\n c+=1;\n \n occVAvailGraph(occ, mon, avail, c);\n delete( occ, mon, avail );\n\n }else {\n //Then display pid all data\n\n document.getElementById('occ-canvas').style.display = 'block';\n\n $('#occ-all-pid').prop('checked', true);\n\n for (let i = 0; i < mon_pid_all.length; i++) {\n occ[i] = occ_pid_all[i];\n avail[i] = avail_pid_all[i];\n mon[i] = mon_pid_all[i];\n }\n c+=1;\n \n occVAvailGraph(occ, mon, avail, c);\n delete ( occ, mon, avail );\n }\n\n }else{\n\n if ( $('#occ-pid-1').is(':checked') === false && $('#occ-all-pid').is(':checked') === false ) {\n c =0;\n //Display none\n let a=[];let b=[];let d=[];let e=[];\n c+=1;\n occVAvailGraph(a, b, d, e, c);\n delete (a, b, d, e, c);\n\n }else if ( $('#occ-pid-1').is(':checked') === true ) {\n //Then display pid 1 data\n c = 0;\n $('#occ-all-pid').prop('checked', false);\n\n document.getElementById('occ-canvas').style.display = 'block';\n\n for (let i = 0; i < mon_pid_all.length; i++) {\n occ[i] = occ_pid_1[i];\n avail[i] = avail_pid_1[i];\n mon[i] = mon_pid_all[i];\n }\n c+=1;\n\n occVAvailGraph(occ, mon, avail, c);\n delete ( occ, mon, avail );\n }\n\n }\n });\n\n}", "function dataLoader_Occ__03(occ, avail, mon, occ_pid_1, avail_pid_1, mon_pid_1, occ_pid_2, avail_pid_2, mon_pid_2, occ_pid_all, avail_pid_all, mon_pid_all){\n let c = 0;\n\n if ($('#occ-all-pid').is(':checked') === true){ //Load pid-all OCC data\n \n c=0;\n\n for (let i = 0; i < mon_pid_all.length; i++) {\n occ[i] = occ_pid_all[i];\n avail[i] = avail_pid_all[i];\n mon[i] = mon_pid_all[i];\n }\n c+=1;\n\n occVAvailGraph(occ, mon, avail, c);\n delete ( occ, mon, avail );\n }\n\n $('#occ-all-pid').change(function () {\n if ( $(this).is(':checked')) { //Load pid-all OCC data\n\n c = 0;\n\n document.getElementById('occ-canvas').style.display = 'block';\n \n $('#occ-pid-1').prop('checked', true);\n $('#occ-pid-2').prop('checked', true);\n\n for (let i = 0; i < mon_pid_all.length; i++) {\n occ[i] = occ_pid_all[i];\n avail[i] = avail_pid_all[i];\n mon[i] = mon_pid_all[i];\n }\n\n c+=1;\n\n occVAvailGraph(occ, mon, avail, c);\n delete ( occ, mon, avail );\n\n }else{ //If unchecked, load none\n \n $('#occ-pid-1').prop('checked', false);\n $('#occ-pid-2').prop('checked', false);\n \n //Display none\n let a=[];let b=[];let d=[];let e=[]; \n occVAvailGraph(a, b, d, e, c);\n delete (a, b, d, e, c);\n }\n });\n \n $('#occ-pid-1').change(function () {\n if ( $(this).is(':checked')) {\n c = 0;\n\n if ($('#occ-pid-2').is(':checked') === false) { //if 2 is not checked, load only pid 1 data\n \n $('#occ-all-pid').prop('checked', false);\n $('#occ-pid-2').prop('checked', false);\n \n document.getElementById('occ-canvas').style.display = 'block';\n\n for (let i = 0; i < mon_pid_all.length; i++) {\n occ[i] = occ_pid_1[i];\n avail[i] = avail_pid_1[i];\n mon[i] = mon_pid_all[i];\n }\n c+=1;\n\n occVAvailGraph(occ, mon, avail, c);\n delete ( occ, mon, avail );\n }else{ //if 2 is checked, load pid all data\n\n document.getElementById('occ-canvas').style.display = 'block';\n\n $('#occ-all-pid').prop('checked', true);\n\n for (let i = 0; i < mon_pid_all.length; i++) {\n occ[i] = occ_pid_all[i];\n avail[i] = avail_pid_all[i];\n mon[i] = mon_pid_all[i];\n }\n c+=1;\n \n occVAvailGraph(occ, mon, avail, c);\n delete ( occ, mon, avail );\n }\n \n\n }else{\n c = 0;\n \n if ( ($('#occ-pid-2').is(':checked') === false) && ($('#occ-all-pid').is(':checked') === false) ) {\n c =0;\n //Display none\n let a=[];let b=[];let d=[];let e=[];\n c+=1;\n occVAvailGraph(a, b, d, e, c);\n delete (a, b, d, e, c);\n\n }else if ( $('#occ-pid-2').is(':checked') === true ){ //Load pid 2 data\n c = 0;\n\n $('#occ-all-pid').prop('checked', false);\n \n document.getElementById('occ-canvas').style.display = 'block';\n \n for (let i = 0; i < mon_pid_all.length; i++) {\n occ[i] = occ_pid_2[i];\n avail[i] = avail_pid_2[i];\n mon[i] = mon_pid_all[i];\n }\n c+=1;\n \n occVAvailGraph(occ, mon, avail, c);\n delete (occ, mon, avail);\n }\n\n }\n });\n \n $('#occ-pid-2').change(function () {\n if ( $(this).is(':checked')) {\n c = 0;\n\n if ( $('#occ-pid-1').is(':checked') === false && $('#occ-all-pid').is(':checked') === false ) {\n //Then display only pid 2 data\n c = 0;\n\n document.getElementById('occ-canvas').style.display = 'block';\n \n for (let i = 0; i < mon_pid_all.length; i++) {\n occ[i] = occ_pid_2[i];\n avail[i] = avail_pid_2[i];\n mon[i] = mon_pid_all[i];\n }\n c+=1;\n \n occVAvailGraph(occ, mon, avail, c);\n delete( occ, mon, avail );\n\n }else {\n //Then display pid all data\n\n document.getElementById('occ-canvas').style.display = 'block';\n\n $('#occ-all-pid').prop('checked', true);\n\n for (let i = 0; i < mon_pid_all.length; i++) {\n occ[i] = occ_pid_all[i];\n avail[i] = avail_pid_all[i];\n mon[i] = mon_pid_all[i];\n }\n c+=1;\n \n occVAvailGraph(occ, mon, avail, c);\n delete ( occ, mon, avail );\n }\n\n }else{\n\n if ( $('#occ-pid-1').is(':checked') === false && $('#occ-all-pid').is(':checked') === false ) {\n c =0;\n //Display none\n let a=[];let b=[];let d=[];let e=[];\n c+=1;\n occVAvailGraph(a, b, d, e, c);\n delete (a, b, d, e, c);\n\n }else if ( $('#occ-pid-1').is(':checked') === true ) {\n //Then display pid 1 data\n c = 0;\n $('#occ-all-pid').prop('checked', false);\n\n document.getElementById('occ-canvas').style.display = 'block';\n\n for (let i = 0; i < mon_pid_all.length; i++) {\n occ[i] = occ_pid_1[i];\n avail[i] = avail_pid_1[i];\n mon[i] = mon_pid_all[i];\n }\n c+=1;\n\n occVAvailGraph(occ, mon, avail, c);\n delete ( occ, mon, avail );\n }\n\n }\n });\n\n}", "function finalResults() {\n allImages.sort(function (a, b) {\n return b.clicks - a.clicks;\n });\n drawChart();\n saveStatsToLocalStorage(imageClicks);\n}" ]
[ "0.6200246", "0.609149", "0.599732", "0.5809741", "0.57185394", "0.56791586", "0.56481415", "0.56407535", "0.562759", "0.5609229", "0.559741", "0.5574983", "0.5541299", "0.55378187", "0.5537791", "0.55166173", "0.55135787", "0.549209", "0.54906905", "0.54644746", "0.5454024", "0.54479146", "0.54332596", "0.5431088", "0.54274964", "0.5403299", "0.54018444", "0.5401288", "0.53895277", "0.53835917", "0.5375515", "0.5368409", "0.53581166", "0.53458965", "0.53422064", "0.5334989", "0.5328652", "0.5325977", "0.5322771", "0.53189975", "0.5305187", "0.530024", "0.52990437", "0.52990437", "0.52954453", "0.5295407", "0.52947134", "0.527082", "0.5268023", "0.5260456", "0.52568716", "0.5253567", "0.5252739", "0.52483076", "0.52457243", "0.5231032", "0.5224647", "0.5208881", "0.52077746", "0.5207197", "0.5206965", "0.51989037", "0.51989037", "0.5196407", "0.5182041", "0.51816165", "0.5173896", "0.5171545", "0.5156866", "0.5154324", "0.5152799", "0.51524585", "0.5142926", "0.5141841", "0.51340175", "0.51308596", "0.5128103", "0.5119936", "0.5119369", "0.51130223", "0.51082945", "0.51077604", "0.5107178", "0.51069796", "0.51053154", "0.5101638", "0.5095649", "0.50926167", "0.50919133", "0.50912815", "0.5091247", "0.50902313", "0.5085153", "0.50829023", "0.5080922", "0.5078691", "0.5078397", "0.50733835", "0.5070045", "0.5067664", "0.5062443" ]
0.0
-1
============================================== ================================================================================== Once the calc is complete put the results on the UI. ==================================================================================
function onCalcComplete() { //////////////////////////////// //Display Results //////////////////////////////// //The data on the map screen. setImpactValues(dataProvider.getDgOutputs()); //The inputValues setInputValues(dataProvider.getDgInputs()); //The damage table setDamage(dataProvider.getTxtDamage()); //Set Impact Energy Table setEnergyValues(dataProvider.getDgEnergy()); //Get the what happenes to the impactor text. setImpactorText(dataProvider.getTxtImpactor()); // get fireball dats. setFireballSeen(dataProvider.getDgFirevall()); drawScale(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calcResults() {\n\t\trbAge.innerText = parseInt(currentAge)+parseInt(yearsToRetirement);\n\t\trbIncome.innerText = rawNestAmount*targetRetirementIncomePercentage;\n\t\trbInterest.innerText = (rawNestAmount-(rawNestAmount*targetRetirementIncomePercentage))*targetInterestRateToNest;\n\t\trbBalance.innerText = (rawNestAmount-(rawNestAmount*targetRetirementIncomePercentage))+(rawNestAmount-(rawNestAmount*targetRetirementIncomePercentage))*targetInterestRateToNest;\n\t}", "function calculateResults() {\n document.getElementById('answer').style.display = 'block';\n\n document.getElementById('loading').style.display = 'none';\n\n document.getElementById('calc').style.display = 'none';\n\n inputProgress.style.display = 'none';\n progress.style.display = 'none';\n var showTable = document.getElementById('table');\n showTable.classList.remove('invisible');\n\n caclRiskProfile();\n}", "function CalculateResults()\r\n {\r\n var inputsAllValid;\r\n\r\n // Fetch all input values from the on-screen form.\r\n\r\n inputsAllValid = FetchInputValues();\r\n\r\n // If the fetched input values are all valid...\r\n\r\n if (inputsAllValid)\r\n {\r\n // Do the natural gas pressure loss calculation.\r\n\r\n DoCalculation();\r\n\r\n // Display the results of the calculation.\r\n\r\n DisplayResults();\r\n }\r\n }", "function calculateResults() {\n //UI vars\n const height = document.querySelector('#height').value;\n const weight = document.querySelector('#weight').value;\n const age = document.querySelector('#age').value;\n const sex = document.querySelector('#sex').value;\n const activity = document.querySelector('#activity').value;\n\n //Output vars\n const dailyCalorieRequirements = document.querySelector('#dailyCalorie');\n const daliyProteinIntake = document.querySelector('#dailyProtein');\n const dailyCarbsIntake = document.querySelector('#dailyCarbs');\n const dailyFatIntake = document.querySelector('#dailyFat');\n\n //calculating basal metabolic rate\n const bmr = ((10 * weight) + (6.25 * height) - (5 * age)) + parseFloat(sex);\n \n if (isFinite(bmr)) {\n let dailyCalorie = bmr * parseFloat(activity);\n dailyCalorieRequirements.value = Math.round(dailyCalorie);\n daliyProteinIntake.value = getAmountOfMacronutrient(dailyCalorieRequirements.value, 25, 'p');\n dailyCarbsIntake.value = getAmountOfMacronutrient(dailyCalorieRequirements.value, 35, 'c');\n dailyFatIntake.value = getAmountOfMacronutrient(dailyCalorieRequirements.value, 40, 'f');\n displayResults();\n hideLoading();\n displayMacrosRatioChart();\n } else {\n showError('Please check your numbers');\n }\n}", "function calculateResults() {\n return;\n}", "refreshResult() {\r\n if(this.validateForm()) {\r\n let bill = +(this.getInputVal(this.inputBill));\r\n let people = +(this.getInputVal(this.inputPeople));\r\n let perc = +(this.getInputVal(this.inputCustom) || \r\n this.percentageBtns.filter(btn => btn.classList.contains(\"active\"))[0].value);\r\n\r\n if(people === 0) return;\r\n\r\n this.errorStyles(\"remove\");\r\n let tip = (bill * (perc / 100));\r\n let tipPerPerson = (tip / people).toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2});\r\n let total = ((bill + tip) / people).toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2});\r\n\r\n this.displayResult(tipPerPerson, total);\r\n }\r\n else {\r\n return ;\r\n }\r\n }", "function calculate() {\n\t\tvar servings = 0;\n\t\tvar standardDrinks = 0;\n\t\tvar calories = 0;\n\n\t\t$('.calculator-carousel .single-drink').each(function(){\n\t\t\tvar currentDrinkType = $(this).data('drinktypes').split(',')[$(this).data('currenttype')].split('|');\n\t\t\tservings += $(this).data('quantity');\n\t\t\tstandardDrinks += $(this).data('quantity') * (currentDrinkType[2] / 1000) * drinkDefinitions[currentDrinkType[1]]['abv'] * 0.789;\n\t\t\tcalories += $(this).data('quantity') * (currentDrinkType[2] / 100) * drinkDefinitions[currentDrinkType[1]]['calories'];\n\t\t\t//Only render if the values change\n\t\t\tvar renderId = String(servings) + \",\" + String(standardDrinks) + \",\" + String(calories);\n\t\t\tif (renderId != calculationId) {\t\t\t\n\t\t\t\t\n\t\t\t\trenderResults(servings, standardDrinks, calories);\n\t\t\t}\n\t\t\tcalculationId = renderId;\n\t\t});\n\t}", "function calculate() {\n secondNumber = resultDisplay.innerText;\n let result = calculateResult(firstNumber, secondNumber, operatorSymbol);\n changeDisplay(result);\n // This allows the user to keep calculating after a result\n firstNumber = result;\n}", "function calculate() {\n\n calculator.calculate();\n\n }", "function calculateResults() {\n\ttry {\n\t\tvar x = getUserInput();\n //if user input results in error, the error will be presented on the html.\n //e is the event.\n\t} catch(e) {\n\t\talert(\"Error: \" + e);\n\t\treturn;\n\t}\n //This will keep from displaying the same answer over and over if the calculate\n //button is clicked; without setDefaultText() the calculate button will keep\n //appending the same answer indefinitely.\n\tsetDefaultText();\n\n\tfor (var i = 0; i < resultElements.length; i++) {\n\t\tvar element = resultElements[i];\n //functionName looks for the function attribute in the html\n var functionName = element.getAttribute('function');\n //func invokes the Math function and is defined the function tag\n //accessed by the functionName funtion above\n\t\tvar func = Math[functionName];\n //The results are rendered based on the user input\n\t\tvar result = func(x);\n //The user input is captured here and input is evaluated and the results\n //added to the respective functions in the html - sin/cons/tan/log\n\t\telement.innerText = element.innerText + \" \" + result;\n\n\t}\n\n}", "function RunCalculation() {\n\t\n\ttry {\n\t\tvar results = calculator.calculateTax({\n\t\t\t'number_of_exemptions': $('#number_of_exemptions_value').val(),\n\t\t\t'amount_of_income_taxable_by_the_city': $('#amount_of_income_taxable_by_the_city_value').val(),\n\t\t\t'taxable_value_of_your_home': $('#taxable_value_of_your_home_value').val()\n\t\t});\n\n\t\t// Transfer results to output fields.\n\t\tfor (var prop in results) {\n\t\t\tsetOutput(prop + '_output', results[prop]);\n\t\t}\n\t\t// Clear errors.\n\t\tshowError(false);\n\t} catch (e) {\n\t\t// Show errors that were thrown.\n\t\tshowError(e);\n\t}\n}", "function refreshResult() {\n\n //console.log(\"start refresh\");\n\tengine.initialize();\n\t//console.log(\"must start moms\");\n\tengine.interpol();\n\tengine.gearInitialize();\n\tengine.drawMomentum();\n\tengine.drawGears();\n\t\n\t$(\"#resTable1\").html(engine.findCross());\n\t$(\"#resTable2\").html(engine.findCross2());\n\t\n} // refreshResult", "function rerunCalculation() {\n let calcIndex = $(this).data().index;\n calcDisplay = $('#calc-display-text');\n $(this).css('color', '#00a59a'); \n $(this).siblings().css('color', 'black');\n \n $.ajax({\n method: 'GET',\n url: '/get-calculation'\n }).then(function (response) {\n calcDisplay.empty();\n let calcTotalParsed = parseFloat(response[calcIndex].calcTotal.toFixed(2));\n calcDisplay.append(`${calcTotalParsed}`);\n })\n}", "function displayResult(result) {\n output.textContent = result;\n calculationIsDone = true;\n}", "function getResult() {\n console.log(\"getResult ran\");\n wrong = total - correct;\n $(\"#end_total_right b\").text(correct);\n $(\"#end_total_wrong b\").text(wrong);\n var answer_percent = correct / total;\n if (answer_percent >= 0.67) {\n $(\"#end\").prepend(responses[0]);\n } else if (answer_percent >= 0.34) {\n $(\"#end\").prepend(responses[1]);\n } else {\n $(\"#end\").prepend(responses[2]);\n }\n }", "function showResults() {\r\n // make sure the calculation is correct.\r\n step = 6;\r\n calculateCompletion();\r\n previousAction = actions.activityTaxStep;\r\n nextAction = \"\";\r\n\r\n if (parseboolean(registrations.isTFN)) {\r\n $('#resultTable tr:last').after(getResult(\"Tax File Number (TFN)\", \"tfn\", true, \"\", \"Free\", 1));\r\n }\r\n if (parseboolean(registrations.isCompany)) {\r\n $('#resultTable tr:last').after(getResult(\"Company\", \"co\", true, \"\", \"up to $463 for 1 year\", 2));\r\n }\r\n if (parseboolean(registrations.isBusinessName)) {\r\n $('#resultTable tr:last').after(getResult(\"Business name\", \"bn\", true, \"\", \"$34 for 1 year or $79 for 3 years\", 3));\r\n }\r\n if (parseboolean(registrations.isPAYG)) {\r\n $('#resultTable tr:last').after(getResult(\"Pay As You Go (PAYG) Withholding\", \"payg\", true, \"\", \"Free\", 4));\r\n }\r\n if (parseboolean(registrations.isFBT)) {\r\n $('#resultTable tr:last').after(getResult(\"Fringe Benefits Tax (FBT)\", \"fbt\", true, \"\", \"Free\", 5));\r\n }\r\n var needGST = (parseboolean(applicationType.taxi) || parseboolean(applicationType.turnOver75k) || parseboolean(applicationType.limo));\r\n if (needGST) {\r\n $('#resultTable tr:last').after(getResult(\"Goods &amp; Services Tax (GST)\", \"gst\", true, \"\", \"Free\", 6));\r\n }\r\n if (parseboolean(registrations.isLCT) && needGST) {\r\n $('#resultTable tr:last').after(getResult(\"Luxury Car Tax (LCT)\", \"lct\", true, \"\", \"Free\", 7));\r\n }\r\n if (parseboolean(registrations.isFTC) && needGST) {\r\n $('#resultTable tr:last').after(getResult(\"Fuel Tax Credits (FTC)\", \"ftc\", true, \"\", \"Free\", 8));\r\n }\r\n if (parseboolean(registrations.isWET) && needGST) {\r\n $('#resultTable tr:last').after(getResult(\"Wine Equalisation Tax (WET)\", \"wet\", true, \"\", \"Free\", 9));\r\n }\r\n if (!needGST) {\r\n $(\"#gstRecommend\").show();\r\n $(\"#ckGstRecommend\").click(function () {\r\n if ($(this).prop('checked')) {\r\n $(\"#lctOptional\").prop('checked', true);\r\n $(\"#wetOptional\").prop('checked', true);\r\n $(\"#ftcOptional\").prop('checked', true);\r\n\r\n }\r\n else {\r\n $(\"#lctOptional\").prop('checked', false);\r\n $(\"#wetOptional\").prop('checked', false);\r\n $(\"#ftcOptional\").prop('checked', false);\r\n }\r\n });\r\n\r\n if (parseboolean(registrations.isLCT)) {\r\n $(\"#lctOptionalRow\").show();\r\n $(\"#lctOptional\").click(function () {\r\n if ($(this).prop('checked')) {\r\n $(\"#ckGstRecommend\").prop('checked', true);\r\n }\r\n });\r\n }\r\n if (parseboolean(registrations.isWET)) {\r\n $(\"#wetOptionalRow\").show();\r\n $(\"#wetOptional\").click(function () {\r\n if ($(this).prop('checked')) {\r\n $(\"#ckGstRecommend\").prop('checked', true);\r\n }\r\n });\r\n }\r\n if (parseboolean(registrations.isFTC)) {\r\n $(\"#ftcOptionalRow\").show();\r\n $(\"#ftcOptional\").click(function () {\r\n if ($(this).prop('checked')) {\r\n $(\"#ckGstRecommend\").prop('checked', true);\r\n }\r\n });\r\n }\r\n }\r\n \r\n setTimeout(showRegistrationsHelpContent, 1);\r\n\r\n}", "function calculateResult() {\n\t//var fuel = getFuel();\n\t//var dist = getDistance();\n\t//var efficiency = 0;\n\t//var dist2 = 26.69/2.65;\n\t//efficiency = fuel / dist2;\n\tvar efficiency = getFuel() / (getDistance() / 100);\n\t//var efficiency = 3 + 5;\n\t\n\t//display the result\n\tdocument.getElementById('result').innerHTML = \"Fuel Efficiency is \" + efficiency + \" L/100km\";\n\t//var divobj - document.getElementById('result');\n\t//divobj.style.display='block';\n\t//divobj.innerHTML = \"Fuel Efficiency is \" + efficiency + \" L/100km\";\n}", "function calculate_results() {\n let e_val = 20 + r[0] - r[5] + r[10] - r[15] + r[20] - r[25] + r[30] - r[35] + r[40] - r[45];\n let a_val = 14 - r[1] + r[6] - r[11] + r[16] - r[21] + r[26] - r[31] + r[36] + r[41] + r[46];\n let c_val = 14 + r[2] - r[7] + r[12] - r[17] + r[22] - r[27] + r[32] - r[37] + r[42] + r[47];\n let n_val = 38 - r[3] + r[8] - r[13] + r[18] - r[23] - r[28] - r[33] - r[38] - r[43] - r[48];\n let o_val = 8 + r[4] - r[9] + r[14] - r[19] + r[24] - r[29] + r[34] + r[39] + r[44] + r[49];\n\n o_val = Math.round((o_val/40)*100);\n c_val = Math.round((c_val/40)*100);\n e_val = Math.round((e_val/40)*100);\n a_val = Math.round((a_val/40)*100);\n n_val = Math.round((n_val/40)*100);\n\n console.log(e_val + \" \" + a_val + \" \" + c_val + \" \" + n_val + \" \" + o_val);\n\n save_results(e_val, a_val, c_val, n_val, o_val);\n}", "async calculateResults() {\n var that = this;\n var reelsPositions = {\n top: [],\n middle: [],\n bottom: []\n };\n this.reels.map(reel => {\n var currentReelPositions = reel.getCurrentPositions();\n $.each(currentReelPositions, function(position, value) {\n reelsPositions[position].push(value);\n });\n })\n\n var combinations = this.checkCombinations(reelsPositions);\n return Promise.all(combinations.map(win => {\n that.blinkLines(win.line, 5);\n that.blinkPayTable(win.symbol, 5);\n that.balance += win.value;\n })).then(() => this.updateBalanceBox());\n }", "function calculateResults(){\n// console.log('calculating.....');\n\n// UI variables\n// amount variable\nconst amount = document.getElementById('amount');\n// interest rate variable\nconst interest = document.getElementById('interest');\n// years to pay\nconst years = document.getElementById('years');\n// monthly payment\nconst monthlyPayment = document.getElementById('monthly-payment');\n// total payment\nconst totalPayment = document.getElementById('total-payment');\n// total interest\nconst totalInterest = document.getElementById('total-interest')\n\nconst principal = parseFloat(amount.value);\nconst calculatedInterest = parseFloat(interest.value)/100/12;\nconst calculatedPayments = parseFloat(years.value)*12;\n\n// compute monthly payment\nconst x = Math.pow(1 + calculatedInterest , calculatedPayments);\nconst monthly = (principal*x*calculatedInterest)/(x-1);\n\n\n// hide the loading image\ndocument.getElementById('loading').style.display = 'none'\n\n\nif (isFinite(monthly)){\n\n// show results\ndocument.getElementById('result').style.display = 'block';\n\n// show the reset all button\ndocument.querySelector('div.reset').style.display = 'block'\n\ndocument.querySelector('div.reset input#resetAll').addEventListener('dblclick', resetAll);\n\n monthlyPayment.value = monthly.toFixed(2);\n totalPayment.value = (monthly*calculatedPayments).toFixed(2);\n totalInterest.value = ((monthly*calculatedPayments)-principal).toFixed(2);\n}else {\nshowError('please check your numbers')\n}\n\n}", "function useResult() {\n updateFormula(function() {\n return resultDisplay.text();\n }, true);\n }", "results() {\n\n // After the round is finished:\n // Footer with big bubbles slides up.\n this.moveFooterBubbles('up');\n // Upper bar slides up.\n document.querySelector('#upper-bar').style = \"top: -100px;\";\n \n // Main menu is shown again.\n this.mainMenu.style = \"display: flex;\";\n \n // Circle counter - background color of the circles (green/red)\n // is cleared and background is set to transparent again.\n Array.from(this.upperBarCounterCircles.children).forEach((c) => {c.style = \"background-color: transparent;\"});\n \n // Saving information about score and points for subsequent showing in the result list.\n this.hitNumberResult = Math.floor(this.i * this.difficultyScore * this.coeff); //zde menim\n this.scoreResult = this.i.toString() + \"/10\";\n\n let novyObjekt = new Results(this.resolutionResult, this.hitNumberResult, this.difficultyResult, this.scoreResult); \n \n // Displaying the round results in the main menu.\n this.mainMenu.children[1].innerHTML = `Targets shot<br> ${this.i.toString()}/10`; \n this.mainMenu.children[2].innerHTML = `Total points<br> ${(Math.floor(this.i * this.difficultyScore * this.coeff)).toString()}`; //zde menim\n }", "function calculate(){}", "function display_results(val){\n\n var i,data,metadata,tmp;\n var n=val.component_vectors[0].length;\n if (n>10) n=10;\n \n //principal components\n data=[];\n for (i=0;i<val.component_vectors.length;i++){\n tmp=val.component_vectors[i].slice(0,n);\n tmp.unshift(val.times[i]);\n data.push({values: tmp});\n }\n eg_pc.load({data: data});\n eg_pc.renderGrid(\"tablecontent_pc\", \"table table-hover\");\n \n //loadings\n metadata=[ {name:'desc', label:'Description', datatype:'string', editable:'false'},\n {name:'expl', label:'Expl. Power', datatype:'double(%,2)', editable:'false'} ];\n \n for (i=0;i<val.headers.length;i++){\n tmp={name:val.headers[i], label:val.headers[i], datatype:'double(%,4)', editable:'true'}\n metadata.push(tmp);\n }\n data=[];\n for (i=0;i<n;i++){\n tmp=val.loadings[i].slice();\n tmp.unshift(val.rel_variances[i]*100);\n tmp.unshift(\"Comp \" + (i+1));\n data.push({values: tmp});\n } \n eg_loadings.load({data: data, metadata:metadata});\n eg_loadings.renderGrid(\"tablecontent_loadings\", \"table table-hover\");\n \n //scenarios\n //data for editable grid\n metadata=[ {name:'desc', label:'Description', datatype:'string', editable:'false'} ];\n \n //data for papa parse (export functionality)\n fields=[ \"Description\" ];\n var export_data=[];\n \n for (i=0;i<val.headers.length;i++){\n tmp={name:val.headers[i], label:val.headers[i], datatype:'double(%,4)', editable:'true'}\n metadata.push(tmp);\n fields.push(val.headers[i]);\n }\n data=[];\n\n var lab;\n for (i=0;i<val.scenarios.length;i++){\n tmp=val.scenarios[i].slice();\n lab=((i % 2) != 0) ? \"Comp \" + ((i+1)/2) + \" down\" : \"Comp \" + (i/2+1) + \" up\"\n tmp.unshift(lab);\n data.push({values: tmp});\n export_data.push(tmp);\n } \n eg_scenarios.load({data: data,metadata:metadata});\n eg_scenarios.renderGrid(\"tablecontent_scenarios\", \"table table-hover\");\n\n // make data available for export function, Papa.unparse needs object with entries \"data\" and \"fields\"\n g_scenarios= {data: export_data,fields:fields};\n\n update_chart(val);\n}", "function calculationLoop() {\n\n function updateTime() {\n updateTimeInToolbar();\n setTimeout(updateTime, 1000);\n }\n setTimeout(updateTime, 1000);\n \t\t\n\t\tfunction calc() {\n\t\t\tcalculate(false);\n\t\t\tsetTimeout(calc, AGSETTINGS.getRefreshTimerInterval());\n\t\t}\n\t\tsetTimeout(calc, AGSETTINGS.getRefreshTimerInterval());\n\t}", "function calculateResult() {\n return function () {\n changeDivideMultiply();\n screenResult.innerHTML = eval(screenResult.innerHTML);\n };\n }", "function computeResult() {\n const equals = document.querySelector(\"#equals\");\n equals.classList.add(\"clicked\");\n // convert CSV list to array of numbers\n const numbers = display.dataset.numbers.split(',').splice(1).map(str => Number(str));\n // remove leading comma and convert to array\n const operators = display.dataset.operators.split(',').splice(1);\n const currentNumber = Number(display.textContent);\n\n if(operators.length === 0) {\n return; // do nothing\n }\n\n // keep operating until only 1 number is saved\n while(numbers.length > 1){\n let x = numbers.shift();\n let y = numbers[0];\n numbers[0] = operate(operators.shift(), x, y);\n }\n\n // ensure the display is rounded to 5 decimals\n const result = operate(operators.shift(), numbers.shift(), currentNumber);\n let strResult = result.toString();\n if (result === Infinity) {\n strResult = \"Divided by 0!\";\n } else if (strResult.length > 5) {\n // round to 5 decimal places\n strResult = (Math.round(result*100000)/100000).toString();\n }\n\n display.classList.add(\"clear\");\n display.dataset.numbers = \"\";\n display.dataset.operators = \"\";\n display.textContent = strResult;\n}", "function computeValues(){\n //Removes loading\n open();\n checkReady()\n\n}", "function result() {\r\n\r\n \tlet entry1 = '';\r\n \t\r\n\r\n \tswitch (operation) {\r\n \t\tcase 1 : \r\n \t\tentry1 = `${operande} + ${output.value} = `\r\n \t\toutput.value = parseFloat(operande) + parseFloat(output.value);\r\n \t\tentry1 += output.value\r\n \t\tbreak;\r\n\r\n \t\tcase 2 : \r\n \t\tentry1 = `${operande} - ${output.value} = `\r\n \t\toutput.value = operande - output.value;\r\n \t\tentry1 += output.value\r\n \t\tbreak;\r\n\r\n \t\tcase 3 :\r\n \t\tentry1 = `${operande} * ${output.value} = ` \r\n \t\toutput.value = operande * output.value;\r\n \t\tentry1 += output.value\r\n \t\tbreak;\r\n\r\n \t\tcase 4 : \r\n \t\tentry1 = `${operande} / ${output.value} = `\r\n \t\toutput.value = operande / output.value;\r\n \t\tentry1 += output.value\r\n \t\tbreak;\r\n\r\n \t}\r\n\t\r\n\toutput_history.innerHTML = `<li>${history}</li>`;\r\n\thistory.push(entry1);\r\n \tdisplayHistory(history);\r\n\r\n \toutput.value = 0;\r\n \toperande = 0;\r\n\r\n }", "function refresh() {\n display.innerText = currentCalculation;\n}", "function getComputation() {\n $.ajax({\n type: 'GET',\n url: '/math/',\n success: function (amount) {\n clearInfo();\n MathForm.total = amount;\n $('#x').val(MathForm.total);\n MathForm.x = '';\n },\n });\n}", "function standardCalculations() {\n // 1. has been populated for the first time, mark default checkboxes\n const perPhone = $( '#perPhone' ).prop('checked');\n const perPhoneLongDistance = $( '#perPhoneLongDistance' ).prop('checked');\n if (isCheckboxOff('#perPhone') && isCheckboxOff('#allPhones')) {\n $( '#perPhone' ).prop('checked', true);\n }\n if (isCheckboxOff('#perPhoneLongDistance') && isCheckboxOff('#allPhonesLongDistance')) {\n $( '#perPhoneLongDistance' ).prop('checked', true);\n }\n\n const plansCount = parseInt($( '#plansCount' ).val().replace(/,/g, ''));\n const monthlyPayment = valueOf('#monthlyPayment');\n const longDistance = valueOf('#longDistance');\n\n let monthlyExpense = 0;\n monthlyExpense += perPhone ? plansCount * monthlyPayment : monthlyPayment\n monthlyExpense += perPhoneLongDistance ? plansCount * longDistance : longDistance\n\n $( '#monthlyExpense' ).text(`$ ${addCommas(monthlyExpense)}`);\n $( '#yearlyExpense' ).text(`$ ${addCommas(12 * monthlyExpense)}`);\n\n const nineYearExpense = 9 * 12 * monthlyExpense;\n $( '#nineYearExpense' ).text(`$ ${addCommas(nineYearExpense)}`);\n\n let newNineYearExpense\n if ($('#viewDetailsButtonBottom').css('display') === 'none') {\n newNineYearExpense = plansCount * 500;\n $( '#newNineYearExpense' ).text(`$ ${addCommas(newNineYearExpense)}`);\n\n \n } else {\n newNineYearExpense = $('#newNineYearExpense').text().replace(/(\\s|\\$|,)/g, '');\n newNineYearExpense = parseFloat(newNineYearExpense);\n\n }\n\n const nineYearSaving = nineYearExpense - newNineYearExpense;\n $( '#nineYearSaving' ).text(`$ ${addCommas(nineYearSaving)}`);\n\n $( '#yearlySaving' ).text(`$ ${addCommas(nineYearSaving / 9)}`);\n}", "function renderFinalResult() {\n //console.log('Final result is being rendered');\n $('.result').html(generateFinalResult());\n}", "function calculate() {\n \n //Parse number variables to floats\n numOne = parseFloat(numOne);\n numTwo = parseFloat(numTwo);\n\n //Determine calculation to run via ID of operator\n if( op == 'add' ) {\n numOne = numOne + numTwo;\n }\n else if( op == 'subtract' ) {\n numOne = numOne - numTwo;\n }\n else if( op == 'multiply' ) {\n numOne = numOne * numTwo;\n }\n else {\n //Throw error and ask to be reset if attempt to divide by 0\n if( numTwo == 0 ) {\n error = true;\n }\n //If not diving by 0, run calculation\n else{\n numOne = numOne / numTwo;\n }\n }\n\n //If there was a divide by 0 error inform user and prompt to reset\n if( error == true ) {\n $currentDisplay.val('Cannot divide by 0. Please clear calculator.');\n $( '.ui-btn' ).prop('disabled', true);\n $( '.clear' ).prop('disabled', false);\n }\n //Else move on to update display\n else {\n //If the display for the number is too long, set the display to be cut off at 15 decimal points\n if( numOne.length > 18 ) {\n numOneDisplay = parseFloat(numOne).toFixed(15);\n }\n //Else, display normally\n else{\n numOneDisplay = numOne;\n }\n //Update the display\n $currentDisplay.val(numOneDisplay);\n //Set calculator so that it knows a calculation just occured and no operator has been chosen yet\n postCalc = true;\n opClicked = false;\n }\n\n }", "function calculate() {\r\n\teval();\r\n\tstopAll();\r\n}", "async function doCalculation() {\n const { rates } = await fetchData.fetchCurrency(selectedFrom, selectedTo);\n const valueFrom = amountFrom.value;\n let amount = valueFrom * rates[selectedTo];\n resultField.value = amount;\n }", "function update_calculations() {\n\n\t// Loop through each HTML element that displays a metric (everything of the 'answer' class)\n\t$('.answer').each(function(){\n\n\t\t// Identify which of the HTML metrics .each is currently on\n\t\tvar current_metric = $(this).attr('id');\n\n\t\t// Final output for current HTML metric\n\t\tvar new_metric_value = 0;\n\t\t\n\t\t// Iterate through selected_states to calculate value for new_metric_value\n\t\tjQuery.each(selected_states, function(index,one_state_in_array){\n\n\t\t\t// eval automatically handles case when user has no states selected\n\t\t\tvar value_for_one_state_user_selected = eval('state_stats.' + one_state_in_array + '.' + current_metric);\n\t\t\t\n\t\t\tnew_metric_value+=parseInt(value_for_one_state_user_selected);\n\n\t\t});\n\n\t\t// Update HTML metric with value\n\t\t$(this).html(numberWithCommas(new_metric_value));\n\t\t\n\t});\n\n}", "function setAllInputAndTextAfterAllFinalCalculation()\n {\n $('.cr_totalAmount').text(getTotalAmount());\n $('.cr_subtotal_amount').text(\"(\"+getSubTotalByProductAmountAndQuantity()+\")\");\n $('.cr_discount_amount').text(\"(\"+getTotalDiscountAmount()+\")\");\n $('.cr_netTotalAmount').val(getTotalAmount());\n\n /* Selected Unit Name*/\n selectedUnitName();\n }", "function calculateCurrent() {\n if (!currentCalculator) { return; }\n\n const result = Calculations.calculate(currentCalculator);\n renderOutput(result);\n }", "function updateData() {\n var result = calculateTimeTaken(complexity, resultForm, n, speed, processors, timeUnits);\n if (timeUnits == 'nanoseconds') {\n var format = ngettext('1 nanosecond', '%s nanoseconds', result);\n } else if (timeUnits == 'microseconds') {\n var format = ngettext('1 microsecond', '%s microseconds', result);\n } else if (timeUnits == 'milliseconds') {\n var format = ngettext('1 millisecond', '%s milliseconds', result);\n } else if (timeUnits == 'seconds') {\n var format = ngettext('1 second', '%s seconds', result);\n } else if (timeUnits == 'minutes') {\n var format = ngettext('1 minute', '%s minutes', result);\n } else if (timeUnits == 'hours') {\n var format = ngettext('1 hour', '%s hours', result);\n } else if (timeUnits == 'days') {\n var format = ngettext('1 day', '%s days', result);\n } else if (timeUnits == 'months') {\n var format = ngettext('1 month', '%s months', result);\n } else if (timeUnits == 'years') {\n var format = ngettext('1 year', '%s years', result);\n } else if (timeUnits == 'centuries') {\n var format = ngettext('1 century', '%s centuries', result);\n }\n var output = interpolate(format, [result]);\n $('#output').val(output);\n }", "function calculate() {\n animateCSS(controls, \"fadeOutLeft\", false, function () {\n controls.style.display = \"none\";\n });\n notification.style.display = \"block\";\n animateCSS(notification, \"fadeIn\", false, null);\n\n rulerCanvas.style.display = \"block\";\n rulerMode = true;\n // get rulerCm\n\n // 2D array with info for each function\n results = [];\n\n for (var i = 0; i < points.length; i++) {\n // Push [areaL, areaM, areaR, areaT, length]\n if (points[i] !== null)\n results.push(areaOfRegion(points[i], 0.1));\n }\n}", "function calculate() {\n // prevents hitting calculate as first entry\n if (previous) {\n let result;\n current = parseFloat(current);\n previous = parseFloat(previous);\n switch (operant) {\n case 'divide':\n result = previous / current;\n break;\n case 'times':\n result = previous * current;\n break;\n case 'minus':\n result = previous - current;\n break;\n case 'plus':\n result = previous + current;\n default:\n break;\n }\n current = current.toString();\n previous = result.toString();\n viewer.textContent = result;\n rePrint = true;\n if (!equalPressed) {\n equalPressed = true;\n }\n return;\n }\n}", "function updateDisplay()\n {\n //We need to build a string to show. The first item is the current running total:\n var string = runningTotal;\n\n //Then we add the operator if they have pressed this\n if(hasPressedOperator)\n string += \" \" + currentOperator;\n \n //And finally we add the right operand, the value to add when equals is pressed.\n if(hasPressedOperand)\n string += \" \" + currentOperand;\n \n //We then simply set the value of the output field to the string we built\n document.getElementById(\"output\").value = string;\n }", "function calculate(data) {\n if (view.viewFunctions.calculate) {\n var result = [],\n calculations = view.viewFunctions.calculate;\n\n if ($scope.calculations.length > 0) {\n result = $scope.calculations;\n }\n\n for (var i = 0; i < calculations.length; i++) {\n var rows = [],\n rowObject = {\n name: '',\n value: 0\n },\n startRow = false,\n calc = [],\n calculation = calculations[i].calculation,\n math = '';\n\n for (var x = 0; x < calculation.length; x++) {\n char = calculation.charAt(x);\n\n if (char === '[') {\n startRow = true;\n } else if (char === ']') {\n startRow = false;\n rowObject.name = sharedService.camelcase(rowObject.name);\n rows.push(rowObject);\n rowObject = {\n name: '',\n value: 0\n };\n rowObject.name = '';\n } else if (char !== ' ') {\n if (startRow) {\n rowObject.name += char.toString();\n } else {\n calc.push(char.toString());\n }\n }\n }\n\n for (var x = 0; x < data.length; x++) {\n var dataObj = data[x];\n\n for (var z = 0; z < rows.length; z++) {\n var rowObj = rows[z];\n\n for (key in dataObj) {\n if (key === rowObj.name) {\n if (dataObj[key] !== null && dataObj[key] !== undefined) {\n rowObj.value = rowObj.value + dataObj[key];\n }\n }\n }\n }\n }\n\n for (var x = 0; x < calc.length; x++) {\n math += rows[x].value + calc[x];\n }\n math += rows[rows.length - 1].value;\n\n result.push({\n name: calculations[i].shownName,\n value: calculator(math)\n })\n }\n\n $scope.calculations = result;\n }\n }", "function allDone(){\n\t\tinitCalculator(currenciesData,feesData,userData);\n\t}", "function displayResults () {\n if(validateForm()) {\n // If all inputs are valid, create a user profile to calculate results\n const user = createUserProfile();\n\n // TDEE Results\n document.getElementById(\"tdee-results\").innerHTML = \"Your TDEE: results\";\n\n // BMR Results\n document.getElementById(\"bmr-results\").innerHTML = \"Your BMR: results\";\n\n // Input Results\n var inputResults = \"\";\n inputResults += \"Showing results for a \"; \n inputResults += user.get(\"activity\") + \" \" + user.get(\"age\") + \" year old \" + user.get(\"gender\") + \" who is \" + user.get(\"feet\") + \" feet \" + user.get(\"inches\") + \" inch(es) tall and weighs \" + user.get(\"weight\") + \" pounds.\"; \n document.getElementById(\"input-results\").innerHTML = inputResults;\n } else {\n document.getElementById(\"error-message\").innerHTML = \"Error\";\n }\n\n return;\n}", "function calculate () {\n const finalPrice = priceArray.reduce(getSum);\n priceDisplay.textContent = 'Total - Price $' + finalPrice;\n}", "function do_calculation() {\n // get the HTML elements that correspond to the inputs\n const crystalsInput = document.getElementById(\"crystals-input\");\n const tenDrawsInput = document.getElementById(\"ten-draws-input\");\n const singleDrawsInput = document.getElementById(\"single-draws-input\");\n\n // do the calculation and store it into an object\n const results = calculate_sparks(crystalsInput.value, tenDrawsInput.value, singleDrawsInput.value);\n\n // update the output elements\n document.getElementById(\"roll-count-output\").textContent = results.total_draws;\n document.getElementById(\"spark-count-output\").textContent = results.total_sparks;\n document.getElementById(\"needed-rolls-output\").textContent = results.draws_to_next_spark;\n document.getElementById(\"needed-crystals-output\").textContent = results.crystals_for_next_spark;\n document.getElementById(\"needed-ten-draws-output\").textContent = results.ten_draws_for_next_spark;\n}", "function doComputation() {\n var $computation = document.getElementById('computation');\n var $result = document.getElementById('result');\n var $error = document.getElementById('error');\n var $errorMessage = document.getElementById('errorMessage');\n var $errorInput = document.getElementById('errorInput');\n var input = $computation.value;\n var algebraType = readConfig();\n var maybeResult = evaluate(algebraType, input);\n if (maybeResult instanceof ParseError) {\n $error.style.display = 'block';\n $errorMessage.innerText = maybeResult.msg;\n $errorInput.innerHTML = frameError(maybeResult, input);\n }\n else {\n $error.style.display = 'none';\n }\n var lin = (maybeResult instanceof ParseError) ? algebraUnit(0) : maybeResult;\n $result.innerText = algebraString(lin);\n writeTable(algebraType, lin);\n}", "function getProcessResults() {\n StatusService.stopWaiting();\n getFlowRows();\n if ( $scope.paramGrid.dissipation) {\n $scope.compositionFlow = CompositionFlowService.get($scope.process.compositionFlowID);\n $scope.paramGrid.dissipation.extractData();\n }\n getLciaResults();\n }", "function getFormValuesAndDisplayResults() {\n\tgetFormValues();\n\tlet monthlyPayment = calcMonthlyPayment(principle, loanYears, interest);\n\tdocument.getElementById(\"calc-monthly-payment\").innerHTML = monthlyPayment;\n}", "function drawResult(){\n $(\".calcDisplay\").text(expression);\n}", "function OnCalculate() {\n var amortizationTable = GenerateAmortizationTable();\n \n // Generate the table in the loanCalculationOutput div\n}", "function calculate() {\n\tgetTempBonuses();\n\tgetNumberBoonsValues();\n\tgetRelicBonuses();\n\tgetFatebondBonuses();\n\tgetCoreTraitsValues();\n\tgetAttributesValues();\n\tgetSkillsValues();\n\tgetVirtuesValues();\n\tgetBoonsDiceValues();\n\tgetPresetRolls();\n\tgetAttackBonuses();\n}", "function results() {\n selectedAnswers = $(displayTest.find(\"input:checked\"));\n //if user is correct\n if (\n selectedAnswers[0].value === testSetup[currentQuestion - 1].questionAnswer\n ) {\n //add to correct score and display on element\n correct++;\n $(\"#correct\").text(\"Answers right: \" + correct);\n } else {\n //if user is wrong then add to wrong score and display on element\n wrong++;\n $(\"#incorrect\").text(\"Wrong answers: \" + wrong);\n }\n //check to see if the user has reached the end of the test\n if (currentQuestion === 10) {\n //toggle finalize modal at end of test to display score\n $(\"#modalMatch\").modal(\"toggle\");\n $(\"#testScore\").text(\n \"End of test! You scored a \" + (parseFloat(correct) / 10) * 100 + \"%\"\n );\n //show postTest element\n $(\"#postTest\").show();\n $(\"#submitTest\").hide();\n }\n }", "printResult(fullData) {\n const data = fullData[fullData.length - 1]\n const wgas = data.wpost * this.estimator.wpostGas\n const pregas = data.commits * this.estimator.preGas\n const provegas = data.commits * this.estimator.proveGas\n const leftgas = this.estimator.totalHeightGas \n - wgas\n - pregas\n - provegas\n\n // update text\n var n = document.getElementById(\"body-simul\")\n const values = [ (100*wgas/(wgas+pregas+provegas+leftgas)).toFixed(2),\n utils.growthRate(fullData[0].commits).toFixed(2),\n utils.growthRate(data.commits).toFixed(2),\n utils.sizeToString(data.sectors * 32 * 1024 * 1024 * 1024),\n (data.round / utils.roundsPerDay).toFixed(2)\n ]\n const rows = values.map((v) => \"<td>\" + v + \"</td>\")\n const newRow = document.createElement(\"tr\")\n newRow.innerHTML = rows.join(\"\")\n n.appendChild(newRow)\n }", "function calculate(value) {\n displayVal += value;\n document.getElementById('result').value = displayVal;\n}", "function $compute() {\n var sold = 0.0,\n montant = 0.0;\n sold = parseFloat($('#bank_extract_begin_sold').val(), 10) + parseFloat($('#bank_extract_total_credit').val(), 10)\n - parseFloat($('#bank_extract_total_debit').val());\n $('.public_bank_extracts #bank_extract_end_sold').val(sold.toFixed(2));\n // mise à deux décimales du montant saisi\n montant = parseFloat($('#bank_extract_total_credit').val(), 10);\n $('.public_bank_extracts #bank_extract_total_credit').val(montant.toFixed(2));\n montant = parseFloat($('#bank_extract_total_debit').val(), 10);\n $('.public_bank_extracts #bank_extract_total_debit').val(montant.toFixed(2));\n montant = parseFloat($('#bank_extract_begin_sold').val(), 10);\n $('.public_bank_extracts #bank_extract_begin_sold').val(montant.toFixed(2));\n}", "function process() {\n\t// Get current page's data\n\toverallResult = overallResult.concat(getPrices());\n\n\tvar morePages = nextPage();\n\n\tif(morePages) {\n\t\t// Wait then call this method again\n\t\twaitCallback();\n\t} else {\n\t\t// Print results and exit\n\t\tconsole.log(overallResult.join(\"\"));\n\t\treturn;\n\t}\n}", "function calculate() {\n if (validateInputs()) {\n if ($age.val() > 110) {\n $calcResultsBox.removeClass(\"hidden\").html(\"<span style='color:red'>Invalid Age</span>\");\n } else if (($weight.val() > 600 && imperial) || ($weight.val() > 270 && !imperial)) {\n $calcResultsBox.removeClass(\"hidden\").html(\"<span style='color:red'>Invalid Weight</span>\");\n } else if (imperial) { // calculation if imperial units\n if ($heightInputIn.val() > 12) {\n inchesConvert();\n }\n var BMR = Math.round(calculateBMR());\n var TDEE = Math.round(calculateBMR() * 1.2);\n var BMI = calculateBMI();\n $calcResultsBox.removeClass(\"hidden\").html(\n \"To lose \" + $slider.slider(\"value\") + \" lb per week, you would need to eat \" + Math.round((TDEE - 500 * $slider.slider(\"value\"))) + \"* kcal per day (not including exercise).<br/><br/>BMR: \" + BMR + \" kcal<br/>TDEE: \" + TDEE + \" kcal<br/>BMI: \" + BMI + \"</td><br/><br/>* Eating less than 1200 kcal daily is not recommended.\");\n } else {\n // calculation if metric units\n var BMR = Math.round(calculateBMR());\n var TDEE = Math.round(calculateBMR() * 1.2);\n var BMI = calculateBMI();\n $calcResultsBox.removeClass(\"hidden\").html(\n \"To lose \" + $slider.slider(\"value\") + \" kg per week, you would need to eat \" + Math.round((TDEE - 1102 * $slider.slider(\"value\"))) + \"* kcal per day (not including exercise).<br/><br/>BMR: \" + BMR + \" kcal<br/>TDEE: \" + TDEE + \" kcal<br/>BMI: \" + BMI + \"</td><br/><br/>* Eating less than 1200 kcal daily is not recommended.\");\n }\n } else\n $calcResultsBox.removeClass(\"hidden\").html(\"<span style='color:red'>Please fill in all fields.</span>\");\n }", "function calculateAll() {\n\t\tcalculatePrice();\n\t\tcompileSpecs();\n\t\tcalculateUSD();\n\t}", "function resultPageCalc() {\n const retAge = 58;\n const lifeExpectAge = 90;\n const inflationRate = 0.045;\n const expReturnsRate = 0.055;\n\n let yearsTillRet = retAge - curAgeVal;\n let postRetAge = lifeExpectAge - retAge;\n let expMultiAfterRet = 1;\n switch (rpRetireType) {\n case 'spending_more':\n expMultiAfterRet = (1 + 0.2); //expense increased by 20%\n break;\n case 'spending_less':\n expMultiAfterRet = (1 - 0.2); //expense decreased by 20%\n break;\n case 'spend_same':\n expMultiAfterRet = 1;\n break;\n default:\n break;\n }\n let postAnnualExp = rpExpenseVal * expMultiAfterRet * 12;\n let postAnnualExpPlusInfl = postAnnualExp * (Math.pow((1 + inflationRate), yearsTillRet));\n\n let reqCorpus = 0;\n //calculating net present value of customers post retirement expense\n for (i = 0; i < postRetAge; i++) {\n let thisYrAnnExp = ((i === 0) ? postAnnualExpPlusInfl : (postAnnualExpPlusInfl * (1 + inflationRate)));\n let presValPostRetExp = presentValue(expReturnsRate, i, thisYrAnnExp);\n reqCorpus += presValPostRetExp;\n }\n\n const percVsInvProf = { risk_averse: 0.06, conservative_type: 0.066, balanced_type: 0.076, growth_type: 0.088, aggressive_type: 0.096 };\n\n let totalInvest = (rpRetSavedVal + (rpMonthlySaveVal * 12 * yearsTillRet)) * (Math.pow((1 + percVsInvProf[rpInvestType]), yearsTillRet));\n\n let gapAmtPendingToSave = reqCorpus - totalInvest;\n\n let score = Math.round(((gapAmtPendingToSave <= 0) ? 1 : (totalInvest / reqCorpus)) * 100);\n\n let monthInvNeed = ((gapAmtPendingToSave <= 0) ? 0 : (PMT((percVsInvProf[rpInvestType] / 12), (yearsTillRet * 12), (gapAmtPendingToSave * (-1)))));\n\n const scoreArr = [65, 80, 95, 100];\n\n const statArr = [\n { heading: \"Your retirement score <strong>Needs Your Attention</strong>\", body: \"You are falling behind in planning your retirement. In order to relive life without any worries, we can make your wealth do the hard work.\" },\n { heading: \"Your retirement score is <strong>Fair</strong>\", body: \"While you are on the right track, you still need help in planning your retirement better! With our help, you can make your wealth do the hard work and relive life on your own terms.\" },\n { heading: \"Your retirement score is <strong>Good</strong>\", body: \"While you are saving enough for your retirement, you can still make your wealth do the hard work and relive life on your own terms.\" },\n { heading: \"Your retirement score is <strong>On Target</strong>\", body: \"Congratulations! You have planned your retirement right. But there is always scope for improvement! With our help, you can make your wealth do the hard work and relive life on your own terms.\" }\n ];\n const ageMsgArr = [\n { heading: \"\", body: \"iRe-Live Program is tailor made just for your retirement needs. You can meet your aspirations with our curated investment portfolios, customized as per your investment behavior and get a lot more benefits.\" },\n { heading: \"\", body: \"iRe-Live Program is tailor made just for your retirement needs. You can do goal based investments, consolidate and optimize investments, get a single view for easy investment tracking and enjoy a lot more benefits.\" },\n { heading: \"\", body: \"iRe-Live Program is tailor made just for your retirement needs. You can manage your corpus efficiently, ensure a smooth transition from employer benefits, avail pension management services and get a lot more.\" },\n { heading: \"\", body: \"iRe-Live Program is tailor made just for your retirement needs. You can rebalance your investments, do legacy planning, enjoy retirement benefits across lifestyle, healthy living and a lot more.\" }\n ];\n const colorArr = ['#FF4A42', '#FFB74A', '#BAD22F', '#58951D'];\n let scoreArrIndex = 0;\n\n scoreArr.some((item, index) => {\n if (score <= item) {\n scoreArrIndex = index;\n return true;\n }\n });\n\n $(\"#rp-score\").html(score);\n $(\"#rp-score\").css(\"color\", colorArr[scoreArrIndex]);\n // $(\"#rp-score-place\").css(\"left\", score + \"%\");\n $(\"#rp-score-place\").css(\"transform\", `rotate(${(score * 3.6) - 16}deg)`);\n\n $(\"#score-heading\").html(statArr[scoreArrIndex][\"heading\"]);\n $(\"#score-body\").html(statArr[scoreArrIndex][\"body\"]);\n\n $(\"#age-msg-body\").html(ageMsgArr[ageArrIndex][\"body\"]);\n\n $(\"#rp-corpus\").html(`₹ ${globalizeAmt(Math.round(reqCorpus))}`);\n $(\"#rp-invest-ret\").html(`₹ ${globalizeAmt(Math.round(totalInvest))}`);\n // $(\"#rp-pending-corpus\").html(`₹ ${globalizeAmt(Math.round(reqCorpus - totalInvest))}`);\n // $(\"#rp-month-invest\").html(`₹ ${globalizeAmt(Math.round(monthInvNeed))}`);\n }", "function handleResults() {\n // console.log(event.target + 'was clicked');\n updateChartArrays();\n displayList();\n drawChart(); //new line\n}", "function display() {\n // Update the display of the target rate text boxes, if needed.\n for (var i = 0; i < build_targets.length; i++) {\n build_targets[i].getRate()\n }\n var totals = globalTotals\n\n window.location.hash = \"#\" + formatSettings()\n\n if (currentTab == \"graph_tab\") {\n renderGraph(totals, spec.ignore)\n }\n recipeTable.displaySolution(totals)\n if (showDebug) {\n renderDebug()\n }\n\n timesDisplayed = timesDisplayed.add(one)\n var dc = document.getElementById(\"display_count\")\n dc.textContent = timesDisplayed.toDecimal()\n}", "updateCalculatedDataDiv() {\n if (!this.calculatedDataDiv) {\n return;\n }\n removeAllChildren(this.calculatedDataDiv);\n if (this.calculatedData === SENTINEL_CALCULATING) {\n this.calculatedDataDiv.innerHTML = 'calculating';\n this.calculatedDataDiv.style.color = 'grey';\n } else {\n displayCalculatedData(this.calculatedData, this.calculatedDataDiv);\n this.calculatedDataDiv.style.color = 'black';\n }\n }", "function calcAll() {\n\n // Variables for term calculation\n var gpa = 0;\n var grade = \"grade\";\n var credithours = \"cred\";\n var previousgrade = null;\n var tempgrade = \"grade\";\n\n // Variables for the cumulative calculation\n var pastgradeval = 0;\n var pastgpa = 0;\n var credtaken = 0;\n\n // Variables for the projection calculation\n var credleft = 0;\n var targetgpa = 0;\n var totcreds = 0;\n\n // Variables for output\n var rowTotal = 1;\n var totalcredits = 0;\n var termCredits = 0;\n var termGPA = 0;\n var testerNum = 500;\n var work = null;\n var termSum = 0;\n\n if (!isNaN(parseFloat($('#pastgpa').val()))) {\n pastgpa = parseFloat($('#pastgpa').val());\n }\n\n if (!isNaN(parseFloat($('#credtaken').val()))) {\n credtaken = parseFloat($('#credtaken').val());\n }\n\n if (!isNaN(parseFloat($('#targetgpa').val()))) {\n targetgpa = parseFloat($('#targetgpa').val());\n }\n if (!isNaN(parseFloat($('#credleft').val()))) {\n credleft = parseFloat($('#credleft').val());\n }\n\n $(\".item\").each(function() {\n if (!isNaN(parseFloat($(this).find(\"#credithours\").val()))) {\n credithours = parseFloat($(this).find(\"#credithours\").val());\n }\n\n if (!isNaN(parseFloat($(this).find(\"#currentgrade\").val()))) {\n tempGrade = parseFloat($(this).find(\"#currentgrade\").val());\n testerNum = $(this).find(\".btn_repeat\").attr('id');\n\n if (!isNaN(parseFloat($(\"#g\" + testerNum + '').val()))) {\n previousgrade = parseFloat($(\"#g\" + testerNum + '').val());\n }\n if (previousgrade > tempGrade && previousgrade !== \"grade\") {\n grade = parseFloat($(this).find(\"#g\" + testerNum + '').val());\n }\n\n if (tempGrade > previousgrade || previousgrade == null) {\n grade = parseFloat($(this).find(\"#currentgrade\").val());\n }\n\n if (tempGrade == previousgrade) {\n grade = parseFloat($(this).find(\"#currentgrade\").val());\n }\n\n //Trigger calculation of minimum for repeat course function,\n //so that the minimum grade is removed between two repeated\n //courses.\n if (previousgrade !== null) {\n work = 50;\n }\n }\n\n // If values are not set, display nothing\n if (grade == \"grade\" || credithours == \"cred\" || tempgrade == \"grade\" || previousgrade == null) {\n $(this).find(\".total\").val(\"\");\n }\n\n //Marks I, W, X, and CR courses as not used in GPA calculation\n if (grade == 100) {\n $(this).find(\".total\").val(\"Not used\");\n credithours = \"cred\";\n grade = \"grade\";\n }\n\n if (grade !== \"grade\" && credithours !== \"cred\") {\n\n //Totals credit hours\n if (credtaken == 0 && pastgpa == 0 || credtaken == \"foo\") {\n totalcredits += credithours;\n\n //If credits were set in the cumulative function, total\n //it then return to the if, so past credits aren't added repeatedly\n } else {\n totalcredits += (credithours + credtaken);\n pastgradeval = pastgpa * credtaken;\n credtaken = \"foo\";\n }\n\n //Total the term credits separate from cumulative\n termCredits += credithours;\n\n //Remove minimum grade and credit hours from a repeated course\n //so GPA and total credits are displayed correctly.\n if (work == 50 && pastgpa !== 0 && credtaken !== 0) {\n pastgradeval -= (Math.min(tempGrade, previousgrade) * credithours);\n totalcredits -= credithours;\n }\n\n //Total each row to display quality points at the last column\n rowTotal = grade * credithours;\n $(this).find(\".total\").val(rowTotal.toFixed(2));\n\n //Re-set the variables\n credithours = \"cred\";\n grade = \"grade\";\n tempgrade = \"grade\";\n previousgrade = null;\n work = null;\n }\n });\n\n // Calculates the totals and GPA\n var sum = 0;\n $(\".total\").each(function() {\n if (!isNaN(this.value) && this.value.length != 0) {\n // Prevents cumulative credits being added for each new row\n if (pastgpa != \"stop\") {\n\n //Cumulative Calculation\n sum += parseFloat(this.value) + pastgradeval;\n gpa = sum / totalcredits;\n\n // Term Calculation\n termSum += parseFloat(this.value);\n termGPA = termSum / termCredits;\n\n pastgpa = \"stop\";\n } else {\n // Cumulative Calculation\n sum += parseFloat(this.value);\n gpa = sum / totalcredits;\n\n // Term Calculation\n termSum += parseFloat(this.value);\n termGPA = termSum / termCredits;\n }\n }\n });\n\n //Limit GPA to 4.0\n if (gpa > 4.0) {\n gpa = 4.0;\n }\n // Display the calculated GPA\n if (grade == \"x\" || credithours == \"x\") {\n $(\"#show_box\").text(\" 0.00\");\n } else {\n $(\"#show_box\").text(gpa.toFixed(2));\n $(\"#term_cred\").text(totalcredits.toFixed(2));\n }\n\n // Projection calculation\n if (targetgpa > 0) {\n if (totalcredits !== 0) {\n totcreds += totalcredits + credleft;\n currentgradeval = gpa * totalcredits;\n } else {\n totcreds += credtaken + credleft;\n currentgradeval = pastgpa * credtaken;\n }\n projectedgradeval = totcreds * targetgpa;\n target = targetgpa * credleft;\n achievedgoal = (projectedgradeval - currentgradeval) / credleft;\n\n // If appplicable values are set, continue\n if (targetgpa !== 0 && credleft !== 0 && totcreds !== 0) {\n $(\"#proj_box\").text(\"Please enter a term or cumulative grade.\");\n }\n if (totcreds !== 0 && targetgpa !== 0 && credleft !== 0 && currentgradeval !== 0) {\n if (achievedgoal.toFixed(2) <= 4.0 && achievedgoal.toFixed(2) > 0) {\n if (achievedgoal.toFixed(2) == gpa.toFixed(2)) {\n $(\"#proj_box\").text(\"To achieve a GPA of \" + achievedgoal.toFixed(2) + \" you need to maintain your current GPA. Keep it up!\");\n //proj_box.style.background = '#93C572';\n //proj_box.style.borderColor = '#00467f';\n } else {\n $(\"#proj_box\").text(\"To achieve a GPA of \" + targetgpa.toFixed(2) + \" you need to maintain a GPA of \" + achievedgoal.toFixed(2) + \" in your remaining \" + credleft + \" credits.\");\n //proj_box.style.background = '#93C572';\n //proj_box.style.borderColor = '#00467f';\n }\n } else if (achievedgoal.toFixed(2) > 4) {\n $(\"#proj_box\").text(\"It is not possible to reach a GPA of \" + targetgpa.toFixed(2) + \". You would need a GPA of \" + achievedgoal.toFixed(2) + \".\");\n //proj_box.style.background = '#e6adad';\n //proj_box.style.borderColor = '#00467f';\n } else if (achievedgoal.toFixed(2) < 0) {\n $(\"#proj_box\").text(\"It is not possible to lower your GPA that much.\");\n } else {\n $(\"#proj_box\").text(\"Something went wrong.\");\n }\n }\n }\n console.log(termGPA);\n}", "function results() {\n calcResults();\n document.getElementById(\"question5\").style.display = \"none\";\n document.getElementById(\"results\").style.display = \"block\";\n}", "function doMyMath(){\n\n //object from paymentCalculator \n mathData = paymentCalculator();\n \n let r = mathData.int_rate;\n let n = mathData.term;\n //this should NOT be an array - in order to rectify incorrect lengths in final output\n let balance = mathData.principal;\n let monthly_payment = mathData.monthly_payment;\n\n //call interestCalculator\n cost_Obj = interestCalculator(r, balance, n, monthly_payment);\n\n //call displayData\n displayData(monthly_payment, cost_Obj);\n\n // document.getElementById(\"monthly_payment\").innerHTML = `$${monthly_payment}`;\n // document.getElementById(\"total_principal\").innerHTML = `$${balance[0]}`;\n // document.getElementById(\"total_interest\").innerHTML = `$${cost_Obj.total_interest}`;\n // document.getElementById(\"total_cost\").innerHTML = `$${cost_Obj.total_cost}`;\n\n // //fill out table data beginning here\n // document.getElementById(\"month\").innerHTML = `1`;\n // document.getElementById(\"payment\").innerHTML = `${monthly_payment}`;\n // document.getElementById(\"principal\").innerHTML = `${cost_Obj.principal_payment[0]}`;\n // document.getElementById(\"interest\").innerHTML = `${cost_Obj.interest_payments[0]}`;\n // document.getElementById(\"interest_data\").innerHTML = `${cost_Obj.interest_payments[0]}`;\n // document.getElementById(\"balance\").innerHTML = `${cost_Obj.principal_balance[0]}`;\n\n}", "function displayQueryResults() {\n\t\t\t$scope.resultsAvailable = true;\n\t\t\tresultsOffset = 0;\n\t\t\t$scope.getNextResultsPage();\n\n\t\t}", "function getCalculation() {\n\n $.ajax({\n method: 'GET',\n url: '/get-calculation'\n }).then(function (response) {\n console.log('Calculations:', response);\n operator = '';\n inputNumberConcatenate = ''\n calcDisplay = $('#calc-display-text');\n \n $('#calc-output-list').empty();\n\n // for each loop will run through 'calculations' and append to DOM\n response.forEach(function (calculations, i) {\n let calcTotalParsed = parseFloat(calculations.calcTotal.toFixed(2));\n let inputFirstParsed = parseFloat(calculations.inputFirst.toFixed(2));\n let inputSecondParsed = parseFloat(calculations.inputSecond.toFixed(2));\n calcDisplay.empty();\n\n calcDisplay.append(`${calcTotalParsed}`);\n\n $('#calc-output-list').append(`\n <li class=\"calc-list-item\" data-index=\"${i}\">${inputFirstParsed} ${calculations.operator} ${inputSecondParsed}</li>`);\n\n currentTotal = calculations.calcTotal;\n });\n })\n}", "calc() {\n let currentLast = '';\n this._lastOperator = this.getLastItem();\n\n if (this._operation.length < 3) {\n let firstItem = this._operation[0];\n this._operation = [firstItem, this._lastOperator, this._lastNumber]\n }\n\n if (this._operation.length > 3) {\n currentLast = this._operation.pop();\n this._lastNumber = this.getResult();\n } else if (this._operation.length == 3) {\n this._lastNumber = this.getLastItem(false);\n }\n\n let currentResult = this.getResult();\n if (currentLast == '%') {\n currentResult /= 100;\n this._operation = [currentLast]\n } else {\n this._operation = [currentResult];\n if (currentLast) this._operation.push(currentLast);\n }\n this.setLastNumberToDisplay();\n }", "function results() {\n const high = [\"Great job!\", \"imgs/high.gif\", \"woman waking up happy\"];\n const low = [\"Take a nap and try again\", \"imgs/low.gif\", \"unhappy man\"];\n if (currentScore >= 5) {\n final = high;\n } else {\n final = low;\n }\n return finalResults();\n\n //this function renders the final form, which will display the users results\n function finalResults() {\n return (finalScore = $(\".display\").html(`\n <form class=\"finalForm\">\n <section class=\"quiz-bg\">\n <fieldset class=\"finalForm\">\n <legend class=\"zzz\">zZz</legend>\n <h2 class=\"results-text\">${final[0]}</h2><br>\n <img src=\"${final[1]}\" alt=\"${final[2]}\" class=\"reactions\"> \n <h2 class=\"results-text\">Your score is:<br>${currentScore}/7!</h2>\n <br>\n <button type=\"button\" class=\"restart\">Restart Quiz</button>\n </fieldset>\n </section>\n </form> \n `));\n }\n}", "calc()\n\t{\n\t\tlet filas = this.controlFilas; // Obtenemos el control\n\t\tlet columnas = this.controlColumnas; // Obtenemos el control\n\t\tlet sumaClase = 0.0; // Suma para la frecuencia\n\t\tlet resClase = 0.0; // Resultado del porcentaje\n\t\tlet totalClase = 0.0;\n\t\tlet totalFrecuencia = 0.0;\n\n\t\t// Recorremos la tabla\n\t\tfor(let i = 0; i < filas; i++){\n\t\t\tfor(let j = 0; j < columnas; j++){\n\t\t\t\t// Verificamos si hay un dato\n\t\t\t\tif(document.getElementById((i+1)+''+(j+1)).value.length > 0){\n\t\t\t\t\t// Verificamos que solo se sumen columnas 1 y 2\n\t\t\t\t\tif(j == 0 || j == 1){\n\t\t\t\t\t\tsumaClase += parseFloat(document.getElementById((i+1)+''+(j+1)).value);\n\t\t\t\t\t} else if(j == 2){\n\t\t\t\t\t\ttotalFrecuencia += parseFloat(document.getElementById((i+1)+''+(j+1)).value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tresClase = sumaClase / 2;\n\t\t\tdocument.getElementById((i+1)+'f').innerHTML = resClase; // Intectamos\n\t\t\ttotalClase += resClase;\n\t\t\tsumaClase = 0; // Reseteamos la suma\n\t\t\tresClase = 0;\n\t\t}\n\n\t\t// Inyectamos los totales\n\t\tdocument.getElementById('suma1').innerHTML = totalClase;\n\t\tdocument.getElementById('suma2').innerHTML = totalFrecuencia;\n\t}", "function runCalculator() {\n var buttons = $('#1, #2, #3, #4, #5, #6, #7, #8, #9, #0, #dot').val();\n var operator = $('.operator').val();\n console.log(buttons);\n\n $(buttons).each(function(i, v) {\n\n if ($('#calculate')){\n displayResult(calResult);\n } else if ($('#clear')) {\n clear();\n } else {\n addValue(i);\n }\n\n console.log(i);\n });\n\n\n\n var calResult = calculate(buttons, operator, buttons);\n\n // console.log(calResult);\n\n }", "seeResult(){\n\t \tconsole.log('inside SEE Results')\n\t \taxios.get(\"http://localhost:8080/table\")\n\t \t\t .then(response => this.setState({\n\t \t\t \t\tmode: 'analysis',\n\t \t\t \t\tanalysis: response.data\n\t \t\t \t},this.renderSummationofSearch)\t\n \t\t )\n\t \t\t .catch(err=>console.log(err))\n\t }", "function calculation(){\n const bestPrice = getCosting('bestPrice');\n const extraMemoryCost = getCosting('extraMemoryCost');\n const extraStorageCost = getCosting('extraStorageCost');\n const deliveryCharge = getCosting('deliveryCharge');\n const totalSubPrice = bestPrice + extraMemoryCost + extraStorageCost + deliveryCharge; \n document.getElementById(\"totalPrice\").innerText = totalSubPrice;\n \n}", "function computeValues() {\n\t\t\t\n\t\t\tvar scaler;\n\t\t\t// deal with loop\n\t\t\tif (repeat > 0) {\n\t\t\t\t// not first run, save last scale ratio\n\t\t\t\txFrom = xTo;\n\t\t\t\tyFrom = yTo;\n\t\t\t\tratioFrom = ratioTo;\n\t\t\t} else {\n\t\t\t\t// get the scaler using conf options\n\t\t\t\tscaler = $.pixelentity.Geom.getScaler(zoom == \"out\" ? \"fill\" : \"none\",align.w,align.h,w,h,tw,th);\n\t\t\t\txFrom = scaler.offset.w;\n\t\t\t\tyFrom = scaler.offset.h;\n\t\t\t\tratioFrom = scaler.ratio;\n\t\t\t}\n\t\t\t\n\t\t\tscaler = $.pixelentity.Geom.getScaler(zoom == \"in\" ? \"fill\" : \"none\",pan.w,pan.h,w,h,tw,th);\n\t\t\txTo = scaler.offset.w;\n\t\t\tyTo = scaler.offset.h;\n\t\t\tratioTo = scaler.ratio;\n\t\t\t\n\t\t\txPrev = 0;\n\t\t\tyPrev = 0;\n\t\t\t\n\t\t\tduration = parseFloat(normalized)*33;\n\t\t\t\n\t\t\t// reset counter\n\t\t\tcounter = 0;\n\t\t\t\n\t\t\t// update runs count\n\t\t\trepeat++;\n\t\t\t\n\t\t}", "function showResult (){\r\n const displayResult = document.querySelector('.display-result');\r\n displayResult.value = calculator.displayValue;\r\n}", "function totalCalculation() {\n const firstClassTicketCount = getTicketInput('firstClass');\n const economyTicketCount = getTicketInput('economy');\n const subTotal = firstClassTicketCount * 150 + economyTicketCount * 100;\n document.getElementById('subTotal').innerText = subTotal;\n const vat = subTotal / 10;\n document.getElementById('vat').innerText = vat;\n const total = subTotal + vat;\n document.getElementById('total').innerText = total;\n document.getElementById('confirmAmount').innerText = total;\n}", "function handleOutputs(){\r\n \r\n // declare variables outside the for loop for global use inside the function else you have to definne them inside \r\n // the individual loops which isn't so condusive\r\n var outputResults = document.querySelectorAll(\".output-span\");\r\n let tipAmount = (tipValue * billValue) / peopleInput.value;\r\n let tipTotal = (billValue * tipValue) + billValue / peopleInput.value;\r\n if(peopleInput.value !=0){\r\n outputResults[1].innerHTML = \"$\" + tipTotal.toFixed(2);\r\n outputResults[0].innerHTML = \"$\" + tipAmount.toFixed(2); \r\n }else{\r\n // document.querySelectorAll(\".output-span\")[0].innerHTML = \"Infinit\"\r\n outputResults[0].innerHTML = \"Infinit\";\r\n outputResults[1].innerHTML = \"Infinit\";\r\n }\r\n // debugging uptions:\r\n // console.log(\"this is billvalue \" + billValue);\r\n // console.log(\"this is tipvalue \" + tipValue);\r\n // console.log(\"this is tipamount \" + tipAmount);\r\n // console.log(\"this is tiptotal \" + tipTotal);\r\n // console.log(\"this is tipvalue * billvalue \" + (tipValue * billValue));\r\n}", "function calculateRes(res){\n\n let from = document.getElementById('from').value;\n const amount = document.getElementById('amount').value;\n let to = document.getElementById('to').value;\n const result = document.getElementById('result');\n\n\n const fromCurrency = from.toUpperCase();\n const toCurrency = to.toUpperCase();\n const query = fromCurrency +'_'+ toCurrency;\n\n //api\n const url = 'https://free.currencyconverterapi.com/api/v5/convert?q='+ query +'';\n\n const req = new Request(url, {mode: 'cors'});\n fetch(req)\n .then(function(response){\n return response.json();\n })\n .then(function(data){\n for(key in data.results){\n from = `<option value=\"${data.results[key].fr}\">${ data.results[key].fr}</option>`;\n\n to = `<option value=\"${data.results[key].to}\">${ data.results[key].to}</option>`;\n const val = parseFloat(data.results[key].val);\n\n if(val){\n let total = val * amount;\n result.value = Math.round(total * 100)/100;\n }\n }\n document.getElementById('results').style.display = 'block';\n });\n }", "function gotResult(results) {\n console.log(results);\n // The results are in an array ordered by probability.\n select('#result').html(results[0].label);\n select('#probability').html(nf(results[0].probability, 0, 2));\n }", "function displayResult() {\n //convert string numbers to numbers\n lastNum = parseFloat(lastNum);\n theNum = parseFloat(theNum);\n\n switch (operator) {\n case \"div\": \n if (theNum === 0) {\n result =\"\";\n warning.innerHTML = \"Don't divide by 0!\";\n break;\n } else {\n result = lastNum / theNum;\n break;\n }\n case \"multi\":\n result = lastNum * theNum;\n break;\n case \"subtr\": \n result = lastNum - theNum;\n break;\n case \"add\":\n result = theNum + lastNum;\n break;\n default: \n result = theNum;\n //If equal is pressed without an operator, keep number and continiue\n }\n //check if the result is NaN or infinitive\n if (!isFinite(result)||isNaN(result)) {\n result = \"Something bad happened!\";\n }\n\n viewer.innerHTML = result;\n lastNum = \"\";\n theNum = result;\n }", "function defineVariables(results) {\n\n companyName = results.price.shortName;\n marketCap = results.price.marketCap.fmt;\n industry = results.summaryProfile.industry;\n sector = results.summaryProfile.sector;\n website = results.summaryProfile.website;\n totalRevenue = results.financialData.totalRevenue.fmt;\n totalEBITDA = results.financialData.ebitda.fmt;\n grossMargin = results.financialData.grossMargins.fmt;\n totalCash = results.financialData.totalCash.fmt;\n totalDebt = results.financialData.totalDebt.fmt;\n debtTwoEquity = results.financialData.debtToEquity.fmt;\n\n // then update the spans with the captured values\n return updatePage();\n\n}", "function calculateTotal(){\n const phoneTotal=getInputValue('phone')*1219;\n const caseTotal=getInputValue('case')*59;\n const subTotal=phoneTotal+caseTotal;\n const tax=subTotal/10;\n const netTotal=subTotal+tax;\n //update on the html\n document.getElementById('sub-total').innerText=subTotal;\n document.getElementById('tax-amount').innerText=tax;\n document.getElementById('total-price').innerText=netTotal;\n}", "function showResults(cupCost, cupPrice) {\n\n console.log();\n console.log(\"------- DISPLAYING RESULTS -------\");\n\n resultForQty(20, cupPrice, cupCost);\n resultForQty(50, cupPrice, cupCost);\n resultForQty(100, cupPrice, cupCost);\n resultForQty(500, cupPrice, cupCost);\n\n}", "function calcular() {\n qtdCadeiras = Number(nCadeiras.value);\n var resp = 0;\n\n if ((qtdCadeiras.value) <= 0) {\n alert(\"A quantidade deve ser maior que 0!\");\n nCadeiras.value = '';\n }\n else {\n // ATRIBUINDO O VALOR DE ACORDO COM O MATERIAL E TIPO DA CADEIRA\n if (materialCadeira == 'aluminio' && tipoCadeira == 'praia'){\n resp = 75 * qtdCadeiras;\n }\n else if (materialCadeira == 'plastico' && tipoCadeira == 'praia') {\n resp = 50 * qtdCadeiras;\n }\n else if (materialCadeira == 'ferro' && tipoCadeira == 'praia') {\n resp = 80 * qtdCadeiras;\n }\n else if (materialCadeira == 'aluminio' && tipoCadeira == 'jardim') {\n resp = 70 * qtdCadeiras;\n }\n else if (materialCadeira == 'plastico' && tipoCadeira == 'jardim') {\n resp = 35 * qtdCadeiras;\n }\n else {\n resp = 55 * qtdCadeiras;\n }\n\n // DESCONTO DE 3%\n if (qtdCadeiras > 50) {\n resp -= (resp * 0.03);\n }\n\n // DESCONTO UNITARIO PGTO. À VISTA\n desconto = 0;\n console.log(resp);\n materialCadeira == 'aluminio' ? desconto = resp * 0.035 : desconto = resp * 0.05;\n respDesconto = resp - desconto;\n materialCadeira == 'aluminio' ? desco = 3.5 : desco = 5;\n \n\n respCalculo.innerHTML = `<p>O orçamento para a compra de <b>${qtdCadeiras}</b> <i>cadeira(s) de ${tipoCadeira}</i> de <i>${materialCadeira}</i> é R$ <b>${resp.toFixed(2)}</b></p>\n <p>Para pagamento a vista o desconto é de <b>${desco}%</b> e seu pedido ficará por R$ <b>${respDesconto.toFixed(2)}</b></p>`; \n }\n}", "function renderCurrentCalculations(data) {\n $('#txtResult').val(data.result);\n $('#ulCalculationsList').find('li').remove();\n $.each(currentCalculations, function(index, calculation) {\n $('#ulCalculationsList').append('<li>' +calculation.expression+ ' = ' +calculation.result+ '</li>');\n });\n currentCalculations.push(data);\n}", "function showResults() {\r\n $(\"#optimalSolutionPanel\").hide();\r\n \r\n $('#results').show();\r\n experimentComplete();\r\n// enablePlayAgain();\r\n \r\n if (numRoundsWithStar >= 3) {\r\n writeAward(\"No Instruction Needed\");\r\n payAMT(true,0.20); \r\n } else {\r\n payAMT(true,0.0); \r\n }\r\n \r\n// quit();\r\n \r\n}", "function results () {\n \n stop();\n\n $(\"#time\").empty();\n $(\"#correctAnswers\").text(\"Correct Answers: \" + correctAnswers);\n $(\"#incorrectAnswers\").text(\"Incorrect Answers: \" + incorrectAnswers);\n $(\"#unansweredQuestions\").text(\"Unanswered Questions: \" + unansweredQuestions);\n $(\"#results\").show();\n \n }", "function displayResults() {\n \n $(\"#finalScore\").html(finalScore);\n $(\"#random\").html(randomNum);\n $(\"#wins\").html(wins);\n $(\"#losses\").html(losses);\n}", "function calculateResult(value) {\n\t\tvar oldText = $result.text();\n\t\t$result.text(eval(oldText));\n\t\tequalTapped = true;\n\t}", "function displayPastCalculation(){\n //GET route to gather info to display to DOM\n $.ajax({\n url: '/calculated',\n type: 'GET'\n\n }).then(function(response){\n console.log('back from GET with:', response);\n $('#pastCalculation').empty();\n $('#pastCalculation').append(' <h5><u>Past Calculations</u></h5>')\n for(let i=response.length-1; i>=0; i--){\n $('#pastCalculation').append(`\n <ul>\n <li>${response[i].num1}${response[i].operator}${response[i].num2}\n =${response[i].total}</li>\n </ul>`);\n }\n }).catch(function(err){\n alert('error recieving calculation');\n console.log(err);\n })\n}//end displayLastCalculation", "function performCalculation(currentId) {\n var calc = userNumber; //Local var practice\n log('calc:'+ calc);\n\n switch (currentId){\n case \"crystalImage_0\":\n calc = calc + parseInt(crystalOneVal);\n break;\n case \"crystalImage_1\":\n calc = calc + parseInt(crystalTwoVal);\n break;\n case \"crystalImage_2\":\n calc = calc + parseInt(crystalThreeVal);\n break;\n case \"crystalImage_3\":\n calc = calc + parseInt(crystalFourVal);\n break;\n }\n userNumber = calc; // Update global variable\n log('performCalculation:' + userNumber)\n $(\"#displayUserNum\").html(userNumber);\n results(userNumber); // call results() to test Win-Lose-Continue condition \n\n }", "function getResults() {\n $.ajax({\n type: 'GET',\n url: '/result'\n }).then(function (response) {\n if(response[response.length - 1]) {\n setValues(response[response.length - 1].equation, numberWithCommas(response[response.length - 1].value));\n }\n $('#results').find('tbody').empty();\n for (let i = 0; i < response.length; i++) {\n let equation = response[i];\n $('#results tbody').append(`\n <tr data-id=\"${i}\" data-equation=\"${equation.equation}\" data-value=\"${equation.value}\">\n <td>${equation.equation}</td>\n <td>${numberWithCommas(equation.value)}</td>\n <td><button id=\"run-again\" class=\"btn btn-warning\">RUN AGAIN</button></td>\n <td><button id=\"delete\" class=\"btn btn-danger\">DELETE</button></td>\n </tr>\n `);\n }\n });\n}", "function initializeCalculator() {\n firstNumber = 0;\n\n // $(\".number, .operator, #result\").empty();\n $(\"#result\").html(total.toFixed(2));\n }", "function calculator() {\n verificationInputNumbers();\n\n if (numberArray.length > 1) {\n results.push(sum(numberArray));\n results.push(sub(numberArray));\n results.push(mult(numberArray));\n results.push(div(numberArray));\n } else if (numberArray.length === 1) {\n results.push(Math.sqrt(numberArray[0]));\n } else {\n alert('ERROR No ha introducido ningum valor, refresca la página!')\n }\n\n analyzeDecimal();\n formatFinalResult();\n newOperation();\n}", "function renderResults(servings, standardDrinks, calories) {\n\t\tif (window.logCalculations && (servings || standardDrinks || calories)) {\n\t\t\tconsole.log('=== Calculated ===');\n\t\t\tconsole.log('servings: '+servings);\n\t\t\tconsole.log('standard drinks: '+standardDrinks);\n\t\t\tconsole.log('calories: '+calories);\n\t\t}\n\n\t\t$servingsDisplay.text(servings);\n\t\t$drinksDisplay.text(standardDrinks.toFixed(1));\n\t\t$caloriesDisplay.text(Math.round(calories));\n\t}", "calc() {\n if (this.operation.length < 2) return;\n let result;\n\n //calculation if the operation is less than 2 operators\n if (this.operation.length == 2) {\n //calculation if the last operator is raised to power\n if (this.getLastPosition() == 'x²') {\n this.raisedPower(this.getLastPosition(false));\n return;\n }\n //calculation if the last operator is square root\n if (this.getLastPosition() == '√') {\n this.squareRoot(this.getLastPosition(false));\n return;\n }\n\n let firstNumber = this.operation[0];\n if (!this.lastOperator) this.lastOperator = this.getLastPosition();\n if (!this.lastNumber) this.pushOperator(firstNumber);\n if (this.lastNumber) this.pushOperator(this.lastNumber);;\n }\n\n //calculation if the operation is 3 or more operators\n if (this.operation.length > 3) {\n this.lastOperator = this.destroyLastOperator();\n } else if (this.operation.length == 3) {\n this.lastNumber = this.getLastPosition(false);\n this.lastOperator = this.getLastPosition();\n }\n\n //execute the of operation\n result = this.getResult();\n //validates of the last operator\n if (this.lastOperator == '%') {\n result /= 100;\n this.operation = [result];\n } else if (this.lastOperator == 'x²') {\n result *= result;\n this.operation = [result];\n } else {\n this._operation = [result, this.lastOperator];\n }\n\n this.updateDisplay(); \n }", "function calc(value) {\n if (\n value !== \"+\" &&\n value !== \"-\" &&\n value !== \"*\" &&\n value !== \"/\" &&\n value !== \"=\" &&\n value !== \"clear\"\n ) {\n numero(value);\n } else if (\n total !== undefined &&\n (value == \"+\" ||\n value == \"-\" ||\n value == \"*\" ||\n value == \"/\") &&\n (value !== \"=\" && value !== \"clear\")\n ) {\n simbolo(value);\n } else if (value == \"=\" && total !== undefined) {\n igual(value);\n }\n //If 'value' doesn't meet any above conditions and it's 'value' is 'clear', then clean the screen;\n if (value == \"clear\") {\n $results.html(\"<p>0</p>\").css({ \"font-size\": \"1.5em\" });\n $processed.html(\"<p></p>\").css({ \"font-size\": \"1.2em\" });\n total = 0;\n }\n }" ]
[ "0.74880457", "0.7394863", "0.7280815", "0.72197276", "0.7156501", "0.70714635", "0.7022014", "0.679462", "0.67822", "0.6777992", "0.6716648", "0.6692626", "0.664951", "0.6634787", "0.65943533", "0.6565198", "0.65605116", "0.65293264", "0.6506112", "0.65058047", "0.6497893", "0.64825153", "0.647517", "0.6466671", "0.64655405", "0.6454188", "0.645287", "0.643285", "0.6429212", "0.64137053", "0.6401778", "0.6386869", "0.63633585", "0.63424975", "0.6340978", "0.6329525", "0.6327885", "0.6327744", "0.6318849", "0.6311317", "0.6306523", "0.62708634", "0.62570906", "0.62549317", "0.6254439", "0.6232194", "0.62321717", "0.62314457", "0.62299967", "0.62267256", "0.6213063", "0.6208701", "0.61969596", "0.6186978", "0.61865777", "0.61803156", "0.61689407", "0.6166905", "0.6165739", "0.61608195", "0.6153596", "0.6143364", "0.61432976", "0.61410487", "0.61396706", "0.6132472", "0.61182594", "0.6114508", "0.611418", "0.61024505", "0.61022484", "0.6083061", "0.6080733", "0.6070315", "0.6069701", "0.60689765", "0.6068521", "0.6061177", "0.6055218", "0.6054871", "0.605406", "0.60532427", "0.604373", "0.60435253", "0.6037683", "0.6032474", "0.6029011", "0.6025192", "0.6021225", "0.601819", "0.6007862", "0.59904355", "0.59872824", "0.5976334", "0.59719855", "0.59710157", "0.5967162", "0.5963488", "0.5958664", "0.59548974" ]
0.7548231
0
================================================================================= ================================================================================== Sets the output array that falls on the map screeen. ==================================================================================
function setImpactValues(dgOutputs) { var impTbl = document.getElementById("ImpactValuesTable"); //var impTbl2 = document.getElementById("InputValuesTable"); //impTbl2.innerHTML = ' '; var keys = dgOutputs.keys() var values = dgOutputs.values(); var tableData = ""; for (var i = 0; i < keys.length;i++) { if (i % 2 && i != 0) tableData = tableData + "<tr><td>"+ keys[i]+ "</td><td>" + values[i] + "</td></tr>"; else tableData = tableData + "<tr class=\"alt\"><td>"+ keys[i]+ "</td><td>" + values[i] + "</td></tr>"; }//end for $('#ImpactValuesTable').html(tableData); //impTbl.innerHTML = tableData; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setOut() {\n this.geometricMidpoint = this.setGeometricMidpoint();\n this.out.push(this.geometricMidpoint);\n const idxs = [0, 1, 2];\n idxs.forEach((idx) => {\n this.out.push({\n X: this.coordinates[0][idx * 2],\n Y: this.coordinates[0][idx * 2 + 1],\n });\n });\n }", "mapGenerate() {\n for (let i = 0; i < this.ySize; i++) {\n this.map[i] = [];\n for (let j = 0; j < this.xSize; j++) {\n let mapValue = this.empty;\n this.map[i].push(mapValue);\n }\n }\n }", "setOut() {\n this.geometricMidpoint = getGeometricMidpoint(this.bounds);\n this.out.push({\n X: this.geometricMidpoint.X,\n Y: this.geometricMidpoint.Y,\n });\n this.setPlaneOut(0);\n this.setPlaneOut(this.coordinates.length - 1);\n }", "function outputMatrix(output){\n for(var i = 0; i < output.length; i++ ){\n for(var j = 0; j < output.length; j++){\n $(\"#c\" + i + \"\"+ j).attr(\"value\", output[i][j]);\n }\n }\n }", "get mapOut() {\n\t return _objectSpread({}, this.props.mapOut, {\n\t [this.rootKey]: internalMapOut\n\t });\n\t }", "constructor()\r\n\t{\r\n\t\tvar mapJ1 = [\r\n [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],\r\n\t\t[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],\r\n\t\t[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],\r\n\t\t[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],\r\n\t\t[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\r\n\t\t[0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,9,0],\r\n\t\t[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\r\n\t\t[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],\r\n\t\t[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],\r\n\t\t[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],\r\n [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]];\r\n\t\t\r\n\t\tvar mapJ2 = [\r\n [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],\r\n\t\t[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],\r\n\t\t[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],\r\n\t\t[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],\r\n\t\t[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\r\n\t\t[0,0,0,6,0,0,0,0,0,0,0,0,0,0,9,0,0,0],\r\n\t\t[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\r\n\t\t[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],\r\n\t\t[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],\r\n\t\t[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],\r\n [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]];\r\n\r\n var lvlList = [mapJ1, mapJ2]\r\n\t\tvar listLength = lvlList.length;\r\n\t\tvar lvlListIndex = -1;\r\n\t\tthis.GetLvl = function ()\r\n\t\t{\r\n\t\t\tif(lvlListIndex <= listLength)\r\n\t\t\t{\r\n\t\t\t\tlvlListIndex++;\r\n\t\t\t\treturn lvlList[lvlListIndex];\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t};\r\n\t}", "function setupCity(context){\n //Populates the array with all 0's representing land\n //for (let i = 0; i < WIDTH; i++){\n // city[i] = new Array(HEIGHT);\n //}\n //Populating the river in the middle of the array\n /*for (let i = 0; i < WIDTH; i++){\n for (let j = 0; j < HEIGHT; j++){\n if ((i > HALF_MAP - RIVER_WIDTH/2) && (i < HALF_MAP + RIVER_WIDTH/2)){\n if ((j > HALF_MAP * 0.5 - BRIDGE_WIDTH/2) && (j < HALF_MAP * 0.5 + BRIDGE_WIDTH/2)){\n city[i][j] = 0;\n }\n else if ((j > HALF_MAP * 1.5 - 20) && (j < HALF_MAP * 1.5 + 20)){\n city[i][j] = 0;\n }\n else{\n city[i][j] = 1;\n }\n }\n else{\n city[i][j] = 0;\n }\n }\n }*/\n /*toArray.loadPixels();\n let pixels = toArray.pixels;\n for(let i = 0; i < WIDTH; i++){\n for(let j = 0; j < HEIGHT; j++){\n let r = pixels[(j * WIDTH + i) * 4 + 0];\n let g = pixels[(j * WIDTH + i) * 4 + 1];\n let b = pixels[(j * WIDTH + i) * 4 + 2];\n let a = pixels[(j * WIDTH + i) * 4 + 3];\n //console.log(r + ';' + g + ';' + b + ';' + a);\n if(b == 236){\n city[i][j] = 1;\n }\n else{\n city[i][j] = 0;\n }\n //city[i][j] = 0;\n }\n }\n var fs = require('fs');\n\n var file = fs.createWriteStream('island.txt');\n file.on('error', function(err) {});\n city.forEach(function(v) { file.write(v.join(', ') + '\\n'); });\n file.end();\n */\n island = setupMap(context, islandStr);\n city = setupMap(context, cityStr);\n}", "initArrayMap() {\n for (let j = ((this.width - 1) / 2); j >= (-(this.width - 1) / 2); j--) {\n for (let i = (-(this.height - 1) / 2); i <= ((this.height - 1) / 2); i++) {\n this.arrayMap.push({\n coordX: i,\n coordY: j,\n navigable: true,\n player: {\n active: false\n },\n weapon: {\n active: false\n },\n potion: {\n active: false\n }\n });\n }\n }\n }", "function downloadMap(){\r\n ctx.clearRect(0, 0, canvas.width, canvas.height);\r\n ctx.fillStyle = \"black\";\r\n ctx.fillRect(0, 0, 1000, 1000);\r\n ctx.fillStyle = \"green\";\r\n ctx.font = \"50px Arial\";\r\n\r\n ctx.fillText(\"Creating map... Please wait...\",50,300);\r\n //download map to display\r\n\r\n //1. fill x and y array\r\n //2. fill map array with xy value as place holders (mainly to get correct array size)\r\n //3. call scale map\r\n //4. fill coordOG array\r\n //5. call scale coord\r\n\r\n}", "level1()\r\n {\r\n var map = \r\n [\r\n [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\r\n [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0],\r\n [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\r\n [0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],\r\n [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\r\n [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0],\r\n [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\r\n [0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],\r\n [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\r\n [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0],\r\n [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\r\n [0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],\r\n [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\r\n [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0],\r\n [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\r\n /*\r\n [0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],\r\n [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\r\n [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0],\r\n [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\r\n [0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],\r\n [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\r\n [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0],\r\n [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\r\n [0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],\r\n [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\r\n [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0],\r\n [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\r\n [0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],\r\n [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\r\n [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0],\r\n */\r\n ]\r\n\r\n /*\r\n Function that creates tiles of the map based on the map 2D array\r\n TODO -> create a separate function, so that we can create multiple different maps that use\r\n the same function\r\n */\r\n for(var x = 0; x < this.cols; x++)\r\n {\r\n var row = [];\r\n for(var y = 0; y < this.rows; y++)\r\n {\r\n var newTile = new Tile(x * 30, y * 30);\r\n if(map[y][x] == 0)\r\n newTile.placable = false;\r\n\r\n row.push(newTile);\r\n }\r\n this.canvas.push(row);\r\n }\r\n }", "function buildMap () {\n const map = [];\n\n // Class\n map.push(\n \"Jedi\", \"Sith\",\n \"Republic\", \"Imperial\",\n \"Jedi Knight\", \"Sith Warrior\",\n \"Guardian\", \"Juggernaut\",\n \"Sentinel\", \"Marauder\",\n \"Jedi Consular\", \"Sith Inquisitor\", \"data-sprite=\\\"jc-\", \"data-sprite=\\\"si-\",\n \"Shadow\", \"Assassin\",\n \"Sage\", \"Sorcerer\", \"data-sprite=\\\"sage-\", \"data-sprite=\\\"sorc-\",\n \"Seer\", \"Corruption\",\n \"Telekinetic\", \"Lightning\",\n \"Balance\", \"Madness\",\n \"Smuggler\", \"Imperial Agent\",\n \"Gunslinger\", \"Sniper\",\n \"Scoundrel\", \"Operative\",\n \"Trooper\", \"Bounty Hunter\",\n \"Vanguard\", \"Power Tech\",\n \"Commando\", \"Mercenary\",\n );\n\n // Sage / Sorcerer\n map.push(\n // Attacks\n \"Telekinetic Throw\", \"Force Lightning\", \"Vanquish\", \"Demolish\",\n \"Sever Force\", \"Creeping Terror\", \"Weaken Mind\", \"Affliction\",\n \"Force in Balance\", \"Death Field\", \"Force Serenity\", \"Force Leach\",\n \"Disturbance\", \"Lightning Strike\", \"Project\", \"Shock\",\n \"Force Quake\", \"Force Storm\", \"Mind Crush\", \"Crushing Darkness\",\n // Controls\n \"Force Lift\", \"Whirlwind\", \"Force Stun\", \"Electrocute\",\n \"Force Wave\", \"Overload\", \"Mind Snap\", \"Jolt\",\n // Heals\n \"Force Armor\", \"Static Barrier\", \"Force Mend\", \"Unnatural Preservation\",\n \"Rejuvenate\", \"Resurgense\", \"Benevolence\", \"Dark Heal\",\n \"Restoration\", \"Expunge\", \"Revival\", \"Reanimation\",\n \"Meditation\", \"Seethe\",\n // Buff & Utils\n \"Force Valor\", \"Mark of Power\", \"Mental Alacrity\", \"Polarity Shift\",\n \"Force Potency\", \"Recklessness\", \"Force Empowerment\", \"Unlimited Power\",\n \"Vindicate\", \"Consuming Darkness\", \"Force of Will\", \"Unbreakable Will\",\n \"Rescue\", \"Extrication\",\n // Passives\n \"Rippling Force\", \"Lightning Burns\",\n \"Resonant Pulse\", \"Dark Echo\",\n // Skillful\n \"Psychic Suffusion\", \"Force Suffusion\", \"Jedi Resistance\", \"Sith Defiance\",\n \"Tectonic Master\", \"Tempest Mastery\", \"Pain Bearer\", \"Empty Body\",\n \"Benevolent Haste\", \"Dark Speed\",\n // Masterful\n \"Blockout\", \"Supression\", \"Mind Ward\", \"Corrupted Flest\",\n \"Valiance\", \"Dark Resilience\", \"Confound\", \"Conspiring Force\",\n \"Telekinetic Defense\", \"Lightning Barrier\", \"Staggering Stratagem\", \"Torturous Tactics\",\n // Heroic\n \"Egress\", \"Emersion\", \"Mental Defense\", \"Shapeless Spirit\",\n \"Metaphysical Alacrity\", \"Surging Speed\", \"Kinetic Collapse\", \"Backlash\",\n \"Containment\", \"Haunted Dreams\", \"Force Wake\", \"Electric Bindings\",\n // Legendary\n \"Swift Rejuvenation\", \"Galvanizing Cleanse\",\n \"Life Ward\", \"Corrupted Barrier\", \"Valorous Spirit\", \"Unnatural Vigor\",\n \"Ethereal Entity\", \"Shifting Silhouette\", \"Impeding Slash\", \"Enfeebling Strike\",\n // Short names\n \"skittles\", \"lightnings\" );\n\n // Vanguard / Powertech\n map.push(\n \"Transpose\", \"Translocate\"\n );\n\n const dict = new Map(), list = [];\n for ( let i = 0, len = map.length ; i < len ; i += 2 ) {\n const p = map[i], e = map[i+1], pid = '#'+idify(p), eid = '#'+idify(e);\n dict.set( p , [ new RegExp( `\\\\b${p}(?!</a>)\\\\b` , 'g' ), e ] );\n dict.set( pid, [ new RegExp( `${pid}\\\\b`, 'g' ), eid ] );\n list.push( p, pid );\n }\n list.sort( revLenSort );\n return [ dict, list ];\n}", "mapToArray() {\n return this.map.apply(this, arguments).base;\n }", "initialiserMap() {\n this.terrain = {};\n this.arret = false;\n this.terrain.geometrie = JSON.parse(JSON.stringify(this.niveaux[this.niveauActuel].geometrie));\n this.terrain.dimension = {\n x: this.terrain.geometrie[0].length,\n y: this.terrain.geometrie.length\n };\n this.terrain.apparence = [];\n this.bitMasking();\n }", "function mapCreator(ySize, xSize) {\n mapArrays = [];\n\tfor(var idx = 0; idx < ySize; idx++) {\n \tmapArrays[idx] = [];\n \tfor(var idx2 = 0; idx2 < xSize; idx2++) {\n \t// Locations could be pushed here.\n var tempLocation = new Location(idx, idx2);\n \tmapArrays[idx].push(tempLocation);\n }\n }\n}", "function mapArray(){\n \n var lines = mapData.split(\"\\n\");\n $.each(lines, function(n, elem) {\n var cityname = elem.slice(0, elem.indexOf(\" \"));\n north = \"\";\n south = \"\";\n east =\"\";\n west = \"\";\n var val = elem.split(' ');\n $.each(val, function(d, dat) {\n Temp = dat;\n GetDir();\n });\n if(cityname != \"\"){\n Citys.push({\n CityName: cityname,\n North: north,\n South: south,\n East: east,\n West: west,\n Monsters: \"\",\n });\n }\n });\n GetMonsters();\n}", "function createOutput() {\n //Create mapshapes\n var mapshape=\"{{Mapframe|width=500|height=500|group=map1}}\\r\\n\";\n var titles = document.getElementsByClassName(\"dname\");\n //console.log(titles);\n //console.log(wikidataIds.length)\n var wikidataId;\n var fill;\n var title;\n\n for (var i = 0; i < wikidataIds.length; i++) {\n if (wikidataIds[i].length !=0) {\n wikidataId=wikidataIds[i];\n fill = \"{{StdColor|T\"+(i+1)+\"}}\"; //Use StdColor syntax of Wikivoyage\n //fill = stdColors[i];\n title = titles[i].value;\n\n mapshape += \"{{Mapshape|type=geoshape|wikidata=\" + wikidataId + \"|group=map1|fill=\" + fill + \"|title=\" + title + \"}}\\r\\n\";\n }\n }\n document.getElementById(\"textareabox\").innerHTML = mapshape;\n}", "setOutputValues() {\n }", "function setCoordinates()\n {\n var Coords = [];\n angular.forEach(map, function (relation) {\n var from = relation.source,\n to = relation.target;\n\n if(data[from] != undefined && data[to] != undefined) {\n var thisCord = getNearestPoints(from, to);\n if(thisCord !== null) {\n Coords.push(thisCord);\n }\n }\n });\n angular.extend(coordinates, Coords);\n }", "function ReloadMap () {\n\tif ( document.getElementById('change').innerText == 'Reload Map') {\n\t\t// Setting arrays to nothing in them //\n\t\tstrtxArray.length = 0;\n\t\tstrtyArray.length = 0;\n\t\tstopxArray.length = 0;\n\t\tstopyArray.length = 0;\n\t\t// End of setting array to Zero //\n\t\tarrowTypeArray.length = 0;\n\t\tclickcount = 0;\n\t\tvalidClick = 1;\n\t\tprevX = -1;\n\t\tprevY = -1;\n\t\tclearInterval(animate_interval);\n\t\tanimate_loop = 0;\n\t\tclearInterval(doAnimate);\n\t\tclearInterval(animate_loop);\n\t\tGetMapCursorPos();\n\t\tGetCurPosDraw();\n\t\t\n\n\t\tmyAnimate2();\n\t\tdoAnimate();\n\t\tdrawImage();\t\t\n\t\t\n\t\tconsole.log(\"arrayX=\" + ' ' + strtxArray[strtxArray.length]);\n\t\tconsole.log(\"arrayY=\" + ' ' + strtyArray[strtyArray.length]);\n\t} else {\n\t\tdocument.getElementById('change').innerHTML = 'Reload Map';\n\t\tdrawImage();\n\t\t}\n }", "function setMapOnAll(map) {\n for (let i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n for (let i = 0; i < choiceMarkers.length; i++) {\n choiceMarkers[i].setMap(map);\n } \n for (let i = 0; i < searchResMarkers.length; i++) {\n searchResMarkers[i].setMap(map);\n } \n}//setMapOnAll", "function resetCoordinates() {\n console.log('resetCoordinates');\n coordinates = [];\n }", "get renderMap() {\n\t\tlet map = create2dArray(this._width, this._height);\n\t\tfor (let x=0; x<this._width; x++) {\n\t\t\tfor (let y=0; y<this._height; y++) {\n\t\t\t\tif (this._map[x][y]) map[x][y] = {fill: 'red'};\n\t\t\t}\n\t\t}\n\n\t\tmap[this._start.x][this._start.y] = {fill: 'green'};\n\t\tmap[this._end.x][this._end.y] = {fill: 'blue'};\n\n\t\treturn map;\n\t}", "function setMapOnAll(map) {\n for (let i = 0; i < originMarkersArray.length; i++) {\n originMarkersArray[i].setMap(map);\n }\n for (let i = 0; i < currentMarkersArray.length; i++) {\n currentMarkersArray[i].setMap(map);\n }\n for (var i = 0; i < destinationMarkersArray.length; i++) {\n destinationMarkersArray[i].setMap(map);\n }\n }", "set Mipmaps(value) {}", "function twoDArrayToSheet(startVal,outSheet)\n{\n var capt = makeSetPatterns(startVal,startVal);\n //var outSheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(sheetName);\n for(var cA=0;cA<capt.length;cA++)\n {\n for (var cB=0;cB<capt[cA].length;cB++)\n {\n outSheet.getRange(cA+1,cB+1,1,1).setValue(capt[cA][cB])\n }\n }\n}", "function setStationLocations() {\n stations[0] = new Station(62 * windowWidth/575, windowHeight * 2 / 7);\n stations[1] = new Station(156 * windowWidth/575, windowHeight * 2 / 7);\n stations[2] = new Station(255 * windowWidth/575, windowHeight * 2 / 7);\n stations[3] = new Station(366 * windowWidth/575, windowHeight * 2 / 7);\n stations[4] = new Station(478 * windowWidth/575, windowHeight * 2 / 7);\n stations[5] = new Station(442 * windowWidth/575, windowHeight * 6 / 9);\n stations[6] = new Station(339 * windowWidth/575, windowHeight * 6 / 9);\n stations[7] = new Station(233 * windowWidth/575, windowHeight * 6 / 9);\n stations[8] = new Station(134 * windowWidth/575, windowHeight * 6 / 9);\n stations[9] = new Station(44 * windowWidth/575, windowHeight * 6 / 9);\n}", "mapTextures(iArray, param,underGrid) {\n\n if (param == \"terrain\") {\n //Fix For tiles Metal, Silver, Gold and Sterile tiles\n for (let j = 0; j < iArray.length; j++) {\n if (iArray[j] == 101 || iArray[j] == 246 || iArray[j] == 37 || iArray[j] == 199) {\n if (underGrid[j] != 0) {\n //Just shift the ID up one since we only care about tiles under dirt\n iArray[j] += 1;\n }\n }\n }\n\n for (let i = 0; i < iArray.length; i++) {\n //TINT THE TERRAIN TILE\n switch (iArray[i]) {\n case 2: //Concrete\n iArray[i] = 1;\n break;\n case 235: //Paved\n iArray[i] = 2;\n break;\n case 70: //Wood\n iArray[i] = 3;\n break;\n case 247: //metal //IF UNDER\n iArray[i] = 4;\n break;\n case 38: //silver //IF UNDER\n iArray[i] = 5;\n break;\n case 200: //gold //IF UNDER\n iArray[i] = 6;\n break;\n case 102: //sterile //If under\n iArray[i] = 7;\n break;\n case 174: //red\n iArray[i] = 8;\n break;\n case 232: //green\n iArray[i] = 9;\n break;\n case 202: //blue\n iArray[i] = 10;\n break;\n case 46: //cream\n iArray[i] = 11;\n break;\n case 231: //dark\n iArray[i] = 12;\n break;\n case 41: //burned wood\n iArray[i] = 13;\n break;\n case 171: //burned carpet\n iArray[i] = 14;\n break;\n case 88: //sandstone tile\n iArray[i] = 15;\n break;\n case 224: //granite tile\n iArray[i] = 16;\n break;\n case 160: //limestone tile\n iArray[i] = 17;\n break;\n case 219: //slate tile\n iArray[i] = 18;\n break;\n case 126: //Marble tile\n iArray[i] = 19;\n break;\n case 173: //slate flag\n iArray[i] = 20;\n break;\n case 169: //sandstone flag\n iArray[i] = 21;\n break;\n case 245: //granite flag\n iArray[i] = 22;\n break;\n case 59: //limestone flag\n iArray[i] = 23;\n break;\n case 1: //marble flagstone\n iArray[i] = 24;\n break;\n case 166: //sand\n iArray[i] = 25;\n break;\n case 161: //soil\n iArray[i] = 26;\n break;\n case 239: //marshy soil\n iArray[i] = 27;\n break;\n case 115: // rich soil\n iArray[i] = 28;\n break;\n case 48: //mud\n iArray[i] = 29;\n break;\n case 6: //marsh\n iArray[i] = 30;\n break;\n case 73: //gravel\n iArray[i] = 31;\n break;\n case 158: //lichen covered\n iArray[i] = 32;\n break;\n case 255: //ice\n iArray[i] = 33;\n break;\n case 205: //broken asphalt\n iArray[i] = 34;\n break;\n case 78: // packed dirt\n iArray[i] = 35;\n break;\n case 37: //underwall\n iArray[i] = 36;\n break;\n case 140: //deep water //DEEPOCEANWATER MISSING!!!!\n iArray[i] = 37;\n break;\n case 58: //moving deep water\n iArray[i] = 38;\n break;\n case 181: //shallow water\n iArray[i] = 39;\n break;\n case 137: //shallow ocean\n iArray[i] = 40;\n break;\n case 212: //shallow moving water\n iArray[i] = 40;\n break;\n case 56: //rough sandstone\n iArray[i] = 41;\n break;\n case 246: // rough hewn sandstone\n iArray[i] = 42;\n break;\n case 154: //smooth sandstone\n iArray[i] = 43;\n break;\n case 222: // rough granite\n iArray[i] = 44;\n break;\n case 116: // rough hewn granite\n iArray[i] = 45;\n break;\n case 199: //smooth granite\n iArray[i] = 46;\n break;\n case 99: //rough limestone\n iArray[i] = 47;\n break;\n case 82: // rought hewn limestone\n iArray[i] = 48;\n break;\n case 238: //smooth limestone\n iArray[i] = 49;\n break;\n case 148: //rough slate\n iArray[i] = 50;\n break;\n case 101: //rough hewn slate\n iArray[i] = 51;\n break;\n case 184: //smooth slate\n iArray[i] = 52;\n break;\n case 57: //rough marble\n iArray[i] = 53;\n break;\n case 135: //rough hewn marble\n iArray[i] = 54;\n break;\n case 208: //smooth marble\n iArray[i] = 55;\n break;\n case 21: //Moving river water?\n iArray[i] = 38;\n break;\n case 71: //Bridge\n iArray[i] = 3;\n break;\n case 153: //Softsand\n iArray[i] = 25;\n break;\n default:\n console.log(iArray[i]);\n }\n iArray[i] = iArray[i] -= 1; //fix for index offset\n }\n }\n return iArray;\n }", "function createTileMapArray()\n{\n delete fullMapArray;\n\n fullMapArray = [];\n for (var y = 0; y < MAP_TILE_HEIGHT; y++)\n {\n var rowArray = [];\n for (var x = 0; x < MAP_TILE_WIDTH; x++)\n {\n var tile = map.getTile(x, y, layer_map);\n \n if(tile != null)\n {\n var index = tile.index;\n rowArray.push(index);\n }\n }\n fullMapArray.push(rowArray);\n delete rowArray;\n }\n}", "_createTerrain() {\n // Map data creation\n // The map is a flat array of successive 3D coordinates (x, y, z).\n // It's defined by a number of points on its width : mapSubX\n // and a number of points on its height : mapSubZ\n \n var mapSubX = 200; // point number on X axis\n var mapSubZ = 200; // point number on Z axis\n var seed = 0.3; // seed\n var noiseScale = 0.03; // noise frequency\n var elevationScale = 1.0;\n noise.seed(seed);\n var mapData = new Float32Array(mapSubX * mapSubZ * 3); // x3 float values per point : x, y and z\n \n // SPMap with 3 object types\n var SPmapData = [];\n for ( var i = 0; i < this.terrainObjects.length; i++ ) {\n SPmapData.push([]);\n }\n \n for (var l = 0; l < mapSubZ; l++) {\n for (var w = 0; w < mapSubX; w++) {\n var x = (w - mapSubX * 0.5) * 2.0;\n var z = (l - mapSubZ * 0.5) * 2.0;\n var y = noise.simplex2(x * noiseScale, z * noiseScale); // altitude\n y *= (0.5 + y) * y * elevationScale;\n // objects of the map\n let index = l * mapSubX + w;\n // let's populate randomly\n if (Math.random() > 0.998) {\n let xp = x;\n let yp = y;\n let zp = z;\n \n let ry = Math.random() * 3.6;\n //let sx = 0.75 + Math.random()/2;\n let sx = 1;\n let sy = 0.75 + Math.random()/2;\n //let sz = 0.75 + Math.random()/2;\n let sz = 1;\n \n let type = index % this.terrainObjects.length;\n SPmapData[index % this.terrainObjects.length].push(xp, yp, zp, 0, ry, 0, sx, sy, sz);\n }\n \n mapData[3 *(l * mapSubX + w)] = x;\n mapData[3 * (l * mapSubX + w) + 1] = y;\n mapData[3 * (l * mapSubX + w) + 2] = z;\n \n }\n }\n \n this.sps = new BABYLON.SolidParticleSystem(\"sps\", this.world.scene, {useModelMaterial: true});\n for ( var i = 0; i < this.terrainObjects.length; i++ ) {\n this.sps.addShape(this.terrainObjects[i], 100);\n }\n this.sps.buildMesh();\n \n // Dynamic Terrain\n // ===============\n var terrainSub = 100; // 100 terrain subdivisions\n var params = {\n mapData: mapData, // data map declaration : what data to use ?\n mapSubX: mapSubX, // how are these data stored by rows and columns\n mapSubZ: mapSubZ,\n terrainSub: terrainSub, // how many terrain subdivisions wanted\n SPmapData: SPmapData, // Object map\n sps: this.sps\n }\n this.terrain = new BABYLON.DynamicTerrain(\"terrain\", params, this.world.scene);\n this.terrain.mesh.material = this.terrainMaterial;\n // https://www.html5gamedevs.com/topic/35066-babylonjs-dynamic-terrain-collision-fps-issue/\n // the most efficient way to check collisions with a dynamic terrain or any BJS Ground objects\n // (although they aren't the same) keeps to use the methods\n // getHeightAtCoordinates(x, z) and getNormalAtCoordinates(x, z)\n // or getHeithFromMap(x, z) and getNormalFromMap(x, z)\n // depending on the object class\n this.terrain.mesh.checkCollisions = this.checkCollisions;\n \n this.terrain.update(true);\n console.log('Terrain created');\n }", "function creaseMap() {\r\r\t// This will change to user values, just use defaults for now\r\tvar GREENDIR = -90;\r\tvar REDDIR = 0;\r\tvar EMBHEIGHT = 3;\r\tvar EMBAMT = 100;\r\t\r\t//get current doc, modify or set for output\r\tvar originalDoc = app.activeDocument;\r\t\r\t// check the dimensions of our current doc\r\tvar originalWidth = originalDoc.width;\r\tvar originalHeight = originalDoc.height;\r\t\r\tvar fixedDoc = app.documents.add(originalDoc.width, originalDoc.height, 72, \"newDoc\", NewDocumentMode.RGB, DocumentFill.TRANSPARENT);\r\r\tapp.activeDocument = originalDoc;\r\tvar savedActiveChannels = originalDoc.activeChannels;\r\tvar myChannels = originalDoc.channels\r\t\r\t//Go through all the channels, activating one at a time and copying to new document\r\tfor (var channelIndex = 0; channelIndex < myChannels.length; channelIndex++) {\r\t\t//make channel visible, \r\t\tmyChannels[channelIndex].visible= true\r\t\tvar aChannelArray = new Array();\r\t\taChannelArray[0] = myChannels[channelIndex];\r\t\toriginalDoc.activeChannels = aChannelArray;\r\r\t\t// turn off all the other channels\r\t\tfor (var secondaryIndex = 0; secondaryIndex < myChannels.length;\r\t\tsecondaryIndex++) {\r\t\t\tif (channelIndex != secondaryIndex) {\r\t\t\t\tmyChannels[secondaryIndex].visible= false\r\t\t\t}\r\t\t}\r\t\t// copy red and green channels to new doc, emboss based on channel name, config\r\t\tif (myChannels[channelIndex].name == \"Red\" || myChannels[channelIndex].name == \"Green\") {\r\t\t\toriginalDoc.selection.selectAll();\r\t\t\toriginalDoc.selection.copy();\r\t\t\tapp.activeDocument = fixedDoc;\r\t\t\tfixedDoc.selection.selectAll();\r\t\t\tnewLayer = fixedDoc.paste();\r\t\t\tnewLayer.name = myChannels[channelIndex].name;\r\t\t\tif (myChannels[channelIndex].name == \"Green\") {\r\t\t\t\temboss(GREENDIR, EMBHEIGHT, EMBAMT);\r\t\t\t\tnewLayer.blendMode = BlendMode.OVERLAY;\r\t\t\t}\r\t\t\t\r\t\t\tif (myChannels[channelIndex].name == \"Red\" ){\r\t\t\t\temboss(REDDIR, EMBHEIGHT, EMBAMT);\r\t\t\t}\r\t\t\tapp.activeDocument = originalDoc;\r\t\t}\r\t}\r\t// Flatten new few and rename remaining layer to CreaseMap\r\tapp.activeDocument = fixedDoc;\r\tfixedDoc.mergeVisibleLayers();\r\tfixedDoc.activeLayer.name = \"CreaswMap\";\r\tapp.activeDocument = originalDoc;\r\toriginalDoc.activeChannels = savedActiveChannels;\r\r}", "_setCoordinates() {\n this._bounds = [];\n this._coordinates = this._convertCoordinates(this._coordinates);\n\n this._projectedBounds = [];\n this._projectedCoordinates = this._projectCoordinates();\n\n this._center = this._coordinates;\n }", "function resetMap() {\n clearMap();\n removePolygon();\n }", "function updateMap(target) {\n const preview = target.parentElement.children;\n for (let v = 0; v < 8; v++) {\n if (preview[v] === target);\n const center = getCenter(mapArr);\n let xo = center[0] + adjVectors[v][0];\n let yo = center[1] + adjVectors[v][1];\n let terrain = preview[v+1].className;\n let entity;\n if (preview[v+1].firstChild) entity = preview[v+1].firstChild.className;\n mapArr[xo][yo] = (entity ? `${terrain} ${entity}` : terrain);\n }\n drawMap();\n}", "function mapDisplayer() {\n $(\"#map\").empty();\n for(var idx = 0; idx < mapArrays.length; idx++) {\n var tempString = \"\";\n for(var idx2 = 0; idx2 < mapArrays[idx].length; idx2++) {\n tempString += \"<span id=\\\"location-\" + idx + \"-\" + idx2 + \"\\\" class=\\\"\" + mapArrays[idx][idx2].color + \"\\\">\" + mapArrays[idx][idx2].symbol +\"</span>\";\n }\n $(\"#map\").append(\"<p>\" + tempString + \"</p>\");\n }\n}", "function viewOut(view, o) {\n view.outArray.push(o);\n }", "map(x, y, w, h, sx, sy) {\n let mapArray = this.mapData[0].layers[0].data;\n let tileSize = this.mapData[0].tileHeight;\n let numberVerticalTiles = this.mapData[0].layers[0].height;\n let numberHorizontalTiles = this.mapData[0].layers[0].width;\n let width = w || numberHorizontalTiles;\n let height = h || numberVerticalTiles;\n this.mapAdjustments.x = x || 0;\n this.mapAdjustments.y = y || 0;\n let x1 = sx || 0;\n let y1 = sy || 0;\n // evaluate runtime errors\n if (this.mapAdjustments.x < 0 || this.mapAdjustments.y < 0) {\n throw new RangeError(\"map(): Starting tile cannot be negative!. \");\n }\n for (let y0 = this.mapAdjustments.y; y0 < height; y0++) {\n for (let x0 = this.mapAdjustments.x; x0 < width; x0++) {\n this.spr(mapArray[y0][x0], x1 + (x0 - this.mapAdjustments.x) * tileSize, y1 + (y0 - this.mapAdjustments.y) * tileSize);\n }\n }\n }", "syncArray() {\n\t\tthis._PCE_array[0] = this._southbound_PCEs;\n\t\tthis._PCE_array[1] = this._westbound_PCEs; \n\t\tthis._PCE_array[2] = this._northbound_PCEs;\n\t\tthis._PCE_array[3] = this._eastbound_PCEs;\n\t}", "function setup (){\n \n pjCol = 0; //pixeles\n pjFill = 0; // pixeles\n xPos = (pjCol * 40)+ 20;\n xPos = (pjFill * 40)+ 20;\n\n\n// Crear arreglo de arreglos\nfor (let index = 0; index < 20; index ++){\n\n mapa.push (new Array(20));\n}\n\n//Asignar valores iniciales\nfor (let fill = 0; fill < 20; fill++){\n for (let col = 0; col < 6; col++){\n mapa [fill][col] = 0;\n }\n}\n\n//seleccionamos algunos [fill][col] --> y, x\nmapa [0][0] = 1;\nmapa [0][1] = 1;\nmapa [0][4] = 1;\nmapa [0][5] = 1;\nmapa [1][0] = 1;\nmapa [1][1] = 1;\nmapa [1][4] = 1;\nmapa [1][5] = 1;\nmapa [2][0] = 1;\nmapa [2][1] = 1;\nmapa [2][4] = 1;\nmapa [2][5] = 1;\nmapa [3][4] = 1;\nmapa [4][4] = 1;\nmapa [3][5] = 1;\n \n}", "function setAllMap(map)\n{\n for (var i = 0; i < markers.length; i++)\n {\n markers[i].setMap(map);\n }\n poly.setMap(map);\n}", "function generateMap() {\n for (let x = 0; x < mapSize; x++) {\n map.push([]);\n for (let y = 0; y < mapSize; y++) {\n map[x].push(new Tile(x, y));\n }\n }\n\n generateOutline();\n}", "function clear() {\n\tfor (var y=0; y < mapy; y++) {\n\t\tvar row = new Array(mapx);\n\t\t\n\t\tfor (var x=0; x < mapx; x++) {\n\t\t\trow[x] = '.';\n\t\t}\n\t\t\n\t\tmap[y] = row;\n\t}\n}", "function clearOutputData() {\n console.log('clearOutputData');\n gaOutputData = [];\n updateOutputDataDisplay();\n}", "appendMapData(newData, coordinates, scene) {\n const parkingSpaceCalcInfo = [];\n for (const kind in newData) {\n if (!newData[kind]) {\n continue;\n }\n\n if (!this.data[kind]) {\n this.data[kind] = [];\n }\n\n for (let i = 0; i < newData[kind].length; ++i) {\n switch (kind) {\n case 'lane':\n const lane = newData[kind][i];\n this.data[kind].push(Object.assign(newData[kind][i], {\n drewObjects: this.addLane(lane, coordinates, scene),\n text: this.addLaneId(lane, coordinates, scene),\n }));\n break;\n case 'clearArea':\n this.data[kind].push(Object.assign(newData[kind][i], {\n drewObjects: this.addZone(\n newData[kind][i], colorMapping.YELLOW, coordinates, scene,\n ),\n }));\n break;\n case 'crosswalk':\n this.data[kind].push(Object.assign(newData[kind][i], {\n drewObjects: this.addZone(\n newData[kind][i], colorMapping.PURE_WHITE, coordinates, scene,\n ),\n }));\n break;\n case 'junction':\n this.data[kind].push(Object.assign(newData[kind][i], {\n drewObjects: this.addBorder(\n newData[kind][i], colorMapping.BLUE, coordinates, scene,\n ),\n }));\n break;\n case 'pncJunction':\n this.data[kind].push(Object.assign(newData[kind][i], {\n drewObjects: this.addZone(\n newData[kind][i], colorMapping.BLUE, coordinates, scene,\n ),\n }));\n break;\n case 'signal':\n this.data[kind].push(Object.assign(newData[kind][i], {\n drewObjects: this.addStopLine(\n newData[kind][i].stopLine, coordinates, scene,\n ),\n }));\n this.trafficSignals.add([newData[kind][i]], coordinates, scene);\n break;\n case 'stopSign':\n this.data[kind].push(Object.assign(newData[kind][i], {\n drewObjects: this.addStopLine(\n newData[kind][i].stopLine, coordinates, scene,\n ),\n }));\n this.stopSigns.add([newData[kind][i]], coordinates, scene);\n break;\n case 'yield':\n this.data[kind].push(Object.assign(newData[kind][i], {\n drewObjects: this.addStopLine(\n newData[kind][i].stopLine, coordinates, scene,\n ),\n }));\n this.yieldSigns.add([newData[kind][i]], coordinates, scene);\n break;\n case 'road':\n const road = newData[kind][i];\n this.data[kind].push(Object.assign(newData[kind][i], {\n drewObjects: this.addRoad(road, coordinates, scene),\n }));\n break;\n case 'parkingSpace':\n this.data[kind].push(Object.assign(newData[kind][i], {\n drewObjects: this.addBorder(\n newData[kind][i], colorMapping.YELLOW, coordinates, scene,\n ),\n text: this.addParkingSpaceId(newData[kind][i], coordinates, scene),\n }));\n parkingSpaceCalcInfo.push(this.calcParkingSpaceExtraInfo(newData[kind][i],\n coordinates));\n break;\n case 'speedBump':\n this.data[kind].push(Object.assign(newData[kind][i], {\n drewObjects: this.addCurve(\n newData[kind][i].position, colorMapping.RED, coordinates, scene,\n ),\n }));\n break;\n default:\n this.data[kind].push(newData[kind][i]);\n break;\n }\n }\n }\n return [parkingSpaceCalcInfo];\n }", "function CreateMapArray() {\n\tgridArr = [];\n\tfor(i=0; i<100; i++) {\n\t\tgridArr.push({open: 0, room: \"\", explored: 0, sDoor: 0, pathValue: 0, encounter: \"\", nonPC: \"\", loot: [], trapType: \"\", trapState: 0, notes: \"\"});\n\n\t}\n}", "function map() {\n\n}", "initializeResultsArray() {\n\t\t// Can be run only after this.checkpoints are initialized\n\t\tthis.checkpoints.forEach((cp, cp_i) => {\n\t\t\tthis.runResults[cp_i] = [];\n\t\t\tcp.testCases.forEach((testcase, tc_i) => {\n\t\t\t\tthis.runResults[cp_i][tc_i] = [];\n\t\t\t});\n\t\t});\n\t}", "function renderResults(){\n resultsArray = [];\n visibleMarkersId = [];\n visibleMarkersOnMap = [];\n\n for (var i = 0; i < newMarkers.length; i++) {\n if ( map.getBounds().contains(newMarkers[i].getPosition()) ){\n visibleMarkersOnMap.push(newMarkers[i]);\n visibleMarkersId.push( $(newMarkers[i].content.firstChild).attr(\"data-id\") );\n newMarkers[i].setVisible(true);\n }\n else {\n newMarkers[i].setVisible(false);\n }\n }\n markerCluster.repaint();\n }", "updateOutputZone() {\n this._editor.changeViewZones(changeAccessor => {\n changeAccessor.removeZone(this.data.outputZoneId);\n this.outputZoneCallback(changeAccessor);\n });\n }", "function resetMapMarkers() {\n bigMap.config.markers = angular.copy(defaultMarkers);\n }", "function SetMapSize() {\n document.documentElement.style.setProperty('--boardX', boardSize.x);\n document.documentElement.style.setProperty('--boardY', boardSize.y);\n}", "function set_map() {\n var half = settings.get('half');\n logd('set_map maps[' + week + ']:');\n logd(maps[week]);\n logd('(' + half + ' % 2 === 1)?' + (half-1)/2 + ':' + (half-2)/2);\n // var map = maps[(settings.get('half') > 2)?(parseInt(week)+1):week];\n var map = maps[week][(half % 2 === 1)?(half-1)/2:(half-2)/2];\n logd('maps[' + week + '][' + ((half % 2 === 1)?(half-1)/2:(half-2)/2) + '] = ' + map);\n tagpro.group.socket.emit(\"setting\", {\"name\": \"map\", \"value\": map}); // if in second game, use the next map\n}", "function UpdateGraphicsZoomMap() {\n\tswitch(gridZoom) {\n\t\tcase 3:\n\t\t\tzoomPosition = [OPC.currentPos -11, OPC.currentPos -10, OPC.currentPos -9, OPC.currentPos -1, OPC.currentPos, OPC.currentPos +1, OPC.currentPos +9, OPC.currentPos +10, OPC.currentPos +11];\n\t\t\tfor(i = 0; i < zoomPosition.length; i ++) {\n\t\t\t\tdocument.getElementById(\"gz\" + i.toString()).style.backgroundImage = \"none\";\n\t\t\t\tdocument.getElementById(\"gz\" + i.toString()).style.backgroundColor = 'RGBA(255,255,255,1)';\n\t\t\t}\n\t\t\tfor(i = 0; i < gridArr.length; i ++) { // do for the whole map array\n\t\t\t\tif(zoomPosition.includes(i)) {\n\t\t\t\t\tif (gridArr[i].open > 0) { // only work on open areas of the map\n\t\t\t\t\t\texits = GetExits(i);\n\t\t\t\t\t\tswitch(exits) { // determine which graphic to display to reflect the available exits\n\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\timg = \"D\";\n\t\t\t\t\t\t\t\trotation = \"270\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 10:\n\t\t\t\t\t\t\t\timg = \"D\";\n\t\t\t\t\t\t\t\trotation = \"180\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 11:\n\t\t\t\t\t\t\t\timg = \"L\";\n\t\t\t\t\t\t\t\trotation = \"180\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 100:\n\t\t\t\t\t\t\t\timg = \"D\";\n\t\t\t\t\t\t\t\trotation = \"90\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 101:\n\t\t\t\t\t\t\t\timg = \"I\";\n\t\t\t\t\t\t\t\trotation = \"90\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 110:\n\t\t\t\t\t\t\t\timg = \"L\";\n\t\t\t\t\t\t\t\trotation = \"90\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 111:\n\t\t\t\t\t\t\t\timg = \"T\";\n\t\t\t\t\t\t\t\trotation = \"90\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 1000:\n\t\t\t\t\t\t\t\timg = \"D\";\n\t\t\t\t\t\t\t\trotation = \"0\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 1001:\n\t\t\t\t\t\t\t\timg = \"L\";\n\t\t\t\t\t\t\t\trotation = \"270\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 1010:\n\t\t\t\t\t\t\t\timg = \"I\";\n\t\t\t\t\t\t\t\trotation = \"0\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 1011:\n\t\t\t\t\t\t\t\timg = \"T\";\n\t\t\t\t\t\t\t\trotation = \"180\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 1100:\n\t\t\t\t\t\t\t\timg = \"L\";\n\t\t\t\t\t\t\t\trotation = \"0\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 1101:\n\t\t\t\t\t\t\t\timg = \"T\";\n\t\t\t\t\t\t\t\trotation = \"270\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 1110:\n\t\t\t\t\t\t\t\timg = \"T\";\n\t\t\t\t\t\t\t\trotation = \"0\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 1111:\n\t\t\t\t\t\t\t\timg = \"X\";\n\t\t\t\t\t\t\t\trotation = \"\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(gridArr[i].room == \"T\" ||\n\t\t\t\t\t\tgridArr[i].room == \"R\") {\n\t\t\t\t\t\t\tgraphic = \"url(img/png/tunnel\" + img + rotation + \".png)\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tgraphic = \"url(img/png/room\" + img + rotation + \".png)\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdocument.getElementById(\"gz\" + zoomPosition.indexOf(i).toString()).style.backgroundImage = graphic;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 10:\n\t\t\tfor(i=0; i < 9; i ++) {\n\t\t\t\tdocument.getElementById(\"gz\" + i.toString()).style.backgroundImage = 'none';\n\t\t\t\tdocument.getElementById(\"gz\" + i.toString()).style.backgroundColor = 'rgba(255,255,255,0)';\n\t\t\t}\n\t\t\tbreak;\n\t}\n}", "function Map() {\n\t\n}", "function Map() {\n\t\n}", "function newMap() {\n\t\t'use strict';\n\n\t\t// resulting map\n\t\tvar map = [];\n\n\t\t// number of rows and columns\n\t\tgameMetrics.x = 16;\n\t\tgameMetrics.y = Math.floor(gameMetrics.x / Config.boardRatio);\n\n\t\t// populate map with -1\n\t\tfor (var i = 0; i < gameMetrics.y; i++) {\n\t\t\tvar row = [];\n\t\t\tfor (var j = 0; j < gameMetrics.x; j++) {\n\t\t\t\trow.push(-1);\n\t\t\t}\n\t\t\tmap.push(row);\n\t\t}\n\t\treturn map;\n\n\t}", "function updateBaseMap0() {\n //alert(mapID);\n if (dom.byId(\"blayerS\" + mapID).checked) {\n roeMapWetS.setBasemap(\"hybrid\");\n } else {\n roeMapWetS.setBasemap(\"gray\");\n }\n }", "function output(){\n out=new Array();\n for (var i=0; i<document.getElementById(\"canvas\").width; i++){\n\tout.push(new Array());\n\tfor (var j=0; j<document.getElementById(\"canvas\").height; j++){\n\t out[i].push(0);\n\t}\n }\n for(var i=0; i<clickX.length; i++){\n\tcenterX=clickX[i];\n\tcenterY=clickY[i];\n\th=heights[i];\n\tr=radii[i];\n\tfor(x=0; x<=r; x++){\n\t for (y=0; y*y<=r*r-x*x; y++){\n\t\tout[centerX+x][centerY+y]=h; //have to do for each quadrant\n\t\tout[centerX-x][centerY+y]=h;\n\t\tout[centerX+x][centerY-y]=h;\n\t\tout[centerX-x][centerY-y]=h;\n\t }\n\t}\n }\n height=document.getElementById(\"canvas\").height;\n width=document.getElementById(\"canvas\").width;\n document.write(\"<br/>\");\n\n for (var i=0; i<width; i++){\n\tdocument.write(out[i]);\n\tdocument.write(\"<br/>\");\n }\n\n}", "resetMapLocation() {\n\t\tthis.map.setCenter({\n\t\t\tlat: locsearch.map_attributes.initial_lat,\n\t\t\tlng: locsearch.map_attributes.initial_lng,\n\t\t});\n\t\tthis.map.setZoom( locsearch.map_attributes.max_zoom );\n\t}", "function load_map(array) {\n\n for (var i = 0; i < grid.children.length; i++) {\n grid.getChildAt(i).gotoAndStop(array[i]);\n }\n\n renderer.render(stage);\n}", "function setAllMap(map) {\n for (var i = 0; i < markerArray.length; i++) {\n markerArray[i].setMap(map);\n }\n}", "function updateBaseMap0() {\n //alert(mapID);\n if (dom.byId(\"blayerS\" + mapID).checked) {\n roeMapWetN.setBasemap(\"hybrid\");\n } else {\n roeMapWetN.setBasemap(\"gray\");\n }\n }", "resetPlaces() {\n this.map = _.times(this.cfg.places, (i) => {\n return { x: i * this.cfg.width, y: 0, empty: true };\n });\n }", "updateMountainPoints() {\n for (var i = nMountains; i >= 0; i--) {\n var curMountain = this.mountainPoints[i];\n var updatedMountain = [];\n updatedMountain.push(curMountain[curMountain.length - 1]);\n updatedMountain = updatedMountain.concat(\n curMountain.slice(0, curMountain.length - 1)\n );\n this.mountainPoints[i] = updatedMountain;\n }\n }", "function output(rowclue, colclue, S) {\n\n\tvar row, col, a, name, i, j;\n\trow = rowclue.length;\n\tcol = colclue.length;\n\t\n\tif (!S.is_solved()) {throw \"Found an unsolved space in solvedStack!\";} //should not happen\n\t\n\ta = Array.matrix(row, col, 0);\n\t\n\t//Copy the solved value in variable dom into matrix\n\tfor (i = 0; i < row; i++) {\n\t\tfor (j = 0; j < col; j++) {\n\t\t\tname = \"r\"+i+\"c\"+j;\n\t\t\ta[i][j] = S.vars[name].dom[0][0];\n\t\t\t\n\t\t}\n\t}\n\t\n\treturn a;\n\t\n}", "function Rn(){this.seq=[],this.map={}}// --- Utilities ---", "function Init()\n{\n // write code here\n map = {};\n}", "function EnvironmentMapGenerator(canvas, sizeField, outputPanel) {\n this._canvas = canvas;\n this._sizeField = sizeField;\n this._outputPanel = outputPanel;\n this._sphereMaterials = [];\n }", "function ready(data_festivals) {\n\n\ndata_festivals = data_festivals.filter(d=>d['Lon,Lat'])\n\n\n data_festivals.forEach(d =>{\n d.latitude = d['Lon,Lat'].split(',')[1]\n d.longitude = d['Lon,Lat'].split(',')[0]\n d.latLong = [+d.latitude, +d.longitude];\n\n })\n\nconsole.log(data_festivals)\n\n\nall_data_festivals = data_festivals\n\nconfigMap(data_festivals)\n\n\n}", "setMapping(){\n this.amharicPhoneticMap.set('h', 'ህ');\n this.amharicPhoneticMap.set('ha', 'ሃ');\n this.amharicPhoneticMap.set('he', ['ሄ', 'ሀ']);\n this.amharicPhoneticMap.set('hi', 'ሂ');\n this.amharicPhoneticMap.set('ho', 'ሆ');\n this.amharicPhoneticMap.set('hu', 'ሁ');\n\n this.amharicPhoneticMap.set('l', 'ል');\n this.amharicPhoneticMap.set('la', 'ላ');\n this.amharicPhoneticMap.set('le', ['ሌ', 'ለ']);\n this.amharicPhoneticMap.set('li', 'ሊ');\n this.amharicPhoneticMap.set('lo', 'ሎ');\n this.amharicPhoneticMap.set('lu', 'ሉ');\n\n this.amharicPhoneticMap.set('m', 'ም');\n this.amharicPhoneticMap.set('ma', 'ማ');\n this.amharicPhoneticMap.set('me', ['ሜ', 'መ']);\n this.amharicPhoneticMap.set('mi', 'ሚ');\n this.amharicPhoneticMap.set('mo', 'ሞ');\n this.amharicPhoneticMap.set('mu', 'ሙ');\n\n this.amharicPhoneticMap.set('s', 'ስ');\n this.amharicPhoneticMap.set('sa', 'ሳ');\n this.amharicPhoneticMap.set('se', ['ሴ', 'ሰ']);\n this.amharicPhoneticMap.set('si', 'ሲ');\n this.amharicPhoneticMap.set('so', 'ሶ');\n this.amharicPhoneticMap.set('su', 'ሱ');\n\n this.amharicPhoneticMap.set('r', 'ር');\n this.amharicPhoneticMap.set('ra', 'ራ');\n this.amharicPhoneticMap.set('re', ['ሬ', 'ረ']);\n this.amharicPhoneticMap.set('ri', 'ሪ');\n this.amharicPhoneticMap.set('ro', 'ሮ');\n this.amharicPhoneticMap.set('ru', 'ሩ');\n\n this.amharicPhoneticMap.set('sh', 'ሽ');\n this.amharicPhoneticMap.set('sha', 'ሻ');\n this.amharicPhoneticMap.set('she', ['ሼ', 'ሸ']);\n this.amharicPhoneticMap.set('shi', 'ሺ');\n this.amharicPhoneticMap.set('sho', 'ሾ');\n this.amharicPhoneticMap.set('shu', 'ሹ');\n\n this.amharicPhoneticMap.set('q', 'ቅ');\n this.amharicPhoneticMap.set('qa', 'ቃ');\n this.amharicPhoneticMap.set('qe', ['ቄ', 'ቀ']);\n this.amharicPhoneticMap.set('qi', 'ቂ');\n this.amharicPhoneticMap.set('qo', 'ቆ');\n this.amharicPhoneticMap.set('qu', 'ቁ');\n\n this.amharicPhoneticMap.set('b', 'ብ');\n this.amharicPhoneticMap.set('ba', 'ባ');\n this.amharicPhoneticMap.set('be', ['ቤ', 'በ']);\n this.amharicPhoneticMap.set('bi', 'ቢ');\n this.amharicPhoneticMap.set('bo', 'ቦ');\n this.amharicPhoneticMap.set('bu', 'ቡ');\n\n this.amharicPhoneticMap.set('t', ['ት', 'ጥ']);\n this.amharicPhoneticMap.set('ta', ['ታ', 'ጣ']);\n this.amharicPhoneticMap.set('te', ['ቴ', 'ተ', 'ጤ', 'ጠ']);\n this.amharicPhoneticMap.set('ti', ['ቲ', 'ጢ']);\n this.amharicPhoneticMap.set('to', ['ቶ', 'ጦ']);\n this.amharicPhoneticMap.set('tu', ['ቱ', 'ጡ']);\n\n this.amharicPhoneticMap.set('ch', ['ች', 'ጭ']);\n this.amharicPhoneticMap.set('cha', ['ቻ', 'ጫ']);\n this.amharicPhoneticMap.set('che', ['ቼ', 'ቸ', 'ጬ', 'ጨ']);\n this.amharicPhoneticMap.set('chi', ['ቺ', 'ጪ']);\n this.amharicPhoneticMap.set('cho', ['ቾ', 'ጮ']);\n this.amharicPhoneticMap.set('chu', ['ቹ', 'ጩ']);\n\n this.amharicPhoneticMap.set('c', ['ች', 'ክ']);\n this.amharicPhoneticMap.set('ca', ['ቻ', 'ካ']);\n this.amharicPhoneticMap.set('ce', ['ቼ', 'ቸ', 'ኬ', 'ከ']);\n this.amharicPhoneticMap.set('ci', ['ቺ', 'ኪ']);\n this.amharicPhoneticMap.set('co', ['ቾ', 'ኮ']);\n this.amharicPhoneticMap.set('cu', ['ቹ', 'ኩ']);\n\n this.amharicPhoneticMap.set('n', 'ን');\n this.amharicPhoneticMap.set('na', 'ና');\n this.amharicPhoneticMap.set('ne', ['ኔ', 'ነ']);\n this.amharicPhoneticMap.set('ni', 'ኒ');\n this.amharicPhoneticMap.set('no', 'ኖ');\n this.amharicPhoneticMap.set('nu', 'ኑ');\n\n this.amharicPhoneticMap.set('gn', 'ኝ');\n this.amharicPhoneticMap.set('gna', 'ኛ');\n this.amharicPhoneticMap.set('gne', ['ኜ', 'ኘ']);\n this.amharicPhoneticMap.set('gni', 'ኚ');\n this.amharicPhoneticMap.set('gno', 'ኞ');\n this.amharicPhoneticMap.set('gnu', 'ኙ');\n\n this.amharicPhoneticMap.set('a', 'ኣ');\n this.amharicPhoneticMap.set('e', ['ኤ']);\n this.amharicPhoneticMap.set('i', 'ኢ');\n this.amharicPhoneticMap.set('o', 'ኦ');\n this.amharicPhoneticMap.set('u', 'ኡ');\n\n this.amharicPhoneticMap.set('k', 'ክ');\n this.amharicPhoneticMap.set('ka', 'ካ');\n this.amharicPhoneticMap.set('ke', ['ኬ', 'ከ']);\n this.amharicPhoneticMap.set('ki', 'ኪ');\n this.amharicPhoneticMap.set('ko', 'ኮ');\n this.amharicPhoneticMap.set('ku', 'ኩ');\n\n this.amharicPhoneticMap.set('w', 'ው');\n this.amharicPhoneticMap.set('wa', 'ዋ');\n this.amharicPhoneticMap.set('we', ['ዌ', 'ወ']);\n this.amharicPhoneticMap.set('wi', 'ዊ');\n this.amharicPhoneticMap.set('wo', 'ዎ');\n this.amharicPhoneticMap.set('wu', 'ዉ');\n\n this.amharicPhoneticMap.set('w', 'ው');\n this.amharicPhoneticMap.set('wa', 'ዋ');\n this.amharicPhoneticMap.set('we', ['ዌ', 'ወ']);\n this.amharicPhoneticMap.set('wi', 'ዊ');\n this.amharicPhoneticMap.set('wo', 'ዎ');\n this.amharicPhoneticMap.set('wu', 'ዉ');\n\n this.amharicPhoneticMap.set('z', 'ዝ');\n this.amharicPhoneticMap.set('za', 'ዛ');\n this.amharicPhoneticMap.set('ze', ['ዜ', 'ዘ']);\n this.amharicPhoneticMap.set('zi', 'ዚ');\n this.amharicPhoneticMap.set('zo', 'ዞ');\n this.amharicPhoneticMap.set('zu', 'ዙ');\n\n this.amharicPhoneticMap.set('x', 'ዝ');\n this.amharicPhoneticMap.set('xa', 'ዛ');\n this.amharicPhoneticMap.set('xe', ['ዜ', 'ዘ']);\n this.amharicPhoneticMap.set('xi', 'ዚ');\n this.amharicPhoneticMap.set('xo', 'ዞ');\n this.amharicPhoneticMap.set('xu', 'ዙ');\n\n this.amharicPhoneticMap.set('y', 'ይ');\n this.amharicPhoneticMap.set('ya', 'ያ');\n this.amharicPhoneticMap.set('ye', ['ዬ', 'የ']);\n this.amharicPhoneticMap.set('yi', 'ዪ');\n this.amharicPhoneticMap.set('yo', 'ዮ');\n this.amharicPhoneticMap.set('yu', 'ዩ');\n\n this.amharicPhoneticMap.set('d', 'ድ');\n this.amharicPhoneticMap.set('da', 'ዳ');\n this.amharicPhoneticMap.set('de', ['ዴ', 'ደ']);\n this.amharicPhoneticMap.set('di', 'ዲ');\n this.amharicPhoneticMap.set('do', 'ዶ');\n this.amharicPhoneticMap.set('du', 'ዱ');\n\n this.amharicPhoneticMap.set('j', 'ጅ');\n this.amharicPhoneticMap.set('ja', 'ጃ');\n this.amharicPhoneticMap.set('je', ['ጄ', 'ጀ']);\n this.amharicPhoneticMap.set('ji', 'ጂ');\n this.amharicPhoneticMap.set('jo', 'ጆ');\n this.amharicPhoneticMap.set('ju', 'ጁ');\n\n this.amharicPhoneticMap.set('g', 'ግ');\n this.amharicPhoneticMap.set('ga', 'ጋ');\n this.amharicPhoneticMap.set('ge', ['ጌ', 'ገ']);\n this.amharicPhoneticMap.set('gi', 'ጊ');\n this.amharicPhoneticMap.set('go', 'ጎ');\n this.amharicPhoneticMap.set('gu', 'ጉ');\n\n this.amharicPhoneticMap.set('ts', 'ጽ');\n this.amharicPhoneticMap.set('tsa', 'ጻ');\n this.amharicPhoneticMap.set('tse', ['ጼ', 'ጸ']);\n this.amharicPhoneticMap.set('tsi', 'ጺ');\n this.amharicPhoneticMap.set('tso', 'ጾ');\n this.amharicPhoneticMap.set('tsu', 'ጹ');\n\n this.amharicPhoneticMap.set('f', 'ፍ');\n this.amharicPhoneticMap.set('fa', 'ፋ');\n this.amharicPhoneticMap.set('fe', ['ፌ', 'ፈ']);\n this.amharicPhoneticMap.set('fi', 'ፊ');\n this.amharicPhoneticMap.set('fo', 'ፎ');\n this.amharicPhoneticMap.set('fu', 'ፉ');\n\n this.amharicPhoneticMap.set('p', 'ፕ');\n this.amharicPhoneticMap.set('pa', 'ፓ');\n this.amharicPhoneticMap.set('pe', ['ፔ', 'ፐ']);\n this.amharicPhoneticMap.set('pi', 'ፒ');\n this.amharicPhoneticMap.set('po', 'ፖ');\n this.amharicPhoneticMap.set('pu', 'ፑ');\n\n this.amharicPhoneticMap.set('v', 'ቭ');\n this.amharicPhoneticMap.set('va', 'ቫ');\n this.amharicPhoneticMap.set('ve', ['ቬ', 'ቨ']);\n this.amharicPhoneticMap.set('vi', 'ቪ');\n this.amharicPhoneticMap.set('vo', 'ቮ');\n this.amharicPhoneticMap.set('vu', 'ቩ');\n }", "getLayerOuts(){\n var lo=[];\n this.neurons.forEach(function(neuron) {\n lo.push(neuron.output);\n });\n this.layerOutputs=lo;\n return this.layerOutputs; \n }", "save(){\n let coords = this.coords.slice(0).map(row => row.slice(0)); // shadow cloning array of arrays.\n super.save({\n coords,\n x:this.x,\n y:this.y\n });\n }", "function draw_all_maps() {\n\n\t// deep copy all classification of mapA to all classification of map0\n\tapp.map0classification = $.extend(true, {}, app.mapAclassification);\n\t//console.log('app.map0classification:', app.map0classification)\n\t\n\tvar cc = app.map0classification.color + app.map0classification.count\n\tapp.colorGradient0 = COLOR_CLASS[cc].slice(0, COLOR_CLASS[cc].length); // deep copy\n\n\t// draw titles area\n\tvar map_html = '';\n\tmap_html += '<div>';\n\tmap_html += '\t<div class=\"map_layer\" style=\"height:25px;float:right\" hidden></div>';\n\tmap_html += '\t<div class=\"map_year\" style=\"margin:0px 30px 0px 0px; height:25px;float:both\"></div>';\n\tmap_html += '</div>';\n\tmap_html += '<div>';\n\tmap_html += '\t<div class=\"map_metroInterval\" style=\"height:25px;float:left;clear:both\"></div>';\n\tmap_html += '\t<div class=\"map_sync\" style=\"height:25px;float:right\"></div>';\n\tmap_html += '</div>';\n\tmap_html += '<div class=\"map\"></div>';\n\tfor (var i=0; i<app.m; i++) {\n\t\tvar mapN = \"map\" + i;\n\t\tdocument.getElementById(mapN).innerHTML = map_html;\n\t}\n\t\n\tvar map_html = '';\n\tmap_html += '<div>';\n\tmap_html += '\t<div class=\"map_year\" style=\"margin:0px 100px 0px 0px; height:25px;float:left;\"></div>';\n\tmap_html += '\t<div class=\"map_nPolygon\" style=\"margin:0px 100px 0px 0px; height:25px;float:left;\"></div>';\n\tmap_html += '\t<div class=\"map_fixAxes\" style=\"height:25px;float:left;\"></div>';\n\tmap_html += '</div>';\n\tmap_html += '<br><br>';\n\tmap_html += '<div id=\"_density_chart\" class=\"chart densityPeriod\"></div>';\n\tfor (var i=0; i<app.d; i++) {\n\t\tvar mapD = \"mapD\" + i;\n\t\tvar html = map_html.replace('_density_chart', mapD+'_density_chart');\n\t\tif (app.dYears[i].startsWith('INC')) \n\t\t\thtml = html.replace('class=\"chart densityPeriod\"', 'class=\"chart densityINC\"');\n\t\tdocument.getElementById(mapD).innerHTML = html;\n\t\tif (app.MapWidth.replace('px','') < 500) $(\"#\"+mapD+\" .map_nPolygon\").hide();\n\t}\n\t\n\tif (app.Distribution_INC2_different_cluster) {\n\t\tvar map_html = '';\n\t\tmap_html += '<div>';\n\t\tmap_html += '\t<div class=\"map_year\" style=\"margin:0px 100px 0px 0px; height:25px;float:left;\"></div>';\n\t\tmap_html += '\t<div class=\"map_nPolygon\" style=\"margin:0px 100px 0px 0px; height:25px;float:left;\"></div>';\n\t\tmap_html += '\t<div class=\"map_fixAxes\" style=\"height:25px;float:left;\"></div>';\n\t\tmap_html += '</div>';\n\t\tmap_html += '<br><br>';\n\t\tmap_html += '<div id=\"_density_chart\" class=\"chart densityCluster\"></div>';\n\t\tfor (var i=0; i<app.nClusters; i++) {\n\t\t\tvar graphC = \"graphC\" + i;\n\t\t\tdocument.getElementById(graphC).innerHTML = map_html.replace('_density_chart', graphC+'_density_chart');\n\t\t\tif (app.MapWidth.replace('px','') < 500) $(\"#\"+graphC+\" .map_nPolygon\").hide();\n\t\t}\n\t}\n\t\n\t// change height and width for maps and stacked area chart\n\t$(\"#mapContainer\").css(\"height\", app.MapHeight.replace('px','')*1+100+'px');\n\t$(\".mapArea\").css(\"width\", app.MapWidth);\n\t$(\".mapAreaLast\").css(\"width\", app.ChartWidth);\n\t$(\".map\").css(\"width\", app.MapWidth);\n\t$(\".map\").css(\"height\", app.MapHeight);\n\t$(\".chart\").css(\"width\", app.MapWidth.replace('px','')*1-10+'px');\n\t$(\".chart\").css(\"height\", app.MapHeight.replace('px','')*1-10+'px');\n\t\n\t// draw each base map\n\tfor (var i=0; i<app.m; i++) {\n\t\tvar mapN = \"map\" + i;\n\t\tdraw_basemap(mapN);\n\t}\n\n\t// draw titles of each map\n\tfor (var i=0; i<app.m; i++) {\n\t\tvar mapN = \"map\" + i;\n\t\tdraw_titlemap(mapN, app.mYears[i]);\n\t}\n\t\n\t// draw titles of each density chart\n\tfor (var i=0; i<app.d; i++) {\n\t\tvar mapN = \"mapD\" + i;\n\t\tdraw_titleChart(mapN, app.dYears[i]);\n\t}\n\t\n\t// draw titles of each graph of clusters\n\tfor (var i=0; i<app.nClusters; i++) {\n\t\tvar graphC = \"graphC\" + i;\n\t\tdraw_titleGraphC(graphC, app.gYears[0]);\n\t}\n\t\n\tdraw_globalSelection();\n\n\t// initialize all bounds in app.mapN\n\tfor (var i=0; i<app.m; i++) {\n\t\tvar mapN = \"map\" + i;\n\t\tapp[mapN].bounds = app[mapN].map.getBounds();\n\t\t//console.log(getNow(), mapN, 'app.'+mapN+'.bounds: ', app[mapN].bounds);\n\t}\n\t\n\t// set map bounds using geo bounds in d3 function\n\tvar geoBounds = d3.geoBounds(CA);\n\t\n\tvar fitBounds = L.latLngBounds(L.latLng(geoBounds[0][1], geoBounds[0][0]), \n\t\t\t\t\t\t\t\t L.latLng(geoBounds[1][1], geoBounds[1][0]));\n\t//console.log('fitBounds:', fitBounds);\n\tif (app.m > 0 && app.InitialMapCenter != null && app.InitialMapZoomLevel != null) {\n\t\n\t\t// set bitBounds from InitialMapCenter and InitialMapZoomLevel\n\t\tfitBounds = app[mapN].bounds;\n\t\tvar mapBounds = app[mapN].map.getBounds();\n\t\tvar west = mapBounds.getWest();\n\t\tvar south = mapBounds.getSouth();\n\t\tvar east = mapBounds.getEast();\n\t\tvar north = mapBounds.getNorth();\n\t\tvar featureMapBounds = {type: \"Feature\", properties: {}, geometry: {type: \"Polygon\", coordinates: [\n\t\t\t[ [west, south], [east, south], [east, north], [west, north], [west, south] ] \n\t\t]}}\n\n\t\t// build selectedGeoJSON from receivedGeoJSON\n\t\tvar count = 0, edgeCount = 0;\n\t\tvar started = moment(new Date());\n\t\tvar selectedFeatures = [];\n\t\tvar count = 0;\n\t\tvar baseLines = lineify(featureMapBounds);\n\t\t\n\t\t$.each(app.receivedGeoJSON.features, function(rIdx, feature) {\n\t\t\tif (isPolygonInMapBounds(feature, baseLines, west, south, east, north)) {\n\t\t\t\tcount += 1;\n\t\t\t\tselectedFeatures.push([feature.properties[app.geokey], rIdx]);\n\t\t\t}\n\t\t});\n\t\tvar duration = moment.duration(moment(new Date()).diff(started));\n\t\t\n\t\t// build selectedGeoJSON and set it to CA\n\t\tapp.selectedGeoJSON = {\"type\":\"FeatureCollection\", \"features\":[]};\n\t\t$.each(selectedFeatures, function(rIdx, feature) {\n\t\t\t// feature[0] -> tractid, feature[1] -> rIdx\n\t\t\tapp.selectedGeoJSON.features.push(app.receivedGeoJSON.features[feature[1]]);\n\t\t});\n\t\tCA = app.selectedGeoJSON;\n\t\tselectedFeatures = null;\n\t\tapp.selectedBounds = mapBounds;\n\t}\n\t\n\t// fitBounds and redraw maps\n\tsetTimeout(function () {\n\t\t// fitBounds\n\t\tvar started = moment(new Date());\n\t\tvar watchfitbounds = [];\n\t\tfor (var i=0; i<app.m; i++) watchfitbounds.push(false);\n\t\tfor (var i=0; i<app.m; i++) {\n\t\t\tvar mapN = \"map\" + i;\n\t\t\tvar alreadyFitted = false;\n\t\t\tif (boundsEqual(app[mapN].map.getBounds(), fitBounds)) alreadyFitted = true;\n\t\t\telse app[mapN].map.fitBounds(fitBounds);\n\n\t\t\twatchfitbounds[i] = setInterval(function(i, mapN) {\n\t\t\t\tvar duration = moment.duration(moment(new Date()).diff(started));\n\t\t\t\tvar nowBounds = app[mapN].map.getBounds();\n\t\t\t\t//console.log(getNow(), mapN, mapN+'.bounds:', app[mapN].bounds);\n\t\t\t\t//console.log(getNow(), mapN, 'nowBounds:', nowBounds, duration / 1000);\n\t\t\t\tif (alreadyFitted || !boundsEqual(app[mapN].bounds, nowBounds)) {\n\t\t\t\t\t//console.log(getNow(), mapN, 'after fitBounds: ', nowBounds, 'duration:', duration/1000);\n\t\t\t\t\tclearInterval(watchfitbounds[i]);\n\t\t\t\t\twatchfitbounds[i] = false;\n\t\t\t\t\tapp[mapN].bounds = nowBounds;\n\t\t\t\t}\n\t\t\t\tif (duration > 10000) { // 10000 = 10 sec\n\t\t\t\t\t//console.log(getNow(), mapN, 'ffit fitBounds incompleted: ', nowBounds, 'duration:', duration/1000);\n\t\t\t\t\tclearInterval(watchfitbounds[i]);\n\t\t\t\t\twatchfitbounds[i] = false;\n\t\t\t\t}\n\t\t\t\tif (!watchfitbounds.reduce(function(x, y) {return x || y;})) {\n\t\t\t\t\t//console.log(getNow(), mapN, 'ALL fit fitBounds completed: ', nowBounds, 'duration:', duration/1000);\n\t\t\t\t\tupdateGloballyButton();\n\t\t\t\t\tapp.selectedBounds = nowBounds;\n\t\t\t\t\tsetTimeout(function() { mapOn_contextmenu_set(); }, 100);\n\t\t\t\t\tsetTimeout(function() { mapOn_movestart_set(); }, 200);\n\t\t\t\t\tsetTimeout(function() { mapOn_moveend_set(); }, 500);\n\t\t\t\t}\n\t\t\t}, 100, i, mapN);\n\t\t}\n\t\t\n\t\t// redraw maps\n\t\tfor (var i=0; i<app.m; i++) {\n\t\t\tvar mapN = \"map\" + i;\n\t\t\tdrawAmap(mapN, 3);\n\t\t}\n\t\t\n\t\t// redraw charts\n\t\tfor (var i=0; i<app.d; i++) {\n\t\t\tvar mapN = \"map\" + i;\n\t\t\tdrawAchart(mapN);\n\t\t}\n\t\t\n\t\t// parint density chart of the graph of Clusters\n\t\tfor (var i=0; i<app.nClusters; i++) {\n\t\t\tvar graphC = \"graphC\" + i;\n\t\t\tvar year = $(\"#\"+graphC+\" select[name=yearSelectGraphC]\").val();\n\t\t\tpaintDensityGraphC(graphC, year, i);\n\t\t}\n\t\t\n\t}, 100);\n}", "function resetMap(){\n for(var i=0;i<beaconpath.length;i++){\n beaconpath[i].setMap(null);\n }\n beaconpath=[];\n for(var i=0;i<path.length;i++){\n path[i].setMap(null);\n }\n path=[];\n\tshowingBeaconPath=false;\t\n\tshowingReporterPath=false;\n}", "addNoiseAll(){\n\t\tthis.geo.features.map(this.addNoise);\n\t}", "function setMapOnAll(map) {\r\n for (var i = 0; i < searchMarkers.length; i++) {\r\n searchMarkers[i].setMap(map);\r\n }\r\n }", "function arrayBuild(){\n\t/*\n\t * evtl moechte man in einer spaeteren Version manuell ein Array definieren, welches eine groessere Map\n\t * beherbergen kann als das canvas, deswegen gibt es diese beiden Variablen, welche in erster Version\n\t * lediglich mit der Dimension des Standard Arrays belegt werden.\n\t */\n\tvar arrayColumns;\n\tvar arrayRows;\n\n\n\t// In diesem Block finden die Berechnungen statt, welche die Dimension des Spielfeldes berechnen sollen.\n\t// In der ersten Version des SPiels soll sich das Spielfeld aus der Größe des Canvas ableiten.\n\t// In spaeteren Versionen soll das Spielfeld auch groesser gewählt werden können.\n\t{\n\t\t// Die Dimension des Arrays leitet sich aus der Anzahl der Hexatiles in einer Zeile und der Anzahl der Hexatiles in\n\t\t// einer Spalte ab.\n\t\tarrayDimensionLine = cellsInLine + (Math.round(cellsInColumn / 2) - 1);\n\t\tarrayDimensionColumn = arrayDimensionLine;\n\t\t// Bei dieser Berechnungsart ist die Matrix quadratisch und deswegen gibt es genausoviele Spalten wie Zeilen\n\t\tarrayRows = arrayDimensionLine;\n\t\tarrayColumns = arrayDimensionColumn;\n\t}\n\n\t// An dieser Stelle wird das Spielfeld als ein Array mit der berechneten Größe definiert\n\tgameField = new Array(arrayRows);\n\t// Die Anzahl der existierenden Minen zurücksetzen\n\texsistingMines = 0;\n\t// Dann wird jedes Feld des Arrays durchlaufen\n\tfor(var i = 0; i < arrayRows; i++ ){\n\t\t// und ebenfalls als Array der berechneten Größe definiert\n\t\tgameField[i] = new Array(arrayColumns);\n\t\t// Anschließend werden also alle Spalten der eben erzeugten Zeile durchlaufen \n\t\tfor(var j = 0; j < arrayColumns; j++){\n\t\t\t// Und geprüft, ob die entsprechenden Zelle mit einem Hexatile versehen werden muss.\n\t\t\tif(hexatileOnMap(i,j)) {\n\t\t\t\t// Wenn ja, dann wird ein Hexatile an der entsprechenden Zelle erzeugt und mit \n\t\t\t\t// Koordinaten versehen, welche sich von den Original Koordinaten unterscheiden,\n\t\t\t\t// jedoch notwendig sind, damit dich die hexatiles resourcenschonend selbst \n\t\t\t\t// zeichnen und verwalten können.\n\t\t\t\tgameField[i][j] = new Hexatile(i - (cellsInLine - 1),j);\n\t\t\t}\n\t\t}\n\t}\n\t\n\t{// Die Mienen erzeugen\n\t\t// berechnen, wieviele Mienen erzeugt werden müssen\n\t\tminesToGo = ((cellsInLine * cellsInColumn) * difficulty) / 100;\n\t\t\n\t\t// solange noch Mienen erzeugt werden müssen..\n\t\twhile (minesToGo > 0) {\n\t\t\t// ...zufällig eine Zeile ermitteln,...\n\t\t\tline = Math.round(Math.random() * (arrayRows));\n\t\t\t// ...zufällig eine Spalte ermitteln...\n\t\t\tcolumn = Math.round(Math.random() * (arrayColumns));\n\t\t\t\n\t\t\t// ...und prüfen, ob die so ermittelte Zelle auf dem Spielfeld liegt und noch keine Miene ist.\n\t\t\tif (hexatileOnMap(line, column) && !gameField[line][column].isMine) {\n\t\t\t\t// Die Zelle zu einer Miene machen\n\t\t\t\tgameField[line][column].isMine = true;\n\t\t\t\t// Die Anzahl der zu produzierenden Mienen herunterzählen\n\t\t\t\tminesToGo--;\n\t\t\t\t// Die Anzahl der exsistierenden Mienen hochzählen\n\t\t\t\texsistingMines++;\n\t\t\t}\n\t\t}\n\t}\n\n}", "geoLayout() {\n this.pieces.forEach((row, i) => row.forEach((piece, j) => {\n let x, y;\n if (i <= Math.floor(this.pieces.length / 2)) {\n x = i * -1 / 2 + j * 1;\n\n } else {\n x = -Math.floor(this.pieces.length / 2) / 2 + (i - Math.floor(this.pieces.length / 2)) / 2 + j * 1;\n\n }\n y = i * Math.sqrt(3) / 2;\n\n piece.geoPoint = new Point(x, y);\n }));\n }", "function ArraySet(){this._array=[];this._set=hasNativeMap?new Map():Object.create(null);}", "function center_changer() { \n // marker filtering\n filter_result = filter_list()\n region1_filter = filter_result[0]\n version1_filter = filter_result[1]\n // list changing\n yes_chosen =[]\n for (var i = 0; i < Site_search.length; i++){\n if (eval(filter_result[2])) {\n yes_chosen.push(i)\n } \n }\n filtered_list_creator(yes_chosen)\n // map center changing\n multiple_selected = yes_chosen\n if (multiple_selected.length >= 1){\n multiple_selected_lat = []\n multiple_selected_lng = []\n for (var k = 0; k < multiple_selected.length; k++){\n multiple_selected_lat.push(Lat_search[multiple_selected[k]])\n multiple_selected_lng.push(Lng_search[multiple_selected[k]])\n }\n jun.map.flyTo({center : [(Math.max(...multiple_selected_lng)+Math.min(...multiple_selected_lng))/2,(Math.max(...multiple_selected_lat)+Math.min(...multiple_selected_lat))/2],zoom:1.1})\n document.getElementById(\"results_num\").innerText = (multiple_selected.length)\n }\n else {\n document.getElementById(\"results_num\").innerText = 0\n } \n}", "function WoWMapProjection(){}", "setSceneOnMap(scene, x, y){\n console.log(scene);\n if (!scene) return console.error(\"NO SCENE DEFINED TO PLACE ON MAP\");\n this.map[x][y] = scene;\n scene.coordinate.x = x;\n scene.coordinate.y = y;\n // console.log(scene);\n this.setSurroundingScenes(scene);\n this.uiNeedsUpdate = true;\n return scene;\n }", "function _b(){this.__data__={array:[],map:null}}", "function setMapOnAll(map) {\n for (var i = 0; i < markers.length; ++i) {\n markers[i].setMap(map);\n locs[i].disp = true;\n }\n}", "function showAreaOnMap()\n{\n fillPoly(areaIDData,pointArray);\n}", "function setMapOnAll(map) {\n\tfor (var i = 0; i < puntos.length; i++) {\n\t puntos[i].setMap(map);\n\t }\n\t}", "function DeclareArray() {\n arrayRiseSet = new Array(arrayInfo.length);\n arrayPressure = new Array(arrayInfo.length);\n arrayHum = new Array(arrayInfo.length);\n arrayClo = new Array(arrayInfo.length);\n arrayTempRange = new Array(arrayInfo.length);\n arrayTempAvg = new Array(arrayInfo.length);\n arrayRain = new Array(arrayInfo.length);\n arrayVis = new Array(arrayInfo.length);\n arrayWind = new Array(arrayInfo.length);\n results = [];\n}", "function renderMap(_target, _data){\n var _graphData = _data.series[0].data;\n var _mapData = {};\n $.each(_graphData, function(_index, _elem){\n _mapData[_elem['code']] = _elem['y'];\n });\n _target.vectorMap({\n map: 'world_mill_en',\n zoomOnScroll : false,\n backgroundColor: '#FFFFFF',\n regionStyle: {\n initial: {\n fill: '#F2F2F2'\n }\n },\n series: {\n regions: [{\n values: _mapData,\n attribute: 'fill',\n scale: ['#fca2a3', '#9f0405'],\n normalizeFunction: 'polynomial'\n }]\n },\n onRegionLabelShow: function(e, label, code){\n if(_mapData[code] !== undefined){\n label.html(label.html() + ': ' + _mapData[code]);\n }else{\n e.preventDefault();\n }\n }\n });\n }", "refreshMap() {\n\t\tif (typeof this.map_ptr.doors !== 'undefined') {\n\t\t\tthis.map_ptr.doors.forEach((element, index, array) => {\n\t\t\t\tif (SaveState.doorsOpened.indexOf(element.id) > -1) {\n\t\t\t\t\tthis.map_ptr.layout[element.x + (element.y * this.map_ptr.width)] = Data.mapTiles.BRICK;\n\t\t\t\t} else {\n\t\t\t\t\tthis.map_ptr.layout[element.x + (element.y * this.map_ptr.width)] = Data.mapTiles.DOOR;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tif (typeof this.map_ptr.chests !== 'undefined') {\n\t\t\tthis.map_ptr.chests.forEach((element, index, array) => {\n\t\t\t\tif (SaveState.chestsOpened.indexOf(element.id) > -1) {\n\t\t\t\t\tthis.map_ptr.layout[element.x + (element.y * this.map_ptr.width)] = Data.mapTiles.BRICK;\n\t\t\t\t} else {\n\t\t\t\t\tthis.map_ptr.layout[element.x + (element.y * this.map_ptr.width)] = Data.mapTiles.CHEST;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}", "function setAllMap(map) {\n\t\t\t \n\t\t\t for (var i = 0; i < markers.length; i++) {\n\t\t\t\t\n\t\t\t\tmarkers[i].setMap(map);\n\t\t\t \n\t\t\t }\n\t\t\t\n\t\t\t}", "_renderWorkout_FromLocalStorageToMap() {\r\n this.#workouts.forEach(workout => this._renderWorkoutOnMap(workout));\r\n }", "function SourceMap(){\n this.lines = [];\n }", "function setMapPathOnAll(map) {\n\tfor (var i = 0; i < paths.length; i++) {\n\t\tpaths[i].setMap(map);\n\t}\n}", "function setMapOnAll(map) {\n for(let i = 0; i <markerArr.length; i++) {\n\n markerArr[i].setMap(map)\n }\n}", "function transformData(error, response){\n if (error) throw error;\n var extra = response[0];\n var globind = response[1];\n var footprint = response[2];\n var countryCodes = response[3];\n\n var readyData = dataTransform(extra, globind, footprint);\n var mapData = readyData[0];\n var scatterData = readyData[1];\n\n // start all visualisations at startyear 1961\n currentYear = 1961;\n\n // draw map, scatter plot, stacked area graph and legends\n mapMaker(mapData);\n scatterMaker(scatterData);\n areaMaker(\"null\", countryCodes);\n areaLegendMaker();\n }", "updateMountainPoints() {\n for (var i=nMountains; i>=0; i--) {\n var curMountain = this.mountainPoints[i]\n var updatedMountain = []\n updatedMountain.push(curMountain[curMountain.length - 1]);\n updatedMountain = updatedMountain.concat(curMountain.slice(0, curMountain.length - 1));\n this.mountainPoints[i] = updatedMountain;\n };\n }", "function setCurrentMap(element) {\n\tcurrentMap = element;\n\tmapSize = {width:element.style.width.slice(0, -2), \n\t\t\theight:element.style.height.slice(0, -2)};\n\trefreshServicesLayer();\n}", "function setCoordinates() {\n var grid_size = optimizeToGrid(nodes.length);\n //Create 2D array\n var coord_array = [];\n for (i = 0; i < nodes.length; i++) {\n coord_array[i] = [];\n var x_coord = (i % grid_size[0]);\n var y_coord = (Math.floor(i / grid_size[0])); \n coord_array[i][0] = x_coord;\n coord_array[i][1] = y_coord;\n }\n return coord_array;\n}", "function markMap() {\n for (let key in Memory.warControl) {\n if (Memory.warControl[key]) {\n new RoomVisual(key).text(\n Memory.warControl[key].type,\n 25,\n 25,\n {align: 'left', opacity: 0.8}\n );\n }\n if (Memory.warControl[key].siegePoint) {\n new RoomVisual(Memory.warControl[key].siegePoint).text(\n 'Siegepoint',\n 25,\n 25,\n {align: 'left', opacity: 0.8}\n );\n }\n }\n}", "function setMap(m) {\n map = m;\n }", "setCodeArray(array) {\n this._lines = array;\n this.renderAll();\n this._highlightedPositionsToBe = this._highlightedPositions;\n this.updateHighlighted();\n }", "function summonCaptainPlanet() {\r\n\tconsole.log(map)\r\n}" ]
[ "0.6829723", "0.61194986", "0.6066655", "0.5905527", "0.5863855", "0.5723339", "0.54406995", "0.5427648", "0.5398958", "0.5349373", "0.5337629", "0.53175473", "0.5316674", "0.52756673", "0.5221366", "0.5201397", "0.51880044", "0.51838624", "0.5145826", "0.5142385", "0.51212466", "0.5120899", "0.51116115", "0.50994277", "0.5098226", "0.5085867", "0.5083977", "0.50760806", "0.50730133", "0.50726163", "0.506242", "0.5060961", "0.5029415", "0.5026094", "0.50171113", "0.50164735", "0.5012356", "0.49932435", "0.499096", "0.49889207", "0.4979836", "0.49757567", "0.4974339", "0.49691293", "0.4968049", "0.49599645", "0.49512598", "0.4949289", "0.49360105", "0.49300545", "0.492549", "0.4924645", "0.49192312", "0.49192312", "0.49158365", "0.49124888", "0.49096224", "0.490326", "0.4895346", "0.48938152", "0.48930827", "0.48886508", "0.48800513", "0.48740488", "0.48719776", "0.48676088", "0.48661223", "0.48601246", "0.48600626", "0.48586726", "0.48568374", "0.48560062", "0.4854114", "0.48509586", "0.48507813", "0.4849215", "0.4845174", "0.48433757", "0.48428673", "0.483999", "0.4837743", "0.48375377", "0.48373726", "0.4834697", "0.48297527", "0.4828923", "0.48285785", "0.48269755", "0.48216817", "0.4817536", "0.48154968", "0.4815303", "0.4811544", "0.4810341", "0.48097134", "0.48088536", "0.48060542", "0.48019713", "0.4798847", "0.47977936", "0.4795712" ]
0.0
-1
================================================================================= ================================================================================== Sets the iinput array that is the first table in the Data View. ==================================================================================
function setInputValues(dgInputs) { var impTbl = document.getElementById("InputValuesTable"); //impTbl.innerHTML = ""; var keys = dgInputs.keys() var values = dgInputs.values(); var tableData = ""; for (var i = 0; i < keys.length;i++) { if (i % 2 && i != 0) tableData = tableData + "<tr><td>"+ keys[i]+ "</td><td>" + values[i] + "</td></tr>"; else tableData = tableData + "<tr class=\"alt\"><td>"+ keys[i]+ "</td><td>" + values[i] + "</td></tr>"; }//end for $('#InputValuesTable').html(tableData); //impTbl.innerHTML = tableData; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SetColumnsInput() {\n\n var result = new Array();\n for (var i = 0; i < tcoarray.length; i++) {\n\n var item = tcoarray[i];\n result.push({ field: item.name, title: item.name, width: item.width, sortable: true });\n }\n var res1 = new Array();\n res1[0] = result;\n tablecolumninputs = res1;\n return result;\n\n}", "function setDataTbl(){\n var currentIndex = 1;\n var tablegroup = \"datagrpRestriction\";\n setTable(currentIndex, tablegroup, this.grid.getPrimaryKeysForRow(this));\t\n}", "function setData() {\n\tvar rows = db.execute('SELECT * FROM igreja where igreja.id NOT IN (SELECT pregacao.igreja FROM igreja INNER JOIN pregacao ON igreja.id = pregacao.igreja WHERE pregacao.sermao =\"' + idSermao + '\") ');\n\tvar dataArray = [];\n\twhile (rows.isValidRow()) {\n\t\tvar vnome = rows.fieldByName('nome');\n\t\tvar vid = rows.fieldByName('id');\n\t\tdataArray.push({\n\t\t\ttitle : vnome,\n\t\t\thasCheck : false,\n\t\t\tid : vid,\n\t\t});\n\n\t\trows.next();\n\t\ttableview.setData(dataArray);\n\t};\n\tdb.close();\n}", "function init() {\n startIndex = 0;\n vm.data = [];\n }", "function resetArray()\n{\n inputArray = [`0`];\n}", "function updateDataArray(input){\n\tconsole.log(`updateDataArray{}`);\n\t//Find row and col from the input data-col/row attributes\n\tvar col = parseInt(input.getAttribute('data-col'));\n\tvar row = parseInt(input.getAttribute('data-row'));\n\t\n\t//update dataArray with value and alt (formula)\n\tdataArray[col][row].value = input.value;\n\tdataArray[col][row].formula = input.alt;\n\tconsole.log(dataArray);\n\t\n}", "function instertValues(){\nvar uomTable = document.getElementsByClassName(\"uomTable\")[0];\nvar tblBody = uomTable.tBodies[0];\nvar rows = tblBody.rows,\n rlen = rows.length,\n arr = new Array(),\n n=0;\n i, j, cells, clen;\n for (i = 0; i < rlen; i++) {\n cells = rows[i].getElementsByTagName('input');\n clen = cells.length;\n arr[i] = new Array();\n for (j = 0; j < clen; j++) {\n cells[j].value = allValues[n++];\n}}}", "setFocusOnTable() {\n $(\"#tableDialogBody input\").first().focus();\n }", "set data(arr) {\n\t\tthis.wrapper.setData(arr);\n\t\tthis._tableData = arr;\n\t}", "_setTable() {\r\n\r\n\r\n }", "function populateTable(){\n \ttable.clear();\n \tfor(var a = 0; a < prItems.length; a++){\n \t\tif (prItems[a].disctype == 2) {\n \t\t\tdiscount = prItems[a].discamt + \"%\";\n \t\t}\n \t\telse {\n \t\t\tdiscount = accounting.formatMoney(prItems[a].discamt)\n \t\t}\n\t\t\tselectedDataarray = [\n prItems[a].itemid,\n prItems[a].itemname.toUpperCase(),\n accounting.formatMoney(prItems[a].qty),\n prItems[a].uomid,\n prItems[a].unit,\n accounting.formatMoney(prItems[a].price),\n discount,\n prItems[a].disctype,\n accounting.formatMoney(prItems[a].subtotal),\n accounting.formatMoney(prItems[a].total),\n \"<center><button class='btn btn-danger btnDelete btnTable' data-value='\" + a + \"'><i class='fa fa-trash-o'></i> Delete</button></center>\"\n ];// adding selected data to array \n\n \ttable.row.add(selectedDataarray); \n\t\t} \n table.draw();\n }", "function InitTable() {\n if (!Exists(fileData)) { return; }\n tableData = [];\n tableCollumns = [];\t\n\t\n //get collums\n var keys = Object.keys(fileData[0]);\n keys.forEach(function (k) {\n if (!$.isArray(fileData[0][k])) {\n tableCollumns.push({ title: k });\n for (var j = 0; j < fileData.length; j++) {\n if (tableData.length == j) { tableData.push([]); }\n if (!Exists(fileData[j][k])) {\n fileData[j][k] = \"-\";\n }\n tableData[j].push(fileData[j][k])\n }\n\n }\n }, this);\n Reorder(\"filename\", \"name\");\n\n //do some horrible hack to copy\n selectedTableDataSource = JSON.parse(JSON.stringify(tableData));\n selectedTableCollumns = JSON.parse(JSON.stringify(tableCollumns));\n \n //create the selected table\n selectedDataTable = selectedTable.DataTable({\n data: selectedTableData,\n scrollX: true,\n paging: false,\n searching: false,\n columns: selectedTableCollumns,\n fnRowCallback: function (nRow, aData, iDisplayIndex, iDisplayIndexFull) {\n console.log(aData);\n $('td', nRow).css(\"background\", 'linear-gradient(rgba(0,0,0,0),' + d3ColourToCss(d3.rgb(c10(Find(selectedTableData, aData[1], 1))), 0.5) + ')');\n }\n });\n\n //add in the select collumn\n for (var i = 0; i < tableData.length; i++) {\n tableData[i].unshift(\"\");\n }\n tableCollumns.unshift({ title: \"Select\" });\n\n table.html(\"\");\n dTable = table.DataTable({\n fnRowCallback: function (nRow, aData, iDisplayIndex, iDisplayIndexFull) {\n if (inChart.length > 0) {\n if (DataParser.MatchingEvents(inChart[0], fileData[iDisplayIndexFull])) {\n $('td', nRow).removeClass('redbg');\n $('td', nRow).prop('disabled', false);\n } else {\n $('td', nRow).addClass('redbg');\n $('td', nRow).prop('disabled', true);\n }\n } else {\n $('td', nRow).removeClass('redbg');\n $('td', nRow).prop('disabled', false);\n }\n },\n data: tableData,\n //scrollX: true,\n // scrollY: \"500px\",\n // scrollCollapse: true,\n columns: tableCollumns,\n select: {\n style: 'multi',\n selector: 'td:first-child'\n },\n order: [[3, 'desc']],\n columnDefs: [\n {\n orderable: false,\n className: 'select-checkbox',\n targets: 0\n },\n {\n \"targets\": [1],\n \"width\": \"10px\"\n },\n {\n \"targets\": [4, 5, 6, 7, 8, 9, 10, 11],\n \"visible\": false,\n },\n ]\n });\n dTable\n .on('select', function (e, dt, type, indexes) {\n AddToChart(indexes[0]);\n })\n .on('deselect', function (e, dt, type, indexes) {\n RemoveFromChart(indexes[0]);\n });\n}", "resetTableData() {\n this.gridData = this.defaultGridData;\n this.typesOfPlot = ['Cumulative frequency plot', 'Dot plot'];\n }", "function inputChanged() {\n parseInput(this);\n getDataFromTable();\n }", "function addtoArray() {\n //console.info(\"getRowCount\" + _self.backendApi.getRowCount());\n _self.backendApi.eachDataRow(function (rownum, row) {\n //console.info(\"rownum \" + rownum);\n lastrow = rownum;\n //do something with the row..\n\n });\n\n }", "function addRowIndex() {\r\n const table = $('#main').DataTable();\r\n \r\n table.rows().every( function ( rowIdx, tableLoop, rowLoop ) {\r\n const data = this.data();\r\n data[0] = rowIdx + 1;\r\n this.data(data);\r\n });\r\n}", "function triggerReset (arrayOfData) {\n\n var data = arrayOfData[0];\n var table = arrayOfData[1];\n var element = arrayOfData[2];\n var url = arrayOfData[3];\n var tableColumns = arrayOfData[4];\n var columnDefs = arrayOfData[5];\n var order = arrayOfData[6];\n\n data.map((id) => {\n $(id).val('').trigger('change');\n });\n\n this.filters = {};\n\n // Datatable setup\n\n if($.fn.dataTable.isDataTable('#'+table)){\n element.DataTable().clear();\n element.DataTable().destroy();\n }\n // element.dataTable({\n // \"fnCreatedRow\": function (nRow, data) {\n // $(nRow).attr('class', data.id);\n // },\n // \"processing\": true,\n // \"serverSide\": true,\n // \"ajax\": {\n // url: url,\n // type: 'POST',\n // dataType: 'json',\n // },\n // \"rowId\": \"id\",\n // \"columns\": tableColumns,\n // \"columnDefs\": columnDefs,\n // \"order\": order,\n // })\n}", "set table(arg){\n\t\tthis.isTableClear = false;\n\t\tthis.goodsTable = [];\n\t\tthis.title = arg.title;\n\t\tvar index = 0;\n\t\tfor (var i= 0; i<arg.message.length; i++){\n\t\t\tlet goodsTable = arg.message[i];\n\t\t\tvar element = [];\n\t\t\t// - Loop through each goods table\n\t\t\tlet index = null;\n\t\t\tfor (index in goodsTable){\n\t\t\t\tlet item = {\n\t\t\t\t\titemName: index,\n\t\t\t\t\titemTranslate: \"\",\n\t\t\t\t\titemValues: \"\",\n\t\t\t\t\titemDimension: \"\"\n\t\t\t\t}\n\t\t\t\t// - Item translate\n\t\t\t\titem.itemTranslate = model_globalTables.translate(index);\n\t\t\t\t// - Item value\n\t\t\t\titem.itemValues = model_globalTables.value(item.itemName,goodsTable[index]);\n\t\t\t\tif (item.itemValues==\"\")\n\t\t\t\t\titem.itemValues = goodsTable[index];\n\t\t\t\t// - Item dimension\n\t\t\t\titem.itemDimension = model_globalTables.dimension(item.itemName);\n\t\t\t\t//Insert item to the array\n\t\t\t\telement.push(item);\n\t\t\t}\n\t\t\tthis.goodsTable.push(element);\n\t\t}\n\t}", "function populateRows() {\n let tmpRows = [];\n for(let i = 1; i <= 20; i++) {\n const ingredient = data[`strIngredient${i}`];\n const quantity = data[`strMeasure${i}`];\n \n if (ingredient === null || ingredient === \"\") {\n continue;\n }\n tmpRows.push({key: i, ingredient: ingredient, quantity: quantity})\n }\n setRows(tmpRows);\n }", "function updateTable(array_input, array_result, afd)\n{\n $('#test_tbody').empty();\n $('#test_footer').empty();\n for (var i = 0; i < array_input.length; i++) {\n $('#test_tbody').append('<tr> \\\n <td class=\"td_input\"><input type=\"text\" class=\"input_test\" value=\"'+array_input[i]+'\"></td> \\\n <td class=\"td_result\">'+array_result[i]+'</td> \\\n </tr>');\n\n };\n $('#test_footer').append('<tr> \\\n <td> É AFD? </td> \\\n <td> '+ afd +' </td> \\\n </tr>');\n}", "function setInitialObj(ipObj) {\n $scope.mainObj = angular.copy(ipObj);\n $scope.selectedElements = [].concat(ipObj.selectedElements);\n $scope.elements = [].concat(ipObj.elements);\n $scope.multi = $scope.mainObj.multi ;\n $scope.search = $scope.mainObj.search ;\n }", "function setStartingData(data) {\n\t\t// Start off the indexes object for these initial entries\n\t\tvar i = 0, length = visibleSlides, id = 0;\n\t\tfor (; i < length; i++) {\n\t\t\tid = data[i].entryID;\n\t\t\tentryData[data[i].entryID] = data[i];\n\t\t\tindexes.push(data[i].entryID);\n\t\t\tif (data[i].votingClosed) votedPostIDs.push(data[i].entryID);\n\t\t}\n\t\tcurrentIndex = Math.floor(visibleSlides/2);\n\t\t//indexes.sort(sortArrayNumerically);\n\t\tcurrentEntryID = indexes[currentIndex];\n\t}", "function populateTable(data,val){\n if(val == 1){\n table.row.add(editArray); \n table.draw(); \n }else if(val == 2){\n table.row.add(selectedDataarray); \n table.draw();\n }else{\n alert('There was an error populating table, Please check material balance and material edit table codes');\n }\n}", "function populateTable(data,val){\n if(val == 1){\n table.row.add(editArray); \n table.draw(); \n }else if(val == 2){\n table.row.add(selectedDataarray); \n table.draw();\n }else{\n alert('There was an error populating table, Please check material balance and material edit table codes');\n }\n}", "function set1stOwnerTbl(){\n var currentIndex = 2;\n var tablegroup = \"ownergrpRestriction\";\n setTable(currentIndex, tablegroup, this.grid.getPrimaryKeysForRow(this));\n}", "function resetTableArr() {\n\n stateSelector.value = 'All'\n checkDem.checked = true;\n checkRep.checked = true;\n checkInd.checked = true;\n filterArray();\n}", "function dap_firstRow()\n{\n\tthis.saveData(this.getCurrentRow());\n\tif (this.DynamicTable.firstRow() == true)\n\t{\n\t\tvar boolflag = this.DataSource[this.getRecordIndex(\n\t\t\t\tthis.getCurrentRow())][this.DataSource[0].length-1];\n\t\tthis.DynamicTable.disableRow(this.getCurrentRow(),\n\t\t\t\t(boolflag == constLoadStatus)||(boolflag == constUpdateStatus));\n\t}\n}", "function fillUpTable() {\r\n\tgetInstantValues();\r\n}", "setInitialValueOfColumn() {\n this.columns.map((item) => {\n if (item.hasOwnProperty('initialValue')) {\n this.hot.setDataAtRowProp(0, item.data, item.initialValue)\n }\n return true;\n })\n }", "function inputArray(Calcular *obj)\n{\n for (int i = 0; i < obj->getTamano(); i++)\n {\n document.write(\"Introduzca el numero de la posicion: \" + i + \"<br>\");\n consola.log = ' ' ;\n document.write(\"Introduzca: \" + dato + \"<br>\");\n obj->setVector(i, dato);\n }\n system(\"cls\");\n}", "function EditDataFunct() {\n\n //debugger;\n\n $(\"#tableRow_\" + Intern_LineEditedNum).html(GenerateTableLine(Intern_LineEditedNum));\n AddEvents(Intern_LineEditedNum);\n Intern_LineEditedNum = null;\n ClearAllInputs();\n $('#' + Intern_AddButtonId).html(Disp_TextAdd);\n Intern_InputFieldElems[0].focus();\n }", "function WHomeRec()\n{\n this.WSetRow(0);\n}", "function fct_AtualizaInputsTabela() {\n\n fct_Index(\"Codigo\", \"Codigo\");\n\n fct_Index(\"InicioVigencia\", \"DtInicioVigencia\");\n\n fct_Index(\"FimVigencia\", \"DtFimVigencia\");\n\n fct_Index(\"DiaDaSemana\", \"DiaDaSemana\");\n\n fct_Index(\"HoraInicio\", \"HoraDeInicioDasAulas\");\n\n fct_Index(\"HoraFim\", \"HoraDeFimDasAulas\");\n\n function fct_Index(id, campo) {\n\n var contador = 0;\n\n $('input[id=' + id + ']').each(function () {\n $(this).prop(\"name\", \"AulaPaa[\" + contador + \"].\" + campo);\n contador++;\n });\n }\n}", "function OpertionUp(valI) {\n if (valI > 0) {\n var tempObj = Intern_ArrayOfValues[valI];\n Intern_ArrayOfValues[valI] = Intern_ArrayOfValues[valI - 1];\n Intern_ArrayOfValues[valI - 1] = tempObj;\n\n $(\"#\" + Intern_TableDivName + \" tbody\").html(GenerateTableData());\n for (var i = 0; i < Intern_ArrayOfValues.length; i++)\n AddEvents(i);\n }\n }", "function set_focus(field) {\t\r\n\t// next is table, show the table\r\n\tif(field.df.fieldtype==\"Table\") {\r\n\t\tif(!field.grid.grid_rows.length) {\r\n\t\t\tfield.grid.add_new_row(1);\r\n\t\t} else {\r\n\t\t\tfield.grid.grid_rows[0].toggle_view(true);\r\n\t\t}\r\n\t}\r\n\telse if(field.editor) {\r\n\t\tfield.editor.set_focus();\r\n\t}\r\n\telse if(field.$input) {\r\n\t\tfield.$input.focus();\r\n\t}\r\n}", "function setTempRowData(){\n\t\ttempRowData = CurrentRow.getRowData(thisRow); \n\t }", "function changeTable2() {\n \n }", "function setArrayOfValues(objList) {\n\n //debugger;\n\n if (objList !== undefined && objList !== null) {\n var tableFieldDispNamesDefined = false;\n if (Intern_TableFieldDispNames !== undefined && Intern_TableFieldDispNames !== null && Intern_TableFieldDispNames.length !== 0)\n tableFieldDispNamesDefined = true;\n if (Setting_PointToOriginalArr === true) {\n Intern_ArrayOfValues = objList;\n }\n else {\n Intern_ArrayOfValues.splice(0, Intern_ArrayOfValues.length);\n //Intern_ArrayOfValues = [];\n $.each(objList, function (index, value) {\n Intern_ArrayOfValues[index] = {};\n $.each(value, function (index1, value1) {\n Intern_ArrayOfValues[index][index1] = value1;\n if (index === 0) {\n\n setInputFieldId(Intern_InputFieldIds.length, index1);\n\n if (tableFieldDispNamesDefined === false)\n Intern_TableFieldDispNames[Intern_TableFieldDispNames.length] = index1;\n }\n });\n });\n }\n GenerateFullTable();\n }\n }", "makeUserTable() {\n let infoSelected = this.checkSelected.map(checkBoxValue => this.checkData.find(checkBox => checkBox.value === checkBoxValue).text); //Get the text key of the checkbox selected to used on titles of the table\n this.tableTitlesMod = [\"Name\", ...infoSelected];\n this.tableKeysMod = [\"first_name\" , ...this.checkSelected];\n }", "function click_updateTable() {\n offset = Number(\"0\");\n updateTable();\n}", "function settIndex()\n {\n\n for (var i=0;i<self.personsObj().length-1;i++)\n { \n if ( self.data()[self.selectedIndex()].person_number==self.personsObj()[i].personNumber)\n {\n self.personIndex(i);\n break;\n \n }\n }\n return;\n }", "function runDefault() {\n\n // Prevent the page from refreshing\n d3.event.preventDefault();\n\n // Get the value by ID of the input element and replace it with \"\"\n document.getElementById(\"datetime\").value = \"\";\n document.getElementById(\"city\").value = \"\";\n document.getElementById(\"state\").value = \"\";\n document.getElementById(\"country\").value = \"\";\n document.getElementById(\"shape\").value = \"\";\n\n // Modify the text of an HTML element\n var dataTabledefault = d3.selectAll(\"tbody>tr\");\n dataTabledefault.html(\"\");\n\n // Call the data\n populateData(tableData);\n}", "get inputColumnNames(){\n return this._inputColumnNames;\n }", "function getInputData() {\n //Dynamically create Saved Search to grab all eligible Sales orders to invoice\n //In this example, we are grabbing all main level data where sales order status are \n //any of Pending Billing or Pending Billing/Partially Fulfilled\n return search.create({\n type: \"salesorder\",\n filters:\n [\n [\"shipmethod\", \"anyof\", \"37\"],\n \"AND\",\n [\"type\", \"anyof\", \"SalesOrd\"],\n \"AND\",\n [\"status\", \"anyof\", \"SalesOrd:A\"],\n \"AND\",\n [\"memorized\", \"is\", \"F\"],\n \"AND\",\n [\"mainline\", \"is\", \"T\"],\n \"AND\", \n [\"amount\",\"greaterthan\",\"0.00\"], \n \"AND\", \n [\"custbody1\",\"anyof\",\"4926\"]\n ],\n columns:\n [\n search.createColumn({ name: \"tranid\", label: \"Document Number\" })\n ]\n });\n }", "function fillKalenderHeader(){\r\r\n\tvar header = kalender_html.querySelectorAll('tr:first-of-type td:not(:first-of-type)');\r\r\n\tvar daten = kalender_data.getTage();\r\r\n\tfor(var i=0; i<header.length && i<daten.length; i++){\r\r\n\t\theader[i].innerHTML = daten[i];\r\r\n\t}\r\r\n}", "function updateTable() {\n \n // Prevent default refresh.\n d3.event.preventDefault();\n \n // Select the form and get its value\n dataInput = getInput();\n \n // Filter the dataset using the filterAll function.\n newData = tableData.filter(filterAll);\n \n // Clear the content before each update.\n tbody.html(\"\");\n \n // Handle invalid input:\n // If nothing is entered, display full data;\n // If no data at the input date, display a message;\n // If date is valid, use makeTable to display filtered data.\n if (dataInput === '') {\n tableData.forEach(makeTable);\n } \n else if (newData.length == 0) {\n tbody.append(\"h3\").text(\"No data matching your search!\");\n }\n else {\n newData.forEach(makeTable);\n }\n}", "function resetSearch(){\n // Prevent the page from refreshing\n d3.event.preventDefault();\n\n // reset the form\n document.getElementById(\"form-id\").reset();\n\n // remove tbody to be able to insert a new table\n tbody.html(\"\");\n\n // For Each Loop to iterate over the tableData array\n tableData.forEach(ufoItem => {\n // console.log(ufoItem);\n var row = tbody.append(\"tr\");\n \n // iterate over each object value\n \n Object.values(ufoItem).forEach(value => {\n var cell = row.append(\"td\");\n cell.text(value)\n });\n });\n}", "function init () {\n data.forEach((tableData) => {\n let row = tbody.append(\"tr\");\n Object.values(tableData).forEach(value => {\n let cell = row.append(\"td\");\n cell.text(value);\n });\n })\n}", "_fillThis() {\n\n for (let row = 0; row < this.length; row++) {\n this[row] = [];\n\n for (let newCol = 0; newCol < 4; newCol++) {\n this[row][newCol] = 0;\n }\n }\n }", "function resetTable() { \n \n // prevent page refresh \n d3.event.preventDefault();\n\n // load all data to table\n loadTable(data); \n \n // date selector inital value blank\n dateSearch.property('value', '');\n citySearch.property('value', '');\n stateSearch.property('value', '');\n countrySearch.property('value', '');\n shapeSearch.property('value', '');\n}", "function renderData() {\n tableBody.innerHTML = \"\";\n for (var i = 0; i < tableData.length; i++) {\n var data = tableData[i];\n var rows = Object.keys(data);\n var input = tableBody.insertRow(i);\n for (var j = 0; j < rows.length; j++) {\n var field = rows[j];\n var cell = input.insertCell(j);\n cell.innerText = data[field];\n }\n }\n}", "function __initFormTable($dom) {\r\n}", "function resetInput() {\n $scope.affiliationObj = {\n affId: '',\n affname: ''\n };\n $scope.inputObject = {\n firstName: '',\n lastName: '',\n affiliations: []\n };\n }", "function initTab(integer) {\n // déclaration des variables\n array = new Array(integer); // création du tableau\n array.splice(0, integer); }", "function initTab(integer) {\n // déclaration des variables\n array = new Array(integer); // création du tableau\n array.splice(0, integer); }", "constructor ()\n\t{\n\t\tthis.elementArray = makePuzzle(); //creates an unambiguous solved puzzle\n\t\tthis.userArray = []; //stores the user's selected solutions\n\t\tfor (var i = 0; i < 81; i++) {\n\t\t\tthis.userArray.push(0);\n\t\t}\n\t\tthis.pencilArray = []; //stores user's penciled numbers for each cell on table\n\t\tthis.inputFlag = this.MANUAL; //Start in solid input\n\n\t\tthis.selectedNumber = 0; //the number user has selected for semiAuto input\n\n\t}", "function newIndexAlterTable() {\n\tvar v_currTabTag = v_connTabControl.selectedTab.tag.tabControl.selectedTab.tag;\n\n\tvar v_data = v_currTabTag.alterTableObject.htIndexes.getData();\n\n\tvar v_object = new Object();\n\tv_object.mode = 2;\n\tv_object.old_mode = 2;\n\tv_object.index = v_currTabTag.alterTableObject.infoRowsIndexes.length;\n\n\tv_currTabTag.alterTableObject.infoRowsIndexes.push(v_object);\n\tv_data.push(['','',\"<i title='Select columns' class='fas fa-columns action-grid action-edit-columns' onclick='showColumnSelectionIndexes()'></i> \",\"<i title='Remove' class='fas fa-times action-grid action-close' onclick='dropIndexAlterTable()'></i>\"]);\n\tv_currTabTag.alterTableObject.htIndexes.loadData(v_data);\n\tv_currTabTag.btSave.style.visibility = 'visible';\n}", "function resetTable() {\n\n // clear the current data\n clearTable();\n \n // use forEach and Object.values to populate the initial table\n tableData.forEach((ufoSighting) => {\n var row = tbody.append(\"tr\");\n Object.values(ufoSighting).forEach(value => {\n var cell = row.append(\"td\");\n cell.text(value);\n cell.attr(\"class\", \"table-style\");\n }); // close second forEach\n }); // close first forEach\n}", "function GenerateTableData() {\n var ret = \"\";\n var tempRet = \"\";\n var display;\n var i;\n $.each(Intern_ArrayOfValues, function (index, value) {\n\n //debugger;\n\n tempRet = tempRet + '<tr id=\"' + Intern_InstanceName + 'tableRow_' + index + '\">';\n $.each(Intern_TableFieldIDs, function (index1, value1) {\n\n //debugger;\n\n i = Intern_InputFieldIds.indexOf(value1);\n if (Intern_InputFieldTypes === undefined || Intern_InputFieldTypes === null\n || Intern_InputFieldTypes[i] === undefined || Intern_InputFieldTypes[i] === null\n || Intern_InputFieldTypes[i] === \"\") {\n display = '<td>' + value[value1] + '</td>';\n }\n else if (Intern_InputFieldTypes[i] === \"checkbox\") {\n if (value[value1] === \"0\") {\n display = \"<td>false</td>\";\n }\n else {\n display = \"<td>true</td>\";\n }\n }\n else if (Intern_InputFieldTypes[i] === \"radio\") {\n if (value[value1] === null) {\n display = \"<td></td>\";\n }\n else {\n display = \"<td>\" + value[value1] + \"</td>\";\n }\n }\n else if (Intern_InputFieldTypes[i] === \"color\") {\n display = '<td style=\"background-color:' + value[value1] + '\"></td>';\n }\n else if (Intern_InputFieldTypes[i] === \"select\") {\n display = '<td>' + $('#' + Intern_InputFieldIds[i] + ' option[value=' + value[value1] + ']').text() + '</td>';\n }\n else {\n display = '<td>' + value[value1] + '</td>';\n }\n tempRet = tempRet + display;\n //i++;\n });\n tempRet = tempRet + AddOperations(index);\n tempRet = tempRet + '</tr>';\n\n if (Setting_AddToTop)\n ret = tempRet + ret;\n else\n ret = ret + tempRet;\n tempRet = \"\";\n //i = 0;\n });\n return ret;\n }", "function tableView(container,doc) \r\n{\r\n var numRows; // assigned in click, includes header\r\n var numCols; // assigned at bottom of click\r\n var activeSingleQuery = null;\r\n var autoCompArray = [];\r\n var entryArray = [];\r\n var qps; // assigned in onBinding\r\n var kb = tabulator.kb;\r\n\r\n thisTable = this; // fixes a problem with calling this.container\r\n this.document=null;\r\n if(doc)\r\n this.document=doc;\r\n else\r\n this.document=document;\r\n \r\n // The necessary vars for a View\r\n this.name=\"Table\"; //Display name of this view.\r\n this.queryStates=[]; //All Queries currently in this view.\r\n this.container=container; //HTML DOM parent node for this view.\r\n this.container.setAttribute('ondblclick','tableDoubleClick(event)');\r\n \r\n /*****************************************************\r\n drawQuery \r\n ******************************************************/\r\n this.drawQuery = function (q)\r\n {\r\n var i, td, th, j, v;\r\n var t = thisTable.document.createElement('table');\r\n var tr = thisTable.document.createElement('tr');\r\n var nv = q.vars.length;\r\n \r\n this.onBinding = function (bindings) {\r\n var i, tr, td;\r\n //tabulator.log.info('making a row w/ bindings ' + bindings);\r\n tr = thisTable.document.createElement('tr');\r\n t.appendChild(tr);\r\n numStats = q.pat.statements.length; // Added\r\n qps = q.pat.statements;\r\n for (i=0; i<nv; i++) {\r\n var v = q.vars[i];\r\n var val = bindings[v];\r\n tabulator.log.msg('Variable '+v+'->'+val)\r\n // generate the subj and pred for each tdNode \r\n for (j = 0; j<numStats; j++) {\r\n var stat = q.pat.statements[j];\r\n // statClone = <s> <p> ?* .\r\n var statClone = new tabulator.rdf.Statement(stat.subject, stat.predicate, stat.object);\r\n if (statClone.object == v) {\r\n statClone.object = bindings[v];\r\n var sSubj = statClone.subject.toString();\r\n if (sSubj[0] == '?') { \r\n // statClone = ?* <p> <o> .\r\n statClone.subject = bindings[statClone.subject];\r\n }\r\n break;\r\n }\r\n }\r\n tabulator.log.msg('looking for statement in store to attach to node ' + statClone);\r\n var st = kb.anyStatementMatching(statClone.subject, statClone.predicate, statClone.object);\r\n if (!st) {tabulator.log.warn(\"Tableview: no statement {\"+\r\n statClone.subject+statClone.predicate+statClone.object+\"} from bindings: \"+bindings);}\r\n else if (!st.why) {tabulator.log.warn(\"Unknown provenence for {\"+st.subject+st.predicate+st.object+\"}\");}\r\n tr.appendChild(matrixTD(val, st));\r\n } //for each query var, make a row\r\n } // onBinding\r\n\r\n t.appendChild(tr);\r\n t.setAttribute('class', 'results sortable'); //needed to make sortable\r\n t.setAttribute('id', 'tabulated_data'); \r\n \r\n tabulator.Util.emptyNode(thisTable.container).appendChild(t); // See results as we go\r\n\r\n for (i=0; i<nv; i++) { // create the header\r\n v = q.vars[i];\r\n tabulator.log.debug(\"table header cell for \" + v + ': '+v.label)\r\n text = document.createTextNode(v.label)\r\n th = thisTable.document.createElement('th');\r\n th.appendChild(text);\r\n tr.appendChild(th);\r\n }\r\n \r\n kb.query(q, this.onBinding); // pulling in the results of the query\r\n activeSingleQuery = q;\r\n this.queryStates[q.id]=1;\r\n \r\n drawExport();\r\n drawAddRow();\r\n sortables_init();\r\n \r\n // table edit\r\n t.addEventListener('click', click, false);\r\n numCols = nv;\r\n \r\n // auto completion array\r\n entryArray = tabulator.lb.entry;\r\n for (i = 0; i<tabulator.lb.entry.length; i++) {\r\n autoCompArray.push(entryArray[i][0].toString());\r\n entryArray = entryArray.slice(0);\r\n }\r\n } //drawQuery\r\n\r\n function drawExport () {\r\n var form= thisTable.document.createElement('form');\r\n var but = thisTable.document.createElement('input');\r\n form.setAttribute('textAlign','right');\r\n but.setAttribute('type','button');\r\n but.setAttribute('id','exportButton');\r\n but.addEventListener('click',exportTable,true);\r\n but.setAttribute('value','Export to HTML');\r\n form.appendChild(but);\r\n thisTable.container.appendChild(form);\r\n }\r\n\r\n this.undrawQuery = function(q) {\r\n if(q===activeSingleQuery) \r\n {\r\n this.queryStates[q.id]=0;\r\n activeSingleQuery=null;\r\n tabulator.Util.emptyNode(this.container);\r\n }\r\n }\r\n\r\n this.addQuery = function(q) {\r\n this.queryStates[q.id]=0;\r\n }\r\n\r\n this.removeQuery = function (q) {\r\n this.undrawQuery(q);\r\n delete this.queryStates[q.id];\r\n return;\r\n }\r\n\r\n this.clearView = function () {\r\n this.undrawQuery(activeSingleQuery);\r\n activeSingleQuery=null;\r\n tabulator.Util.emptyNode(this.container);\r\n }\r\n \r\n /*****************************************************\r\n Table Editing\r\n ******************************************************/\r\n var selTD;\r\n var inputObj;\r\n var sparqlUpdate;\r\n \r\n function clearSelected(node) {\r\n if (!node) {return;}\r\n var a = document.getElementById('focus');\r\n if (a != null) { a.parentNode.removeChild(a); };\r\n var t = document.getElementById('tabulated_data');\r\n t.removeEventListener('keypress', keyHandler, false);\r\n node.style.backgroundColor = 'white';\r\n }\r\n \r\n function clickSecond(e) {\r\n selTD.removeEventListener('click', clickSecond, false); \r\n if (e.target == selTD) {\r\n clearSelected(selTD);\r\n onEdit();\r\n e.stopPropagation();\r\n e.preventDefault();\r\n }\r\n }\r\n \r\n function setSelected(node) {\r\n if (!node) {return;}\r\n if (node.tagName != \"TD\") {return;}\r\n var a = document.createElement('a');\r\n a.setAttribute('id', 'focus');\r\n node.appendChild(a);\r\n a.focus();\r\n var t = document.getElementById('tabulated_data');\r\n t.addEventListener('keypress', keyHandler, false);\r\n node.style.backgroundColor = \"#8F3\";\r\n \r\n selTD = node;\r\n selTD.addEventListener('click', clickSecond, false);\r\n }\r\n \r\n function click(e) {\r\n if (selTD != null) clearSelected(selTD);\r\n var node = e.target;\r\n if (node.firstChild && node.firstChild.tagName == \"INPUT\") return;\r\n setSelected(node);\r\n var t = document.getElementById('tabulated_data');\r\n numRows = t.childNodes.length;\r\n }\r\n \r\n function getRowIndex(node) { \r\n var trNode = node.parentNode;\r\n var rowArray = trNode.parentNode.childNodes;\r\n var rowArrayLength = trNode.parentNode.childNodes.length;\r\n for (i = 1; i<rowArrayLength; i++) {\r\n if (rowArray[i].innerHTML == trNode.innerHTML) return i;\r\n }\r\n }\r\n \r\n function getTDNode(iRow, iCol) {\r\n var t = document.getElementById('tabulated_data');\r\n //return t.rows[iRow].cells[iCol]; // relies on tbody\r\n return t.childNodes[iRow].childNodes[iCol];\r\n }\r\n \r\n function keyHandler(e) {\r\n var oldRow = getRowIndex(selTD); //includes header\r\n var oldCol = selTD.cellIndex;\r\n var t = document.getElementById('tabulated_data');\r\n clearSelected(selTD);\r\n if (e.keyCode == 35) { //end\r\n addRow();\r\n }\r\n if (e.keyCode==13) { //enter\r\n onEdit();\r\n }\r\n if(e.keyCode==37) { //left\r\n newRow = oldRow;\r\n newCol = (oldCol>0)?(oldCol-1):oldCol;\r\n var newNode = getTDNode(newRow, newCol);\r\n setSelected(newNode);\r\n }\r\n if (e.keyCode==38) { //up\r\n newRow = (oldRow>1)?(oldRow-1):oldRow;\r\n newCol = oldCol;\r\n var newNode = getTDNode(newRow, newCol)\r\n setSelected(newNode);\r\n newNode.scrollIntoView(false); // ...\r\n }\r\n if (e.keyCode==39) { //right\r\n newRow = oldRow;\r\n newCol = (oldCol<numCols-1)?(oldCol+1):oldCol;\r\n var newNode = getTDNode(newRow, newCol);\r\n setSelected(newNode);\r\n }\r\n if (e.keyCode==40) { //down\r\n newRow = (oldRow<numRows-1)?(oldRow+1):oldRow;\r\n newCol = oldCol;\r\n var newNode = getTDNode(newRow, newCol);\r\n setSelected(newNode);\r\n newNode.scrollIntoView(false);\r\n }\r\n if (e.shiftKey && e.keyCode == 9) { //shift+tab\r\n newRow = oldRow;\r\n newCol = (oldCol>0)?(oldCol-1):oldCol;\r\n if (oldCol == 0) {\r\n newRow = oldRow-1;\r\n newCol = numCols-1;\r\n }\r\n if (oldRow==1) {newRow=1;}\r\n if (oldRow==1 && oldCol==0) {newRow=1; newCol = 0;}\r\n \r\n var newNode = getTDNode(newRow, newCol);\r\n setSelected(newNode);\r\n e.stopPropagation();\r\n e.preventDefault();\r\n return;\r\n }\r\n if (e.keyCode == 9) { // tab\r\n newRow = oldRow;\r\n newCol = (oldCol<numCols-1)?(oldCol+1):oldCol;\r\n if (oldCol == numCols-1) {\r\n newRow = oldRow+1;\r\n newCol = 0;\r\n }\r\n if (oldRow == numRows-1) {newRow = numRows-1;}\r\n if (oldRow == numRows-1 && oldCol == numCols-1) \r\n {newRow = numRows-1; newCol = numCols-1}\r\n \r\n var newNode = getTDNode(newRow, newCol);\r\n setSelected(newNode);\r\n }\r\n e.stopPropagation();\r\n e.preventDefault();\r\n } //keyHandler\r\n \r\n function onEdit() {\r\n if ((selTD.getAttribute('autocomp') == undefined) && \r\n (selTD.getAttribute('type') == 'sym')) {\r\n setSelected(selTD); return; \r\n }\r\n if (!selTD.editable && (selTD.getAttribute('type') == 'sym')) {return;}\r\n if (selTD.getAttribute('type') == 'bnode') {\r\n setSelected(selTD); return;\r\n }\r\n \r\n var t = document.getElementById('tabulated_data');\r\n var oldTxt = selTD.innerHTML;\r\n inputObj = document.createElement('input');\r\n inputObj.type = \"text\";\r\n inputObj.style.width = \"99%\";\r\n inputObj.value = oldTxt;\r\n \r\n // replace old text with input box\r\n if (!oldTxt)\r\n inputObj.value = ' '; // ????\r\n if (selTD.firstChild) { // selTD = <td> text </td>\r\n selTD.replaceChild(inputObj, selTD.firstChild);\r\n inputObj.select();\r\n } else { // selTD = <td />\r\n var parent = selTD.parentNode;\r\n var newTD = thisTable.document.createElement('TD');\r\n parent.replaceChild(newTD, selTD);\r\n newTD.appendChild(inputObj);\r\n }\r\n \r\n // make autocomplete input or just regular input\r\n if (selTD.getAttribute('autocomp') == 'true') {\r\n autoSuggest(inputObj, autoCompArray);\r\n }\r\n inputObj.addEventListener (\"blur\", inputObjBlur, false);\r\n inputObj.addEventListener (\"keypress\", inputObjKeyPress, false);\r\n } //onEdit\r\n \r\n function inputObjBlur(e) { \r\n // no re-editing of symbols for now\r\n document.getElementById(\"autosuggest\").style.display = 'none';\r\n newText = inputObj.value;\r\n selTD.setAttribute('about', newText);\r\n if (newText != '') {\r\n selTD.innerHTML = newText;\r\n }\r\n else {\r\n selTD.innerHTML = '---';\r\n }\r\n setSelected(selTD);\r\n e.stopPropagation();\r\n e.preventDefault();\r\n \r\n // sparql update\r\n if (!selTD.stat) {saveAddRowText(newText); return;};\r\n tabulator.log.msg('sparql update with stat: ' + selTD.stat);\r\n tabulator.log.msg('new object will be: ' + kb.literal(newText, ''));\r\n if (tabulator.isExtension) {sparqlUpdate = sparql.update_statement(selTD.stat);}\r\n else {sparqlUpdate = new sparql(kb).update_statement(selTD.stat);}\r\n // TODO: DEFINE ERROR CALLBACK\r\n //selTD.stat.object = kb.literal(newText, '');\r\n sparqlUpdate.set_object(kb.literal(newText, ''), function(uri,success,error_body) {\r\n if (success) {\r\n //kb.add(selTD.stat.subject, selTD.stat.predicate, selTD.stat.object, selTD.stat.why)\r\n tabulator.log.msg('sparql update success');\r\n var newStatement = kb.add(selTD.stat.subject, selTD.stat.predicate, kb.literal(newText, ''), selTD.stat.why);\r\n kb.remove(selTD.stat);\r\n selTD.stat = newStatement;\r\n }\r\n });\r\n }\r\n\r\n function inputObjKeyPress(e) {\r\n if (e.keyCode == 13) { //enter\r\n inputObjBlur(e);\r\n }\r\n } //***************** End Table Editing *****************//\r\n \r\n /******************************************************\r\n Add Row\r\n *******************************************************/\r\n // node type checking\r\n function literalRC (row, col) {\r\n var t = thisTable.document.getElementById('tabulated_data'); \r\n var tdNode = t.childNodes[row].childNodes[col];\r\n if (tdNode.getAttribute('type') =='lit') return true;\r\n } \r\n\r\n function bnodeRC (row, col) {\r\n var t = thisTable.document.getElementById('tabulated_data');\r\n var tdNode = t.childNodes[row].childNodes[col];\r\n if (tdNode.getAttribute('type') =='bnode') return true;\r\n }\r\n\r\n function symbolRC(row, col) {\r\n var t = thisTable.document.getElementById('tabulated_data');\r\n var tdNode = t.childNodes[row].childNodes[col];\r\n if (tdNode.getAttribute('type') == 'sym') return true;\r\n } // end note type checking\r\n \r\n // td creation for each type\r\n function createLiteralTD() {\r\n tabulator.log.msg('creating literalTD for addRow');\r\n var td = thisTable.document.createElement(\"TD\");\r\n td.setAttribute('type', 'lit');\r\n td.innerHTML = '---';\r\n return td;\r\n }\r\n \r\n function createSymbolTD() {\r\n tabulator.log.msg('creating symbolTD for addRow');\r\n var td = thisTable.document.createElement(\"TD\");\r\n td.editable=true;\r\n td.setAttribute('type', 'sym');\r\n td.setAttribute('style', 'color:#4444ff');\r\n td.innerHTML = \"---\";\r\n td.setAttribute('autocomp', 'true');\r\n return td;\r\n }\r\n\r\n function createBNodeTD() {\r\n var td = thisTable.document.createElement('TD');\r\n td.setAttribute('type', 'bnode');\r\n td.setAttribute('style', 'color:#4444ff');\r\n td.innerHTML = \"...\";\r\n bnode = kb.bnode();\r\n tabulator.log.msg('creating bnodeTD for addRow: ' + bnode.toNT());\r\n td.setAttribute('o', bnode.toNT());\r\n return td;\r\n } //end td creation\r\n \r\n function drawAddRow () {\r\n var form = thisTable.document.createElement('form');\r\n var but = thisTable.document.createElement('input');\r\n form.setAttribute('textAlign','right');\r\n but.setAttribute('type','button');\r\n but.setAttribute('id','addRowButton');\r\n but.addEventListener('click',addRow,true);\r\n but.setAttribute('value','+');\r\n form.appendChild(but);\r\n thisTable.container.appendChild(form);\r\n }\r\n \r\n // use kb.sym for symbols\r\n // use kb.bnode for blank nodes\r\n // use kb.literal for literal nodes \r\n function addRow () {\r\n var td; var tr = thisTable.document.createElement('tr');\r\n var t = thisTable.document.getElementById('tabulated_data');\r\n // create the td nodes for the new row\r\n // for each td node add the object variable like ?v0\r\n for (var i=0; i<numCols; i++) {\r\n if (symbolRC (1, i)) {\r\n td = createSymbolTD();\r\n td.v = qps[i].object;\r\n tabulator.log.msg('FOR COLUMN '+i+' v IS '+td.v);\r\n }\r\n else if (literalRC(1, i)) {\r\n td = createLiteralTD(); \r\n td.v = qps[i].object\r\n tabulator.log.msg('FOR COLUMN '+i+' v IS '+td.v);\r\n }\r\n else if (bnodeRC(1, i)) {\r\n td = createBNodeTD();\r\n td.v = qps[i].object\r\n tabulator.log.msg('FOR COLUMN '+i+' v IS '+td.v);\r\n }\r\n else {tabulator.log.warn('addRow problem')} \r\n tr.appendChild(td);\r\n }\r\n t.appendChild(tr);\r\n // highlight the td in the first column of the new row\r\n numRows = t.childNodes.length;\r\n clearSelected(selTD);\r\n newRow = numRows-1;\r\n newCol = 0;\r\n selTD = getTDNode(newRow, newCol); // first td of the row\r\n setSelected(selTD);\r\n // clone the qps array and attach a pointer to the clone on the first td of the row\r\n tabulator.log.msg('CREATING A CLONE OF QPS: ' + qps);\r\n var qpsClone = [];\r\n for (var i = 0; i<qps.length; i++) {\r\n var stat = qps[i];\r\n var newStat = new tabulator.rdf.Statement(stat.subject, stat.predicate, stat.object, stat.why);\r\n qpsClone[i] = newStat;\r\n }\r\n selTD.qpsClone = qpsClone; // remember that right now selTD is the first td of the row, qpsClone is not a 100% clone\r\n } //addRow\r\n \r\n function saveAddRowText(newText) {\r\n var td = selTD; // need to use this in case the user switches to a new TD in the middle of the autosuggest process\r\n td.editable=false;\r\n var type = td.getAttribute('type');\r\n // get the qps which is stored on the first cell of the row\r\n var qpsc = getTDNode(getRowIndex(td), 0).qpsClone;\r\n var row = getRowIndex(td);\r\n \r\n function validate() { // make sure the user has made a selection\r\n for (var i = 0; i<autoCompArray.length; i++) {\r\n if (newText == autoCompArray[i]) {\r\n return true;\r\n } \r\n }\r\n return false;\r\n }\r\n if (validate() == false && type == 'sym') {\r\n alert('Please make a selection');\r\n td.innerHTML = '---'; clearSelected(td); setSelected(selTD);\r\n return;\r\n }\r\n \r\n function getMatchingSym(text) {\r\n for (var i=0; i<autoCompArray.length; i++) {\r\n if (newText==autoCompArray[i]) {\r\n return entryArray[i][1];\r\n }\r\n }\r\n tabulator.log.warn('no matching sym');\r\n }\r\n \r\n var rowNum = getRowIndex(td);\r\n // fill in the query pattern based on the newText\r\n for (var i = 0; i<numCols; i++) {\r\n tabulator.log.msg('FILLING IN VARIABLE: ' + td.v);\r\n tabulator.log.msg('CURRENT STATEMENT IS: ' + qpsc[i]);\r\n if (qpsc[i].subject === td.v) { // subj is a variable\r\n if (type == 'sym') {qpsc[i].subject = getMatchingSym(newText);}\r\n if (type == 'lit') {qpsc[i].subject = kb.literal(newText, '');}\r\n if (type == 'bnode') {qpsc[i].subject = kb.bnode();}\r\n tabulator.log.msg('NEW QPSC IS: ' + qpsc);\r\n }\r\n if (qpsc[i].object === td.v) { // obj is a variable\r\n // TODO: DOUBLE QUERY PROBLEM IS PROBABLY HERE\r\n if (type == 'sym') {qpsc[i].object = getMatchingSym(newText);}\r\n if (type == 'lit') {qpsc[i].object = kb.literal(newText, '');}\r\n if (type == 'bnode') {qpsc[i].object = kb.bnode();}\r\n tabulator.log.msg('NEW QPSC IS: ' + qpsc);\r\n }\r\n }\r\n \r\n // check if all the variables in the query pattern have been filled out\r\n var qpscComplete = true; \r\n for (var i = 0; i<numCols; i++) {\r\n if (qpsc[i].subject.toString()[0]=='?') {qpscComplete = false;}\r\n if (qpsc[i].object.toString()[0]=='?') {qpscComplete = false;}\r\n }\r\n \r\n // if all the variables in the query pattern have been filled out, then attach stat pointers to each node, add the stat to the store, and perform the sparql update\r\n if (qpscComplete == true) {\r\n tabulator.log.msg('qpsc has been filled out: ' + qpsc);\r\n for (var i = 0; i<numCols; i++) {\r\n tabulator.log.msg('looking for statement in store: ' + qpsc[i]);\r\n var st = kb.anyStatementMatching(qpsc[i].subject, qpsc[i].predicate, qpsc[i].object); // existing statement for symbols\r\n if (!st) { // brand new statement for literals\r\n tabulator.log.msg('statement not found, making new statement');\r\n var why = qpsc[0].subject;\r\n st = new tabulator.rdf.Statement(qpsc[i].subject, qpsc[i].predicate, qpsc[i].object, why);\r\n //kb.add(st.subject, st.predicate, st.object, st.why);\r\n }\r\n var td = getTDNode(row, i);\r\n td.stat = st; \r\n \r\n // sparql update; for each cell in the completed row, send the value of the stat pointer\r\n tabulator.log.msg('sparql update with stat: ' + td.stat);\r\n if (tabulator.isExtension) {sparqlUpdate = sparql}\r\n else {sparqlUpdate = new sparql(kb)}\r\n // TODO: DEFINE ERROR CALLBACK\r\n sparqlUpdate.insert_statement(td.stat, function(uri,success,error_body) {\r\n if (success) {\r\n tabulator.log.msg('sparql update success');\r\n var newStatement = kb.add(td.stat.subject, td.stat.predicate, td.stat.object, td.stat.why);\r\n td.stat = newStatement;\r\n tabulator.log.msg('sparql update with '+newStatement);\r\n } \r\n });\r\n }\r\n }\r\n } // saveAddRowText\r\n\r\n /******************************************************\r\n Autosuggest box\r\n *******************************************************/\r\n // mostly copied from http://gadgetopia.com/post/3773\r\n function autoSuggest(elem, suggestions)\r\n {\r\n //Arrow to store a subset of eligible suggestions that match the user's input\r\n var eligible = new Array();\r\n //A pointer to the index of the highlighted eligible item. -1 means nothing highlighted.\r\n var highlighted = -1;\r\n //A div to use to create the dropdown.\r\n var div = document.getElementById(\"autosuggest\");\r\n //Do you want to remember what keycode means what? Me neither.\r\n var TAB = 9;\r\n var ESC = 27;\r\n var KEYUP = 38;\r\n var KEYDN = 40;\r\n var ENTER = 13;\r\n\r\n /********************************************************\r\n onkeyup event handler for the input elem.\r\n Enter key = use the highlighted suggestion, if there is one.\r\n Esc key = get rid of the autosuggest dropdown\r\n Up/down arrows = Move the highlight up and down in the suggestions.\r\n ********************************************************/\r\n elem.onkeyup = function(ev)\r\n {\r\n var key = getKeyCode(ev);\r\n\r\n switch(key)\r\n {\r\n case ENTER:\r\n useSuggestion();\r\n hideDiv();\r\n break;\r\n\r\n case ESC:\r\n hideDiv();\r\n break;\r\n\r\n case KEYUP:\r\n if (highlighted > 0)\r\n {\r\n highlighted--;\r\n }\r\n changeHighlight(key);\r\n break;\r\n\r\n case KEYDN:\r\n if (highlighted < (eligible.length - 1))\r\n {\r\n highlighted++;\r\n }\r\n changeHighlight(key);\r\n \r\n case 16: break;\r\n\r\n default:\r\n if (elem.value.length > 0) {\r\n getEligible();\r\n createDiv();\r\n positionDiv();\r\n showDiv();\r\n }\r\n else {\r\n hideDiv();\r\n }\r\n }\r\n };\r\n\r\n /********************************************************\r\n Insert the highlighted suggestion into the input box, and \r\n remove the suggestion dropdown.\r\n ********************************************************/\r\n useSuggestion = function() \r\n { // This is where I can move the onblur stuff\r\n if (highlighted > -1) {\r\n elem.value = eligible[highlighted];\r\n hideDiv();\r\n \r\n setTimeout(\"document.getElementById('\" + elem.id + \"').focus()\",0);\r\n }\r\n };\r\n\r\n /********************************************************\r\n Display the dropdown. Pretty straightforward.\r\n ********************************************************/\r\n showDiv = function()\r\n {\r\n div.style.display = 'block';\r\n };\r\n\r\n /********************************************************\r\n Hide the dropdown and clear any highlight.\r\n ********************************************************/\r\n hideDiv = function()\r\n {\r\n div.style.display = 'none';\r\n highlighted = -1;\r\n };\r\n\r\n /********************************************************\r\n Modify the HTML in the dropdown to move the highlight.\r\n ********************************************************/\r\n changeHighlight = function()\r\n {\r\n var lis = div.getElementsByTagName('LI');\r\n for (i in lis) {\r\n var li = lis[i];\r\n if (highlighted == i) {\r\n li.className = \"selected\";\r\n elem.value = li.firstChild.innerHTML;\r\n }\r\n else {\r\n if (!li) return; // fixes a bug involving \"li has no properties\"\r\n li.className = \"\";\r\n }\r\n }\r\n };\r\n\r\n /********************************************************\r\n Position the dropdown div below the input text field.\r\n ********************************************************/\r\n positionDiv = function()\r\n {\r\n var el = elem;\r\n var x = 0;\r\n var y = el.offsetHeight;\r\n\r\n //Walk up the DOM and add up all of the offset positions.\r\n while (el.offsetParent && el.tagName.toUpperCase() != 'BODY') {\r\n x += el.offsetLeft;\r\n y += el.offsetTop;\r\n el = el.offsetParent;\r\n }\r\n\r\n x += el.offsetLeft;\r\n y += el.offsetTop;\r\n\r\n div.style.left = x + 'px';\r\n div.style.top = y + 'px';\r\n };\r\n\r\n /********************************************************\r\n Build the HTML for the dropdown div\r\n ********************************************************/\r\n createDiv = function()\r\n {\r\n var ul = document.createElement('ul');\r\n\r\n //Create an array of LI's for the words.\r\n for (i in eligible) {\r\n var word = eligible[i];\r\n\r\n var li = document.createElement('li');\r\n var a = document.createElement('a');\r\n a.href=\"javascript:false\";\r\n a.innerHTML = word;\r\n li.appendChild(a);\r\n\r\n if (highlighted == i) {\r\n li.className = \"selected\";\r\n }\r\n\r\n ul.appendChild(li);\r\n }\r\n\r\n div.replaceChild(ul,div.childNodes[0]);\r\n\r\n /********************************************************\r\n mouseover handler for the dropdown ul\r\n move the highlighted suggestion with the mouse\r\n ********************************************************/\r\n ul.onmouseover = function(ev)\r\n {\r\n //Walk up from target until you find the LI.\r\n var target = getEventSource(ev);\r\n while (target.parentNode && target.tagName.toUpperCase() != 'LI')\r\n {\r\n target = target.parentNode;\r\n }\r\n \r\n var lis = div.getElementsByTagName('LI');\r\n \r\n\r\n for (i in lis)\r\n {\r\n var li = lis[i];\r\n if(li == target)\r\n {\r\n highlighted = i;\r\n break;\r\n }\r\n }\r\n changeHighlight();\r\n \r\n };\r\n\r\n /********************************************************\r\n click handler for the dropdown ul\r\n insert the clicked suggestion into the input\r\n ********************************************************/\r\n ul.onclick = function(ev)\r\n {\r\n \r\n useSuggestion();\r\n hideDiv();\r\n cancelEvent(ev);\r\n return false;\r\n };\r\n div.className=\"suggestion_list\";\r\n div.style.position = 'absolute';\r\n }; // createDiv\r\n\r\n /********************************************************\r\n determine which of the suggestions matches the input\r\n ********************************************************/\r\n getEligible = function()\r\n {\r\n eligible = new Array();\r\n for (i in suggestions) \r\n {\r\n var suggestion = suggestions[i];\r\n \r\n if(suggestion.toLowerCase().indexOf(elem.value.toLowerCase()) == \"0\")\r\n {\r\n eligible[eligible.length]=suggestion;\r\n }\r\n }\r\n };\r\n \r\n getKeyCode = function(ev) {\r\n if(ev) { return ev.keyCode;}\r\n };\r\n\r\n getEventSource = function(ev) {\r\n if(ev) { return ev.target; }\r\n };\r\n\r\n cancelEvent = function(ev) {\r\n if(ev) { ev.preventDefault(); ev.stopPropagation(); }\r\n }\r\n } // autosuggest\r\n \r\n //document.write('<div id=\"autosuggest\"><ul></ul></div>');\r\n var div = document.createElement('div');\r\n div.setAttribute('id','autosuggest');\r\n document.body.appendChild(div);\r\n div.appendChild(document.createElement('ul'));\r\n} // tableView", "function populateCurrentColumn(){\n for( var i = 0; i < totalTableRows; i++ ){\n var x = tbl.tBodies[0].rows[i].cells[currentIndex];\n //currentColumn.push(x);\n currentColumn.push(x.cloneNode(true));\n }\n }", "function loadTable() {\n $tbody.innerHTML = \"\";\n for (var i = 0; i < ufoData.length; i++) {\n var index = ufoData[i];\n console.log(index)\n var fields = Object.keys(index);\n var $row = $tbody.insertRow(i);\n for (var j = 0; j < fields.length; j++) {\n var field = fields[j];\n var $cell = $row.insertCell(j);\n $cell.innerText = index[field];\n }\n }\n}", "function Table() {\n\t this.columns = null; // written with the first row\n\t this.rows = [];\n\t }", "function resetTableValuesBeforeRendering (){\n listOfAllPieChartElements = [];\n remainingPieChartsForAdding = [];\n clearInterval(pieRenderedInterval);\n pieRenderedInterval = null;\n }", "function setRequiredVal(tableData) {\n for(var key in $scope.tableLists){\n if(tableData.tableName == key){\n angular.forEach($scope.tableLists[key], function(subTab,subTableKey){\n if(tableData.rowId == subTab.rowId && subTab.reqField.indexOf(tableData.propName.field)>=0){\n if(tableData.defaultVal){\n subTab.reqFieldVal.push(tableData.defaultVal)\n }\n else{\n subTab.reqFieldVal.push(tableData.columnName)\n }\n }\n })\n }\n }\n }", "function selectedRowToInput()\r\n {\r\n \r\n for(var i = 1; i < table.rows.length; i++)\r\n {\r\n table.rows[i].onclick = function()\r\n {\r\n // get the seected row index\r\n rIndex = this.rowIndex;\r\n document.getElementById(\"company name\").value = this.cells[0].innerHTML;\r\n document.getElementById(\"tel\").value = this.cells[1].innerHTML;\r\n document.getElementById(\"company address\").value = this.cells[2].innerHTML;\r\n document.getElementById(\"email\").value = this.cells[3].innerHTML;\r\n document.getElementById(\"items\").value = this.cells[4].innerHTML;\r\n document.getElementById(\"amount\").value = this.cells[5].innerHTML;\r\n document.getElementById(\"date\").value = this.cells[6].innerHTML;\r\n };\r\n }\r\n }", "function setInputFieldId(index, value) {\n\n //debugger;\n\n //Intern_TableFieldIDs[index] = value;\n Intern_InputFieldIds[index] = value;\n Intern_InputFieldElems[index] = $(\"#\" + value);\n Intern_InputFieldTypes[index] = Intern_InputFieldElems[index].attr(\"type\");\n if (Intern_InputFieldTypes[index] === undefined)\n Intern_InputFieldTypes[index] = \"select\";\n }", "clearInputtedData() {\n this.inputtedData = {};\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 setInputData(event) {\r\n\r\n\t\t\t\t\t\t// console.log($('#row'));\r\n\t\t\t\t\t\tclearFields();\r\n\t\t\t\t\t\tvar row = \"#\" + $(this).parent().parent().attr('id');\r\n\r\n\t\t\t\t\t\tconsole.log(row);\r\n\r\n\t\t\t\t\t\tvar idModelo = $(row).find(\"td:eq(0)\").text();\r\n\r\n\t\t\t\t\t\tvar descMarca = $(row).find(\"td:eq(1)\").text();\r\n\r\n\t\t\t\t\t\tvar descTipoV = $(row).find(\"td:eq(2)\").text();\r\n\r\n\t\t\t\t\t\tvar descModelo = $(row).find(\"td:eq(3)\").text();\r\n\r\n\t\t\t\t\t\tvar statusModelo = $(row).find(\"td:eq(4)\").text();\r\n\r\n\t\t\t\t\t\tconsole.log(\"Status: \" + statusModelo);\r\n\r\n\t\t\t\t\t\t$('#tf_Id').val(idModelo);\r\n\t\t\t\t\t\t$('#tf_Descricao').val(descModelo);\r\n\r\n\t\t\t\t\t\t// Define O Valor Do Status Como Numero Para\r\n\t\t\t\t\t\tif (statusModelo.toLowerCase() === \"ativo\") {\r\n\t\t\t\t\t\t\t$('#slc_Status').val(0);\r\n\t\t\t\t\t\t} else if (statusModelo.toLowerCase() === \"inativo\") {\r\n\t\t\t\t\t\t\t$('#slc_Status').val(1);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Define O Valor Da Marca No Select\r\n\t\t\t\t\t\t$.each($('#slc_Marca').children(), function(k, v) {\r\n\t\t\t\t\t\t\t// Define O Valor Do Option Para False Para Depois\r\n\t\t\t\t\t\t\t// Definir\r\n\t\t\t\t\t\t\t// Um Valor Como TRUE\r\n\t\t\t\t\t\t\t$(v).attr('selected', false);\r\n\r\n\t\t\t\t\t\t\t// Efetua A Comparação Para Ver Se O Valor Da Table\r\n\t\t\t\t\t\t\t// é igual\r\n\t\t\t\t\t\t\t// Ao valor do OPTION\r\n\t\t\t\t\t\t\tif ($(v).text().toLowerCase() === descMarca\r\n\t\t\t\t\t\t\t\t\t.toLowerCase()) {\r\n\r\n\t\t\t\t\t\t\t\t$(v).attr('selected', true);\r\n\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// Define O Valor Do TipoVeiculo No Select\r\n\t\t\t\t\t\t$.each($('#slc_TipoVeiculo').children(),\r\n\t\t\t\t\t\t\t\tfunction(k, v) {\r\n\t\t\t\t\t\t\t\t\t// Define O Valor Do Option Para False Para\r\n\t\t\t\t\t\t\t\t\t// Depois\r\n\t\t\t\t\t\t\t\t\t// Definir\r\n\t\t\t\t\t\t\t\t\t// Um Valor Como TRUE\r\n\t\t\t\t\t\t\t\t\t$(v).attr('selected', false);\r\n\r\n\t\t\t\t\t\t\t\t\t// Efetua A Comparação Para Ver Se O Valor\r\n\t\t\t\t\t\t\t\t\t// Da Table\r\n\t\t\t\t\t\t\t\t\t// é igual\r\n\t\t\t\t\t\t\t\t\t// Ao valor do OPTION\r\n\t\t\t\t\t\t\t\t\tif ($(v).text().toLowerCase() === descTipoV\r\n\t\t\t\t\t\t\t\t\t\t\t.toLowerCase()) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t$(v).attr('selected', true);\r\n\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// Acessa O Componente Filho Do Select(OPTION)\r\n\t\t\t\t\t\t// roda a funcao para separar o valor(value) do conteudo\r\n\t\t\t\t\t\t// do\r\n\t\t\t\t\t\t// OPTION\r\n\t\t\t\t\t\t$.each($('#slc_Status').children(), function(k, v) {\r\n\t\t\t\t\t\t\t// Define O Valor Do Option Para False Para Depois\r\n\t\t\t\t\t\t\t// Definir\r\n\t\t\t\t\t\t\t// Um Valor Como TRUE\r\n\t\t\t\t\t\t\t$(v).attr('selected', false);\r\n\r\n\t\t\t\t\t\t\t// Efetua A Comparação Para Ver Se O Valor Da Table\r\n\t\t\t\t\t\t\t// é igual\r\n\t\t\t\t\t\t\t// Ao valor do OPTION\r\n\t\t\t\t\t\t\tif ($(v).text().toLowerCase() === statusModelo\r\n\t\t\t\t\t\t\t\t\t.toLowerCase()) {\r\n\t\t\t\t\t\t\t\t$(v).attr('selected', true);\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 button = $('#btn-operation');\r\n\t\t\t\t\t\tif ($('#tf_Id').val() != \"\") {\r\n\t\t\t\t\t\t\tbutton.val(\"Atualizar Modelo\");\r\n\t\t\t\t\t\t} else if ($('#tf_Id').val() == \"\") {\r\n\t\t\t\t\t\t\tbutton.val(\"Inserir Modelo\");\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}", "function scrollToBeginningfn(segmentID)\n{\n\tif(gDataArray != [])\n\t\tsegmentID.selectedIndex = [0,0];//indicates 1st row in 1st section of segmented ui.\n}", "function setRowsCols() {\n\tvar num_rows = document.getElementById(\"choose_rows\").value;\n\tvar num_cols = document.getElementById(\"choose_cols\").value;\n\n\t// Modifies myTable properties based on validated form input data\n\tmyTable.rows = parseInt(num_rows)+1; // extra row created for column headers\n\tmyTable.cols = parseInt(num_cols);\n}", "function RefreshTable() {\n dc.events.trigger(function () {\n alldata = tableDimension.top(Infinity);\n datatable.fnClearTable();\n datatable.fnAddData(alldata);\n datatable.fnDraw();\n });\n }", "function resetTable(tableId){\n //setting table data to an empty array will clear all rows \n $(tableId).bootstrapTable('load', []);\n }", "setData (input, index) {\n\t\t// If index is >= size of Linked List, It adds the value.\n\t\tif (index >= this.length) {\n\t\t\tthis.add(input, index);\n\t\t} else {\n\t\t\t// If index already have some data it replaces it with input.\n\t\t\tlet head = this.head;\n\t\t\tfor (let i = 0; i < this.length; i++) {\n\t\t\t\tif (i === index) {\n\t\t\t\t\thead.data = input;\n\t\t\t\t}\n\t\t\t\thead = head.next;\n\t\t\t}\n\t\t}\n\t}", "setInitialPageView () {\n // all dimensions on rows, entity key dimension is at last row, measure dimension on columns\n const rf = []\n const cf = []\n const tf = []\n\n // rows: rank dimensions\n for (let nDim = 1; nDim < this.rank; nDim++) {\n rf.push(this.dimProp[nDim])\n }\n if (this.dimProp.length > 0) rf.push(this.dimProp[0]) // entity key dimension at rows on last position\n\n // columns: measure attribute dimension, it is at [rank] position in dimensions array\n if (this.dimProp.length > this.rank) cf.push(this.dimProp[this.rank])\n\n // for rows and columns select all items\n for (const f of cf) {\n f.selection = Array.from(f.enums)\n f.singleSelection = (f.selection.length > 0) ? f.selection[0] : {}\n }\n for (const f of rf) {\n f.selection = Array.from(f.enums)\n f.singleSelection = (f.selection.length > 0) ? f.selection[0] : {}\n }\n // other dimensions are empty by default\n this.rowFields = rf\n this.colFields = cf\n this.otherFields = tf\n\n // default row-column mode: row-column headers without spans\n // as it is today microdata cannot be scalar, always has at least one attribute\n this.pvc.rowColMode = !this.isScalar ? Pcvt.SPANS_AND_DIMS_PVT : Pcvt.NO_SPANS_NO_DIMS_PVT\n\n // store pivot view\n const vs = Pcvt.pivotStateFromFields(this.rowFields, this.colFields, this.otherFields, this.ctrl.isRowColControls, this.pvc.rowColMode, KEY_DIM_NAME)\n vs.pageStart = 0\n vs.pageSize = this.isPages ? this.pageSize : SMALL_PAGE_SIZE\n\n this.dispatchMicrodataView({\n key: this.routeKey,\n view: vs,\n digest: this.digest || '',\n modelName: Mdf.modelName(this.theModel),\n runDigest: this.runDigest || '',\n entityName: this.entityName || ''\n })\n\n // refresh pivot view: both dimensions labels and table body\n this.ctrl.isPvDimsTickle = !this.ctrl.isPvDimsTickle\n this.ctrl.isPvTickle = !this.ctrl.isPvTickle\n }", "function preEdit() {\r\n\tpreEditBtn.addEventListener(\"click\", () => {\r\n\t\tfor (let i = 0; i < editElements.length; i++) {\r\n\t\t\tconst tdData = document.querySelectorAll(\".selected .tdData\");\r\n\t\t\teditElements[i].value = \"\";\r\n\t\t\tif (tdData[i]) {\r\n\t\t\t\teditElements[i].value = tdData[i].innerHTML;\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n}", "function createTable() {\r\n var matrix = getMatrix();\r\n cleanTable();\r\n\r\n var rowsH = '<th scope=\"col\">#</th>';\r\n var rowsB = '';\r\n idElements = [];\r\n matrix.forEach((row, i) => {\r\n var idRows = [];\r\n rowsH += `<th scope=\"col\">${i}</th>`;\r\n rowsB += `<tr>\\n\r\n <th scope=\"row\">${i}</th>\\n`;\r\n row.forEach((column, j) => {\r\n rowsB += `<td><input type=\"number\" class=\"form-control w-100\" id=\"element${i}-${j}\" value=\"${column}\"></td>\\n`;\r\n idRows.push(`element${i}-${j}`);\r\n });\r\n idElements.push(idRows);\r\n rowsB += `</tr>`;\r\n });\r\n mheader.innerHTML = rowsH;\r\n mbody.innerHTML = rowsB;\r\n}", "function setData() {\t\n\t\n\tvar db = Ti.Database.install('../products.sqlite','products');\n\n\tvar rows = db.execute('SELECT DISTINCT category FROM products');\n\n\t// create the array\n\tvar dataArray = [];\n\t\t\t\n\twhile (rows.isValidRow())\n\t{\n\t dataArray.push({title:'' + rows.fieldByName('category') + '', hasChild:true, path:'../products/products.js'});\n\t rows.next();\t\n\t};\n\t\n\t// set the array to the tableView\n\ttableview.setData(dataArray);\n}", "function populateTable(tableOutputBody) {\n\tif (tableOutputBody == null) {\n\t\treturn;\n\t}\n\t\n\tvar columnsMetadata = getTableColumnsMetadata();\n\tif (columnsMetadata == null) {\n\t\treturn;\n\t}\n\t\n\tclearAllTableRows();\n\t\n\tvar lastIndex = getHighestIndex(columnsMetadata[0].id);\n\tfor (var i = 0; i <= lastIndex; i++) {\n\t\tpopulateTableRow(tableOutputBody, columnsMetadata, i);\n\t}\n}", "function populateTable(tableOutputBody) {\n\tif (tableOutputBody == null) {\n\t\treturn;\n\t}\n\t\n\tvar columnsMetadata = getTableColumnsMetadata();\n\tif (columnsMetadata == null) {\n\t\treturn;\n\t}\n\t\n\tclearAllTableRows();\n\t\n\tvar lastIndex = getHighestIndex(columnsMetadata[0].id);\n\tfor (var i = 0; i <= lastIndex; i++) {\n\t\tpopulateTableRow(tableOutputBody, columnsMetadata, i);\n\t}\n}", "function takeValues(){\nvar uomTable = document.getElementsByClassName(\"uomTable\")[0];\nvar tblBody = uomTable.tBodies[0];\nallValues = [];\nvar rows = tblBody.rows,\n rlen = rows.length,\n arr = new Array(),\n i, j, cells, clen;\n for (i = 0; i < rlen; i++) {\n cells = rows[i].getElementsByTagName('input');\n clen = cells.length;\n arr[i] = new Array();\n for (j = 0; j < clen; j++) {\n arr[i][j] = Number(cells[j].value);\n allValues.push(arr[i][j]);\n }\n}}", "setData(data) {\n this.dataAgents.map((d, idx) => d.setData(data[idx]));\n this.sheet.table.render();\n }", "function updateDatabaseTable(){\n\n let inputToDatabase={};\n\n for (let i = 0 ; i < mvTableBody.columns.length ; i++) {\n //inputToDatabase.push({[mvTableBody.columns[i].name] : mvTableBody.columns[i].value});\n inputToDatabase[mvTableBody.columns[i].name] = mvTableBody.columns[i].value;\n }\n updateTable(inputToDatabase);\n}", "function initTableFromAry(){\n\t//setPaginationActiveClass(1);\n\t//var num_pages = rebuildTableFromAry();\n\t//rebuildPagination(num_pages);\n}", "function prepData(rows) {\n var i = 1;\n rows.forEach( (row) => {\n row.index = i;\n if (row.Count) {\n row.Count = +row.Count;\n }\n i++;\n });\n return rows;\n}", "$resetIndex() {\n this.$index = utils.range(0, this.shape[0] - 1);\n }", "function clearInputData() {\n console.log('clearInputData');\n gaInputData = [];\n updateInputDataDisplay();\n updateInputDataFooter();\n}", "function selectedToInput(sRow){\n\n\t// Data of dertergent when selected\n\tfor (i = 0; i < NAME_LIST.length; i++) {\n\n\t\tlet curField = NAME_LIST[i];\n\t\tif (curField === \"color\") {\n\n\t\t\tlet curCol = sRow.color\n\t\t\tcurField = '#'+curField\n\t\t\t$(curField).val(\"#\"+RGBToHex(curCol[0],curCol[1],curCol[2]));\n\n\t\t} else if (!(curField === \"PDB_file\" || curField === \"image\")){\n\n\t\t\t//curField = \"#\"+curField\n\t\t\t//document.getElementById(curField).value = String(); \n\t\t\t$(\"#\"+curField).val(sRow[curField]);\n\t\t};\n\t};\n}", "setFillItem(item , index){\n for(let field in this.originalData){\n\n if(field in item){\n this[field] = item[field];\n }else{\n // if is index\n if(field == 'index'){ this[field] = index; }\n\n }\n\n }\n\n }", "function Add_Input(){\r\n\tAppend_Row('#input_list');\r\n\tAppend_Row('#input_state');\r\n\tAppend_Row('#input_rules');\r\n\tApp_Reset();\r\n}", "set individualControls(array){\n\t\tthis.icShowerSelector = array[0];\n\t\tthis.icHiderSelector = array[1];\n\t\tthis.icDisplayType = array[2];\n\t}", "function processData(data, first) {\n var fields = _.pluck(data.result.fields, 'id');\n var records = _.map(data.result.records, function(r){\n return _.values(r);\n });\n first && records.unshift(fields);\n return records;\n }", "function VaciaCamposLineas(){\n\t$('#inputidAfectado').prop(\"SelectedIndex\",0);\n\t$('#selectEsencial').prop(\"SelectedIndex\",0);\n\t$('#selectUds').prop(\"SelectedIndex\",0);\n\t$('#inputCantidad').val(\"\"); \n\t$('#inputCosteUd').val(\"\"); \n\t$('#inputCosteTotal').val(\"\"); \n\t$('#inputCosteRacion').val(\"\"); \n\t$('#inputMerma').val(\"\"); \n}", "constructor(inputArray) {\n\t\tthis.updateParent(inputArray);\n\t}", "function refreshAll() {\n refreshTable(trainArray);\n}", "function fillResultTable() {\r\n $(\"#result-table\").DataTable().clear().draw();\r\n for(let i = 0; i < foods_onlineData.length; i++){\r\n var food_array = foods_onlineData[i];\r\n var name = food_array[\"food_name\"];\r\n var serving_size = food_array[\"serving_weight_grams\"].toString();\r\n var calories = food_array[\"nf_calories\"].toString();\r\n var carbohydrate = food_array[\"nf_total_carbohydrate\"].toString();\r\n var protein = food_array[\"nf_protein\"].toString();\r\n var fat = food_array[\"nf_total_fat\"].toString();\r\n $(\"#result-table\").DataTable().row.add([name, serving_size, calories, carbohydrate, protein, fat, \"0\"]).draw();\r\n }; \r\n}", "function theQwertyGrid_reFillTable(data) {\n\t\t\ttheQwertyGrid_clearAllRows();\n\t\t\ttheQwertyGrid_addRows(data, _theQwertyGrid_tableProps);\n\t\t}", "function InputTableBuilder_Class() {\n\n //\n // Private Class Attributes\n //\n var Intern_InputFieldIds = [];\n var Intern_InputFieldElems = [];\n var Intern_InputFieldTypes = [];\n //var Intern_InputFieldIdToDisplays = [];\n var Intern_TableFieldIDs = [];\n var Intern_TableFieldDispNames = [];\n var Intern_EditableFieldIDs = [];\n var Intern_TableFieldDesc = {};\n var Intern_ArrTableFieldDesc = [];\n\n\n var Intern_ValidationFunct = null;\n var Intern_AddButtonId = \"\";\n var Intern_TableDivName = \"\";\n var Intern_TableDivElem = null;\n\n var Intern_Delimiter = \"*%*\";\n var Intern_ArrayOfValues = [];\n var Intern_DictConcatInput = null;\n\n var Intern_LineEditedNum = null;\n\n var Setting_AddToTop = true;\n var Setting_IncludeUpDown = false;\n var Setting_IncludeEdit = true;\n var Setting_IncludeDelete = true;\n var Setting_UseNgBlur = true;\n var Setting_PointToOriginalArr = false;\n var Setting_UseInputBoxForEditable = false;\n\n var Disp_TextAdd = \"Add\";\n var Disp_TextSave = \"Save\";\n var Disp_OperationsTitle = \"Tasks\";\n var Disp_TextUp = \"Up\";\n var Disp_TextDown = \"Down\";\n var Disp_TextEdit = \"Edit\";\n var Disp_TextDelete = \"Delete\";\n\n var Intern_LinkStyle = \"\";\n\n var Intern_InstanceName = Math.floor((Math.random() * 100) + 1) + \"_\";\n\n\n\n //\n // Public Class Attributes\n //\n\n\n\n\n //\n // Private Class Methods\n //\n\n\n\n\n\n //\n // Public Class Methods\n //\n\n function setInstanceName(str) {\n Intern_InstanceName = str + \"_\";\n }\n\n // Function used to specify the field IDs, html elements, and types\n function setInputFieldId(index, value) {\n\n //debugger;\n\n //Intern_TableFieldIDs[index] = value;\n Intern_InputFieldIds[index] = value;\n Intern_InputFieldElems[index] = $(\"#\" + value);\n Intern_InputFieldTypes[index] = Intern_InputFieldElems[index].attr(\"type\");\n if (Intern_InputFieldTypes[index] === undefined)\n Intern_InputFieldTypes[index] = \"select\";\n }\n\n // Function used to specify the array of input field IDs\n function setInputFieldIds(arrInputFieldIds) {\n $.each(arrInputFieldIds, function (index, value) {\n setInputFieldId(index, value);\n });\n }\n\n // Function used to specify the fields to display on the table\n //function setInputFieldIdToDisplays(arrInputFieldIdToDisplays) {\n function setTableFieldIDs(arrInputFieldIdToDisplays) {\n\n //debugger;\n\n for (var i = 0; i < arrInputFieldIdToDisplays.length; i++) {\n //Intern_InputFieldIdToDisplays[i] = arrInputFieldIdToDisplays[i];\n Intern_TableFieldIDs[i] = arrInputFieldIdToDisplays[i];\n }\n }\n\n // Function used to specify the name of the table columns\n function setTableFieldDispNames(arrFieldDispNames) {\n $.each(arrFieldDispNames, function (index, value) {\n Intern_TableFieldDispNames[index] = value;\n });\n }\n\n // Function used to specify the validation function\n function setValidationFunct(funct) {\n Intern_ValidationFunct = funct;\n }\n // Function used to add button and the add function\n function setAddButtonId(str, funct) {\n Intern_AddButtonId = str;\n $(\"#\" + str).click(function () {\n\n //debugger;\n\n if (Intern_ValidationFunct === undefined || Intern_ValidationFunct === null\n || Intern_ValidationFunct() === true) {\n if ($(this).html() === Disp_TextAdd)\n AddDataFunct(funct);\n else\n EditDataFunct(funct);\n Intern_DictConcatInput = null;\n }\n });\n }\n // Function used to specify the div in which the table is to be displayed\n function setTableDivName(str) {\n Intern_TableDivName = str;\n Intern_TableDivElem = $(\"#\" + str);\n }\n // Function used to specify some table settings and operations\n function setSettings(obj) {\n Setting_AddToTop = (obj.Set_AddToTop !== undefined && obj.Set_AddToTop !== null && obj.Set_AddToTop !== \"\") ? obj.Set_AddToTop : Setting_AddToTop;\n Setting_IncludeUpDown = (obj.Set_IncludeUpDown !== undefined && obj.Set_IncludeUpDown !== null && obj.Set_IncludeUpDown !== \"\") ? obj.Set_IncludeUpDown : Setting_IncludeUpDown;\n Setting_IncludeEdit = (obj.Set_IncludeEdit !== undefined && obj.Set_IncludeEdit !== null && obj.Set_IncludeEdit !== \"\") ? obj.Set_IncludeEdit : Setting_IncludeEdit;\n Setting_IncludeDelete = (obj.Set_IncludeDelete !== undefined && obj.Set_IncludeDelete !== null && obj.Set_IncludeDelete !== \"\") ? obj.Set_IncludeDelete : Setting_IncludeDelete;\n Setting_UseNgBlur = (obj.Set_UseNgBlur !== undefined && obj.Set_UseNgBlur !== null && obj.Set_UseNgBlur !== \"\") ? obj.Set_UseNgBlur : Setting_UseNgBlur;\n Setting_PointToOriginalArr = (obj.Set_PointToOriginalArr !== undefined && obj.Set_PointToOriginalArr !== null && obj.Set_PointToOriginalArr !== \"\") ? obj.Set_PointToOriginalArr : Setting_PointToOriginalArr;\n Setting_UseInputBoxForEditable = (obj.Set_UseInputBoxForEditable !== undefined && obj.Set_UseInputBoxForEditable !== null && obj.Set_UseInputBoxForEditable !== \"\") ? obj.Set_UseInputBoxForEditable : Setting_UseInputBoxForEditable;\n }\n // Function used to specify some of the text to be displayed on the table\n function setDispText(obj) {\n\n //debugger;\n\n Disp_TextAdd = (obj.Disp_TextAdd !== undefined && obj.Disp_TextAdd !== null && obj.Disp_TextAdd !== \"\") ? obj.Disp_TextAdd : Disp_TextAdd;\n Disp_TextSave = (obj.Disp_TextSave !== undefined && obj.Disp_TextSave !== null && obj.Disp_TextSave !== \"\") ? obj.Disp_TextSave : Disp_TextSave;\n Disp_OperationsTitle = (obj.Disp_OperationsTitle !== undefined && obj.Disp_OperationsTitle !== null && obj.Disp_OperationsTitle !== \"\") ? obj.Disp_OperationsTitle : Disp_OperationsTitle;\n Disp_TextUp = (obj.Disp_TextUp !== undefined && obj.Disp_TextUp !== null && obj.Disp_TextUp !== \"\") ? obj.Disp_TextUp : Disp_TextUp;\n Disp_TextDown = (obj.Disp_TextDown !== undefined && obj.Disp_TextDown !== null && obj.Disp_TextDown !== \"\") ? obj.Disp_TextDown : Disp_TextDown;\n Disp_TextEdit = (obj.Disp_TextEdit !== undefined && obj.Disp_TextEdit !== null && obj.Disp_TextEdit !== \"\") ? obj.Disp_TextEdit : Disp_TextEdit;\n Disp_TextDelete = (obj.Disp_TextDelete !== undefined && obj.Disp_TextDelete !== null && obj.Disp_TextDelete !== \"\") ? obj.Disp_TextDelete : Disp_TextDelete;\n }\n // Function used to style the link on the table\n function setDispStyle(str) {\n Intern_LinkStyle = str;\n }\n // Function used to specify the data delimiter\n function setDelimiter(delim) {\n Intern_Delimiter = delim;\n }\n\n // Function used to specify the object data list, together with the field names and the field IDs\n function setArrayOfValuesFNames_Ver1_2(objList, fieldIDs, fieldIDsToDisp, fieldNames) {\n\n //debugger;\n\n // We specify here the display names on the table for the various data fields\n if (fieldNames !== undefined && fieldNames !== null && fieldNames.length !== 0) {\n $.each(fieldNames, function (index, value) {\n Intern_TableFieldDispNames[index] = value;\n });\n }\n else if (fieldIDsToDisp !== undefined && fieldIDsToDisp !== null && fieldIDsToDisp.length !== 0) {\n $.each(fieldIDsToDisp, function (index, value) {\n Intern_TableFieldDispNames[index] = value;\n });\n }\n else if (fieldIDs !== undefined && fieldIDs !== null && fieldIDs.length !== 0) {\n $.each(fieldIDs, function (index, value) {\n Intern_TableFieldDispNames[index] = value;\n });\n }\n else if (objList !== undefined && objList !== null && objList.length !== 0) {\n var i = 0;\n $.each(objList[0], function (index, value) {\n Intern_TableFieldDispNames[i] = index;\n i++;\n });\n\n //debugger;\n\n }\n\n // We specify here the data fields that will be displayed on the table\n if (fieldIDsToDisp !== undefined && fieldIDsToDisp !== null && fieldIDsToDisp.length !== 0) {\n $.each(fieldIDsToDisp, function (index, value) {\n Intern_TableFieldIDs[index] = value;\n //setInputFieldId(index, value);\n });\n }\n else if (fieldIDs !== undefined && fieldIDs !== null && fieldIDs.length !== 0) {\n $.each(fieldIDs, function (index, value) {\n Intern_TableFieldIDs[index] = value;\n //setInputFieldId(index, value);\n });\n }\n else if (objList !== undefined && objList !== null && objList.length !== 0) {\n var i = 0;\n $.each(objList[0], function (index, value) {\n Intern_TableFieldIDs[i] = index;\n i++;\n });\n\n //debugger;\n\n }\n\n // We specify here the data fields to be considered in creating the array\n if (fieldIDs !== undefined && fieldIDs !== null && fieldIDs.length !== 0) {\n setInputFieldIds(fieldIDs);\n }\n else {\n setInputFieldIds(Intern_TableFieldIDs);\n }\n\n // In case we do not have anything defined in terms of the fields, we quit the function\n if (Intern_TableFieldDispNames.length === 0 || Intern_TableFieldIDs.length === 0)\n return;\n\n // Here we are building the array of the values for display in the table\n if (objList !== undefined && objList !== null /* && objList.length !== 0 */) {\n if (Setting_PointToOriginalArr === true) {\n Intern_ArrayOfValues = objList;\n }\n else {\n Intern_ArrayOfValues.splice(0, Intern_ArrayOfValues.length);\n //Intern_ArrayOfValues = [];\n $.each(objList, function (index, value) {\n Intern_ArrayOfValues[index] = {};\n $.each(value, function (index1, value1) {\n Intern_ArrayOfValues[index][index1] = value1;\n });\n });\n }\n }\n GenerateFullTable();\n }\n // Function used to specify the object data list, together with the field names and the field IDs\n function setArrayOfValuesFNames(objList, fieldNames, fieldIDs) {\n\n //debugger;\n\n if (objList !== undefined && objList !== null && objList.length !== 0) {\n var tableFieldDispNamesDefined = false;\n if (Intern_TableFieldDispNames !== undefined && Intern_TableFieldDispNames !== null && Intern_TableFieldDispNames.length !== 0)\n tableFieldDispNamesDefined = true;\n if (Setting_PointToOriginalArr === true) {\n Intern_ArrayOfValues = objList;\n }\n else {\n Intern_ArrayOfValues.splice(0, Intern_ArrayOfValues.length);\n //Intern_ArrayOfValues = [];\n $.each(objList, function (index, value) {\n Intern_ArrayOfValues[index] = {};\n $.each(fieldIDs, function (index1, value1) {\n Intern_ArrayOfValues[index][fieldIDs[index1]] = value[value1];\n if (index === 0) {\n\n setInputFieldId(index1, fieldIDs[index1]);\n\n if (tableFieldDispNamesDefined === false)\n Intern_TableFieldDispNames[index1] = fieldIDs[index1];\n }\n });\n });\n }\n }\n else {\n var tableFieldDispNamesDefined = false;\n if (Intern_TableFieldDispNames !== undefined && Intern_TableFieldDispNames !== null && Intern_TableFieldDispNames.length !== 0)\n tableFieldDispNamesDefined = true;\n $.each(fieldIDs, function (index1, value1) {\n if (tableFieldDispNamesDefined === false) {\n Intern_TableFieldDispNames[index1] = fieldNames[index1];\n }\n });\n }\n GenerateFullTable();\n }\n // Function used to specify the object data list\n function setArrayOfValues(objList) {\n\n //debugger;\n\n if (objList !== undefined && objList !== null) {\n var tableFieldDispNamesDefined = false;\n if (Intern_TableFieldDispNames !== undefined && Intern_TableFieldDispNames !== null && Intern_TableFieldDispNames.length !== 0)\n tableFieldDispNamesDefined = true;\n if (Setting_PointToOriginalArr === true) {\n Intern_ArrayOfValues = objList;\n }\n else {\n Intern_ArrayOfValues.splice(0, Intern_ArrayOfValues.length);\n //Intern_ArrayOfValues = [];\n $.each(objList, function (index, value) {\n Intern_ArrayOfValues[index] = {};\n $.each(value, function (index1, value1) {\n Intern_ArrayOfValues[index][index1] = value1;\n if (index === 0) {\n\n setInputFieldId(Intern_InputFieldIds.length, index1);\n\n if (tableFieldDispNamesDefined === false)\n Intern_TableFieldDispNames[Intern_TableFieldDispNames.length] = index1;\n }\n });\n });\n }\n GenerateFullTable();\n }\n }\n\n // Function used to return the array of values\n function getArrayOfValues() {\n\n //debugger;\n\n return Intern_ArrayOfValues\n }\n\n // Function used to Generate the table, and put in some values\n function GenerateFullTable() {\n\n //debugger;\n\n if((Intern_TableDivName === undefined || Intern_TableDivName === null || Intern_TableDivName === \"\") ||\n (Intern_TableDivElem === undefined || Intern_TableDivElem === null || Intern_TableDivElem === \"\"))\n return;\n\n var Intern_TableHtml = '';\n if (Intern_ArrayOfValues.length !== 0) {\n Intern_TableHtml = Intern_TableHtml + '<table class=\"tableCls\">';\n Intern_TableHtml = Intern_TableHtml + '<thead>';\n Intern_TableHtml = Intern_TableHtml + '<tr id=\"' + Intern_InstanceName + 'trHeaders\">';\n if (Intern_TableFieldDispNames === undefined || Intern_TableFieldDispNames === null)\n Intern_TableFieldDispNames = Intern_TableFieldIDs;\n $.each(Intern_TableFieldDispNames, function (index, value) {\n Intern_TableHtml = Intern_TableHtml + '<th class=\"tableHeadCls\">';\n Intern_TableHtml = Intern_TableHtml + value;\n Intern_TableHtml = Intern_TableHtml + '</th>';\n });\n if (Setting_IncludeUpDown || Setting_IncludeEdit || Setting_IncludeDelete) {\n Intern_TableHtml = Intern_TableHtml + '<th class=\"tableHeadCls\">';\n Intern_TableHtml = Intern_TableHtml + Disp_OperationsTitle;\n Intern_TableHtml = Intern_TableHtml + '</th>';\n }\n Intern_TableHtml = Intern_TableHtml + '</tr>';\n Intern_TableHtml = Intern_TableHtml + '</thead>';\n\n Intern_TableHtml = Intern_TableHtml + '<tbody>';\n Intern_TableHtml = Intern_TableHtml + '</tbody>';\n Intern_TableHtml = Intern_TableHtml + '</table>';\n\n Intern_TableDivElem.html(Intern_TableHtml);\n\n $(\"#\" + Intern_TableDivName + \" tbody\").html(GenerateTableData());\n for (var i = 0; i < Intern_ArrayOfValues.length; i++)\n AddEvents(i);\n Intern_DictConcatInput = null;\n }\n }\n\n // Function used to generate the concatenated fields to be sent to the controller\n function Generate_DictConcatFieldInput() {\n Intern_DictConcatInput = {};\n //var firstRun = true;\n $.each(Intern_ArrayOfValues, function (index, value) {\n if (index === 0) {\n $.each(value, function (index1, value1) {\n Intern_DictConcatInput[index1] = value1 + Intern_Delimiter;\n });\n }\n else {\n $.each(value, function (index1, value1) {\n Intern_DictConcatInput[index1] = Intern_DictConcatInput[index1] + value1 + Intern_Delimiter;\n });\n }\n });\n }\n // Function used to extract a specific concatenated field\n function getConcatFieldData(str) {\n\n //debugger;\n\n if (Intern_DictConcatInput === undefined || Intern_DictConcatInput === null) {\n Generate_DictConcatFieldInput();\n }\n return Intern_DictConcatInput[str];\n }\n\n // Function used to add the links to the various rows\n function AddOperations(i) {\n if (Setting_IncludeUpDown || Setting_IncludeEdit || Setting_IncludeDelete) {\n var str = '';\n str = str + '<td>';\n if (Setting_IncludeUpDown) {\n str = str + '<a class=\"clsLink\" id=\"' + Intern_InstanceName + 'lnkUpLine_' + i + '\" style=\"' + Intern_LinkStyle + '\">' + Disp_TextUp + '</a> | ';\n str = str + '<a class=\"clsLink\" id=\"' + Intern_InstanceName + 'lnkDownLine_' + i + '\" style=\"' + Intern_LinkStyle + '\">' + Disp_TextDown + '</a> | ';\n }\n if (Setting_IncludeEdit) {\n str = str + '<a class=\"clsLink\" id=\"' + Intern_InstanceName + 'lnkEditLine_' + i + '\" style=\"' + Intern_LinkStyle + '\">' + Disp_TextEdit + '</a> | ';\n }\n if (Setting_IncludeDelete) {\n str = str + '<a class=\"clsLink\" id=\"' + Intern_InstanceName + 'lnkDeleteLine_' + i + '\" style=\"' + Intern_LinkStyle + '\">' + Disp_TextDelete + '</a> | ';\n }\n str = str.substring(0, str.length - 3);\n str = str + '</td>';\n\n return str;\n }\n return \"\";\n }\n // Function used to add events to the various links for the various rows\n function AddEvents(i) {\n\n if (Setting_IncludeUpDown) {\n $('#'+ Intern_InstanceName + 'lnkUpLine_' + i).click(function () {\n var valI = parseInt(($(this).attr(\"id\")).replace(Intern_InstanceName + \"lnkUpLine_\", \"\"));\n if (Setting_AddToTop)\n OperationDown(valI);\n else\n OpertionUp(valI);\n Intern_DictConcatInput = null;\n });\n $('#' + Intern_InstanceName + 'lnkDownLine_' + i).click(function () {\n var valI = parseInt(($(this).attr(\"id\")).replace(Intern_InstanceName + \"lnkDownLine_\", \"\"));\n if (Setting_AddToTop)\n OpertionUp(valI);\n else\n OperationDown(valI);\n Intern_DictConcatInput = null;\n });\n }\n if (Setting_IncludeEdit) {\n $('#' + Intern_InstanceName + 'lnkEditLine_' + i).click(function () {\n var valI = parseInt(($(this).attr(\"id\")).replace(Intern_InstanceName + \"lnkEditLine_\", \"\"));\n var tempVal;\n $.each(Intern_InputFieldElems, function (index, value) {\n\n //debugger;\n\n if (Intern_InputFieldTypes[index] === \"checkbox\") {\n tempVal = Intern_ArrayOfValues[valI][Intern_InputFieldIds[index]];\n if (tempVal === \"0\")\n Intern_InputFieldElems[index].prop('checked', false);\n else\n Intern_InputFieldElems[index].prop('checked', true);\n }\n else if (Intern_InputFieldTypes[index] === \"radio\") {\n tempVal = Intern_ArrayOfValues[valI][Intern_InputFieldIds[index]];\n if (tempVal !== null)\n $('input:radio[value=' + tempVal + ']').prop('checked', true);\n }\n else {\n value.val(Intern_ArrayOfValues[valI][Intern_InputFieldIds[index]]);\n }\n });\n $('#' + Intern_AddButtonId).html(Disp_TextSave);\n Intern_LineEditedNum = valI;\n });\n }\n if (Setting_IncludeDelete) {\n $('#' + Intern_InstanceName + 'lnkDeleteLine_' + i).click(function () {\n var valI = parseInt(($(this).attr(\"id\")).replace(Intern_InstanceName + \"lnkDeleteLine_\", \"\"));\n Intern_ArrayOfValues.splice(valI, 1);\n $(\"#\" + Intern_TableDivName + \" tbody\").html(GenerateTableData());\n for (var i = 0; i < Intern_ArrayOfValues.length; i++)\n AddEvents(i);\n Intern_DictConcatInput = null;\n });\n }\n }\n // Function used to perform the upwards and downwards operations on the table\n function OpertionUp(valI) {\n if (valI > 0) {\n var tempObj = Intern_ArrayOfValues[valI];\n Intern_ArrayOfValues[valI] = Intern_ArrayOfValues[valI - 1];\n Intern_ArrayOfValues[valI - 1] = tempObj;\n\n $(\"#\" + Intern_TableDivName + \" tbody\").html(GenerateTableData());\n for (var i = 0; i < Intern_ArrayOfValues.length; i++)\n AddEvents(i);\n }\n }\n // Function used to perform the upwards and downwards operations on the table\n function OperationDown(valI) {\n if (valI < (Intern_ArrayOfValues.length - 1)) {\n var tempObj = Intern_ArrayOfValues[valI];\n Intern_ArrayOfValues[valI] = Intern_ArrayOfValues[valI + 1];\n Intern_ArrayOfValues[valI + 1] = tempObj;\n\n $(\"#\" + Intern_TableDivName + \" tbody\").html(GenerateTableData());\n for (var i = 0; i < Intern_ArrayOfValues.length; i++)\n AddEvents(i);\n }\n }\n\n // Function used to generate the various table lines or rows to be included in the table\n function GenerateTableLine(inputNum) {\n var ret = \"\";\n var tempVal;\n var data;\n $.each(Intern_InputFieldIds, function (index, value) {\n\n //debugger;\n\n if (Intern_InputFieldTypes[index] === \"checkbox\") {\n tempVal = Intern_InputFieldElems[index].prop(\"checked\");\n if (tempVal === false) {\n data = \"0\";\n }\n else {\n data = \"1\";\n }\n }\n else if (Intern_InputFieldTypes[index] === \"radio\") {\n tempVal = Intern_InputFieldElems[index].attr(\"name\");\n tempVal = $('input:radio[name=' + tempVal + ']:checked').val();\n if (tempVal !== undefined) {\n data = tempVal;\n }\n else {\n data = null;\n }\n }\n else if (Intern_InputFieldTypes[index] === \"color\") {\n tempVal = Intern_InputFieldElems[index].val();\n data = tempVal;\n }\n else if (Intern_InputFieldTypes[index] === \"select\") {\n tempVal = Intern_InputFieldElems[index].val();\n data = tempVal;\n }\n else {\n tempVal = Intern_InputFieldElems[index].val();\n data = tempVal;\n }\n Intern_ArrayOfValues[inputNum][value] = data;\n });\n\n var display;\n var i;\n $.each(Intern_TableFieldIDs, function (index, value) {\n\n i = Intern_InputFieldIds.indexOf(value);\n\n if (Intern_InputFieldTypes[i] === \"checkbox\") {\n tempVal = Intern_InputFieldElems[i].prop(\"checked\");\n if (tempVal === false) {\n display = \"<td>false</td>\";\n }\n else {\n display = \"<td>true</td>\";\n }\n }\n else if (Intern_InputFieldTypes[i] === \"radio\") {\n tempVal = Intern_InputFieldElems[i].attr(\"name\");\n tempVal = $('input:radio[name=' + tempVal + ']:checked').val();\n if (tempVal !== undefined) {\n display = \"<td>\" + tempVal + \"</td>\";\n }\n else {\n display = \"<td></td>\";\n }\n }\n else if (Intern_InputFieldTypes[i] === \"color\") {\n tempVal = Intern_InputFieldElems[i].val();\n display = '<td style=\"background-color:' + tempVal + '\"></td>';\n }\n else if (Intern_InputFieldTypes[i] === \"select\") {\n tempVal = Intern_InputFieldElems[i].val();\n display = '<td>' + $('#' + Intern_InputFieldIds[i] + ' option[value=' + tempVal + ']').text() + '</td>';\n }\n else {\n tempVal = Intern_InputFieldElems[i].val();\n display = '<td>' + tempVal + '</td>';\n }\n ret = ret + display;\n });\n ret = ret + AddOperations(inputNum);\n return ret;\n }\n // Function used to generate the various table lines or rows to be included in the table\n function GenerateTableData() {\n var ret = \"\";\n var tempRet = \"\";\n var display;\n var i;\n $.each(Intern_ArrayOfValues, function (index, value) {\n\n //debugger;\n\n tempRet = tempRet + '<tr id=\"' + Intern_InstanceName + 'tableRow_' + index + '\">';\n $.each(Intern_TableFieldIDs, function (index1, value1) {\n\n //debugger;\n\n i = Intern_InputFieldIds.indexOf(value1);\n if (Intern_InputFieldTypes === undefined || Intern_InputFieldTypes === null\n || Intern_InputFieldTypes[i] === undefined || Intern_InputFieldTypes[i] === null\n || Intern_InputFieldTypes[i] === \"\") {\n display = '<td>' + value[value1] + '</td>';\n }\n else if (Intern_InputFieldTypes[i] === \"checkbox\") {\n if (value[value1] === \"0\") {\n display = \"<td>false</td>\";\n }\n else {\n display = \"<td>true</td>\";\n }\n }\n else if (Intern_InputFieldTypes[i] === \"radio\") {\n if (value[value1] === null) {\n display = \"<td></td>\";\n }\n else {\n display = \"<td>\" + value[value1] + \"</td>\";\n }\n }\n else if (Intern_InputFieldTypes[i] === \"color\") {\n display = '<td style=\"background-color:' + value[value1] + '\"></td>';\n }\n else if (Intern_InputFieldTypes[i] === \"select\") {\n display = '<td>' + $('#' + Intern_InputFieldIds[i] + ' option[value=' + value[value1] + ']').text() + '</td>';\n }\n else {\n display = '<td>' + value[value1] + '</td>';\n }\n tempRet = tempRet + display;\n //i++;\n });\n tempRet = tempRet + AddOperations(index);\n tempRet = tempRet + '</tr>';\n\n if (Setting_AddToTop)\n ret = tempRet + ret;\n else\n ret = ret + tempRet;\n tempRet = \"\";\n //i = 0;\n });\n return ret;\n }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n function setEditableFieldIDs(arr) {\n Intern_EditableFieldIDs = Utilities_OrderArrayOfString(arr);\n }\n function setTableFieldDesc(obj) {\n Intern_TableFieldDesc = obj;\n }\n function setArrTableFieldDesc(arr) {\n Intern_ArrTableFieldDesc = arr;\n }\n\n function GenerateTableHeaders(template_ColumnHeader, replace, operationsAtFront) {\n operationsAtFront = (operationsAtFront === undefined || operationsAtFront === null || operationsAtFront === \"\" || operationsAtFront === false) ? false : true;\n\n var Intern_TableHtml = '';\n\n //debugger;\n\n //Intern_TableHtml = Intern_TableHtml + '<tr id=\"' + Intern_InstanceName + 'trHeaders\">';\n if (Intern_TableFieldDispNames === undefined || Intern_TableFieldDispNames === null)\n Intern_TableFieldDispNames = Intern_TableFieldIDs;\n if (template_ColumnHeader === undefined || template_ColumnHeader === null || template_ColumnHeader === \"\") {\n $.each(Intern_TableFieldDispNames, function (index, value) {\n Intern_TableHtml = Intern_TableHtml + '<th class=\"tableHeadCls\" id=\"' + Intern_TableFieldIDs[index] + '\">';\n Intern_TableHtml = Intern_TableHtml + value;\n Intern_TableHtml = Intern_TableHtml + '</th>';\n });\n }\n else {\n if (replace === undefined || replace === null || replace === false) {\n $.each(Intern_TableFieldDispNames, function (index, value) {\n Intern_TableHtml = Intern_TableHtml + template_ColumnHeader.replace(\"*%id%*\", Intern_TableFieldIDs[index]);\n //Intern_TableHtml = Intern_TableHtml + template_ColumnHeader.replace(/\\*%id%\\*/g, Intern_TableFieldIDs[index]);\n Intern_TableHtml = Intern_TableHtml + value;\n Intern_TableHtml = Intern_TableHtml + '</th>';\n });\n }\n else {\n $.each(Intern_TableFieldDispNames, function (index, value) {\n Intern_TableHtml = Intern_TableHtml + template_ColumnHeader.replace(/\\*%Text%\\*/g, value).replace(\"*%id%*\", Intern_TableFieldIDs[index]);\n //Intern_TableHtml = Intern_TableHtml + template_ColumnHeader.replace(/\\*%Text%\\*/g, value).replace(/\\*%id%\\*/g, Intern_TableFieldIDs[index]);\n });\n }\n }\n if (Setting_IncludeUpDown || Setting_IncludeEdit || Setting_IncludeDelete) {\n if (operationsAtFront) {\n Intern_TableHtml = '<th class=\"tableHeadCls\">' + Disp_OperationsTitle + '</th>' + Intern_TableHtml;\n Intern_TableHtml = '<tr id=\"' + Intern_InstanceName + 'trHeaders\">' + Intern_TableHtml;\n }\n else {\n Intern_TableHtml = '<tr id=\"' + Intern_InstanceName + 'trHeaders\">' + Intern_TableHtml;\n Intern_TableHtml = Intern_TableHtml + '<th class=\"tableHeadCls\">';\n Intern_TableHtml = Intern_TableHtml + Disp_OperationsTitle;\n Intern_TableHtml = Intern_TableHtml + '</th>';\n }\n }\n Intern_TableHtml = Intern_TableHtml + '</tr>';\n\n return Intern_TableHtml;\n }\n // Function used to generate the various table lines or rows to be included in the table\n function GenerateTableData_2(paramsObj) {\n var operationsAtFront = (paramsObj.operationsAtFront === undefined || paramsObj.operationsAtFront === null || paramsObj.operationsAtFront === \"\" || paramsObj.operationsAtFront === false) ? false : true;\n var startNumber = (paramsObj.startNumber === undefined || paramsObj.startNumber === null || paramsObj.startNumber === \"\") ? 0 : paramsObj.startNumber;\n var endNumber = (paramsObj.endNumber === undefined || paramsObj.endNumber === null || paramsObj.endNumber === \"\") ? Intern_ArrayOfValues.length : (paramsObj.endNumber > Intern_ArrayOfValues.length ? Intern_ArrayOfValues.length : paramsObj.endNumber);\n\n //debugger;\n\n var ret = \"\";\n var tempRet = \"\";\n var display;\n var i;\n\n var minVal, maxVal, maxLength;\n var includeEditText;\n var style;\n for (var i = startNumber; i < endNumber; i++){\n //$.each(Intern_ArrayOfValues, function (index, value) {\n $.each(Intern_TableFieldIDs, function (index1, value1) {\n\n //debugger;\n\n //*%* Note: Ludovick - ToDelete\n // BEGIN\n if (Intern_ArrTableFieldDesc[i] !== undefined && Intern_ArrTableFieldDesc[i] !== null) {\n if (Intern_ArrTableFieldDesc[i][value1] !== undefined && Intern_ArrTableFieldDesc[i][value1] !== null) {\n if (Intern_ArrTableFieldDesc[i][value1].Template !== undefined && Intern_ArrTableFieldDesc[i][value1].Template !== null) {\n display = Intern_ArrTableFieldDesc[i][value1].Template.replace(/\\*%dataColName%\\*/g, value1)\n .replace(/\\*%dataRowNum%\\*/g, i).replace(/\\*%dataValue%\\*/g, Intern_ArrayOfValues[i][value1]);\n }\n else if (Intern_ArrTableFieldDesc[i][value1].CellEditable !== undefined && Intern_ArrTableFieldDesc[i][value1].CellEditable !== null && Intern_ArrTableFieldDesc[i][value1].CellEditable === true) {\n if (Intern_ArrTableFieldDesc[i][value1].Type === \"number\") {\n minVal = (Intern_ArrTableFieldDesc[i][value1].minVal !== undefined && Intern_ArrTableFieldDesc[i][value1].minVal !== null && Intern_ArrTableFieldDesc[i][value1].minVal !== \"\") ? 'min=\"' + Intern_ArrTableFieldDesc[i][value1].minVal + '\"' : \"\";\n maxVal = (Intern_ArrTableFieldDesc[i][value1].maxVal !== undefined && Intern_ArrTableFieldDesc[i][value1].maxVal !== null && Intern_ArrTableFieldDesc[i][value1].maxVal !== \"\") ? 'max=\"' + Intern_ArrTableFieldDesc[i][value1].maxVal + '\"' : \"\";\n includeEditText = (Intern_ArrTableFieldDesc[i][value1].IncludeEditText !== undefined && Intern_ArrTableFieldDesc[i][value1].IncludeEditText !== null)\n ? ((Intern_ArrTableFieldDesc[i][value1].IncludeEditText !== \"\") ? '<a class=\"clsLink\" id=\"' + Intern_InstanceName + 'lnkEditCell_' + i + '\" >' + Intern_ArrTableFieldDesc[i][value1].IncludeEditText + '</a>' : '<span class=\"glyphicon glyphicon-edit\"></span>')\n : \"\";\n if (Setting_UseInputBoxForEditable)\n display = '<td dataColName=\"' + value1 + '\" dataRowNum=\"' + i + '\" dataType=\"number\" >'\n + '<input class=\"cellEditable\" dataColName=\"' + value1 + '\" dataRowNum=\"' + i + '\" type=\"number\" ' + minVal + ' ' + maxVal + ' value=\"' + Intern_ArrayOfValues[i][value1] + '\" />'\n //+ '<input class=\"cellEditable\" dataColName=\"' + value1 + '\" dataRowNum=\"' + i + '\" type=\"number\" ng-change=InputFieldChanged() ' + minVal + ' ' + maxVal + ' value=\"' + Intern_ArrayOfValues[i][value1] + '\" />'\n + includeEditText //'<span class=\"glyphicon glyphicon-edit\"></span>'\n + '</td>';\n else\n display = '<td contenteditable class=\"cellEditable\" dataColName=\"' + value1 + '\" dataRowNum=\"' + i + '\" dataType=\"number\" ' + minVal + ' ' + maxVal + '>' + Intern_ArrayOfValues[i][value1] + '</td>'; \n \n }\n else if (Intern_ArrTableFieldDesc[i][value1].Type === \"text\") {\n maxLength = (Intern_ArrTableFieldDesc[i][value1].maxLength !== undefined && Intern_ArrTableFieldDesc[i][value1].maxLength !== null && Intern_ArrTableFieldDesc[i][value1].maxLength !== \"\") ? 'maxlength=\"' + Intern_ArrTableFieldDesc[i][value1].maxLength + '\"' : \"\";\n includeEditText = (Intern_ArrTableFieldDesc[i][value1].IncludeEditText !== undefined && Intern_ArrTableFieldDesc[i][value1].IncludeEditText !== null)\n ? ((Intern_ArrTableFieldDesc[i][value1].IncludeEditText !== \"\") ? '<a class=\"clsLink\" id=\"' + Intern_InstanceName + 'lnkEditCell_' + i + '\" >' + Intern_ArrTableFieldDesc[i][value1].IncludeEditText + '</a>' : '<span class=\"glyphicon glyphicon-edit\"></span>')\n : \"\";\n if (Setting_UseInputBoxForEditable)\n display = '<td dataColName=\"' + value1 + '\" dataRowNum=\"' + i + '\" dataType=\"text\" >'\n + '<input class=\"cellEditable\" dataColName=\"' + value1 + '\" dataRowNum=\"' + i + '\" type=\"text\" ' + maxLength + ' value=\"' + Intern_ArrayOfValues[i][value1] + '\" />'\n //+ '<input class=\"cellEditable\" dataColName=\"' + value1 + '\" dataRowNum=\"' + i + '\" type=\"text\" ng-change=InputFieldChanged() ' + maxLength + ' value=\"' + Intern_ArrayOfValues[i][value1] + '\" />'\n + includeEditText //'<span class=\"glyphicon glyphicon-edit\"></span>'\n + '</td>';\n else\n display = '<td contenteditable class=\"cellEditable\" dataColName=\"' + value1 + '\" dataRowNum=\"' + i + '\" dataType=\"text\" ' + maxLength + '>' + Intern_ArrayOfValues[i][value1] + '</td>';\n \n //display = '<td contenteditable class=\"cellEditable\" dataColName=\"' + value1 + '\" dataRowNum=\"' + i + '\" dataType=\"text\" ' + maxLength + '>' + Intern_ArrayOfValues[i][value1] + '</td>';\n }\n else {\n display = '<td contenteditable class=\"cellEditable\" dataColName=\"' + value1 + '\" dataRowNum=\"' + i + '\">' + Intern_ArrayOfValues[i][value1] + '</td>';\n }\n }\n else {\n display = '<td dataColName=\"' + value1 + '\" dataRowNum=\"' + i + '\">' + Intern_ArrayOfValues[i][value1] + '</td>';\n }\n }\n else {\n display = '<td dataColName=\"' + value1 + '\" dataRowNum=\"' + i + '\">' + Intern_ArrayOfValues[i][value1] + '</td>';\n }\n }\n else if (Intern_TableFieldDesc[value1] !== undefined && Intern_TableFieldDesc[value1] !== null) {\n if (Intern_TableFieldDesc[value1].Template !== undefined && Intern_TableFieldDesc[value1].Template !== null) {\n display = Intern_TableFieldDesc[value1].Template.replace(/\\*%dataColName%\\*/g, value1)\n .replace(/\\*%dataRowNum%\\*/g, i).replace(/\\*%dataValue%\\*/g, Intern_ArrayOfValues[i][value1]);\n }\n else if(Intern_TableFieldDesc[value1].CellEditable !== undefined && Intern_TableFieldDesc[value1].CellEditable !== null && Intern_TableFieldDesc[value1].CellEditable === true) {\n if (Intern_TableFieldDesc[value1].Type === \"number\") {\n minVal = (Intern_TableFieldDesc[value1].minVal !== undefined && Intern_TableFieldDesc[value1].minVal !== null && Intern_TableFieldDesc[value1].minVal !== \"\") ? 'min=\"' + Intern_TableFieldDesc[value1].minVal + '\"' : \"\";\n maxVal = (Intern_TableFieldDesc[value1].maxVal !== undefined && Intern_TableFieldDesc[value1].maxVal !== null && Intern_TableFieldDesc[value1].maxVal !== \"\") ? 'max=\"' + Intern_TableFieldDesc[value1].maxVal + '\"' : \"\";\n includeEditText = (Intern_TableFieldDesc[value1].IncludeEditText !== undefined && Intern_TableFieldDesc[value1].IncludeEditText !== null)\n ? ((Intern_TableFieldDesc[value1].IncludeEditText !== \"\") ? '<a class=\"clsLink\" id=\"' + Intern_InstanceName + 'lnkEditCell_' + i + '\" >' + Intern_TableFieldDesc[value1].IncludeEditText + '</a>' : '<span class=\"glyphicon glyphicon-edit\"></span>')\n : \"\";\n if (Setting_UseInputBoxForEditable) {\n display = '<td dataColName=\"' + value1 + '\" dataRowNum=\"' + i + '\" dataType=\"number\" >'\n + '<input class=\"cellEditable\" dataColName=\"' + value1 + '\" dataRowNum=\"' + i + '\" type=\"number\" ' + minVal + ' ' + maxVal + ' value=\"' + Intern_ArrayOfValues[i][value1] + '\" />'\n //+ '<input class=\"cellEditable\" dataColName=\"' + value1 + '\" dataRowNum=\"' + i + '\" type=\"number\" ng-change=InputFieldChanged() ' + minVal + ' ' + maxVal + ' value=\"' + Intern_ArrayOfValues[i][value1] + '\" />'\n + includeEditText //'<span class=\"glyphicon glyphicon-edit\"></span>'\n + '</td>';\n\n //display = '<td contenteditable class=\"cellEditable\" dataColName=\"' + value1 + '\" dataRowNum=\"' + i + '\" dataType=\"number\" ' + minVal + ' ' + maxVal + '><input type=\"number\" value=\"' + Intern_ArrayOfValues[i][value1] + '\" /></td>';\n }\n else\n display = '<td contenteditable class=\"cellEditable\" dataColName=\"' + value1 + '\" dataRowNum=\"' + i + '\" dataType=\"number\" ' + minVal + ' ' + maxVal + '>' + Intern_ArrayOfValues[i][value1] + '</td>';\n \n }\n else if (Intern_TableFieldDesc[value1].Type === \"text\") {\n maxLength = (Intern_TableFieldDesc[value1].maxLength !== undefined && Intern_TableFieldDesc[value1].maxLength !== null && Intern_TableFieldDesc[value1].maxLength !== \"\") ? 'maxlength=\"' + Intern_TableFieldDesc[value1].maxLength + '\"' : \"\";\n includeEditText = (Intern_TableFieldDesc[value1].IncludeEditText !== undefined && Intern_TableFieldDesc[value1].IncludeEditText !== null)\n ? ((Intern_TableFieldDesc[value1].IncludeEditText !== \"\") ? '<a class=\"clsLink\" id=\"' + Intern_InstanceName + 'lnkEditCell_' + i + '\" >' + Intern_TableFieldDesc[value1].IncludeEditText + '</a>' : '<span class=\"glyphicon glyphicon-edit\"></span>')\n : \"\";\n if (Setting_UseInputBoxForEditable)\n display = '<td dataColName=\"' + value1 + '\" dataRowNum=\"' + i + '\" dataType=\"text\" >'\n + '<input class=\"cellEditable\" dataColName=\"' + value1 + '\" dataRowNum=\"' + i + '\" type=\"text\" ' + maxLength + ' value=\"' + Intern_ArrayOfValues[i][value1] + '\" />'\n //+ '<input class=\"cellEditable\" dataColName=\"' + value1 + '\" dataRowNum=\"' + i + '\" type=\"text\" ng-change=InputFieldChanged() ' + maxLength + ' value=\"' + Intern_ArrayOfValues[i][value1] + '\" />'\n + includeEditText //'<span class=\"glyphicon glyphicon-edit\"></span>'\n + '</td>';\n else\n display = '<td contenteditable class=\"cellEditable\" dataColName=\"' + value1 + '\" dataRowNum=\"' + i + '\" dataType=\"text\" ' + maxLength + '>' + Intern_ArrayOfValues[i][value1] + '</td>';\n\n //display = '<td contenteditable class=\"cellEditable\" dataColName=\"' + value1 + '\" dataRowNum=\"' + i + '\" dataType=\"text\" ' + maxLength + '>' + Intern_ArrayOfValues[i][value1] + '</td>';\n }\n else {\n display = '<td contenteditable class=\"cellEditable\" dataColName=\"' + value1 + '\" dataRowNum=\"' + i + '\">' + Intern_ArrayOfValues[i][value1] + '</td>';\n }\n }\n else {\n display = '<td dataColName=\"' + value1 + '\" dataRowNum=\"' + i + '\">' + Intern_ArrayOfValues[i][value1] + '</td>';\n }\n }\n else if (Utilities_StringInArrayBinarySearch(value1, Intern_EditableFieldIDs)) {\n if(Setting_UseNgBlur) \n display = '<td contenteditable ng-blur=\"TableFieldChanged($event)\" dataColName=\"' + value1 + '\" dataRowNum=\"' + i + '\">' + Intern_ArrayOfValues[i][value1] + '</td>';\n else\n display = '<td contenteditable class=\"cellEditable\" dataColName=\"' + value1 + '\" dataRowNum=\"' + i + '\">' + Intern_ArrayOfValues[i][value1] + '</td>';\n }\n else {\n display = '<td dataColName=\"' + value1 + '\" dataRowNum=\"' + i + '\">' + Intern_ArrayOfValues[i][value1] + '</td>';\n }\n // END\n\n\n\n //display = '<td>' + Intern_ArrayOfValues[i][value1] + '</td>';\n tempRet = tempRet + display;\n });\n\n //debugger;\n\n style = \"\";\n if (Intern_ArrayOfValues[i] !== undefined && Intern_ArrayOfValues[i] !== null && Intern_ArrayOfValues[i] !== '')\n style = (Intern_ArrayOfValues[i].style === undefined || Intern_ArrayOfValues[i].style === null || Intern_ArrayOfValues[i].style === '') ? '' : 'style=\"' + Intern_ArrayOfValues[i].style + '\"';\n if (Intern_ArrayOfValues[i].paramRowMetaData_AddOperations === undefined || Intern_ArrayOfValues[i].paramRowMetaData_AddOperations === null \n || Intern_ArrayOfValues[i].paramRowMetaData_AddOperations === \"\" || Intern_ArrayOfValues[i].paramRowMetaData_AddOperations === true) {\n if (operationsAtFront) {\n tempRet = '<tr id=\"' + Intern_InstanceName + 'tableRow_' + i + '\" ' + style + ' >' + AddOperations(i) + tempRet;\n }\n else {\n tempRet = '<tr id=\"' + Intern_InstanceName + 'tableRow_' + i + '\" ' + style + ' >' + tempRet + AddOperations(i);\n }\n tempRet = tempRet + '</tr>';\n }\n else {\n if (AddOperations(i) === \"\")\n tempRet = '<tr id=\"' + Intern_InstanceName + 'tableRow_' + i + '\" ' + style + ' >' + tempRet + '</tr>';\n else\n tempRet = '<tr id=\"' + Intern_InstanceName + 'tableRow_' + i + '\" ' + style + ' >' + tempRet + '<td></td></tr>';\n }\n\n if (Setting_AddToTop)\n ret = tempRet + ret;\n else\n ret = ret + tempRet;\n tempRet = \"\";\n }\n\n /*\n $.each(Intern_ArrayOfValues, function (index, value) {\n $.each(Intern_TableFieldIDs, function (index1, value1) {\n display = '<td>' + value[value1] + '</td>';\n tempRet = tempRet + display;\n });\n if (operationsAtFront) {\n tempRet = '<tr id=\"' + Intern_InstanceName + 'tableRow_' + index + '\">' + AddOperations(index) + tempRet;\n }\n else {\n tempRet = '<tr id=\"' + Intern_InstanceName + 'tableRow_' + index + '\">' + tempRet + AddOperations(index);\n }\n tempRet = tempRet + '</tr>';\n\n if (Setting_AddToTop)\n ret = tempRet + ret;\n else\n ret = ret + tempRet;\n tempRet = \"\";\n });\n */\n return ret;\n }\n // Function used to order the data\n function OrderData(orderBy, ascending) {\n\n Utilities__OrderObjectData(Intern_ArrayOfValues, orderBy, ascending);\n\n /*\n orderBy = (orderBy === undefined || orderBy === null || orderBy === \"\") ? Intern_TableFieldIDs[0] : orderBy;\n ascending = (ascending === undefined || ascending === null || ascending === \"\" || ascending === true) ? true : false;\n //ascending = (ascending === undefined || ascending === null || ascending === \"\" || ascending === false) ? false : true;\n\n //debugger;\n\n var valueIndex;\n var tempVal;\n for (var i = 0; i < Intern_ArrayOfValues.length; i++) {\n valueIndex = i;\n for (var j = i + 1; j < Intern_ArrayOfValues.length; j++) {\n if (ascending) {\n if (Intern_ArrayOfValues[valueIndex][orderBy] > Intern_ArrayOfValues[j][orderBy]) {\n //console.log(\"Intern_ArrayOfValues[valueIndex][orderBy]: \" + Intern_ArrayOfValues[valueIndex][orderBy] + \" - \" + \"Intern_ArrayOfValues[j][orderBy]: \" + Intern_ArrayOfValues[valueIndex][orderBy]);\n valueIndex = j;\n }\n }\n else {\n if (Intern_ArrayOfValues[valueIndex][orderBy] < Intern_ArrayOfValues[j][orderBy]) {\n //console.log(\"Intern_ArrayOfValues[valueIndex][orderBy]: \" + Intern_ArrayOfValues[valueIndex][orderBy] + \" - \" + \"Intern_ArrayOfValues[j][orderBy]: \" + Intern_ArrayOfValues[valueIndex][orderBy]);\n valueIndex = j;\n }\n }\n }\n\n //debugger;\n\n tempVal = Intern_ArrayOfValues[i];\n Intern_ArrayOfValues[i] = Intern_ArrayOfValues[valueIndex];\n Intern_ArrayOfValues[valueIndex] = tempVal;\n }\n\n //debugger;\n */\n\n }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n // Function used to clear all of the input field in the form\n function ClearAllInputs() {\n $.each(Intern_InputFieldElems, function (index, value) {\n if (Intern_InputFieldTypes[index] === \"checkbox\") {\n Intern_InputFieldElems[index].prop('checked', false);\n }\n else if (Intern_InputFieldTypes[index] === \"radio\") {\n var rbName = Intern_InputFieldElems[index].attr(\"name\");\n $('input[name=\"' + rbName + '\"]').prop('checked', false);\n }\n else {\n value.val(\"\");\n }\n });\n }\n\n // Function used to add values to the table and to the array of values\n function AddDataFunct(funct) {\n var Intern_TableHtml = '';\n if (funct !== undefined && funct !== null && funct !== \"\") {\n // This else statement or route is for when the data needs to be added to the table with some extra ordering or processing.\n funct();\n }\n else if (Intern_ArrayOfValues.length === 0) {\n Intern_TableHtml = Intern_TableHtml + '<table class=\"tableCls\">';\n Intern_TableHtml = Intern_TableHtml + '<thead>';\n Intern_TableHtml = Intern_TableHtml + '<tr id=\"' + Intern_InstanceName + 'trHeaders\">';\n if (Intern_TableFieldDispNames === undefined || Intern_TableFieldDispNames === null)\n Intern_TableFieldDispNames = Intern_TableFieldIDs;\n $.each(Intern_TableFieldDispNames, function (index, value) {\n Intern_TableHtml = Intern_TableHtml + '<th class=\"tableHeadCls\">';\n Intern_TableHtml = Intern_TableHtml + value;\n Intern_TableHtml = Intern_TableHtml + '</th>';\n });\n if (Setting_IncludeUpDown || Setting_IncludeEdit || Setting_IncludeDelete) {\n Intern_TableHtml = Intern_TableHtml + '<th class=\"tableHeadCls\">';\n Intern_TableHtml = Intern_TableHtml + Disp_OperationsTitle;\n Intern_TableHtml = Intern_TableHtml + '</th>';\n }\n Intern_TableHtml = Intern_TableHtml + '</tr>';\n Intern_TableHtml = Intern_TableHtml + '</thead>';\n\n Intern_ArrayOfValues[Intern_ArrayOfValues.length] = {};\n Intern_TableHtml = Intern_TableHtml + '<tbody>';\n Intern_TableHtml = Intern_TableHtml + '<tr id=\"' + Intern_InstanceName + 'tableRow_0\">';\n Intern_TableHtml = Intern_TableHtml + GenerateTableLine(0);\n Intern_TableHtml = Intern_TableHtml + '</tr>';\n Intern_TableHtml = Intern_TableHtml + '</tbody>';\n Intern_TableHtml = Intern_TableHtml + '</table>';\n\n Intern_TableDivElem.html(Intern_TableHtml);\n AddEvents(0);\n }\n else {\n // This else statement or route is for when the data needs to be added to the table without any extra ordering.\n Intern_ArrayOfValues[Intern_ArrayOfValues.length] = {};\n Intern_TableHtml = Intern_TableHtml + '<tr id=\"' + Intern_InstanceName + 'tableRow_' + (Intern_ArrayOfValues.length - 1) + '\">';\n Intern_TableHtml = Intern_TableHtml + GenerateTableLine(Intern_ArrayOfValues.length - 1);\n Intern_TableHtml = Intern_TableHtml + '</tr>';\n\n if (Setting_AddToTop)\n $(\"#\" + Intern_TableDivName + \" tbody\").prepend(Intern_TableHtml);\n else\n $(\"#\" + Intern_TableDivName + \" tbody\").append(Intern_TableHtml);\n AddEvents(Intern_ArrayOfValues.length - 1);\n }\n\n ClearAllInputs();\n if (Intern_InputFieldElems.length !== 0)\n Intern_InputFieldElems[0].focus();\n }\n // Function used to edit a field in the table of values\n function EditDataFunct() {\n\n //debugger;\n\n $(\"#tableRow_\" + Intern_LineEditedNum).html(GenerateTableLine(Intern_LineEditedNum));\n AddEvents(Intern_LineEditedNum);\n Intern_LineEditedNum = null;\n ClearAllInputs();\n $('#' + Intern_AddButtonId).html(Disp_TextAdd);\n Intern_InputFieldElems[0].focus();\n }\n\n // Function used to highlight a row in the table of values\n function HighLightRow(index, funct) {\n $(\"#tableRow_\" + index).addClass(\"highLightRow\");\n if (funct !== undefined && funct !== null && funct !== \"\")\n funct();\n }\n // Function used to unhighlight a row in the table of values\n function UnHighLightRow(index) {\n $(\"#tableRow_\" + index).removeClass(\"highLightRow\");\n }\n\n // Below is the linking of various functions to the class object\n this.setInstanceName = setInstanceName;\n this.setInputFieldIds = setInputFieldIds;\n this.setTableFieldIDs = setTableFieldIDs;\n this.setTableFieldDispNames = setTableFieldDispNames;\n this.setAddButtonId = setAddButtonId;\n this.setTableDivName = setTableDivName;\n this.setSettings = setSettings;\n this.setDispText = setDispText;\n this.setDispStyle = setDispStyle;\n this.setDelimiter = setDelimiter;\n this.setArrayOfValues = setArrayOfValues;\n\n this.setArrayOfValuesFNames_Ver1_2 = setArrayOfValuesFNames_Ver1_2;\n this.setArrayOfValuesFNames = setArrayOfValuesFNames;\n this.setEditableFieldIDs = setEditableFieldIDs;\n this.setTableFieldDesc = setTableFieldDesc;\n this.setArrTableFieldDesc = setArrTableFieldDesc;\n\n this.setValidationFunct = setValidationFunct;\n\n this.getConcatFieldData = getConcatFieldData;\n this.getArrayOfValues = getArrayOfValues;\n\n this.HighLightRow = HighLightRow;\n this.UnHighLightRow = UnHighLightRow;\n this.GenerateFullTable = GenerateFullTable;\n this.GenerateTableHeaders = GenerateTableHeaders;\n this.GenerateTableData = GenerateTableData;\n this.GenerateTableData_2 = GenerateTableData_2;\n\n this.OrderData = OrderData;\n\n this.Initialize = Initialize;\n\n\n //\n // Call the constructor function\n //\n //The Constructor Method or Function\n function Initialize() {\n\n }\n Initialize();\n}", "function reset() {\n input = [0];\n return display(0);\n}" ]
[ "0.66464937", "0.5747155", "0.55513084", "0.5484419", "0.5442783", "0.54144645", "0.538421", "0.5348664", "0.53399223", "0.53295785", "0.5257918", "0.52497333", "0.5238922", "0.51434535", "0.5138845", "0.5135278", "0.5120294", "0.51098764", "0.5088115", "0.5075356", "0.5075147", "0.5070566", "0.5064611", "0.5064611", "0.505406", "0.50426465", "0.5028778", "0.501306", "0.50078505", "0.49821743", "0.4964809", "0.49598497", "0.49347284", "0.49340752", "0.49305317", "0.49168637", "0.49086803", "0.4906797", "0.4904793", "0.48970264", "0.48935232", "0.4893384", "0.48868316", "0.4883067", "0.48702964", "0.48589742", "0.4848649", "0.4839476", "0.48390314", "0.48368084", "0.4835598", "0.4816476", "0.48130277", "0.48121792", "0.48121792", "0.4811018", "0.48096693", "0.4808639", "0.48034635", "0.48034248", "0.48023787", "0.47982886", "0.479306", "0.47924048", "0.4789582", "0.4781663", "0.4781472", "0.47772926", "0.47706404", "0.47691828", "0.47675657", "0.47480786", "0.474651", "0.47447905", "0.47431335", "0.4741293", "0.47322822", "0.47296733", "0.47206393", "0.47168398", "0.47168398", "0.4714822", "0.4712554", "0.47098184", "0.47093642", "0.47066677", "0.47047076", "0.47037408", "0.47024283", "0.4700057", "0.46965235", "0.4693185", "0.4693097", "0.4690376", "0.46889067", "0.4687671", "0.4687132", "0.4686045", "0.46758503", "0.46753564" ]
0.47337204
76
================================================================================= ================================================================================== Sets the damage text which is the second table of the data view are. ==================================================================================
function setDamage(txtDamage) { $("#LB_Damage").text( damage1 + " " + dist +" km "+ damage2); var impTbl = document.getElementById("DamageInfo"); $('#DamageInfo').html(txtDamage); //impTbl.innerHTML = txtDamage; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setDeniseText() {\n var textToApplyDenise = \"\";\n if (houseUpgrades.upgrades[1].owned == 0) { textToApplyDenise = \"We Need a BED to sleep in\"; }\n else if (houseUpgrades.upgrades[2].owned == 0) { textToApplyDenise = \"I wish I had a CHEST to put stuff.\"; }\n else if (houseUpgrades.upgrades[3].owned == 0) { textToApplyDenise = \"We need a SINK to cook and clean - please buy one\"; }\n else if (houseUpgrades.upgrades[4].owned == 0) { textToApplyDenise = \"Are we Animals? We need a TABLE to eat on.\"; }\n else if (houseUpgrades.upgrades[5].owned == 0) { textToApplyDenise = \"You are gonna buy some CHAIRS right?\"; }\n else if (houseUpgrades.upgrades[6].owned == 0) { textToApplyDenise = \"All the ladies in town have a DRESSING TABLE, but I do not....\"; }\n else if (houseUpgrades.upgrades[7].owned == 0) { textToApplyDenise = \"A BEDSIDE TABLE would be very nice to have\"; }\n else if (houseUpgrades.upgrades[8].owned == 0) { textToApplyDenise = \"We need more decor. A POTTED PLANT would be nice\"; }\n else if (houseUpgrades.upgrades[9].owned == 0) { textToApplyDenise = \"A COUCH to sit on would be nice to have over there\"; }\n else if (houseUpgrades.upgrades[10].owned == 0) {\n if (houseUpgrades.upgrades[0].owned == 1) { textToApplyDenise = \"We need some CURTAINS for this new space\"; }\n else { textToApplyDenise = \"We need more room; a little one is on the way\"; }\n }\n else if (houseUpgrades.upgrades[11].owned == 0) {\n if (houseUpgrades.upgrades[0].owned == 1) { textToApplyDenise = \"We need a DOUBLE BED to fill this space\"; }\n else { textToApplyDenise = \"We need more room; a little one is on the way\"; }\n }\n else if (houseUpgrades.upgrades[12].owned == 0) {\n if (houseUpgrades.upgrades[0].owned == 1) { textToApplyDenise = \"I wish I had STOOL to sit on back there\"; }\n else { textToApplyDenise = \"We need more room; a little one is on the way\"; }\n }\n else if (houseUpgrades.upgrades[13].owned == 0) {\n if (houseUpgrades.upgrades[0].owned == 1) { textToApplyDenise = \"I wish I had WARDROBE to hang my dresses\"; }\n else { textToApplyDenise = \"We need more room; a little one is on the way\"; }\n }\n else if (houseUpgrades.upgrades[14].owned == 0) {\n if (houseUpgrades.upgrades[0].owned == 1) { textToApplyDenise = \"I sure do like that FANCY COUCH. Won't you buy it for me?\"; }\n else { textToApplyDenise = \"We need more room; a little one is on the way\"; }\n }\n else if (houseUpgrades.upgrades[15].owned == 0) {\n if (houseUpgrades.upgrades[0].owned == 1) { textToApplyDenise = \"Don't you think BOOKSHELVES would look good here?\"; }\n else { textToApplyDenise = \"We need more room; a little one is on the way\"; }\n }\n else if (houseUpgrades.upgrades[16].owned == 0) {\n if (houseUpgrades.upgrades[0].owned == 1) { textToApplyDenise = \"That FANCY TABLE is so elegant. I wish we could have it\"; }\n else { textToApplyDenise = \"We need more room; a little one is on the way\"; }\n }\n else if (houseUpgrades.upgrades[17].owned == 0) {\n if (houseUpgrades.upgrades[0].owned == 1) { textToApplyDenise = \"Now we need some FANCY CHAIRS to complete our set\"; }\n else { textToApplyDenise = \"We need more room; a little one is on the way\"; }\n }\n else if (houseUpgrades.upgrades[18].owned == 0) {\n if (houseUpgrades.upgrades[0].owned == 1) { textToApplyDenise = \"Don't you need a DESK to keep the farm in order?\"; }\n else { textToApplyDenise = \"We need more room; a little one is on the way\"; }\n }\n else if (houseUpgrades.upgrades[19].owned == 0) {\n if (houseUpgrades.upgrades[0].owned == 1) { textToApplyDenise = \"That PAINTING would look good over the mantle\"; }\n else { textToApplyDenise = \"We need more room; a little one is on the way\"; }\n }\n else if (houseUpgrades.upgrades[20].owned == 0) {\n if (houseUpgrades.upgrades[0].owned == 1) { textToApplyDenise = \"I need a DISH CABINET to keep our dishes\"; }\n else { textToApplyDenise = \"We need more room; a little one is on the way\"; }\n }\n else if (houseUpgrades.upgrades[21].owned == 0) {\n if (houseUpgrades.upgrades[0].owned == 1) { textToApplyDenise = \"We need a TRUNK to store Patricia's toys\"; }\n else { textToApplyDenise = \"We need more room; a little one is on the way\"; }\n }\n else if (houseUpgrades.upgrades[22].owned == 0) {\n if (houseUpgrades.upgrades[0].owned == 1) { textToApplyDenise = \"A different color of walls would be a nice\"; }\n else { textToApplyDenise = \"We need more room; a little one is on the way\"; }\n }\n else { textToApplyDenise = \"I am happy and don't need anything....for the moment\"; }\n //apply the deireved text\n questText1House.setText(textToApplyDenise);\n }", "function showDeformationText(car) {\n fill(rgb(200, 0, 150));\n textSize(30);\n text(\"Damage: \" + Math.round(car.deformation), 950, car.y + 10);\n if (car.deformation === NaN) {\n car.deformation = 0;\n }\n}", "set damage(damage){this._damage = Utils.protectionError(\"Hero\", \"damage\");}", "function resourse(){\r\n\tvar tds = document.getElementsByTagName('td');\r\n\ttds[12].getElementsByTagName('font')[0].innerHTML = Metal;\r\n\ttds[13].getElementsByTagName('font')[0].innerHTML = Crystal;\r\n\ttds[14].getElementsByTagName('font')[0].innerHTML = Deuterium;\r\n\ttds[15].getElementsByTagName('font')[0].innerHTML = Energy;\r\n}", "function setImpactorText(impactorText)\n\t {\n\t\tvar impTbl = document.getElementById(\"ImpactorInfo\");\n\t\t$('#ImpactorInfo').html(impactorText);\n\t\t//impTbl.innerHTML = impactorText;\n\t }", "function fightDescription(loser, attacker){\n if (loser.colIdWarrior === attacker.colIdWarrior - 1 && (attacker.colIdWarrior - 1)\n % columNum !== 0 || loser.colIdWarrior === attacker.colIdWarrior + 1 && attacker.colIdWarrior\n % columNum !== 0 || loser.colIdWarrior === attacker.colIdWarrior - columNum ||\n loser.colIdWarrior === attacker.colIdWarrior + columNum && !attacker.guard) {\n\n swal(`Player ${attacker.name} attack ${loser.name}`);\n attacker.warriorAttack(loser, attacker.weapon);\n\n loser.guard = swal( {\n title:`Player ${loser.name}`,\n text:` Attack or Defend your self?`,\n buttons: [\"Attack\", \"Defend\"],\n\n });\n endOfFight(loser);\n\n\n }\n }", "function changeTwoSidedNoData() {\r\n \r\n // change the title\r\n setTitleTwoSided(\"Data is not available for refugees from \" + currentConflictCountryName + \" in \" + countryTwoSided);\r\n\r\n // remove the bars\r\n removeBarsTwoSided(\"rect.left\", dataMale);\r\n removeBarsTwoSided(\"rect.right\", dataFemale);\r\n\r\n // remove all the text\r\n removeAllTextTwoSided();\r\n}", "function updateDrawingTextOfAPeer(oldTextObj, newTextObj) {\n oldTextObj.setText(newTextObj.text);\n}", "function showNewText(text) {\n firstText.innerHTML = `${text}`;\n gsap.to(\".m402-text-relative\", {\n duration: 0.3,\n opacity: 1\n });\n}", "function showNewText(text) {\n firstText.innerHTML = `${text}`;\n gsap.to(\".m402-text-relative\", {\n duration: 0.3,\n opacity: 1\n });\n}", "function SetDamageType(weapon = OPC.mainHand) {\n\tdamageTypeText = \"bludgeoning\"; // for all non-weapon class items (improvised weapons)\n\tif(weapon[0] == \"w\") { // is a weapon class item\n\t\tdamageTypeText = weapon[3];\n\t}\n\treturn damageTypeText;\n}", "function SetTopText(newText:String) {\t\n\tvar topText : GameObject = GameObject.Find(\"TopText\");\n\ttopText.guiText.text = newText;\n\ttopText.guiText.fontSize = Mathf.Round(Screen.width / 29.95);\n}", "function changeTable2() {\n \n }", "function alterText2(){\ndocument.getElementById(\"college2\").style.fontSize = \"4em\";\ndocument.getElementById(\"college2\").style.fontStyle= \"Underline\";\ndocument.getElementById(\"college2\").style.backgroundColor = \"blue\";\ndocument.getElementById(\"college2\").style.fontWeight = \"Thin\";\n}", "SetDamage(num) {\n if (num == 1) { return \"3d6\"; }\n if (num == 2) { return \"3d6+2\"; }\n if (num == 3) { return \"3d8\"; }\n if (num == 4) { return \"3d8+2\"; }\n if (num == 5) { return \"3d10\"; }\n }", "function printFightInfo() {\n $(\"#\" + fighterObj.idCounter).css(\"display\", \"none\");\n $(\"#\" + fighterObj.idAttack).text(fighterObj.name + \"'s\" + \" attack is \" + fighterObj.attackNew);\n $(\".fighter-damage\").text(fighterObj.name + \" damaged \" + enemyObj.name + \" for \" + fighterObj.attackNew + \" points!\");\n\n\n $(\"#\" + enemyObj.idAttack).css(\"display\", \"none\");\n $(\"#\" + enemyObj.idAttack).text(enemyObj.name + \"'s\" + \" counter attack is \" + enemyObj.counterAttack);\n $(\".enemy-damage\").text(enemyObj.name + \" damaged \" + fighterObj.name + \" for \" + enemyObj.counterAttack + \" points!\");\n $(\".attack-info-all\").css(\"border\", \"1px black solid\");\n\n }", "function secondText() {\n firstText.style.transition = \"opacity 1.5s linear 0s\"\n let opacity = firstText.style.opacity = \"0\";\n setTimeout(replacingText, 1500)\n}", "function changeText() {\n \n }", "_text(d) {\n if (d.indexData !== -1)\n return this._adjustLengthText(this.model.data.children.data[this._vOrder[d.indexData]].labels[1], 20);\n else\n return \"\";\n }", "function setAllHorseText(textVal){\n $scope.horses.forEach(function(horse) {\n horse.horseText = textVal\n })\n }", "function fallText() {\n text(\"whoopsie-Daisy\", 10, 590);\n}", "function UpdateText(formName, text, textName)\r\n{\r\n sql = \"UPDATE `Control` SET `Control`.`Text` = '\" + text + \"' \" +\r\n \"WHERE `Control`.`Dialog_`='\" + formName + \"' AND `Control`.`Control`='\" + textName + \"'\"\r\n view = database.OpenView(sql);\r\n view.Execute();\r\n view.Close();\r\n}", "function materialPageText(){\r\n console.count('materialPageText');\r\n\t\tif($(\"#usermsg1\").length == 0){\r\n\t\t\t $('#attribute-showDetailedView .ui-flipswitch').css('margin-right','10px').after('<span id=\"usermsg1\" style=\"color:darkred\">Please select \"Yes\" to see detailed view. Swipe the screen to see additional details.</span>');\r\n\t\t}\r\n \tif($(\"#usermsg2\").length == 0){\r\n\t\t\t$('#resultsTable_filter').after('<div id=\"usermsg2\" style=\"color:darkred;float:left;width:100%;margin-top:-10px;margin-bottom:10px;\">Please scroll down to see the selected material</div>');\r\n\t\t}\r\n }", "function updateDefenseInfo() {\n if($(\".defender\").attr('id') === \"red\"){\n $(\"#defense-text\").text(redCharacter.Name+ \" defended for \" + defendAmount);\n }\n else if($(\".defender\").attr('id') === \"blue\"){\n $(\"#defense-text\").text(blueCharacter.Name+ \" defended for \" + defendAmount);\n }\n else if($(\".defender\").attr('id') === \"green\"){\n $(\"#defense-text\").text(greenCharacter.Name+ \" defended for \" + defendAmount);\n }\n else if($(\".defender\").attr('id') === \"yellow\"){\n $(\"#defense-text\").text(yellowCharacter.Name+ \" defended for \" + defendAmount);\n }\n }", "function onClickFireSecondary() {\r\n\r\n vaultDweller.currentAttackMode = \"grenade\";\r\n\toutput = \"<p> Grenade ready! <span class=\\\"update\\\">Click the target you want to blow to smithereens!</span></p>\";\r\n\t\r\n\tLogInfo(output);\r\n}", "function explanationText(varText, delay, delayStep) {\n\td3.select(\"#explanation\")\n\t\t.transition().duration(1000).delay(delay*delayStep)\n\t\t.style(\"opacity\",0)\n\t\t.call(endall, function() {\n\t\t\t\td3.select(\"#explanation\")\n\t\t\t\t\t.html(varText);\t\n\t\t})\n\t\t.transition().duration(1000)\n\t\t.style(\"opacity\",1);\t\n}", "function renderDualType(dualAttacks, dualDefense) {\n resetHtml();\n //document.getElementById(\"effect-break\").innerHTML += \"<br>\";\n \n quadAttack = findEffect(dualAttacks, \"4\");\n supers = findEffect(dualAttacks, \"2\");\n half = findEffect(dualAttacks, \"0.5\");\n \n noEffect = findEffect(dualAttacks, \"0\");\n\n quadWeak = findEffect(dualDefense, \"4\");\n weak = findEffect(dualDefense, \"2\");\n resist = findEffect(dualDefense, \"0.5\");\n quadResist = findEffect(dualDefense, \"0.25\");\n immune = findEffect(dualDefense, \"0\");\n\n\n console.log(supers)\n \n // if(dualAttacks[j] == \"4\") {\n\n if(quadAttack.length > 0) {\n document.getElementById(\"super-content-container\").innerHTML += '<h5 style=\"color: rgb(204, 255, 204);\">Super Effective</h5>';\n for(var i in quadAttack) {\n document.getElementById(\"super-content-container\").innerHTML+=\n '<div id=\"' + quadAttack[i] + '-text\">' + '<font color=\"#ccffcc\">4x </font>' + quadAttack[i] + '</div><br>';\n }\n }\n else if(supers.length <= 0) {\n document.getElementById(\"half-content-container\").style.width = \"100%\";\n document.getElementById(\"super-content-container\").style.width = \"0%\";\n }\n if(supers.length > 0 && quadAttack <= 0) {\n document.getElementById(\"super-content-container\").innerHTML += '<h5 style=\"color: rgb(204, 255, 204);\">Super Effective</h5>';\n for(var i in supers) {\n document.getElementById(\"super-content-container\").innerHTML+=\n '<div id=\"' + supers[i] + '-text\">' + supers[i] + '</div><br>';\n }\n }\n else if(supers.length > 0 && quadAttack.length > 0) {\n for(var i in supers) {\n document.getElementById(\"super-content-container\").innerHTML+=\n '<div id=\"' + supers[i] + '-text\">' + supers[i] + '</div><br>';\n }\n }\n\n if(quadWeak.length > 0) {\n document.getElementById(\"half-content-container\").innerHTML += '<h5 style=\"color: rgb(255, 204, 204);\">Half Effective</h5>';\n for(var i in quadWeak) {\n document.getElementById(\"half-content-container\").innerHTML+=\n '<div id=\"' + quadWeak[i] + '-text\">'+ '<font color=\"#ffcccc\">1/4x </font>' + quadWeak[i] + '</div><br>';\n }\n }\n else if(half.length <= 0) {\n document.getElementById(\"half-content-container\").style.width = \"0%\";\n document.getElementById(\"super-content-container\").style.width = \"100%\";\n } \n if(half.length > 0 && quadWeak.length <= 0) {\n document.getElementById(\"half-content-container\").innerHTML += '<h5 style=\"color: rgb(255, 204, 204);\">Half Effective</h5>';\n for(var i in half) {\n document.getElementById(\"half-content-container\").innerHTML+=\n '<div id=\"' + half[i] + '-text\">' + half[i] + '</div><br>';\n }\n } else if(half.length > 0 && quadWeak.length > 0) {\n for(var i in half) {\n document.getElementById(\"half-content-container\").innerHTML+=\n '<div id=\"' + half[i] + '-text\">' + half[i] + '</div><br>';\n }\n }\n equalHeightsUpperContent();\n \n\n if(quadResist.length > 0) {\n document.getElementById(\"resist-content-container\").innerHTML += '<h5 style=\"color: rgb(204, 255, 204);\">Resists</h5>';\n for(var i in quadResist) {\n document.getElementById(\"resist-content-container\").innerHTML+=\n '<div id=\"' + quadResist[i] + '-text\">' + '<font color=\"#ccffcc\">1/4x </font>' + quadResist[i] + '</div><br>';\n }\n }\n else if(resist.length <= 0){\n document.getElementById(\"resist-content-container\").style.width = \"0%\";\n document.getElementById(\"weak-content-container\").style.width = \"100%\";\n }\n if(resist.length > 0 && quadResist.length <= 0) {\n document.getElementById(\"resist-content-container\").innerHTML += '<h5 style=\"color: rgb(204, 255, 204);\">Resists</h5>';\n for(var i in resist) {\n document.getElementById(\"resist-content-container\").innerHTML+=\n '<div id=\"' + resist[i] + '-text\">' + resist[i] + '</div><br>';\n }\n }\n else if(resist.length > 0 && quadResist.length > 0) {\n for(var i in resist) {\n document.getElementById(\"resist-content-container\").innerHTML+=\n '<div id=\"' + resist[i] + '-text\">' + resist[i] + '</div><br>';\n }\n } \n\n if(quadWeak.length > 0) {\n document.getElementById(\"weak-content-container\").innerHTML += '<h5 style=\"color: rgb(255, 204, 204);\">Weak Against</h5>';\n for(var i in quadWeak) {\n document.getElementById(\"weak-content-container\").innerHTML+=\n '<div id=\"' + quadWeak[i] + '-text\">' + '<font color=\"#ffcccc\">' + '4x ' + '</font>'+ quadWeak[i] + '</div><br>';\n }\n }\n else if (weak <= 0) {\n document.getElementById(\"resist-content-container\").style.width = \"100%\";\n document.getElementById(\"weak-content-container\").style.width = \"0%\";\n }\n if(weak.length > 0 && quadWeak.length <= 0) {\n document.getElementById(\"weak-content-container\").innerHTML += '<h5 style=\"color: rgb(255, 204, 204);\">Weak Against</h5>';\n for(var i in weak) {\n document.getElementById(\"weak-content-container\").innerHTML+=\n '<div id=\"' + weak[i] + '-text\">' + weak[i] + '</div><br>';\n }\n } \n else if(weak.length > 0) {\n for(var i in weak) {\n document.getElementById(\"weak-content-container\").innerHTML+=\n '<div id=\"' + weak[i] + '-text\">' + weak[i] + '</div><br>';\n }\n }\n adjustHeightMidContent();\n\n if(noEffect.length == 0 && immune.length ==0) {\n document.getElementById(\"no-effect-content-container\").style.height = \"0\";\n document.getElementById(\"immune-content-container\").style.height = \"0\";\n document.getElementById(\"no-effect-content-container\").style.width = \"0\";\n document.getElementById(\"immune-content-container\").style.width = \"0\";\n } \n else {\n if(noEffect.length > 0) {\n document.getElementById(\"no-effect-content-container\").innerHTML += '<h5 style=\"color: rgb(255, 204, 204);\">No Effect Against</h5>';\n for(var i in noEffect) {\n document.getElementById(\"no-effect-content-container\").innerHTML+=\n '<div id=\"' + noEffect[i] + '-text\">' + noEffect[i] + '</div><br>';\n }\n } else {\n document.getElementById(\"no-effect-content-container\").style.width = \"0%\";\n document.getElementById(\"immune-content-container\").style.width = \"100%\";\n }\n if(immune.length > 0) {\n document.getElementById(\"immune-content-container\").innerHTML += '<h5 style=\"color: rgb(204, 255, 204);\">Immune To</h5>';\n for(var i in immune) {\n document.getElementById(\"immune-content-container\").innerHTML+=\n '<div id=\"' + immune[i] + '-text\">' + immune[i] + '</div><br>';\n }\n } else {\n document.getElementById(\"no-effect-content-container\").style.width = \"100%\";\n document.getElementById(\"immune-content-container\").style.width = \"0%\";\n }\n }\n adjustHeightBottomContent();\n}", "instructions() {\n this.canvas[1].font = \"20px Arial\";\n this.canvas[1].fillText('Goal: Avoid the monsters. Reach the princess.',10,105);\n }", "function showTipTable(tableIndex, reportObjId)\r\n{\r\n var rows = tables[tableIndex].rows;\r\n var a = reportObjId - 1;\r\n\r\n if(rows.length != arrayMetadata[a].length)\r\n\tthrow new Error(\"rows.length=\" + rows.length+\" != arrayMetadata[array].length=\" + arrayMetadata[a].length);\r\n\r\n for(i=0; i<rows.length; i++) \r\n \trows[i].cells[1].innerHTML = arrayMetadata[a][i];\r\n}", "function showTipTable(tableIndex, reportObjId)\r\n{\r\n var rows = tables[tableIndex].rows;\r\n var a = reportObjId - 1;\r\n\r\n if(rows.length != arrayMetadata[a].length)\r\n\tthrow new Error(\"rows.length=\" + rows.length+\" != arrayMetadata[array].length=\" + arrayMetadata[a].length);\r\n\r\n for(i=0; i<rows.length; i++) \r\n \trows[i].cells[1].innerHTML = arrayMetadata[a][i];\r\n}", "function Detailtableone(){\r\ntableone = anychart.standalones.table(10,3 );\r\ntableone.cellBorder(null);\r\ntableone.getCol(0).width('33.33%');\r\ntableone.getCol(1).width('33.33%');\r\ntableone.getCol(2).width('33.33%');\r\ntableone.getRow(0).height('10%');\r\ntableone.getRow(1).height('10%');\r\ntableone.getRow(2).height('10%');\r\ntableone.getRow(3).height('10%');\r\ntableone.getRow(4).height('10%');\r\ntableone.getRow(5).height('10%');\r\ntableone.getRow(6).height('10%');\r\ntableone.getRow(7).height('10%');\r\ntableone.getRow(8).height('10%');\r\ntableone.getRow(9).height('10%');\r\n\r\n\r\n\r\ntableone.getCell(0, 0).colSpan(3).content('Available Site')\r\n.fontSize(8);\r\ntableone.getCell(1, 1).content('Area of site')\r\n.fontSize(8);\r\ntableone.getCell(2, 1).content('Distance from pipe')\r\n.fontSize(7);\r\ntableone.getCell(3, 1).content('Distance from center')\r\n.fontSize(6);\r\ntableone.getCell(4, 1).content('Area of site')\r\n.fontSize(8);\r\ntableone.getCell(5, 1).content('Distance from pipe')\r\n.fontSize(7);\r\ntableone.getCell(6, 1).content('Distance from center')\r\n.fontSize(6);\r\ntableone.getCell(7, 1).content('Area of site')\r\n.fontSize(8);\r\ntableone.getCell(8, 1).content('Distance from pipe')\r\n.fontSize(7);\r\ntableone.getCell(9, 1).content('Distance from center')\r\n.fontSize(6);\r\ntableone.getCell(1, 2).content(sitea_areasite);\r\ntableone.getCell(2, 2).content(sitea_road);\r\ntableone.getCell(3, 2).content(sitea_center);\r\ntableone.getCell(4, 2).content(siteb_areasite);\r\ntableone.getCell(5, 2).content(siteb_road);\r\ntableone.getCell(6, 2).content(siteb_center);\r\ntableone.getCell(7, 2).content(sitec_areasite);\r\ntableone.getCell(8, 2).content(sitec_road);\r\ntableone.getCell(9, 2).content(sitec_center);\r\ntableone.getCell(1, 0).rowSpan(3).content('Site A')\r\n.fontSize(8);\r\ntableone.getCell(4, 0).rowSpan(3).content('Site B')\r\n.fontSize(8);\r\ntableone.getCell(7, 0).rowSpan(3).content('Site C')\r\n.fontSize(8);\r\n\r\ntableone.getRow(0) \r\n.cellFill(\"#37474f\");\r\ntableone.getRow(1) \r\n.cellFill(\"#37474f\"); \r\ntableone.getRow(2) \r\n.cellFill(\"#37474f\");\r\ntableone.getRow(3) \r\n.cellFill(\"#37474f\"); \r\ntableone.getRow(4) \r\n.cellFill(\"#37474f\");\r\ntableone.getRow(5) \r\n.cellFill(\"#37474f\");\r\ntableone.getRow(6) \r\n.cellFill(\"#37474f\");\r\ntableone.getRow(7) \r\n.cellFill(\"#37474f\"); \r\ntableone.getRow(8) \r\n.cellFill(\"#37474f\"); \r\ntableone.getRow(9) \r\n.cellFill(\"#37474f\"); \r\n\r\ntableone.cellBorder(\"#b0bec5\").hAlign(\"center\").vAlign(\"middle\");\r\n\ttableone.cellPadding(0) \r\n\t .fontWeight(90) \r\n\t .fontSize(16) \r\n\t .fontColor('#b0bec5'); \r\n\r\ntableone.draw();\r\nreturn tableone\r\n}", "substituteText() {\n const proxyObj = this.display;\n this.display = new Text();\n this.display.substitute(proxyObj);\n }", "function changeMultiIndividualText() {\n var node = findNode(multiIndividualNodeKey, globalLogicData);\n node.multiInvididualText = document.getElementById('textForMultiIndividual').value;\n reRender(multiIndividualNodeKey);\n}", "function datasetText(dataset) {\r\n\treturn dataset;\r\n}", "function showTipTable(tableIndex, reportObjId)\n{\n var rows = tables[tableIndex].rows;\n var a = reportObjId - 1;\n\n if(rows.length != arrayMetadata[a].length)\n\tthrow new Error(\"rows.length=\" + rows.length+\" != arrayMetadata[array].length=\" + arrayMetadata[a].length);\n\n for(i=0; i<rows.length; i++) \n \trows[i].cells[1].innerHTML = arrayMetadata[a][i];\n}", "function showTipTable(tableIndex, reportObjId)\n{\n var rows = tables[tableIndex].rows;\n var a = reportObjId - 1;\n\n if(rows.length != arrayMetadata[a].length)\n\tthrow new Error(\"rows.length=\" + rows.length+\" != arrayMetadata[array].length=\" + arrayMetadata[a].length);\n\n for(i=0; i<rows.length; i++) \n \trows[i].cells[1].innerHTML = arrayMetadata[a][i];\n}", "function daDamageThing(damage, typeBonus, currentDragonHealth) {\r\n //secondEle.innerHTML=\"\"\r\n dragonHealth = currentDragonHealth - (damage + typeBonus)\r\n\r\n secondEle.innerHTML = \"Dragon Health:\" + dragonHealth\r\n if (dragonHealth<=0){\r\n secondEle.innerHTML=\"Dragon Health:\" + 0\r\n //dragonHealth=0\r\n thirdEle.innerHTML=\"AYO YOU DID IT YOU BEAT THIS DRAGON'S ASS, have a cookie!\"\r\n }\r\n}", "function forceTextOverprinting(lHead) {\r\n // Comm'd out Mar'21. I suspect that this was necessary for an earlier version of Illy\r\n // but it no longer seems necessary. If this holds, I can remove altogether...\r\n // lHead.blendingMode = BlendModes.MULTIPLY;\r\n}", "createTextLife(object) {\n return object.add.text(game.config.width - 70, 16, '♥ ' + lifes, { fontFamily: 'MV Boli Bold', fontSize: '35px', fill: '#fc2003' });\n }", "function AfterTextRenderHook() {}", "function addwraptext(text){\n\t\ttext.each(function(d){\n\t\t\tCELL=d.CELL;\n\t\t\tvar ctdict={};\n\t\t\tfor(x of CELL){\n\t\t\t\txlabel=cells[x].typeLabel;\n\t\t\t\tif (xlabel in ctdict==false){\n\t\t\t\t\tctdict[xlabel]=1;\n\t\t\t\t}else{\n\t\t\t\t\tctdict[xlabel]+=1;\n\t\t\t\t}\n\t\t\t}\n\t\t\td3.select(this).append(\"tspan\")\n\t\t\t\t.attr(\"x\",20)\n\t\t\t\t.attr(\"dy\",\"1em\")\n\t\t\t\t.text(function(d){\n\t\t\t\t\treturn \"ID: E\"+d.T+\"_\"+d.ID;\n\t\t\t\t\t})\n\t\t\t// add diff stage\n\t\t\td3.select(this).append(\"tspan\")\n\t\t\t\t.attr(\"x\",20)\n\t\t\t\t.attr(\"dy\",\"1em\")\n\t\t\t\t.text(function(d){\n\t\t\t\t\treturn \"Differentiation: \"+(d.D*100).toFixed(1)+\"%\";\n\t\t\t\t})\n\t\t\t\t\n\t\t\tfor ( var key in ctdict){\n\t\t\t\td3.select(this).append(\"tspan\")\n\t\t\t\t.attr(\"x\",function(d){ return 20;})\n\t\t\t\t.attr(\"dy\",\"1em\")\n\t\t\t\t.text(key+\",\"+ctdict[key]);\n\t\t\t}\n\t\t});\n\t}", "function AddDamage (array_damages) {\r\n\t\r\n\tvar str = \"\";\r\n\tfor (var x = 0; x < array_damages.length; x++) {\r\n\r\n\t str = str + \"<tr id='\" + array_damages[x].internal_id + \"'>\";\r\n\r\n\t str = str + \"<td>\" + array_damages[x].damage_code_desc + \"</td>\";\r\n\t\tstr = str + \"<td>\" + current_notification.equipment.equipmentdesc + \"</td>\";\r\n\t str = str + \"<td>\" + array_damages[x].damage_group_desc + \"</td>\";\r\n\t str = str + \"<td>\" + array_damages[x].damage_desc + \"</td>\";\r\n\t str = str + \"<td><a onclick=\\\"return DeleteDamage('\" + array_damages[x].internal_id + \"', '\" + array_damages[x].damage_code + \" / \" + array_damages[x].damage_group + \"');\\\">Delete</a></td>\";\r\n\t if(array_damages[x].op_sys == 0){\r\n\t \tstr = str + \"<td><a onclick=\\\"return EditDamage('\" + array_damages[x].internal_id + \"', '\" + array_damages[x].damage_group + \"', '\" + array_damages[x].damage_code + \"', '\" + array_damages[x].damage_desc + \"');\\\" href='#modal_edit_damage' data-toggle='modal' >Edit</a></td>\";\r\n\t } else {\r\n\t \tstr = str + \"<td></td>\";\r\n\t }\r\n\t \t\r\n\t str = str + \"</tr>\";\r\n\t \r\n\t $(\"#\" + TAB_DAMAGECAUSE_TABLE_DAMAGE + \" tr:last\").after(str);\r\n\t str = \"\";\r\n\t}\r\n\r\n}", "function changeInfoBar()\n {\n var ib = document.getElementById(\"wbInfoBar\") ;\n var tr = ib.rows[0] ;\n var tds = tr.cells ;\n for ( var i = 0 ; i < arguments.length ; i++ )\n {\n if ( i < tds.length )\n {\n tds[i].nodeValue = arguments[i] ;\n }\n }\n }", "function statTxt(txt1,txt2,all,Fem,Male) { \n let txt='',t1,t2;\n if (all>0) {\n if (all==1) {t1=\"ое\"; t2=\"о\"} else {t1=\"ых\"; t2=\"\"};\n// the text is different for general statistics or by type:\n if (txt2==\"\"){txt+=`${txt1}${t1} существ${t2} ${all}`} else {txt=`${txt1} ${all} `};\n if (Fem==1) { txt+=`, женское`} else if (Fem>1) {txt+=`, женских ${Fem}`};\n if (Male==1) {txt+=`, мужское`} else if (Male>1) {txt+=`, мужских ${Male}`};\n txt+=`.\\n `;\n }\n return txt;\n}", "function damageGlobalHealth(damage){\n globalHealth -= damage;\n baseHealthText.setText(globalHealth + \" / \" + maxGlobalHealth);\n \n if(globalHealth <= 0){\n globalHealth = 0;\n gameOver = true;\n //enemyManager.endGame();\n \n game.paused = true;\n \n //game over text\n gameOverText = game.add.text(game.world.centerX, game.world.centerY, \"Game Over\");\n gameOverText.font = 'Revalia';\n gameOverText.fontSize = 100;\n grd = gameOverText.context.createLinearGradient(0, 0, 0, gameOverText.canvas.height);\n grd.addColorStop(0, '#016dff'); \n grd.addColorStop(1, '#016dff');\n gameOverText.fill = grd;\n gameOverText.align = 'center';\n gameOverText.stroke = '#000000';\n gameOverText.strokeThickness = 4;\n gameOverText.setShadow(5, 5, 'rgba(0,0,0,0.5)', 5);\n gameOverText.inputEnabled = false;\n }\n else\n {\n if(globalHealth < (3/4) * maxGlobalHealth && globalHealth > (1/2) * maxGlobalHealth)\n {\n baseHealthText.fill = '#dade10';\n }\n else if(globalHealth < (1/2) * maxGlobalHealth && globalHealth > (1/4) * maxGlobalHealth)\n {\n baseHealthText.fill = '#de7b10';\n }\n else if(globalHealth < (1/4) * maxGlobalHealth)\n {\n baseHealthText.fill = '#de1410';\n }\n }\n }", "function addwraptext(text){\n\t\ttext.each(function(d){\n\t\t\tCELL=d.CELL;\n\t\t\tvar ctdict={};\n\t\t\tfor(x of CELL){\n\t\t\t\txlabel=cells[x].typeLabel;\n\t\t\t\tif (xlabel in ctdict==false){\n\t\t\t\t\tctdict[xlabel]=1;\n\t\t\t\t}else{\n\t\t\t\t\tctdict[xlabel]+=1;\n\t\t\t\t}\n\t\t\t}\n\t\t\td3.select(this).append(\"tspan\")\n\t\t\t\t.attr(\"x\",\"1em\")\n\t\t\t\t.attr(\"dy\",\"1em\")\n\t\t\t\t.text(function(d){\n\t\t\t\t\treturn \"ID: E\"+d.T+\"_\"+d.ID;\n\t\t\t\t\t})\n\t\t\t// add diff stage\n\t\t\td3.select(this).append(\"tspan\")\n\t\t\t\t.attr(\"x\",\"1em\")\n\t\t\t\t.attr(\"dy\",\"1em\")\n\t\t\t\t.text(function(d){\n\t\t\t\t\treturn \"Differentiation: \"+(d.D*100).toFixed(1)+\"%\";\n\t\t\t\t})\n\t\t\t\t\n\t\t\tfor ( var key in ctdict){\n\t\t\t\td3.select(this).append(\"tspan\")\n\t\t\t\t.attr(\"x\",function(d){ return 20;})\n\t\t\t\t.attr(\"dy\",\"1em\")\n\t\t\t\t.text(key+\",\"+ctdict[key]);\n\t\t\t}\n\t\t});\n\t}", "function gameOverText () {\n style = { font: \"65px Arial\", fill: \"#fff\", align: \"center\" };\n var text = game.add.text(game.camera.x+450, game.camera.y+250, \"You Lose! Try Again...\", style);\n text.anchor.set(0.5);\n }", "function changeOneLineText(cell, text) {\n $(\".Input\").remove();\n $(cell).click(function () { createTextInsert(this); });\n if ($(cell).attr(\"Class\").indexOf(\"TitleChange\") != -1) {\n var params = {};\n params.MatrixId = $(\"#ContentPlaceHolder1__pl__cl__detail_MainTable\").attr(\"Class\");\n switch ($(cell).attr(\"Id\")) {\n case \"ContentPlaceHolder1__pl__cl__detail_TitleRowCell1\":\n if (text.replace(/ /g, '').length == 0) {\n alert('Leere Titel der Karte können nicht gespeichert werden');\n $('#ContentPlaceHolder1__pl__cl__detail_TitleRowCell1')[0].innerText = 'Titel';\n }\n else {\n params.CellId = \"Title\";\n }\n break;\n case \"ContentPlaceHolder1__pl__cl__detail_TitleRowCell6\":\n params.CellId = \"Subtitle\";\n break;\n case \"ContentPlaceHolder1__pl__cl__detail_TitleRowCell3\":\n params.CellId = \"Author\";\n break;\n case \"ContentPlaceHolder1__pl__cl__detail_TitleRowCell5\":\n params.CellId = \"Date\";\n break;\n case \"ContentPlaceHolder1__pl__cl__detail_TitleRowCell8\":\n params.CellId = \"LastChange\";\n break;\n case \"ContentPlaceHolder1__pl__cl__detail_TitleRowCell10\":\n params.CellId = \"Revision\";\n break;\n default:\n params.CellId = $(cell).attr(\"Id\");\n params.CellId = params.CellId.substring(36);\n break;\n }\n // Wp name auf standard setzten falls leer\n if (text == \"\" && params.CellId.toString().indexOf(\"Wirkungspakete\") != -1) {\n text = \"WP\" + ($(\".WirkungspaketCell\").index($(cell)) + 1).toString();\n }\n // ColorMenu aktualisieren\n if (params.CellId.toString().indexOf(\"Legend\") != -1) {\n var index = parseInt(params.CellId.substring(6).split(\"_\")[0] - 1) * 2 + parseInt(params.CellId.substring(6).split(\"_\")[1]);\n colorMenuTextChange(index, text);\n }\n params.Text = text;\n } else {\n if (text == \"\" && getCoords($(cell).parents(\".MainCell\").attr(\"Id\"))[1] != \"\" && $(cell).parents(\".CellTable\").attr(\"class\") != \"CellTable SupportColorFirstColumn\" && $(cell).parents(\".CellTable\").find(\".TextRow > .TextColumn\").text() == \"\") {\n var activeRow = $(cell).parents(\".MainCell\").parents(\".MainRow\");\n index = getCoords($(cell).parents(\".MainCell\").attr(\"Id\"));\n if (index[1] != \"\") {\n var params = {};\n params.RowID = index[0];\n params.CellId = index[1];\n params.Index = getIndex($(cell).parents(\".MainCell\"));\n callWebservice(\"dbDeleteCell\", params);\n RemoveDaDEventListener($(cell).parents(\".RowCellDetail\")[0]);\n for (var i = 0; wirkungselementeArray.length > i; i++) {\n if (index[1] == wirkungselementeArray[i].ORIGIN_CHARACTERISTIC_ID || index[1] == wirkungselementeArray[i].GOAL_CHARACTERISTIC_ID) {\n removeWirkungselementConnection(wirkungselementeArray[i].ORIGIN_CHARACTERISTIC_ID, wirkungselementeArray[i].GOAL_CHARACTERISTIC_ID, wirkungselementeArray[i].Wirkungspaket_ID);\n i--;\n }\n }\n drawWirkungselemente();\n $(cell).parents(\".MainCell\").remove();\n addCellAfter($(activeRow).children(\".MainCell\").filter(\":last-child\"), true);\n }\n $('#ContentPlaceHolder1__pl__cl__detail_minusMenu').hide(\"fast\");\n } else if (ifCellEmpty($(cell).parents(\".MainCell\")) == true && text != \"\") {\n var index = getCoords($(cell).parents(\".MainCell\").attr(\"Id\"));\n var newId = getNewCellId(index[0], $(cell).parents(\".MainCell\"));\n $(cell).parents(\".MainCell\").attr(\"Id\", $(cell).parents(\".MainCell\").attr(\"Id\") + newId);\n $(\"<a class=\\\"ColorButton\\\" href=\\\"javascript:void(0);\\\"><img style=\\\"display: inline;\\\" src=\\\"../images/pen.png\\\" border=\\\"0\\\"></a>\").appendTo(\n $(cell).parents(\".CellTable\").find(\".SupportRow td.SupportColumn\"));\n $(cell).parents(\".CellTable\").find('.ColorButton').click(function () { //show colorationMenu\n showColorationMenu(this)\n });\n }\n text = text.replace(/(\\r\\n|\\n|\\r)/gm, \"\");\n var params = {};\n var coords = getCoords($(cell).parents(\".MainCell\").attr(\"id\"));\n params.MatrixId = $(\"#ContentPlaceHolder1__pl__cl__detail_MainTable\").attr(\"Class\");\n params.CellId = coords[1];\n params.Text = text;\n }\n $(cell).html($(cell).html() + text);\n $(\".WirkungspaketCell input[type='button']\").unbind();\n $(\".WirkungspaketCell input[type='button']\").click(function (event) {\n toggleWirkungspaket(this);\n event.stopPropagation();\n });\n //$(\".RemoveWirkungspaket\").unbind();\n $(cell).children(\".RemoveWirkungspaket\").click(function (event) {\n removeWirkungspaket(this);\n event.stopPropagation();\n });\n callWebservice(\"dbTextChange\", params);\n}", "function TextDesc() {\n\tthis.text = '';\n\tthis.xml_id = '';\n//\tthis.custom = '';\n}", "function decorateFlavorText() {\n for (i = 0; i < arguments.length; i++) {\n let level = arguments[i]+'Level';\n let levelValue = player[level];\n let levelValueReadable = levelValue+1;\n let flavor = arguments[i]+'Flavor';\n let flavorText = window[flavor+'Array'][levelValue];\n $('#' + flavor)[0].innerHTML='Level: ' + levelValueReadable + ' ' + flavorText;\n }\n}", "function changetextitalic() {\n var currentIndex = findCurrentIndex(tempKey);\n if (mainDiagram.model.nodeDataArray[currentIndex].Italic) {\n mainDiagram.model.nodeDataArray[currentIndex].Italic = false\n }\n else {\n mainDiagram.model.nodeDataArray[currentIndex].Italic = true;\n }\n getRadio(mainDiagram.selection.Ca.value);\n}", "function mostraretro1() {\n retrouno.style.display=\"block\";\n fronte1fronte1.replaceChild(retrouno,fronte1);\n //modifica delle descrizioni con il contenuto della lettera\n testo.style.display=\"block\";\n descrizionedescrizione.replaceChild(testo, descrizione); \n }", "function setTargetText() {\n\n // The target text should display at least one character\n var targetLength = Settings.TARGET_TEXT_LENGTH\n if (targetLength < 1) {\n targetLength = 1\n }\n\n // Length of the target text should be odd as equal number of\n // characters should be displayed on either side of the\n // character to be typed\n if (targetLength % 2 == 0) {\n targetLength--\n }\n\n // Number of characters on either side of the character to be\n // typed, assuming that the character to be typed is at the\n // centre\n var prefixLength = (targetLength - 1) / 2\n\n // Calculate the start index and the end index of the substring\n // to be selected from the subunit text to display as the target\n // text\n var i = my.current.correctInputLength\n var textLength = my.current.subunitText.length\n if (i <= prefixLength) {\n var startIndex = 0\n } else if (i >= textLength - 1 - prefixLength) {\n var startIndex = textLength - targetLength\n } else {\n var startIndex = i - prefixLength\n }\n var endIndex = startIndex + targetLength\n\n // Select prefix string\n var s = my.current.subunitText.substring(startIndex, i)\n my.current.targetPrefix = Util.visual(s)\n\n // Select target character\n if (i < textLength) {\n s = my.current.subunitText.charAt(i)\n my.current.targetChar = Util.visual(s)\n } else {\n my.current.targetChar = ''\n }\n\n // Select suffix string\n s = my.current.subunitText.substring(i + 1, endIndex)\n my.current.targetSuffix = Util.visual(s)\n }", "function displayGameText() {\n $(\".obi-wan-kenobi.character-name\").text(characterList[0].name);\n $(\".obi-wan-kenobi.character-hp\").text(characterList[0].healthPoints);\n $(\".luke-skywalker.character-name\").text(characterList[1].name);\n $(\".luke-skywalker.character-hp\").text(characterList[1].healthPoints);\n $(\".darth-vader.character-name\").text(characterList[2].name);\n $(\".darth-vader.character-hp\").text(characterList[2].healthPoints);\n $(\".darth-maul.character-name\").text(characterList[3].name);\n $(\".darth-maul.character-hp\").text(characterList[3].healthPoints);\n }", "function dmgstring(dmg){ //returns either an empty string or \r\n return dmgamount > 0 ? ` and hit the enemy for ${Math.round(dmg*frow.edmgmult)} ${abrow.dmgtype} damage` : ``\r\n }", "function setDispText(obj) {\n\n //debugger;\n\n Disp_TextAdd = (obj.Disp_TextAdd !== undefined && obj.Disp_TextAdd !== null && obj.Disp_TextAdd !== \"\") ? obj.Disp_TextAdd : Disp_TextAdd;\n Disp_TextSave = (obj.Disp_TextSave !== undefined && obj.Disp_TextSave !== null && obj.Disp_TextSave !== \"\") ? obj.Disp_TextSave : Disp_TextSave;\n Disp_OperationsTitle = (obj.Disp_OperationsTitle !== undefined && obj.Disp_OperationsTitle !== null && obj.Disp_OperationsTitle !== \"\") ? obj.Disp_OperationsTitle : Disp_OperationsTitle;\n Disp_TextUp = (obj.Disp_TextUp !== undefined && obj.Disp_TextUp !== null && obj.Disp_TextUp !== \"\") ? obj.Disp_TextUp : Disp_TextUp;\n Disp_TextDown = (obj.Disp_TextDown !== undefined && obj.Disp_TextDown !== null && obj.Disp_TextDown !== \"\") ? obj.Disp_TextDown : Disp_TextDown;\n Disp_TextEdit = (obj.Disp_TextEdit !== undefined && obj.Disp_TextEdit !== null && obj.Disp_TextEdit !== \"\") ? obj.Disp_TextEdit : Disp_TextEdit;\n Disp_TextDelete = (obj.Disp_TextDelete !== undefined && obj.Disp_TextDelete !== null && obj.Disp_TextDelete !== \"\") ? obj.Disp_TextDelete : Disp_TextDelete;\n }", "function specials() {\n document.getElementById('stats').innerHTML = \"<p style='font: 20 px; font-family: sans-serif'><br>Under construction ...</p>\";\n}", "function setNonStatusText() {\n sendUpdate(\"setNonStatusText\", {\n trackerDescription: tr(\"tracker.know_the_status_of_your\"),\n patentText: tr(\"tracker.patent_pending\"),\n num1: tr(\"general.stage1\"),\n num2: tr(\"general.stage2\"),\n num3: tr(\"general.stage3\"),\n num4: tr(\"general.stage4\"),\n num5: tr(\"general.stage5\"),\n trackerHeader: jsDPZ.util.htmlUnEncode(tr(\"confirmation.dominos_tracker\"))\n });\n }", "function changeSpecialText(rawDisplayText,textOne, textTwo, textThree, textFour) {\n \tvar displayText = rawDisplayText.replace(/%1/, textOne);\n \n \tif (textTwo != null){\n\t \tdisplayText = displayText.replace(/%2/, textTwo);\n\t}\n \tif (textThree != null){\n\t \tdisplayText = displayText.replace(/%3/, textThree);\n\t}\n \tif (textFour != null){\n\t \tdisplayText = displayText.replace(/%4/, textFour);\n\t}\t \n \treturn displayText;\n}", "function Text2D(text,settings){var _this=this;if(!settings){settings={};}_this=_super.call(this,settings)||this;if(settings.bitmapFontTexture!=null){_this._fontTexture=settings.bitmapFontTexture;_this._fontName=null;_this._fontSuperSample=false;_this._fontSDF=false;_this._textureIsPremulAlpha=_this._fontTexture.isPremultipliedAlpha;var ft=_this._fontTexture;if(ft!=null&&!ft.isReady()){ft.onLoadObservable.add(function(){_this._positioningDirty();_this._setLayoutDirty();_this._instanceDirtyFlags|=BABYLON.Prim2DBase.originProperty.flagId;// To make sure the Text2D is issued again for render\n});}}else{_this._fontName=settings.fontName==null?\"12pt Arial\":settings.fontName;_this._fontSuperSample=settings.fontSuperSample!=null&&settings.fontSuperSample;_this._fontSDF=settings.fontSignedDistanceField!=null&&settings.fontSignedDistanceField;}_this._defaultFontColor=settings.defaultFontColor==null?new BABYLON.Color4(1,1,1,1):settings.defaultFontColor.clone();_this._tabulationSize=settings.tabulationSize==null?4:settings.tabulationSize;_this._textureIsPremulAlpha=true;//settings.fontTexturePremulAlpha === true;\n_this._textSize=null;_this.text=text;if(settings.size!=null){_this.size=settings.size;_this._sizeSetByUser=true;}else{_this.size=null;}_this._useBilinearFiltering=settings.useBilinearFiltering!=null?settings.useBilinearFiltering:null;_this._fontBilinearFiltering=false;// Text rendering must always be aligned to the target's pixel to ensure a good quality\n_this.alignToPixel=true;_this.textAlignmentH=settings.textAlignmentH==null?Text2D_1.AlignLeft:settings.textAlignmentH;_this.textAlignmentV=settings.textAlignmentV==null?Text2D_1.AlignTop:settings.textAlignmentV;_this.textAlignment=settings.textAlignment==null?\"\":settings.textAlignment;_this._wordWrap=settings.wordWrap==null?false:settings.wordWrap;_this._updateRenderMode();return _this;}", "function getText_DataIndex() {\n\treturn 0;\n}", "function wrongHitMsg(hitEnemy)\r\n{\r\n if(hitEnemy.trashType == trash[0]){ //if textile\r\n var textileString = \"You're using the wrong weapon! Only 15% of used clothing in the USA is recycled, leaving landfills full of clothes that could've been recycled! Use the up/down keys to switch to the correct weapon.\";\r\n textBox.textContent = textileString;\r\n }\r\n else if(hitEnemy.trashType == trash[1]){ //else if recyclable\r\n textBox.textContent = \"You're using the wrong weapon! Improperly recycling prevents resources from being reused which hurts the enviroment! Use the up/down keys to switch to the correct weapon.\";\r\n }\r\n else if(hitEnemy.trashType == trash[2]){ //else if compose\r\n textBox.textContent = \"You're using the wrong weapon! Not composting leads to increased waste in landfills! Use the up/down keys to switch to the correct weapon.\";\r\n }\r\n else if(hitEnemy.trashType == trash[3]){ //else if landfill\r\n textBox.textContent = \"You're using the wrong weapon! Trash can contaminate other items being recycled or composted which compromises our sustainability mission! Use the up/down keys to switch to the correct weapon.\";\r\n }\r\n}", "function loseText() {\n $(\"#userHP\").html(\"\");\n $(\"#battleText1\").html(\"You lose &nbsp &nbsp\");\n $(\"#battleText2\").html(\"Try Again &nbsp &nbsp\");\n reset()\n}", "function changeBottomText (newText, loc, delayDisappear, delayAppear) {\n\tmiddleTextBottom\n\t\t/*Current text disappear*/\n\t\t.transition().delay(700 * delayDisappear).duration(700)\n\t\t.attr('opacity', 0)\n\t\t/*New text appear*/\n\t\t.call(endall, function() {\n\t\t\tmiddleTextBottom.text(newText)\n\t\t\t.attr(\"y\", 24*loc + \"px\")\n\t\t\t.call(wrap, 350);\t\n\t\t})\n\t\t.transition().delay(700 * delayAppear).duration(700)\n\t\t.attr('opacity', 1);\n;}", "function changeBottomText (newText, loc, delayDisappear, delayAppear) {\n\tmiddleTextBottom\n\t\t/*Current text disappear*/\n\t\t.transition().delay(700 * delayDisappear).duration(700)\n\t\t.attr('opacity', 0)\n\t\t/*New text appear*/\n\t\t.call(endall, function() {\n\t\t\tmiddleTextBottom.text(newText)\n\t\t\t.attr(\"y\", 24*loc + \"px\")\n\t\t\t.call(wrap, 350);\t\n\t\t})\n\t\t.transition().delay(700 * delayAppear).duration(700)\n\t\t.attr('opacity', 1);\n;}", "function rowSetText(text) {\n rowClear();\n currentRow.append('div').classed('tbar-row-text', true)\n .text(text);\n }", "function showTable(table, longerText, shorterText) {\n var space = \" \";\n\n // show longer text horizontaly\n var line = space + space;\n var c = \"\";\n for (var i = 0; i < longerText.length; i++) {\n c = longerText.charAt(i);\n line = line + (space + c).slice(-space.length);\n }\n console.log(line);\n\n // show shorter text verticaly\n var line = space;\n table.forEach(function(tableRow, i) {\n if (!i) {\n line = space;\n } else {\n c = shorterText.charAt(i - 1);\n line = (space + c).slice(-space.length);\n }\n\n tableRow.forEach(function(tableCol, j) {\n line = line + (space + tableCol).slice(-space.length);\n })\n console.log(line);\n });\n\n console.log();\n }", "function setText1() {\n // Set temp variables\n tempTextUndsicountedPrice = document.getElementsByClassName('originalPrice')[0].innerHTML\n tempTextDsicountedPrice = document.getElementsByClassName('discountedPrice')[0].innerHTML\n\n // Set new variables and text\n $(\".originalPrice\").html(\"$\"+c1);\n var newPriceText = (c1*0.75).toFixed(2);\n $(\".discountedPrice\").html(\"$\"+newPriceText);\n}", "function switchtext(){\n\t\t$(\"h2\").html(\"Christina\");\n\t}", "function changeTwoSidedDataAvailable() {\r\n \r\n // remove the bars\r\n removeBarsTwoSided(\"rect.left\", dataMale);\r\n removeBarsTwoSided(\"rect.right\", dataFemale);\r\n\r\n // remove all text\r\n removeAllTextTwoSided();\r\n svgTwoSided.selectAll(\".graphTitle\").remove();\r\n \r\n // add the bars again\r\n var xLeft = function(d) { return marginT.left + widthTside - xT(d); }\r\n var xRight = marginT.left + widthTside + labelArea;\r\n\r\n addBarsTwoSided(\"rect.left\", dataMale, xLeft, \"left\");\r\n addBarsTwoSided(\"rect.right\", dataFemale, xRight, \"right\");\r\n\r\n // add the titles again\r\n addTitlesTwoSided();\r\n\r\n // add percentages as axis title\r\n addPercentages(\"text.leftscore\", dataMale, 0);\r\n addPercentages(\"text.rightscore\", dataFemale, marginT.left + widthT + marginT.right);\r\n}", "function OnHousingUnitsUninhabitable_Change( e , type )\r\n{\r\n Alloy.Globals.AeDESModeSectionEight[\"HOUSING_UNITS_UNINHABITABLE\"] = $.widgetAppTextFieldAeDESModeFormsSectionEightHousingUnitsUninhabitable.get_text_value() ;\r\n}", "function setUpText() {\n textImg = createGraphics(width, height);\n textImg.pixelDensity(1);\n textImg.background(255);\n textImg.textStyle(fontStyle);\n textImg.textFont('Roboto');\n textImg.textSize(fontSize);\n textImg.textAlign(CENTER, CENTER);\n textImg.text(type, width / 2, height / 4 + fontSize / 6);\n textImg.loadPixels();\n}", "function dmgstring(dmg){ //returns either an empty string or \r\n return dmgamount > 0 ? ` and hit your pet for ${dmg*frow.dmgmult} ${abrow.dmgtype.toLowerCase()} damage` : ``\r\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 texte2(){\n document.querySelector(\".textM\").classList.add(\"textM3\")\n document.querySelector(\".textM\").innerText= `fonctionne en bluethoot ! ou part cable !\n peut se rechargé sur un socle transportable`;\n}", "function addText() {\n svg.append(\"text\")\n .attr(\"class\", \"xtext\")\n .attr(\"x\", w - margins.right)\n .attr(\"y\", h - 5)\n .attr(\"text-anchor\", \"middle\")\n .text(\"Consumer confidence\");\n\n svg.append(\"text\")\n .attr(\"class\", \"ytext\")\n .attr(\"x\", -230)\n .attr(\"y\", -40)\n .attr(\"text-anchor\", \"middle\")\n .attr(\"transform\", \"rotate(-90)\")\n .text(\"% of women in science from total amount of researchers\");\n\n svg.append(\"text\")\n .attr(\"class\", \"title\")\n .attr(\"x\", w / 2)\n .attr(\"y\", -10)\n .attr(\"text-anchor\", \"middle\")\n .text(\"% of women in science against consumer confidence per country\")\n }", "function set2ndOwnerTbl(){\n var currentIndex = 3;\n var tablegroup = \"owner2grpRestriction\";\n setTable(currentIndex, tablegroup, this.grid.getPrimaryKeysForRow(this));\n}", "function dbatt1(){\n\t\t\troot.batt_1.visible = false;\n\t\t\troot.line_cover_4.visible = true;\n\t\t\troot.line_cover_5.visible = true;\n\t\t\troot.dot_path4_rev.visible = true;\n\t\t\troot.dot_path5_rev.visible = true;\n\t\t}", "function itemprint(t){\n\t\t\tdebugger;\n\t\t\tvar newtext = $(\"<p style=display:none>\")\n\t\t\t// var statusvar = current.effects[0].status\n\t\t\tvar effectcheck = window[(current.effects[0].status)]\n\t\t\t// var currenteffect = caction.effectvar\n\t\t\t// if(effectcheck === undefined){};\n\t\t\tif(effectcheck === false || effectcheck === undefined){\n\t\t\t\tnewtext\n\t\t\t\t\t.text(current[t] + current.item[0].idesc + current.effects[0].efalse)\n\t\t\t\t\t.appendTo(\".textarea\")\n\t\t\t\t\t.fadeIn(3000)\n\t\t\t};\n\t\t\tif(effectcheck === true){\n\t\t\t\tnewtext\n\t\t\t\t\t.text(current[t] + current.item[0].idesc + current.effects[0].etrue)\n\t\t\t\t\t.appendTo(\".textarea\")\n\t\t\t\t\t.fadeIn(3000)\n\t\t\t};\n\t\t\t$(\".textarea\").animate({scrollTop: 9000}, 3000);\n\t\t}", "function updateAttackInfo(){\n if($(\".attacker\").attr('id') === \"red\"){\n $(\"#attack-text\").text(redCharacter.Name+ \" attacked for \" + attackAmount);\n }\n else if($(\".attacker\").attr('id') === \"blue\"){\n $(\"#attack-text\").text(blueCharacter.Name+ \" attacked for \" + attackAmount);\n }\n else if($(\".attacker\").attr('id') === \"green\"){\n $(\"#attack-text\").text(greenCharacter.Name+ \" attacked for \" + attackAmount);\n }\n else if($(\".attacker\").attr('id') === \"yellow\"){\n $(\"#attack-text\").text(yellowCharacter.Name+ \" attacked for \" + attackAmount);\n }\n }", "function changeText2() {\n var sen = document.getElementById(\"changeMe\");\n var sen2 = document.getElementById(\"changeMe2\");\n if (clicked2) {\n sen.style.fontStyle = \"italic\";\n sen.style.fontWeight = \"bold\";\n sen.style.color = \"purple\";\n sen2.style.fontStyle = \"italic\";\n sen2.style.fontWeight = \"bold\";\n sen2.style.color = \"purple\";\n }\n else {\n sen.style.fontStyle = \"\";\n sen.style.fontWeight = \"\";\n sen.style.color = \"\";\n sen2.style.fontStyle = \"\";\n sen2.style.fontWeight = \"\";\n sen2.style.color = \"\";\n }\n clicked2 = !clicked2;\n}", "function changeText() {\n var sen = document.getElementById(\"changeMe\");\n sen.style.fontStyle = \"italic\";\n sen.style.fontWeight = \"bold\";\n sen.style.color = \"blue\";\n var sen2 = document.getElementById(\"changeMe2\");\n sen2.style.fontStyle = \"italic\";\n sen2.style.fontWeight = \"bold\";\n sen2.style.color = \"blue\";\n}", "function requestPrimaryTextAndMakeBold() {\n\t// 2.2.3.1 Request the Primary Text\n\tRM.Data.getAttributes(currentArtifact, RM.Data.Attributes.PRIMARY_TEXT, makeShallBold);\n}", "function updateStats() {\n $(\"#fighterhealth\").text(\"HP:\\xa0\" + fighterHP);\n $(\"#defenderhealth\").text(\"HP:\\xa0\" + defenderHP);\n }", "function UpdateText(ref, newText){\n // Default vals\n noStroke(0); fill(255); textSize(20); textAlign(LEFT);\n \n switch(ref){\n case (0): { text(newText, 500, 25); break;}\n case (2): { text(newText, 200, 25); break;}\n case (3): {textAlign(CENTER); text(newText, width/2, 640); break;}\n }\n\n }", "function TextData() { }", "function TextData() { }", "displayText(combatStage, index) {\n let paragraph = this.state.paragraph; \n let lines = this.state.lines;\n lines++;\n this.howManylines++;\n let key = \"line\"+this.howManylines;\n let string = \"\";\n let verbAgreement = \"\";\n\n if (lines > 5) {\n // scrollText() or\n paragraph.shift();\n lines--;\n }\n paragraph.push(<p></p>)\n \n switch(combatStage) {\n case \"start\": \n let subject = this.state.playerPhase ? \"You\" : \"The bandit\";\n verbAgreement = this.state.playerPhase ? \"\" : \"s\";\n string = `${subject} attack${verbAgreement}!`;\n break;\n case \"damage\":\n let verb = this.state.playerPhase ? \"inflicted\" : \"received\";\n let damage = this.state.playerPhase ? \n (this.state.player.attack - map[this.state.bandits[index].map[0]-1][this.state.bandits[index].map[1]-1].defense) : \n (this.state.bandits[index].attack - map[this.state.playerMap[0]-1][this.state.playerMap[1]-1].defense);\n string = `You ${verb} ${damage} damage!`;\n if (this.targetVillager) { string = `She receives ${damage} damage!`}\n break;\n case \"dead\":\n let target = this.state.playerPhase ? \"The bandit\" : \"You\";\n verbAgreement = this.state.playerPhase ? \"has\" : \"have\";\n let gameOver = this.state.playerPhase ? \"\" : \" Game over.\"\n string = `${target} ${verbAgreement} been defeated.${gameOver}`;\n if (this.targetVillager) { string = \"The villager has been killed.\" }\n break;\n case \"exp\":\n string = \"You have gained 10 experience.\";\n break;\n case \"next\":\n let toNext = this.expForLevel.find((element) => element >= this.state.player.exp) - this.state.player.exp;\n if (toNext === 0) {\n string = \"You have advanced to the next level.\"\n } else {\n string = `You need ${toNext} experience to advance.`;\n }\n break;\n case \"heal\":\n string = \"Your HP are restored to maximum.\"\n break;\n default:\n string = \"Something went wrong.\"\n break;\n };\n\n let t = 0;\n let framesPerTick = 2;\n const letterRoll = (timestamp) => {\n if (t <= string.length * framesPerTick) {\n if (t % framesPerTick === 0) {\n paragraph[lines-1] = <p key={key}>{string.substring(0, t/framesPerTick)}</p>;\n this.setState({ lines: lines, paragraph: paragraph });\n }\n t++;\n requestAnimationFrame(letterRoll);\n } else {\n if (combatStage === \"start\") {\n this.displayText(\"damage\", index);\n } else if (combatStage === \"dead\" && this.state.playerPhase) {\n this.displayText(\"exp\", index);\n } else if (combatStage === \"exp\") {\n this.displayText(\"next\");\n }\n }\n };\n\n requestAnimationFrame(letterRoll);\n }", "function resetText(){\n $(\".originalPrice\").html(tempTextUndsicountedPrice);\n $(\".discountedPrice\").html(tempTextDsicountedPrice);\n}", "function setDisplayText() {\n if (scoreboardCount <= scroreboardFetched) {\n footerViewLabel.setText(Alloy.Globals.PHRASES.showningPlayersTxt + ': ' + scoreboardCount + '/' + scoreboardCount + ' ');\n } else {\n footerViewLabel.setText(Alloy.Globals.PHRASES.showningPlayersTxt + ': ' + scroreboardFetched + '/' + scoreboardCount + ' ');\n }\n}", "function nonEditor(container, options) {\n\t\t\tcontainer.text(options.model[options.field]);\n\t\t}", "function nonEditor(container, options) {\n\t\t\tcontainer.text(options.model[options.field]);\n\t\t}", "function afficherTextTableau() {\r\n if(sectionTextTableau.is(\":hidden\")){\r\n if(!sectionFormulaire.is(\":hidden\")){\r\n sectionFormulaire.slideUp();\r\n }\r\n if(!divMap.is(\":hidden\")){\r\n divMap.slideUp();\r\n }\r\n sectionTextTableau.slideDown('slow');\r\n }\r\n }", "function setDragTextData(event) {\n isDragAndDropSupported = true;\n event.dataTransfer.setData(\"text\", \"pspdfkit/text:\" + event.target.innerText);\n event.dataTransfer.setDragImage &&\n event.dataTransfer.setDragImage(event.target, 0, 0);\n event.stopPropagation();\n}", "function incorrectDisplay() {\n\tcanvas = document.getElementById(\"hackCanvas\");\n\th = canvas.getContext(\"2d\");\n\th.font = \"70px courier\";\n\tif (temp.caseNum == null) {\n\t\th.fillText(\"MISSION ATTEMPTED BEFORE\", 20,190,550);\n\t} else if (temp.caseNum != null) {\n\t\th.fillText(\"INCORRECT CODE. PLEASE SEARCH DATABASE\", 20,190,550);\n\t}\n}", "function B(text, image) {\n section_text = text;\n section_image = image;\n }", "function displayNamesOnattack(){\n\t$(\"#name1\").text(fullNames[0]);\n\t$(\"#name2\").text(fullNames[1]);\n\t$(\"#name3\").text(fullNames[2]);\n\t$(\"#name4\").text(fullNames[3]);\n\t$(\"#name5\").text(fullNames[4]);\n\t$(\"#name6\").text(fullNames[5]);\n}", "function setTextContent(node, text) {\n node[0].children[0].data = text;\n}", "function doDamage(obj1, obj2) {\n for (let i = 0; i < enemies.length; i++) {\n if (obj2 == enemies[i].name) {\n if (enemies[i].health > 0) {\n enemies[i].health--\n hero.weapon.damage++;\n }\n else {\n displaySelect1();\n alert(\"You defeated \" + obj2 + \". Congrats!\")\n }\n }\n }\n}", "function update_text() {\r\n textSize(32)\r\n text(\"Score : \" + score, 0, 40); \r\n }" ]
[ "0.58480114", "0.5510582", "0.5442686", "0.5438436", "0.54304445", "0.54039335", "0.5368918", "0.51778656", "0.51649284", "0.51649284", "0.50955313", "0.50470734", "0.5015801", "0.5010383", "0.49946755", "0.49886534", "0.49717358", "0.4961141", "0.49541914", "0.4941081", "0.49245968", "0.48719326", "0.48711717", "0.48690963", "0.4867896", "0.48519194", "0.48435834", "0.48142317", "0.4793126", "0.4793126", "0.47867417", "0.47763437", "0.4775565", "0.47647935", "0.4747331", "0.4747331", "0.4738754", "0.47193015", "0.47087416", "0.47081637", "0.47009543", "0.470087", "0.4700392", "0.4697915", "0.46936965", "0.46903092", "0.4688731", "0.4685498", "0.46734664", "0.46689966", "0.46640658", "0.46553612", "0.4653722", "0.46516076", "0.46487767", "0.46446225", "0.46429005", "0.46417224", "0.46396112", "0.46333644", "0.46308726", "0.46282148", "0.46279308", "0.4621784", "0.4621784", "0.4618", "0.46131298", "0.46130124", "0.46104687", "0.46043536", "0.4600645", "0.45972556", "0.45939755", "0.45917848", "0.458919", "0.45838284", "0.45811155", "0.4579139", "0.45780545", "0.45759955", "0.45722052", "0.4570573", "0.45606765", "0.4558998", "0.455684", "0.45531487", "0.45531487", "0.454682", "0.4545404", "0.45428804", "0.4538202", "0.4538202", "0.4535004", "0.4532854", "0.45302033", "0.4529485", "0.45281327", "0.4527495", "0.4519963", "0.45193744" ]
0.67597437
0
================================================================================== =================================================================================== Sets the data for the energy table which is the third table of the data view. ====================================================================================
function setEnergyValues(dgEnergy) { var impTbl = document.getElementById("InputEnergyTable"); //impTbl.innerHTML = ""; var keys = dgEnergy.keys() var values = dgEnergy.values(); var tableData = ""; for (var i = 0; i < keys.length;i++) { if (i % 2 && i != 0) tableData = tableData + "<tr><td>"+ keys[i]+ "</td><td>" + values[i] + "</td></tr>"; else tableData = tableData + "<tr class=\"alt\"><td>"+ keys[i]+ "</td><td>" + values[i] + "</td></tr>"; }//end for $('#InputEnergyTable').html(tableData); //impTbl.innerHTML = tableData; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setData(data) {\n this.dataAgents.map((d, idx) => d.setData(data[idx]));\n this.sheet.table.render();\n }", "function setDataTbl(){\n var currentIndex = 1;\n var tablegroup = \"datagrpRestriction\";\n setTable(currentIndex, tablegroup, this.grid.getPrimaryKeysForRow(this));\t\n}", "function set_data(){\n set_global_stats(STATS.global);\n\n set_most_least_infected_table(STATS.countries);\n\n apply_data_to_table({\n id: \"infected-list\",\n stats: STATS.countries,\n random: false\n });\n\n // Infected list pagination\n acl_set_paginate();\n\n // set_country_list();\n\n update_set_view_triggers();\n update_widget_triggers();\n\n update_countup();\n\n set_view();\n}", "function setData() {\n\tvar rows = db.execute('SELECT * FROM igreja where igreja.id NOT IN (SELECT pregacao.igreja FROM igreja INNER JOIN pregacao ON igreja.id = pregacao.igreja WHERE pregacao.sermao =\"' + idSermao + '\") ');\n\tvar dataArray = [];\n\twhile (rows.isValidRow()) {\n\t\tvar vnome = rows.fieldByName('nome');\n\t\tvar vid = rows.fieldByName('id');\n\t\tdataArray.push({\n\t\t\ttitle : vnome,\n\t\t\thasCheck : false,\n\t\t\tid : vid,\n\t\t});\n\n\t\trows.next();\n\t\ttableview.setData(dataArray);\n\t};\n\tdb.close();\n}", "function updateGlobalEnergyData(data) {\n globalEnergyData['values'] = [];\n for (var idx = 0; idx < data[0]['values'].length; idx ++) {\n var energyBreakup = data.map(elm => {return elm['values'][idx]});\n globalEnergyData['values'].push(energyBreakup);\n }\n globalEnergyData['keys'] = data.map(elm => elm['text']);\n }", "function eDataDataTable(){\r\n\ttdType='3';\r\n\tvar url = 'productId.testobjectdata.attachments.list?productId='+productId+'&jtStartIndex=0&jtPageSize=10000';\r\n\tvar jsonObj = \t{\r\n\t\t\t\t\t\t\"Title\":\"EData\",\r\n\t\t\t\t\t\t\"url\":url,\r\n\t\t\t\t\t\t\"jtStartIndex\":0,\r\n\t\t\t\t\t\t\"jtPageSize\":1000,\r\n\t\t\t\t\t\t\"componentUsageTitile\":\"Test Data Plan\"\r\n\t\t\t\t\t};\r\n\tassignEDataDataTableValues(jsonObj);\r\n}", "set data(newData){\n\t\tlet _self = this;\n\t\tif(!newData){\n\t\t\tconsole.log(\"set data with undefined\");\n\t\t\treturn;\n\t\t}\n\n\t\tif(this.dtInstance) {\n\t\t\t// this._data = this.prepareData(newData);\n\t\t\tthis._data = this.sortData(newData);\n\n\t\t\tthis.$timeout(function(){\n\t\t\t\t_self.updateTable();\n\t\t\t});\n\t\t} else {\n\t\t\tthis._data = newData;\n\t\t}\n\t}", "function init () {\n data.forEach((tableData) => {\n let row = tbody.append(\"tr\");\n Object.values(tableData).forEach(value => {\n let cell = row.append(\"td\");\n cell.text(value);\n });\n })\n}", "function init() {\n // Loop through each row in table\n tableData.forEach(function(UFOReport) {\n // Use d3 to append one table row \"tr\" for each UFO object\n var row = tbody.append(\"tr\");\n\n // Use \"Object.entries\" to console.log each UFO object value\n Object.entries(UFOReport).forEach(function ([key, value]) {\n\n // Use d3 to append 1 cell per UFO report value \n var cell = row.append(\"td\");\n // Use d3 to update each cell's text with UFO object value\n cell.text(value);\n });\n });\n}", "set data(arr) {\n\t\tthis.wrapper.setData(arr);\n\t\tthis._tableData = arr;\n\t}", "function Table1(){\n // Get a reference to the table body\n var tbody = d3.select(\"tbody\");\n // Use d3 to update each cell's text with\n tableData.forEach((UFO) => {\n var row = tbody.append(\"tr\");\n Object.entries(UFO).forEach(([key, value]) => {\n // For each row, Append a cell to the row for each value in the report object\n var cell = row.append(\"td\");\n cell.text(value);\n });\n });\n}", "resetTableData() {\n this.gridData = this.defaultGridData;\n this.typesOfPlot = ['Cumulative frequency plot', 'Dot plot'];\n }", "function setData() {\t\n\t\n\tvar db = Ti.Database.install('../products.sqlite','products');\n\n\tvar rows = db.execute('SELECT DISTINCT category FROM products');\n\n\t// create the array\n\tvar dataArray = [];\n\t\t\t\n\twhile (rows.isValidRow())\n\t{\n\t dataArray.push({title:'' + rows.fieldByName('category') + '', hasChild:true, path:'../products/products.js'});\n\t rows.next();\t\n\t};\n\t\n\t// set the array to the tableView\n\ttableview.setData(dataArray);\n}", "function tableInit(my_data) {\n // Find the table\n // Use D3 to select the table\n var table = d3.select(\"#ufo-table\");\n //Remove the las tbody to avoid unwanted data\n var my_tbody = table.select('tbody');\n my_tbody.remove();\n //Create e new tbody entity to append the data\n var tbody = table.append(\"tbody\");\n // Build the table\n my_data.forEach((sighting) => {\n var row = tbody.append(\"tr\");\n Object.entries(sighting).forEach(([key, value]) => {\n var cell = row.append(\"td\");\n cell.text(value);\n });\n });\n}", "function allData() {\n tbody.html(\"\");\n tableData.forEach((report) => {\n var row = tbody.append(\"tr\");\n Object.entries(report).forEach(([key, value]) => {\n var cell = row.append(\"td\");\n cell.text(value);\n });\n });\n numberEvents.text(objectLength(tableData));\n}", "function update_table(data){\n // Update the table\n tbody.selectAll('tr').remove();\n var rows = tbody.selectAll('tr')\n .data(data)\n .enter()\n .append('tr');\n // create a cell in each row for each column\n data.forEach((Report) => {\n // // // Step 2: Use d3 to append one table row `tr` for each UFO report object\n var row = tbody.append(\"tr\");\n // // // Step 3: Use `Object.entries` to console.log each UFO report value\n Object.entries(Report).forEach(([key, value]) => {\n var cell = row.append(\"td\"); // // // Step 4: Use d3 to append 1 cell per UFO report value\n cell.text(value); // // Step 5: Use d3 to update each cell's text with\n });\n });\n }", "function init() {\n tableData.forEach((sightings) => {\n var row = tbody.append(\"tr\");\n Object.entries(sightings).forEach(([key, value]) => {\n var cell = row.append(\"td\");\n cell.text(value);\n });\n });\n}", "setData() {\r\n this.fireSlimGridEvent(\"onBeforeDataUpdate\", {});\r\n\r\n this.generateColumns();\r\n this.generateFilters();\r\n this.setOptions();\r\n\r\n this.dataView.beginUpdate();\r\n this.setDataViewData();\r\n this.dataView.endUpdate();\r\n\r\n this.fireSlimGridEvent(\"onDataViewUpdate\", {});\r\n this.fireSlimGridEvent(\"onAfterDataUpdate\", {});\r\n }", "function updateEnvironmentalTable(data) {\n $('tr.env-param-row').each(function(i) {\n var tm = '<td>' + data[i]['timestamp'] + '</td>';\n var t = '<td>' + data[i]['environmental']['temperature'].value.toFixed(2) + '</td>';\n var p = '<td>' + data[i]['environmental']['pressure'].value.toFixed(2) + '</td>';\n var h = '<td>' + data[i]['environmental']['humidity'].value.toFixed(2) + '</td>';\n $(this).append(tm);\n $(this).append(t);\n $(this).append(p);\n $(this).append(h);\n\n });\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 initTableData() {\n //get all data to local variable\n getData();\n\n if (!localDb.length) return;\n\n const fragment = document.createDocumentFragment();\n\n localDb.forEach((item) => {\n const row = createTableRow(item);\n fragment.appendChild(row);\n });\n\n tBody.appendChild(fragment);\n }", "function RefreshTable() {\n dc.events.trigger(function () {\n alldata = tableDimension.top(Infinity);\n datatable.fnClearTable();\n datatable.fnAddData(alldata);\n datatable.fnDraw();\n });\n }", "function displayData(){\r\n\t//define stuff to be displayed in table\r\n\tlet tableContents = [\r\n\t\t[\"Flow rate\", getFloat(1) + \" m³/h\"],\r\n\t\t[\"Energy Flow Rate\", getFloat(3) + \" GJ/h\"],\r\n\t\t[\"Velocity\", getFloat(5) + \" m/s\"],\r\n\t\t[\"Fluid sound speed\", getFloat(7) + \" m/s\"],\r\n\t\t[\"Positive accumulator\", getLong(9)],\r\n\t\t[\"Negative accumulator\", getLong(13)],\r\n\t\t[\"Positive energy accumulator\", getLong(17)],\r\n\t\t[\"Negative energy accumulator\", getLong(21)],\r\n\t\t[\"Net accumulator\", getLong(25)],\r\n\t\t[\"Net energy accumulator\", getLong(29)],\r\n\t\t[\"Temperature #1/inlet\", getFloat(33) + \" °C\"],\r\n\t\t[\"Temperature #2/inlet\", getFloat(35) + \" °C\"],\r\n\t\t[\"Analog input A13\", getFloat(37)],\r\n\t\t[\"Analog input A14\", getFloat(39)],\r\n\t\t[\"Analog input A15\", getFloat(41)],\r\n\t\t[\"Current input at A13\", getFloat(43) + \" mA\"],\r\n\t\t[\"Current input at A14\", getFloat(45) + \" mA\"],\r\n\t\t[\"Current input at A15\", getFloat(47) + \" mA\"],\r\n\t\t[\"PT100 resistance of inlet\", getFloat(77) + \" Ohm\"],\r\n\t\t[\"PT100 resistance of outlet\", getFloat(79) + \" Ohm\"],\r\n\t\t[\"Total travel time\", getFloat(81) + \" μs\"],\r\n\t\t[\"Delta travel time\", getFloat(83) + \" nano-seconds\"],\r\n\t\t[\"Upstream travel time\", getFloat(85) + \" μs\"],\r\n\t\t[\"Downstream travel time\", getFloat(87) + \" μs\"],\r\n\t\t[\"Output current\", getFloat(89) + \" mA\"],\r\n\t\t[\"Working step\", getInt8(92, 0)],\r\n\t\t[\"Signal quality\", getInt8(92, 1)],\r\n\t\t[\"Measured travel time / calculated travel time\", getFloat(97)],\r\n\t\t[\"Reynold's number\", getFloat(99)]\r\n\t];\r\n\t\r\n\t//clear table from old values\r\n\ttable.innerHTML = \"\";\r\n\t\r\n\t//for each array in tableContents\r\n\ttableContents.forEach(el => {\r\n\t\t//create a table row\r\n\t\tlet row = document.createElement(\"tr\");\r\n\t\t\r\n\t\t//add variable name to row\r\n\t\tlet varname = document.createElement(\"td\");\r\n\t\tvarname.innerHTML = el[0];\r\n\t\trow.appendChild(varname);\r\n\t\t\r\n\t\t//add variable value to row\r\n\t\tlet varvalue = document.createElement(\"td\");\r\n\t\tvarvalue.innerHTML = el[1];\r\n\t\trow.appendChild(varvalue);\r\n\t\t\r\n\t\t//add row to table\r\n\t\ttable.appendChild(row);\r\n\t});\r\n\t\r\n\t//display new dates\r\n\tlastServerUpdateSpan.innerHTML = serverLastUpdate;\r\n\tlastClientUpdateSpan.innerHTML = clientLastUpdate;\r\n}", "function setMaterial()\n\t{\n\t\tvar rows = auxJobGrid.getSelectionModel().getSelections();\n\t\t\t\n\t\tif (rows.length > 0) \n\t\t{\n\t\t\tvar value = material.getValue();\t\t\t\n\t\t\t\n\t\t\tvar index = material.store.find('name', value);\n\t\t\tvar record = material.store.getAt(index);\n\t\t\n\t\t\tif (record != undefined) \n\t\t\t{\n\t\t\t\trows[0].set('material_cost', record.get('cost'));\n\t\t\t\trows[0].set('material', value);\n\t\t\t\trows[0].set('days', record.get('days'));\n\t\t\t\t\n\t\t\t\tsetScheduledDate(rows[0]);\n\t\t\t}\n\t\t}\t\t\n\t}", "function populateTable(){\n // Remove previous tbody\n var tbody = d3.select(\"tbody\");\n tbody.remove();\n var table = d3.select(\"#ufo-table\");\n // Append new tbody\n table.append(\"tbody\");\n tbody = d3.select(\"tbody\");\n tableData.forEach(function(event) {\n // Append row\n var row = tbody.append(\"tr\");\n // Append columns\n Object.entries(event).forEach(function([key, value]) {\n var cell = row.append(\"td\");\n cell.text(value);\n });\n });\n}", "function dataLoad(){\n\n // Use d3 to get a reference to the table body\n var tbody = d3.select(\"tbody\");\n\n // Loop Through `data` and console.log each UFO Info report object\n tableData.forEach(UFOInfo => {\n console.log(UFOInfo);\n\n // Use d3 to append one table row `tr` for each UFO Info report object\n var row = tbody.append(\"tr\");\n\n // Use `Object entries to log each UFO Info value \n Object.entries(UFOInfo).forEach(([key,value]) =>{\n console.log(key,value);\n\n //Use d3 to append 1 cell per UFO Info(date, city, state, country, shape, duration, comment )\n var cell = row.append(\"td\");\n\n // Use d3 to update each cell's text with (date, city, state, country, shape, duration, comment )\n cell.text(value);\n });\n });\n}", "set table(arg){\n\t\tthis.isTableClear = false;\n\t\tthis.goodsTable = [];\n\t\tthis.title = arg.title;\n\t\tvar index = 0;\n\t\tfor (var i= 0; i<arg.message.length; i++){\n\t\t\tlet goodsTable = arg.message[i];\n\t\t\tvar element = [];\n\t\t\t// - Loop through each goods table\n\t\t\tlet index = null;\n\t\t\tfor (index in goodsTable){\n\t\t\t\tlet item = {\n\t\t\t\t\titemName: index,\n\t\t\t\t\titemTranslate: \"\",\n\t\t\t\t\titemValues: \"\",\n\t\t\t\t\titemDimension: \"\"\n\t\t\t\t}\n\t\t\t\t// - Item translate\n\t\t\t\titem.itemTranslate = model_globalTables.translate(index);\n\t\t\t\t// - Item value\n\t\t\t\titem.itemValues = model_globalTables.value(item.itemName,goodsTable[index]);\n\t\t\t\tif (item.itemValues==\"\")\n\t\t\t\t\titem.itemValues = goodsTable[index];\n\t\t\t\t// - Item dimension\n\t\t\t\titem.itemDimension = model_globalTables.dimension(item.itemName);\n\t\t\t\t//Insert item to the array\n\t\t\t\telement.push(item);\n\t\t\t}\n\t\t\tthis.goodsTable.push(element);\n\t\t}\n\t}", "function initializePrescriptionTable(data, updatePrescriptionCallback, success) {\n\n\n function apertureStop (cell) {\n\n // \n if (cell.getValue() == true) {\n return \"<span class=\\\"badge badge-info\\\">STOP</span>\";\n } else {\n return \"\";\n }\n }\n\n\n var updateCellProperties = function(value, data, cell, row, options, formatterParams){\n\n //value - the value of the cell\n //data - the data for the row the cell is in\n //cell - the DOM element of the cell\n //row - the DOM element of the row\n //options - the options set for this tabulator\n //formatterParams - parameters set for the column\n return \"<div></div>\"; // must return the html or jquery element of the html for the contents of the cell;\n }\n\n\n\n\n // convert to standard form \n lensTable = convertToLensTable(data); // fill in missing fields!\n\n // Tabulator \n lens.table = new Tabulator(\"#lens-table\", {\n cellEditCancelled:function(cell){ console.log(\"Edit cancelled\"); },\n cellEdited:function(cell){\n console.log(\"lens edited - update the prescription\");\n // console.log(cell);\n // cell.getRow().deselect(); \n updatedFieldCheck (cell); // check if a dependent cell was changed / updated \n updatePrescriptionCallback(cell); // other updates \n },\n data:lensTable,\n height:\"300px\",\n addRowPos:\"bottom\",\n layout:\"fitColumns\",\n selectable:true, \n movableRows:true,\n columns:[\n {rowHandle:true, formatter:\"handle\", headerSort:false, frozen:true, width:30, minWidth:30},\n //{title:\"Group\", field:\"group\", width:100, headerSort:false}, \n {title:\"Id\", field:\"id\", width:100, headerSort:false, width:50}, \n {title:\"Type\", field:\"type\", width:100, headerSort:false}, \n {title:\"Description\", field:\"description\", width:100, editor:\"input\", headerSort:false, width:200},\n {title:\"Ref. Index\", field:\"index\", width:100, mutator:Number, formatter: decimalPlaces, formatterParams:{ precision: 3, emptyVal: \"\" }, align:\"center\", editor:\"input\", headerSort:false, editable: editCheck, validator:[\"min:1.0\", \"max:5.0\"]},\n {title:\"Surf. R.\", field:\"radius\", width:100, mutator:Number, formatter: decimalPlaces, formatterParams:{ precision: 3, emptyVal: \"\" }, align:\"center\", editor:\"input\", headerSort:false, editable: editCheck},\n {title:\"Power\", field:\"power\", width:100, mutator:Number, formatter: decimalPlaces, formatterParams:{ precision: 3, emptyVal: \"\" }, align:\"center\", editor:\"input\", headerSort:false, editable: editCheck},\n {title:\"Thickness\", field:\"thickness\", width:100, mutator:Number, formatter: decimalPlaces, formatterParams:{ precision: 3, emptyVal: \"\" }, align:\"center\", editor:\"input\", headerSort:false, editable: editCheck},\n {title:\"Ap. Diameter\", field:\"aperture\", width:100, mutator:Number, formatter: decimalPlaces, formatterParams:{ precision: 3, emptyVal: \"\" }, align:\"center\", editor:\"input\", headerSort:false, editable: editCheck},\n {title:\"Stop Flag\", field:\"stop\", width:100, align:\"center\", width:100, headerSort:false, formatter:\"tickCross\", cellClick:tickToggle, formatterParams:{ allowEmpty:true, allowTruthy:true, tickElement:\"<span class=\\\"badge badge-info\\\">STOP</span>\", crossElement:\"\" }\n }],\n });\n\n\n // post loading of the table / we should check whether the prescriprion can be filled in\n\n\n\n // show it! \n // updatePrescriptionCallback ();\n\n\n /* JQuery */\n\n //Add row on \"Add Row\" button click\n $(\"#lens-table-add-row\").click(function(){\n // entry area here \n });\n\n //Delete row on \"Delete Row\" button click\n $(\"#lens-table-del-row\").click(function(){\n lens.table.deleteRow(1);\n });\n\n //Clear table on \"Empty the table\" button click\n $(\"#lens-table-clear\").click(function(){\n lens.table.clearData()\n });\n\n //Reset table contents on \"Reset the table\" button click\n $(\"#lens-table-reset\").click(function(){\n lens.table.setData(tabledata);\n });\n\n // succeesed \n success ();\n\n\n\n }", "function InitGuiData()\n{\n // 0 fill our Data Tables...note that .fill(0) function not yet supported.\n for( var i = 0; i < NR_DATA_TABLE_LENGTH; i++ )\n {\n guiNrLabels[i] = \"\";\n guiNrUnits[i] = \"\";\n guiNrSizeof[i] = 0;\n guiNr0Values[i] = 0;\n guiNr1Values[i] = 0;\n guiNr2Values[i] = 0;\n guiNr3Values[i] = 0;\n }\n\n for( var i = 0; i < NM_DATA_TABLE_LENGTH; i++ )\n {\n guiNmLabels[i] = \"\";\n guiNmUnits[i] = \"\";\n guiNmSizeof[i] = 0;\n guiNmValues[i] = 0;\n }\n\n for( var i = 0; i < CR_DATA_TABLE_LENGTH; i++ )\n {\n guiCrLabels[i] = \"\";\n guiCrUnits[i] = \"\";\n guiCrSizeof[i] = 0;\n guiC0r0Values[i] = 0;\n guiC0r1Values[i] = 0;\n guiC0r2Values[i] = 0;\n guiC0r3Values[i] = 0;\n }\n\n for( var i = 0; i < CM_DATA_TABLE_LENGTH; i++ )\n {\n guiCmLabels[i] = \"\";\n guiCmUnits[i] = \"\";\n guiCmSizeof[i] = 0;\n guiC0mValues[i] = 0;\n }\n\n\n guiNrLabels[0] = \"Band\";\n guiNrLabels[1] = \"Technology\";\n}", "function populateTable() {\n tableData.forEach(item => {\n tablerow = d3.select(\"tbody\").append(\"tr\")\n tablerow.append(\"td\").text(item.datetime)\n tablerow.append(\"td\").text(item.city)\n tablerow.append(\"td\").text(item.state)\n tablerow.append(\"td\").text(item.country)\n tablerow.append(\"td\").text(item.shape)\n tablerow.append(\"td\").text(item.durationMinutes)\n tablerow.append(\"td\").text(item.comments)\n });\n}", "function initializeData(data) {\n // TODO: Convert the properties \"income\", \"lifeExpectancy\" and \"population\" to the \"number\" type for each entry.\n data.forEach(row => {\n row.income = parseFloat(row.income);\n row.lifeExpectancy = parseFloat(row.lifeExpectancy);\n row.population = parseInt(row.population);\n });\n}", "function dataTable(table){\n // Reset table\n tbody.text(\"\");\n\n // Populate table\n table.forEach(function(incident) {\n // console.log(incident);\n var row = tbody.append(\"tr\");\n Object.entries(incident).forEach(function([key, value]) {\n // console.log(key, value);\n var cell = row.append(\"td\");\n cell.text(value);\n });\n});\n}", "function Detailtableone(){\r\ntableone = anychart.standalones.table(10,3 );\r\ntableone.cellBorder(null);\r\ntableone.getCol(0).width('33.33%');\r\ntableone.getCol(1).width('33.33%');\r\ntableone.getCol(2).width('33.33%');\r\ntableone.getRow(0).height('10%');\r\ntableone.getRow(1).height('10%');\r\ntableone.getRow(2).height('10%');\r\ntableone.getRow(3).height('10%');\r\ntableone.getRow(4).height('10%');\r\ntableone.getRow(5).height('10%');\r\ntableone.getRow(6).height('10%');\r\ntableone.getRow(7).height('10%');\r\ntableone.getRow(8).height('10%');\r\ntableone.getRow(9).height('10%');\r\n\r\n\r\n\r\ntableone.getCell(0, 0).colSpan(3).content('Available Site')\r\n.fontSize(8);\r\ntableone.getCell(1, 1).content('Area of site')\r\n.fontSize(8);\r\ntableone.getCell(2, 1).content('Distance from pipe')\r\n.fontSize(7);\r\ntableone.getCell(3, 1).content('Distance from center')\r\n.fontSize(6);\r\ntableone.getCell(4, 1).content('Area of site')\r\n.fontSize(8);\r\ntableone.getCell(5, 1).content('Distance from pipe')\r\n.fontSize(7);\r\ntableone.getCell(6, 1).content('Distance from center')\r\n.fontSize(6);\r\ntableone.getCell(7, 1).content('Area of site')\r\n.fontSize(8);\r\ntableone.getCell(8, 1).content('Distance from pipe')\r\n.fontSize(7);\r\ntableone.getCell(9, 1).content('Distance from center')\r\n.fontSize(6);\r\ntableone.getCell(1, 2).content(sitea_areasite);\r\ntableone.getCell(2, 2).content(sitea_road);\r\ntableone.getCell(3, 2).content(sitea_center);\r\ntableone.getCell(4, 2).content(siteb_areasite);\r\ntableone.getCell(5, 2).content(siteb_road);\r\ntableone.getCell(6, 2).content(siteb_center);\r\ntableone.getCell(7, 2).content(sitec_areasite);\r\ntableone.getCell(8, 2).content(sitec_road);\r\ntableone.getCell(9, 2).content(sitec_center);\r\ntableone.getCell(1, 0).rowSpan(3).content('Site A')\r\n.fontSize(8);\r\ntableone.getCell(4, 0).rowSpan(3).content('Site B')\r\n.fontSize(8);\r\ntableone.getCell(7, 0).rowSpan(3).content('Site C')\r\n.fontSize(8);\r\n\r\ntableone.getRow(0) \r\n.cellFill(\"#37474f\");\r\ntableone.getRow(1) \r\n.cellFill(\"#37474f\"); \r\ntableone.getRow(2) \r\n.cellFill(\"#37474f\");\r\ntableone.getRow(3) \r\n.cellFill(\"#37474f\"); \r\ntableone.getRow(4) \r\n.cellFill(\"#37474f\");\r\ntableone.getRow(5) \r\n.cellFill(\"#37474f\");\r\ntableone.getRow(6) \r\n.cellFill(\"#37474f\");\r\ntableone.getRow(7) \r\n.cellFill(\"#37474f\"); \r\ntableone.getRow(8) \r\n.cellFill(\"#37474f\"); \r\ntableone.getRow(9) \r\n.cellFill(\"#37474f\"); \r\n\r\ntableone.cellBorder(\"#b0bec5\").hAlign(\"center\").vAlign(\"middle\");\r\n\ttableone.cellPadding(0) \r\n\t .fontWeight(90) \r\n\t .fontSize(16) \r\n\t .fontColor('#b0bec5'); \r\n\r\ntableone.draw();\r\nreturn tableone\r\n}", "function generateTableThree(tableThree, data) {\n for (let element of data) {\n let row = tableThree.insertRow();\n for (key in element) {\n let cell = row.insertCell();\n let text = document.createTextNode(element[key]);\n cell.appendChild(text);\n }\n }\n}", "function UFOData(data) {\n\t\n\t\t// Step 0: Clear any existing table/data\n\t\ttbody.html(\"\");\n\t\n\t\t// Step 1: Loop through Data and console.log each object\n\t\tdata.forEach((datarow) => {\n\t\t//console.log(UFOData);\n\t\n\t\t// Step 2: Use d3 to append table row element for each UFOData object (rows still empty)\n\t\t\tvar row = tbody.append(\"tr\");\n\t\n\t\t// Step 3: Use object.entries to console.log each UFOData value\n\t\t\tObject.entries(datarow).forEach(function([key, value]) {\n\t\t//console.log(key, value);\n\t\n\t\t// Step 4: Use d3 to append each cell per UFOData value (date, city, state, country, shape, duration, comments)\n\t\t\tvar cell = row.append(\"td\");\n\t\n\t\t// Step 5: Use d3 to input data into each table cell per UFOData values (in parentheses above)\n\t\t\tcell.text(value);\n\t\t\t});\n\t\t});\n\t\t}", "function init(){ \n data.forEach((rowData) => {\n var row = tbody.append(\"tr\");\n Object.entries(rowData).forEach(([key, value]) => {\n var cell = row.append(\"td\");\n cell.text(value);\n });\n });\n}", "_setTable() {\r\n\r\n\r\n }", "function TableData(name, description, value, unit) {\n var self = this;\n self.name = name;\n self.description = description;\n self.value = value;\n self.unit = unit;\n self.onOff = \"null\";\n}", "function update(){\n d3.event.preventDefault(); \n var filterData = newTableData.filter(date => date.datetime === inputValue);\n //Loop through data and console log each data object \nfilterData.forEach(function(sighting){\n //console.log(sighting);\n newtbody=d3.select('#ufo-table')\n var newrow = newtbody.append('tr');\n//This stores the sightings as objects and then displays the new object as a keys and values dictionary.\n Object.entries(sighting).forEach(function([key,value]) {\n console.log (key,value);\n \n//Append one table row for each element\n var newcell = newrow.append('td');\n newcell.text(value);\n});\n});\n}", "function gotData_3(data) {\n\n remove_Table_3();\n createTable_3();\n\n table = document.getElementById('lampOUT');\n\n let array = new Array();\n\n var lamps = data.val();\n var keys = Object.keys(lamps);\n\n for (var i = 0; i < keys.length; i++) {\n var k = keys[i];\n\n array[0] = lamps[k].date;\n array[1] = lamps[k].lampID;\n array[2] = lamps[k].lampName;\n array[3] = lamps[k].fixture;\n array[4] = lamps[k].qty;\n array[5] = lamps[k].pers;\n array[6] = lamps[k].location;\n array[7] = lamps[k].notes1;\n array[8] = lamps[k].notes2;\n\n // create a new row\n var newRow = table.insertRow(i + 1);\n\n for (var j = 0; j < 9; j++) {\n\n // create a new cell\n var cell = newRow.insertCell(j);\n\n // add value to the cell\n cell.innerHTML = array[j];\n }\n }\n // Hide first column of the table (with database keys)\n // for (var i = 0; i <= keys.length; i++) {\n // table.rows[i].cells[0].style.display = 'none';\n // }\n for (var i = 1; i <= keys.length; i++) {\n table.rows[i].cells[2].id = 'colName';\n table.rows[i].cells[3].id = 'colFxt';\n table.rows[i].cells[4].id = 'colQty';\n }\n let testMode = document.getElementsByName('test/real');\n if (testMode[0].checked) {\n table.classList.add('borderColorGrey');\n } else {\n table.classList.add('borderColorRed');\n }\n}", "function InitTable() {\n if (!Exists(fileData)) { return; }\n tableData = [];\n tableCollumns = [];\t\n\t\n //get collums\n var keys = Object.keys(fileData[0]);\n keys.forEach(function (k) {\n if (!$.isArray(fileData[0][k])) {\n tableCollumns.push({ title: k });\n for (var j = 0; j < fileData.length; j++) {\n if (tableData.length == j) { tableData.push([]); }\n if (!Exists(fileData[j][k])) {\n fileData[j][k] = \"-\";\n }\n tableData[j].push(fileData[j][k])\n }\n\n }\n }, this);\n Reorder(\"filename\", \"name\");\n\n //do some horrible hack to copy\n selectedTableDataSource = JSON.parse(JSON.stringify(tableData));\n selectedTableCollumns = JSON.parse(JSON.stringify(tableCollumns));\n \n //create the selected table\n selectedDataTable = selectedTable.DataTable({\n data: selectedTableData,\n scrollX: true,\n paging: false,\n searching: false,\n columns: selectedTableCollumns,\n fnRowCallback: function (nRow, aData, iDisplayIndex, iDisplayIndexFull) {\n console.log(aData);\n $('td', nRow).css(\"background\", 'linear-gradient(rgba(0,0,0,0),' + d3ColourToCss(d3.rgb(c10(Find(selectedTableData, aData[1], 1))), 0.5) + ')');\n }\n });\n\n //add in the select collumn\n for (var i = 0; i < tableData.length; i++) {\n tableData[i].unshift(\"\");\n }\n tableCollumns.unshift({ title: \"Select\" });\n\n table.html(\"\");\n dTable = table.DataTable({\n fnRowCallback: function (nRow, aData, iDisplayIndex, iDisplayIndexFull) {\n if (inChart.length > 0) {\n if (DataParser.MatchingEvents(inChart[0], fileData[iDisplayIndexFull])) {\n $('td', nRow).removeClass('redbg');\n $('td', nRow).prop('disabled', false);\n } else {\n $('td', nRow).addClass('redbg');\n $('td', nRow).prop('disabled', true);\n }\n } else {\n $('td', nRow).removeClass('redbg');\n $('td', nRow).prop('disabled', false);\n }\n },\n data: tableData,\n //scrollX: true,\n // scrollY: \"500px\",\n // scrollCollapse: true,\n columns: tableCollumns,\n select: {\n style: 'multi',\n selector: 'td:first-child'\n },\n order: [[3, 'desc']],\n columnDefs: [\n {\n orderable: false,\n className: 'select-checkbox',\n targets: 0\n },\n {\n \"targets\": [1],\n \"width\": \"10px\"\n },\n {\n \"targets\": [4, 5, 6, 7, 8, 9, 10, 11],\n \"visible\": false,\n },\n ]\n });\n dTable\n .on('select', function (e, dt, type, indexes) {\n AddToChart(indexes[0]);\n })\n .on('deselect', function (e, dt, type, indexes) {\n RemoveFromChart(indexes[0]);\n });\n}", "function showData(m) {\n try {\n let html = 'accel';\n html += '<table><tr><td>' + m.accel.x.toFixed(3) + '</td><td>' + m.accel.y.toFixed(3) + '</td><td>' + m.accel.z.toFixed(3) + '</tr></table>';\n html += '</table>';\n\n html += 'rot';\n html += '<table><tr><td>' + m.rot.alpha.toFixed(3) + '</td><td>' + m.rot.beta.toFixed(3) + '</td><td>' + m.rot.gamma.toFixed(3) + '</tr></table>';\n\n html += 'rotMotion';\n html += '<table><tr><td>' + m.rotMotion.alpha.toFixed(3) + '</td><td>' + m.rotMotion.beta.toFixed(3) + '</td><td>' + m.rotMotion.gamma.toFixed(3) + '</tr></table>';\n\n html += 'accelGrav';\n html += '<table><tr><td>' + m.accelGrav.x.toFixed(3) + '</td><td>' + m.accelGrav.y.toFixed(3) + '</td><td>' + m.accelGrav.z.toFixed(3) + '</tr></table>';\n html += '</table>';\n document.getElementById('last').innerHTML = html;\n } catch (err) {\n logError(err);\n }\n}", "function renderTable(fx) {\n\n\n //Populate table body\n d3.json(url).then(function(response) {\n console.log(response); \n // var name = response.instrument;\n // // console.log(name); \n // var closeMid = [];\n // var highMid = [];\n // var lowMid = [];\n // var openMid = [];\n // var time = [];\n \n // for (var i=0; i<response.candles.length; i++){\n // // console.log(response.candles[i]);\n // closeMid.push(response.candles[i].closeMid);\n // highMid.push(response.candles[i].highMid);\n // lowMid.push(response.candles[i].lowMid);\n // openMid.push(response.candles[i].openMid);\n // time.push(response.candles[i].time.substring(0,10));\n // // console.log(time);\n // };\n\n var tbody = d3.select(\"tbody\");\n\n \n tbody.html(\"\"); \n\n // Iterate through each fileteredData and pend to table\n // filteredData.forEach(sighting => {\n \n // var tbl_col = Object.keys(sighting);\n\n // // console.log(tbl_col);\n\n // var row = tbody.append(\"tr\");\n\n // tbl_col.forEach(s_info => {\n // row.append(\"td\").text(sighting[s_info]); \n // // console.log(sighting);\n // // console.log(tbl_col);\n // // console.log(s_info);\n // }); \n // });\n\n for (var r=0; r<10; r++){\n\n var tbl_col = [\"data\", \"open\", \"high\", \"low\",\"close\"];\n\n var row = tbody.append(\"tr\");\n \n row.append(\"td\").text(response.candles[r].time.substring(0,10));\n row.append(\"td\").text(response.candles[r].openMid);\n row.append(\"td\").text(response.candles[r].highMid);\n row.append(\"td\").text(response.candles[r].lowMid);\n row.append(\"td\").text(response.candles[r].closeMid);\n\n // for (var c=0; c<tbl_col.length; c++){\n // row.append(\"td\").text(response.candles[r].time.substring(0,10));\n // row.append(\"td\").text(response.candles[r].openMid);\n // row.append(\"td\").text(response.candles[r].highMid);\n // row.append(\"td\").text(response.candles[r].lowMid);\n // row.append(\"td\").text(response.candles[r].closeMid);\n // console.log(response.candles[r].closeMid);\n // };\n\n console.log(response.candles[r]);\n \n // console.log(time);\n };\n\n\n }); \n\n\n// }); \n}", "function theQwertyGrid_reFillTable(data) {\n\t\t\ttheQwertyGrid_clearAllRows();\n\t\t\ttheQwertyGrid_addRows(data, _theQwertyGrid_tableProps);\n\t\t}", "function initData() {\n initLtr_factor();\n initBosunit();\n initHero();\n initSelect25();\n initMS();\n}", "function setData() {\n var chart = this;\n //sort chart data if there is a sort type and label in the _vars\n if (chart._vars.sortType) {\n if (chart._vars.sortLabel && chart._vars.sortType !== 'default') {\n chart.organizeChartData(chart._vars.sortLabel, chart._vars.sortType);\n }\n }\n\n //remove if we add non linear to area chart\n chart._vars.lineCurveType = 'Linear';\n\n chart.data.legendData = setBarLineLegendData(chart.data);\n chart.data.xAxisData = chart.setAxisData('x', chart.data);\n chart.data.yAxisData = chart.setAxisData('y', chart.data);\n\n if (chart._vars.seriesFlipped) {\n chart.setFlippedSeries(chart.data.dataTableKeys);\n chart.flippedData.color = jvCharts.setChartColors(chart._vars.color, chart.flippedData.legendData, chart.colors);\n }\n\n //define color object for chartData\n chart.data.color = jvCharts.setChartColors(chart._vars.color, chart.data.legendData, chart.colors);\n}", "function gotData_1(data) {\n\n remove_Table_1();\n createTable_1();\n\n table = document.getElementById('lampStore');\n\n let array = new Array();\n\n var lamps = data.val();\n var keys = Object.keys(lamps);\n\n for (var i = 0; i < keys.length; i++) {\n var k = keys[i];\n\n array[0] = k;\n array[1] = lamps[k].lampID;\n array[2] = lamps[k].lampName;\n array[3] = lamps[k].partNumber;\n array[4] = lamps[k].fixture;\n array[5] = lamps[k].lifeTime;\n array[6] = lamps[k].power;\n array[7] = lamps[k].qty;\n array[8] = lamps[k].location;\n\n // create a new row\n var newRow = table.insertRow(i + 1);\n\n for (var j = 0; j < 9; j++) {\n\n // create a new cell\n var cell = newRow.insertCell(j);\n\n // add value to the cell\n cell.innerHTML = array[j];\n }\n }\n // Hide first column of the table (with database keys)\n for (var i = 0; i <= keys.length; i++) {\n table.rows[i].cells[0].style.display = 'none';\n }\n for (var i = 1; i <= keys.length; i++) {\n table.rows[i].cells[2].id = 'colName';\n table.rows[i].cells[4].id = 'colFxt';\n table.rows[i].cells[7].id = 'colQty';\n }\n let testMode = document.getElementsByName('test/real');\n if (testMode[0].checked) {\n table.classList.add('borderColorGrey');\n } else {\n table.classList.add('borderColorRed');\n }\n}", "function setData(id, value, x, y, z) {\n envelope[id] = {freq: parseFloat(value), x:x, y:y, z: parseInt(z)};\n}", "function show(data)\n {\n let td = data['data']['current']['weather'];\n let newData = [td.ts, td.tp, td.pr, td.hu, td.ws, td.wd];\n\n let tableRef = document.getElementById('environment');\n let newRow = tableRef.insertRow(1);\n\n for (let step = 0; step < 6; step++)\n {\n let newCell = newRow.insertCell(step);\n let newText = document.createTextNode(newData[step]);\n newCell.appendChild(newText);\n }\n }", "function default_table(){\n tableData.forEach((sightings) => {\n var record = tbody.append(\"tr\");\n Object.entries(sightings).forEach(([key, value]) => {\n var data_value = record.append(\"td\");\n data_value.text(value);\n });\n });\n}", "function cityEmpDt() {\n let cityEmpArr = houseDataTable();\n cityEmpArr.forEach(element => {\n let dataArr = Object.values(element);\n dataTable.rows().add(dataArr);\n });\n}", "function new_table(filteredufo) {\n d3.select(\"tbody\").remove();\n d3.select(\"#ufo-table\").append(\"tbody\");\n var tbody = d3.select(\"#ufo-table\").select(\"tbody\");\n // tbody.text(\"\");\n filteredufo.forEach(function(ufo) {\n var row = tbody.append(\"tr\")\n\trow.append(\"td\").text(ufo.datetime)\n\trow.append(\"td\").text(ufo.city)\n\trow.append(\"td\").text(ufo.state)\n\trow.append(\"td\").text(ufo.country)\n\trow.append(\"td\").text(ufo.shape)\n\trow.append(\"td\").text(ufo.durationMinutes)\n\trow.append(\"td\").text(ufo.comments)\n})\n}", "function applyViewData(newview) {\n\t\t\t$scope.view = newview.data;\n\t\t\t\n\t\t\t$scope.viewmap.dataTable.addColumn(\"string\", \"Field\");\n\t\t\t$scope.viewmap.dataTable.addColumn(\"number\", \"TotalCount\");\t\t\t\n\t\t\t$scope.viewmap.dataTable.addRows([[ \"Total Questions\", $scope.view.totalQuestions],\n\t\t\t\t\t\t\t\t\t\t\t [ \"Total Views\", $scope.view.totalViews]\n\t\t\t ]);\n\t\t\t$scope.viewmap.title = \"Total Views Barchart\";\n\t\t\t\n\t\t}", "function updateTableEvent(eventIdx) {\n $scope.currentEvent = $scope.currentEvents[eventIdx];\n $scope.currentEventIdx = eventIdx;\n $scope.tables = [];\n\n // add a summary table when there's no filter is selected\n for (i = 1; i <= eventIdx; i++) {\n summaryTable = [];\n summaryTable.push($scope.totalRows[i - 1]);\n $scope.tables.push(summaryTable);\n }\n\n // add default compare unit \n $scope.compareUnit = $scope.currentEvent.compare_properties[0];\n $scope.$apply(); // for ng-show working properly\n }", "function fillUpTable() {\r\n\tgetInstantValues();\r\n}", "function getdata() {\n d3.select(\"tbody\").html(\"\");\n d3.event.preventDefault();\n\n var dateTime = d3.select(\"#datetime\").property(\"value\");\n var selectCity = d3.select(\"#city\").property(\"value\");\n var selectState = d3.select(\"#state\").property(\"value\");\n var selectCountry = d3.select(\"#country\").property(\"value\");\n var selectShape = d3.select(\"#shape\").property(\"value\");\n\n // initialize tableData as filteredData\n filteredData = tableData;\n\n if (dateTime) {\n filteredData = filteredData.filter(record => record.datetime === dateTime);}\n\n if (selectCity) {\n filteredData = filteredData.filter(record => record.city === selectCity);}\n\n if (selectState) {\n filteredData = filteredData.filter(record => record.state === selectState);}\n\n if (selectCountry) {\n filteredData = filteredData.filter(record => record.country === selectCountry);}\n\n if (selectShape) {\n filteredData = filteredData.filter(record => record.shape === selectShape);}\n\n\n // Display the filtered dataset\n filteredData.forEach((ufoSightings) => {\n console.log(ufoSightings);\n\n var row = tbody.append('tr');\n\n Object.entries(ufoSightings).forEach(([key, value]) => {\n console.log(key, value);\n var cell = row.append('td');\n cell.text(value);\n });\n });\n}", "function changeTable2() {\n \n }", "populate_table(measurements) {\n // measurements is an obj, not an array\n Object.entries(measurements).forEach(([key, value]) => {\n this.add_measurement_column(value);\n });\n }", "function update_details(data, $table) {\n $table.api().clear().draw();\n $table.api().rows.add(data);\n $table.api().columns.adjust().draw();\n}", "function updateData() {\n $.getJSON(window.location + 'data', {\n measure: _store.measure,\n dag: _store.dag,\n id: _store.id\n }, function (data) {\n var array = [];\n for (var key in data) {\n array.push({ value: data[key].value, date: new Date(data[key].ds) });\n }\n _store.data = array;\n _store.updating = false;\n DetailViewStore.emit(DATA_UPDATE_EVENT);\n });\n}", "function addDataToIndex(data){\n\t\t\t\t\t\tif ($scope.mmShowType) {\n\t\t\t\t\t\t\tcreateIndexWithType(data);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcreateIndex(data);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcreateTypedModel();\n\t\t\t\t\t\tif(!$scope.mmModel.fullObjects){\n\t\t\t\t\t\t\t$scope.mmModel.fullObjects = {};\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "function initializeData() {\n\t//Records data endpoints for user\n var startDate = subset[0].date;\n outputData.startDate = startDate;\n\n var endDate = subset[subset.length-1].date;\n outputData.endDate = endDate;\n\n var startClose = subset[0].close;\n outputData.startClose = startClose;\n\n var endClose = subset[subset.length-1].close;\n outputData.endClose = endClose;\n\n var monthNames = [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\",\n \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"];\n \n datesText = \"Above is the performance of the S&P 500 from the week of \" + monthNames[startDate.getMonth()] + \" \" + \n startDate.getDate() + \", \" + startDate.getFullYear() + \" to the week of \" + monthNames[endDate.getMonth()] + \n \" \" + endDate.getDate() + \", \" + endDate.getFullYear() + \".\";\n\n //Adds properties to data\n subset = enhanceData(subset);\n\n //Sets global variables\n currentPrice = startClose;\n marketCurrentShares = marketCurrentValue / currentPrice;\n if (inMarketDefault) {\n \tuserCurrentShares = marketCurrentShares;\n \tlastTradeDate = startDate;\n \tlastTradeWeek = 0;\n \tlastTradePrice = startClose;\n \ttotalTrades++;\n }\n}", "function ufoTable(ufoData) {\n // empty contents if any\n tbody.html('')\n // loop through\n ufoData.forEach((ufoSighting) => {\n //append rows day3 activity 2\n let newRow = tbody.append(\"tr\");\n //iterate through data.js values\n Object.entries(ufoSighting).forEach(([, value]) => {\n //append new cells for the values day3 activity 3\n let newCell = newRow.append(\"td\");\n newCell.text(value);\n });\n });\n}", "function renderTable() {\n\n var tbody = d3.select(\"tbody\");\n \n tbody.html(\"\"); \n\n // Iterate through each fileteredData and pend to table\n filteredData.forEach(sighting => {\n \n var tbl_col = Object.keys(sighting);\n\n // console.log(tbl_col);\n\n var row = tbody.append(\"tr\");\n\n tbl_col.forEach(s_info => {\n row.append(\"td\").text(sighting[s_info]); \n // console.log(sighting);\n // console.log(tbl_col);\n // console.log(s_info);\n }); \n });\n}", "function Analytics(reference, data){\n // console.log(data.a);\n // var width = $(reference).width();\n // var margin = {top:10, right:10, bottom: 40, left:40};\n // var height = 270 - margin.top - margin.bottom;\n // var svg = d3.select(\"#Analytics\")\n // .append(\"svg\")\n // .attr(\"width\", width);\n // console.log(\"Data is loaded in Analytics()\");\n // console.log(width);\n // console.log(height);\n\n // var data_cols = data.col;\n var fake_data = [data.key];\n // fake_data = [data.key];\n // dummy values\n var fake_data_split = fake_data[0];\n fake_data_split = fake_data_split.match(/\\w+([.*a-z0-9\\-0-9+])*(\\[.*?\\])?/g);\n\n console.log(fake_data_split)\n\n fake_data_split = fake_data_split.slice(0,fake_data_split.length-2);\n const matrica = []\n\n for (i=0;i< (fake_data_split.length);i+=2){\n\n matrica.push([fake_data_split[i], fake_data_split[i+1]]);\n\n }\n console.log(matrica)\n\n var table = d3.select(\"#Analytics\")\n .append('table')\n .selectAll('tr')\n .data(matrica);\n\n //table.setAttribute('class', 'result_table');\n\n table.enter().append('tr')\n .selectAll('td')\n .data(d => d)\n .enter()\n .append('td')\n .text(d => d);\n\n\n table.exit()\n .remove();\n\n jQuery(\"tr\").addClass(\"result_table\");\n\n var cells = table.selectAll('td')\n .data(function (d) {return d;})\n .text(function (d) {return d;});\n\n cells.enter()\n .append(\"td\")\n .text(function(d) { return d; });\n\n cells.exit().remove();\n\nvar width = $(reference).width();\n var margin = {top:10, right:10, bottom: 10, left:10};\n var height = 370 - margin.top - margin.bottom;\n var svg2 = d3.select(\"#Analytics\")\n .append(\"svg\")\n .attr(\"width\", 300)\n .attr(\"height\", 20)\n .attr(\"x\", 200)\n .attr(\"y\", 100)\n .attr(\"class\", \"result_table\");\n\n var words = 'These are the coefficients for the variable you selected'\n\n svg2.append('text')\n .style('text-anchor', 'middle')\n .text(words)\n .attr(\"transform\", function(d) { return \"translate(135,10)\";});\n }", "function gotData_2(data) {\n\n remove_Table_2();\n createTable_2();\n\n table = document.getElementById('lampIN');\n\n let array = new Array();\n\n var lamps = data.val();\n var keys = Object.keys(lamps);\n\n for (var i = 0; i < keys.length; i++) {\n var k = keys[i];\n\n array[0] = lamps[k].date;\n array[1] = lamps[k].lampID;\n array[2] = lamps[k].lampName;\n array[3] = lamps[k].fixture;\n array[4] = lamps[k].qty;\n array[5] = lamps[k].pers;\n array[6] = lamps[k].location;\n array[7] = lamps[k].notes;\n\n // create a new row\n var newRow = table.insertRow(i + 1);\n\n for (var j = 0; j < 8; j++) {\n\n // create a new cell\n var cell = newRow.insertCell(j);\n\n // add value to the cell\n cell.innerHTML = array[j];\n }\n }\n // Hide first column of the table (with database keys)\n // for (var i = 0; i <= keys.length; i++) {\n // table.rows[i].cells[0].style.display = 'none';\n // }\n for (var i = 1; i <= keys.length; i++) {\n table.rows[i].cells[2].id = 'colName';\n table.rows[i].cells[3].id = 'colFxt';\n table.rows[i].cells[4].id = 'colQty';\n }\n let testMode = document.getElementsByName('test/real');\n if (testMode[0].checked) {\n table.classList.add('borderColorGrey');\n } else {\n table.classList.add('borderColorRed');\n }\n}", "function renderData() {\n tableBody.innerHTML = \"\";\n for (var i = 0; i < tableData.length; i++) {\n var data = tableData[i];\n var rows = Object.keys(data);\n var input = tableBody.insertRow(i);\n for (var j = 0; j < rows.length; j++) {\n var field = rows[j];\n var cell = input.insertCell(j);\n cell.innerText = data[field];\n }\n }\n}", "function setData() {\r\n // Uzmemo trenutni grad iz niza\r\n const city = cityNames[currentCity];\r\n\r\n // Dohvatimo podatke za trenutni grad.\r\n getTemperatureDataForCity(city).then(({ temp, temp_max, temp_min }) => {\r\n // Upisemo podatke u html.\r\n document.getElementById('city').innerHTML = `${city}`;\r\n document.getElementById('currentTemp').innerHTML = `${temp} celzijusa`;\r\n document.getElementById('minTemp').innerHTML = `${temp_min} celzijusa`;\r\n document.getElementById('maxTemp').innerHTML = `${temp_max} celzijusa`;\r\n });\r\n\r\n // Uvecava indeks trenutnog grada. Vraca na 0 kada dodje do kraja.\r\n currentCity = (currentCity + 1) % cityNames.length;\r\n}", "function setDataDisplay() {\n var display = createElement(\"table\", {\n id: \"data_display\",\n className: \"display\",\n style: {\n width: (gamescreen.right + 14) + \"px\"\n }}),\n elems = [\"score\", \"coins\", \"world\", \"time\", \"lives\"];\n body.appendChild(display);\n data.display = display;\n for(var i in elems) {\n display.appendChild(data[elems[i]].element);\n updateDataElement(data[elems[i]]);\n }\n body.appendChild(data.display);\n}", "setDataViewData() {\r\n if (!this.dataView) return;\r\n\r\n this.dataView.setItems(this.data, this.pk);\r\n }", "function displayData(allData){ \n tbody.text(\"\")\n allData.forEach(function(ufoSighting){\n newTr = tbody.append(\"tr\")\n Object.entries(ufoSighting).forEach(function([key, value]){\n newTd = newTr.append(\"td\").text(value)\t\n })\n})}", "function populateLanguageTable(data) \n{\n for( i = 0; i < data.length; i++ )\n {\n $('#languagesTable tr:last').after('<tr><td>' + data[i].LANGUAGE + '</td><td>' + data[i].LEVEL + '</td><td>' + data[i].AVERAGE_SOURCE_STATEMENTS_PER_FUNCTION_POINT + '</td></tr>');\n }\n}", "function initTable(meta_id, ethnicity, gender, age, location, bbtype, wfreq) {\n var table = d3.select(\"#sample-metadata\");\n table.append(\"tbody\").text(\"ID: \" + meta_id[0]);\n table.append(\"tbody\").text(\"Ethnicity: \" + ethnicity[0]);\n table.append(\"tbody\").text(\"Gender: \" + gender[0]);\n table.append(\"tbody\").text(\"Age: \" + age[0]);\n table.append(\"tbody\").text(\"Location: \" + location[0]);\n table.append(\"tbody\").text(\"bbtype: \" + bbtype[0]);\n table.append(\"tbody\").text(\"wfreq: \" + wfreq[0])\n }", "function resetTable() {\n\n // clear the current data\n clearTable();\n \n // use forEach and Object.values to populate the initial table\n tableData.forEach((ufoSighting) => {\n var row = tbody.append(\"tr\");\n Object.values(ufoSighting).forEach(value => {\n var cell = row.append(\"td\");\n cell.text(value);\n cell.attr(\"class\", \"table-style\");\n }); // close second forEach\n }); // close first forEach\n}", "function alienData(tableData) {\n\n // Clear text from tbody\n tbody.text(\"\")\n\n // Loop through table data and log each alien sighting\n data.forEach((alienSighting) => {\n\n // append a row for each alien sighting\n var row = tbody.append(\"tr\");\n\n // use object entries to console log each alien sighting\n Object.entries(alienSighting).forEach(([key, value]) => {\n // console.log(key, value);\n\n // Append cells per alien sighting (Date, City, State, Country, Shape, Duration, Comments)\n var cell = tbody.append(\"td\");\n\n // Update each cells text with alien sighting info\n cell.text(value);\n });\n });\n}", "function Detailtable(){\r\n\t\t// create table\r\n\ttable = anychart.standalones.table(3,3);\r\n\t\r\n\t // settings for the first column\r\n\ttable.getRow(0)\r\n .height(63.33) // set column width\r\n .cellFill(\"#37474f\") // set column background color\r\n\t\r\n\ttable.getRow(1)\r\n .height(63.33) // set column width\r\n .cellFill(\"#37474f\") \r\n\t\r\n\ttable.getRow(2)\r\n .height(63.33) // set column width\r\n .cellFill(\"#37474f\") \r\n\r\n\ttable.getCol(0).width(90);\r\n\ttable.getCol(1).width(90);\r\n\ttable.getCol(2).width(95);\r\n\t\r\n\ttable.getCell(0, 0).colSpan(3).content('Children,Old, Working Age per Borough')\r\n\t.fontSize(10);\r\n\ttable.getCell(1, 0).content('Child AGE(%)')\r\n\t.fontSize(8);\r\n\ttable.getCell(1, 1).content('Old AGE(%)')\r\n\t.fontSize(8);\r\n\ttable.getCell(1, 2).content('Working AGE(%)')\r\n\t.fontSize(8);\r\n\ttable.getCell(2, 0).content(child);\r\n\ttable.getCell(2, 1).content(old);\r\n\ttable.getCell(2, 2).content(working);\r\n\t\r\n\r\n\ttable.cellBorder(\"#b0bec5\").hAlign(\"center\").vAlign(\"middle\");\r\n\ttable.cellPadding(0) // set 10px padding from each border of every cell\r\n\t .fontWeight(90) // set text font weight\r\n\t .fontSize(16) // set text font size\r\n\t .fontColor('#b0bec5'); // set text font color\r\n\r\n\ttable.draw();\r\n\t// add a listener\r\n\t// floodtable.listen(\"pointClick\", highlightTable);\r\n\treturn table\r\n}", "function init_analytics_data_table(table) {\n\ttable.addColumn(\"string\", \"Name\");\n\ttable.addColumn(\"datetime\", \"Timestamp\");\n}", "startData() { return {\r\n unlocked: false,\r\n points: new Decimal(0),\r\n best: new Decimal(0),\r\n total: new Decimal(0),\r\n energy: new Decimal(0),\r\n first: 0,\r\n }}", "updateValues() {\n const { selectedkey, cdata, onEdit } = this.props;\n let currentcomponent = { ...cdata[selectedkey] };\n let newvalues = getValues(\n this.CurveSelect.value,\n parseFloat(this.totalEnergyEntry.value.replace(\",\", \".\")),\n currentcomponent.values\n );\n currentcomponent.values = newvalues;\n onEdit(selectedkey, currentcomponent);\n }", "function reset() {\n d3.selectAll(\"#tableVis table tr\").style(\"font-weight\", \"normal\");\n destroyVis();\n colleges = Object.keys(current_json);\n autocomp();\n createVis(current_json, current_csv);\n}", "function runEnter() {\nd3.select(\"tbody\").html(\"\");\n\n // Prevent the page from refreshing\nd3.event.preventDefault();\n\n // get the date input\nvar requestedDate = d3.select(\"#datetime\").property(\"value\");\n\n // /filter the data\nvar filteredData = tableData.filter(date => date.datetime === requestedDate);\nconsole.log(filteredData);\n\n // Display the filtered data\n filteredData.forEach(function(UFOSighting2) {\n console.log(UFOSighting2);\n var row = tbody.append(\"tr\");\n Object.entries(UFOSighting2).forEach(function([key, value]){\n var cell = row.append(\"td\");\n cell.text(value);\n });\n });\n }", "function baseStoreData() {\n var timeLocation = document.getElementById('timeLocationEl');\n for (var x = 0; x < storeArray.length; x++) {\n//Puts in store name to column 1\n var tr = document.createElement('tr');\n tr.textContent = storeArray[x].storeName;\n timeLocation.appendChild(tr);\n//Puts in customers column\n for (var y = 0; y < hours.length; y++){\n var td = document.createElement('td');\n td.textContent = storeArray[x].cookiesPerHour[y];\n tr.appendChild(td);\n }\n//Puts in totals for each store\n td.textContent = storeArray[x].totalDailySales;\n tr.appendChild(td);\n }\n// Total cookies column 3\n}", "function loadData(data) {\n\n tbody.selectAll(\"*\").remove()\n data.forEach(ufoSighting => {\n // console.log to make sure all objects were selected\n // console.log(ufoSighting);\n const row = tbody.append(\"tr\");\n Object.values(ufoSighting).forEach(value => {\n // Append a cell to the row for each value\n // in the ufo object\n var cell = row.append(\"td\");\n cell.text(value);\n });\n });\n}", "function fulldata() {\n tbody.html(\"\");\n console.log(`Complete data: ${tableData.length} records in this table.`);\n console.log(\"----------\");\n\n tableData.forEach(function(sighting) {\n\n var row = tbody.append(\"tr\");\n\n Object.entries(sighting).forEach(function([key, value]) {\n\n var cell = row.append(\"td\");\n\n cell.text(value);\n });\n });\n}", "function dataLoaded(err, data) {\n\n makeTableTumors(data)\n}", "function empDt() {\n let depdtArr = empDataTable();\n depdtArr.forEach(element => {\n let dataArr = Object.values(element);\n dataTable.rows().add(dataArr);\n });\n}", "function loadData() {\n loadTable();\n}", "update(data) {\n this.data = data;\n this.populate(this.dindex);\n console.log(\"Infographic of type \\\"\" + this.typename + \"\\\" updated.\");\n }", "function populateTable(data,val){\n if(val == 1){\n table.row.add(editArray); \n table.draw(); \n }else if(val == 2){\n table.row.add(selectedDataarray); \n table.draw();\n }else{\n alert('There was an error populating table, Please check material balance and material edit table codes');\n }\n}", "function populateTable(data,val){\n if(val == 1){\n table.row.add(editArray); \n table.draw(); \n }else if(val == 2){\n table.row.add(selectedDataarray); \n table.draw();\n }else{\n alert('There was an error populating table, Please check material balance and material edit table codes');\n }\n}", "function updateMainDataTable(currDataCell){\n $(\"#main_data_content\")\n .append($(\"<tr/>\")\n .append($(\"<td/>\", {text: currDataCell.Name}))\n .append($(\"<td/>\", {text: currDataCell.Title}))\n .append($(\"<td/>\", {text: currDataCell.Remuneration}))\n .append($(\"<td/>\", {text: currDataCell.Department}))\n .append($(\"<td/>\", {text: currDataCell.Expenses})));\n }", "function populateRows() {\n let tmpRows = [];\n for(let i = 1; i <= 20; i++) {\n const ingredient = data[`strIngredient${i}`];\n const quantity = data[`strMeasure${i}`];\n \n if (ingredient === null || ingredient === \"\") {\n continue;\n }\n tmpRows.push({key: i, ingredient: ingredient, quantity: quantity})\n }\n setRows(tmpRows);\n }", "constructor() {\n this.sections = new Array();\n this.elArray = new Array();\n this.charts = new Array();\n this.tables = new Object();\n }", "get data() {\n\t\treturn this._tableData;\n\t}", "resetData() {\n // Start out with no souls\n this.souls = 0;\n // Start at stage 0\n this.stage = 0;\n // Starting upgrade levels\n this.levels = {\n sword: 0,\n thunder: 0,\n fire: 0\n }\n // Save the reset values\n this.saveData();\n }", "setInitialPageView () {\n // all dimensions on rows, entity key dimension is at last row, measure dimension on columns\n const rf = []\n const cf = []\n const tf = []\n\n // rows: rank dimensions\n for (let nDim = 1; nDim < this.rank; nDim++) {\n rf.push(this.dimProp[nDim])\n }\n if (this.dimProp.length > 0) rf.push(this.dimProp[0]) // entity key dimension at rows on last position\n\n // columns: measure attribute dimension, it is at [rank] position in dimensions array\n if (this.dimProp.length > this.rank) cf.push(this.dimProp[this.rank])\n\n // for rows and columns select all items\n for (const f of cf) {\n f.selection = Array.from(f.enums)\n f.singleSelection = (f.selection.length > 0) ? f.selection[0] : {}\n }\n for (const f of rf) {\n f.selection = Array.from(f.enums)\n f.singleSelection = (f.selection.length > 0) ? f.selection[0] : {}\n }\n // other dimensions are empty by default\n this.rowFields = rf\n this.colFields = cf\n this.otherFields = tf\n\n // default row-column mode: row-column headers without spans\n // as it is today microdata cannot be scalar, always has at least one attribute\n this.pvc.rowColMode = !this.isScalar ? Pcvt.SPANS_AND_DIMS_PVT : Pcvt.NO_SPANS_NO_DIMS_PVT\n\n // store pivot view\n const vs = Pcvt.pivotStateFromFields(this.rowFields, this.colFields, this.otherFields, this.ctrl.isRowColControls, this.pvc.rowColMode, KEY_DIM_NAME)\n vs.pageStart = 0\n vs.pageSize = this.isPages ? this.pageSize : SMALL_PAGE_SIZE\n\n this.dispatchMicrodataView({\n key: this.routeKey,\n view: vs,\n digest: this.digest || '',\n modelName: Mdf.modelName(this.theModel),\n runDigest: this.runDigest || '',\n entityName: this.entityName || ''\n })\n\n // refresh pivot view: both dimensions labels and table body\n this.ctrl.isPvDimsTickle = !this.ctrl.isPvDimsTickle\n this.ctrl.isPvTickle = !this.ctrl.isPvTickle\n }", "function update_database_table_cell_values(res) {\n\n var section_id = res.heading.id_parent;\n var heading_id = res.heading.id;\n\n var new_field = \"datatable_\" + section_id + \"_\" + heading_id;\n\n //// // //////;\n if (vm.field[new_field]) {\n //// // //////;\n for (var key in res.heading.datatable[0].table_str) {\n if (res.heading.datatable[0].table_str[key].cell_value) {\n //// // //////;\n var cell_new_val = res.heading.datatable[0].table_str[key].cell_value;\n vm.field[new_field][key] = cell_new_val;\n }\n else {\n vm.field[new_field][key] = null\n }\n\n }\n }\n }", "function getData(tableData){\n tableData.forEach((sighting) => {\n //console.log(sighting)\n var row = tbody.append(\"tr\");\n Object.entries(sighting).forEach(([key, value]) => {\n //console.log(key, value);\n // Append a cell to the row for each value\n // in the weather report object\n var cell = row.append(\"td\");\n cell.text(value);\n });\n });\n}", "updateColorTable(){\n let self = this;\n let keys = Object.keys(this._colors);\n let values = Object.values(this._colors);\n /* these are the DOM elements in each row of the table */\n let rowComponents = [\n { 'type': 'div', 'attr':[['class', 'flex-cell display']] },\n { 'type': 'div', 'attr':[['class', 'flex-cell label']] },\n { 'type': 'span', 'attr':[['class', 'flex-cell small-close']] },\n ];\n super.initTableRows('#color-table', 'color', keys, rowComponents);\n /* update the color backgroud of the display are of each row */\n d3.select('#color-table').selectAll('.display')\n .data(values)\n .style('background-color', d => d )\n ;\n /* set the labels for each row */\n d3.select('#color-table').selectAll('.label')\n .data(keys)\n .text(d => d)\n ;\n /* update the small close span element */\n d3.select('#color-table').selectAll('.small-close')\n .data(keys)\n .attr('data-key', d => d)\n .html('&times;')\n .on('click', function(d){\n if( this.dataset.key === 'Default' ) return;\n delete( self._colors[this.dataset.key] );\n self.assignColors();\n self.updateColorTable();\n self.plot();\n })\n ;\n }", "function renderTable() {\n tbody.innerHTML = \"\";\n for (var i = 0; i < filterData.length; i++) {\n // Get the current objects and its fields. Calling each dictionary object 'ovni'. This comes from the data.js database where\n //the object dataSet holds an array (list) of dictionaries. Each dictionary is an object and I'm calling it ovni. This will\n // loop through each dictionary/object from the variable dataSet and store their keys in the variable fields. \n\n var ovni = filterData[i];\n var fields = Object.keys(ovni);\n \n // Create a new row in the tbody, set the index to be i + startingIndex\n // fields are the columns\n var row = tbody.insertRow(i);\n for (var j = 0; j < fields.length; j++) {\n // For every field in the address object, create a new cell and set its inner text to be the current value at the current address's field\n // the variable field will gather the columns names. It will loop through the fields(columns). Example, fields index 0 is datetime.\n var field = fields[j];\n var cell = row.insertCell(j);\n // now i will pass to the cell the ovni object, field values.\n cell.innerText = ovni[field];\n }\n }\n}" ]
[ "0.61513656", "0.6063266", "0.60035765", "0.591022", "0.58577436", "0.5847947", "0.58167595", "0.58074325", "0.57826096", "0.5726791", "0.5700324", "0.56770486", "0.56290007", "0.56025475", "0.5591837", "0.5583447", "0.5567965", "0.5562535", "0.550695", "0.5494547", "0.54932976", "0.5487086", "0.5472801", "0.54711586", "0.5431608", "0.5417367", "0.5411479", "0.53565013", "0.53476715", "0.5342962", "0.53249055", "0.53204376", "0.53145003", "0.5304794", "0.5304148", "0.5301028", "0.5299558", "0.5283129", "0.528126", "0.52720845", "0.5268105", "0.5264353", "0.5264257", "0.5262827", "0.5256152", "0.5251308", "0.5239502", "0.5233951", "0.5232253", "0.52230823", "0.52220625", "0.5212702", "0.5212021", "0.519703", "0.519551", "0.5191313", "0.5183508", "0.5180823", "0.5179627", "0.5175794", "0.51752377", "0.5173232", "0.51714873", "0.5166213", "0.516319", "0.515219", "0.515166", "0.5149068", "0.5146831", "0.5143763", "0.5142617", "0.5136746", "0.5134373", "0.5133445", "0.5126826", "0.51260316", "0.5121256", "0.51144433", "0.51109356", "0.5108733", "0.51084644", "0.5107278", "0.51042706", "0.51034975", "0.509961", "0.50976026", "0.50941324", "0.5078262", "0.5075943", "0.5075943", "0.5069799", "0.5068527", "0.50682724", "0.50663173", "0.5065038", "0.50605476", "0.50592995", "0.5058994", "0.5057915", "0.5057798" ]
0.6096933
1
=================================================================================== ==================================================================================== Sets the impactor text which is the fours data table in the data view. ====================================================================================
function setImpactorText(impactorText) { var impTbl = document.getElementById("ImpactorInfo"); $('#ImpactorInfo').html(impactorText); //impTbl.innerHTML = impactorText; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function rowSetText(text) {\n rowClear();\n currentRow.append('div').classed('tbar-row-text', true)\n .text(text);\n }", "function datasetText(dataset) {\r\n\treturn dataset;\r\n}", "function _setDisplayText(oController) {\r\n\t\tvar oTextReader = oController.getView().getViewData().oTextReader;\r\n\t\tvar oSelectDialog = oController.byId(\"idGatewayCatalogListDialog\");\r\n\t\toSelectDialog.setTitle(oTextReader(\"selectService\"));\r\n\t\toSelectDialog.setNoDataText(oTextReader(\"noDataText\"));\r\n\t}", "function impostaCausaliSpesa (list) {\n var opts = {\n aaData: list,\n oLanguage: {\n sZeroRecords: \"Nessun impegno associato\"\n },\n aoColumnDefs: [\n {aTargets: [0], mData: computeStringMovimentoGestione.bind(undefined, 'impegno', 'subImpegno', 'capitoloUscitaGestione')},\n {aTargets: [1], mData: readData(['subImpegno', 'impegno'], 'descrizione')},\n {aTargets: [2], mData: readData(['subImpegno', 'impegno'], 'importoAttuale', 0, formatMoney), fnCreatedCell: tabRight},\n {aTargets: [3], mData: readData(['subImpegno', 'impegno'], 'disponibilitaPagare', 0, formatMoney), fnCreatedCell: tabRight}\n ]\n };\n var options = $.extend(true, {}, baseOpts, opts);\n $(\"#tabellaMovimentiSpesa\").dataTable(options);\n }", "function documentationTableLabel(value) { }", "function showTipTable(tableIndex, reportObjId)\r\n{\r\n var rows = tables[tableIndex].rows;\r\n var a = reportObjId - 1;\r\n\r\n if(rows.length != arrayMetadata[a].length)\r\n\tthrow new Error(\"rows.length=\" + rows.length+\" != arrayMetadata[array].length=\" + arrayMetadata[a].length);\r\n\r\n for(i=0; i<rows.length; i++) \r\n \trows[i].cells[1].innerHTML = arrayMetadata[a][i];\r\n}", "function showTipTable(tableIndex, reportObjId)\r\n{\r\n var rows = tables[tableIndex].rows;\r\n var a = reportObjId - 1;\r\n\r\n if(rows.length != arrayMetadata[a].length)\r\n\tthrow new Error(\"rows.length=\" + rows.length+\" != arrayMetadata[array].length=\" + arrayMetadata[a].length);\r\n\r\n for(i=0; i<rows.length; i++) \r\n \trows[i].cells[1].innerHTML = arrayMetadata[a][i];\r\n}", "function changeInfoBar()\n {\n var ib = document.getElementById(\"wbInfoBar\") ;\n var tr = ib.rows[0] ;\n var tds = tr.cells ;\n for ( var i = 0 ; i < arguments.length ; i++ )\n {\n if ( i < tds.length )\n {\n tds[i].nodeValue = arguments[i] ;\n }\n }\n }", "function imprime() {\n $('#nomina').DataTable({\n dom: 'Bfrtip',\n buttons: [{\n extend: 'copyHtml5',\n text: 'Copiar',\n title: `Carpintería Meraz | Nómina ${tipo} | ${anio}`,\n footer: true\n },\n {\n extend: 'excelHtml5',\n title: `Carpintería Meraz | Nómina ${tipo} | ${anio}`,\n filename: `Nomina-${tipo}-excel-${anio}`,\n footer: true\n },\n {\n extend: 'pdfHtml5',\n text: 'PDF',\n title: `Carpintería Meraz | Nómina ${tipo} | ${anio}`,\n filename: `Nomina-${tipo}-${anio}`,\n footer: true\n }]\n });\n}", "function showTipTable(tableIndex, reportObjId)\n{\n var rows = tables[tableIndex].rows;\n var a = reportObjId - 1;\n\n if(rows.length != arrayMetadata[a].length)\n\tthrow new Error(\"rows.length=\" + rows.length+\" != arrayMetadata[array].length=\" + arrayMetadata[a].length);\n\n for(i=0; i<rows.length; i++) \n \trows[i].cells[1].innerHTML = arrayMetadata[a][i];\n}", "function showTipTable(tableIndex, reportObjId)\n{\n var rows = tables[tableIndex].rows;\n var a = reportObjId - 1;\n\n if(rows.length != arrayMetadata[a].length)\n\tthrow new Error(\"rows.length=\" + rows.length+\" != arrayMetadata[array].length=\" + arrayMetadata[a].length);\n\n for(i=0; i<rows.length; i++) \n \trows[i].cells[1].innerHTML = arrayMetadata[a][i];\n}", "_createDefaultHeaderText() {\n const name = this.name;\n if (!name && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getTableTextColumnMissingNameError();\n }\n if (this._options && this._options.defaultHeaderTextTransform) {\n return this._options.defaultHeaderTextTransform(name);\n }\n return name[0].toUpperCase() + name.slice(1);\n }", "function setDamage(txtDamage)\n\t{\n\t\t\n\n\t\t$(\"#LB_Damage\").text( damage1 + \" \" + dist +\" km \"+ damage2);\n\n\t\tvar impTbl = document.getElementById(\"DamageInfo\");\n\t\t\n\t\t$('#DamageInfo').html(txtDamage);\n\t\t//impTbl.innerHTML = txtDamage;\n\t}", "setTextTable(table)\n {\n for (let i in this.registry) {\n // Skip if the textTable is empty\n if (this.registry[i] === undefined || typeof(this.registry[i]) !== \"object\") {\n continue;\n }\n this.registry[i] = table;\n }\n this.currentTable = table;\n this.refresh();\n }", "function setHeaderForNoFilter(){\n\t//Change table header text\n\t$('tr#conceptcodes_filter_table_header').addClass(\"hidden\");\n\t$('tr#conceptcodes_table_header').removeClass(\"hidden\");\n}", "function default_table(){\n tableData.forEach((sightings) => {\n var record = tbody.append(\"tr\");\n Object.entries(sightings).forEach(([key, value]) => {\n var data_value = record.append(\"td\");\n data_value.text(value);\n });\n });\n}", "function setHeaderForFilter(){\n\t//Change table header text\n\t$('tr#conceptcodes_table_header').addClass(\"hidden\");\n\t$('tr#conceptcodes_filter_table_header').removeClass(\"hidden\");\n}", "genDataSummaryText()\n\t{\t\n\n let target = this.state.searchTarget;\n\n let summary = genSummary(target)\n\n\t\treturn summary === \"Entire Corpus\" ? \"No Data Selected\" : summary\n\n\t}", "function showNewText(text) {\n firstText.innerHTML = `${text}`;\n gsap.to(\".m402-text-relative\", {\n duration: 0.3,\n opacity: 1\n });\n}", "function showNewText(text) {\n firstText.innerHTML = `${text}`;\n gsap.to(\".m402-text-relative\", {\n duration: 0.3,\n opacity: 1\n });\n}", "function setText(text)\n {\n svg.selectAll(\".label\").text(text);\n }", "setText () {\r\n const O = this;\r\n O.placeholder = \"\";\r\n if (O.is_multi) {\r\n const sels = O.E.find(':checked').not(':disabled'); //selected options.\r\n\r\n if (settings.csvDispCount && sels.length > settings.csvDispCount) {\r\n if (sels.length === O.E.find('option').length && settings.captionFormatAllSelected) {\r\n O.placeholder = settings.captionFormatAllSelected.replace(/\\{0\\}/g, sels.length);\r\n }\r\n else {\r\n O.placeholder = settings.captionFormat.replace(/\\{0\\}/g, sels.length);\r\n }\r\n }\r\n else {\r\n O.placeholder = sels.toArray().map(selected => selected.innerText).join(', ');\r\n }\r\n }\r\n else {\r\n O.placeholder = O.E.find(':checked').not(':disabled').text();\r\n }\r\n\r\n let is_placeholder = false;\r\n\r\n if (!O.placeholder) {\r\n\r\n is_placeholder = true;\r\n\r\n O.placeholder = O.E.attr('placeholder');\r\n if (!O.placeholder) //if placeholder is there then set it\r\n O.placeholder = O.E.find('option:disabled:checked').text();\r\n }\r\n\r\n O.placeholder = O.placeholder ? (`${settings.prefix} ${O.placeholder}`) : settings.placeholder;\r\n\r\n //set display text\r\n O.caption.text(O.placeholder);\r\n if (settings.showTitle) O.CaptionCont.attr('title', O.placeholder);\r\n\r\n //set the hidden field if post as csv is true.\r\n const csvField = O.select.find('input.HEMANT123');\r\n if (csvField.length) csvField.val(O.getSelStr());\r\n\r\n //add class placeholder if its a placeholder text.\r\n if (is_placeholder) O.caption.addClass('placeholder'); else O.caption.removeClass('placeholder');\r\n return O.placeholder;\r\n }", "function displayFactText(currentFact, positionId) {\n document.getElementById(positionId).innerHTML = currentFact.text;\n}", "set headerText(aValue) {\n this._headerText = aValue;\n this._widget.setAttribute(\"headerText\", aValue);\n }", "function initTable() {\r\n\r\n const TaskTable = document.getElementById('task-table'); //recupero tabella da svuotare, attarverso il suo id\r\n \r\n TaskTable.innerHTML = ''; //svuoto la tabella, e poi inserisco nulla('')\r\n\r\n }", "function init () {\n data.forEach((tableData) => {\n let row = tbody.append(\"tr\");\n Object.values(tableData).forEach(value => {\n let cell = row.append(\"td\");\n cell.text(value);\n });\n })\n}", "function drawTable() {\n var stat = getState(cm);\n _replaceSelection(cm, stat.table, insertTexts.table);\n}", "function renderIn_modalVerse() {\r\n\t\t$('.populated_verse_with_ajax').html(\r\n\t\t\t'<span>' + $('.populated_verse_with_ajax').text() + '</span>'\r\n\t\t);\r\n\t\t$(\".populated_verse_with_ajax\").textfill({maxFontPixels:200});\r\n\r\n\r\n\t}", "function renderIn_modalVerse() {\r\n\t\t$('.populated_verse_with_ajax').html(\r\n\t\t\t'<span>' + $('.populated_verse_with_ajax').text() + '</span>'\r\n\t\t);\r\n\t\t$(\".populated_verse_with_ajax\").textfill({maxFontPixels:200});\r\n\r\n\r\n\t}", "function renderIn_modalVerse() {\r\n\t\t$('.populated_verse_with_ajax').html(\r\n\t\t\t'<span>' + $('.populated_verse_with_ajax').text() + '</span>'\r\n\t\t);\r\n\t\t$(\".populated_verse_with_ajax\").textfill({maxFontPixels:200});\r\n\r\n\r\n\t}", "function renderIn_modalVerse() {\r\n\t\t$('.populated_verse_with_ajax').html(\r\n\t\t\t'<span>' + $('.populated_verse_with_ajax').text() + '</span>'\r\n\t\t);\r\n\t\t$(\".populated_verse_with_ajax\").textfill({maxFontPixels:200});\r\n\r\n\r\n\t}", "function renderIn_modalVerse() {\r\n\t\t$('.populated_verse_with_ajax').html(\r\n\t\t\t'<span>' + $('.populated_verse_with_ajax').text() + '</span>'\r\n\t\t);\r\n\t\t$(\".populated_verse_with_ajax\").textfill({maxFontPixels:200});\r\n\r\n\r\n\t}", "function renderIn_modalVerse() {\r\n\t\t$('.populated_verse_with_ajax').html(\r\n\t\t\t'<span>' + $('.populated_verse_with_ajax').text() + '</span>'\r\n\t\t);\r\n\t\t$(\".populated_verse_with_ajax\").textfill({maxFontPixels:200});\r\n\r\n\r\n\t}", "function renderIn_modalVerse() {\r\n\t\t$('.populated_verse_with_ajax').html(\r\n\t\t\t'<span>' + $('.populated_verse_with_ajax').text() + '</span>'\r\n\t\t);\r\n\t\t$(\".populated_verse_with_ajax\").textfill({maxFontPixels:200});\r\n\r\n\r\n\t}", "function basicInfoColum()\n{\n setSelectedText( 'CONCAT(user(),0x203a3a20,database(),0x203a3a20,version())' );\n}", "function dataDisplay(item){\n tbody.text(\"\");\n item.forEach(ufo_sighting => {\n console.table(ufo_sighting);\n add_tr = tbody.append(\"tr\");\n\n Object.entries(ufo_sighting).forEach(function([key,value]){\n add_td = add_tr.append(\"td\").text(value);\n });\n });\n}", "function itemprint(t){\n\t\t\tdebugger;\n\t\t\tvar newtext = $(\"<p style=display:none>\")\n\t\t\t// var statusvar = current.effects[0].status\n\t\t\tvar effectcheck = window[(current.effects[0].status)]\n\t\t\t// var currenteffect = caction.effectvar\n\t\t\t// if(effectcheck === undefined){};\n\t\t\tif(effectcheck === false || effectcheck === undefined){\n\t\t\t\tnewtext\n\t\t\t\t\t.text(current[t] + current.item[0].idesc + current.effects[0].efalse)\n\t\t\t\t\t.appendTo(\".textarea\")\n\t\t\t\t\t.fadeIn(3000)\n\t\t\t};\n\t\t\tif(effectcheck === true){\n\t\t\t\tnewtext\n\t\t\t\t\t.text(current[t] + current.item[0].idesc + current.effects[0].etrue)\n\t\t\t\t\t.appendTo(\".textarea\")\n\t\t\t\t\t.fadeIn(3000)\n\t\t\t};\n\t\t\t$(\".textarea\").animate({scrollTop: 9000}, 3000);\n\t\t}", "function changeText() {\n \n }", "function setHeaderForSearchName(){\n\t//Change table header text\n\t$('tr#conceptcodes_table_header').addClass(\"hidden\");\n\t$('tr#conceptcodes_filter_table_header').addClass(\"hidden\");\n\t$('tr#conceptcodes_codesearch_table_header').addClass(\"hidden\");\n\t$('tr#conceptcodes_namesearch_table_header').removeClass(\"hidden\");\n}", "_setTable() {\r\n\r\n\r\n }", "function TextData() { }", "function TextData() { }", "function actualitzaCopia ()\r\n{\r\n this.capa.innerHTML =insertTable (this.correcte + \"&nbsp;\",this.actual + this.putCursor ('black'), this.estil);\r\n}", "display_agent(agent){\n this.single_agent.selectAll(\"p\")\n\t\t .data(build_string(agent).split(\"\\n\"))\n\t \t .transition()\n .duration(100)\n .text((d)=>{return (d);});\n\n }", "function setHeadLabel(){\n ctrl.headlabel = ctrl.itemTypes[ctrl.editedItem.type][ctrl.editedItem.id?'update':'create'];\n }", "function changeOneLineText(cell, text) {\n $(\".Input\").remove();\n $(cell).click(function () { createTextInsert(this); });\n if ($(cell).attr(\"Class\").indexOf(\"TitleChange\") != -1) {\n var params = {};\n params.MatrixId = $(\"#ContentPlaceHolder1__pl__cl__detail_MainTable\").attr(\"Class\");\n switch ($(cell).attr(\"Id\")) {\n case \"ContentPlaceHolder1__pl__cl__detail_TitleRowCell1\":\n if (text.replace(/ /g, '').length == 0) {\n alert('Leere Titel der Karte können nicht gespeichert werden');\n $('#ContentPlaceHolder1__pl__cl__detail_TitleRowCell1')[0].innerText = 'Titel';\n }\n else {\n params.CellId = \"Title\";\n }\n break;\n case \"ContentPlaceHolder1__pl__cl__detail_TitleRowCell6\":\n params.CellId = \"Subtitle\";\n break;\n case \"ContentPlaceHolder1__pl__cl__detail_TitleRowCell3\":\n params.CellId = \"Author\";\n break;\n case \"ContentPlaceHolder1__pl__cl__detail_TitleRowCell5\":\n params.CellId = \"Date\";\n break;\n case \"ContentPlaceHolder1__pl__cl__detail_TitleRowCell8\":\n params.CellId = \"LastChange\";\n break;\n case \"ContentPlaceHolder1__pl__cl__detail_TitleRowCell10\":\n params.CellId = \"Revision\";\n break;\n default:\n params.CellId = $(cell).attr(\"Id\");\n params.CellId = params.CellId.substring(36);\n break;\n }\n // Wp name auf standard setzten falls leer\n if (text == \"\" && params.CellId.toString().indexOf(\"Wirkungspakete\") != -1) {\n text = \"WP\" + ($(\".WirkungspaketCell\").index($(cell)) + 1).toString();\n }\n // ColorMenu aktualisieren\n if (params.CellId.toString().indexOf(\"Legend\") != -1) {\n var index = parseInt(params.CellId.substring(6).split(\"_\")[0] - 1) * 2 + parseInt(params.CellId.substring(6).split(\"_\")[1]);\n colorMenuTextChange(index, text);\n }\n params.Text = text;\n } else {\n if (text == \"\" && getCoords($(cell).parents(\".MainCell\").attr(\"Id\"))[1] != \"\" && $(cell).parents(\".CellTable\").attr(\"class\") != \"CellTable SupportColorFirstColumn\" && $(cell).parents(\".CellTable\").find(\".TextRow > .TextColumn\").text() == \"\") {\n var activeRow = $(cell).parents(\".MainCell\").parents(\".MainRow\");\n index = getCoords($(cell).parents(\".MainCell\").attr(\"Id\"));\n if (index[1] != \"\") {\n var params = {};\n params.RowID = index[0];\n params.CellId = index[1];\n params.Index = getIndex($(cell).parents(\".MainCell\"));\n callWebservice(\"dbDeleteCell\", params);\n RemoveDaDEventListener($(cell).parents(\".RowCellDetail\")[0]);\n for (var i = 0; wirkungselementeArray.length > i; i++) {\n if (index[1] == wirkungselementeArray[i].ORIGIN_CHARACTERISTIC_ID || index[1] == wirkungselementeArray[i].GOAL_CHARACTERISTIC_ID) {\n removeWirkungselementConnection(wirkungselementeArray[i].ORIGIN_CHARACTERISTIC_ID, wirkungselementeArray[i].GOAL_CHARACTERISTIC_ID, wirkungselementeArray[i].Wirkungspaket_ID);\n i--;\n }\n }\n drawWirkungselemente();\n $(cell).parents(\".MainCell\").remove();\n addCellAfter($(activeRow).children(\".MainCell\").filter(\":last-child\"), true);\n }\n $('#ContentPlaceHolder1__pl__cl__detail_minusMenu').hide(\"fast\");\n } else if (ifCellEmpty($(cell).parents(\".MainCell\")) == true && text != \"\") {\n var index = getCoords($(cell).parents(\".MainCell\").attr(\"Id\"));\n var newId = getNewCellId(index[0], $(cell).parents(\".MainCell\"));\n $(cell).parents(\".MainCell\").attr(\"Id\", $(cell).parents(\".MainCell\").attr(\"Id\") + newId);\n $(\"<a class=\\\"ColorButton\\\" href=\\\"javascript:void(0);\\\"><img style=\\\"display: inline;\\\" src=\\\"../images/pen.png\\\" border=\\\"0\\\"></a>\").appendTo(\n $(cell).parents(\".CellTable\").find(\".SupportRow td.SupportColumn\"));\n $(cell).parents(\".CellTable\").find('.ColorButton').click(function () { //show colorationMenu\n showColorationMenu(this)\n });\n }\n text = text.replace(/(\\r\\n|\\n|\\r)/gm, \"\");\n var params = {};\n var coords = getCoords($(cell).parents(\".MainCell\").attr(\"id\"));\n params.MatrixId = $(\"#ContentPlaceHolder1__pl__cl__detail_MainTable\").attr(\"Class\");\n params.CellId = coords[1];\n params.Text = text;\n }\n $(cell).html($(cell).html() + text);\n $(\".WirkungspaketCell input[type='button']\").unbind();\n $(\".WirkungspaketCell input[type='button']\").click(function (event) {\n toggleWirkungspaket(this);\n event.stopPropagation();\n });\n //$(\".RemoveWirkungspaket\").unbind();\n $(cell).children(\".RemoveWirkungspaket\").click(function (event) {\n removeWirkungspaket(this);\n event.stopPropagation();\n });\n callWebservice(\"dbTextChange\", params);\n}", "function replaceUndefinedColumnValue (text) {\n if (text == undefined || text === \"undefined\") {\n return \"\";\n } else {\n return text;\n }\n}", "atualizaNome() //controler\r\n {\r\n this._elemento.textContent = `[${this._idade}] ${this._nome}`;\r\n }", "function changetextitalic() {\n var currentIndex = findCurrentIndex(tempKey);\n if (mainDiagram.model.nodeDataArray[currentIndex].Italic) {\n mainDiagram.model.nodeDataArray[currentIndex].Italic = false\n }\n else {\n mainDiagram.model.nodeDataArray[currentIndex].Italic = true;\n }\n getRadio(mainDiagram.selection.Ca.value);\n}", "static updateHiddenHeaderLabels($table) {\n let columnTh = $table.find(\"thead th\");\n\n columnTh.toArray().forEach(function (th) {\n let $th = th;\n let columnIndex = $th.getIndex() + 1;\n let $cols = $table.find('tr td:nth-child(' + columnIndex + ')');\n\n $cols.toArray().forEach(function (col) {\n let $col = col.$;\n $col.setAttribute('data-label', $th.getText());\n });\n\n });\n }", "function setNonStatusText() {\n sendUpdate(\"setNonStatusText\", {\n trackerDescription: tr(\"tracker.know_the_status_of_your\"),\n patentText: tr(\"tracker.patent_pending\"),\n num1: tr(\"general.stage1\"),\n num2: tr(\"general.stage2\"),\n num3: tr(\"general.stage3\"),\n num4: tr(\"general.stage4\"),\n num5: tr(\"general.stage5\"),\n trackerHeader: jsDPZ.util.htmlUnEncode(tr(\"confirmation.dominos_tracker\"))\n });\n }", "function setHeaderForNoSearch(){\n\t//Change table header text\n\t$('tr#conceptcodes_codesearch_table_header').addClass(\"hidden\");\n\t$('tr#conceptcodes_namesearch_table_header').addClass(\"hidden\");\n\tsetHeaderForNoFilter();\n}", "function renderIn_modalVerse() {\r\n\t\t$('#populated_verse_with_ajax').html(\r\n\t\t\t'<span>' + $('#populated_verse_with_ajax').text() + '</span>'\r\n\t\t);\r\n\t\t$('#populated_verse_with_ajax').textfill({\r\n\t\t\tmaxFontPixels: 200\r\n\t\t});\r\n\t}", "function renderIn_modalVerse() {\r\n\t\t$('#populated_verse_with_ajax').html(\r\n\t\t\t'<span>' + $('#populated_verse_with_ajax').text() + '</span>'\r\n\t\t);\r\n\t\t$('#populated_verse_with_ajax').textfill({\r\n\t\t\tmaxFontPixels: 200\r\n\t\t});\r\n\t}", "function renderIn_modalVerse() {\r\n\t\t$('#populated_verse_with_ajax').html(\r\n\t\t\t'<span>' + $('#populated_verse_with_ajax').text() + '</span>'\r\n\t\t);\r\n\t\t$('#populated_verse_with_ajax').textfill({\r\n\t\t\tmaxFontPixels: 200\r\n\t\t});\r\n\t}", "function initTable(meta_id, ethnicity, gender, age, location, bbtype, wfreq) {\n var table = d3.select(\"#sample-metadata\");\n table.append(\"tbody\").text(\"ID: \" + meta_id[0]);\n table.append(\"tbody\").text(\"Ethnicity: \" + ethnicity[0]);\n table.append(\"tbody\").text(\"Gender: \" + gender[0]);\n table.append(\"tbody\").text(\"Age: \" + age[0]);\n table.append(\"tbody\").text(\"Location: \" + location[0]);\n table.append(\"tbody\").text(\"bbtype: \" + bbtype[0]);\n table.append(\"tbody\").text(\"wfreq: \" + wfreq[0])\n }", "substituteText() {\n const proxyObj = this.display;\n this.display = new Text();\n this.display.substitute(proxyObj);\n }", "function writeText() {\n Office.context.document.setSelectedDataAsync(\"Citation goes here\",\n function (asyncResult) {\n var error = asyncResult.error;\n if (asyncResult.status === \"failed\"){\n \t$('#display-data').text(\"Failure\" + error.message);\n }\n else\n {\n \t$('#display-data').text(\"Done\");\n }\n });\n}", "function TextColumnOptions() {}", "_text(d) {\n if (d.indexData !== -1)\n return this._adjustLengthText(this.model.data.children.data[this._vOrder[d.indexData]].labels[1], 20);\n else\n return \"\";\n }", "setText(text) {\n this._setText(text);\n }", "function getText_DataIndex() {\n\treturn 0;\n}", "function init() {\n tableData.forEach((sightings) => {\n var row = tbody.append(\"tr\");\n Object.entries(sightings).forEach(([key, value]) => {\n var cell = row.append(\"td\");\n cell.text(value);\n });\n });\n}", "function switchtext(){\n\t\t$(\"ol\").html(\"falseFact\");\n\t\t$(\"ol\").html(\"TrueFact\");\n\t\n\t}", "function Detailtableone(){\r\ntableone = anychart.standalones.table(10,3 );\r\ntableone.cellBorder(null);\r\ntableone.getCol(0).width('33.33%');\r\ntableone.getCol(1).width('33.33%');\r\ntableone.getCol(2).width('33.33%');\r\ntableone.getRow(0).height('10%');\r\ntableone.getRow(1).height('10%');\r\ntableone.getRow(2).height('10%');\r\ntableone.getRow(3).height('10%');\r\ntableone.getRow(4).height('10%');\r\ntableone.getRow(5).height('10%');\r\ntableone.getRow(6).height('10%');\r\ntableone.getRow(7).height('10%');\r\ntableone.getRow(8).height('10%');\r\ntableone.getRow(9).height('10%');\r\n\r\n\r\n\r\ntableone.getCell(0, 0).colSpan(3).content('Available Site')\r\n.fontSize(8);\r\ntableone.getCell(1, 1).content('Area of site')\r\n.fontSize(8);\r\ntableone.getCell(2, 1).content('Distance from pipe')\r\n.fontSize(7);\r\ntableone.getCell(3, 1).content('Distance from center')\r\n.fontSize(6);\r\ntableone.getCell(4, 1).content('Area of site')\r\n.fontSize(8);\r\ntableone.getCell(5, 1).content('Distance from pipe')\r\n.fontSize(7);\r\ntableone.getCell(6, 1).content('Distance from center')\r\n.fontSize(6);\r\ntableone.getCell(7, 1).content('Area of site')\r\n.fontSize(8);\r\ntableone.getCell(8, 1).content('Distance from pipe')\r\n.fontSize(7);\r\ntableone.getCell(9, 1).content('Distance from center')\r\n.fontSize(6);\r\ntableone.getCell(1, 2).content(sitea_areasite);\r\ntableone.getCell(2, 2).content(sitea_road);\r\ntableone.getCell(3, 2).content(sitea_center);\r\ntableone.getCell(4, 2).content(siteb_areasite);\r\ntableone.getCell(5, 2).content(siteb_road);\r\ntableone.getCell(6, 2).content(siteb_center);\r\ntableone.getCell(7, 2).content(sitec_areasite);\r\ntableone.getCell(8, 2).content(sitec_road);\r\ntableone.getCell(9, 2).content(sitec_center);\r\ntableone.getCell(1, 0).rowSpan(3).content('Site A')\r\n.fontSize(8);\r\ntableone.getCell(4, 0).rowSpan(3).content('Site B')\r\n.fontSize(8);\r\ntableone.getCell(7, 0).rowSpan(3).content('Site C')\r\n.fontSize(8);\r\n\r\ntableone.getRow(0) \r\n.cellFill(\"#37474f\");\r\ntableone.getRow(1) \r\n.cellFill(\"#37474f\"); \r\ntableone.getRow(2) \r\n.cellFill(\"#37474f\");\r\ntableone.getRow(3) \r\n.cellFill(\"#37474f\"); \r\ntableone.getRow(4) \r\n.cellFill(\"#37474f\");\r\ntableone.getRow(5) \r\n.cellFill(\"#37474f\");\r\ntableone.getRow(6) \r\n.cellFill(\"#37474f\");\r\ntableone.getRow(7) \r\n.cellFill(\"#37474f\"); \r\ntableone.getRow(8) \r\n.cellFill(\"#37474f\"); \r\ntableone.getRow(9) \r\n.cellFill(\"#37474f\"); \r\n\r\ntableone.cellBorder(\"#b0bec5\").hAlign(\"center\").vAlign(\"middle\");\r\n\ttableone.cellPadding(0) \r\n\t .fontWeight(90) \r\n\t .fontSize(16) \r\n\t .fontColor('#b0bec5'); \r\n\r\ntableone.draw();\r\nreturn tableone\r\n}", "function tableTalk(activeData) {\n\n // We'll have to reset our table, which we can do by writing over our bodySelect with empty space\n bodySelect.html(\"\");\n\n activeData.forEach(ufoData => {\n\n // Creates the tr tag to place td tags and data inside\n var rowCreate = bodySelect.append(\"tr\");\n\n // For each object, we'll need loop through and create & write a td tag\n Object.entries(ufoData).forEach(([key, value]) => {\n var cellCreate = rowCreate.append(\"td\");\n cellCreate.text(value);\n });\n });\n}", "function showInfoText (sClassID, nArtefactType, sAttributeName)\n// ---------------------------------------------------------------------\n{\n checkParam (sClassID, \"string\");\n checkParam (nArtefactType, \"number\");\n checkParamNull (sAttributeName, \"string\");\n\n // Construct the title of the box that shows the infotext\n var sTitle = \"\";\n if (sAttributeName)\n {\n sTitle = getString (\"ait_attribute\");\n }\n else if (nArtefactType == AIT_ARTEFACT_RELATION)\n {\n sTitle = getString (\"ait_relation\");\n }\n else if (nArtefactType == AIT_ARTEFACT_OBJECT)\n {\n sTitle = getString (\"ait_class\");\n }\n // By default we assume a diagram type\n else\n {\n sTitle = getString (\"ait_modeltype\");\n }\n\n // Create the edit box that displays the infotext\n var aEditBox = new boc.ait.util.ExtendedEditBox\n (\n {\n title: sTitle,\n modal:true,\n\n /*\n * Inner Function that serves as a callback in the editbox. This function\n * will be used to retrieve the text to display.\n * \n * This function may throw an exception back to the calling function.\n */\n // ---------------------------------------------------------------------\n loadFunction : function ()\n // ---------------------------------------------------------------------\n {\n this.body.mask(getString(\"ait_loading\"), 'x-mask-loading');\n var that = this;\n getInfoText\n (\n {\n classID: sClassID,\n artefactType: nArtefactType,\n attributeName: sAttributeName,\n /*\n * Inner Function that serves as a callback for when the ajax\n * request finishes successfully.\n * \n * This function may throw an exception back to the calling\n * function.\n * \n * \\param aResponse The AJAX response object \\param aOptions The\n * original options passed to the AJAX request\n */\n // ---------------------------------------------------------------------\n success: function (aResponse, aOptions)\n // ---------------------------------------------------------------------\n {\n var aRetObj = Ext.util.JSON.decode(aResponse.responseText);\n if (aRetObj.error)\n {\n showErrorBox(aRetObj.errString);\n return;\n }\n\n // Set the value of the text area\n that.setText (aRetObj.payload.infotext);\n\n // Set the title of the textbox\n that.setTitle(sTitle+\": \" + aRetObj.payload.title);\n that.body.unmask();\n },\n failure: that.body.unmask,\n scope: that\n }\n );\n }\n }\n );\n aEditBox.show();\n}", "function impostaCausaliEntrata (list) {\n var opts = {\n aaData: list,\n oLanguage: {\n sZeroRecords: \"Nessun accertamento associato\"\n },\n aoColumnDefs: [\n {aTargets: [0], mData: defaultPerDataTable('distinta.descrizione')},\n {aTargets: [1], mData: computeStringMovimentoGestione.bind(undefined, 'accertamento', 'subAccertamento', 'capitoloEntrataGestione')},\n {aTargets: [2], mData: readData(['subAccertamento', 'accertamento'], 'descrizione')},\n {aTargets: [3], mData: readData(['subAccertamento', 'accertamento'], 'importoAttuale', 0, formatMoney), fnCreatedCell: tabRight},\n {aTargets: [4], mData: readData(['subAccertamento', 'accertamento'], 'disponibilitaIncassare', 0, formatMoney), fnCreatedCell: tabRight}\n ]\n };\n var options = $.extend(true, {}, baseOpts, opts);\n $(\"#tabellaMovimentiEntrata\").dataTable(options);\n }", "function setHeaderForSearchCode(){\n\t//Change table header text\n\t$('tr#conceptcodes_table_header').addClass(\"hidden\");\n\t$('tr#conceptcodes_filter_table_header').addClass(\"hidden\");\n\t$('tr#conceptcodes_namesearch_table_header').addClass(\"hidden\");\n\t$('tr#conceptcodes_codesearch_table_header').removeClass(\"hidden\");\n}", "static setPopUpContent(value, name){\n value = Math.round(value*10000)/10000\n let content\n content = '<table class=\"table table-bordered\">'\n if (analyser.geo_mode == 1) {\n content += '<tr><th>Zone</th><td>'+name+'</td></tr>'\n }\n else if (analyser.geo_mode == 2) {\n content += '<tr><th>District</th><td>'+name.toUpperCase()+'</td></tr>'\n } else if (analyser.geo_mode == 3) {\n content += \"<tr><th>Région</th><td>\"+name.toUpperCase()+'</td></tr>'\n } else if (analyser.geo_mode == 4) {\n content += \"<tr><th>Municipality</th><td>\"+name.toUpperCase()+'</td></tr>'\n }\n if (analyser.indicator == 1) {\n content += \"<tr><th>Patient(s)</th><td>\"+parseInt(value)+'</td></tr>'\n } else if (analyser.indicator == 2) {\n content += \"<tr><th>Décès</th><td>\"+parseInt(value)+'</td></tr>'\n } else if (analyser.indicator == 3) {\n content += \"<tr><th>Taux d'attaque / 10000</th><td>\"+value+'</td></tr>'\n } else if (analyser.indicator == 4) {\n content += \"<tr><th>Létalité / 100</th><td>\"+value+'</td></tr>'\n } else if (analyser.indicator == 5) {\n content += \"<tr><th>Vaccination / 100</th><td>\"+value+'</td></tr>'\n }\n content += '</table>'\n return content\n }", "function setDispText(obj) {\n\n //debugger;\n\n Disp_TextAdd = (obj.Disp_TextAdd !== undefined && obj.Disp_TextAdd !== null && obj.Disp_TextAdd !== \"\") ? obj.Disp_TextAdd : Disp_TextAdd;\n Disp_TextSave = (obj.Disp_TextSave !== undefined && obj.Disp_TextSave !== null && obj.Disp_TextSave !== \"\") ? obj.Disp_TextSave : Disp_TextSave;\n Disp_OperationsTitle = (obj.Disp_OperationsTitle !== undefined && obj.Disp_OperationsTitle !== null && obj.Disp_OperationsTitle !== \"\") ? obj.Disp_OperationsTitle : Disp_OperationsTitle;\n Disp_TextUp = (obj.Disp_TextUp !== undefined && obj.Disp_TextUp !== null && obj.Disp_TextUp !== \"\") ? obj.Disp_TextUp : Disp_TextUp;\n Disp_TextDown = (obj.Disp_TextDown !== undefined && obj.Disp_TextDown !== null && obj.Disp_TextDown !== \"\") ? obj.Disp_TextDown : Disp_TextDown;\n Disp_TextEdit = (obj.Disp_TextEdit !== undefined && obj.Disp_TextEdit !== null && obj.Disp_TextEdit !== \"\") ? obj.Disp_TextEdit : Disp_TextEdit;\n Disp_TextDelete = (obj.Disp_TextDelete !== undefined && obj.Disp_TextDelete !== null && obj.Disp_TextDelete !== \"\") ? obj.Disp_TextDelete : Disp_TextDelete;\n }", "assignPlaceholderText() {\n if (this.count >= this.textList.length) {\n this.count = 0;\n }\n this.text = this.textList[this.count].text;\n this.count++;\n this.autowriterText();\n }", "function showText(i) {\n Shiny.onInputChange('text_contents', el.data[i-1].longtext);\n }", "function tableInfo(ufoInfo) {\n tbody.html(\"\");\n ufoInfo.forEach((ufoSighting) => {\n let row = tbody.append('tr');\n Object.entries(ufoSighting).forEach(([key, value]) => { \n let tableBody = row.append('td');\n tableBody.text(value);\n }); \n });\n}", "updateText(text) {\n\t\tthis.text = text;\n\t}", "function displayData(allData){ \n tbody.text(\"\")\n allData.forEach(function(ufoSighting){\n newTr = tbody.append(\"tr\")\n Object.entries(ufoSighting).forEach(function([key, value]){\n newTd = newTr.append(\"td\").text(value)\t\n })\n})}", "function showText(data,act) {\n currentdata = data;\n var text1 = \"'><td >\";\n var text2 = \"\\n\";\n var new1 = \"<tr id='new\";\n var new2 = \"</td><td style=\\\"text-align: center\\\"><div >待编制</div>\\n\" +\n \"</td>\\n\" +\"<td style=\\\"text-align: center;border: 0px\\\"><a href='/GJB151BSys/views/develop/new/new.jsp?devName=\";\n var new3 = \"&devStatus=\";\n var new4 = \"&devId=\";\n var new5 = \"'>编制</a>\" +\"</td>\\n\";\n var newn = \"</tr>\\n\";\n var endnew1 = \"<tr><td>\";\n var endnew2 = \"</td><td style=\\\"text-align: center\\\"><div >已编制</div>\\n\" +\n \"</td>\\n\" +\"<td style=\\\"text-align: center;border: 0px\\\"><a href='/GJB151BSys/views/develop/new/new.jsp?devName=\";\n var endnew3 = \"&devStatus=\";\n var endnew4 = \"&Status=1&devId=\";\n var endnew5 = \"'>查看</a></td></tr>\";\n var proofread1 = \"<tr id='proofread\";\n var proofread2 = \"</td><td style=\\\"text-align: center\\\"><div >待校对</div>\\n\" +\n \"</td>\\n\" +\"<td style=\\\"text-align: center;border: 0px\\\"><a href='/GJB151BSys/views/develop/new/new.jsp?devName=\";\n var proofread3 =\"&devStatus=\";\n var proofread4 =\"&devId=\";\n var proofread5 =\"'>校对</a>\" +\"</td>\\n\";\n var proofreadn =\"</tr>\\n\";\n var endproofread1 = \"<tr><td>\";\n var endproofread2 = \"</td><td style=\\\"text-align: center\\\"><div >已校对</div>\\n\" +\n \"</td>\\n\" +\"<td style=\\\"text-align: center;border: 0px\\\"><a href='/GJB151BSys/views/develop/new/new.jsp?devName=\";\n var endproofread3 = \"&devStatus=\";\n var endproofread4 = \"&Status=1&devId=\";\n var endproofread5 = \"'>查看</a></td></tr>\";\n var audit1 = \"<tr id='audit\";\n var audit2 = \"</td><td style=\\\"text-align: center\\\"><div >待审核</div>\\n\" +\n \"</td>\\n\" +\"<td style=\\\"text-align: center;border: 0px\\\"><a href='/GJB151BSys/views/develop/new/new.jsp?devName=\";\n var audit3 = \"&devStatus=\";\n var audit4 = \"&devId=\";\n var audit5 = \"'>审核</a>\" +\"</td>\\n\";\n var auditn = \"</tr>\\n\";\n var endaudit1 = \"<tr><td>\";\n var endaudit2 = \"</td><td style=\\\"text-align: center\\\"><div >已审核</div>\\n\" +\n \"</td>\\n\" +\"<td style=\\\"text-align: center;border: 0px\\\"><a href='/GJB151BSys/views/develop/new/new.jsp?devName=\";\n var endaudit3 = \"&devStatus=\";\n var endaudit4 = \"&Status=1&devId=\";\n var endaudit5 = \"'>查看</a></td></tr>\";\n var authorize1 = \"<tr id='authorize\";\n var authorize2 = \"</td><td style=\\\"text-align: center\\\"><div >待批准</div>\\n\" +\n \"</td>\\n\" +\"<td style=\\\"text-align: center;border: 0px\\\"><a href='/GJB151BSys/views/develop/new/new.jsp?devName=\";\n var authorize3 = \"&devStatus=\";\n var authorize4 = \"&devId=\";\n var authorize5 = \"'>批准</a>\" +\"</td>\\n\";\n var authorizen = \"</tr>\\n\";\n var endauthorize1 = \"<tr><td>\";\n var endauthorize2 = \"</td><td style=\\\"text-align: center\\\"><div >已批准</div>\\n\" +\n \"</td>\\n\" +\"<td style=\\\"text-align: center;border: 0px\\\"><a href='/GJB151BSys/views/develop/new/new.jsp?devName=\";\n var endauthorize3 = \"&devStatus=\";\n var endauthorize4 = \"&Status=1&devId=\";\n var endauthorize5 = \"'>查看</a></td></tr>\";\n var modify1 = \"<tr id='modify\";\n var modify2 = \"</td><td style=\\\"text-align: center\\\"><div >待修改</div>\\n\" +\n \"</td>\\n\" +\"<td style=\\\"text-align: center;border: 0px\\\"><a href='/GJB151BSys/views/develop/new/new.jsp?devName=\";\n var modify3 = \"&devStatus=\";\n var modify4 = \"&devId=\";\n var modify5 = \"'>修改</a>\" +\"</td>\\n\";\n var modifyn =\"</tr>\\n\";\n\n\n for (var i=0;i<data.showNew.length;i++)\n {\n\n // newtext += new1+i+text1+data.showNew[i].devName+text2+new2+i+newn;\n newtext += new1+i+text1+data.showNew[i].devName+text2+new2+data.showNew[i].devName+new3+data.showNew[i].devStatus+new4+data.showNew[i].devId+new5+newn;\n }\n for (var i=0;i<data.showProofread.length;i++)\n {\n // proofreadtext += proofread1+i+text1+data.showProofread[i].devName+text2+proofread2;\n proofreadtext += proofread1+i+text1+data.showProofread[i].devName+text2+proofread2+data.showProofread[i].devName+proofread3+data.showProofread[i].devStatus+proofread4+data.showProofread[i].devId+proofread5+proofreadn;\n\n }\n for (var i=0;i<data.showAudit.length;i++)\n {\n // audittext += audit1+i+text1+data.showAudit[i].devName+text2+audit2;\n audittext += audit1+i+text1+data.showAudit[i].devName+text2+audit2+data.showAudit[i].devName+audit3+data.showAudit[i].devStatus+audit4+data.showAudit[i].devId+audit5+auditn;\n }\n for (var i=0;i<data.showAuthorize.length;i++)\n {\n // authorizetext += authorize1+i+text1+data.showAuthorize[i].devName+text2+authorize2;\n authorizetext += authorize1+i+text1+data.showAuthorize[i].devName+text2+authorize2+data.showAuthorize[i].devName+authorize3+data.showAuthorize[i].devStatus+authorize4+data.showAuthorize[i].devId+authorize5+authorizen;\n }\n for (var i=0;i<data.showModify.length;i++)\n {\n // modifytext += modify1+i+text1+data.showModify[i].devName+text2+modify2;\n modifytext += modify1+i+text1+data.showModify[i].devName+text2+modify2+data.showModify[i].devName+modify3+data.showModify[i].devStatus+modify4+data.showModify[i].devId+modify5+modifyn;\n\n }\n for (var i=0;i<data.endNew.length;i++){\n endnew += endnew1+data.endNew[i].devName+endnew2+data.endNew[i].devName+endnew3+data.endNew[i].devStatus+endnew4+data.endNew[i].devId+endnew5;\n }\n for (var i=0;i<data.endProofread.length;i++){\n // endproofread += endproofread1+data.endProofread[i].devName+endproofread2;\n endproofread += endproofread1+data.endProofread[i].devName+endproofread2+data.endProofread[i].devName+endproofread3+data.endProofread[i].devStatus+endproofread4+data.endProofread[i].devId+endproofread5;\n }\n for (var i=0;i<data.endAudit.length;i++){\n // endaudit += endaudit1+data.endAudit[i].devName+endaudit2;\n endaudit += endaudit1+data.endAudit[i].devName+endaudit2+data.endAudit[i].devName+endaudit3+data.endAudit[i].devStatus+endaudit4+data.endAudit[i].devId+endaudit5;\n }\n for (var i=0;i<data.endAuthorize.length;i++){\n // endauthorize += endauthorize1+data.endAuthorize[i].devName+endauthorize2;\n endauthorize += endauthorize1+data.endAuthorize[i].devName+endauthorize2+data.endAuthorize[i].devName+endauthorize3+data.endAuthorize[i].devStatus+endauthorize4+data.endAuthorize[i].devId+endauthorize5;\n }\n if(act == \"0\"){\n $(\"#nav-left-offcanvas\").hide();\n $(\"#table\").attr(\"style\",\"margin-left:100px\");\n document.getElementById(\"project_name\").innerHTML=\"项目名称\";\n showtext = newtext+modifytext+endnew;\n }else if(act == \"1\"){\n $(\"#nav-left-offcanvas\").hide();\n $(\"#table\").attr(\"style\",\"margin-left:100px\");\n document.getElementById(\"project_name\").innerHTML=\"项目名称\";\n showtext = proofreadtext+endproofread;\n }else if(act == \"2\"){\n $(\"#nav-left-offcanvas\").hide();\n $(\"#table\").attr(\"style\",\"margin-left:100px\");\n document.getElementById(\"project_name\").innerHTML=\"项目名称\";\n showtext = audittext+endaudit;\n }else if(act == \"3\"){\n $(\"#nav-left-offcanvas\").hide();\n $(\"#table\").attr(\"style\",\"margin-left:100px\");\n document.getElementById(\"project_name\").innerHTML=\"项目名称\";\n showtext = authorizetext+endauthorize;\n }else{\n $(\"#nav-left-offcanvas\").show();\n $(\"#table\").removeAttr(\"style\");\n document.getElementById(\"project_name\").innerHTML=\"待完成项目\";\n showtext = newtext+proofreadtext+audittext+authorizetext+modifytext;\n }\n\n // showtext = newtext+proofreadtext+audittext+authorizetext+modifytext;\n\n return showtext;\n}", "function drawTableFilms(film){\n\t\tinfoFilms = $('#tableContent').html();\n\t\tinfoFilms += \"<tr>\"+\n\t\t\t\"<td><img src='/img/Films/\"+ IgnoreSpecialCharactersFromString(film.title)+ \".jpg' class='charactersIMG center-block'</td>\"+\n\t\t\t\"<td><b>Title: </b>\"+ film.title+\"</td>\"+\n\t\t\t\"<td><b>Director: </b>\"+ film.director+\"</td>\"+\n\t\t\t\"<td><b>Producer: </b>\"+ film.producer+\" Years</td>\"+\n\t\t\t\"<td><b>Release Date: </b>\"+ film.release_date+\"</td>\"+\n\t\t\t// \"<td><b>Created: </b>\"+ film.created+\"</td>\"+\n\t\t\t// \"<td><b>Edited: </b>\"+ film.edited+\" </td>\"+\n\t\t\t\"<td><b>Characters: </b>\"+drawModal(film.characters, film.title+\"Characters\", 'people')+\"</td>\"+\n\t\t\t\"<td><b>Species: </b>\"+drawModal(film.species, film.title+\"Species\", 'species')+\"</td>\"+\n\t\t\t\"<td><b>Starships: </b>\"+drawModal(film.starships, film.title+\"Starships\", 'starships')+\"</td>\"+\n\t\t\t\"<td><b>Vehicles: </b>\"+drawModal(film.vehicles, film.title+\"Vehicles\", 'vehicles')+\"</td>\"+\n\t\t\t\"</tr>\";\n\n\t\t$table.html(infoFilms);\n\t}", "function updateDrawingTextOfAPeer(oldTextObj, newTextObj) {\n oldTextObj.setText(newTextObj.text);\n}", "function displayData(data){\n tbody.text(\"\")\n data.forEach(function(ufo_sighting){\n new_table_row = tbody.append(\"tr\")\n Object.entries(ufo_sighting).forEach(function([key, value]){\n new_table_cell = new_table_row.append(\"td\").text(value)\n }) \n })}", "function displayData(data){\n tbody.text(\"\")\n data.forEach(function(ufo_sighting){\n new_table_row = tbody.append(\"tr\")\n Object.entries(ufo_sighting).forEach(function([key, value]){\n new_table_cell = new_table_row.append(\"td\").text(value)\n }) \n })}", "set setText (text) {\n this.text = text;\n }", "function fLabel(result) {\n \tif(result != null){\n \t\tif(result.length > 7) result = result.substring(0,7);\n \t\tresult = result.toUpperCase();\n \t\tclickedCell.text(result);\n \t\tclickedCell.css(\"color\",\"black\");\n \t\tlabels.push(result);\n \t\tthis.edited = true;\n \t}\n }", "function showText(txt) {\n labelText = txt;\n}", "function setAllHorseText(textVal){\n $scope.horses.forEach(function(horse) {\n horse.horseText = textVal\n })\n }", "function displayFactAuthor(currentFact, positionId) {\n var authorName = \"Anonymous\";\n if (currentFact.user.hasOwnProperty('name')) {\n authorName = \"- \" + currentFact.user.name.first + \" \" + currentFact.user.name.last;\n }\n document.getElementById(positionId).innerHTML = authorName;\n}", "function Detailtable(){\r\n\t\t// create table\r\n\ttable = anychart.standalones.table(3,3);\r\n\t\r\n\t // settings for the first column\r\n\ttable.getRow(0)\r\n .height(63.33) // set column width\r\n .cellFill(\"#37474f\") // set column background color\r\n\t\r\n\ttable.getRow(1)\r\n .height(63.33) // set column width\r\n .cellFill(\"#37474f\") \r\n\t\r\n\ttable.getRow(2)\r\n .height(63.33) // set column width\r\n .cellFill(\"#37474f\") \r\n\r\n\ttable.getCol(0).width(90);\r\n\ttable.getCol(1).width(90);\r\n\ttable.getCol(2).width(95);\r\n\t\r\n\ttable.getCell(0, 0).colSpan(3).content('Children,Old, Working Age per Borough')\r\n\t.fontSize(10);\r\n\ttable.getCell(1, 0).content('Child AGE(%)')\r\n\t.fontSize(8);\r\n\ttable.getCell(1, 1).content('Old AGE(%)')\r\n\t.fontSize(8);\r\n\ttable.getCell(1, 2).content('Working AGE(%)')\r\n\t.fontSize(8);\r\n\ttable.getCell(2, 0).content(child);\r\n\ttable.getCell(2, 1).content(old);\r\n\ttable.getCell(2, 2).content(working);\r\n\t\r\n\r\n\ttable.cellBorder(\"#b0bec5\").hAlign(\"center\").vAlign(\"middle\");\r\n\ttable.cellPadding(0) // set 10px padding from each border of every cell\r\n\t .fontWeight(90) // set text font weight\r\n\t .fontSize(16) // set text font size\r\n\t .fontColor('#b0bec5'); // set text font color\r\n\r\n\ttable.draw();\r\n\t// add a listener\r\n\t// floodtable.listen(\"pointClick\", highlightTable);\r\n\treturn table\r\n}", "function fnShowComicsTable(data) {\n //1 prepare data (use another function, fnShowComicsPrep)\n //2 display data\n\n /* \n display a table with rows for each comic\n a column for the title, and number\n and an icon for \"view details\"\n then a pop-up with the details\n */\n \n var str = \"<table> <tr> <th>Title</th> <th>#</th> <th>Details</th> </tr>\";\n\n for (var i = 0; i < data.length; i++){\n //data-[whatever] is an HTML5 attribute\n //we can invent any data-[whatever] and populate it\n //with anything we want\n //in our case, set it to the _id of the comic in this row\n //when a user clicks any of the speech bubbles, js wil know which comic we meant\n //because of the _id associated with the row\n str += \"<tr data-id='\" + data[i].doc._id + \"'> <td>\" + data[i].doc.title + \"</td> <td>\" + data[i].doc.number + \"</td> <td class='btnShowComicsInfo'>&#x1F4AC;</td> </tr>\";\n }; //END for loop\n\n str += \"</table > \";\n\n $elShowComicsTable.html(str);\n }", "function ibdof_tweaks() {\r\n \r\n // tweak the formatting for the forum listing on Index.php\r\n if (/index/i.test(window.location.pathname))\r\n formatIndexPage();\r\n \r\n // set a class-name for the genre description cell\r\n if (/IBDOF-genrelist/i.test(window.location.pathname)) {\r\n dev = document.evaluate(\r\n \"//table[2]/tbody/tr/td[3]\", \r\n document, \r\n null, \r\n XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);\r\n \r\n for (i = 0; i < dev.snapshotLength; i++)\r\n dev.snapshotItem(i).className += ' genre';\r\n }\r\n\r\n // alphabetic letter links in author/series table header - remove the font color override from the html code\r\n if (/IBDOF-authorlist|IBDOF-serieslist/i.test(window.location.pathname)) {\r\n dev = document.evaluate(\r\n \"//table[2]/tbody/tr[1]/th//font\", \r\n document, \r\n null, \r\n XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);\r\n \r\n for (i = 0; i < dev.snapshotLength; i++)\r\n dev.snapshotItem(i).color = '';\r\n }\r\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 SetTextHeadingValue(obj,value){\n // Resolve the special characters.\n var dom = obj._element;\n \n dom.innerHTML=EncodeHTMLTag(value);\n}", "function joinText() {\n utilitymanager_1.um.utilityManager({\n utilType: utilitymanager_1.um.TIXUtilityType.utInTransform,\n sp: utilitymanager_1.um.TIXSelPolicy.All,\n pat: /\\n/g,\n repl: '',\n });\n }", "function explanationText(varText, delay, delayStep) {\n\td3.select(\"#explanation\")\n\t\t.transition().duration(1000).delay(delay*delayStep)\n\t\t.style(\"opacity\",0)\n\t\t.call(endall, function() {\n\t\t\t\td3.select(\"#explanation\")\n\t\t\t\t\t.html(varText);\t\n\t\t})\n\t\t.transition().duration(1000)\n\t\t.style(\"opacity\",1);\t\n}", "function replaceFortuneText(fortune) {\n $('#fortune-text').html(fortune);\n}", "reportNoData(){\r\n this.hasData = false;\r\n this.actValText = \"****\";\r\n }", "setAnnotation(text) {\n this.annotation = text;\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", "updateTextDescription(activeCountry, activeYear) {\n // ******* TODO: PART 4 *******\n // Update the text elements in the infoBox to reflect:\n // Selected country, region, population and stats associated with the country.\n /*\n * You will need to get an array of the values for each category in your data object\n * hint: you can do this by using Object.values(this.data)\n * you will then need to filter just the activeCountry data from each array\n * you will then pass the data as paramters to make an InfoBoxData object for each category\n *\n */\n\n //TODO - your code goes here -\n }", "function UFOsighting(data) {\n tbody.text(\"\")\n data.forEach((sighting)=>{\n var row = tbody.append(\"tr\");\n Object.entries(sighting).forEach(function([key, value]) {\n var cell = row.append(\"td\");\n cell.text(value);\n \n });\n})}", "function updateMainDataTable(currDataCell){\n $(\"#main_data_content\")\n .append($(\"<tr/>\")\n .append($(\"<td/>\", {text: currDataCell.Name}))\n .append($(\"<td/>\", {text: currDataCell.Title}))\n .append($(\"<td/>\", {text: currDataCell.Remuneration}))\n .append($(\"<td/>\", {text: currDataCell.Department}))\n .append($(\"<td/>\", {text: currDataCell.Expenses})));\n }" ]
[ "0.5730968", "0.5560151", "0.5478787", "0.5443164", "0.5415416", "0.5345215", "0.5345215", "0.532174", "0.5284046", "0.5278402", "0.5278402", "0.52751315", "0.52326137", "0.52229834", "0.5205857", "0.5204834", "0.5188104", "0.5175853", "0.51694655", "0.51694655", "0.51572", "0.51359767", "0.51001257", "0.50870246", "0.50822824", "0.50759906", "0.5072552", "0.5069267", "0.5069267", "0.5069267", "0.5069267", "0.5069267", "0.5069267", "0.5069267", "0.50589913", "0.5049983", "0.5041689", "0.5040264", "0.50284404", "0.5014898", "0.50021523", "0.50021523", "0.5001402", "0.49969384", "0.49716425", "0.49695772", "0.49627644", "0.49531677", "0.49517578", "0.49509287", "0.4950453", "0.49453282", "0.4930236", "0.4930236", "0.4930236", "0.49246103", "0.49210578", "0.49190503", "0.49172145", "0.49149704", "0.49118376", "0.49106276", "0.49076512", "0.4903648", "0.49033895", "0.49031445", "0.48994392", "0.48960236", "0.4895109", "0.4892679", "0.4889742", "0.4886391", "0.48844486", "0.4881477", "0.48795107", "0.4878526", "0.4865184", "0.48624536", "0.48554954", "0.48551813", "0.48551813", "0.48483524", "0.484313", "0.4841163", "0.4841064", "0.48390174", "0.48378915", "0.48302287", "0.4815636", "0.48152086", "0.48126122", "0.4812597", "0.48013785", "0.47955295", "0.47941566", "0.47931275", "0.47915292", "0.4789786", "0.47891256", "0.4787331" ]
0.74685097
0
================================================================================== =================================================================================== Sets if a fireball has been seen which is the final table of the data view. ===================================================================================
function setFireballSeen(fireArray) { var impTbl = document.getElementById("FireballTable"); //impTbl.innerHTML = ""; var keys = fireArray.keys() var values = fireArray.values(); var tableData = ""; //if dist is 0 do not display the exposure, the last value in the fire array. var display_exposure = dist == 0? 1: 0; for (var i = 0; i < keys.length - display_exposure;i++) { if (i % 2 && i != 0) tableData = tableData + "<tr><td>"+ keys[i]+ "</td><td>" + values[i] + "</td></tr>"; else tableData = tableData + "<tr class=\"alt\"><td>"+ keys[i]+ "</td><td>" + values[i] + "</td></tr>"; }//end for $('#FireballTable').html(tableData); //impTbl.innerHTML = tableData; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function markFlag() {\n let $td = $(this)\n if (unclickable(this)) {\n return false;\n }\n let id = $td.attr(\"id\")\n let cell = game.getCellByID(id);\n if (!cell.hasRevealed) {\n if (cell.hasFlag) {\n cell.hasFlag = false\n flagCount--\n } else {\n cell.hasFlag = true\n flagCount++\n }\n render()\n }\n return false\n}", "toggleViewAllEmployeeTable(){\n\n if(this.viewAllEmployeeTable == false){\n this.viewAllEmployeeTable =true;\n }else {\n this.viewAllEmployeeTable = false;\n }\n\n }", "function WeAreCurrentlyShowingFriendsLeagueTable() {\n\n var CurrentlyShowingFriendsTable = false;\n\n if (displaymode == \"m\") { //movile view\n if (($('#panel3').is(\":visible\") == true) && ($('.FriendsLeaderboard').css('display') == \"block\")) {\n CurrentlyShowingFriendsTable = true;\n }\n }\n else {\n //web view - we are always showing the friends table!!!!!!\n CurrentlyShowingFriendsTable = true;\n }\n return CurrentlyShowingFriendsTable;\n}", "isFlaged(row, column){\n\t\treturn this.table[row][column].flag;\n\t}", "function allTablesHidden() {\n return $(\"table.hidden-table\").length == $(\"table.result\").length;\n}", "allTerritoriesClaimed(){\r\n let claimedCount = 0;\r\n Object.keys(this.mapGrid.hashOfTiles).forEach( pointer => {\r\n let tile = this.mapGrid.hashOfTiles[pointer];\r\n if (tile.status === true){\r\n claimedCount += 1;\r\n }\r\n })\r\n \r\n if (claimedCount === this.mapGrid.size - 6){\r\n this.claimTerritoryPhase = false; // this will NOT be REACTIVATED\r\n this.initialPlacementPhase = true; \r\n } \r\n }", "_hasTable () {\n return 0 < this._tables.length;\n }", "function showTable(stateID) {\n\n let theData;\n\n if (stateID == 0) {\n theData = bigData;\n } else {\n theData = dataset[stateID];\n }\n\n // If there is no shooting we return\n if (!theData || theData.length == 0) {\n return;\n }\n\n svgTable.selectAll('table').remove();\n\n let table = svgTable\n .append(\"table\")\n .attr(\"class\", \"table table-condensed table-striped\");\n\n let thead = table.append(\"thead\");\n thead.html('<th>Date</th><th>City</th><th>Age of shooter</th><th>Number of victims</th><th>Fate of Shooter</th>');\n\n let tbody = table.append(\"tbody\")\n .on(\"wheel.zoom\", function () {\n let direction = d3.event.wheelDelta < 0 ? 'down' : 'up';\n\n if (direction === 'up') {\n tableFirstId--;\n } else {\n tableFirstId++;\n }\n\n showTable(currentId);\n });\n\n let date, age, city, fate, victims;\n\n if (tableFirstId >= theData.length) {\n tableFirstId --;\n }\n\n if (tableFirstId < 0) {\n tableFirstId = 0;\n }\n\n theData.slice(tableFirstId, tableFirstId + 9).forEach(function (d) {\n date = \"Unknown\";\n age = \"-\";\n city = \"Unknown\";\n fate = \"Unknown\";\n victims = \"-\";\n\n if (d.fields.date) {\n date = d.fields.date;\n }\n\n if (d.fields.average_shooter_age) {\n age = d.fields.average_shooter_age;\n }\n\n if (d.fields.city) {\n city = d.fields.city;\n }\n\n if (d.fields.fate_of_shooter_at_the_scene) {\n fate = d.fields.fate_of_shooter_at_the_scene;\n }\n\n if (d.fields.number_of_victims_injured) {\n victims = d.fields.number_of_victims_injured;\n }\n\n tbody.append('tr')\n .html(function () {\n return '<td>' + date + '</td>' + '<td>' + city + '</td>' + '<td>' + age + '</td>' + '<td>' + victims + '</td>' + '<td>' + fate + '</td>';\n })\n });\n\n\n // Legend plot\n table.append('g').append(\"text\")\n .attr(\"transform\", \"translate(0,\" + 60 + \")\")\n .attr('y', function (d) {\n return 0;\n })\n .style('font-style', 'italic')\n .text(function (d) {\n if (stateID === 0) {\n return \"Fig. 7 : Different mass shooting in the US\";\n }\n if (stateID < 10) {\n return \"Fig. 7 : Different mass shooting in \" + getKeyByValue(fips, \"0\" + stateID);\n }\n return \"Fig. 7 : Different mass shooting in \" + getKeyByValue(fips, \"\" + stateID);\n }).attr('x', function () {\n return 0;\n });\n}", "function userTableShowOthers() {\n\tvar tbl = document.getElementById('user-stats-table');\n\tvar row = tbl.rows[0];\n\tvar end = row.cells.length-1;\n\tvar idlast = row.cells[end].id;\n\tif (idlast == \"show_others\") return true;\n\treturn false;\n}", "function addRivalStatus(rival, bool) {\n return footballTeam.opponents.forEach(opponent => {\n opponent.name === rival ? opponent.isMyRival = bool : opponent.isMyRival = false\n console.log(footballTeam)\n })\n}", "noResultsOnTable() {\n this.membersList.length ? this.noResults = false : this.noResults = true;\n }", "displayTable() {\n const tableContainer = document.querySelector('#tableContainer');\n if (party.guests.length) {\n tableContainer.style.visibility = 'visible';\n } else {\n tableContainer.style.visibility = 'hidden';\n }\n }", "function checkFireTopoPetsFound() {\n\tif (topoPetsCaught.totalFIRE == getTotalAmountFireTopoPets()) {\n\t\tdocument.getElementById(\"achievementAllFireTopoPets\").style.display = \"block\";\n\t}\n}", "function tableOnClick(x, y) {\n var newLife = !grid[y][x];\n grid[y][x] = newLife;\n var $td = $(\"#\" + x + \"x\" + y);\n if (newLife)\n $td.attr('class', 'live');\n else\n $td.attr('class', 'dead');\n }", "function ToggleAuctionsTable() {\n var img, tbl;\n if ((img = $('AnalyseImg')) && (tbl = $('AuctionsTable'))) {\n var path = 'module/analyse/layout/default/images/';\n tbl.toggle();\n if (!tbl.visible()) {\n // hide auction table\n img.src = path + 'show.gif';\n img.alt = '⇓';\n img.onmouseover = function() { Tip(AnalyseShowAuctions) };\n } else {\n // show auction table\n img.src = path + 'hide.gif';\n img.alt = '⇑';\n img.onmouseover = function() { Tip(AnalyseHideAuctions) };\n }\n }\n return false;\n}", "function genFoughtGrid(){\n for(var i=0;i<fought.length;i++){\n for(var j=0;j<fought.length;j++){\n fought[i][j] = false;\n }\n }\n}", "function isAllDone() {\n\t\tvar allDone = $(\".finnished\");\n\t\tif (num === allDone.length) {\n\t\t\tvar rightCell = $(\".right_cell\");\n\t\t\trightCell.append(\"<p>Yes you did it! Good work</p>\");\n\t\t}\n\t}", "changeTasted(state, beerId) {\n state.indexedBeers[beerId].tasted = !state.indexedBeers[beerId].tasted;\n }", "function RefreshTable() {\n dc.events.trigger(function () {\n alldata = tableDimension.top(Infinity);\n datatable.fnClearTable();\n datatable.fnAddData(alldata);\n datatable.fnDraw();\n });\n }", "function toggleResults() {\n var tableVisibility = document.getElementById(\"dataTable\");\n if (tableVisibility.style.display === \"block\") {\n tableVisibility.style.display = \"none\";\n document.getElementById(\"btnDisplayResults\").innerText=\"View Race Results\";\n } else {\n tableVisibility.style.display = \"block\";\n document.getElementById(\"btnDisplayResults\").innerText=\"Hide Race Results\";\n }\n }", "isSunk() {\n if(this.hits === this.length) {\n this.sunk = true\n }\n \n }", "gameIsFinished() {\n return this.rows[0].some(\n cell => cell.filled \n );\n }", "function updateIsSeen(bool, id){\n var idBase = id.replace(/seenButton_/g, \"\");\n var cellId = \"seenCell_\" + idBase;\n var titleId = \"titleCell_\" + idBase;\n if(bool){\n //If movie was seen\n updateSeenIcon(true, cellId);\n updateIsSeenOnParse($(\"#\" + titleId).html(), true);\n }else{\n //If movie wasnt seen\n updateSeenIcon(false, cellId);\n updateIsSeenOnParse($(\"#\" + titleId).html(), false);\n }\n}", "function show() {\n var bad = false;\n var tbody = document.createElement(\"tbody\");\n for (i = 0; i < dim; i++) {\n var tri = document.createElement(\"tr\");\n for (k = 0; k < dim; k++) {\n var ibody = document.createElement(\"tbody\");\n for (j = 0; j < dim; j++) {\n var trj = document.createElement(\"tr\");\n for (l = 0; l < dim; l++) {\n var text = show_cell(i, j, k, l);\n if (text == '?')\n bad = true;\n var node = document.createTextNode(text);\n var tdl = document.createElement(\"td\");\n if (board[i][j][k][l].set != previous[i][j][k][l].set)\n tdl.setAttribute(\"class\", \"changed\");\n tdl.setAttribute(\"align\", \"center\");\n tdl.appendChild(node);\n trj.appendChild(tdl);\n }\n ibody.appendChild(trj);\n }\n var itbl = document.createElement(\"table\");\n itbl.setAttribute(\"border\", 1);\n itbl.setAttribute(\"width\", \"100%\");\n itbl.appendChild(ibody);\n var tdk = document.createElement(\"td\");\n tdk.setAttribute(\"align\", \"center\");\n tdk.appendChild(itbl);\n tri.appendChild(tdk);\n }\n tbody.appendChild(tri);\n }\n var tbl = document.createElement(\"table\");\n tbl.setAttribute(\"border\", 1);\n tbl.setAttribute(\"align\", \"center\");\n tbl.appendChild(tbody);\n document.body.appendChild(tbl);\n window.scrollBy(0, 1000);\n duplicate(previous, board);\n return bad;\n}", "function lander_table( lander, isnew = true ){\n var table = {};\n if(isnew){ \n table = {' ': [ ' ', 'current', 'New', '']};\n }\n for( let key in engine.perks.lander ) if(key != 'initial_resources')\n if(landerperks[key]) {\n /* Add the new and the old value to the table for displaying */\n let title_span = $(\"<span><\\span>\").text(landerperks[key].title);\n title_span.mouseenter( function(){ display.showtooltip(this,landerperks[key].description); } );\n title_span.mouseout( function(){ display.hidetooltip(); } );\n table[key] = [title_span];\n\n if(isnew) {\n let n=1;\n if( engine.next_perks.lander[key] )\n n = Math.floor(engine.next_perks.lander[key]*100)/100;\n table[key][1] = [n.toPrecision(3)];\n n = Math.floor(lander[key]*100)/100;\n table[key][2] = [n.toPrecision(3)];\n\n if( engine.state.unlocks.geneticengineering == 'unlocked' ){\n /* Allows the player to select individual traits */\n let addbutton = $(\"<span><\\span>\").text('Isolate');\n addbutton.addClass(\"btn btn-info\");\n addbutton.click( function(){\n isolate_trait(lander, key);\n display.hidetooltip();\n display.dismissPopup();\n });\n addbutton.mouseenter( function(){\n display.showtooltip(addbutton,'Pick only this feature, but destroy the egg') ; \n } );\n addbutton.mouseout( function(){ display.hidetooltip(); } ); \n table[key][3] = [addbutton];\n } else {\n table[key][3] = [''];\n }\n } else {\n let n=Math.floor(engine.next_perks.lander[key]*100)/100;\n table[key][1] = [n.toPrecision(3)];\n }\n }\n return table;\n}", "function tableCompleted(tableId){\n $(tableId).parent().parent().parent().collapse(\"toggle\");\n $(tableId).parent().parent().parent().prev().removeClass('card-header');\n $(tableId).parent().parent().parent().prev().addClass('colour-complete');\n $(tableId).parent().parent().parent().prev().children('.float-right').children('a').text(\"Completed\");\n}", "function class_showTablesNow()\r\n\t{\r\n\t\tvar\t\ttbl = document.getElementById( \"browseTableDefn2\" );\r\n\t\t\t\r\n\t\tif ( tbl != null )\r\n\t\t{\t\r\n\t\t\tvar\t\tarrayPageSize;\r\n\t\t\r\n\t\t\tvar\t\ttblStyle = tbl.style;\r\n\r\n\t\t\ttblStyle.display = \"block\";\r\n\r\n\t\t\tif ( flashTableRefresh )\r\n\t\t\t{\r\n\t\t\t\tif ( totalPages !== currentPageNum )\r\n\t\t\t\t{\r\n\t\t\t\t\t// Currently the only time the window needs to be flashed is\r\n\t\t\t\t\t// when the pagesize changes of the last page of results.\r\n\t\t\t\t\t// Going to assume for the time being to scroll to the bottom of the page\r\n\t\t\t\t\t// when not on the last page.\r\n\t\t\t\t\tarrayPageSize = getPageSize();\r\n\r\n\t\t\t\t\twindow.scrollTo( 0, arrayPageSize[3] );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tflashTableRefresh = false;\r\n\t\t\t\r\n\t\t\tif ( window.Sidebar !== undefined && Sidebar !== undefined && Sidebar.initialized )\r\n\t\t\t{\r\n\t\t\t\tSidebar.setClickerHeight();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function setTable() {\n var elemT = $(\"#in_tableh\");\n if (elemT.html() == \"true\") {\n elemT.html(\"false\");\n if ($(\"#is_ownerh\").html() == \"true\")\n sittedTable = new Table($(\"#table_idh\").html(),true);\n else\n sittedTable = new Table($(\"#table_idh\").html(),false);\n }\n}", "function renderTable() {\n clearTable();\n showTable();\n}", "function toggleResultTable(showTable) {\n var table = document.getElementById(\"resultArea\");\n if (showTable) {\n table.style.display = \"block\";\n checkPages();\n updateDisplayedPage()\n } else {\n table.style.display = \"none\";\n }\n}", "onRendering() {\n this.set('tableIsLoading', false);\n }", "function showTable(state = initialState, action) {\n let nextState\n switch (action.type) {\n case 'MarkerCreated':\n nextState = { \n ...state, \n clicked : true, // make the clicked to false to detect that the marker is clicked \n }\n return nextState || state\n case 'MarkerSubmited':\n nextState = { \n ...state, \n clicked : false, // make the clicked to false to detect that the marker is clicked \n }\n return nextState || state\n case 'LineCreated':\n nextState = {\n ...state,\n clicked : true\n }\n return nextState || state\n case 'LineSubmited':\n nextState = {\n ...state,\n clicked : false\n }\n return nextState || state\n case 'PolygoneCreated':\n nextState = {\n ...state,\n clicked : true\n }\n return nextState || state\n case 'PolygoneSubmited':\n nextState = { \n ...state, \n clicked : false, // make the clicked to false to detect that the marker is clicked \n }\n return nextState || state\n default:\n return state\n }\n }", "function refreshTableInfo() {\n var show_squawk_warning = false;\n\n TrackedAircraft = 0\n TrackedAircraftPositions = 0\n TrackedHistorySize = 0\n\n $(\".altitudeUnit\").text(get_unit_label(\"altitude\", DisplayUnits));\n $(\".speedUnit\").text(get_unit_label(\"speed\", DisplayUnits));\n $(\".distanceUnit\").text(get_unit_label(\"distance\", DisplayUnits));\n $(\".verticalRateUnit\").text(get_unit_label(\"verticalRate\", DisplayUnits));\n\n for (var i = 0; i < PlanesOrdered.length; ++i) {\n\tvar tableplane = PlanesOrdered[i];\n TrackedHistorySize += tableplane.history_size;\n\tif (tableplane.seen >= 58 || tableplane.isFiltered()) {\n tableplane.tr.className = \"plane_table_row hidden\";\n } else {\n TrackedAircraft++;\n var classes = \"plane_table_row\";\n\n if (tableplane.position !== null && tableplane.seen_pos < 60) {\n ++TrackedAircraftPositions;\n\t\t}\n\n\t\tif (tableplane.getDataSource() === \"adsb_icao\") {\n \tclasses += \" vPosition\";\n } else if (tableplane.getDataSource() === \"tisb_trackfile\" || tableplane.getDataSource() === \"tisb_icao\" || tableplane.getDataSource() === \"tisb_other\") {\n \tclasses += \" tisb\";\n } else if (tableplane.getDataSource() === \"mlat\") {\n \tclasses += \" mlat\";\n } else {\n \tclasses += \" other\";\n }\n\n\t\tif (tableplane.icao == SelectedPlane)\n classes += \" selected\";\n \n if (tableplane.squawk in SpecialSquawks) {\n classes = classes + \" \" + SpecialSquawks[tableplane.squawk].cssClass;\n show_squawk_warning = true;\n\t\t}\t\t\t \n\n // ICAO doesn't change\n if (tableplane.flight) {\n tableplane.tr.cells[2].innerHTML = getFlightAwareModeSLink(tableplane.icao, tableplane.flight, tableplane.flight);\n } else {\n\t\t // Show _registration if ident is not present\n\t\t tableplane.tr.cells[2].innerHTML = (tableplane.registration !== null ? getFlightAwareIdentLink(tableplane.registration, '_' + tableplane.registration) : \"\");\n }\n tableplane.tr.cells[3].textContent = (tableplane.registration !== null ? tableplane.registration : \"\");\n tableplane.tr.cells[4].textContent = (tableplane.icaotype !== null ? tableplane.icaotype : \"\");\n tableplane.tr.cells[5].textContent = (tableplane.squawk !== null ? tableplane.squawk : \"\");\n tableplane.tr.cells[6].innerHTML = format_altitude_brief(tableplane.altitude, tableplane.vert_rate, DisplayUnits);\n tableplane.tr.cells[7].textContent = format_speed_brief(tableplane.gs, DisplayUnits);\n tableplane.tr.cells[8].textContent = format_vert_rate_brief(tableplane.vert_rate, DisplayUnits);\n tableplane.tr.cells[9].textContent = format_distance_brief(tableplane.sitedist, DisplayUnits);\n tableplane.tr.cells[10].textContent = format_track_brief(tableplane.track);\n tableplane.tr.cells[11].textContent = tableplane.messages;\n tableplane.tr.cells[12].textContent = tableplane.seen.toFixed(0);\n tableplane.tr.cells[13].textContent = (tableplane.rssi !== null ? tableplane.rssi : \"\");\n tableplane.tr.cells[14].textContent = (tableplane.position !== null ? tableplane.position[1].toFixed(4) : \"\");\n tableplane.tr.cells[15].textContent = (tableplane.position !== null ? tableplane.position[0].toFixed(4) : \"\");\n tableplane.tr.cells[16].textContent = format_data_source(tableplane.getDataSource());\n tableplane.tr.cells[17].innerHTML = getAirframesModeSLink(tableplane.icao);\n tableplane.tr.cells[18].innerHTML = getFlightAwareModeSLink(tableplane.icao, tableplane.flight);\n tableplane.tr.cells[19].innerHTML = getFlightAwarePhotoLink(tableplane.registration);\n tableplane.tr.className = classes;\n\t}\n}\n\nif (show_squawk_warning) {\n $(\"#SpecialSquawkWarning\").css('display','block');\n } else {\n $(\"#SpecialSquawkWarning\").css('display','none');\n }\n\n resortTable();\n}", "function showAll() {\n setAll(true)\n setObtained(false)\n setNotObtained(false)\n setSoft(false)\n setTech(false)\n }", "function showHistory(){\n if ($('tbody').has(\"tr\").length) {\n $(\"#history-wrapper\").css(\"opacity\",\"1\");\n }\n}", "function showRound1Or2Table() {\n hideAllTables();\n document.getElementById(\"game-table\").style.display = \"inline-table\";\n}", "function showTableView(breakDownType,subSection,dataAll){\n\t\tvar view = this;\n\t\tvar $e = view.$el;\n\t\tvar reportType = view.reportType;\n\t\tvar data = \"\";\n\t\tvar $sectionSharing = $e.find(\".sectionSharingTable\")\n\t\t\n\t\tif(typeof dataAll == \"undefined\"){\n\t\t\t$sectionSharing.html(\"\");\n\t\t\t$sectionSharing.append(\"<div class='noData'>No Data!</div>\");\n\t\t}else{\n\t\t\t$sectionSharing.html(\"<span class=\\\"report-rendering-gif\\\">&nbsp;</span><span style='margin-left:5px;'>Rendering chart...</span>\");\n\t\t\tshowSummary.call(view,breakDownType,subSection,\"table\",dataAll);\n\t\t\t\n\t\t\tvar tableDataInfo;\n\t\t\tvar tableColumns = [];\n\t\t\t\n\t\t\tif(subSection == \"shareToSocial\"){\n\t\t\t\tdata = dataAll.offerPerformances;\n\t\t\t\ttableDataInfo ={\n\t\t\t\t\ttableColumns: tableColumns,\n\t\t\t\t\ttableData:[],\n\t\t\t\t\treportType:reportType,\n\t\t\t\t\tmaxSize:90\n\t\t\t\t};\n\t\t\t\tif(breakDownType == \"mailing\"){\n\t\t\t\t\ttableDataInfo.maxSize = 50;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//change the column when different breakDownType\n\t\t\t\ttableDataInfo = smr.addTableColumn(tableDataInfo,breakDownType);\n\t\t\t\t\n\t\t\t\ttableColumns.push({name:\"Sharers\",label:\"Sharers\"});\n\t\t\t\ttableColumns.push({name:\"totalShareCount\",label:\"Share Count\"});\n\t\t\t\ttableColumns.push({name:\"totalClicks\",label:\"Clicks\"});\n\t\t\t\t\n\t\t\t\tfor(var i = 0; i < data.length; i++){\n\t\t\t\t\tvar rowData = data[i];\n\t\t\t\t\tif(rowData){\n\t\t\t\t\t\tvar resultData = {\n\t\t\t\t\t\t\t\"Sharers\":smr.checkNumber(rowData.offerShares),\n\t\t\t\t\t\t\t\"Share Count\":smr.checkNumber(rowData.totalOfferShareCount),\n\t\t\t\t\t\t\t\"Clicks\":smr.checkNumber(rowData.totalOfferClicks)\n\t\t\t\t\t\t};\n\t\t\t\t\t\t\n\t\t\t\t\t\t//add the column data\n\t\t\t\t\t\tresultData = addTableColumnDataForSharing(resultData,rowData,breakDownType,reportType);\n\t\t\t\t\t\t\n\t\t\t\t\t\ttableDataInfo.tableData.push(resultData);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else if(subSection == \"shareOffers\"){\n\t\t\t\tdata = dataAll.offerNamePerformances;\n\t\t\t\tif(typeof data == \"undefined\"){\n\t\t\t\t\tdata= \"\";\n\t\t\t\t}\n\t\t\t\ttableDataInfo ={\n\t\t\t\t\ttableColumns: tableColumns,\n\t\t\t\t\ttableData:[],\n\t\t\t\t\treportType:reportType,\n\t\t\t\t\tmaxSize:80\n\t\t\t\t};\n\t\t\t\tif(breakDownType == \"mailing\"){\n\t\t\t\t\ttableDataInfo.maxSize = 46;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//change the column when different breakDownType\n\t\t\t\ttableDataInfo = smr.addTableColumn(tableDataInfo,breakDownType);\n\t\t\t\t\n\t\t\t\ttableColumns.push({name:\"Offer\",label:\"Offer\",isAlignLeft:true});\n\t\t\t\ttableColumns.push({name:\"Sharers\",label:\"Sharers\"});\n\t\t\t\ttableColumns.push({name:\"totalShareCount\",label:\"Share Count\"});\n\t\t\t\ttableColumns.push({name:\"totalClicks\",label:\"Clicks\"});\n\t\t\t\t\n\t\t\t\tfor(var i = 0; i < data.length; i++){\n\t\t\t\t\tvar rowData = data[i];\n\t\t\t\t\tif(rowData){\n\t\t\t\t\t\tvar resultData = {\n\t\t\t\t\t\t\t\t\"Offer\":rowData.offerName,\n\t\t\t\t\t\t\t\t\"Share Count\":smr.checkNumber(rowData.totalOfferShareCount),\n\t\t\t\t\t\t\t\t\"Sharers\":smr.checkNumber(rowData.offerShares),\n\t\t\t\t\t\t\t\t\"Clicks\":smr.checkNumber(rowData.totalOfferClicks)\n\t\t\t\t\t\t};\n\t\t\t\t\t\t\n\t\t\t\t\t\t//add the column data\n\t\t\t\t\t\tresultData = addTableColumnDataForSharing(resultData,rowData,breakDownType,reportType);\n\t\t\t\t\t\t\n\t\t\t\t\t\ttableDataInfo.tableData.push(resultData);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else if(subSection == \"ftaf\"){\n\t\t\t\tdata = dataAll.ftafPerformanceList;\n\t\t\t\ttableDataInfo ={\n\t\t\t\t\ttableColumns: tableColumns,\n\t\t\t\t\ttableData:[],\n\t\t\t\t\treportType:reportType,\n\t\t\t\t\tmaxSize:50\n\t\t\t\t};\n\t\t\t\tif(breakDownType == \"mailing\"){\n\t\t\t\t\ttableDataInfo.maxSize = 26;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//change the column when different breakDownType\n\t\t\t\ttableDataInfo = smr.addTableColumn(tableDataInfo,breakDownType);\n\t\t\t\t\n\t\t\t\ttableColumns.push({name:\"Forwarders\",label:\"Forwarders\"});\n\t\t\t\ttableColumns.push({name:\"Forwarded Messages\",label:\"Forwarded Messages\"});\n\t\t\t\ttableColumns.push({name:\"Clickers\",label:\"Clickers\"});\n\t\t\t\ttableColumns.push({name:\"Openers\",label:\"Openers\"});\n\t\t\t\ttableColumns.push({name:\"Subscribers\",label:\"Subscribers\"});\n\t\t\t\ttableColumns.push({name:\"Viral Factor\",label:\"Viral Factor\"});\n\t\t\t\t\n\t\t\t\tfor(var i = 0; i < data.length; i++){\n\t\t\t\t\tvar rowData = data[i];\n\t\t\t\t\tif(rowData){\n\t\t\t\t\t\tvar resultData = {\n\t\t\t\t\t\t\t\"Forwarders\":smr.checkNumber(rowData.forwaders),\n\t\t\t\t\t\t\t\"Forwarded Messages\":smr.checkNumber(rowData.forwarededMessages),\n\t\t\t\t\t\t\t\"Viral Factor\":smr.checkNumber(rowData.viralFactor),\n\t\t\t\t\t\t\t\"Openers\":smr.checkNumber(rowData.openers),\n\t\t\t\t\t\t\t\"Clickers\":smr.checkNumber(rowData.clickers),\n\t\t\t\t\t\t\t\"Subscribers\":smr.checkNumber(rowData.subscribers)\n\t\t\t\t\t\t};\n\t\t\t\t\t\t\n\t\t\t\t\t\t//add the column data\n\t\t\t\t\t\tresultData = addTableColumnDataForSharing(resultData,rowData,breakDownType,reportType);\n\t\t\t\t\t\t\n\t\t\t\t\t\ttableDataInfo.tableData.push(resultData);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t//check whether need to do sortMetrics\n\t\t\ttableDataInfo.skipSortMetrics = true;\n\t\t\tvar title = smr.buildTitleValue(breakDownType);\n\t\t\ttableDataInfo.title=\"Sharing by \"+title;\n\t\t\ttableDataInfo.smaclass=\"SMA-REPORT-SHARINGDATATABLE\";\n\t\t\tbrite.display(\"dataTable\",$e.find(\".sectionSharingTable\"),tableDataInfo);\n\t\t}\n\t}", "function checkForPlayed() { // Function that resets the \"played\" counter\n let playedCount = 0; // if all movies are \"played\"\n\n for(i=0; i!=keys.length; i++) {\n if(db[keys[i]].played == true) {\n playedCount++;\n }\n }\n\n if(playedCount == keys.length) {\n for(i=0; i!=keys.length; i++) {\n db[keys[i]].played = false;\n }\n }\n}", "flag(){\n \n if(this.currentState == 'hidden') // allow flag option only if cell is hidden\n this.currentState = 'flagged';\n\n else if(this.currentState == 'flagged') // remove flag from cell\n this.currentState = 'hidden';\n \n }", "function setIsFinal() {\r\n var nPiecesFound = 0;\r\n for (var i in that.finalPieces) {\r\n var finalPiece = that.finalPieces[i];\r\n for (var j in that.pieces) {\r\n var piece = that.pieces[j];\r\n if (finalPiece.equals(piece)) {\r\n nPiecesFound++;\r\n break;\r\n }\r\n }\r\n }\r\n that.isFinal = nPiecesFound == that.finalPieces.length;\r\n }", "_updateNoDataRow() {\n if (this._noDataRow) {\n const shouldShow = this._rowOutlet.viewContainer.length === 0;\n if (shouldShow !== this._isShowingNoDataRow) {\n const container = this._noDataRowOutlet.viewContainer;\n shouldShow ? container.createEmbeddedView(this._noDataRow.templateRef) : container.clear();\n this._isShowingNoDataRow = shouldShow;\n }\n }\n }", "TableroLleno() {\n return this.Estado.every(cell => cell);\n }", "function Advise_Person(data){\n sections[\"screenThinking\"].style.visibility = \"collapse\";\n\n //document.getElementById('showFlag').innerText = data.redFlag; //tracking bug section\n\n if(data.redFlag > 1 ){\n sections[\"screenRed\"].style.visibility = \"visible\";\n } else {\n sections[\"screenGreen\"].style.visibility = \"visible\";\n }\n}", "function updateWhatToShow() {\n\tvar whatToShow = getValue(\"whatToShow\");\n\tvar showSinglePeriod = false;\n\tvar showCompare2periods = false;\n\tvar showThroughTime = false;\n\tvar showDistribution = false;\n\tvar showAllNoneGraphsTD = true;\n\tswitch (whatToShow) {\n\t\tcase \"SINGLE_PERIOD\":\n\t\t\tshowSinglePeriod = true;\n\t\t\tshowAllNoneGraphsTD = false;\n\t\t\tbreak;\n\t\tcase \"COMPARE_PERIODS\":\n\t\t\tshowCompare2periods = true;\n\t\t\tbreak;\n\t\tcase \"THROUGH_TIME\":\n\t\t\tshowThroughTime = true;\n\t\t\tswitchThroughTimeRange();\n\t\t\tbreak;\n\t\tcase \"DISTRIBUTION\":\n\t\t\tshowDistribution = true;\n\t\t\tshowAllNoneGraphsTD = false;\n\t\t\tbreak;\n\t}\n\t$$('td.singlePeriod').each(function(td) {td[showSinglePeriod ? 'show' : 'hide']()});\n\t$$('td.compare2periods').each(function(td) {td[showCompare2periods ? 'show' : 'hide']()});\n\t$$('td.throughTime').each(function(td) {td[showThroughTime ? 'show' : 'hide']()});\n\t$$('td.distribution').each(function(td) {td[showDistribution ? 'show' : 'hide']()});\n\t$('selectAllNoneGraphsTD')[showAllNoneGraphsTD ? 'show' : 'hide']();\n\tswitchAllItemCheckboxes(false);\n}", "function maybe_reveal_one_row(rows, goal) {\n console.log(\"maybe_reveal_one_row, \" + rows.length + \" row(s), \" + rows.not(\".hidden\").length + \" exposed, \" + goal + \" goal.\");\n if (goal === false || rows.not(\".hidden\").length < goal) {\n var next = rows.filter(\".hidden:last\");\n if (next.length > 0) {\n reveal_one_row(next.removeClass('hidden'));\n return true;\n }\n }\n return false;\n}", "function getRecord(dataset, tabletop) {\n //find the total users \n var user_num = dataset.length;\n // console.log(\"user_num = \" + user_num);\n //Repeat for all opponents\n for (count=0; count<opponents.length; count++){\n //select only entries that match the selected opponent\n var dataset_opp = jQuery.grep(dataset, function (n, i) {\n return (n.opponent == opponents[count].seat);\n },false);\n // console.log(\"dataset_opp = \" + JSON.stringify(dataset_opp));\n //select only entries of which the opponent won\n var dataset_opp_win = jQuery.grep(dataset_opp, function (n, i) {\n return (n.result == \"lose\");\n },false);\n var win_num = dataset_opp_win.length + oldTotal[count];\n // console.log(\"win_num \" + opponents[count].seat + \" = \" + win_num);\n $(\"#\" + (count+1) + \" .uk-label\").text(win_num + \" kemenangan\");\n }\n }", "function tableCompletenessSelected() {\n //console.log(dqFactory.completeness.variables);\n\n var content = dqFactory.getActualContent();\n angular.forEach(dqFactory.completeness.variables, function (item) {\n if (item.state.selected) {\n //console.log(\"item.name\", item.name);\n\n //update statistics\n var row = dqFactory.row4tableCompleteness(item.name, content);\n //console.log(\"row updated: \", row);\n item.statistics.present = row.present;\n item.statistics.missing = row.missing;\n\n if(item.state.isNumerical) {\n item.statistics.min = row.min;\n item.statistics.max = row.max;\n item.statistics.mean = row.mean;\n }\n\n }\n });\n return dqFactory.completeness.variables;\n }", "updateIsAboutToFire() {\n let isAboutToFire = false;\n\n // Called every frame, do not allocate closures.\n for ( let i = 0; i < this.waterDrops.length; i++ ) {\n const waterDrop = this.waterDrops[ i ];\n if ( waterDrop.amplitude > 0 && waterDrop.startsOscillation ) {\n\n // Called every frame, break when any match is found for performance\n isAboutToFire = true;\n break;\n }\n }\n this.isAboutToFireProperty.value = isAboutToFire;\n }", "function displayUFOSightings(ufoSightings)\n {\n // Get a reference to the table body\n var tbody = d3.select(\"tbody\");\n\n // Get a reference to the table heading to display the search result count\n var ufoSearchResult = d3.select(\"#ufo-count\");\n\n // Store the count of UFOs in the dataset\n var ufoCount = ufoSightings.length;\n\n // Display results in the table\n if (ufoCount === 0)\n {\n ufoSearchResult.text(\"Sorry, could not find any UFOs..try searching again!\");\n // Remove all rows so we can display all data from scratch based on user input \n d3.selectAll(\"td\").remove();\n }\n else\n {\n ufoSearchResult.text(\"Total UFO Sightings: \" + ufoCount);\n // Remove all rows so we can display all data from scratch based on user input \n d3.selectAll(\"td\").remove();\n\n ufoSightings.forEach((ufo) => \n {\n var row = tbody.append(\"tr\");\n Object.entries(ufo).forEach(([key, value]) => \n {\n var cell = row.append(\"td\");\n if (key == \"state\" || key == \"country\")\n {\n // Convert state and country abbreviations to upper case\n cell.text(value.toUpperCase());\n }\n else\n {\n cell.text(value);\n }\n });\n });\n }\n }", "function loadTableDisplayState() {\n\t var loadingState = true;\n\t var str = YAHOO.util.Cookie.get(RAVIOLI_COOKIE);\n\t if (str) {\n\t\t var l = YAHOO.lang.JSON.parse(str);\n\t\t for (var i = 0; i < l.length; i++) {\n\t\t\t var o = l[i];\n\t\t\t var col = GRAILSUI.resources.getColumn(o.key)\n\t\t\t if (col) {// defensive, in case it doesn't exist.\n\t\t\t\t if (o.hidden) {\n\t\t\t\t\t GRAILSUI.resources.hideColumn(col);\n\t\t\t\t } else {\n\t\t\t\t\t GRAILSUI.resources.showColumn(col);\n\t\t\t\t }\n\t\t\t\t GRAILSUI.resources.setColumnWidth(col,o.width);\n\t\t\t\t GRAILSUI.resources.reorderColumn(col,i);\n\t\t\t }\n\t\t\t \n\t\t }\n\t }\n\t var loadingState = false;\n }", "renderDataTableSuivi(boolean) {\n if (boolean === true) {\n return (\n <DataTable\n candidatures={this.state.candidatures}\n setBrouillon={item => this.setBrouillon(item)}\n />\n );\n }\n }", "function new_status(all_locations){\n var change_status = [];\n for(let i=0; i<all_locations.length; i++){\n if (all_locations[i].on() === false){\n change_status.push(all_locations[i].on());\n }\n }\n if (change_status.length == all_locations.length){\n markers.forEach(function(marker){\n marker.setVisible(true);\n });\n }\n }", "toggleNoResults() {\n\t\tlet max_columns = this.column_name_array.length+1;\n\t\tif (this.total_items === 0) {\n\t\t\tgetComponentElementById(this,\"DataTableBody\").html('<tr id=\"#'+this.getUid()+'_DataTableLoading\"><td' +\n\t\t\t\t' colspan=\"'+max_columns+'\"' +\n\t\t\t\t' style=\"text-align: center;\">No results</td></tr>');\n\t\t\tgetComponentElementById(this,\"DataTableLoading\").show();\n\t\t}\n\t}", "function scroll_one_visible_row_of_standings() {\n do {\n var last_row = $(\".main_table tr[data-roundid]:last\").detach();\n last_row.insertAfter(\".main_table tr.headers\");\n if (last_row.not(\".hidden\")) {\n reveal_one_row(last_row);\n }\n } while ($(\".main_table tbody:first tr[data-roundid]:last\").is(\".hidden\"));\n}", "function update_total_count_summary() {\r\n\t\t\t$('#flight_search_result').show();\r\n\t\t\tvar _visible_records = parseInt($('.r-r-i:visible').length);\r\n\t\t\tvar _total_records = $('.r-r-i').length;\r\n\t\t\t// alert(_total_records);\r\n\t\t\tif (isNaN(_visible_records) == true || _visible_records == 0) {\r\n\t\t\t\t_visible_records = 0;\r\n\t\t\t\t//display warning\r\n\t\t\t\t$('#flight_search_result').hide();\r\n\t\t\t\t$('#empty_flight_search_result').show();\r\n\t\t\t} else {\r\n\t\t\t\t$('#flight_search_result').show();\r\n\t\t\t\t$('#empty_flight_search_result').hide();\r\n\t\t\t}\r\n\t\t\t$('#total_records').text(_visible_records);\r\n\t\t\tif(_visible_records == 1){\r\n\t\t\t\t$('#flights_text').text('Flight');\r\n\t\t\t}\r\n\t\t\t$('.visible-row-record-count').text(_visible_records);\r\n\t\t\t$('.total-row-record-count').text(_total_records);\r\n\t\t\t\r\n\t\t}", "function resultTie(){\n $(document).ready(function( ){\n $(\"td\").on(\"click\", function(){\n if (user.winner == \"nobody\" && ($(\"td\").text()).length ==9) {\n //use \"nobody but tie\" to display in the results\n user.winner = \"nobody but tie\"\n // tietimes will be accumulated in the results\n tietimes = tietimes + 1;\n $(\"table\").hide();\n $(\"p\").text(\"click 'new game' to replay\");\n return tietimes;\n }\n });\n });\n }", "function toggleRepopulation(){\n\trepopulating = !repopulating;\n}", "function showTable(){\n document.getElementById('eat-table').style.visibility = \"visible\";\n}", "function loadSetTable() {\n\t\tfor (var key in SetTable) {\n\t\t\tvar state = '' + getCookie(key);\n\t\t\tSetTable[key] = (state === 'undefined') ? true : false;\n\t\t}\n\t}", "updateTable() {\n\t\tthis.manager.get(\"WWSUanimations\").add(\"djs-update-table\", () => {\n\t\t\tif (this.table) {\n\t\t\t\tthis.table.clear();\n\t\t\t\tthis.find().forEach((dj) => {\n\t\t\t\t\tlet icon = `<span class=\"badge badge-danger\" title=\"INACTIVE: This DJ is inactive and will be deleted one year from the Last Seen date unless they air a broadcast.\"><i class=\"far fa-times-circle p-1\"></i>No</span>`;\n\t\t\t\t\tif (!dj.active) {\n\t\t\t\t\t\ticon = `<span class=\"badge badge-danger\" title=\"INACTIVE: This DJ is inactive and will be deleted one year from the Last Seen date unless they air a broadcast.\"><i class=\"far fa-times-circle p-1\"></i>No</span>`;\n\t\t\t\t\t} else if (\n\t\t\t\t\t\t!dj.lastSeen ||\n\t\t\t\t\t\tmoment(dj.lastSeen)\n\t\t\t\t\t\t\t.add(30, \"days\")\n\t\t\t\t\t\t\t.isBefore(\n\t\t\t\t\t\t\t\tmoment(\n\t\t\t\t\t\t\t\t\tthis.manager.get(\"WWSUMeta\")\n\t\t\t\t\t\t\t\t\t\t? this.manager.get(\"WWSUMeta\").meta.time\n\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t) {\n\t\t\t\t\t\ticon = `<span class=\"badge badge-warning\" title=\"ACTIVE, but did not air a broadcast for over 30 days.\"><i class=\"far fa-question-circle p-1\"></i>30+ Days Ago</span>`;\n\t\t\t\t\t} else if (\n\t\t\t\t\t\tmoment(dj.lastSeen)\n\t\t\t\t\t\t\t.add(7, \"days\")\n\t\t\t\t\t\t\t.isBefore(\n\t\t\t\t\t\t\t\tmoment(\n\t\t\t\t\t\t\t\t\tthis.manager.get(\"WWSUMeta\")\n\t\t\t\t\t\t\t\t\t\t? this.manager.get(\"WWSUMeta\").meta.time\n\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t) {\n\t\t\t\t\t\ticon = `<span class=\"badge badge-info\" title=\"ACTIVE, but did not air a broadcast for between 7 and 30 days.\"><i class=\"far fa-check-circle p-1\"></i>7 - 30 Days Ago</span>`;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ticon = `<span class=\"badge badge-success\" title=\"ACTIVE; this DJ aired a broadcast in the last 7 days.\"><i class=\"fas fa-check-circle p-1\"></i>Yes</span>`;\n\t\t\t\t\t}\n\t\t\t\t\tthis.table.row.add([\n\t\t\t\t\t\tdj.name || \"\",\n\t\t\t\t\t\tdj.realName || \"\",\n\t\t\t\t\t\t`${icon}`,\n\t\t\t\t\t\tdj.lastSeen\n\t\t\t\t\t\t\t? moment\n\t\t\t\t\t\t\t\t\t.tz(\n\t\t\t\t\t\t\t\t\t\tdj.lastSeen,\n\t\t\t\t\t\t\t\t\t\tthis.manager.get(\"WWSUMeta\")\n\t\t\t\t\t\t\t\t\t\t\t? this.manager.get(\"WWSUMeta\").meta.timezone\n\t\t\t\t\t\t\t\t\t\t\t: moment.tz.guess()\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t.format(\"LLLL\")\n\t\t\t\t\t\t\t: \"Unknown / Long Ago\",\n\t\t\t\t\t\tdj.active\n\t\t\t\t\t\t\t? `<div class=\"btn-group\"><button class=\"btn btn-sm btn-primary btn-dj-analytics\" data-id=\"${dj.ID}\" title=\"View DJ and Show Analytics\"><i class=\"fas fa-chart-line\"></i></button><button class=\"btn btn-sm btn-secondary btn-dj-logs\" data-id=\"${dj.ID}\" title=\"View Show Logs\"><i class=\"fas fa-clipboard-list\"></i></button><button class=\"btn btn-sm bg-indigo btn-dj-notes\" data-id=\"${dj.ID}\" title=\"View/Edit Notes and Remote Credits\"><i class=\"fas fa-sticky-note\"></i></button><button class=\"btn btn-sm btn-warning btn-dj-edit\" data-id=\"${dj.ID}\" title=\"Edit DJ\"><i class=\"fas fa-edit\"></i></button><button class=\"btn btn-sm bg-orange btn-dj-inactive\" data-id=\"${dj.ID}\" title=\"Mark DJ as inactive\"><i class=\"fas fa-times-circle\"></i></button></div>`\n\t\t\t\t\t\t\t: `<div class=\"btn-group\"><button class=\"btn btn-sm btn-primary btn-dj-analytics\" data-id=\"${dj.ID}\" title=\"View DJ and Show Analytics\"><i class=\"fas fa-chart-line\"></i></button><button class=\"btn btn-sm btn-secondary btn-dj-logs\" data-id=\"${dj.ID}\" title=\"View Show Logs\"><i class=\"fas fa-clipboard-list\"></i></button><button class=\"btn btn-sm bg-indigo btn-dj-notes\" data-id=\"${dj.ID}\" title=\"View/Edit Notes and Remote Credits\"><i class=\"fas fa-sticky-note\"></i></button><button class=\"btn btn-sm btn-success btn-dj-active\" data-id=\"${dj.ID}\" title=\"Mark DJ as active\"><i class=\"fas fa-check-circle\"></i></button><button class=\"btn btn-sm btn-danger btn-dj-delete\" data-id=\"${dj.ID}\" title=\"Permanently remove this DJ\"><i class=\"fas fa-trash\"></i></button></div>`,\n\t\t\t\t\t]);\n\t\t\t\t});\n\t\t\t\tthis.table.draw();\n\t\t\t}\n\t\t});\n\t}", "toogleStatLastTrnsVisibility ({ commit, dispatch, state }) {\n let nextStatus\n state.statLastTrnsVisibility === 'visible'\n ? nextStatus = 'hidden'\n : nextStatus = 'visible'\n\n commit('setStatLastTrnsVisibility', nextStatus)\n dispatch('saveUiView')\n }", "function displayTable() {\n\n // disregard brushes w/o selections\n\n if (!d3.event.selection) return;\n\n // programmed clearing of brush after mouse-up\n\n d3.select(this).call(brush.move, null);\n\n var d_brushed = d3.selectAll(\".brushed\").data();\n\n // populate table if one or more elements is brushed\n if (d_brushed.length > 0) {\n clearTableRows();\n d_brushed.forEach(d_row => populateTableRow(d_row))\n } else {\n clearTableRows();\n }\n }", "setFavourite() {\r\n this.favourite = !this.favourite;\r\n }", "function renderCookieStand() {\n tableDataDisplay.innerHTML = ''; //Clear the data table (tableDataDisplay)\n salesPerHour = []; //Clear the salesByHour array\n grandTotalSales = 0; //Clear the total sales across all locations\n renderTableHeader(); //reRender the header for the table\n for (var i = 0; i < cookieStands.length; i++) { //Loop through the businesses array to render the table\n cookieStands[i].renderTableBody(); //reRender the table body for the current business[i]\n }\n calcGrandTotal(); //Calculate the new sales totals\n renderTableFooter(); //reRender the footer for the table\n}", "function updateTeamTypeAnalysisTable(type, remove, table_id, adjective) {\r\n var $tr = $(table_id + ' [data-type=\"' + type + '\"]');\r\n // Get update current number of Pokémon\r\n var $td = $tr.find('td');\r\n var num = parseInt($td.text());\r\n num += remove ? -1 : 1;\r\n $td.text(num);\r\n // Update text\r\n var verb = (num == 1) ? 'Is' : 'Are';\r\n $tr.attr('title', num + ' Pokémon ' + verb + ' ' + adjective + ' to the ' + capitalize(type) + ' Type!');\r\n}", "function initTracker() {\r\n\tdocument.write(`<table class=\"tracker\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" align=\"center\">`);\r\n\tvar itemList = Object.keys(items);\r\n\tvar i = 0;\r\n\twhile (i < itemList.length) {\r\n\t\tfor (j = 0; j < rowLength; j++) {\r\n\t\t\tvar x = itemList[i];\r\n\t\t\t\t// Custom behaviour for crystals/pendants\r\n\t\t\t\tif (x.substring(0,4) == `boss`) {\r\n\t\t\t\t\tdocument.write(`<td style=\"background-image:url(images/` + x + `.png);\" `);\r\n\t\t\t\t\tdocument.write(`id=\"` + x + `\" `);\r\n\t\t\t\t\tdocument.write(`class=\"` + !!items[x] + `\" `);\r\n\t\t\t\t\tdocument.write(`onClick=\"toggleBoss('` + x + `')\">`);\r\n\t\t\t\t\tdocument.write(`</td>`);\r\n\t\t\t\t// Custom behaviour for blank spaces\r\n\t\t\t\t} else if (x.substring(0,5) == `blank`) {\r\n\t\t\t\t\tdocument.write(`<td></td>`);\r\n\t\t\t\t// Custom behaviour for medallions\r\n\t\t\t\t} else if (x.substring(0,6) == `bombos` || x.substring(0,5) == `ether` || x.substring(0,5) == `quake`) {\r\n\t\t\t\t\tdocument.write(`<td style=\"background-image:url(images/` + x + `.png);\" `);\r\n\t\t\t\t\tdocument.write(`id=\"` + x + `\" `);\r\n\t\t\t\t\tdocument.write(`class=\"` + !!items[x] + `\" `);\r\n\t\t\t\t\tdocument.write(`onClick=\"toggleMedallion('` + x + `')\">`);\r\n\t\t\t\t\tdocument.write(`</td>`);\r\n\t\t\t\t// Standard behaviour\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdocument.write(`<td style=\"background-image:url(images/` + x + `.png);\" `);\r\n\t\t\t\t\tdocument.write(`id=\"` + x + `\" `);\r\n\t\t\t\t\tdocument.write(`class=\"` + !!items[x] + `\" `);\r\n\t\t\t\t\tdocument.write(`onClick=\"toggleItem('` + x + `')\">`);\r\n\t\t\t\t\tdocument.write(`</td>`);\r\n\t\t\t\t}\r\n\t\t\tif (++i == itemList.length) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tdocument.write(`</tr>`);\r\n\t}\r\n}", "function actTable() {\n\tif(scholar.scholarship.confirmDispersion != \"\"){\n\t\t$(\"#accordion-deposit\").parent().show();\n\t\t$(\"#accordion-deposit\").show();\n\t\t$(\"#tableConfirm > tbody tr td\").remove();\n\n\t scholar.scholarship.confirmDispersion.forEach(function (confirms){\n\t $(\"#tableConfirm > tbody tr:last\").after('<tr><td class=\"text-center\">'+confirms.monthConfirm+\" \"+confirms.yearConfirm+'</td>');\n\n\t if (confirms.statusScholarshipReceived === \"Incompleta\") $(\"td:last\").after('<td class=\"text-center warning\">Dep&oacute;sito incompleto</td>');\n\t else if (confirms.statusScholarshipReceived === \"No\") $(\"td:last\").after('<td class=\"text-center error\">Sin dep&oacute;sito</td>');\n\t else if (confirms.statusScholarshipReceived === \"Sí\") $(\"td:last\").after('<td class=\"text-center success\">'+\"Dep&oacute;sito completo\"+'</td>');\n\n\t if (confirms.statusReview === \"En proceso\") $(\"td:last\").after('<td class=\"text-center warning\">'+confirms.statusReview+'</td>');\n\t else $(\"td:last\").after('<td>'+confirms.statusReview+'</td>');\n\n\t if (confirms.staffAnswer === \"En proceso\") $(\"td:last\").after('<td class=\"text-center warning\">'+confirms.staffAnswer+'</td>');\n\t else if (confirms.staffAnswer === \"Resuelto\") $(\"td:last\").after('<td class=\"text-center success\">'+confirms.staffAnswer+'</td>');\n\t else $(\"td:last\").after('<td class=\"text-center\">'+confirms.staffAnswer+'</td>');\n\n\t });\n\t}else {\n\t\t$(\"#accordion-deposit\").parent().hide();\n\t\t$(\"#accordion-deposit\").hide();\n\t}\n}", "function showTable(){\n\t$('table#current_conceptcodes_table > tbody').removeClass(\"hidden\");\n}", "function determineVisibility() {\n\t'use strict';\n\tvar allMarkersLength = allMarkers.length;\n\tfor (var i = 0; i < allMarkersLength; i++) {\n\t\tif (allMarkers[i].shouldDisplay === true) {\n\t\t\tallMarkers[i].holdMarker.setMap(map);\n\t\t} else {\n\t\t\tallMarkers[i].holdMarker.setMap(null);\n\t\t}\n\t}\n}", "function viewDataNew() {\n cleanScreenOfChampions();\n showChampions(dataChampions);\n}", "update (dt) {\n // This thing is called over and over again byt the game engine. If it's not there, nothing shows\n }", "function tablesUpdated(isSuccess, entityName, value, isNewPerson, topicsCount){\n hideSections();\n var numPersonsTopicAddedTo = topicsCount ? topicsCount : -1;\n let verbage = \"<br/><br/>\";\n\n if (!isSuccess){\n verbage = \"\";\n } else if ( entityName == \"person\" && isNewPerson){\n verbage += \"was added to the persons table.\";\n } else if (entityName == \"person\" && ! isNewPerson){\n verbage += \"was updated.\";\n } else if (entityName == \"topic\" & topicsCount > 0 ){\n verbage += \"was added to \" + numPersonsTopicAddedTo + \" people.\";\n } else if (entityName == \"topic\" & topicsCount == 0 ){\n verbage += \"is already an option for everyone in the table.\";\n }\n \n let resultsState = isSuccess ? \"Success:<br/><br/>\" : \"Error!<br/><br/>\";\n\n let resultsMessage = resultsState + \"<em>\" + value + \"</em>\" + verbage;\n\n var resultsColor = \"\";\n if (entityName == \"topic\" && topicsCount == 0){\n resultsColor = \"orange\";\n } else if (isSuccess){\n resultsColor = \"seagreen\";\n } else{\n resultsColor = \"red\";\n }\n\n\n atmWindow.document.getElementById(\"addAffilResultsMessage\").style.display = \"block\";\n atmWindow.document.getElementById(\"addAffilResultsMessage\").style.color = resultsColor;\n atmWindow.document.getElementById(\"addAffilResultsMessage\").innerHTML = resultsMessage;\n \n if (isSuccess){\n var rand = Math.floor(Math.random()*reminderImages.length);\n atmWindow.document.getElementById(\"reminderImage\").setAttribute(\"src\", reminderImages[rand].url);\n atmWindow.document.getElementById(\"reminderImage\").setAttribute(\"width\", reminderImages[rand].width);\n atmWindow.document.getElementById(\"reminderImage\").setAttribute(\"height\", reminderImages[rand].height);\n atmWindow.document.getElementById(\"reminderImage\").style.display = \"block\";\n atmWindow.document.getElementById(\"reminderHeader\").style.display = \"block\";\n }\n }", "function C101_KinbakuClub_RopeGroup_Charlotte330Done() {\n\tC101_KinbakuClub_RopeGroup_Charlotte330NotDone = false;\n}", "function refreshTables() {\n\n\t\t$(\"#biomatcher-data-table\").html(\"<table id='biomatcher-data-table' class='table table-striped'><tr><th>Subject ID</th><th>Oligo Name</th><th>Oligo Seq</th><th>Mismatch Tolerance</th><th>Hit Coordinates</th></tr></table>\");\n\t}", "set Overdraw(value) {}", "function isDraw() {\n if (occupiedCells === 9 && !isGameOver()) {\n playerDisplay.textContent = \"IT'S A TIE!\";\n modalHeader.textContent = \"IT'S A TIE!\";\n modalText.textContent = \"\";\n\n isGameOver(true);\n }\n}", "function C101_KinbakuClub_RopeGroup_Charlotte340Done() {\n\tC101_KinbakuClub_RopeGroup_Charlotte340NotDone = false;\n}", "function toggleRevenue() {\n $(\".multiple-table-eps\").hide();\n $(\".multiple-tooltips-eps\").hide();\n $(\".multiple-table-rev\").show();\n $(\".multiple-tooltips-rev\").delay(500).fadeIn();\n}", "renderedCallback(){\n if( this.accountdata.data != undefined && this.accountdata.data != null && Object.keys(this.accountdata.data).length > 0 ){\n console.log('showMode--');\n this.showMode=true;\n }\n }", "function showTable(data, tbody) {\n if (data.length > 0) {\n updateTable(data, tbody);\n } else {\n var tbody = d3.select(\"tbody\").append(\"h6\").text(\"Does not exist.\");\n }\n}", "setsInvisibility() {\n if (this.currentShip === 'Looking for a Rig' || this.position !== 'Defender') {\n return 'had no effect'\n } else if (this.position === 'Defender') {\n this.currentShip.cloaked = true\n }\n }", "revealSolved() {\n var neighbourFlags = 0 \n for(var i = 0; i < this.neighbourCells.length; i++){\n var neighbor = this.neighbourCells[i];\n if(neighbor != undefined){\n if(neighbor.isFlag){\n neighbourFlags += 1\n }\n }\n }\n for(var i = 0; i < this.neighbourCells.length; i++){\n var neighbor = this.neighbourCells[i];\n if(neighbor != undefined){\n if (!neighbor.revealed && neighbourFlags == this.neighborCount && !neighbor.isFlag) {\n neighbor.reveal();\n }\n }\n }\n }", "get countable () {\n return true\n }", "isStable() {\n if (this.items.length < this.BL) {\n return false; \n }\n\n for (i = 0; i < this.items.length; i++){\n for(j = i+1; j < this.items.length; j++) {\n if (ArrayMatch2D(this.items[i], this.items[j])) {\n the_period = j - i; \n \n\n return true; \n \n }\n }\n }\n\n return false\n\n }", "function applyFallenSoulMates(soulMatesTable, fallen) {\r\n if (fallen.length > 0) {\r\n var tr = d.createElement('TR');\r\n var td = d.createElement('TD');\r\n td.innerHTML = 'Almas gemelas caidas de la lista: <b>' + fallen.join(', ') + '</b>';\r\n td.colSpan = 7;\r\n tr.appendChild(td);\r\n soulMatesTable.rows[1].parentNode.appendChild(tr);\r\n }\r\n }", "review() {\n if (this.complete) {\n this.complete = !this.complete;\n }\n }", "gameOverCheck() {\n \tif (this.model.checkIfGameOver() === true) {\n\t\t\tthis.view.gameEndedAlert();\n\t\t\tthis.model.findTotals();\n\t\t\tthis.view.writeTotals(this.model);\n \t}\n }", "function ShowHideTable()\n {\n for(var tableIndex = 0; tableIndex<tableSize; tableIndex++)\n {\n var currentIndex = \"t\" + tableIndex\n var currnetTable = document.getElementById(currentIndex)\n if(tableIndex<beginDisplay){\n //hide\n currnetTable.style.display = \"none\"\n }else if( tableIndex>=beginDisplay && tableIndex < endDisplay ){\n //show\n currnetTable.style.display = \"block\"\n }else{\n //hide\n currnetTable.style.display = \"none\"\n }\n }\n }", "function showGameTables(){\r\n document.getElementById('game_table').className = \"visible\";\r\n document.getElementById('bottom_table').className = \"visible\";\r\n}", "function addFiltersInView(view, tableview, reload_function, setStarredPreviouslyDisplayed)\n{\n\tvar hLayout = Ti.UI.createView({\n\t\ttop:0,\n\t\theight: 45,\n\t\twidth: 320,\n\t\tlayout:'horizontal'\n\t});\n\tvar starredImage = Ti.UI.createView({\n\t\tleft: 14,\n\t\ttop: 12,\n\t\twidth: 22,\n\t\theight:22,\n\t\tbackgroundImage:'../images/starred_off.png',\n\t\ttype: 'image'\n\t});\n\tvar starred = Ti.UI.createView({\n\t\tleft: 0,\n\t\ttop: 0,\n\t\twidth: 50,\n\t\theight:45,\n\t\tstatus: \"off\",\n\t\ttype: 'view'\n\t});\n\tstarred.add(starredImage);\n\thLayout.add(starred);\n\t\n\tvar hideFromImage = Ti.UI.createView({\n\t\tleft: 49,\n\t\ttop: 14,\n\t\twidth: 35,\n\t\theight:17,\n\t\tbackgroundImage:'../images/on.png'\n\t});\n\tvar hide_from = Ti.UI.createView({\n\t\tleft: 0,\n\t\ttop: 0,\n\t\twidth: 133,\n\t\theight:45,\n\t\tstatus: 'visible'\n\t});\n\thide_from.add(hideFromImage);\n\thLayout.add(hide_from);\n\n\tvar hideToImage = Ti.UI.createView({\n\t\tleft: 49,\n\t\ttop: 14,\n\t\twidth: 35,\n\t\theight:17,\n\t\tbackgroundImage:'../images/on.png'\n\t});\n\tvar hide_to = Ti.UI.createView({\n\t\tleft: 0,\n\t\ttop: 0,\n\t\twidth: 133,\n\t\theight: 45,\n\t\tstatus: 'visible'\n\t});\n\thide_to.add(hideToImage);\n\thLayout.add(hide_to);\n\t\n\tview.add(hLayout);\n\t\n\t// Events\n\tstarred.addEventListener('click', function(e){\n\t\tvar obj = e.source;\n\t\tif(obj.type == 'image'){\n\t\t\tstarred.fireEvent('click');\n\t\t}else{\n\t\t\tif(obj.status=='on'){ // Show every translation\n\t\t\t\treload_function(db_get_translations);\n\t\t\t\tsetStarredPreviouslyDisplayed(false);\n\t\t\t\tstarredImage.backgroundImage = '../images/starred_off.png';\n\t\t\t\tobj.status = 'off';\n\t\t\t}else{\t// Show only starred\n\t\t\t\treload_function(db_get_starred_translations);\n\t\t\t\tsetStarredPreviouslyDisplayed(true);\n\t\t\t\tstarredImage.backgroundImage = '../images/starred_on.png';\n\t\t\t\tobj.status = 'on';\n\t\t\t}\n\t\t\thideFromImage.backgroundImage = '../images/on.png';\n\t\t\thide_from.status = 'visible';\n\t\t\thideToImage.backgroundImage = '../images/on.png';\n\t\t\thide_to.status = 'visible';\n\t\t}\n\t});\n\t\n\thide_from.addEventListener('click', function(e){\n\t\tif(hide_from.status=='hidden'){\n\t\t\thideFromImage.backgroundImage = '../images/on.png';\n\t\t\tshowAllLabelIndex(tableview, 1); // left\n\t\t\thide_from.status = 'visible';\n\t\t}else{\n\t\t\thideFromImage.backgroundImage = '../images/off.png';\n\t\t\thideAllLabelIndex(tableview, 1); // left\n\t\t\thide_from.status = 'hidden';\n\t\t\tif(hide_to.status=='hidden'){\n\t\t\t\thideToImage.backgroundImage = '../images/on.png';\n\t\t\t\tshowAllLabelIndex(tableview, 2); // right\n\t\t\t\thide_to.status = 'visible';\n\t\t\t}\n\t\t}\n\t});\n\t\n\thide_to.addEventListener('click', function(e){\n\t\tif(hide_to.status=='hidden'){\n\t\t\thideToImage.backgroundImage = '../images/on.png';\n\t\t\tshowAllLabelIndex(tableview, 2); // right\n\t\t\thide_to.status = 'visible';\n\t\t}else{\n\t\t\thideToImage.backgroundImage = '../images/off.png';\n\t\t\thideAllLabelIndex(tableview, 2); // right\n\t\t\thide_to.status = 'hidden';\n\t\t\tif(hide_from.status=='hidden'){\n\t\t\t\thideFromImage.backgroundImage = '../images/on.png';\n\t\t\t\tshowAllLabelIndex(tableview, 1); // left\n\t\t\t\thide_from.status = 'visible';\n\t\t\t}\n\t\t}\n\t});\n}", "function switchThroughTime(flag) {\n\tvar tableThroughTime = \"tableThroughTime\";\n\tElement[flag ? 'show' : 'hide'](tableThroughTime);\n\tvar tableThroughTimeBr = \"tableThroughTimeBr\";\n\tElement[flag ? 'show' : 'hide'](tableThroughTimeBr);\n}", "function OnShowFlyout() {\r\n if (overviewState == OverviewStates.Towns) {\r\n AddTownToFlyout();\r\n }\r\n else if (overviewState = OverviewStates.Military) {\r\n }\r\n else if (overviewState = OverviewStates.Research) {\r\n }\r\n else if (overviewState = OverviewStates.Diplomacy) {\r\n }\r\n}", "isSunk() {\n let currenthitStatus = this.state.hitStatus;\n if (currenthitStatus.every((status) => status === true)) {\n this.setState({ isSunk: true });\n } else {\n return false;\n }\n }", "featureTourShown() {\n this.state.preferences.unset('showFeatureTour');\n this.state.preferences.save(null, {\n success: () => {\n this.trigger(this.state);\n }\n });\n }", "function deathShowBombs() {\n for (i=0; i<=maxX; i++) {\n for (j=0; j<=maxY; j++) {\n with (cellArray[arrayIndexOf(i,j)]) {\n if (!isExposed) {\n if ((isBomb) && (!isFlagged)) {\n document.images[imageIndexOf(i,j)].src = bombRevealed.src; }\n else {\n if ((!isBomb) && (isFlagged)) {\n document.images[imageIndexOf(i,j)].src = bombMisFlagged.src;\n } } } } } } }", "function displayAll() {\r\n instructions.style.display = \"none\";\r\n document.getElementById(\"hits\").style.display = \"table\";\r\n dashboard.style.display = \"block\";\r\n}", "function collapseList() {\n\n //Lets exploit the unique properties of a set\n var tableElementsSet = new Set(teamData);\n temp = [];\n tableElementsSet.forEach(function(d){ temp.push({\n\tkey: d.key,\n\tvalue: d.value})});\n tableElements = temp;\n updateTable();\n\n\n}", "table() {\n this.showtable= ! this.showtable;\n //workaround - table width is incorect when rendered hidden\n //render it after 100 ms again, usually after it is shown, thus calculating\n //correct width\n if (this.showtable) window.setTimeout(function(that){that.ht2.render()},100,this);\n }", "function analisaTablero () {\n rac = analisisColumnas()\n raf = analisisFilas()\n if (rac == true || raf == true) {\n eliminarDulces()\n } else {\n mueveDulces()\n }\n }", "function getShouldFetchNewMovieData() {\n\tif (!_gLastMovieDataFetchDate) {\n\t\treturn true;\n\t}\n\t// getDate() returns day of month as number\n\tvar midnightHasPassedSinceLastFetch = (new Date().getDate() != _gLastMovieDataFetchDate.getDate());\n\treturn midnightHasPassedSinceLastFetch;\n}" ]
[ "0.5634471", "0.5581494", "0.55257374", "0.5500357", "0.5315188", "0.530258", "0.5281695", "0.52091527", "0.5147832", "0.51279825", "0.5124307", "0.5118517", "0.51015556", "0.50693595", "0.5052583", "0.50250953", "0.501962", "0.501859", "0.5016423", "0.5005908", "0.5004938", "0.5004288", "0.50016445", "0.49900916", "0.49766934", "0.49617004", "0.49430153", "0.4940633", "0.49378482", "0.49375132", "0.49375066", "0.49321878", "0.4930667", "0.49173516", "0.49153653", "0.4908043", "0.49038893", "0.48846295", "0.48827395", "0.4881075", "0.487515", "0.48748255", "0.4867098", "0.48461017", "0.483831", "0.48364308", "0.48317346", "0.48201936", "0.48200485", "0.48166847", "0.4810852", "0.48057067", "0.480482", "0.4796886", "0.47748694", "0.47714674", "0.47706965", "0.47695664", "0.47684076", "0.4759078", "0.47528422", "0.47474545", "0.47439992", "0.47159487", "0.47114563", "0.46985993", "0.4697302", "0.4689544", "0.4689412", "0.46869674", "0.46831703", "0.46828628", "0.46823075", "0.46771204", "0.46714318", "0.46663088", "0.46590033", "0.4654264", "0.46524164", "0.4646108", "0.4643123", "0.4639351", "0.46348593", "0.46330696", "0.46319944", "0.4614277", "0.4613581", "0.46130133", "0.46090713", "0.46083185", "0.4603657", "0.46035966", "0.46035224", "0.46028465", "0.46005103", "0.4599344", "0.45981005", "0.4597509", "0.45961526", "0.45927945" ]
0.69569063
0
=================================================================================== ====================================================================================== Resets a canvas clearing any path lines or images presented. Any transforms are cleared then restored so that the clearRect command does not itself become transformed. ========================================================================================
function canvasReset (ctx, canvas) { // Store the current transformation matrix ctx.save(); // Use the identity matrix while clearing the canvas ctx.setTransform(1, 0, 0, 1, 0, 0); ctx.clearRect(0, 0, canvas.width, canvas.height); ctx.beginPath(); // Restore the transform ctx.restore(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetCanvas(){\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n // Restore the transform\n ctx.restore(); // Clears the specific canvas completely for new drawing\n}", "clearCanvas() {\n const ctx = this.canvas.current.getContext('2d');\n\n ctx.save();\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.clearRect(0, 0, this.canvas.current.width, this.canvas.current.height);\n ctx.restore();\n }", "function reset() {\n\n\t\t// Size and symmetry\n\t\tvar size = sizeCtrl.value || 600;\n\t\tsplits = parseInt( symmetryCtrl.value || 8 );\n\n\t\tconsole.debug( 'Resetting canvas with w, s', size, splits );\n\n\t\tvar parentNode = canvas.parentNode;\n\t\tparentNode.style.width = size;\n\t\tparentNode.style.height = size;\n\n\t\tvar bounds = parentNode.getBoundingClientRect();\n\n\t\tcanvas.width = backgroundCanvas.width = gridCanvas.width = cursorCanvas.width = bounds.width;\n\t\tcanvas.height = backgroundCanvas.height = gridCanvas.height = cursorCanvas.height = bounds.height;\n\n\t\tcx = canvas.width / 2;\n\t\tcy = canvas.height / 2;\n\n\t\t// Set previous to center\n\t\tprevious = {\n\t\t\tx: cx,\n\t\t\ty: cy\n\t\t};\n\n\t\t// Background\n\t\tctx.clearRect( 0, 0, ctx.canvas.width, ctx.canvas.height );\n\t\tbackgroundCtx.clearRect( 0, 0, backgroundCanvas.width, backgroundCanvas.height );\n\n\t\tbackgroundCtx.fillStyle = backgroundSelectCtrl.value || advancedColorCtrl.value;\n\t\tbackgroundCtx.fillRect( 0, 0, backgroundCtx.canvas.width, backgroundCtx.canvas.height );\n\n\t\tredrawGrid( splits );\n\t\tupdatePageBackground();\n\n\t\t// save state\n\t\teditHistory.pushState();\n\n\t\tconsole.debug( 'Canvas reset' );\n\t}", "clear() {\n this.context.setTransform(1, 0, 0, 1, 0, 0);\n this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);\n }", "clear() {\n this.context.setTransform(1, 0, 0, 1, 0, 0);\n this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);\n }", "clear()\n {\n this.context.setTransform(1, 0, 0, 1, 0, 0);\n this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);\n }", "function clearCanvas() {\n drawingContext.clearRect(0, 0, canvasWidth, canvasHeight);\n }", "function clear() {\n ctx.save();\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n ctx.restore();\n }", "function ClearCanvas()\n{\n AddStatus(\"Entering ClearCanvas\");\n try\n {\n // Store the current transformation matrix\n ctx.save();\n\n // Use the identity matrix while clearing the canvas\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.clearRect(0,0, canvas.width, canvas.height);\n \n // Restore the transform\n ctx.restore();\n }\n catch(err)\n {\n AddStatus(err.message,true);\n }\n AddStatus(\"Exiting ClearCanvas\");\n}", "function clearCanvas() {\n _ctx.clearRect(0, 0, _canvas.width(), _canvas.height());\n }", "function clearCanvas() {\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n }", "function clearCanvas(){\n\t\t\tctx.clearRect(0, 0, canvas.width, canvas.height);\n\t\t}", "clearCanvas(){\n\t\tthis.ctx.save();\n\t\tthis.ctx.clearRect(0,0,this.canvas.width,this.canvas.height);\n\t\tthis.ctx.restore();\n\t}", "clearCanvas() {\n this.canvas.width = this.canvas.width;\n this.ctx.lineWidth = 3;\n }", "function clearCanvas() {\n context.clearRect(0, 0, sizeX, sizeY);\n }", "clearCanvas() {\n this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);\n }", "clearCanvas() {\n\t\tif (this._canvas) {\n\t\t\tconst ctx = this._canvas.getContext('2d');\n\t\t\tctx.clearRect(0, 0, this._canvas.width, this._canvas.height);\n\t\t}\n\t}", "clearCanvas() {\n this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);\n }", "function clearCanvas() {\n canvasContext.clearRect(0, 0, width, height);\n cancelAnimationFrame(id);\n console.log(\"Canvas Cleared\");\n }", "function clearCanvas (){\n ctx.clearRect( 0, 0, canvas.width, canvas.height);\n }", "clear() {\n this.ctx.clearRect(0, 0, this.canvasWidth, this.canvasHeight);\n }", "function clear() {\n context.clearRect(0, 0, canvas.width, canvas.height);\n }", "function clear () {\n context.clearRect(0, 0, canvas.width, canvas.height)\n }", "clearCanvas() {\n this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);\n }", "function clearCanvas() {\n context.clearRect(0, 0, canvas.width, canvas.height)\n}", "function clearCanvas()\n{\n\tctx.clearRect(0, 0, canvas.width, canvas.height);\n}", "function clearCanvas() {\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n}", "function clearCanvas() {\r\n context.clearRect(0, 0, canvas.width, canvas.height);\r\n}", "function clearCanvas() {\n // Remove any existing points\n for (point in points) delete points[point];\n delete points;\n // Make sure the canvas is blank\n ctx.save();\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n ctx.restore();\n}", "function ksfCanvas_clear()\n{\n\tif (context !== null && canvas !== undefined)\n\t{\n\t\tcontext.clearRect(0, 0, canvas.width, canvas.height);\n\t}\n}", "function clear(canvas) {\n canvas.getContext('2d').clearRect(0,0,canvas.width,canvas.height);\n }", "clearCanvas() {\r\n this.context = this.canvas.getContext('2d');\r\n this.isDrawing = false;\r\n this.x = 0;\r\n this.y = 0;\r\n // On récupère le decalage du canevas en x et y par rapport aux bords\r\n // de la page\r\n this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);\r\n }", "clear() {\n this.context.clearRect(0, 0, this.canvas.width, this.canvas.height)\n }", "function clearCanvas() {\r\n ctx.clearRect(0, 0, canvas.width, canvas.height);\r\n}", "clear() {\n this.ctx.clearRect(0, 0, this.ctx.canvas.width, this.ctx.canvas.height);\n }", "function clearCanvas() {\r\n\t\tctx.beginPath();\r\n\t\tctx.fillStyle = \"#CBCEC5\";\r\n\t\tctx.fillRect(2, 2, screenWidth - 4, screenHeight - 4);\r\n\r\n\t}", "function clearCanvas() {\n if (isVideo) {\n cancelVideo()\n }\n context.clearRect(0, 0, canvas.width, canvas.height);\n context.save();\n context.setTransform(pixelRatio, 0, 0, pixelRatio, 0, 0);\n context.restore();\n }", "function clearCanvas() {\n if (isVideo) {\n cancelVideo()\n }\n context.clearRect(0, 0, canvas.width, canvas.height);\n context.save();\n context.setTransform(pixelRatio, 0, 0, pixelRatio, 0, 0);\n context.restore();\n }", "function clearCanvas() {\n if(isVideo) {\n cancelVideo()\n }\n context.clearRect(0, 0, canvas.width, canvas.height);\n context.save();\n context.setTransform(pixelRatio,0,0,pixelRatio,0,0);\n context.restore();\n }", "clear() {\n // clear all three canvas\n this.clearBg();\n this.clearObj();\n this.clearGr();\n }", "function resetCanvas() {\n bufferCtx.clearRect(0, 0, bufferCtx.canvas.width, bufferCtx.canvas.height);\n ctx.clearRect(0,0,ctx.width, ctx.height);\n ctx.globalAlpha = 1.0;\n clearInterval(fadeTime);\n fadeTime = 0;\n }", "clean () {\n this.context.clearRect(0, 0, canvas.width, canvas.height);\n }", "function clearCanvas() {\r\n\tcanvasBackground.clear();\r\n\tcurrentFile.drawObjects.length = 0;\r\n\tpencilObj.length = 0;\r\n\t$(\"#foreground\").html(\"\");\r\n\t$(\"#foreground\").css({ 'display': 'none' });\r\n}", "function clearCanvas() {\n\tctx.fillStyle = \"rgb(64,145,164)\";\n\tctx.fillRect(0, 0, canvas.width, canvas.height);\n}", "function clearCanvas() {\n\tcontext.clearRect(0, 0, WIDTH, HEIGHT);\n}", "function paintCanvas() {\r\n ctx.clearRect(0, 0, width, height);\r\n }", "function clearCanvas(){\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n}", "function resetCanvas() {\n drawingHistory = [];\n drawingPoints = [];\n\n // Set viewport\n gl.viewport(0, 0, canvas.width, canvas.height);\n\n // Set clear color\n gl.clearColor(1.0, 1.0, 1.0, 1.0);\n\n // Clear <canvas> by clearing the color buffer\n gl.clear(gl.COLOR_BUFFER_BIT);\n\n // Handle extents\n let proj = ortho(0.0, 640.0, 0.0, 480.0, -1.0, 1.0);\n let projMatrix = gl.getUniformLocation(program, \"projMatrix\");\n gl.uniformMatrix4fv(projMatrix, false, flatten(proj));\n\n // Resize canvas and viewport\n adjustCanvasViewport(640, 480);\n}", "function clear() {\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n}", "function clearCanvas () {\n \tctx.clearRect(0, 0, c.width, c.height);\n}", "function clearCanvas() {\n\n\tcontext.fillStyle = '#000';\n\tcontext.fillRect(0, 0, canvas.width, canvas.height);\n\n}", "function ClearCanvas(){\n context.clearRect(0,0,canvas.width,canvas.height);\n}", "function clearCanvas() {\n ctx.beginPath();\n ctx.clearRect(0, 0, c.width, c.height);\n ctx.closePath();\n }", "function clearCanvas(){\n\t\tvar context = canvasElement.getContext('2d');\n\t\tcontext.clearRect(0,0,canvasElement.width,canvasElement.height)\n\t}", "function clearCanvas() {\n context.clearRect(0, 0, game.width, game.height);\n }", "function clearPath(){\r\n canvas = document.getElementById('path-canvas');\r\n context = canvas.getContext('2d');\r\n context.clearRect(0, 0, canvas.width, canvas.height);\r\n }", "function clearCanvas() {\n ctx.clearRect(0, 0, w, h);\n }", "function clearCanvas() {\n\tctx.clearRect(0, 0, W, H);\n}", "function clearCanvas(){\n ctx.clearRect(0,0,$canvas.width,$canvas.height)\n}", "function clear() {\n // starts animation loop \n const animationLoop = requestAnimationFrame(clear);\n // line clears canvas\n c.clearRect(0, 0, 608, 608);\n // stops animation loop\n cancelAnimationFrame(animationLoop)\n }", "clearAll() {\n const {width, height} = this.canvas\n this.ctx.clearRect(0, 0, width, height)\n this.ctx.fillStyle = this.proxy.bg_color\n this.ctx.fillRect(0, 0, width, height)\n this.lines.clearAll()\n }", "function clear() {\n //this line starts an animation loop\n const animationLoop = requestAnimationFrame(clear);\n //this line clears our canvas\n c.clearRect(0, 0, 608, 608)\n //this line stops our animation loop\n cancelAnimationFrame(animationLoop);\n }", "function clearCanvas(){ \n\tctx.fillStyle = \"#FFFFFF\";\n\tctx.clearRect(0,0,canvas.width,canvas.height); \n}", "function clear() {\n\t\t\n\t\tctx.fillStyle = \"white\";\n\t\tctx.fillRect(0, 0, canvas.width, canvas.height);\n\t}", "clearCanvas() {\n const context= this.state.context;\n context.fillStyle = 'black';\n context.fillRect( 0, 0, this.state.engine.maxWidth, this.state.engine.maxHeight );\n }", "function clearCanvas() {\n layers = [{}, {}, {}];\n draw();\n}", "function clearCanvas() {\r\n ctx.clearRect(0, 0, w, h);\r\n }", "resetCanvas() {\n this.positions = this.calcSizeAndPosition();\n }", "function clearCanvas() {\n\tcanvas = document.getElementById(\"hackCanvas\");\n\th = canvas.getContext(\"2d\");\n\th.clearRect(0,0,590,390);\n\tconsole.log(\"canvas is going to be cleared\");\n}", "function clearCanvas(context){\n context.beginPath();\n context.clearRect(0, 0, canvasWidth, canvasHeight);\n}", "function reset(){\n clearCanvas();\n outputPad.fromData([]);\n }", "function clearCanvas(context, canvas) {\n \"use strict\"\n context.clearRect(0, 0, canvas.width, canvas.height);\n var w = canvas.width;\n canvas.width = 1;\n canvas.width = w;\n }", "function clearCanvas() {\n ctx.clearRect(0, 0, 800, 800)\n}", "function reset() {\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n restore_array = [];\n index = -1;\n }", "clearGraphic() {\n this.ctx.clearRect(0, 0, this.ctx.canvas.width, this.ctx.canvas.height)\n this.drawAxes()\n }", "clean() {\n const height = this.ctx.canvas.height;\n const width = this.ctx.canvas.width;\n // Origin is at the center, so start painting from bottom left.\n this.ctx.clearRect(width * -1 / 2, height * -1 / 2, width, height);\n }", "clearCanvas() {\n this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height)\n // clear the touch stack\n this.setState({touchStack: [], artworkSrc: null})\n // load the image into the canvas\n this.loadImage()\n }", "function clearCanvas() {\n stopDrawing();\n canvasContext.clearRect(0, 0, element.width, element.height);\n canvasContext.fillStyle = settings.bgColour;\n canvasContext.fillRect(0, 0, element.width, element.height);\n if (!settings.displayOnly)\n drawSigLine();\n canvasContext.lineWidth = settings.penWidth;\n canvasContext.strokeStyle = settings.penColour;\n $(settings.output, context).val('');\n output = [];\n }", "function clearCanvas() {\n ctx.clearRect(0, 0, W, H);\n}", "clear () {\n let ctx = this.canvasContext\n\n ctx.clearRect(0, 0, this.width, this.height)\n }", "function clearCanvas() {\r\n\r\n ctx.fillStyle = CANVAS_BACKGROUND_COLOR;\r\n\r\n ctx.strokestyle = CANVAS_BORDER_COLOR;\r\n\r\n ctx.fillRect(0, 0, gameCanvas.width, gameCanvas.height);\r\n ctx.strokeRect(0, 0, gameCanvas.width, gameCanvas.height);\r\n }", "function clearCanvas() {\n}", "function clearCanvas(canvas,ctx) {\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n }", "function resetCanvasForUnseenShapes() {\n purgeCanvasMouseEvents(canvas);\n setDefaultCursorMode(canvas);\n assignDefaultEvents(canvas, null, false);\n}", "clear() {\n this.getContext().clearRect(0, 0, this.width, this.height);\n }", "clear() {\n this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height); \n}", "function clearAll(ctx) {\n ctx.clearRect(0, 0, canvasWidth, canvasHeight);\n}", "function resetCanvas() {\n canvas.width = canvas.width;\n paint = false;\n clickX = new Array();\n clickY = new Array();\n clickDrag = new Array();\n clickColor = new Array();\n clickBrushShape = new Array();\n clickWidth = new Array();\n onGoingTouches = new Array();\n strokeWidth = 5;\n strokeColor = \"#000000\"; //\"#df4b26\";\n strokeBrushShape = \"round\";\n\n var preview = document.getElementById('preview');\n preview.visible = false;\n}", "function clearCanvas(canvas,ctx) {\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n}", "function clearCanvas(canvas,ctx) {\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n}", "function updateCanvas() {\n ctx.clearRect(0, 0, 430, 430);\n fillCanvas();\n }", "function clearCanvas() {\n // clear the canvas\n ctx.clearRect(0, 0, width, height);\n \n // shake the canvas\n canvas.classList.add('shake');\n canvas.addEventListener('animationend', function() {\n canvas.classList.remove('shake');\n }, { once: true });\n \n // reset initial x and y positions\n x = width / 2;\n y = height / 2;\n }", "function clearCanvas() {\n ctx.clearRect(0, 0, 2000, 2000);\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 clearScreen(){\n\tcontext.clearRect(0,0,canvas.width,canvas.height);\n}", "function clearCanvas(canvas, ctx){\n\t\tvar canvas = canvas || M.theCanvas[0];\n\t\tvar ctx = ctx || M.ctx;\n\t\tctx.clearRect(0, 0, canvas.width, canvas.height);\n\t}", "clearCurrentFrame() {\n this.canvas.clearRect(0, 0, this.canvasWidth, this.canvasHeight);\n }", "function clearScreen() {\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n}", "function cleanCanvas(){\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n ctx.fillStyle = \"white\";\n ctx.fillRect(0,0,canvas.width,canvas.height);\n}", "function resetCanvas() {\n for (let i = 0; i < canvasData.length; i++) {\n canvasData[i] = defaultColor;\n dirtyIndices.push(i);\n }\n}" ]
[ "0.8228816", "0.8068358", "0.80327857", "0.80312836", "0.80312836", "0.7982094", "0.7921436", "0.79042906", "0.7899253", "0.7893375", "0.77249813", "0.7724206", "0.77025366", "0.76904345", "0.76793796", "0.76742107", "0.7654978", "0.7649348", "0.7646588", "0.7636256", "0.76057416", "0.7605105", "0.76042426", "0.7600963", "0.75929075", "0.7584264", "0.7580842", "0.7580546", "0.757496", "0.756472", "0.75611365", "0.75492066", "0.75489414", "0.75119334", "0.74973583", "0.74966264", "0.7488066", "0.7488066", "0.7478018", "0.74625957", "0.7458004", "0.7455258", "0.74538213", "0.7449472", "0.7438762", "0.74295086", "0.7425713", "0.7413561", "0.7406028", "0.7404874", "0.7398797", "0.7395281", "0.7390924", "0.73867756", "0.7380207", "0.7362531", "0.7357137", "0.7351324", "0.73498636", "0.73449546", "0.73379636", "0.7332304", "0.7324295", "0.7316822", "0.7312674", "0.730583", "0.7305568", "0.7284285", "0.72688156", "0.7264141", "0.7259551", "0.7248385", "0.72259796", "0.72216445", "0.7213444", "0.7199281", "0.7186387", "0.71783274", "0.71757585", "0.7171601", "0.7168346", "0.7166016", "0.7165423", "0.715632", "0.7136354", "0.7135656", "0.71321815", "0.71259046", "0.71214634", "0.71214634", "0.7100203", "0.70965946", "0.70929956", "0.70910734", "0.7084917", "0.7077368", "0.70726264", "0.7070308", "0.70691437", "0.7068845" ]
0.7852864
10
======================================================================================= ========================================================================================= Called when the building comobo box is selected on the crater screen =========================================================================================
function drawCrater(building) { selectedBuilding = building; var c=document.getElementById("Crater_Area"); var ctx=c.getContext("2d"); var craterBaseThickness = 29; canvasReset (ctx, c); if (building.selectedIndex > 0) { resetSizes(); var cd = dataProvider.impactor.crDepth; var _loc1 = cd / 92; switch (building.selectedIndex) { case 1: mc_1._height = mc_1._height / _loc1; mc_1._width = mc_1._width / _loc1; ctx.drawImage(spynx,c.width/2.0 - mc_1._width/2.0 , c.height -(craterBaseThickness + mc_1._height) ,mc_1._width,mc_1._height); //ctx.drawImage(spynx, mc_1._width/2.0-42/2.0,mc_1._height-(20+craterBaseThickness)) //ctx.drawImage(spynx, c.width/2.0-42/2.0,c.height-(20+craterBaseThickness)); break; case 2: mc_2._height = mc_2._height / _loc1; mc_2._width = mc_2._width / _loc1; //ctx.drawImage(spynx,c.width/2.0 - mc_1._width/2.0 , c.height -(20+craterBaseThickness) ,mc_1._width,mc_1._height); ctx.drawImage(bigBen,c.width/2.0 - mc_2._width/2.0 , c.height -(craterBaseThickness + mc_2._height) ,mc_2._width,mc_2._height); break; case 3: mc_3._height = mc_3._height / _loc1; mc_3._width = mc_3._width / _loc1; ctx.drawImage(eifelTower,c.width/2.0 - mc_3._width/2.0 , c.height -(craterBaseThickness + mc_3._height) ,mc_3._width,mc_3._height); break; case 4: mc_4._height = mc_4._height / _loc1; mc_4._width = mc_4._width / _loc1; ctx.drawImage(empireState,c.width/2.0 - mc_4._width/2.0 , c.height -(craterBaseThickness + mc_4._height) ,mc_4._width,mc_4._height); break; case 5: mc_5._height = mc_5._height / _loc1; mc_5._width = mc_5._width / _loc1; ctx.drawImage(cn_tower, c.width/2.0 - mc_5._width/2.0 , c.height -(craterBaseThickness + mc_5._height) ,mc_5._width,mc_5._height); //ctx.drawImage(cn_tower,0,0, 77,554, c.width/2.0 - mc_5._width/2.0 , c.height -(craterBaseThickness + mc_5._height) ,mc_5._width,mc_5._height); break; case 6: mc_6._height = mc_6._height / _loc1; mc_6._width = mc_6._width / _loc1; ctx.drawImage(burj,c.width/2.0 - mc_6._width/2.0 , c.height -(craterBaseThickness + mc_6._height ) ,mc_6._width,mc_6._height); break; }//end switch }//end if ctx.drawImage(craterImg,(c.width-716.0)/2.0,c.height-121.0); if(typeof dataProvider.impactor != 'undefined') drawScale(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onBuildingSourceBuildingsSelected() {\n setVisibilityOfDivForKey('buildings', true);\n povertyBuildingsDiv.hide();\n setExplanationSpanTextForColumn(NODAMAGE_COLUMN_INFO);\n setExplanationSpanTextForColumn(NODAMAGE_VALUE_INFO);\n maybeShowNoDamageValueItem();\n}", "selectBuilding(building) {\n if (this.currentProjectLabel != null)\n this.currentProjectLabel.innerHTML = \"Current Project: \" + building.buildingName;\n this.selectedBuilding = building;\n this.selectFloor(building.getFloorList()[0]);\n }", "function selectBox(e) {\n selectedBox = this\n\n setSelectedAppear(selectedBox, {\n 'stroke': 'black',\n 'stroke-width': '3'\n })\n}", "buildingCallback(value) {\n\n this.setState({\n buildingDropdownValue:value,\n building: value.id});\n }", "selectBoat() {\n this.selectedBoatId = this.boat.Id;\n this.dispatchEvent(new CustomEvent('boatselect', {\n detail:{boatId :this.selectedBoatId}\n }));\n }", "function setBuilding(building){\n var building1rooms = \"<option value='1'>343</option>\";\n var building2rooms = \"<option value='1'>1202</option><option value='2'>1204</option>\";\n var building3rooms = \"<option value='1'>101</option><option value='2'>110</option>\";\n var which_rooms;\n if (building == 1){\n which_rooms = building1rooms;\n }\n else if (building == 2){\n which_rooms = building2rooms;\n }\n else if (building == 3){\n which_rooms = building3rooms;\n }\n\n if ($('#graph3 .room_choice_container')){\n $('#graph3 .room_choice_container').remove();\n };\n\n $(\"#graph3 .graph_controls\").append(\n \"<div class='room_choice_container'>\" +\n \"<label class='label'>Room</label>\" +\n \"<p class='control'>\" +\n \"<span class='select'>\" +\n \"<select class='room_choice'>\" +\n which_rooms +\n \"</select></span></p></div>\"\n )\n }", "function floorView(building) {\n $('.building_name').text(building.name);\n $(`#building_${building.id}`).first().addClass('active');\n getFloorInfo(building.id);\n}", "function onRoomClicked(pk, selected) {\n\tvar flRestriction = \"rm.bl_id='\" + buildingId + \"' AND \" + \"rm.fl_id='\" + floorId + \"' \";\n\t if(selectedRow.length !=0){\n\t View.getControl('', 'abEgressPlans_DrawingPanel').unselectAssets(selectedRow);\n\t selectedRow = [];\n\t } \n if (selected) {\n var restriction = new Ab.view.Restriction();\n \t//evaluate pk to determine which kind of asset graphic was clicked and process accordingly\n \tif(pk.length == 1){\n \t\trestriction.addClause('rm.regcomp_id', pk[0]);\n \t}\n \telse{\n \t\trestriction.addClause('rm.bl_id', pk[0]);\n restriction.addClause('rm.fl_id', pk[1]);\n restriction.addClause('rm.rm_id', pk[2]);\t\n \t}\n View.panels.get('abEgressPlans_regdetailGrid').refresh(restriction);\n } else {\n View.panels.get('abEgressPlans_regdetailGrid').refresh(flRestriction);\n }\n}", "function select () {\r\n\t\t\t\tthis.tool.select();\r\n\t\t\t}", "selectItemEvent(event) {\n\n var name = event.target.getAttribute('data-name')\n var boxid = event.target.getAttribute('id')\n var client = event.data.client\n var items = client.items\n var index = items.selected.indexOf(name);\n\n // If selected, we want to unselect it\n if ($(event.target).hasClass(client.selectedClass)) {\n $(event.target).removeClass(client.selectedClass);\n $(event.target).attr(\"style\", \"\");\n client.items.selected.splice(index, 1);\n\n // If unselected, we want to select it\n } else {\n $(event.target).attr(\"style\", \"background:\" + client.selectedColor);\n $(event.target).addClass(client.selectedClass);\n client.items.selected.push(name)\n }\n client.bingoCheck()\n }", "function displayContextMenu(building) {\n if(building) {\n game.currentlySelectedBuilding = building;\n switch(building.name) {\n case 'house':\n displayHouseContextMenu();\n break;\n case 'barracks':\n displayBarracksContextMenu();\n break;\n default:\n currentlySelectedBuilding = null;\n }\n }\n}", "onKeypress() {\n this.selectedKey = this.rl.line.toLowerCase();\n var selected = this.opt.choices.where({ key: this.selectedKey })[0];\n if (this.status === 'expanded') {\n this.render();\n } else {\n this.render(null, selected ? selected.name : null);\n }\n }", "onKeypress() {\n this.selectedKey = this.rl.line.toLowerCase();\n var selected = this.opt.choices.where({ key: this.selectedKey })[0];\n if (this.status === 'expanded') {\n this.render();\n } else {\n this.render(null, selected ? selected.name : null);\n }\n }", "handleClothe(newState) {\n\t\t//console.log(\"Clothe selecionada: \" + newState.selected);\n\n\t\t// when selecting \"Qualquer\" pass a null so backend do not verify\n\t\tif(newState.selected == \"Qualquer\") {\n\t\t\tthis.setState({ selectedClothe: \"\" });\n\t\t}\n\t\telse {\n\t\t\t// save selected genre\n\t\t\tthis.setState({ selectedClothe: newState.selected });\n\t\t}\n\n\t\t// give options for next step\n\t\tthis.setState({ optionsColors: colors });\n\t}", "function SelectionChange() { }", "function SelectionChange() { }", "chooseData() {\n // ******* TODO: PART I *******\n //Changed the selected data when a user selects a different\n // menu item from the drop down.\n\n }", "chooseData() {\n // ******* TODO: PART I *******\n //Changed the selected data when a user selects a different\n // menu item from the drop down.\n\n }", "selectFloor(floor) {\n this.selectedFloor = floor;\n }", "function handleClick () {\n\t\tlet newSelectionOptions = {...selectionOptions};\n\t\tnewSelectionOptions.detailsSelected = type;\n\t\tsetSelectionOptions(newSelectionOptions);\n\t}", "onSelect(event) {\n super.onSelect(event);\n this.glow = this.componentBodyShape.glow();\n this.glow.toBack();\n }", "gpSelected(info, e, doctor, date, time) {\r\n this.setState({gp: info})\r\n this.setState({bookingStep: e})\r\n this.setState({doctor: doctor})\r\n this.setState({date: date})\r\n this.setState({time: time})\r\n }", "selectionTool(e) {\n //find the cropper\n let cropper = this.state.cropper;\n //trigger the crop/selection tool\n cropper.setDragMode(\"crop\");\n //reset active buttons\n this.clearActiveButtons();\n this.setActiveButton(\"selectionTool\");\n }", "function xcustom_makeActionOnObjectSelection() {\r\n var currentSelectedObject = xcustom_getCurrentSelectedObject();\r\n if (null === currentSelectedObject) {\r\n // console.log('Nothing Selected...');\r\n xcustom_resetAndClosePanelSelectedObjectContent();\r\n $('#xcustom-div-right-panel').hide();\r\n return;\r\n }\r\n // console.log('The Selected Object Is : ', currentSelectedObject);\r\n xcustom_showSelectedObjectDataOnViewer(currentSelectedObject);\r\n}", "function SetupBuildingSelectOptions(e) {\n\tvar DEBUG_SetupBuildingSelectOptions = true;\n\tif ( DEBUG_SetupBuildingSelectOptions ) { console.log('BEGIN SetupBuildingSelectOptions[e.Id='+e.id+']'); }\n\t// Get the campusId.\n\tcampusId = parseInt(e.value);\n\tif ( DEBUG_SetupBuildingSelectOptions ) { console.log('campusId='+campusId); }\n\tvar eId = e.id.split('_');\n\tvar scmId = eId[1];\n\tvar campusIndex = parseInt(eId[2]); // Get the room order.\n\tif ( DEBUG_SetupBuildingSelectOptions ) { console.log('scmId='+scmId+' campusIndex='+campusIndex); }\n\t// Clear the building select.\n\tvar eBuildingId = 'selBuilding_'+scmId+'_'+campusIndex;\n\tif ( DEBUG_SetupBuildingSelectOptions ) { console.log('eBuildingId='+eBuildingId); }\n\tvar eBuilding = document.getElementById(eBuildingId); // Get building select.\n\teBuilding.options.length = 0;\n\t// Clear the room select.\n\tvar eRoomId = 'selRoom_'+scmId+'_'+campusIndex;\n\tif ( DEBUG_SetupBuildingSelectOptions ) { console.log('eRoomId='+eRoomId); }\n\tvar eRoom = document.getElementById(eRoomId); // Get room select.\n\teRoom.options.length = 0;\n\tvar opt = document.createElement('option');\n\topt.value = '';\n\topt.innerHTML = '';\n\teBuilding.appendChild(opt);\n\t/**/\n\tif ( DEBUG_SetupBuildingSelectOptions ) { console.log('CollegeBuilding.length='+CollegeBuilding.length+' campusId='+campusId); }\n\tfor ( var i=0; i<CollegeBuilding.length; i++ ) {\n\t\t//if ( DEBUG_SetupBuildingSelectOptions ) { console.log('CollegeBuilding['+i+'].campusId='+CollegeBuilding[i].campusId); }\n\t\tif ( CollegeBuilding[i].campusId === campusId ) {\n\t\t\tif ( DEBUG_SetupBuildingSelectOptions ) { console.log('CollegeBuilding['+i+'].buildingId='+CollegeBuilding[i].buildingId); }\n\t\t\tif ( DEBUG_SetupBuildingSelectOptions ) { console.log('CollegeBuilding['+i+'].Code='+CollegeBuilding[i].Code); }\n\t\t\topt = document.createElement('option');\n\t\t\topt.value = CollegeBuilding[i].buildingId;\n\t\t\t//if ( buildingId === CollegeBuilding[i].buildingId ) { opt.selected = true; }\n\t\t\topt.innerHTML = CollegeBuilding[i].Code;\n\t\t\teBuilding.appendChild(opt);\n\t\t}\n\t}\n\teRoom = document.getElementById('selRoom_'+scmId+'_'+campusIndex); // Get room select.\n\teRoom.options.length = 0;\n\t/**/\n\tif ( !isNaN(campusId) ) {\n\t\tdocument.getElementById('labBuilding_'+scmId+'_'+campusIndex).style.display = 'inline-block';\n\t} else {\n\t\tvar eBuildingLabelId = 'labBuilding_'+scmId+'_'+campusIndex;\n\t\tif ( DEBUG_SetupBuildingSelectOptions ) { console.log('Hide '+eBuildingLabelId); }\n\t\tvar eBuildingLabel = document.getElementById(eBuildingLabelId);\n\t\teBuildingLabel.style.display = 'none';\n\t\tvar eRoomLabelId = 'labRoom_'+scmId+'_'+campusIndex;\n\t\tif ( DEBUG_SetupBuildingSelectOptions ) { console.log('Hide '+eRoomLabelId); }\n\t\tvar eRoomLabel = document.getElementById(eRoomLabelId);\n\t\teRoomLabel.style.display = 'none';\n\t}\n\tSetupNextCampusSelectOptions(scmId, campusIndex);\n} // END SetupBuildingSelectOptions.", "onAirportChange() {\n this._buildDialogBody();\n }", "selectBoat(event) {\n this.selectedBoatId = this.boat.Id; \n //this.boatId = this.boat.Id;\n const selcectBoatEvent = new CustomEvent('boatselect', {detail:{boatId:this.boat.Id}}); \n this.dispatchEvent(selcectBoatEvent);\n\n }", "function onMouseDown(e) {\n\tclickStart = e;\n\tbox = L.rectangle(L.latLngBounds(e.latlng, e.latlng), {fill: false, color: SELECTED_BOX_COLOR}).addTo(map);\n\tclick = true;\n deselectBox();\n removeMiniBox();\n}", "function boroughSelected(boroughItem) {\n let boroughName = $(boroughItem).text();\n d3.select(\"#borough-dropdown-button\")\n .text(boroughName);\n\n lineChart.selectedBorough = common.boroughs.filter(borough => {\n return borough.name === boroughName;\n })[0];\n updateLineChartVisualisation();\n}", "function onSelect()\n\t{\n\t\tunit.div.toggleClass(\"selected\", unit.movePoints > 0);\n\t}", "function selectClothing (id) {\n if (selectedChoices[id]) {\n selectedChoices[id] = false;\n } else {\n selectedChoices[id] = true;\n }\n updateTitleClothing();\n}", "function onSelectTool(){\n if (document.getElementById('toolType').value != '') {\n View.selectValue(\"tool_form\", getMessage('tool'), [\"wrtl.tool_id\"], \"tl\", [\"tl.tool_id\"], [\"tl.tool_id\", \"tl.bl_id\", \"tl.tool_type\"], {\n 'tl.tool_type': document.getElementById('toolType').value\n });\n }\n else {\n View.selectValue(\"tool_form\", getMessage('tool'), [\"wrtl.tool_id\"], \"tl\", [\"tl.tool_id\"], [\"tl.tool_id\", \"tl.bl_id\", \"tl.tool_type\"], {});\n }\n}", "function SelectionChange() {}", "function SelectionChange() {}", "function SelectionChange() {}", "function SelectionChange() {}", "onCheckWarp(event) {\n for (var item of this.ItemsWarp) {\n item.Select = event.detail.target.checked;\n }\n }", "select(e, value) {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tcons:(this.second.current.state.selected.row[0] || ''), \n\t\t\t\tvowl: value\n\t\t\t}, this.props.onClick\n\t\t); \n\t}", "function Build(event) {\n if (buildZone.bounds.contains(target.bounds)) {\n // If within buildable params, green.\n buildZone.strokeColor = \"green\";\n target.fillColor = down ? \"darkgreen\" : \"green\";\n } else {\n // If not within buildable params, red.\n buildZone.strokeColor = \"red\";\n target.fillColor = down ? \"darkred\" : \"red\";\n }\n target.strokeColor = down ? \"white\" : null;\n}", "function C007_LunchBreak_ActorSelect_Click() {\t\n\tClickInteraction(C007_LunchBreak_ActorSelect_CurrentStage);\n\tInventoryClick(GetClickedInventory(), CurrentChapter, \"ActorSelect\");\n}", "function handleBoundryChange(){\n var object = {};\n\n object['boundry-region-1'] = document.getElementById('admin-region-1').checked;\n object['boundry-region-2'] = document.getElementById('admin-region-2').checked;\n\n handleGisMenuChange(object);\n}", "function selectBuoy() {\n // Reset all buttons.\n for (var i=0; i<buoys.markers.length; i++) {\n buoys.markers[i].icon.imageDiv.firstChild.setAttribute(\n 'src', 'js/OpenLayers/img/marker-blue.png');\n }\n this.icon.imageDiv.firstChild.setAttribute('src', 'js/OpenLayers/img/marker.png');\n\n $('#buoy').html('Buoy ' + this.metadata.id + ': ' +\n decToDeg(this.metadata.lat, 'NS') + ' ' +\n decToDeg(this.metadata.lon, 'EW'));\n $(':checkbox').not('.time').removeAttr('disabled');\n}", "function ComboBox_OnFocus(theObject)\n{\n\t//are we a treegrid cell? and did we just focus in?\n\tif (theObject.TreeGridCell && theObject.HTML.STATES_FOCUSED && !theObject.TreeGridHeader)\n\t{\n\t\t//is our cell unselected on a row selection mode?\n\t\tif (!theObject.Selected && !theObject.HTML.parentNode.Row.Selected && Get_String(theObject.HTML.parentNode.Row.InterpreterObject.Properties[__NEMESIS_PROPERTY_SELECTION_TYPE], \"\") != \"CellOnly\")\n\t\t{\n\t\t\t//is the camera off?\n\t\t\tif (!__SIMULATOR.Camera || !__SIMULATOR.Camera.bInProgress)\n\t\t\t{\n\t\t\t\t//dont process this\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n\t//notify the simulator\n\t__SIMULATOR.NotifyFocusEvent(theObject.HTML.EDIT, theObject.HTML.STATES_FOCUSED, theObject);\n\t//always update focused images\n\tComboBox_UpdateFocusLookAndFeel(theObject.HTML, theObject);\n\t//not disabled?\n\tif (!theObject.HTML.IGNORE_EVENTS)\n\t{\n\t\t//are we a treegrid cell? and did we just focus out?\n\t\tif (theObject.TreeGridCell && !theObject.TreeGridHeader && !theObject.HTML.STATES_FOCUSED)\n\t\t{\n\t\t\t//is our row selected\n\t\t\tif (theObject.HTML.parentNode.Row.Selected)\n\t\t\t{\n\t\t\t\t//set selected background colour\n\t\t\t\ttheObject.HTML.style.backgroundColor = theObject.BGColours[__STATE_SELECTED];\n\t\t\t}\n\t\t}\n\t}\n}", "function on_select_client(serial) {\n clear_div();\n //hide_div();\n $('#life_police_flg').val(\"\");\n $('#documents_flg').val(\"\");\n $('#communication_flg').val(\"\");\n // $('#conversation_follow_flg').val(\"\");\n $('#kupa_gemel_flg').val(\"\");\n client_details(serial);\n }", "function dropDown(that) {\r\n if (that.value == \"3\") {\r\n document.getElementById(\"chooseProperty\").style.display = \"block\";\r\n document.getElementById(\"contactinfo\").style.minHeight = \"50rem\";\r\n }\r\n else {\r\n document.getElementById(\"chooseProperty\").style.display = \"none\";\r\n document.getElementById(\"contactinfo\").style.minHeight = \"43rem\";\r\n }\r\n }", "function setupAreaSelectionEventListener() {\n $(\"#area-dropdown .dropdown-menu li a\").click(function () {\n selectedArea = $(this).text();\n var selText = $(this).text();\n $(this).parents('.btn-group').find('.dropdown-toggle').html(selText + ' <span class=\"caret\"></span>');\n clearDoctorDetails();\n dataTable.rows().every(function (rowIdx, tableLoop, rowLoop) {\n var data = this.data();\n if (selText !== \"All Cities\" && data.area !== selText) {\n this.node().style.display = \"none\";\n } else if (selectedSpeciality == null || selectedSpeciality == data.speciality) {\n this.node().style.display = \"\";\n }\n });\n });\n}", "function initShipToSelectedStateContinue()\n {\n\n var state = $('.view-display-id-ship_to_states #edit-field-shipping-states-tid-selective option:selected').val();\n \n updatesShipToWrapperofSelState(state);\n\n // inits on select change by the user\n $('body').on('change', 'select#edit-field-shipping-states-tid-selective', function() {\n\n updatesShipToWrapperofSelState($(this).val());\n\n });\n\n }", "function y_select_change(self) {\n $(self).parent().find(\".attr-options\").fadeOut();\n var type = $(self).find(\":selected\").attr('type');\n if(type == \"gene\"){\n $(self).parent().find('.y-gene-attribute-select option:contains(\"select a specification\")').prop('selected', true);\n $(self).parent().find(\".y-gene-attribute-select\").fadeIn();\n var gene = $(self).find(\":selected\").val();\n } else {\n $(self).parent().find('.y-gene-attribute-select option:contains(\"select a specification\")').prop('selected', true);\n $(self).parent().find(\".y-gene-attribute-select\").fadeOut();\n $(self).parent().find(\"#y-data-type-container\").fadeOut();\n }\n }", "function loadSelection()\n{\n\tflagIndex = localStorage.getItem(\"chosenFlag\");\n\tcarbodyIndex = localStorage.getItem(\"chosenCarbody\");\n\tcolourIndex = localStorage.getItem(\"chosenColour\");\n\twheelIndex = localStorage.getItem(\"chosenWheel\");\n\n\tonBodyChanged();\n}", "function SetupRoomSelectOptions(e) {\n\tvar DEBUG_SetupRoomSelectOptions = true;\n\tif ( DEBUG_SetupRoomSelectOptions ) { console.log('BEGIN SetupRoomSelectOptions[e.Id='+e.Id+']'); }\n\t// Get the buildingId.\n\tbuildingId = parseInt(e.value);\n\tif ( DEBUG_SetupRoomSelectOptions ) { console.log('buildingId='+buildingId); }\n\t// Get the room order.\n\tvar eId = e.id.split('_');\n\tvar scmId = eId[1];\n\tvar roomOrder = parseInt(eId[2]); // Get the room order.\n\tif ( DEBUG_SetupRoomSelectOptions ) { console.log('scmId='+scmId+' roomOrder='+roomOrder); }\n\teRoom = document.getElementById('selRoom_'+scmId+'_'+roomOrder); // Get room select.\n\teRoom.options.length = 0;\n\tvar opt = document.createElement('option');\n\topt.value = '';\n\topt.innerHTML = '';\n\teRoom.appendChild(opt);\n\tfor ( var i=0; i<CollegeRoom.length; i++ ) {\n\t\tif ( CollegeRoom[i].buildingId === buildingId ) {\n\t\t\topt = document.createElement('option');\n\t\t\topt.value = CollegeRoom[i].roomId;\n\t\t\t//if ( roomId === CollegeRoom[i].roomId ) { opt.selected = true; }\n\t\t\topt.innerHTML = CollegeRoom[i].Number;\n\t\t\teRoom.appendChild(opt);\n\t\t}\n\t}\n\tif ( !isNaN(buildingId) ) {\n\t\tdocument.getElementById('labRoom_'+scmId+'_'+roomOrder).style.display = 'inline-block';\n\t} else {\n\t\tvar eRoomLabelId = 'labRoom_'+scmId+'_'+roomOrder;\n\t\tif ( DEBUG_SetupRoomSelectOptions ) { console.log('Hide '+eRoomLabelId); }\n\t\tvar eRoomLabel = document.getElementById(eRoomLabelId);\n\t\teRoomLabel.style.display = 'none';\n\t}\n} // END SetupRoomSelectOptions.", "function postSelectAction(selectedObjectName){\r\n // console.log(\r\n // \"The \" +\r\n // selectedObjectName +\r\n // \" was selected by user. Use this function to create appropriate scene transition.\"\r\n // );\r\n\r\n // document.getElementById(\"selection_confirmation_overlay\").style.display = 'block';\r\n //\r\n //\r\n // setTimeout(function() {\r\n // document.getElementById(\"selection_confirmation_overlay\").style.display = 'none';\r\n // }, 250);\r\n\r\n}", "selectComic(value) {\n this.setState({ selectedComic: value });\n }", "onSelect() {\n // Do something when a section instance is selected\n }", "onSelect() {\n // Do something when a section instance is selected\n }", "function OnOther_Change( e , type )\r\n{\r\n var newOtherValue = $.widgetAppTextFieldAeDESModeFormsSectionEightOther.get_text_value() ;\r\n Alloy.Globals.AeDESModeSectionEight[\"OTHER\"] = newOtherValue ;\r\n // If the value is not empty, we must also set the selected item of the TypeOfConstruction picker to \"Other\"\r\n if( newOtherValue )\r\n {\r\n $.widgetAppComboBoxAeDESModeFormsSectionEightAccuracyVisit.set_selected_index( \"7\" ) ;\r\n Alloy.Globals.AeDESModeSectionEight[\"ACCURACY_VISIT\"] = \"7\" ;\r\n }\r\n}", "static async _RectangleSelection(event){\n\t\t\tconst tool = game.activeTool;\n\t\t\tif(tool !== \"select\") return;\n\t\t\tif($(document.getElementById(\"tokenAttacher\")).find(\".control-tool.select.active\").length <= 0 ) return;\n\t\t\t$(document.getElementById(\"tokenAttacher\")).find(\".control-tool.select\")[0].classList.toggle(\"active\");\t\n\t\t\t\n\t\t\tconst {coords, originalEvent} = event.data;\n\t\t\tconst {x, y, width, height, releaseOptions={}, controlOptions={}}=coords;\n\t\t\tlet selected = {};\t\n\t\t\tconst baseId= canvas.scene.getFlag(moduleName, \"attach_base\").element;\t\t\n\t\t\tconst token = canvas.tokens.get(baseId);\n\t\t\tfor (const type of [\"AmbientLight\", \"AmbientSound\", \"Drawing\", \"MeasuredTemplate\", \"Note\", \"Tile\", \"Token\", \"Wall\"]) {\n\t\t\t\tconst layer = canvas.getLayerByEmbeddedName(type);\n\t\t\t\t//if (layer.options.controllableObjects) {\n\t\t\t\t\t// Identify controllable objects\n\t\t\t\t\tconst controllable = layer.placeables.filter(obj => obj.visible && (obj.control instanceof Function));\n\t\t\t\t\tconst newSet = controllable.filter(obj => {\n\t\t\t\t\t\tlet c = obj.center;\n\t\t\t\t\t\t//filter base out\n\t\t\t\t\t\tif(obj.data._id === baseId) return;\n\t\t\t\t\t\t//Filter attached elements except when they are already attached to the base\n\t\t\t\t\t\tconst parent = obj.getFlag(moduleName, 'parent') || \"\";\n\t\t\t\t\t\tif(parent !== \"\" && parent !== baseId) return;\n\t\t\t\t\t\t//filter all inside selection\n\t\t\t\t\t\treturn Number.between(c.x, x, x+width) && Number.between(c.y, y, y+height);\n\t\t\t\t\t});\t\t\n\t\t\t\t\tselected[type] = newSet.map(a => a.data._id);\n\t\t\t\t\tif(selected[type].length <= 0) delete selected[type];\t\t\n\t\t\t\t//}\n\t\t\t}\n\t\t\tif(selected.length === 0) return;\n\t\t\tTokenAttacher._attachElementsToToken(selected, token, false);\n\t\t\tui.notifications.info(game.i18n.format(localizedStrings.info.ObjectsAttached));\n\t\t}", "function chooseCoal() {\n $('coal_span').addClassName('selected');\n $('oil_span').removeClassName('selected');\n $('gas_span').removeClassName('selected');\n $('nuclear_span').removeClassName('selected');\n $('hydro_span').removeClassName('selected');\n $('all_span').removeClassName('selected');\n // disable and unselect inappropriate units\n $('bbl').disable();\n $('bbl_span').setOpacity(0.3).removeClassName('selected');\n $('ft3').disable();\n $('ft3_span').setOpacity(0.3).removeClassName('selected');\n $('m3').disable();\n $('m3_span').setOpacity(0.3).removeClassName('selected');\n $('twh').disable();\n $('twh_span').setOpacity(0.3).removeClassName('selected');\n // keep current units if possible\n var units = $$('input:checked[type=\"radio\"][name=\"units\"]').pluck('value')[0]; \n if (units == 'joule') {\n $('mtoe').enable();\n $('mtoe_span').setOpacity(1.0).removeClassName('selected');\n $('joule').enable();\n $('joule').checked = true;\n $('joule_span').setOpacity(1.0).addClassName('selected');\n } else { // default to 'mtoe'\n $('mtoe').enable();\n $('mtoe').checked = true;\n $('mtoe_span').setOpacity(1.0).addClassName('selected');\n $('joule').enable();\n $('joule_span').setOpacity(1.0).removeClassName('selected');\n }\n\n requestImage();\n}", "function selectHouse(house) {\n unselectAllCells();\n house.classList.add('select');\n showHouseInfo();\n}", "function UISelect() {\n if (selectedSpots.length > 0 || selectedPieces.length >= 1 && selectedPieces[0].Data.length > 0) {\n // Select 1st Spot in all UI Options\n var firstSpot = selectedSpots.length >= 1 ? selectedSpots[0] : selectedPieces[0].Data[0];\n // Spot Type\n if ($('#spotTypeConnect').hasClass('active') && (firstSpot.Connection == Connector.Corner) ||\n !$('#spotTypeConnect').hasClass('active') && (firstSpot.Connection == Connector.Curve)) {\n if ($('#spotTypeConnect').hasClass('active')) {\n $('#spotTypeConnect').removeClass('active');\n $('#spotTypeConnect').parent().removeClass('active');\n $('#spotTypeTension').addClass('folded');\n }\n else {\n $('#spotTypeConnect').addClass('active');\n $('#spotTypeConnect').parent().addClass('active');\n $('#spotTypeTension').removeClass('folded');\n }\n $('#spotTypeConnect').hasClass('active') ? $('#spotTypeConnect').html('Curve') :\n $('#spotTypeConnect').html('Corner');\n }\n $('#spotTypeTensionNumber').val(firstSpot.Tension);\n // Spot Colour\n $('#spotColourFill').val(ConvertToHexi(firstSpot.LineColour));\n // Spot Outline Width\n $('#spotOutlineWidthNumber').val(firstSpot.LineWidth);\n }\n else {\n // Deselect Spot UI\n }\n if (selectedPieces.length > 0) {\n // Select 1st Piece in all UI Options\n var firstPiece = selectedPieces[0];\n if (!$('#pieceTypeLine').hasClass('active') && firstPiece.Line ||\n $('#pieceTypeLine').hasClass('active') && !firstPiece.Line) {\n $('#pieceTypeLine').trigger('click');\n }\n if (firstPiece.DrawStyle == DrawType.Full) {\n $('#PTfull').trigger('click');\n }\n else if (firstPiece.DrawStyle == DrawType.Decal) {\n $('#PTdecal').trigger('click');\n }\n else {\n $('#PTcutout').trigger('click');\n }\n if (firstPiece.Colours.Layers[0].FillOption == FillOption.Fill) {\n $('#PCfill').trigger('click');\n }\n else {\n $('#PCgradient').trigger('click');\n }\n $('#pieceColourFill').val(ConvertToHexi(firstPiece.Colours.Layers[0].Colours[0]));\n // Set 1st Spot of Piece for Spot UI Options\n }\n else {\n // Deselect Piece UI\n }\n}", "function onDesignSelect (e) {\n docDotQS(\"#default-design\").selected = true;\n if (e.target.value === \"js puns\") {\n renderColor();\n showColors();\n } else if (e.target.value === \"heart js\") {\n renderColor();\n showColors(\"heart js\");\n } else {\n renderColor(false);\n }\n}", "function buttonClicked(e) {\n\tvar element = e.memo.element;\n\tif (this.options.singleSelect) {\n\t\tthis.select(element);\n\t} else {\n\t\tif (this.isSelected(element)) {\n\t\t\tthis.deselect(element);\t\n\t\t} else {\n\t\t\tthis.select(element);\n\t\t}\n\t}\n}", "function handleCompanySelection () {\n var currentCompany = $(this).closest(\"g\").find(\"label\");\n var currentCompanyName = currentCompany.attr(\"for\").toString();\n \n if(currentCompany.hasClass(\"selected\")) {\n var index = selectedCompanies.indexOf(currentCompanyName);\n currentCompany.removeClass(\"selected\");\n if (selectedCompanies.length <= 1) {\n $(\"#please\").fadeIn(650); \n }\n selectedCompanies.splice(index, 1); \n removeCompany(currentCompanyName, index);\n $(this).closest(\"g\").prependTo(\"#unselected-container\");\n } else {\n selectedCompanies.push(currentCompany.attr(\"for\").toString());\n var index = selectedCompanies.indexOf(currentCompanyName);\n addCompany(currentCompanyName, index);\n \n currentCompany.addClass(\"selected\");\n $(this).closest(\"g\").prependTo(\"#selected-container\");\n }\n \n console.log(selectedCompanies);\n }", "onClick() {\n this.visualizer.onSelect(\"ship\", {\n owner: this.owner,\n id: this.id,\n });\n }", "function clickOptiontoSelect(){\n\n}", "roomEditorTabClick() {\n this.projectEditorTab.className = \"HVACApplication_ProjectEditorTab\";\n this.wallEditorTab.className = \"HVACApplication_WallEditorTab\";\n this.roomEditorTab.className = \"HVACApplication_RoomEditorTab selected\";\n this.viewEditorTab.className = \"HVACApplication_ViewEditorTab\";\n this.simulatorTab.className = \"HVACApplication_SimulatorTab\";\n\n if (this.currentEditor != null) {\n this.currentEditor.hide();\n this.currentEditor.getDiv().remove();\n }\n this.currentEditor = this.roomEditor;\n this.mainContentDiv.appendChild(this.currentEditor.getDiv());\n this.currentEditor.show();\n this.showFloorPicker();\n }", "function handleAnnotationTypeChange() {\n gAnnotationType = parseInt($('#annotation_type_id').val());\n globals.currentAnnotationsOfSelectedType = gCurrentAnnotations.filter(function(e) {\n return e.annotation_type.id === gAnnotationType;\n });\n setTool();\n setupCBCheckboxes();\n }", "function Start () {\n\tvalue = CHECKPOINT.COMBO;\n\ttype = CHECKPOINT.COMBO;\n\n\tsetChildCheckpointVisibility(false);\n\n\tGetComponent(Align).applyAlign();\n\n\t\n}", "selectedClickListener(d, i){\n var self = this;\n // ID Is selected from the the element tag field\n var id = self.selectedExtractID(d).split(\" \").join(\"-\");\n self.boxZoom(self.path.bounds(d), self.path.centroid(d), 20);\n self.applyStateSelection(id);\n self.ui.setDistrictInfo(id);\n self.ui.addLabel(); \n self.ui.retrievePoliticianImages(id);\n }", "function optionChanged(selected){\n\tmakeBar(selected);\n\tmakeTable(selected);\n\tmakeBubbleMap(selected);\n}", "function MapFromBuildingClick(sel) {\n //building1 = BuildingDataInfo[sel];\n DESTINATION_building = sel; \n\n\n\n \t\t/*\n \t\tif(OvsT == \"O\") {\n\t \tDESTINATION = building1.entr; \n\t } else if(OvsT == \"T\") {\n\t \tDESTINATION = building1.tunnelEntr; \n\t }\t\n \t */\n \t/*\n \t\n \tDESTINATION.building = sel;\n \t\n \t\tvar temp = new Object ();//Temporary Node to store lat and lng info\n \ttemp.lat = DESTINATION.lat;\n \ttemp.lng = DESTINATION.lng;\n \tDESTINATION = FindClosestAssociatedPoint(temp, ALLPOINTS);//overwrite our starting location with our closest associated point.\n */\t\n if(flightPath !== null) {\n \tflightPath.setMap(null);\n }\n if(infowindow !== null) {\n \tmarker.setMap(null);\n \tinfowindow.close();\n }\n \t\treinitialize();\t\n }", "function onAutoCompleteSelect(form, fieldName, selectedValue){\n\tif(fieldName == 'sb_items.rm_std'){\n\t\tafterSelectRoomStd(fieldName, selectedValue, null);\n\t}\n}", "function action_dropdown_boxes() {\n\t$('div.dropdown ul li a').click(function() {\n\t\t// get the selected dropdown option\n\t\tvar oOption = $(this);\n\n\t\t// get the containing div for the dropdown\n\t\tvar oContainer = oOption.closest('div.dropdown');\n\n\t\t// get the selected value of the option\n\t\tvar selected_value = oOption.data('value');\n\n\t\t// replace the text within the parent button to reflect the selected option\n\t\t$('button span.title', oContainer).html(oOption.html());\n\n\t\t// update the target field with the value IF the target field exists\n\t\tif($('input[name='+ oContainer.data('target') +']').length > 0) {\n\t\t\t$('input[name='+ oContainer.data('target') +']').val(oOption.data('value'));\n\t\t}\n\n\t\t// show the glass options on the image preview\n\t\t$('input[name=show_glass_options]').val('1');\n\n\t\t// -- rules\n\n\t\t// if the customer has selected a tint, set the self cleaning option to no - self cleaning only available on clear glass\n\t\tif($('input[name=tint_id]').val() != '1') {\n\t\t\t// get the second option from the self cleaning option\n\t\t\tvar self_cleaning = $('div.dropdown[data-target=glass_id] li:nth-child(1) a');\n\n\t\t\t// set the default option to no\n\t\t\t$('div.dropdown[data-target=glass_id] button span.title').html(self_cleaning.html() +' ( Only available on Clear Tint )');\n\n\t\t\t// set the target field \n\t\t\t$('input[name=glass_id]').val(self_cleaning.data('value'));\n\t\t}\n\n\t\t// action any additional calls\n\t\tif(oContainer.data('update-image') == true) {\n\t\t\tupdate_image_and_price();\n\t\t}\n\t});\n}", "SelectedBox(value, action) {\n this.props.SelectBoxAction(value, action);\n // show the submitButton\n this.setState({ showSubmitButton: this.parseSubmitButton() })\n }", "function onChange() {\n // The current value of the combobox is in the value property.\n displayChoice(combobox.value);\n\n // Alternatively, you can use selectedIndex to get the selected item index.\n // Here, we output the index to the debug console.\n debug.trace(strings.SELECTED_INDEX + ': ' + combobox.selectedIndex);\n}", "function showBuildControlBox(opt) {\n\t$('table.boxy-wrapper').remove();\n\tvar $build = $('.addFloorHtml');\n\t$build.find(\".floor\").hide();\n\tvar html = \" <div id='showBuildControlBox' style='height:100%;border:1px solid #000;'>\"\n\t\t\t+ $build.html() + \"</div>\";\n\t// $(\"table\").each(function(index, value) {// sou you tan chu dou jia shang\n\t// gai\n\t// // duan daima\n\t// $(value).hide();\n\t// });\n\tvar titleTail = \"开\";\n\tif (opt == 2) {\n\t\ttitleTail = \"关\";\n\t}\n\tvar wform = new Boxy(html, {\n\t\t\"title\" : \"整栋\" + titleTail,\n\t\t\"modal\" : false,\n\t\t\"draggable\" : true,\n\t\t\"unloadOnHide\" : true,\n\t\tafterHide : function() {\n\t\t},\n\t\tafterShow : function() {\n\t\t\t$('.addFloorSubmit').off('click');\n\t\t\t$('.addFloorSubmit').on('click',function(){\n\t\t\t\tvar tempObj = $(this).parents('#showBuildControlBox')\n\t\t\t\t.find('select');\n\t\t\tvar state = checkInputValue(tempObj, 'floor');\n\t\t\tif (state && !state.value) {\n\t\t\t\talert(state.msg);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (confirm(\"你确定要整栋楼 \" + titleTail + \"吗?\")) {\n\t\t\t\tvar buildId = $('#showBuildControlBox').find(\n\t\t\t\t\t\t\"select\").val();\n\t\t\t\theadAction(\"buildControl\", buildId, '', opt);\n\t\t\t}})\n\t\t}\n\t});\n\t$.each(getBuildList(), function(i, item) {\n\t\t$('#showBuildControlBox').find(\"select\").append(\n\t\t\t\t\"<option value='\" + item.id + \"'>\" + item.name + \"</option>\");\n\t\t// $('#addBuildHtml select').append(\"<option\n\t\t// value='\"+item.id+\"'>\"+item.name+\"</option>\");\n\t});\n\t$('#showBuildControlBox select').val(selectBuildId);\n}", "function selectmarker(evt){\n$(\"#markerHolder\").children().css({backgroundPosition: \"top left\"})\n$(evt.currentTarget).css({backgroundPosition: \"top right\"})\nswitch($(evt.currentTarget).attr(\"id\")){\n\tcase \"marker_black\":\n\tbrushColor={r:0,g:0,b:0};\n\tbreak;\n\tcase \"marker_red\":\n\tbrushColor={r:255,g:0,b:0};\n\tbreak;\n\tcase \"marker_blue\":\n\tbrushColor={r:0,g:0,b:255};\n\tbreak;\n\tcase \"marker_green\":\n\tbrushColor={r:0,g:255,b:0};\n\tbreak;\n\tcase \"marker_orange\":\n\tbrushColor={r:255,g:152,b:0};\n\tbreak;\n\tcase \"marker_yellow\":\n\tbrushColor={r:255,g:255,b:0};\n\tbreak;\n\tcase \"marker_purple\":\n\tbrushColor={r:255,g:0,b:255};\n\tbreak;\n\tcase \"marker_grey\":\n\tbrushColor={r:158,g:158,b:158};\n\tbreak;\n\tcase \"marker_white\":\n\tbrushColor={r:255,g:255,b:255};\n\tbreak;\n\t}\n\tif($(\"#brushHolder\").css(\"display\")!=\"none\"){\n\t$(\"#brushHolder\").slideToggle();\n\t}\n\t$(\"#markerHolder\").slideToggle();\n\t$(\".color_box\").css({backgroundColor:\"rgb(\"+brushColor.r+\",\"+brushColor.g+\",\"+brushColor.b+\")\"})\n}", "async fillShippingForm(){\n let selectState = await super.dropdownSelection(shoppingCartSelectors.stateDropdown, \n shoppingCartSelectors.NewYork);\n let city = await super.enterText(shoppingCartSelectors.city, 'NYC');\n let zip = await super.enterText(shoppingCartSelectors.zip, '10010');\n }", "function updateSelectionState(piece) {\r\n // Coordinates of the piece and the rubberband in piece space:\r\n var rubbrX1P = rubberband.xP, rubbrY1P = rubberband.yP;\r\n var rubbrX2P = rubberband.xP + rubberband.widthP - 1;\r\n var rubbrY2P = rubberband.yP + rubberband.heightP - 1;\r\n var pieceX1P = piece.xP, pieceY1P = piece.yP;\r\n var pieceX2P = piece.xP + piece.widthP - 1;\r\n var pieceY2P = piece.yP + piece.heightP - 1;\r\n piece.selected =\r\n ((rubbrX1P <= pieceX1P && rubbrX2P >= pieceX1P) ||\r\n (rubbrX1P > pieceX1P && rubbrX1P <= pieceX2P)) &&\r\n ((rubbrY1P <= pieceY1P && rubbrY2P >= pieceY1P) ||\r\n (rubbrY1P > pieceY1P && rubbrY1P <= pieceY2P));\r\n }", "function showBuilding() {\n showMarker( buildingIndex );\n}", "_onChange(evt) {\n this.toggleActive().then(res => {\n this.dispatchEvent(new CustomEvent('selected-change',{\n bubbles: true,\n composed: true\n }))\n })\n }", "deselectBuyBuilding() {\n let gameScene = this.gameScene;\n let gameEngine = gameScene.gameEngine;\n\n GameUtils.clearTintArray(this.uiVillageButtons);\n\n gameEngine.board.unhighlightTiles(gameEngine.possibleMoves);\n gameEngine.possibleMoves = null;\n\n gameEngine.selectedBuyBuilding = null;\n }", "startBtnClickHandler() {\n this.changeGamePhase(\"creatureSelect\");\n }", "getCurrentBuilding() {\n return this.selectedBuilding;\n }", "function onClickFloor(){\n var flGrid = View.panels.get(\"abEqStatusUpdate_gr_fl\");\n var selectedRow = flGrid.rows[flGrid.selectedRowIndex];\n\t\n var restriction = new Ab.view.Restriction();\n restriction.addClause(\"eq.bl_id\", selectedRow[\"fl.bl_id\"], \"=\");\n\trestriction.addClause(\"eq.fl_id\", selectedRow[\"fl.fl_id\"], \"=\");\n\t\n\tvar eqGrid = View.panels.get(\"abEqStatusUpdate_gr_eq\");\n eqGrid.refresh(restriction);\n\tvar eqForm = View.panels.get(\"updateEqStatusForm\");\n eqForm.refresh(restriction);\n}", "onSelect() {}", "function clickHandler(e) {\n if (!connection.isSelected() && !Main.canvas.data(\"current-tool\")) {\n Main.Selection.add(connection);\n if (Main.connectionSettingsForm.hasClass(\"hide\")) {\n var form = Main.connectionSettingsForm.removeClass(\"hide\");\n form.find(\"#length-value\").val(connection.length);\n form.find(\"#weight-value\").val(connection.weight).focus();\n }\n }\n else {\n Main.Selection.remove(connection);\n if (Main.Selection.getLength() === 0) {\n Main.connectionSettingsForm.addClass(\"hide\");\n }\n }\n }", "function co2Selected() {\n\ttempActive = false;\n\tlocationActive = false;\n\tradActive = false;\n\tco2Active = true;\n\tif (graphicActive) {\n\t\tdrawGraphic();\n\t} else if (tableActive) {\n\t\tdrawTable();\n\t}\n}", "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 }", "function setButton(titleOfCurrentButtonSelection) {\n $('.pharoh-button').removeClass('selected');\n $('.pharoh-button[title=\"' + titleOfCurrentButtonSelection + '\"]').addClass('selected');\n var buttonPaneTitle = titleOfCurrentButtonSelection;\n\n //General use buttons don't need to change selectmenu\n if (buttonPaneTitle == 'Controls') buttonPaneTitle = 'Default';\n if (buttonPaneTitle == 'Manual') buttonPaneTitle = 'Default';\n if (buttonPaneTitle == 'Select') buttonPaneTitle = 'Default';\n\n //clears out and displays new button pane\n $('.button-pane img').hide();\n $('.button-pane img[title=\"' + buttonPaneTitle + '\"]').show();\n //Handles creation of new select options in selectmenu\n gameEngine.hoverEntity = null;\n switch (titleOfCurrentButtonSelection) {\n case \"Housing\":\n setSelectOptions(Constants.Buildings.Housing);\n break;\n case \"Food and Farm\":\n setSelectOptions(Constants.Buildings.FoodandFarm);\n break;\n case \"Utilities\":\n setSelectOptions(Constants.Buildings.Utilities);\n break;\n case \"Storage and Distribution\":\n setSelectOptions(Constants.Buildings.StorageandDistribution);\n break;\n case \"Industrial\":\n setSelectOptions(Constants.Buildings.Industrial);\n break;\n case \"Raw Materials\":\n setSelectOptions(Constants.Buildings.RawMaterials);\n break;\n case \"Municipal\":\n setSelectOptions(Constants.Buildings.Municipal);\n break;\n case \"Roads\":\n setSelectOptions(Constants.Buildings.Roads);\n canHover = false;\n break;\n case \"Controls\":\n setSelectOptions(Constants.Buildings.Controls);\n setControlsInfoBox();\n canHover = false;\n break;\n case \"Manual\":\n setSelectOptions(Constants.Buildings.Manual);\n setManualInfoBox();\n canHover = false;\n break;\n case \"Clear Land\":\n setSelectOptions(Constants.Buildings.ClearLand);\n canHover = false;\n break;\n case \"Select\":\n setSelectOptions(Constants.Buildings.Select);\n canHover = false;\n break;\n default:\n //console.log('nuthin2seahear');\n break\n };\n}", "function changeroom()\n{\n /*** empty the bedspace when one change the Room ****/\n document.getElementById(\"spaceSelect\").innerHTML='';\n \n /*** Add a default options to them ( bedspace) ****/\n var combo = document.getElementById(\"spaceSelect\");\n var option = document.createElement('option');\n option.value = \"--Select Space--\";\n option.title = \"--Select Space--\";\n option.appendChild(document.createTextNode(\"--Select Space--\"));\n combo.appendChild(option); \n}", "selectCity(){\n browser.click('#cmbCiudades');\n browser.click(`#cmbCiudades > option:nth-child(107)`);\n\n //browser.pause(6000);\n /* \n let annoyingBanner = browser.isExisting('#takeover-close');\n\n if (annoyingBanner == true) {\n browser.click('#takeover-close')\n browser.waitUntil(annoyingBanner == false, 7000)\n browser.click('#cmbCiudades');\n browser.click(`#cmbCiudades > option:nth-child(107)`);\n }\n\n else {\n browser.click('#cmbCiudades');\n browser.click(`#cmbCiudades > option:nth-child(107)`); \n } */\n \n }", "function bringupObj() {\n\t\t\tvar selectOb = canvas.getActiveObject();\n\t\t\tcanvas.bringToFront(selectOb).renderAll();\t\n\t\t}", "function onSelected($e, datum) {\n onAutocompleted($e,datum);\n }", "function college_change() {\n var selectedIndex = d3.event.target.selectedIndex;\n var selectedDOMElement = d3.event.target.children[selectedIndex].value;\n drawMain(selectedDOMElement, container_width);\n }", "function setSelectedStandardJobCode() {\n\n var completeRepairCode = repairDetailsViewModel.repairCodeId();\n var repairCodeSegment1 = completeRepairCode.substr( 0, 2 );\n var repairCodeSegment2 = completeRepairCode.substr( 0, 4 );\n\n // Change the segment selections to match the work order's current standard job code\n repairDetailsViewModel.selectedRepairCodeSegment1( _.find( repairDetailsViewModel.repairCodeSegment1List(), function( codeInList ){\n return codeInList.completeJobCode == repairCodeSegment1;\n }));\n $(\"#segment1Select\").selectmenu( 'refresh' );\n repairDetailsViewModel.selectedRepairCodeSegment2( _.find( repairDetailsViewModel.repairCodeSegment2List(), function( codeInList ){\n return codeInList.completeJobCode == repairCodeSegment2;\n }));\n $(\"#segment2Select\").selectmenu( 'refresh' );\n repairDetailsViewModel.selectedRepairCodeSegment3( _.find( repairDetailsViewModel.repairCodeSegment3List(), function( codeInList ){\n return codeInList.completeJobCode == completeRepairCode;\n }));\n $(\"#segment3Select\").selectmenu( 'refresh' );\n\n repairDetailsViewModel.repairCodeId( completeRepairCode );\n }", "_onChange() {\n super._onChange();\n this.__toggleSpinnerButtonsState();\n }", "function actionOnClick () {\r\n game.state.start(\"nameSelectionMenu\");\r\n}", "function companySelectHandler(event) {\n var companyID;\n // Declare a local variable to store the ID of the current company\n companyID = $(\"#formCompanyList\").find('option:selected').val();\n // orgID = $(\"#orgList\").find('option:selected').val();\n if (companyID > 0) {\n localCompany = getCurrentCompany(companyID);\n\n // Load the master roles to use when defining the current org roles\n loadMasterRolesByCompany(companyID, populateMasterRoles, errorHandler);\n\n loadForm(localCompany);\n }\n else {\n clearDetailContent();\n }\n }", "function selectBun(bun) {\n\n if($scope.model.selectedBurger.bun) {\n $scope.model.selectedBurger.bun.selected = false;\n }\n\n $scope.model.selectedBurger.bun = bun;\n $scope.model.selectedBurger.bun.selected = true;\n\n selectStep('meat');\n }", "function selectionChangedHandler() {\n var flex = $scope.ctx.flex;\n var current = flex.collectionView ? flex.collectionView.currentItem : null;\n if (current != null) {\n // $scope.selectedCostCenterId = current.costCenterId;\n $scope.selectedStructureElementId = current.structureElementId;\n $scope.selectedDate = current.date;\n $scope.selectedBudgetCycleId = current.budgetCycleId;\n $scope.selectedDataEntryProfileId = current.dataEntryProfileId;\n $scope.selectedUserId = current.userId;\n } else {\n //$scope.selectedCostCenterId = 0;\n $scope.selectedStructureElementId = 0;\n $scope.selectedDate = \"\";\n $scope.selectedBudgetCycleId = 0;\n $scope.selectedDataEntryProfileId = 0;\n $scope.selectedUserId = 0;\n }\n manageActions();\n }", "function handleSelection(value) {\n setCategory(value);\n setVisible(false);\n }" ]
[ "0.6502922", "0.6286745", "0.6154702", "0.6135843", "0.6132017", "0.60685027", "0.60309154", "0.5955211", "0.5889281", "0.5853974", "0.58066285", "0.5790804", "0.5790804", "0.5773918", "0.57621455", "0.57621455", "0.57617515", "0.57617515", "0.57452387", "0.5745179", "0.5733569", "0.5731428", "0.57306546", "0.57222104", "0.5696976", "0.5677319", "0.5675303", "0.5653603", "0.56466293", "0.5644744", "0.560712", "0.55999595", "0.55955213", "0.55955213", "0.55955213", "0.55955213", "0.5595298", "0.5589032", "0.55655926", "0.5546289", "0.55427414", "0.55368733", "0.5521334", "0.551894", "0.551835", "0.5515063", "0.55137527", "0.54983956", "0.54960215", "0.5493571", "0.5490041", "0.5483343", "0.5482268", "0.5482268", "0.5473396", "0.5465188", "0.5464051", "0.5463545", "0.54560953", "0.54536253", "0.54429215", "0.5440266", "0.5439426", "0.54393893", "0.54384464", "0.54332304", "0.54158294", "0.5411863", "0.54104847", "0.5404544", "0.5400737", "0.53873056", "0.53817", "0.53802156", "0.53748345", "0.53722817", "0.53559124", "0.53460777", "0.5345799", "0.53431034", "0.53399765", "0.53391165", "0.53345084", "0.5324885", "0.53228575", "0.53222454", "0.53176326", "0.5308297", "0.5302228", "0.5302106", "0.5298554", "0.52929884", "0.5287332", "0.5286842", "0.5285255", "0.5279427", "0.5275974", "0.5271851", "0.5270415", "0.5270304", "0.52701896" ]
0.0
-1
===================================================================================== ======================================================================================= draw the scale line beneath the crater. =======================================================================================
function drawScale() { var c=document.getElementById("Crater_Area"); var ctx=c.getContext("2d"); ctx.font = '10pt Arial'; var diam = nbFormat(dataProvider.impactor.crDiam)+"m"; var depth = nbFormat(dataProvider.impactor.crDepth)+"m"; var dl =depth.length; var dil = diam.length; ctx.fillText(diam, c.width/2 -(dil*4.2), c.height - 18); ctx.fillText(depth, c.width -165 -(dl*4.2), c.height - 70); }//==========================================================================================
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createX(){\n line(0, 0, -vScale/2, -vScale/2);\n line(0, 0, vScale/2, -vScale/2);\n line(0, 0, vScale/2, vScale/2);\n line(0, 0, -vScale/2, vScale/2);\n}", "function renderAxisLine() {\n ctx.save();\n ctx.setLineDash(renderAttrs.lineDash || []);\n if( renderAttrs.orientation === 'horizontal') {\n drawLine( ctx, { x: renderMin, y: originCrossAxisCoord },\n { x: renderMax, y: originCrossAxisCoord });\n }\n else {\n drawLine( ctx, { x: originCrossAxisCoord, y: renderMin },\n { x: originCrossAxisCoord, y: renderMax });\n }\n ctx.restore();\n }", "function drawScales() {\n p.getBubbleDrawer().drawScale(guiAxes.X, scales.mins[guiAxes.X], scales.maxs[guiAxes.X], scales.steps[guiAxes.X]);\n p.getBubbleDrawer().drawScale(guiAxes.Y, scales.mins[guiAxes.Y], scales.maxs[guiAxes.Y], scales.steps[guiAxes.Y]);\n}", "biggerLine() {\n this.ctx.lineWidth++\n }", "function drawZoom() {\n\t\tvar text = 'x' + zoomMultiplier.toFixed(1);\n\n\t\tctx.beginPath();\n\t\tctx.textAlign = 'left';\n\t\tctx.textBaseline = 'top';\n\t\tctx.fillStyle = '#777';\n\t\tctx.font = zoomMultiplierFont();\n\t\tctx.fillText(text, 5, 5);\n\t}", "function drawScale() {\n //Define scale dimensions\n var margin = 30, scaleHeight = 20;\n var x = margin;\n var y = mapHeight - margin - scaleHeight;\n\n //Add rectangles to display legend colors\n mapsvg.append(\"g\").attr(\"id\", \"scaleg\")\n for (var i = 0; i < 200; i += 2) {\n mapsvg.select(\"#scaleg\").append(\"rect\")\n .datum(i)\n .attr(\"class\", \"scalerect\")\n .attr(\"x\", x + i)\n .attr(\"y\", y)\n .attr(\"width\", 2)\n .attr(\"height\", scaleHeight)\n }\n\n //Add outline to scale\n mapsvg.append(\"rect\")\n .attr(\"x\", x)\n .attr(\"y\", y)\n .attr(\"width\", 200)\n .attr(\"height\", scaleHeight)\n .attr(\"fill\", \"none\")\n .attr(\"stroke\", \"#000\")\n .attr(\"stroke-width\", 1)\n\n //Add label to scale\n mapsvg.append(\"text\")\n .attr(\"id\", \"scalelabel\")\n .attr(\"x\", x)\n .attr(\"y\", y - 25)\n\n //Add label to show the units of the scale\n mapsvg.append(\"text\")\n .attr(\"id\", \"scaleunits\")\n .attr(\"x\", x)\n .attr(\"y\", y - 10)\n .attr(\"font-size\", 12)\n\n //Add group to store axis on bottom of scale.\n mapsvg.append(\"g\")\n .attr(\"id\", \"scaleaxis\")\n .attr(\"transform\", \"translate(\" + x + \", \" + (y + scaleHeight) + \")\")\n\n updateScale()\n}", "scale() {\n this.p.scale(this._scaleFactor);\n }", "scale() {\n this.p.scale(this._scaleFactor);\n }", "scale() {\n this.p.scale(this._scaleFactor);\n }", "function drawline(data, Xscale, Yscale){\n\n var lsCoef = LeastSquares(data);\n\n var lineFunction = d3.line()\n .x(function(d) { return d.x; })\n .y(function(d) { return d.y; })\n .curve(d3.curveLinear);\n \n //Append line\n svg.append('path')\n .attr(\"stroke-width\", 2)\n .attr(\"class\", \"svgobject\")\n .attr(\"stroke\", \"black\")\n .attr('d', lineFunction([{\"x\": Xscale(canvas.min.x) , \"y\": Yscale(lsCoef.a + lsCoef.b*canvas.min.x)},\n {\"x\": Xscale(0) , \"y\": Yscale(lsCoef.a)},\n {\"x\": Xscale(-lsCoef.a/lsCoef.b) , \"y\": Yscale(0)},\n {\"x\": Xscale(canvas.max.x), \"y\": Yscale(lsCoef.a + lsCoef.b*canvas.max.x) }]));\n\n //Plot residuals on data from regression\n var figureresidualsvsfitted = svgres.selectAll(\"dot\")\n .data(data)\n .enter().append(\"circle\"); \n\n //Add attributes to plotted points\n figureresidualsvsfitted.attr(\"cx\", function(d) { return Yscale(d.y); })\n .attr(\"cy\", function(d) { \n var residuals = d.y - (lsCoef.a + lsCoef.b*d.x);\n return Yscale(residuals); })\n .attr(\"class\", \"mydot svgobject\")\n .style(\"fill\", canvas.colorres)\n .attr(\"r\", canvas.radius); \n\n}", "function drawSplines() {\n}", "function makeLine (count) {\n let scale = bel`<div class=${css.scale}></div>`\n for (let i = 0; i < count; i++) {\n let line = bel`<span class='${css.line}'></span>`\n scale.append(line)\n }\n return scale\n }", "function drawToScale(input) {\n return height - ( (input-minX)*height) / (maxX-minX); \n }", "draw(){\n\t\t\n\t\tlet height = this.height; //100\n\t\tlet width = this.width; //100\n\t\t\n\t\tlet ctx = this.ctx;\n\t\t//save last frame\n\t\tlet lastFrame = ctx.getImageData(0, 0, width, height);\n\t\t//clear canvas\n\t\tctx.clearRect(0, 0, width, height);\n\t\t//now, move frame 1 pixel to the left\n\t\tctx.putImageData(lastFrame, -1, 0);\n\t\t\n\t\t//then, draw the lines\n\t\tfor(var line of this.lines){\n\t\t\t\n\t\t\t\n\t\t\tlet range = line.maxValue - line.minValue;\n\t\t\tlet value = line.value;\n\t\t\t\n\t\t\t//Multiply line's value by the ratio between height and range, to get effective range the same but zero at the top\n\t\t\tvalue *= 1 * height / range;\n\t\t\t\n\t\t\t//Now, zero the value by adding the difference between minValue and 0\n\t\t\tvalue -= line.minValue * height / range;\n\t\t\t\n\t\t\t//Now, invert by subtracting from height\n\t\t\tvalue = height - value;\n\t\t\t\n\t\t\tctx.beginPath();\n\t\t\tctx.strokeStyle = line.color;\n\t\t\tctx.moveTo(width - 2, value);\n\t\t\tctx.lineTo(width, value);\n\t\t\tctx.stroke();\n\t\t}\n\t}", "render(g) {\n let xStart = g.axesPadding+g.axesLineWidth;\n let xEnd = g.width - g.axesPadding;//*2 - g.dataMargin;\n let yStart = g.height-g.axesPadding-g.axesLineWidth/2+1;\n let yDist = g.yMax-g.yMin;\n\n let minYPerc = (this.minimum-g.yMin) / yDist;\n let avgYPerc = (this.average-g.yMin) / yDist;\n let maxYPerc = (this.maximum-g.yMin) / yDist;\n\n let minYPos = g.height * minYPerc - (g.axesPadding*2)-g.axesLineWidth/2;\n let avgYPos = g.height * avgYPerc - (g.axesPadding*2)-g.axesLineWidth/2;\n let maxYPos = g.height * maxYPerc - (g.axesPadding*2)-g.axesLineWidth/2;\n\n // max:\n g.drawLine(xStart, yStart-maxYPos-g.axesLineWidth+this.minLineWidth/2, \n xEnd, yStart-maxYPos-g.axesLineWidth+this.minLineWidth/2, this.maxLineColor, this.maxLineWidth);\n g.drawText(this.maximum, xEnd, yStart-maxYPos-g.textOffset, null, g.graphFont, this.maxLineColor);\n // avg:\n g.drawLine(xStart, yStart-avgYPos-g.axesLineWidth+this.avgLineWidth/2, \n xEnd, yStart-avgYPos-g.axesLineWidth+this.avgLineWidth/2, this.avgLineColor, this.avgLineWidth);\n g.drawText(this.average, xEnd, yStart-avgYPos-g.textOffset, null, g.graphFont, this.avgLineColor);\n // min:\n g.drawLine(xStart, yStart-minYPos-g.axesLineWidth+this.maxLineWidth/2, \n xEnd, yStart-minYPos-g.axesLineWidth+this.maxLineWidth/2, this.minLineColor, this.minLineWidth);\n g.drawText(this.minimum, xEnd, yStart-minYPos-g.textOffset, null, g.graphFont, this.minLineColor);\n }", "function scaleDrawing() {\n 'use strict';\n var viewport = $('#model1').find('#viewport')[0];\n if (!viewport)\n return;\n var bbox = viewport.getBBox();\n // truncate to 2 decimal places\n var scale = ((($('.jumbotron').width()/bbox.width)*100)|0)/100;\n drawing.transform(scale, 0, 0);\n $('#model1').attr('height', ((bbox.height*scale)|0)+50);\n}", "function setLineWidth() {\r\n\t\tlineWidth = $(this).attr('data-size');\t//choix d'une épaisseur prédéfinie\r\n\t\t$range.val(lineWidth);\t//mise à jour de l'affichage sur la réglette\r\n\t}", "function drawScaleBar(layer, current) {\n layer[\"scaleCanvas\"].width = 60*window.devicePixelRatio;\n layer[\"scaleCanvas\"].height = 200*window.devicePixelRatio;\n\n let context = layer[\"scaleCanvasContext\"];\n\n context.setTransform(window.devicePixelRatio, 0, 0, window.devicePixelRatio, 0, 0);\n\n context.clearRect(0,0,60,200);\n context.fillStyle = \"rgba(255,255,255,0.6)\";\n context.fillRect(0, 0, 60, 200);\n if (layer[\"reverseBar\"]) {\n for (let i = 0; i < 185; i++) {\n context.fillStyle = getColorPoint(layer[\"colorRange\"], 1-(i/185));\n if (i === 184)\n context.fillRect(0, i, 20, 1);\n else\n context.fillRect(0, i, 20, 2);\n }\n }\n else {\n for (let i = 0; i < 185; i++) {\n context.fillStyle = getColorPoint(layer[\"colorRange\"], i/185);\n if (i === 184)\n context.fillRect(0, i, 20, 1);\n else\n context.fillRect(0, i, 20, 2);\n }\n }\n let currentAdjusted;\n if (typeof current !== 'undefined') {\n currentAdjusted = (current-layer[\"colorBounds\"][0])/(layer[\"colorBounds\"][1]-layer[\"colorBounds\"][0]);\n if (layer[\"reverseBar\"])\n currentAdjusted = 1-currentAdjusted;\n context.fillStyle = \"rgba(0,0,0,0.8)\";\n context.fillRect(0, Math.floor(currentAdjusted*185), 20, 1);\n }\n context.fillStyle = \"#000000\";\n context.font = \"12px Mukta\";\n context.textAlign = \"left\";\n if (layer[\"reverseBar\"]) {\n if (typeof current === 'undefined' || currentAdjusted > 0.08)\n context.fillText(layer[\"colorBounds\"][1].toString(), 22, 10);\n if (typeof current === 'undefined' || currentAdjusted < 0.92)\n context.fillText(layer[\"colorBounds\"][0].toString(), 22, 183);\n }\n else {\n if (typeof current === 'undefined' || currentAdjusted > 0.08)\n context.fillText(layer[\"colorBounds\"][0].toString(), 22, 10);\n if (typeof current === 'undefined' || currentAdjusted < 0.92)\n context.fillText(layer[\"colorBounds\"][1].toString(), 22, 183);\n }\n if (typeof current !== 'undefined') {\n context.font = \"bold 12px Mukta\";\n context.fillText(current.toString(), 22, Math.floor(Math.min(Math.max(currentAdjusted, 0.03), 0.96) * 185)+5);\n }\n\n context.fillStyle = \"rgba(255,255,255,0.6)\";\n context.fillRect(0, 185, 60, 15);\n context.fillStyle = \"#000000\";\n context.font = \"14px Mukta\";\n context.textAlign = \"center\";\n context.fillText(layer[\"unit\"].toString(),30,196);\n}", "function horizontalScale() {\n if (svg.element.select('.horizontalScale')) svg.element.select('.horizontalScale').remove()\n if (ruler.container) ruler.container.remove()\n ruler.container = svg.element\n .append('g')\n .attr('transform', 'translate(' + [ruler.y, ruler.x] + ')')\n .attr('class', 'horizontalScale')\n\n ruler.container.append('path')\n .attr('d', d => 'M' + ruler.padding + ',10L' + (ruler.width + ruler.padding) + ',10')\n .attr('stroke-width', 1)\n .attr('stroke', '#000')\n\n ruler.element = ruler.container\n .append('text')\n .attr('class', 'ruler-text')\n .attr('x', ruler.width / 2 + ruler.padding)\n .attr('y', 36)\n .attr('font-family', 'sans-serif')\n .text('')\n .attr('font-size', '14px')\n .attr('fill', '#000')\n .attr('text-anchor', 'middle')\n }", "function drawHorizontalScale(ifDirty = false) {\n if (ifDirty && !worldSizeDirty)\n return;\n function drawTicks(/** @type {CanvasRenderingContext2D} */ ctx, pixelsPer, heightPer) {\n let total = heightPer.clone();\n total.value = math.unit(-config.x, \"meters\").toNumber(config.unit);\n\n // further adjust it to put the current position in the center\n\n total.value -= heightPer.toNumber(\"meters\") / pixelsPer * (canvasWidth + 50) / 2;\n let x = ctx.canvas.clientWidth - 50;\n\n\n let offset = total.toNumber(\"meters\") % heightPer.toNumber(\"meters\");\n\n x += offset / heightPer.toNumber(\"meters\") * pixelsPer;\n total = math.subtract(total, math.unit(offset, \"meters\"));\n\n for (; x >= 50 - pixelsPer; x -= pixelsPer) {\n // negate it so that the left side is negative\n drawTick(ctx, x, 50, math.multiply(-1, total));\n total = math.add(total, heightPer);\n }\n }\n\n function drawTick(/** @type {CanvasRenderingContext2D} */ ctx, x, y, value) {\n const oldStroke = ctx.strokeStyle;\n const oldFill = ctx.fillStyle;\n\n ctx.beginPath();\n ctx.moveTo(x, y);\n ctx.lineTo(x, y + 20);\n ctx.strokeStyle = \"#000000\";\n ctx.stroke();\n\n ctx.beginPath();\n ctx.moveTo(x, y + 20);\n ctx.lineTo(x, ctx.canvas.clientHeight - 70);\n ctx.strokeStyle = \"#aaaaaa\";\n ctx.stroke();\n\n ctx.beginPath();\n ctx.moveTo(x, ctx.canvas.clientHeight - 70);\n ctx.lineTo(x, ctx.canvas.clientHeight - 50);\n ctx.strokeStyle = \"#000000\";\n ctx.stroke();\n\n const oldFont = ctx.font;\n ctx.font = 'normal 24pt coda';\n ctx.fillStyle = \"#dddddd\";\n\n ctx.beginPath();\n ctx.fillText(value.format({ precision: 3 }), x + 35, y + 20);\n\n ctx.font = oldFont;\n ctx.strokeStyle = oldStroke;\n ctx.fillStyle = oldFill;\n }\n const canvas = document.querySelector(\"#display\");\n\n /** @type {CanvasRenderingContext2D} */\n\n const ctx = canvas.getContext(\"2d\");\n\n let pixelsPer = (ctx.canvas.clientHeight - 100) / config.height.toNumber();\n\n heightPer = 1;\n\n if (pixelsPer < config.minLineSize * 2) {\n const factor = math.ceil(config.minLineSize * 2/ pixelsPer);\n heightPer *= factor;\n pixelsPer *= factor;\n }\n\n if (pixelsPer > config.maxLineSize * 2) {\n const factor = math.ceil(pixelsPer / 2/ config.maxLineSize);\n heightPer /= factor;\n pixelsPer /= factor;\n }\n\n if (heightPer == 0) {\n console.error(\"The world size is invalid! Refusing to draw the scale...\");\n return;\n }\n heightPer = math.unit(heightPer, document.querySelector(\"#options-height-unit\").value);\n \n\n ctx.beginPath();\n ctx.moveTo(0, 50);\n ctx.lineTo(ctx.canvas.clientWidth, 50);\n ctx.stroke();\n ctx.beginPath();\n ctx.moveTo(0, ctx.canvas.clientHeight - 50);\n ctx.lineTo(ctx.canvas.clientWidth , ctx.canvas.clientHeight - 50);\n ctx.stroke();\n\n drawTicks(ctx, pixelsPer, heightPer);\n}", "function drawFixation() {\n let ctx = document.getElementById('canvas').getContext('2d');\n ctx.lineWidth = prms.fixWidth;\n ctx.moveTo(-prms.fixSize, 0);\n ctx.lineTo( prms.fixSize, 0);\n ctx.stroke(); \n ctx.moveTo(0, -prms.fixSize);\n ctx.lineTo(0, prms.fixSize);\n ctx.stroke(); \n}", "function zoomed() {\n canvas.style(\"stroke-width\", 1.5 / d3.event.scale + \"px\");\n canvas.attr(\"transform\", \"translate(\" + d3.event.translate + \")scale(\" + d3.event.scale + \")\");\n }", "setLineSize(size) {\n this.context.lineWidth = size;\n }", "function scaleCanvas() {\r\n\t\tvar ctx = $['mapsettings'].ctx;\r\n\t\tvar scalevalue = new Point(1,1);\r\n\t\tvar scale = getRelativeScale($['mapsettings'].zoom);\t\r\n\t\tscale.x = scale.x * scalevalue.x;\r\n\t\tscale.y = scale.y * scalevalue.y;\r\n\t\t$['mapsettings'].scale = scale;\r\n\t}", "function drawScale() {\n /* walls */\n for (var i = 0; i < fie.length; i++) {\n if (fie[i].intact) {\n if (fie[i].type != \"GHOST1\" && fie[i].type != \"GHOST2\" && fie[i].type != \"GHOST3\" && fie[i].type != \"CHERRY\" && fie[i].type != \"PACMAN\")\n fie[i].draw();\n }\n }\n /* score */\n noStroke();\n fill(\"#fffdfc\");\n textSize(20);\n textAlign(LEFT);\n text(score, 580,156 );\n var s = 'Score:';\n text(s, 500, 140, 70, 80);\n\n /* timer */\n //timer.style('color', '#fffdfc');\n var t = 'Time:';\n text(t, 500, 10, 70, 80);\n\n var l = 'Lives:';\n text(l, 500, 60, 70, 80);\n}", "function draw() {\n background(0); // Set the background to black\n y = y - 1;\n if (y < 0) {\n y = height;\n }\n line(0, y, width, y);\n}", "render() {\n this.ctx.save();\n this.ctx.strokeStyle = this.penColor;\n this.ctx.lineWidth = this.size;\n this.ctx.lineCap = \"round\";\n const [first, ...rest] = this.points;\n this.ctx.beginPath();\n this.ctx.moveTo(first.x, first.y);\n rest.forEach((point) => this.ctx.lineTo(point.x, point.y));\n this.ctx.stroke();\n this.ctx.restore();\n }", "function tracer_grille(svg,width,yScale,data){\r\n\t\tsvg.selectAll(\"y_axis\").data(yScale.ticks(5)).enter()\r\n        .append(\"line\")\r\n        .attr(\"class\", \"horizontalGrid\")\r\n        .attr(\"x2\", width)\r\n        .attr(\"y1\", function(d){ return yScale(d);})\r\n        .attr(\"y2\", function(d){ return yScale(d);});\r\n}", "function drawLine(x1, y1, x2, y2, clr) {\n \"use strict\";\n var scaledX1, scaledY1, scaledX2, scaledY2;\n scaledX1 = scaleX(Number(x1));\n scaledY1 = scaleY(Number(y1));\n scaledX2 = scaleX(Number(x2));\n scaledY2 = scaleY(Number(y2));\n //origin\n ctx.beginPath();\n ctx.moveTo(scaledX1, scaledY1);\n ctx.lineTo(scaledX2, scaledY2);\n ctx.strokeStyle = clr;\n ctx.lineWidth = 1.0;\n ctx.stroke();\n}", "function drawLine() {\n\t\t// Si début du dessin : initialisation\n\t\tif(!started) {\n\t\t\tcontext.beginPath();\n\t\t\tcontext.moveTo(cursorX, cursorY);\n\t\t\tstarted = true;\n\t\t}\n\t\t//Sinon, je dessine\n\t\telse {\n\t\t\tcontext.lineTo(cursorX, cursorY);\n\t\t\tcontext.lineWidth = width_brush;\n\t\t\tcontext.stroke();\n\t\t}\n\t}", "function brushLine(x,y,px,py) {\n var dis = dist(x,y,px,py);\n if (dis > 0) {\n var step = sidebar.sliders[1].val/dis;\n var myx,myy,t = 0;\n for (var i = 0; i <= dis; i+= step/5) {\n t = max(i / dis);\n myx = mouseX + (pmouseX-mouseX) * t;\n myy = mouseY + (pmouseY-mouseY) * t;\n mainBrush.show(myx,myy);\n }\n } else {\n mainBrush.show(x,y);\n }\n}", "function fit(scale) {\n var largestPossibleRadius = Math.min(scale.height / 2, scale.width / 2);\n scale.drawingArea = Math.round(largestPossibleRadius);\n scale.setCenterPoint(0, 0, 0, 0);\n }", "function fit(scale) {\n var largestPossibleRadius = Math.min(scale.height / 2, scale.width / 2);\n scale.drawingArea = Math.round(largestPossibleRadius);\n scale.setCenterPoint(0, 0, 0, 0);\n }", "function draw() { \n background(200); \t\t\t// Set the background to black\n x = x + 1; \n if (x > width) { \n x = 0; \n } \n line(x, 0, x, height); \n}", "function draw() {\n let w = width / 3;\n let h = height / 3;\n\n // Toutes les prochains traits auront une épaisseur de 4\n strokeWeight(4);\n line(w, 0, w, height);\n line(w * 2, 0, w * 2, height);\n line(0, h, width, h);\n line(0, h * 2, width, h * 2);\n\n}", "addVertLine(){\n\t\t// start in center of the x-range\n\t\tlet pos = Math.floor(this.getCenter().x * 10) / 10.;\t// round to nearest .1\n\t\tlet to_shape = {\n\t\t\tid: this.cur_annotation_id,\n\t\t\tname: 'Spike ('+pos+')',\n\t\t\ttype: 'rect',\n\t\t\txref: 'x',\n\t\t\tyref: 'paper',\n\t\t\tx0: pos,\n\t\t\tx1: pos,\n\t\t\ty0: 0,\n\t\t\ty1: 1,\t// go from bottom to top of plot part of window\n\t\t\tline: {\n\t\t\t\tcolor: '#4227ff',\n\t\t\t\topacity: 1.,\n\t\t\t\twidth: 1,\n\t\t\t},\n\t\t}\n\t\tthis.cur_annotation_id ++;\n\t\tPlotly.relayout(this.getElement(), {'shapes[0]': to_shape});\n\t\tthis.refreshAnnotationMarkup();\n\t\tthis.annotations_list_target.last().click();\n\t}", "function setLineWidth(width) {\n\tcontext.lineWidth = width;\n\tlineWidthLabel.innerHTML = \"Drawing Line \" + width + \" pixles wide\";\n}", "function drawline() {\n\n if (isDrawing) {\n linePoint2 = d3.mouse(this);\n gContainer.select('line').remove();\n gContainer.append('line')\n .attr(\"x1\", linePoint1.x)\n .attr(\"y1\", linePoint1.y)\n .attr(\"x2\", linePoint2[0] - 2) //arbitary value must be substracted due to circle cursor hover not working\n .attr(\"y2\", linePoint2[1] - 2); // arbitary values must be tested\n\n }\n }", "size(_size) {\n this.penSize = parseFloat(_size);\n this.ctx.lineWidth = this.penSize;\n }", "function scaleLines() {\t\n\tconsole.log(\"> scaling...\");\n\t// DATA POINTS\n\tsvg.selectAll(\".data-point\")\n .each(function(i) {\n\t\t\t\td3.select(this)\n\t\t\t\t\t.transition()\n\t\t\t\t\t .duration(SCALE_DURATION)\n\t\t\t\t\t .attr(\"cx\", function (d) { return xScale(new Date(d.date)); })\n\t\t\t\t\t .attr(\"cy\", function (d) { return yScale(d.value); })\n\t\t\t\t\t .attr(\"opacity\", function (d) { \n\t\t\t\t\t \t\tif(xScale(new Date(d.date)) < xScale(xDomain.min)) {\n\t\t\t\t\t \t\t\treturn 0;\n\t\t\t\t\t \t\t} \n\t\t\t\t\t \t\treturn DATA_POINT_OPACITY;\n\t\t\t\t\t \t});\n });\t\t\t \n\t// DATA LINES\n\tvar line = d3.svg.line()\n\t\t\t\t\t .x(function (d) { return xScale(new Date(d.date)); })\n\t\t\t\t\t .y(function (d) { return yScale(d.value); });\n\tpathContainer.selectAll(\".line\")\n\t\t\t.each(function(i) {\n\t\t\t\td3.select(this)\n\t\t\t\t\t.transition()\n\t\t\t\t\t .attr(\"stroke-dasharray\", null)\n\t \t\t\t\t .attr(\"stroke-dashoffset\", null)\n\t\t\t\t\t .duration(SCALE_DURATION)\n\t\t\t\t .attr(\"d\", line);\n\t\t\t});\t\n\t// DATA ANALYSIS\n\tupdateAllDataAnalysis();\n}", "draw() {\n s.globalCompositeOperation = \"lighter\";\n s.lineWidth = 2;\n s.strokeStyle = `hsla(${this.hue}, 100%, 50%, ${this.a})`;\n s.strokeRect(\n this.x - this.size / 2,\n this.y - this.size / 2,\n this.size,\n this.size\n );\n this.update();\n }", "function updateStrokeWidth() {\n var g = $('#planta');\n g.attr('stroke-width', (0.1 / scale));\n g.attr('transform', 'scale(' + size + ')');\n}", "function drawLTTLines(\n x1,\n x2,\n y1,\n y2,\n svg,\n xScale,\n yScale,\n color = \"black\",\n lwd = 3\n) {\n svg\n .append(\"line\")\n .attr(\"x1\", xScale(x1))\n .attr(\"x2\", xScale(x2))\n .attr(\"y1\", yScale(y1))\n .attr(\"y2\", yScale(y2))\n .attr(\"stroke\", color)\n .attr(\"stroke-width\", lwd)\n .attr(\"stroke-linecap\", \"round\");\n}", "function drawLines() {\n}", "function drawLines() {\n}", "draw_line (line, color, line_width, context, layer_name) {\n // Make sure we don't plot below the axis\n let pt_1 = [context.x_low, line.compute_y(context.x_low)];\n if (pt_1[1] < context.y_low) {\n pt_1 = [line.compute_x(context.y_low), context.y_low];\n }\n\n let pt_2 = [context.x_high, line.compute_y(context.x_high)];\n if (pt_2[1] < context.y_low) {\n pt_2 = [line.compute_x(context.y_low), context.y_low];\n }\n\n let curve = new Curve (\n [pt_1[0], pt_2[0]],\n [pt_1[1], pt_2[1]]\n );\n\n this.draw_curve(curve, color, line_width, context, layer_name);\n }", "function drawLineChart(raw_line_data) {\n var data = google.visualization.arrayToDataTable(raw_line_data['line']);\n\n var options = {\n title: 'Energy Usage',\n backgroundColor: 'transparent',\n colors: ['#7851a9'],\n 'width': 1000,\n 'height': 750,\n //curveType: 'function', <-- made graph curvy\n legend: { position: 'top' }\n };\n\n var chart = new google.visualization.LineChart(document.getElementById('linechart'));\n\n chart.draw(data, options);\n }", "drawLine(){\n for (var index in this.draw){\n this.draw[index] = this.fracToPixel(this.draw[index])\n }\n canvas.beginPath();\n canvas.moveTo(this.draw[\"rightX\"],this.draw[\"rightY\"]);\n canvas.lineTo(this.draw[\"leftX\"],this.draw[\"leftY\"]);\n canvas.stroke();\n }", "function redrawScale() {\n scaleX.domain([\n startOfSelectedDateStr.toDate(),\n endOfSelectedDateStr.toDate()\n ]);\n timeline.select('.xAxis')\n .call(xAxis);\n // https://gist.github.com/phoebebright/3098488\n }", "function change_thickness() {\n thickness = document.getElementById(\"slider\").value;\n ctx.lineWidth = thickness;\n }", "function scaleControl() {\n let control = new ScaleLine({\n units: \"metric\",\n bar: true,\n steps: 5,\n text: true,\n minWidth: 200,\n });\n return control;\n}", "function drawB(sz, cl, id){\n cnt.lineWidth = sz;\n cnt.strokeStyle = cl;\n cnt.strokeRect(tl_p[id].tx +1, tl_p[id].ty +1, tl_size.w -2, tl_size.h -2);\n }", "setWidth(width = 1) {\n this.ctx.lineWidth = width;\n }", "function yAxis(scale) {\n\n this.scale = scale; // Um wie viel wird die Skala der Y-Achse pro Abschnitt erhöht\n this.startLine = 0; // Anfagslinie\n\n this.drawLine = function drawLine() {\n var mirrorI = 13+(this.startLine/this.scale);\n for(var i = 1; i < G_HEIGHT+10/20; i++) {\n // Zeichne die Linie mit den Nummern\n G_CTX.fillStyle = \"Black\";\n G_CTX.beginPath();\n G_CTX.moveTo(0, 20*i);\n G_CTX.lineTo(10, 20*i);\n G_CTX.strokeStyle = DRAW_COLOR;\n G_CTX.stroke();\n // Zeichnen der Nummern\n G_CTX.font = \"12px Arial\";\n G_CTX.fillStyle = DRAW_COLOR;\n if(mirrorI != 0)\n G_CTX.fillText((Math.round(this.scale* mirrorI)).toString(),13,20*i+3);\n mirrorI--;\n }\n\n }\n}", "update()\n {\n this.scale += this.ds;\n\n if(this.scale <= SMIN)\n {\n this.scale = SMIN;\n this.ds = -this.ds;\n }\n\n if(this.scale >= SMAX)\n {\n this.scale = SMAX;\n this.ds = -this.ds;\n }\n }", "limity() { return (this.scale - 1) * this.sizey / 2; }", "function draw_line(sx,sy,dx,dy,indicator){\r\n\r\n\t\tctx.beginPath();\r\n\t\tctx.moveTo(sx,sy);\r\n\t\tctx.lineTo(dx,dy);\r\n\t\tif(indicator==0)\r\n\t ctx.strokeStyle=\"black\";\r\n\t else\r\n\t\t ctx.strokeStyle=\"#4A8\";\r\n\r\n ctx.lineWidth=3;\r\n\t\tctx.stroke();\r\n\t\t \r\n\t }", "DrawAxis()\n {\n ctx.save();\n ctx.beginPath();\n ctx.lineWidth = 10;\n ctx.strokeStyle = 'rgba(255, 0, 0, 1)';\n ctx.moveTo(0, 0);\n ctx.lineTo(screen.width, 0);\n ctx.stroke();\n\n ctx.beginPath();\n ctx.strokeStyle = 'rgba(0, 255, 0, 1)';\n ctx.moveTo(0, 0);\n ctx.lineTo(0, screen.height);\n ctx.stroke();\n ctx.restore();\n }", "function drawScale(scaleBuffer, userdata, textSize, color) {\n if (userdata != null) {\n var textOffset = textSize + 1;\n var barLen = textOffset / 3 * 2;\n var barWidth = textOffset / 7;\n var myStroke = textOffset / 30;\n scaleBuffer.textSize(textSize);\n scaleBuffer.textAlign(CENTER, CENTER);\n //scaleBuffer.fill(150, 40, 120);\n scaleBuffer.fill(color);\n scaleBuffer.strokeWeight(myStroke);\n scaleBuffer.stroke(0);\n //scaleBuffer.noStroke();\n scaleBuffer.rectMode(CENTER);\n var hStep = 50;\n for (var i = hStep; i - userdata.xtopleft < userdata.width; i += hStep) {\n var coordOrig = (i - userdata.xtopleft);\n var coord = coordOrig * scaleBuffer.width / userdata.width;\n scaleBuffer.rect(coord, 0, barWidth, barLen);\n scaleBuffer.text(i, coord, textOffset);\n }\n var vStep = 5;\n for (var i = vStep; i - userdata.ytopleft < userdata.height; i += vStep) {\n var coordOrig = (i - userdata.ytopleft);\n var coord = coordOrig * scaleBuffer.height / userdata.height;\n scaleBuffer.rect(0, coord, barLen, barWidth);\n scaleBuffer.text(i, textOffset, coord);\n }\n }\n}", "function drawLine(array, low, high, line) {\n var arrayX = array.element.offset().left - array.element.parent().offset().left;\n var arrayY = array.element.offset().top - array.element.parent().offset().top + 150;\n var dy = - (array.value(high) - array.value(low)) * 130 / array.value(arraySize - 1);\n var dx = (high - low) * 37;\n var k;\n if (dx === 0) {\n k = 0;\n } else {\n k = dy / dx;\n }\n var x0 = arrayX + 2 + 37 * low;\n var y0 = arrayY - 130 * array.value(low) / array.value(arraySize - 1);\n var b = y0 - k * x0;\n var x1 = arrayX + 2;\n var y1 = k * x1 + b;\n var x2 = arrayX + 2 + 37 * arraySize;\n var y2 = k * x2 + b;\n\n line.movePoints([[0, x1, y1], [1, x2, y2]]);\n line.css({opacity: 0.2});\n }", "function Scale () {}", "lineRender(){\n d3.select('.circle-legend').select('svg').append('line').attr('x1',0).attr('x2',180).attr('y1',0).attr('y2',0)\n .attr('transform','translate(0,55)').classed('legendLine',true)\n }", "updateLastLine(line) { // this is used when drawing with the pen\r\n if (line.length < 2) return;\r\n var point1 = line.points[line.points.length - 1];\r\n var point2 = line.points[line.points.length - 2];\r\n point1 = this.worldPointToChunkScreenPoint(point1);\r\n point2 = this.worldPointToChunkScreenPoint(point2);\r\n this.ctx.beginPath();\r\n this.ctx.lineWidth = Main.Camera.getRelativeWidth(line.width);\r\n this.ctx.strokeStyle = line.style;\r\n this.ctx.lineTo(point1.x, point1.y);\r\n this.ctx.lineTo(point2.x, point2.y);\r\n this.ctx.stroke();\r\n }", "function draw_scale(ctx, metrics, alphabet_ic) {\n var tic_height = metrics.stack_height / alphabet_ic;\n\n ctx.save();\n\n ctx.translate(metrics.y_label_height, metrics.y_num_height/2);\n\n //draw the axis label\n ctx.save();\n ctx.font = metrics.y_label_font;\n ctx.translate(0, metrics.stack_height/2);\n ctx.save();\n ctx.rotate(-(Math.PI / 2));\n ctx.textAlign = \"center\";\n ctx.fillText(\"bits\", 0, 0);\n ctx.restore();\n ctx.restore();\n\n ctx.translate(metrics.y_label_spacer + metrics.y_num_width, 0);\n\n //draw the axis tics\n ctx.save();\n ctx.translate(0, metrics.stack_height);\n ctx.font = metrics.y_num_font;\n ctx.textAlign = \"right\";\n ctx.textBaseline = \"middle\"\n for (var i = 0; i <= alphabet_ic; i++) {\n //draw the number\n ctx.fillText(\"\" + i, 0, 0);\n //draw the tic\n ctx.beginPath();\n ctx.moveTo(0, 0);\n ctx.lineTo(metrics.y_tic_width, 0);\n ctx.stroke();\n //prepare for next tic\n ctx.translate(0, -tic_height);\n }\n ctx.restore();\n\n ctx.translate(metrics.y_tic_width, 0);\n\n ctx.beginPath();\n ctx.moveTo(0, 0);\n ctx.lineTo(0, metrics.stack_height);\n ctx.stroke();\n\n ctx.restore();\n}", "display(yMin, yMax) {\n line(this.x, yMin, this.x, yMax);\n }", "render() {\n noFill()\n stroke(this.layerColor)\n strokeWeight(this.randomWeight)\n push()\n translate(width / 2, height / 2)\n\n for (let i = 0; i < this.linesNumShapes; i++) {\n line(this.start * this.step, 0, (this.stop + 1) * this.step, 0)\n rotate(this.linesAngle)\n }\n\n pop()\n }", "drawScale(options = {}){\n\t\t/*save the default context setttings*/\n\t\tthis.ctx.save()\n\t\t/*put context in a local variable for a shorter variable name*/\n\t\tlet ctx = this.ctx;\n\t\t/*number of divisons required on scale*/\n\t\tlet divisions = options.divisions || 7; //set to 7 by default\n\n\n\t\t/*value of one division for celcius*/\n\t\tlet incrementC = (this.maxC - this.minC) / divisions;\n\n\t\t/*value of one divsion for fahernheit*/\n\t\tlet incrementF = (this.maxF - this.minF) / divisions;\n\n\t\t/*ordered scale labels for celcius*/\n\t\tlet labelsC = [];\n\n\t\t/*ordered scale labels for fahrenheit*/\n\t\tlet labelsF = [];\n\n\t\tfor (let i = 0; i <= divisions; i++){\n\t\t\tlabelsC.push( floatFix( this.minC + i * incrementC ,1) + '\\xB0' +\"C\" );//not alot of precision is required\n\t\t\tlabelsF.push( floatFix( this.minF + i * incrementF ,1) + '\\xB0' + \"F\");\n\t\t}\n\t\t/*angle value of one increment*/\n\t\tlet incrementAng = this.guageArc / divisions;\n\n\t\t/*set the font of the labels */\n\t\tctx.font = \"13px Helvetica, sans-serif\"; \n\t\tctx.textBaseline = \"middle\";\n\t\tctx.textAlign = \"center\";\n\n\t\t/*clearance from the arc to the labels*/\n\t\tlet clearance = Number.parseFloat( ctx.font);\n\n\t\t/*the radial distance between celcius and fahrenheit labels*/\n\t\tlet diff = this.guageArcThickness + 2 * clearance; \n\n\t\t/*translate origin to center of canvas*/\n\t\tctx.translate(this.centerX,this.centerY);\n\n\t\t/*layout labels on arc*/\n\t\tfor(let i = 0; i <= divisions ; i++ ){\n\t\t\tctx.save();\n\t\t\tctx.rotate(this.startAngle + i * incrementAng);\n\t\t\tctx.translate(this.guageArcRadius - this.guageArcThickness/2 - clearance , 0);\n\t\t\tctx.rotate( -(this.startAngle + i * incrementAng) );\n\t\t\tctx.fillText(labelsC[i],0,0);\n\n\t\t\tctx.rotate(this.startAngle + i * incrementAng);\n\t\t\tctx.translate(diff, 0);\n\t\t\tctx.rotate( -(this.startAngle + i * incrementAng) );\n\t\t\tctx.fillText(labelsF[i],0,0);\n\t\t\tctx.restore();\n\t\t};\n\t\tctx.restore();\n\n\n\t}", "show() {\n strokeWeight(3);\n stroke(this.clr);\n line(this.posx, this.posy, this.endx, this.endy);\n this.posx = this.endx;\n this.posy = this.endy;\n }", "function startLine(e){\n\t\t\tcontext.beginPath();\n\t\t\tcontext.strokeStyle = \"black\";\n\t\t\tcontext.lineCap = \"round\";\n\t\t\tcontext.lineWidth = 5;\n\t\t\tcontext.moveTo(e.clientX - theCanvas.offsetLeft, e.clientY - theCanvas.offsetTop);\n\t\t}", "function drawSigLine() {\n if (!settings.lineWidth)\n return false;\n canvasContext.beginPath();\n canvasContext.lineWidth = settings.lineWidth;\n canvasContext.strokeStyle = settings.lineColour;\n canvasContext.moveTo(settings.lineMargin, settings.lineTop);\n canvasContext.lineTo(element.width - settings.lineMargin, settings.lineTop);\n canvasContext.stroke();\n canvasContext.closePath();\n }", "function figureScale($scope, x1, y1){\r\n var x2 = $scope.east - $scope.west;\r\n var y2 = $scope.north - $scope.south;\r\n $scope.xFactor = x1/x2;\r\n $scope.yFactor = y1/y2;\r\n}", "function drawLine(name,x0, y0, x1, y1, thickness, color, emit){\n listOfCanvas[name].context.beginPath();\n\t\tlistOfCanvas[name].context.globalCompositeOperation=\"source-over\";\n\t\tlistOfCanvas[name].context.moveTo((x0 + $(\"#canvasContainer\" + listOfCanvas[name].container).scrollLeft()), y0);\n\t\tlistOfCanvas[name].context.lineTo((x1 + $(\"#canvasContainer\" + listOfCanvas[name].container).scrollLeft()), y1);\n\t\tlistOfCanvas[name].context.strokeStyle = color;\n\t\tlistOfCanvas[name].context.lineWidth = thickness*scale;\n\t\tlistOfCanvas[name].context.stroke();\n listOfCanvas[name].context.closePath();\n }", "function scale(point){\n\t\tpoint.x =point.x *xscale;\n\t\tpoint.y= point.y *yscale ;\n\t}", "function whiteboard_mousedown() {\n\n // definir ponto inicial da régua no SVG\n if (scaling) {\n initialPoint.x = (d3.mouse(this)[0] - panZoom.getPan().x) / (panZoom.getZoom());\n initialPoint.y = (d3.mouse(this)[1] - panZoom.getPan().y) / (panZoom.getZoom());\n scale_line\n .attr('x1', initialPoint.x)\n .attr('x2', initialPoint.x)\n .attr('y1', initialPoint.y)\n .attr('y2', initialPoint.y)\n .classed('hidden', false);\n }\n}", "drawHeatLine(){\n\t\tif(this.hot){\n\t\t\tfill(255,0,0);\n\t\t}else{\n\t\t\tfill(0,255,0);\n\t\t}\n\t\tlet xwidth = map(this.heat, 0,100,0,width);\n\t\trect(0, 0, xwidth, 30 );\n\t}", "function drawLine() {\n var i = term.width;\n while(i--) {\n term.blue(\"-\");\n }\n term.blue(\"\\n\");\n}", "scale(num) {\n\n var NewValue = (((num - 0) * (this.svgW - 0)) / (this.maxXVal - 0)) + 0;\n return (NewValue);\n }", "function midline()\r\n{\r\nfor(i=0;i<480;i+=10)\r\n{\r\nvar y = 0;\r\nfill(\"white\");\r\nstroke(0);\r\nrect(width/2,y+i,10,480);\r\n}\r\n}", "function fit(scale) {\n\t\t\tvar largestPossibleRadius = Math.min(scale.height / 2, scale.width / 2);\n\t\t\tscale.drawingArea = Math.round(largestPossibleRadius);\n\t\t\tscale.setCenterPoint(0, 0, 0, 0);\n\t\t}", "function fit(scale) {\n\t\t\tvar largestPossibleRadius = Math.min(scale.height / 2, scale.width / 2);\n\t\t\tscale.drawingArea = Math.round(largestPossibleRadius);\n\t\t\tscale.setCenterPoint(0, 0, 0, 0);\n\t\t}", "function line(x1, y1, x2, y2, lW, sS) {\n window.ctx.save();\n window.ctx.lineWidth = lW + 2;\n window.ctx.beginPath();\n window.ctx.moveTo(x1, y1);\n window.ctx.lineTo(x2, y2);\n window.ctx.strokeStyle = \"rgba(0, 0, 0, 0.25)\";\n window.ctx.stroke();\n window.ctx.lineWidth = lW;\n window.ctx.strokeStyle = sS;\n window.ctx.stroke();\n window.ctx.restore();\n}", "function drawSlope(slope, container, width, height, lineWidth) {\n\t//Set up the container and canvas.\n\t$(container).css(\"width\", width);\n\t$(container).css(\"height\", height);\n\tvar c = document.createElement(\"canvas\");\n\t$(c).prop(\"width\", width)\n\t$(c).prop(\"height\", height)\n\t$(c).css(\"width\", width);\n\t$(c).css(\"height\", height);\n\tvar ctx=c.getContext(\"2d\");\n\n\t//Set background color based on slope with some fun color math :)\n\tmaxSlope = 100.0;\n\tmaxLog = Math.log(maxSlope);\n\tcolorSlope = Math.log(Math.abs(slope)); //We use the log to accelerate the transition from green to red.\n\tintensity = 225 - Math.round((Math.min(colorSlope, maxSlope) * 110.0) / maxLog); \n\tctx.fillStyle = (slope < 0) ? 'rgb(225,' + intensity + ',0)' : 'rgb(' + intensity + ',225,0)';\n\tctx.fillRect(0, 0, width, height);\n\t\n\t//Scale slope for better viewing - this means a slope of 5 will run the diagonal.\n\tslope = slope / 5\n\t\n\t//Calculate start and end points depending on the slope.\n\tif (Math.abs(slope) > 1) {\n\t\tvar y1 = height;\n\t\tvar y2 = 0;\n\t\tvar x1 = (width/2)-((1/slope) * (width/2))\n\t\tvar x2 = (width/2)+((1/slope) * (width/2))\n\t} else {\n\t\tvar y1 = (height/2) + (slope * (height/2));\n\t\tvar y2 = (height/2) - (slope * (height/2));\n\t\tvar x1 = 0;\n\t\tvar x2 = width;\n\t}\n\t\n\t//Draw the line.\n\tctx.beginPath();\n\tctx.moveTo(x1, y1);\n\tctx.lineTo(x2, y2);\n\tctx.lineWidth = lineWidth;\n\tctx.stroke();\n\t$(container).append(c);\n\treturn c;\n}", "function draw_line(svg1, data, xScale, yScale,class_name){\r\n\tvar valueline = d3.svg.line();\r\n\t//Tracer la ligne \r\n\tvalueline.x(function (d) { return xScale(d.annee) + (xScale.rangeBand() / 2); })\r\n .y(function (d) { return yScale(d.chiffre_af); });\r\n\t// On appelle ici la fonction valueline qui donne les coordonnées à relier à la ligne.\r\n\t// On les append à notre path\t\r\n\tsvg1.append(\"path\") \r\n .data(data)\r\n\t\t.attr(\"class\",class_name)\r\n\t\t.attr(\"fill\", \"none\")\r\n .attr(\"d\", valueline(data));\r\n}", "function lineScale(start_w, end_w, start_h, end_h) {\n /* sets the scale for the axes of the line chart and the rile chart */\n\n electionYears_int = []\n electionYears.forEach(function(element) {\n electionYears_int.push(parseInt(element))\n })\n\n // x scale (years)\n var xScale = d3v5.scaleLinear()\n .domain([1946, 2017])\n .range([line_start_w, line_end_w]);\n\n // y-axis (percentages)\n var yScaleLine = d3v5.scaleLinear()\n .domain([0, 50])\n .range([line_end_h - line_start_h, line_start_h]);\n\n // y-axis (riles)\n var yScaleRile = d3v5.scaleLinear()\n .domain([-35, 35])\n .range([line_end_h - line_start_h, line_start_h]);\n\n // color scale (left-right)\n var colorScale = d3v5.scaleLinear()\n .domain([-10,10])\n .range([\"#ff0000\", \"#00c3ff\"]);\n\n return [xScale, yScaleLine, yScaleRile, colorScale];\n}", "draw() {\n var p = window.p;\n\n let col= this.col ? this.p.color(this.col.r, this.col.g , this.col.b) : this.p.color(255,255,255);\n\n //we draw line\n this.p.stroke(col); //it's for campability with old clients\n this.p.strokeWeight(this.sw);\n this.p.line(this.a.x, this.a.y, this.b.x, this.b.y);\n\n }", "function redraw() {\n\t\t//ctx.strokeStyle = 'blue';\n\t\tctx.lineWidth = '.1';\n\t\tctx.strokeRect(0, 0, window.innerWidth, window.innerHeight);\n\t}", "function unir(initial, final){\n ctx.beginPath();\n ctx.lineWidth = 2*(numScale/minimo);\n ctx.strokeStyle = '#003300';\n ctx.moveTo(initial.x,initial.y);\n ctx.lineTo(final.x,final.y);\n ctx.stroke();\n}", "function zoomed() {\n draw();\n circlesTranslate();\n }", "function addLine () {\n\tconst linksCoords = this.getBoundingClientRect();\n\tline.style.width = `${linksCoords.width}px`;\n\tline.style.transform = `translate(${linksCoords.left}px, ${linksCoords.top}px)`;\n\tline.style.opacity = 1;\n}", "function renderNormal(_startPoint, normal, scale) {\n\n\t\tif(scale == undefined) {\n\t\t\tscale = 50.0;\n\t\t};\n\n\t\tvar colorBlack = data.colors[6];\n\n\t\tvar startPoint = vec3.create();\n\t\tvec3.set(_startPoint, startPoint);\n\t\tvar endPoint = vec3.create();\n\t\tvar scaledNormal = vec3.create();\n\t\tvec3.scale(normal, scale, scaledNormal);\n\n\t\tvec3.add(startPoint, scaledNormal, endPoint);\n\n\t\tmat4.multiplyVec3(viewportProjection, startPoint);\n\t\tmat4.multiplyVec3(viewportProjection, endPoint);\n\n\t\traster.calcPlaneEquationForStraightLine(startPoint, normal);\n\t\traster.drawLineBresenhamGivenStartEndPoint(ctx, startPoint, endPoint, colorBlack, false);\n\t}", "function redraw() {\n var backgroundColor = 'black';\n var gridColor = 'rgb(200,200,200)';\n var dotColor = 'rgb(245,245,0)';\n var marginLeft = 60;\n var marginBottom = 30;\n var marginTop = 20;\n var marginRight = 30;\n var canvas = document.getElementById('curve');\n var ctx = canvas.getContext('2d');\n var w = 800;\n var h = 400;\n canvas.width = w + marginLeft + marginRight;\n canvas.height = h + marginBottom + marginTop;\n ctx.fillStyle = backgroundColor;\n ctx.fillRect(0, 0, canvas.width, canvas.height);\n ctx.lineWidth = 1;\n ctx.font = '16px sans-serif';\n ctx.textAlign = 'center';\n\n // Set up coordinate system\n ctx.translate(marginLeft, h + marginTop);\n ctx.scale(1, -1);\n\n // Draw two lines at x = 0 and y = 0 which are solid lines\n ctx.strokeStyle = gridColor;\n ctx.beginPath();\n ctx.moveTo(0, h + marginTop / 2);\n ctx.lineTo(0, 0);\n ctx.lineTo(w + marginRight / 2, 0);\n ctx.stroke();\n\n // Draw vertical lines and labels on x axis\n ctx.strokeStyle = gridColor;\n ctx.fillStyle = gridColor;\n ctx.beginPath();\n ctx.setLineDash([1, 4]);\n for (var i = 0; i <= FIXES; i++) {\n var x = i * w / FIXES;\n if (i > 0) {\n ctx.moveTo(x, 0);\n ctx.lineTo(x, h + marginTop / 2);\n }\n drawText(ctx, Math.round(i * NN * 10 / FIXES) / 10, x, -20, 'center');\n }\n ctx.stroke();\n ctx.setLineDash([]);\n\n // Draw horizontal lines and labels on y axis\n var min = parseFloat(minmax_boxes[0].value);\n var max = parseFloat(minmax_boxes[1].value);\n var step = parseFloat(minmax_boxes[2].value);\n\n // Sanity checks\n if (isNaN(min) || isNaN(max) || isNaN(step)) return;\n if (min >= max || step <= 0 || (max - min) / step > 10000) return;\n\n // Let s = minimal multiple of step such that\n // vdivs = Math.round((max - min) / s) <= 20\n var vdivs;\n var s = Math.max(1, Math.floor((max - min) / 20 / step)) * step;\n while (true) {\n var vdivs = Math.round((max - min) / s);\n if (vdivs <= 20) break;\n s += step;\n }\n\n // Scale from v to y is\n // y = (v - min) / s * h / vdivs\n ctx.strokeStyle = gridColor;\n ctx.fillStyle = gridColor;\n ctx.beginPath();\n ctx.setLineDash([1, 4]);\n for (var i = 0;; i++) {\n var v = min + s * i;\n var y;\n if (v <= max) {\n y = i * h / vdivs;\n } else {\n v = max;\n y = (max - min) / s * h / vdivs;\n }\n drawText(ctx, v.toFixed(2), -5 , y - 4, 'right');\n if (i > 0) {\n ctx.moveTo(0, y);\n ctx.lineTo(w + marginRight / 2, y);\n }\n if (v >= max) break;\n }\n ctx.stroke();\n ctx.setLineDash([]);\n\n // Draw fixed points\n ctx.strokeStyle = dotColor;\n ctx.fillStyle = dotColor;\n for (var i = 0; i <= FIXES; i++) {\n var v = getFix(i);\n if (isNaN(v)) continue;\n var x = i * w / FIXES;\n var y = (v - min) / s * h / vdivs;\n ctx.beginPath();\n ctx.arc(x, y, 4, 0, 2 * Math.PI);\n ctx.stroke();\n }\n\n // Draw interpolated points\n var points = generatePoints();\n for (var i = 0; i <= NN; i++) {\n var v = points[i];\n if (isNaN(v)) continue;\n var x = i * w / NN;\n var y = (v - min) / s * h / vdivs;\n ctx.beginPath();\n ctx.arc(x, y, 2, 0, 2 * Math.PI);\n ctx.stroke();\n ctx.fill();\n }\n}", "function lines()\n{\n //line colour\n stroke(255);\n strokeWeight(5);\n //vertical lines\n line(100,200,400,200)\n line(100,300,400,300)\n //horizontal lines\n line(200,100,200,400)\n line(300,100,300,400)\n \n \n}", "function draw_line(e){\n\n //console.log(\"PrevX:\"+prevX);\n draw_dot(e);\n \n ctx.lineTo(e.offsetX,e.offsetY);\n \n ctx.stroke();\n\n //console.log(\"PrevX:\"+prevX);\n}", "function getLineWidth(d) {\n //The min value of how thin the lines can become depends on the zoom level\n var min_edge = transform.k < 1 ? transform.k : 0.8;\n var line_width = 2 * Math.max(min_edge, zoom_edge_increase(transform.k) * (d.focus === 'primary' ? primary_line_width : secondary_line_width));\n return line_width;\n } //function getLineWidth", "function getLineWidth(d) {\n //The min value of how thin the lines can become depends on the zoom level\n var min_edge = transform.k < 1 ? transform.k : 0.8;\n var line_width = 2 * Math.max(min_edge, zoom_edge_increase(transform.k) * (d.focus === 'primary' ? primary_line_width : secondary_line_width));\n return line_width;\n } //function getLineWidth", "display() {\n strokeWeight(1);\n stroke(200);\n fill(200);\n beginShape();\n for (let i = 0; i < this.surface.length; i++) {\n let v = scaleToPixels(this.surface[i]);\n vertex(v.x, v.y);\n }\n vertex(width, height);\n vertex(0, height);\n endShape(CLOSE);\n }", "function draw() {\n background(0);\n strokeWeight(1);\n\n if (drawArr) {\n for (let i = 0; i < width; ++i) {\n const col = drawMark[i];\n if (col) {\n stroke(col.r, col.g, col.b);\n } else {\n stroke(150);\n }\n line(i + 1, height, i + 1, height - drawArr[i]);\n }\n }\n}", "setExtent() {\n\n var tl = this.props.map.containerPointToLatLng(this.tl);\n var br = this.props.map.containerPointToLatLng(this.br);\n\n tl = this.projection([tl.lng, tl.lat]);\n br = this.projection([br.lng, br.lat]);\n\n this.extent.attr({\n x: tl[0],\n y: tl[1],\n height: br[1]-tl[1],\n width: br[0]-tl[0],\n });\n\n }", "function drawRescaledItems(ctx) {\n if (showVisualCues && isPlayerAlive()) {\n drawMapBorders(ctx);\n if(1 == isGrazing) {\n drawGrazingLines_old(ctx);\n } else {\n drawGrazingLines(ctx);\n }\n if(cobbler.drawTail){\n drawTrailTail(ctx);\n }\n\n\n drawSplitGuide(ctx, getSelectedBlob());\n drawMiniMap();\n }\n }", "function drawNet() {\n ctx.fillStyle = \"black\";\n ctx.beginPath();\n ctx.setLineDash([14]);\n ctx.moveTo(canvas.width / 2, 0);\n ctx.lineTo(canvas.width / 2, 650);\n ctx.closePath();\n ctx.stroke();\n }" ]
[ "0.666861", "0.6438871", "0.6383193", "0.6371038", "0.63630515", "0.6312043", "0.6255201", "0.6255201", "0.6255201", "0.62264526", "0.6173866", "0.61598027", "0.6139451", "0.6091123", "0.60581917", "0.60348976", "0.60309803", "0.6029382", "0.60277915", "0.60252756", "0.60005456", "0.59788233", "0.597833", "0.5969824", "0.5954011", "0.59279835", "0.59078085", "0.5889641", "0.5889274", "0.5886337", "0.58811647", "0.5874222", "0.5874222", "0.58642656", "0.5845425", "0.5844785", "0.5842838", "0.58366454", "0.58322877", "0.58179235", "0.58105624", "0.58029234", "0.57978195", "0.5796396", "0.5796396", "0.57859564", "0.5784048", "0.57807374", "0.5780087", "0.5778296", "0.5763648", "0.57600504", "0.5738504", "0.573783", "0.57301885", "0.5713805", "0.5708598", "0.569641", "0.56925315", "0.5689332", "0.56812793", "0.56747204", "0.5670693", "0.56704473", "0.56691223", "0.5663728", "0.56535023", "0.56520325", "0.56387573", "0.5633183", "0.56324697", "0.5628643", "0.5628391", "0.5624313", "0.5616639", "0.5613602", "0.5604745", "0.5604594", "0.5596769", "0.5596769", "0.5596146", "0.5593369", "0.5592668", "0.5589398", "0.55866605", "0.558359", "0.55765945", "0.55757344", "0.5568508", "0.5565012", "0.5559363", "0.5558877", "0.5557368", "0.55537105", "0.55537105", "0.5552508", "0.55490726", "0.55467564", "0.5545231", "0.5542022" ]
0.6467912
1
My Solution Instructor Solution
function differenceArray(arr1, arr2){ let uniqueArray = []; for(let val of arr1) { if (!arr2.includes(val) && !uniqueArray.includes(val)) { uniqueArray.push(val); } } for(let val of arr2) { if (!arr1.includes(val) && !uniqueArray.includes(val)){ uniqueArray.push(val); } } return uniqueArray; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displaySolution(solution) {\n\n}", "function solution(s) {\n\n}", "function scoreSolution(solution) {\n\n}", "function solution(A) {\n\n}", "solutionToString () {}", "function IndividualAttestation() {}", "function Fundamentals() {\n\n }", "function GoalFactory() {\n\n}", "function theImplementation(automata){\n\n}", "function exercise11() {}", "function jesusSolve() {\n\n}", "function Person(fname, lname, isPolite) {\n this.firstName = fname;\n this.lastName = lname;\n this.fullName = fname + \" \" + lname;\n this.isPolite = true;\n this.greet = function (otherPerson) {\n if (this.isPolite === false) {\n return \"Здрасти, \" + otherPerson.firstName + \"!\";\n } else {\n return \"Здравейте, \" + otherPerson.fullName + \"!\";\n }\n }\n var otherPerson = otherPerson;\n this.introduce = function (otherPerson) {\n var result = \"\";\n if (otherPerson != undefined && this.isPolite === false) {\n result += this.greet(otherPerson) + \"Аз съм \" + this.firstName + \".\";\n }\n return \"Kазвам се \" + this.firstName;\n }\n this.bePolite = function (isPolite) {\n result = \"\";\n if (isPolite === false) {\n return \"Аз съм \" + this.firstName;\n } else if (otherPerson != undefined && this.isPolite === true) {\n result += this.greet(otherPerson) + \"Казвам се \" + this.fullName + \".\";\n } else if (this.isPolite === false) {\n result += \"Здрасти, аз съм \" + this.firstName + \".\";\n } else {\n result += \"Здравейте, казвам се \" + this.fullName + \".\";\n }\n return result;\n }\n\n}", "function exercise07() {}", "function classmates (){\n\n\n\n\n}", "consstructor(){\n \n\n }", "function Interfaz(){}", "function revealMistery(solution) {\n \n return solution[0].first_name + \n \" \" + solution[0].last_name + \" killed Mr.Boddy using the \" \n + solution[1].name + \" in the \" + solution[2].name + \"!!!!\";\n}", "function Komunalne() {}", "function exercise06() {}", "function solution(A) {\n\t/* ************* creating vication OBJ **************** */\n\tclass Vication {\n\t constructor(A) {\n\t\t\tthis.vication = A;\n\t\t\tthis.amount = 0;\n\t this.month = [];\n\t for (let i = 0; i < 30; i++) {\n\t this.month.push(false);\n\t }\n\t for (let i = 0; i < A.length; i++) {\n\t this.month[A[i] - 1] = true;\n\t }\n\t }\n\n\t is7dayTicketWorth(dayIdx) {\n\t let counter = 0;\n\t for (let i=0; i < 8; i++) {\n\t if (dayIdx + i > this.month.length) {\n\t break;\n\t }\n\t if (this.month[i]) {\n\t counter++;\n\t }\n\t }\n\t\t\t//console.log(\"counter 7day ticket: \" + counter);\n\t return counter > 3;\n\t }\n\t\t\n\t\tgetSmallAmount() {\n\t\t\tfor(let present=0; present<this.month.length; present++) {\n\t\t\t\tconst isTravelToday = this.month[present];\n\t\t\t\tif(isTravelToday) {\n\t\t\t\t\t//const showDay = present +1;\n\t\t\t\t\t//console.log(\"current day: \" + showDay);\n\t\t\t\t\tif(this.amount > 24) {\n\t\t\t\t\t\tthis.amount = 25;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse if (this.is7dayTicketWorth(present)) {\n\t\t\t\t\t\tpresent += 6;\n\t\t\t\t\t\tthis.amount += 7;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthis.amount += 2;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn this.amount;\n\t\t}\n\t}\n\t/* ************* END vication OBJ**************** */\n\t\n\tlet v = new Vication(A);\n\t\n\tconsole.log(\"the smallest amount is: \" + v.getSmallAmount());\n}", "function Strategy() {\n}", "function Strategy() {\n}", "function affichageSolutions()\n\t{\n\t var i = null;\n\t var j = null;\n\t \n\t document.write('<br /><table border=\"1\">');\n\t \n\t for(i = 0; i < this.solutions.length; i++)\n\t {\n document.write('<tr>');\n\t for(j = 0; j < this.solutions[i].length; j++)\n\t {\n\t document.write('<td>'+this.solutions[i][j]+'</td>');\n\t }\n\t document.write('</tr>');\n\t }\n\t}", "function classroom() {\n var instructors = [\"Elie\", \"Colt\"];\n return {\n getInstructors: function() {\n return instructors;\n },\n addInstructor: function(instructor) {\n instructors.push(instructor);\n return instructors;\n }\n }\n}", "function Student() {}", "function Student() {}", "function challenge2() {\n\n}", "constructor(id, owner, task_type, subject, title, description, options, solutions){\n this.id = id; this.owner = owner; this.task_type = task_type; this.subject = subject; \n this.title = title; this.description = description; this.options = options; this.solutions = solutions;\n }", "function presActivePart(){\n\n class Verb{\n constructor(verbStem){\n this.verbForm = verbStem;\n }\n }\n\n\n var verbArray = [[\"loves\",\"loved\", \"used to love\", \"am\"], [\"praises\",\"praised\", \"was praising\", \"laud\"],[\"carries\",\"carried\", \"was carrying\", \"port\"],[\"greets\",\"greeted\", \"was greeting\", \"salut\"],[\"kills\",\"killed\", \"was killing\", \"nec\"],[\"fights\", \"fought\", \"was fighting\", \"pugn\"], [\"saves\",\"saved\", \"was saving\", \"serv\"], [\"looks at\", \"looked at\", \"was looking at\", \"spect\"], [\"calls\",\"called\", \"was calling\", \"voc\"], [\"annoys\",\"annoyed\", \"was annoying\", \"vex\"], [\"wounds\",\"wounded\", \"was wounding\", \"vulner\"], [\"beats\",\"beat\", \"was beating\", \"verber\"], [\"scolds\",\"scolded\", \"was scolding\", \"vituper\"], [\"hits\",\"hit\", \"was hitting\", \"puls\"], [\"frees\",\"freed\", \"was freeing\", \"liber\"], [\"waits for\",\"waited for\", \"was waiting for\", \"exspect\"], [\"avoids\",\"avoided\", \"was avoiding\", \"vit\"], [\"hides\",\"hid\", \"was hiding\", \"cel\"]];\n\n\n var randomVerbIndex = Math.floor(Math.random() * verbArray.length);\n newVerb = new Verb(verbArray[randomVerbIndex][3]);\n verbPresSing = newVerb.verbForm + pres3rdSing;\n\n verbPerSing = newVerb.verbForm + per3rdSing;\n\n verbImpSing = newVerb.verbForm + imp3rdSing;\n\n\n verbPresSingEng = new Verb(verbArray[randomVerbIndex][0]);\n verbPerSingEng = new Verb(verbArray[randomVerbIndex][1]);\n verbImpSingEng = new Verb(verbArray[randomVerbIndex][2]);\n\n var verbArrayPlural = [[\"love\",\"loved\", \"used to love\", \"am\"],[\"praise\",\"praised\", \"were praising\", \"laud\"], [\"carry\",\"carried\", \"were carrying\", \"port\"],[\"greet\",\"greeted\", \"were greeting\", \"salut\"],[\"kill\",\"killed\", \"were killing\", \"nec\"],[\"are fighting\", \"fought\", \"used to fight\", \"pugn\"], [\"save\",\"saved\", \"kept saving\", \"serv\"], [\"look at\", \"looked at\", \"were looking at\", \"spect\"], [\"are calling\",\"called\", \"were calling\", \"voc\"], [\"annoy\",\"annoyed\", \"were annoying\", \"vex\"], [\"wound\",\"wounded\", \"were wounding\", \"vulner\"], [\"beat\",\"beat\", \"were beating\", \"verber\"], [\"scold\",\"scolded\", \"used to scold\", \"vituper\"], [\"strike\",\"struck\", \"kept striking\", \"puls\"], [\"free\",\"freed\", \"were freeing\", \"liber\"], [\"wait for\",\"waited for\", \"were waiting for\", \"exspect\"], [\"avoid\",\"avoided\", \"were avoiding\", \"vit\"], [\"hide\",\"hid\", \"used to hide\", \"cel\"]];\n\nvar randomVerbPluralIndex = Math.floor(Math.random() * verbArrayPlural.length);\nnewVerbPlural = new Verb(verbArrayPlural[randomVerbIndex][3]);\nverbPresPl = newVerbPlural.verbForm + pres3rdPl;\n\nverbPerPl = newVerbPlural.verbForm + per3rdPl;\n\n\nverbImpPl = newVerbPlural.verbForm + imp3rdPl;\n\n\n class Subject {\n\n constructor(nounStem){\n this.nounForm = nounStem;\n }\n }\n\n var nounArray = [[\"puell\", \"girl\",\"girls\"], [\"regin\", \"queen\", \"queens\"],[\"fili\", \"daughter\", \"daughters\"],[\"domin\", \"mistress\", \"mistresses\"],[\"amic\", \"girl friend\", \"girl friends\"],[\"agricol\", \"farmer\", \"farmers\"],[\"besti\", \"beast\", \"beasts\"], [\"de\", \"goddess\", \"goddesses\"],[\"poet\", \"poet\", \"poets\"], [\"ancill\", \"maid servant\", \"maid servants\"], [\"naut\", \"sailor\", \"sailors\"],[\"femin\", \"woman\", \"women\"]];\n\n var nounArray2 = [[\"servus\", \"serv\",\"slave\",\"slaves\"],[\"libertus\", \"libert\",\"freedman\",\"freedmen\"],[\"inimicus\", \"inimic\",\"enemy\",\"enemies\"], [\"patronus\", \"patron\",\"patron\", \"patrons\"],[\"dominus\", \"domin\",\"master\", \"masters\"],[\"magister\", \"magistr\",\"teacher\", \"teachers\"],[\"nuntius\", \"nunti\",\"messenger\", \"messengers\"], [\"puer\", \"puer\",\"boy\", \"boys\"],[\"vilicus\", \"vilic\",\"overseer\", \"overseers\"],[\"vir\", \"vir\",\"man\", \"men\"][\"venalicius\", \"venalici\",\"slave dealer\", \"slave dealers\"],[\"coquus\", \"coqu\", \"cook\", \"cooks\"],[\"deus\", \"de\", \"god\", \"gods\"],[\"Graecus\", \"Graec\", \"Greek\", \"Greeks\"],[\"aper\", \"apr\", \"boar\", \"boars\"],[\"avarus\", \"avar\", \"miser\", \"misers\"]];\n\n var nounArray3 = [[\"canis\", \"can\",\"dog\",\"dogs\"],[\"pugil\", \"pugil\",\"boxer\",\"boxers\"],[\"fur\", \"fur\",\"thief\",\"thieves\"],[\"gladiator\", \"gladiator\",\"gladiator\",\"gladiators\"], [\"pater\", \"patr\", \"father\", \"fathers\"],[\"feles\", \"fel\", \"cat\", \"cats\"],[\"cliens\", \"client\", \"client\", \"clients\"],[\"hospes\", \"hospit\", \"guest\", \"guests\"],[\"infans\", \"infant\", \"infant\", \"infants\"],[\"senex\", \"sen\", \"old man\", \"old men\"],[\"venator\", \"venator\", \"hunter\", \"hunters\"],[\"hostis\", \"host\", \"enemy\", \"enemies\"],[\"mercator\", \"mercator\", \"merchant\", \"merchant\"],[\"mater\", \"matr\",\"mother\", \"mothers\"],[\"frater\", \"fratr\",\"brother\", \"brothers\"],[\"soror\", \"soror\",\"sister\", \"sisters\"],[\"homo\", \"homin\",\"man\", \"men\"],[\"uxor\", \"uxor\",\"wife\", \"wives\"],[\"iuvenis\", \"iuven\",\"young man\", \"young men\"]];\n\n\n var randomNounIndex = Math.floor(Math.random() * nounArray.length);\n var randomNoun2Index = Math.floor(Math.random() * nounArray2.length);\n var randomNoun3Index = Math.floor(Math.random() * nounArray3.length);\n\n\n\n newNoun = new Subject(nounArray[randomNounIndex][0]);\n subjectSing = newNoun.nounForm + nomPE1;\n subjectPl = newNoun.nounForm + nomPE1Pl;\n\n\n //subjectSing2 = newNoun2.nounForm;\n newNoun2 = new Subject(nounArray2[randomNoun2Index][0]);\n subjectSing2 = newNoun2.nounForm;\n newNoun2NomPl = new Subject(nounArray2[randomNoun2Index][1]);\n subjectPl2 = newNoun2NomPl.nounForm + nomPE2Pl;\n\n\n newNoun3 = new Subject(nounArray3[randomNoun3Index][0]);\n subjectSing3 = newNoun3.nounForm;\n newNoun3NomPl = new Subject(nounArray3[randomNoun3Index][1]);\n subjectPl3 = newNoun3NomPl.nounForm + nomPE3Pl;\n\n\nvar randomObjectIndex = Math.floor(Math.random() * nounArray.length);\n\n newObject = new Subject(nounArray[randomObjectIndex][0]);\n objectSing = newObject.nounForm + accPE1;\n objectPl = newObject.nounForm + accPE1Pl;\n\n\n\n\n\nvar randomObject2Index = Math.floor(Math.random() * nounArray2.length);\n newObject2 = new Subject(nounArray2[randomObject2Index][1]);\n\n objectSing2 = newObject2.nounForm + accPE2;\n objectPl2 = newObject2.nounForm + accPE2Pl;\n\n var randomObject3Index = Math.floor(Math.random() * nounArray3.length);\n newObject3 = new Subject(nounArray3[randomObject3Index][1]);\n objectSing3 = newObject3.nounForm + accPE3;\n objectPl3 = newObject3.nounForm + accPE3Pl;\n\n\n var presActPart = [[\"ambulans\",\"ambulant\", \"walking\"],[\"ridens\",\"rident\", \"smiling\"],[\"dormiens\",\"dormient\", \"sleeping\"],[\"cantans\",\"cantant\", \"singing\"],[\"cogitans\",\"cogitant\", \"thinking\"],[\"currens\",\"current\", \"running\"],[\"saliens\",\"salient\", \"jumping\"],[\"tremens\",\"trement\", \"trembling\"],[\"clamans\",\"clamant\", \"yelling\"],[\"discedens\",\"discedent\", \"departing\"]];\n\n var futActPart = [[\"ambulatur\",\"intending to walk\"],[\"risur\",\"about to laugh\"],[\"dormitur\",\"about to sleep\"],[\"cantatur\",\"about to sing\"],[\"cogitatur\",\"about to think\"],[\"cursur\",\"about to run\"],[\"saltur\",\"about to jump\"],[\"territur\",\"about to frighten\"],[\"clamatur\",\"intending to shout\"],[\"discessur\",\"intending to leave\"],[\"deceptur\",\"about to decieve\"]];\n\n var perPassivePart = [[\"vis\",\"seen\"],[\"capt\", \"captured\"],[\"audit\",\"heard\"],[\"territ\", \"frightened\"],[\"fract\",\"broken\"],[\"servat\",\"saved\"],[\"vulnerat\",\"wounded\"],[\"monit\",\"warned\"],[\"invent\",\"found\"],[\"decept\",\"deceived\"],[\"accusat\",\"accused\"],[\"necat\",\"killed\"],[\"liberat\",\"freed\"],[\"petit\",\"attacked\"],[\"sciss\",\"cut\"],[\"deris\",\"mocked\"]];\n\n\n var randomPAPIndex = Math.floor(Math.random() * presActPart.length);\n\n newPAP = new Subject(presActPart[randomPAPIndex][0]);\n nomPAP = newPAP.nounForm;\n stemPAP = new Subject(presActPart[randomPAPIndex][1]);\n dirObjSingPAP = stemPAP.nounForm + accPE3;\n nomAccPluralPAP = stemPAP.nounForm + nomPE3Pl;\n\n\n\n\ntimeleft = 25;\nresponseButton.innerHTML = \"\";\n\n\n countDownTimer();\n\n countdown = setInterval(countDownTimer,1000);\n\n\n\n\n startButton.disabled = true;\n\n\n\n\n ranISIndex = Math.floor(Math.random() * 5);\n\n\n if (ranISIndex == 0){\n\n sentence = \"The \" + nounArray3[randomNoun3Index][2] + \", while \" + presActPart[randomPAPIndex][2]+ \", \" + verbArray[randomVerbIndex][2] + \" the \" + nounArray3[randomObject3Index][3] + \".\";\n\n correctAnswer = subjectSing3 + \" \" + presActPart[randomPAPIndex][0] + \" \" + objectPl3 + \" \" + verbImpSing;\n\n wrongAnswer1 = subjectSing3 + \" \" + presActPart[randomPAPIndex][1] + accPE3 + \" \" + objectPl3 + \" \" + verbImpSing;\n\n wrongAnswer2 = subjectPl3 + \" \" + presActPart[randomPAPIndex][1] + nomPE3Pl + \" \" + objectPl3 + \" \" + verbPerPl;\n\n wrongAnswer3 = subjectSing3 + \" \" + presActPart[randomPAPIndex][0] + \" \" + objectPl3 + \" \" + verbPresSing;\n\n\n checkAnswers = [[correctAnswer,true],[wrongAnswer1,false],[wrongAnswer2,false],[wrongAnswer3,false]];\n shuffle(checkAnswers);\n\n} else if (ranISIndex == 1){\n\n\n sentence = \"The \" + nounArray[randomNounIndex][1] + \" \" + verbArray[randomVerbIndex][1] + \" the \" + presActPart[randomPAPIndex][2] + \" \" + nounArray2[randomObject2Index][2] + \".\";\n\n correctAnswer = subjectSing + \" \" + presActPart[randomPAPIndex][1] + accPE3 + \" \" + objectSing2 + \" \" + verbPerSing;\n\n wrongAnswer1 = subjectSing + \" \" + presActPart[randomPAPIndex][0] + \" \" + objectSing2 + \" \" + verbPerSing;\n\n wrongAnswer2 = subjectPl + \" \" + presActPart[randomPAPIndex][1] + nomPE3Pl + \" \" + objectSing2 + \" \" + verbImpPl;\n\n wrongAnswer3 = subjectSing + \" \" + presActPart[randomPAPIndex][1] + accPE3Pl + \" \" + objectPl2 + \" \" + verbPresSing;\n\n\n\ncheckAnswers = [[correctAnswer,true],[wrongAnswer1,false],[wrongAnswer2,false],[wrongAnswer3,false]];\nshuffle(checkAnswers);\n\n} else if (ranISIndex == 2) {\n\n sentence = \"The \" + nounArray2[randomNoun2Index][3] + \", who were \" + presActPart[randomPAPIndex][2] + \", \" + verbArrayPlural[randomVerbIndex][1] + \" the \" + nounArray3[randomObject3Index][2] + \".\";\n\n correctAnswer = subjectPl2 + \" \" + presActPart[randomPAPIndex][1] + nomPE3Pl + \" \" + objectSing3 + \" \" + verbPerPl;\n\n wrongAnswer1 = subjectPl2 + \" \" + presActPart[randomPAPIndex][1] + accPE3 + \" \" + objectSing3 + \" \" + verbPerPl;\n\n wrongAnswer2 = subjectPl2 + \" \" + presActPart[randomPAPIndex][1] + nomPE3Pl + \" \" + objectSing3 + \" \" + verbImpPl;\n\n wrongAnswer3 = subjectSing2 + \" \" + presActPart[randomPAPIndex][1] + accPE3 + \" \" + objectSing3 + \" \" + verbPresSing;\n\n\n checkAnswers = [[correctAnswer,true],[wrongAnswer1,false],[wrongAnswer2,false],[wrongAnswer3,false]];\n shuffle(checkAnswers);\n\n} else if (ranISIndex == 3) {\n\n sentence = \"The \" + nounArray[randomNounIndex][2] + \", while \" + presActPart[randomPAPIndex][2] + \", \" + verbArrayPlural[randomVerbIndex][0] + \" the \" + nounArray2[randomObject2Index][3] + \".\";\n\n correctAnswer = subjectPl + \" \" + presActPart[randomPAPIndex][1] + nomPE3Pl + \" \" + objectPl2 + \" \" + verbPresPl;\n\n wrongAnswer1 = subjectPl + \" \" + presActPart[randomPAPIndex][1] + accPE3 + \" \" + objectSing2 + \" \" + verbPresPl;\n\n wrongAnswer2 = subjectPl + \" \" + presActPart[randomPAPIndex][1] + nomPE3Pl + \" \" + objectPl2 + \" \" + verbPerPl;\n\n wrongAnswer3 = subjectSing + \" \" + presActPart[randomPAPIndex][1] + nomPE3Pl + \" \" + objectPl2 + \" \" + verbPerSing;\n\n\n checkAnswers = [[correctAnswer,true],[wrongAnswer1,false],[wrongAnswer2,false],[wrongAnswer3,false]];\n shuffle(checkAnswers);\n\n} else if (ranISIndex == 4) {\n\n sentence = \"The \" + nounArray3[randomNoun3Index][3] + \" \" + verbArrayPlural[randomVerbIndex][0] + \" the \" + nounArray[randomObjectIndex][2] + \" who are \" + presActPart[randomPAPIndex][2] + \".\";\n\n correctAnswer = subjectPl3 + \" \" + objectPl + \" \" + presActPart[randomPAPIndex][1] + accPE3Pl + \" \" + verbPresPl;\n\n wrongAnswer1 = subjectPl3 + \" \" + objectPl + \" \" + presActPart[randomPAPIndex][1] + accPE3Pl + \" \" + verbPerPl;\n\n wrongAnswer2 = subjectPl3 + \" \" + objectPl + \" \" + presActPart[randomPAPIndex][1] + accPE3Pl + \" \" + verbImpPl;\n\n wrongAnswer3 = subjectSing3 + \" \" + objectSing + \" \" + presActPart[randomPAPIndex][1] + accPE3 + \" \" + verbPresSing;\n\n\n\n checkAnswers = [[correctAnswer,true],[wrongAnswer1,false],[wrongAnswer2,false],[wrongAnswer3,false]];\n shuffle(checkAnswers);\n\n}\n\n\n\n\n\n startButton.innerHTML = sentence;\n\n document.getElementById(answers[0]).innerHTML = checkAnswers[0][0];\n\n document.getElementById(answers[1]).innerHTML = checkAnswers[1][0];\n\n document.getElementById(answers[2]).innerHTML = checkAnswers[2][0];\n\n document.getElementById(answers[3]).innerHTML = checkAnswers[3][0];\n\n\n\n responseButton.disabled = false;\n\n\n\n resetAnswerColors();\n\n enableButtons();\n\n decrementCount();\n\n\n\n\n\n\n if (count == 0){\n\n gameOverAudio();\n\n startButton.innerHTML = \"Select a New Game!\";\n\n answerOne.innerHTML = game1Title;\n answerTwo.innerHTML = game2Title;\n answerThree.innerHTML = game3Title;\n answerFour.innerHTML = game4Title;\n\n document.getElementById(\"boxThree\").innerHTML = \"Score\";\n responseButton.innerHTML = \"You earned \" + points + \" points!\";\n points = 0;\n\n stopTimer();\n document.getElementById(\"boxOne\").innerHTML = \"Timer\";\n\n answerOne.onclick = function(){selectGame1()};\n answerTwo.onclick = function(){selectGame2()};\n answerThree.onclick = function(){selectGame3()};\n answerFour.onclick = function(){selectGame4()};\n\n count = 11;\n\n\n }\n\n\n\n\n }", "quickFacts(){\n console.log(`${this.name} educates ${this.numberOfStudents} students at the ${this.level} level.`);\n }", "function coursework(cswork)\r\n {\r\n//assigning a variable name coursework parameters\r\n//invocking tests\r\n//solving for coursework\r\n let coursework = cswork + tests(80,80)\r\n \r\n //posting results to the browsers console\r\n console.log(coursework)\r\n\r\n //allowing access to coursework\r\nreturn coursework\r\n\r\n }", "function Yielder() {}", "ajouterPampmousseMutant()\r\n\t{\r\n\t\t//A faire : question 1\r\n\t}", "function Pythia() {}", "function createStudent(name, year) {\n return {\n name,\n year,\n courses: [],\n\n info() {\n console.log(`${this.name} is a ${this.year} year student`);\n },\n\n addCourse(course) {\n this.courses.push(course);\n },\n\n listCourses() {\n return this.courses;\n },\n\n addNote(code, note) {\n this.courses.forEach(course => {\n if (course.code === code) {\n if (!Object.prototype.hasOwnProperty.call(course, 'note')) {\n course['note'] = note;\n } else {\n course['note'] += `; ${note}`;\n }\n }\n });\n },\n\n updateNote(code, note) {\n this.courses.forEach(course => {\n if (course.code === code) {\n course['note'] = note;\n }\n });\n },\n\n updateGrade(code, grade) {\n this.courses.forEach(course => {\n if (course.code === code) {\n course['grade'] = grade;\n }\n });\n },\n\n getGrade(courseName) {\n let course = this.courses.find(course => course.name === courseName);\n return course.grade;\n },\n\n viewNotes() {\n this.courses.forEach(course => {\n if (Object.prototype.hasOwnProperty.call(course, 'note')) {\n console.log(`${course.name}: ${course.note}`);\n }\n });\n },\n\n viewGrades() {\n this.courses.forEach(course => {\n if (Object.prototype.hasOwnProperty.call(course, 'grade')) {\n console.log(`${course.name}: ${course.grade}`);\n } else {\n console.log(`${course.name}: In progess`);\n }\n });\n },\n };\n}", "function challenge3() {\n\n}", "function createInstructor(options){\n var options = options || {};\n var name = options.name || {first: \"Matt\", last: \"Lane\"}\n var isHilarious = options.isHilarious || false;\n return [name.first, name.last, isHilarious];\n}", "function addAssignmentInstructor(assignmentNr)\n{\n //Maggi minnkur is the assignment instructor in the first 4 assignments\n if(assignmentNr === 0 || assignmentNr === 1 || assignmentNr === 2 || assignmentNr === 3)\n {\n //Load the image of the instructor\n instructor = game.add.sprite(1015, 210, 'warmupHead', 0);\n //Add the animation that makes him talk\n instructor.animations.add('talk', [0, 1, 0, 1, 1, 0], 4, true);\n //Move the anchor point of the image\n instructor.anchor.setTo(0.75, 1);\n //Rotate the image\n instructor.angle = -41;\n //Return the object\n return instructor;\n }\n //The pig is the assignment instructor for Allir heimalyklar 1 and 2\n else if(assignmentNr === 4 || assignmentNr === 5)\n {\n instructor = game.add.sprite(750, 100, 'pig', 0);\n instructor.scale.setTo(0.5);\n instructor.animations.add('talk', [0, 1, 0, 1, 1, 0], 4, true);\n return instructor;\n }\n //The horse is the assignment instructor for the E og H and I og G assignments\n else if(assignmentNr === 6 || assignmentNr === 7)\n {\n instructor = game.add.sprite(810, 125, 'whale', 0);\n instructor.scale.setTo(0.5);\n instructor.animations.add('talk', [0, 1, 0, 1, 1, 0], 4, true);\n return instructor;\n }\n //The fish with sunglasses is the assignment instructor for the B og N and R og O assignments\n else if(assignmentNr === 8 || assignmentNr === 9)\n {\n instructor = game.add.sprite(785, 100, 'fish', 0);\n instructor.scale.setTo(0.5);\n instructor.animations.add('talk', [0, 1, 0, 1, 1, 0], 4, true);\n return instructor;\n }\n //The horse is the assignment instructor for the Broddstafir and Hástafir assignments\n else\n {\n instructor = game.add.sprite(785, 100, 'horse', 0);\n instructor.scale.setTo(0.5);\n instructor.animations.add('talk', [0, 1, 0, 1, 1, 0], 4, true);\n return instructor;\n }\n}", "function Student(name, college, language) {\n // this refers to the specific instance of the object created \n this.language = language; \n this.college = college; \n this.introduction = function () {\n \n console.log(`Hello!My name is ${name}. I can speak ${this.language}. I attend ${this.college}.`)\n }\n}", "function challenge1() {\n\n}", "function challenge1() {\n\n}", "function puzzle_spiral() {\n return {\n id: \"spiral\",\n name: \"Spiral\",\n\n hint: \n \"<p>\"\n + \"It's OK if your robot bumps into a wall.\"\n + \"</p>\"\n + \"<p>\"\n + learnMoreGoto()\n + \"</p>\"\n ,\n win_conditions: [\n {type: WinCondition.COLLECT_COINS}\n ],\n\n constraints: {\n \"max_instructions\": 12\n },\n\n solutions: [\n \"start:\\nmove\\nmove\\nmove\\nmove\\nmove\\nmove\\nturn right\\ngoto start\\n\"\n ],\n num_cols: 9,\n num_rows: 8,\n // BUG: this should be programming_bot_id, not index\n programming_bot_index: 0,\n bots : [\n {\n botColor: BotColor.BLUE,\n cellX: 3,\n cellY: 4,\n facing: Direction.UP,\n program: \"\",\n },\n ],\n coins: [\n {x:1, y:1},\n {x:2, y:1},\n {x:3, y:1},\n {x:4, y:1},\n {x:5, y:1},\n {x:6, y:1},\n {x:7, y:1},\n {x:1, y:2},\n {x:7, y:2},\n {x:1, y:3},\n {x:3, y:3},\n {x:4, y:3},\n {x:5, y:3},\n {x:7, y:3},\n {x:1, y:4},\n {x:5, y:4},\n {x:7, y:4},\n {x:1, y:5},\n {x:5, y:5},\n {x:7, y:5},\n {x:1, y:6},\n {x:2, y:6},\n {x:3, y:6},\n {x:4, y:6},\n {x:5, y:6},\n {x:7, y:6},\n ],\n blocks: [\n {x:0, y:0},\n {x:1, y:0},\n {x:2, y:0},\n {x:3, y:0},\n {x:4, y:0},\n {x:5, y:0},\n {x:6, y:0},\n {x:7, y:0},\n {x:8, y:0},\n\n {x:0, y:1},\n /*{x:1, y:1},\n {x:2, y:1},\n {x:3, y:1},\n {x:4, y:1},\n {x:5, y:1},\n {x:6, y:1},\n {x:7, y:1},*/\n {x:8, y:1},\n\n {x:0, y:2},\n //{x:1, y:2},\n {x:2, y:2},\n {x:3, y:2},\n {x:4, y:2},\n {x:5, y:2},\n {x:6, y:2},\n //{x:7, y:2},\n {x:8, y:2},\n\n {x:0, y:3},\n //{x:1, y:3},\n {x:2, y:3},\n //{x:3, y:3},\n //{x:4, y:3},\n //{x:5, y:3},\n {x:6, y:3},\n //{x:7, y:3},\n {x:8, y:3},\n\n {x:0, y:4},\n //{x:1, y:4},\n {x:2, y:4},\n //{x:3, y:4},\n {x:4, y:4},\n //{x:5, y:4},\n {x:6, y:4},\n //{x:7, y:4},\n {x:8, y:4},\n\n {x:0, y:5},\n //{x:1, y:5},\n {x:2, y:5},\n {x:3, y:5},\n {x:4, y:5},\n //{x:5, y:5},\n {x:6, y:5},\n //{x:7, y:5},\n {x:8, y:5},\n\n {x:0, y:6},\n /*{x:1, y:6},\n {x:2, y:6},\n {x:3, y:6},\n {x:4, y:6},\n {x:5, y:6},*/\n {x:6, y:6},\n //{x:7, y:6},\n {x:8, y:6},\n\n {x:0, y:7},\n {x:1, y:7},\n {x:2, y:7},\n {x:3, y:7},\n {x:4, y:7},\n {x:5, y:7},\n {x:6, y:7},\n {x:7, y:7},\n {x:8, y:7},\n ],\n traps: []\n }\n}", "function solve() {\r\n // some code here...\r\n // some more code here...\r\n}", "function puzzle_the_t() {\n return {\n id: \"the_t\",\n name: \"The T\",\n\n // TODO: add link to goto help page\n hint: \n \"<p>\"\n + \"Instead of turning left at the T, turn right. Then use the \"\n + keyword(\"goto\") + \" instruction to keep moving.\"\n + \"<p>\"\n + \"<p>\" + learnMoreGoto() + \"</p>\"\n\n ,\n win_conditions: [\n {type: WinCondition.COLLECT_COINS}\n ],\n\n // TODO: add a constraint that you can only use 4 move instructions\n constraints: {\n \"max_instructions\": 8,\n },\n\n solutions: [\n \"move\\nmove\\nmove\\nturn right\\nstart: move\\ngoto start\\n\",\n ],\n num_cols: 9,\n num_rows: 7,\n // BUG: this should be programming_bot_id, not index\n programming_bot_index: 0,\n bots : [\n {\n botColor: BotColor.BLUE,\n cellX: 4,\n cellY: 5,\n facing: Direction.UP,\n program: \"move\\nmove\\nmove\\nturn left\\nstart: move\\ngoto start\\n\",\n },\n ],\n coins: [\n {x: 4, y: 2},\n {x: 5, y: 2},\n {x: 6, y: 2},\n {x: 7, y: 2},\n\n {x: 4, y: 3},\n {x: 4, y: 4},\n\n\n ],\n // TODO: make it so that you can omit empty properties from a puzzle\n blocks: [\n {x: 0, y: 0},\n {x: 0, y: 1},\n {x: 0, y: 2},\n {x: 0, y: 3},\n {x: 0, y: 4},\n {x: 0, y: 5},\n {x: 0, y: 6},\n\n {x: 1, y: 0},\n {x: 1, y: 1},\n //{x: 1, y: 2},\n {x: 1, y: 3},\n {x: 1, y: 4},\n {x: 1, y: 5},\n {x: 1, y: 6},\n\n {x: 2, y: 0},\n {x: 2, y: 1},\n //{x: 2, y: 2},\n {x: 2, y: 3},\n {x: 2, y: 4},\n {x: 2, y: 5},\n {x: 2, y: 6},\n\n {x: 3, y: 0},\n {x: 3, y: 1},\n //{x: 3, y: 2},\n {x: 3, y: 3},\n {x: 3, y: 4},\n {x: 3, y: 5},\n {x: 3, y: 6},\n\n {x: 4, y: 0},\n {x: 4, y: 1},\n //{x: 4, y: 2},\n //{x: 4, y: 3},\n //{x: 4, y: 4},\n //{x: 4, y: 5},\n {x: 4, y: 6},\n\n {x: 5, y: 0},\n {x: 5, y: 1},\n //{x: 5, y: 2},\n {x: 5, y: 3},\n {x: 5, y: 4},\n {x: 5, y: 5},\n {x: 5, y: 6},\n\n {x: 6, y: 0},\n {x: 6, y: 1},\n //{x: 6, y: 2},\n {x: 6, y: 3},\n {x: 6, y: 4},\n {x: 6, y: 5},\n {x: 6, y: 6},\n\n {x: 7, y: 0},\n {x: 7, y: 1},\n //{x: 7, y: 2},\n {x: 7, y: 3},\n {x: 7, y: 4},\n {x: 7, y: 5},\n {x: 7, y: 6},\n\n {x: 8, y: 0},\n {x: 8, y: 1},\n {x: 8, y: 2},\n {x: 8, y: 3},\n {x: 8, y: 4},\n {x: 8, y: 5},\n {x: 8, y: 6},\n\n ],\n traps: [\n ]\n }\n}", "lastSolutionToString () {}", "function SS() {}", "function create2Tuple(solution) {\nthis.solution = solution;\nthis.allVars = new Array();\n\nfor (var i=1; i<=NofVariables; i++) /*foreach variable in the solution*/\n\t{\n \n\t/*create its value vector according to its type*/\n\tif (Variables[i].type === \"Numerical\")\n\t\tthis.allVars[i] = new NumericVector(Solutions[solution].values[i]);\n\telse\n\tif (Variables[i].type === \"Linguistic\")\n\t\tthis.allVars[i] = new LinguisticVector(Variables[i], parseLinguistic(Variables[i], Solutions[solution].values[i]) );\n else\n\tif (Variables[i].type === \"Interval\")\n\t\t{\n\t\tvar range = new RangeFromStr(Solutions[solution].values[i]); /*first parse the range limits*/ \n\t\tthis.allVars[i] = new RangeVector(range.low, range.high);\n\t\t}\n\t}\n\t\n/*find the interval vector of all the variables*/\nthis.interval = new IntervalVector(this.allVars);\n\n/*get the interval vector's total value*/\nthis.totalValue = getTotalValue(this.interval);\n\n/*get the total value's linguistic part*/\nthis.linguisticValue = Math.round(this.totalValue);\n\n/*get the total value's decimal part*/\nthis.diffValue = this.totalValue - this.linguisticValue;\nthis.diffValue = Math.round(this.diffValue*100)/100; /*round to 2 decimal digits*/\n\n/*convert linguistc part from ordinal to string*/\nthis.linguisticTerm = LinguisticValues[ this.linguisticValue ];\n}", "function solve(firstName, secondName,\r\n familyName) {\r\n // some code here...\r\n // some more code here...\r\n}", "function coursework(cswork)\n {\n \n //The method coursework is now declared as a let variable coursework.\n \n //The variable is assigned the sum of the parameter cswork and the method tests containing its arguments 80 and 80.\n \n //In this case the method coursework is turned into a variable; declared and intialised.\n let coursework = cswork + tests(80,80)\n \n console.log(coursework)\n \n //The return key word, instructs the method to return the resulting value assigned to the variable coursework.\nreturn coursework\n\n\n//Added this closing brace to the method coursework that wasn't there before to rectify the error in the code.\n }", "function getA1() {\n return securityAnswer1;\n}", "constructor(i, p, o, n, q1, q2, problem) {\n this._iterations = i;\n this._problem = problem;\n this._socialLearningRate = q2;\n this._cognitionLearningRate = q1;\n this._maxVelocity = 5;//problem.MAX_VALUE;\n this._minVelocity = -5;//problem.MIN_VALUE;\n this._neighborhood = o;\n this._individuals = [];\n this._particles = p;\n this._dimensions = n;\n this._bestGlobalFitness = 0;\n this._bestGlobalPosition = Array.from({ length: n }, () => Math.round(Math.random() * 11));\n }", "function puzzle_welcome() {\n return {\n id: \"intro_puzzle\",\n name: \"Welcome to Puzzle Code!\",\n description: \"Collect all the coins on the board.\",\n\n // TODO: add read-only code mirror boxes to the hint\n hint: \n \"<p>\"\n + \"In Puzzle Code there are many <strong>instructions</strong> you \"\n + \"can use to <strong>program</strong> your robot.\"\n + \"</p>\"\n + \"<p>\"\n + \"This level introduces you to <strong>two instructions</strong>: \"\n + keyword(\"move\") + \" and \" + keyword(\"turn\") + \".\"\n + \"</p>\" \n + \"<h3>Move</h3>\"\n + \"<ul>\"\n + \"<li>The \" + keyword(\"move\") + \" instruction moves the \"\n + \"robot forward one square.</li>\"\n + \"<li>The robot can only move forward. It cannot move backwards or \"\n + \"sideways.</li>\"\n + \"<li>\"\n + \"<a target='_blank' href='\"\n + WIKI_URL + \"Move-instruction\"\n + \"'>\"\n + \"Learn more about the \" + keyword_link(\"move\") + \" instruction.\"\n + \"</a></li>\"\n + \"</ul>\"\n + \"<h3>Turn</h3>\"\n + \"<ul>\"\n + \"<li>\" + keyword(\"turn left\") + \" will rotate the robot to the left.\" \n + \"<li>\" + keyword(\"turn right\") + \" will rotate the robot to the right.\"\n + \"<li>\"\n + \"<a target='_blank' href='\"\n + WIKI_URL + \"Turn-instruction\"\n + \"'>\"\n + \"Learn more about the \" + keyword_link(\"turn\") + \" instruction.\"\n + \"</a></li>\"\n + \"</ul>\"\n + \"<h3>Example program</h3>\"\n + \"<pre>\"\n + keyword(\"move\") + \"<br>\"\n + keyword(\"move\") + \"<br>\"\n + keyword(\"turn right\") + \"<br>\"\n + keyword(\"move\")\n + \"</pre>\"\n + \"<p>This program tells the robot to:</p>\"\n + \"<ul>\"\n + \"<li>move forward twice</li>\"\n + \"<li>rotate to the right 90 degrees</li>\"\n + \"<li>move forward once</li>\"\n + \"</ul>\"\n\n ,\n win_conditions: [\n {type: WinCondition.COLLECT_COINS}\n ],\n\n constraints: [],\n\n solutions: [\n \"move\\nmove\\nmove\\nturn left\\nmove\\nmove\\nmove\\nmove\\n\",\n ],\n num_cols: 9,\n num_rows: 7,\n // BUG: this should be programming_bot_id, not index\n programming_bot_index: 0,\n bots : [\n {\n botColor: BotColor.BLUE,\n cellX: 4,\n cellY: 4,\n facing: Direction.UP,\n program: \"move\\nmove\\nturn left\\nmove\\nmove\\n\",\n },\n ],\n coins: [\n {x:0, y:1},\n {x:1, y:1},\n {x:2, y:1},\n {x:3, y:1},\n ],\n // TODO: make it so that you can omit empty properties from a puzzle\n blocks: [],\n traps: [\n //{x:3, y:0}\n ]\n }\n}", "get Prologic() {}", "constructor(questions) {\n this._questionCollection = questions;\n ////console.log(this._questionCollection);\n // this._isRandomized = behaviourConfig.isRandomized;\n this._currentQuestion = -1;\n this._questionBank = [];\n this._currentPool = [];\n }", "function RelationshipAdvice(){\n \n \n \n\n var arrayEncoder;\n var initialSelections; \n var finalTruthTable;\n var ambiguousRelationships;\n var addedVals;\n var error = {broke:false, ErrorInfo:\"\"};\n var finalStage;\n\n var hijackNextQuestion = null;\n\n var status = \"Not Initialized\";\n \n this.initValues = function(allSelections){\n console.time('Time Test');\n\n truthTables = [];\n initialTruthTable = [];\n finalTruthTable = [];\n ambiguousRelationships = [];\n addedVals;\n error = {broke:false, ErrorInfo:\"\"};\n finalStage = new FinalStage();\n\n arrayEncoder = new ArrayEncoder(allSelections.CreateDetachedCopy());\n initialSelections = arrayEncoder.GetEncodedArray(allSelections).CreateDetachedCopy(); \n \n setTimeout(function() {\n // console.log(finalTruthTable); \n // console.log(ambiguousRelationships);\n }, 100);\n \n StageOneErrorResolver(initialSelections);\n \n \n finalTruthTable = initialSelections.CreateDetachedCopy();\n //console.log(\"finalTruthTable TEST\");\n //console.log(finalTruthTable.CreateDetachedCopy());\n try{ //breaks out of hijack array found\n RefineFinalTruth(); \n \n\n CreateAndRefineAmbiguousRelationships();\n \n var time = console.timeEnd('Time Test');\n }catch(err){\n console.error(err);\n }\n \n }\n\n this.AddValues = function(valuesToAdd){ \n addedVals = arrayEncoder.GetEncodedArray(valuesToAdd);\n\n StageOneErrorResolver(initialSelections, addedVals[0]);\n initialSelections = initialSelections.concat(addedVals);\n \n \n finalTruthTable = finalTruthTable.concat(addedVals.CreateDetachedCopy());\n \n try{\n RefineFinalTruth(); \n \n CreateAndRefineAmbiguousRelationships();\n }catch(err){\n console.error(err);\n }\n }\n\n this.RemoveValues = function(amountToRemove){\n\n //TODO\n }\n\n this.GetNextQuestions = function(amount=1){\n \n return arrayEncoder.Decode(finalStage.DetermineAmbiguityResolutionQuestions(ambiguousRelationships,amount,hijackNextQuestion));\n \n }\n\n this.GetPercentage = function(){\n return finalStage.GetProgressPercentage();\n }\n\n this.GetCompletionStatus = function(){\n return finalStage.GetCompletionStatus();\n }\n\n this.GetTruthTable = function(){\n return arrayEncoder.Decode(finalTruthTable);\n }\n this.GetStatus = function(){\n return status;\n }\n \n\n\n function RefineFinalTruth() { \n //Merge Truth tables\n //delete all truths that have been utilized\n\n var log = false;\n if(log){\n console.logd = console.log;\n }else{\n console.logd = function(a){\n\n }\n }\n \n var alreadyResolved = [], count = 0;\n\n do{\n FinalStageErrorResolver(finalTruthTable,initialSelections);\n\n var DetachedArray = finalTruthTable.CreateDetachedCopy(); \n var tempArray, numsSearched = [], restart = false;\n\n for (var i = 0; i < finalTruthTable.length - 1; i++) {\n for (var v = 0; v < finalTruthTable[i].length; v++) {\n var num = finalTruthTable[i][v];\n tempArray = finalTruthTable.slice(i + 1, finalTruthTable.length).FindNestledMatches(num);\n currentSelectionArray = finalTruthTable[i];\n\n numsSearched.push(num);\n\n for (var c = 0; c < tempArray[0].length; c++) { //Run for each match found\n if (tempArray != false) {\n console.logd(\"num \"+ num);\n console.logd(currentSelectionArray);\n console.logd(tempArray[0][c]);\n if(TestTheseConditions(num, currentSelectionArray, tempArray[0][c], DetachedArray, alreadyResolved)){\n restart = true;\n break;\n }\n \n \n }\n\n }\n if(restart){\n break;\n }\n\n \n }\n if(restart){\n break;\n }\n\n }\n if(count > 100){\n console.log(\"UH OH! IN REFINE INIITIAL TRUTH\");\n break;\n restart = false;\n }\n count++;\n \n finalTruthTable = DetachedArray.sort(function(a,b){\n return b.length-a.length;\n });\n \n\n var redundancyResolver = new ResolveRedundancy;\n redundancyResolver.Refresh(finalTruthTable); //Resolve redundancies\n alreadyResolved = alreadyResolved.concat(redundancyResolver.GetResolvedArrays());\n redundancyResolver.Reset();\n \n alreadyResolved = alreadyResolved.filter((item, index, arr)=>{ // removes duplicates in already resolved array\n var i = 0; \n for(i = 0; i<arr.length; i++){\n \n if(ArraysEqual(item,arr[i])){\n \n break;\n }\n }\n \n return i == index;\n });\n \n \n \n console.logd(\"FinalTruthTable\");\n console.logd(finalTruthTable);\n \n }while(restart);\n \n \n }\n\n function CreateAndRefineAmbiguousRelationships() {\n //Create Ambiguous List\n //Break ambiguous List down into basic form\n //Check if Ambigouity resolves from final truth table\n \n ambiguousRelationships = [];\n CreateAmbiguousRelationships(finalTruthTable,ambiguousRelationships);\n \n var ambiguousList = ambiguousRelationships.CreateDetachedCopy();\n\n for(var x = 0; x<2; x++){ //breaks all ambiguos relationships into most basic form\n \n var tempList = []; \n for(var i = 0; i<ambiguousList.length; i++){\n if(ambiguousList[i][0].length>1){\n for(var c = 0; c<ambiguousList[i][0].length; c++){\n tempList.push([ambiguousList[i][0][c],ambiguousList[i][1]]);\n }\n }else if(ambiguousList[i][1].length>1){\n for(var c = 0; c<ambiguousList[i][1].length; c++){\n tempList.push([ambiguousList[i][1][c],ambiguousList[i][0]]);\n \n }\n }\n }\n \n \n ambiguousList = ambiguousRelationships = tempList;\n \n } \n \n ambiguousRelationships = ambiguousRelationships.filter((item, index, arr) => { //filters self redundancys\n var i;\n if(item[0]==item[1]){\n return false;\n }\n for(i = 0; i<arr.length; i++){\n if((arr[i][0]==item[0]&&arr[i][1]==item[1])||(arr[i][1]==item[0]&&arr[i][0]==item[1])){\n break;\n }\n }\n return (i == index);\n });\n\n ambiguousRelationships = ambiguousRelationships.filter(item=>{\n var returnMe = true;\n for(i = 0; i<finalTruthTable.length; i++){\n if(finalTruthTable[i].includes(item[0])&&finalTruthTable[i].includes(item[1])){\n returnMe = false;\n }\n }\n return returnMe;\n });\n \n function CreateAmbiguousRelationships(truthTable,ambiguousList){//filters truth table redundancys\n for(var i = 0; i<truthTable.length-1; i++){\n for(var v = i+1; v<truthTable.length; v++){\n ambiguousList.push([truthTable[i],truthTable[v]]);\n }\n }\n }\n\n }\n \n function FinalStage() { // is in charge of when to end program\n //Find the answers that are included in refined ambigous relations the most and generate a question list\n //Once ambiuity questions are down to zero signal done\n var initialAmbiguityAmount = 0, firstTime = true, currentAmbiguityAmount;\n\n this.DetermineAmbiguityResolutionQuestions = function(ambigousList,amount=1,hijacked = null){ \n var returnMe = [], tempnum;\n if(hijacked == null){\n status = \"Resolving Based on Edge Optimized Algorithms\";\n var scores = ScoreAmbiguity(ambigousList,finalTruthTable);\n \n if(scores.length==0){\n status = \"Done\";\n console.log(\"Done, but for some reason still trying to get new questions\");\n returnMe = [-1,-1,-1];\n }else{\n\n if(firstTime){ //Allows for progress Percentage to be reached\n initialAmbiguityAmount = ambiguousRelationships.length;\n currentAmbiguityAmount = ambiguousRelationships.length;\n firstTime = false;\n }else{\n currentAmbiguityAmount = ambiguousRelationships.length;\n \n }\n\n var breakMe = false;\n var tempSortArray = [];\n var tempArrayIndex = 0, Largest = 0;\n var i = 0;\n \n while(!breakMe){ //sort all items based on given score\n \n if(scores.length == 0){ //if done\n breakMe = true;\n break;\n }\n \n if(scores[i]>Largest){\n Largest = scores[i];\n tempArrayIndex = i;\n }\n i++;\n if(i==scores.length){\n tempSortArray.push(ambigousList[tempArrayIndex]);\n ambigousList.splice(tempArrayIndex,1);\n scores.splice(tempArrayIndex,1);\n i = 0;\n Largest = 0;\n \n }\n\n \n \n\n }\n ambigousList = tempSortArray;\n breakMe = false;\n for(i = 0; i<ambigousList.length; i++){\n for(v = i+1; v<ambigousList.length; v++){\n \n if(ambigousList[i].includes(ambigousList[v][0])||ambigousList[i].includes(ambigousList[v][1])){\n \n breakMe=true;\n break;\n } \n }\n if(breakMe){\n break;\n }\n }\n \n if(breakMe){\n console.logc(\"ambigousList\");\n console.logc(ambigousList[6]);\n console.logc(\"i, v\");\n console.logc(\"i: \"+i+\" v: \"+v);\n if(ambigousList[i].includes(ambigousList[v][0])){\n \n returnMe = ambigousList[i].concat(ambigousList[v][1]);\n }else{\n \n returnMe = ambigousList[i].concat(ambigousList[v][0]);\n }\n }else{\n if(ambigousList.length>1){\n \n \n returnMe = ambigousList[0].concat(ambiguousList[1][0]);\n \n }else{\n do{\n i = finalTruthTable[0][Math.round(Math.random() * (finalTruthTable[0].length-1))];\n }while(ambigousList[0].includes(i));\n returnMe = ambigousList[0].concat(i);\n }\n }\n //console.log(ambigousList);\n ambiguousRelationships = ambigousList.CreateDetachedCopy();\n console.log(returnMe);\n }\n }else{ //if hijacked\n returnMe = hijacked;\n hijacked = null;\n }\n return returnMe;\n\n function ScoreAmbiguity(ambigousList,truthTable){ //values nearness to edges and repitition among truth tables\n var maxLength = 0,x,tempNum,tempScore = 0,tempLength,scoreArray = [],even = false;;\n truthTable.forEach(ele=>{ //figure out max length\n if(ele.length>maxLength){\n maxLength = ele.length;\n }\n });\n \n ambigousList.forEach(ele=>{\n tempScore = 0\n ele.forEach(num=>{\n for(x = 0; x<truthTable.length; x++){\n tempNum = truthTable[x].indexOf(num);\n tempLength = truthTable[x].length;\n if(tempNum!=-1){\n tempNum++;\n if((tempNum/tempLength)<.5){ //if found in first half of array\n tempScore+=(tempLength/maxLength)*(tempLength/tempNum)*10;\n }else{\n tempScore+=(tempLength/maxLength)*(tempLength/((tempLength+1)-tempNum))*10;\n }\n }\n }\n if(even){\n scoreArray.push(tempScore);\n even = false;\n }else{\n even = true;\n }\n });\n });\n return scoreArray;\n }\n \n }\n\n this.GetProgressPercentage = function(){ //Gets the percentage the program is at\n if(firstTime){\n console.log(\"Please run DetermineAmbiguityResolutionQuestions First\")\n }\n return Math.round(((initialAmbiguityAmount-currentAmbiguityAmount)/initialAmbiguityAmount)*100);\n }\n \n this.GetCompletionStatus = function(){\n if(ambiguousRelationships.length==0&&hijackNextQuestion==null){\n return true;\n }\n return false;\n\n }\n\n }\n //var TheeArray = [[1,2,3],[4,6,7],[3,7,1],[1,5,3],[1,7,4],[1,3,2]];\n \n // StageOneErrorResolver(TheeArray);\n //console.log(TheeArray);\n function StageOneErrorResolver(selection, addedArray = false) { //Resolves Errors in Initial User Selection Table\n\n //only searches the first array added\n \n \n var Counters = 0;\n var log = false; //Logs Events in Function\n if (log) {\n console.logc = console.log;\n } else {\n console.logc = function (nothing) {\n\n }\n }\n var selections = selection.CreateDetachedCopy();\n \n if (!addedArray) { //Search all\n \n } else { //search only first arrays\n \n selections.push(addedArray);\n console.logc(selections);\n\n }\n var selectionTotalLength = selections.length;\n \n var oneRun = false;\n do { //loop to regenerate values if error found\n console.logc(\"Selections\");\n console.logc(selections);\n \n restart = false;\n \n var tempArray;\n \n for (var i = selectionTotalLength - 1; i > 0; i--) {\n if(!addedArray){\n\n }else{\n\n if(oneRun){\n \n break;\n }\n oneRun=true;\n }\n \n \n for (var v = selections[i].length; v >= 0; v--) {\n \n var num = selections[i][v];\n \n \n \n console.logc(selections[i]);\n console.logc(\"i \" + i);\n console.logc(\"v \" + v);\n\n \n tempArray = selections.slice(0, i).FindNestledMatches(num);\n currentSelectionArray = selections[i];\n \n if(tempArray[0].length != 0){\n console.logc(\"Array Being Scanned: \");\n console.logc(tempArray[0]);\n console.logc(\"Slice: \")\n console.logc(selections.slice(0, i));\n console.logc(\"Num \" + num);\n }\n\n for (var c = 0; c < tempArray[0].length; c++) { //Run for each match found\n \n var tempError = TestForInternalConflict(num, currentSelectionArray, tempArray[0][c]);\n\n if (tempError[0]!=false) {\n console.logc(\"Selections: \");\n console.logc(currentSelectionArray);\n console.logc(tempArray[0][c]);\n var replacementValue = FlipArrayValues(tempArray[0][c], num, tempError[1][0]);\n \n console.logc(\"ErrorFound\");\n console.logc(selections[i]);\n console.logc(tempError[1][0] + \" \" + num);\n console.logc(\"replacementValue\");\n console.logc(replacementValue);\n \n selection[tempArray[1][c]] = replacementValue;\n\n console.logc(\"initialSelections Updated\");\n console.logc(initialSelections);\n restart = true;\n oneRun = false;\n initialTruthTable = [];\n ambiguousRelationships = [];\n break;\n }\n \n\n }\n if (restart) {\n selections = selection.CreateDetachedCopy();\n if (!addedArray) { //Search all\n \n } else { //search only first arrays\n \n selections.push(addedArray);\n \n }\n break;\n }\n \n }\n if (restart) { //Get out of all for loops and restart\n break;\n }\n }\n \n if(Counters>300){\n console.log(\"ERROR IN STAGE ONE ERROR RESOLVER OVER FLOW\");\n break;\n }\n Counters++;\n \n } while (restart);\n \n }\n \n \n function FinalStageErrorResolver(selection,resolvingSelection,log = false) { //Resolves Errors in any Selection Table\n\n //only searches the first array added\n var resolvingSelectionReversed = resolvingSelection.reverse();\n var Counter = 0;\n //var log = false; //Logs Events in Function\n if (log) {\n console.logc = console.log;\n } else {\n console.logc = function (nothing) {\n\n }\n }\n var MatchingArray, MatchingArrayMain = [], errorWasFound;\n console.logc(\"selection: \");\n console.logc(selection);\n var unresolvedErrors = [],truthTable = [] ,tempError, tempBool, tempTruthTable = [], unresolvedErrorsMainLoop = [];\n for(var i = 0; i<selection.length-1; i++){ //Iterate through all selection items but the last one\n unresolvedErrors = [];\n \n MatchingArray = FindCommonalities(selection[i],selection.slice(i+1),i+1,i); //returns [second array index in selections,\n //[[second array numbers],[second array indexes],[[first array numbers][first array indexes]]]\n \n errorWasFound = false;\n MatchingArray = MatchingArray.filter((ele)=>{\n tempBool = false;\n ele[1][0].forEach((ele1)=>{\n \n tempError = TestForInternalConflict(ele1,ele[1][0],ele[2][0])\n if(tempError[0]!=false){\n tempBool = errorWasFound = true;\n tempError[1].forEach(eles=>{\n unresolvedErrors.push([eles,ele1]);\n });\n }else{\n\n }\n \n });\n return tempBool;\n }); \n\n unresolvedErrors = unresolvedErrors.filter((item, index, arr) => { //filters self redundancies\n var i;\n if(item[0]==item[1]){\n return false;\n }\n for(i = 0; i<arr.length; i++){\n if((arr[i][0]==item[0]&&arr[i][1]==item[1])||(arr[i][1]==item[0]&&arr[i][0]==item[1])){\n break;\n }\n }\n return (i == index);\n });\n \n \n unresolvedErrors = unresolvedErrors.filter(ele=>{ //removes all Errors that are resolved\n tempBool = true;\n truthTable.forEach(eles=>{ //Check if redundant to truthtable\n if(eles.includes(ele[0])&&eles.includes(ele[1])){\n tempBool = false;\n }\n });\n \n if(tempBool){\n console.logc(resolvingSelectionReversed);\n resolvingSelectionReversed.forEach(ele1=>{ //resolves based on resolving selection array\n \n tempError = [ele1.indexOf(ele[0]), ele1.indexOf(ele[1])]; \n if(tempError[0]!=-1&&tempError[1]!=-1){\n console.logc(\"Resolved in Selection array\");\n tempBool = false;\n if(tempError[0]>tempError[1]){\n truthTable.push([ele[1],ele[0]]);\n }else{\n truthTable.push([ele[0],ele[1]]);\n }\n }\n \n });\n\n if(tempBool){ //if not already found\n \n tempTruthTable = [];\n selection.forEach(ele1=>{ //Resolves based on truth table \n tempError = [ele1.indexOf(ele[0]), ele1.indexOf(ele[1]),ele1.indexOf(ele[0])- ele1.indexOf(ele[1])]; \n \n if(tempError[0]!=-1&&tempError[1]!=-1){\n \n if(tempError[2]<=2&&tempError[2]>0){\n tempTruthTable.push([ele[1],ele[0],tempError[2]]);\n tempBool = false;\n }else if(tempError[2]>=-2&&tempError[2]<0){\n \n tempTruthTable.push([ele[0],ele[1],-tempError[2]]);\n tempBool = false;\n }\n }\n });\n \n \n tempError = [3,-1,true]; //[Distance,index, if last one was equal] \n tempTruthTable.forEach((ele,index)=>{ // Figures out the best match\n if(tempError[0]>ele[2]){ //if distance is less then prevous smallest\n tempError[0] = ele[2];\n tempError[1] = index;\n tempError[2] = false;\n }else if(tempError[0]==ele[2]){ // last value is of equal distance\n \n tempError[2] = true;\n }\n });\n if(!tempError[2]&&tempError[0]!=3){\n truthTable.push([tempTruthTable[tempError[1]][0],tempTruthTable[tempError[1]][1]]);\n }else{ //Tie or no existant\n \n tempBool=true;\n }\n\n }\n }\n console.logc(\"truthTable\");\n console.logc(truthTable.CreateDetachedCopy());\n\n return tempBool;\n });\n \n unresolvedErrorsMainLoop = unresolvedErrorsMainLoop.concat(unresolvedErrors);\n if(MatchingArray.length!=0&&unresolvedErrors.length==0){\n MatchingArrayMain.push(MatchingArray);\n }\n \n }\n \n if(unresolvedErrorsMainLoop.length!=0){ // IF errors left unresolved\n status = \"Resolving Errors\";\n \n tempTruthTable = [];\n \n for(var i = 0; i<unresolvedErrorsMainLoop.length-1; i++){\n unresolvedErrorsMainLoop.slice(i+1).forEach(ele=>{\n if(unresolvedErrorsMainLoop[i].includes(ele[0])){\n tempTruthTable = [unresolvedErrorsMainLoop[i][0],unresolvedErrorsMainLoop[i][1],ele[1]];\n }else if(unresolvedErrorsMainLoop[i].includes(ele[1])){\n tempTruthTable = [unresolvedErrorsMainLoop[i][0],unresolvedErrorsMainLoop[i][1],ele[0]];\n }\n });\n } \n \n if(tempTruthTable.length==0){\n do{\n tempTruthTable = finalTruthTable[0][Math.round(Math.random() * (finalTruthTable[0].length-1))];\n }while(unresolvedErrorsMainLoop[0].includes(tempTruthTable));\n tempTruthTable = unresolvedErrorsMainLoop[0].concat(tempTruthTable);\n }\n \n console.log(\"Hijack Array\");\n console.log(tempTruthTable);\n hijackNextQuestion = tempTruthTable.CreateDetachedCopy();\n throw new Error(\"Hijack Array Needed\");\n }else if(MatchingArrayMain.length!=0){ //if all Still need to make edit based on truth table\n MatchingArrayMain.forEach(ele=>{\n ele.forEach(ele=>{\n // console.log(\"ele[1]\");\n // console.log(ele[1]);\n \n ele[1][0].sort((a,b)=>{\n for(var i = 0; i<truthTable.length; i++){\n \n if(truthTable[i].indexOf(a)-truthTable.indexOf(b)>0){\n \n return 1;\n }else if(truthTable[i].indexOf(a)-truthTable.indexOf(b)<0){\n \n return -1;\n }\n }\n \n });\n console.logc(\"truthTable.CreateDetachedCopy()\");\n console.logc(truthTable.CreateDetachedCopy());\n // console.log(ele[1].CreateDetachedCopy());\n ele[2][0].sort((a,b)=>{\n for(var i = 0; i<truthTable.length; i++){\n \n if(truthTable[i].indexOf(a)-truthTable.indexOf(b)>0){\n \n return -1;\n }else if(truthTable[i].indexOf(a)-truthTable.indexOf(b)<0){\n \n return 1;\n }\n }\n });\n console.logc(\"selection.CreateDetachedCopy()\");\n console.logc(selection.CreateDetachedCopy());\n console.logc(\"ele\");\n console.logc(ele.CreateDetachedCopy());\n ele[1][1].forEach((eles1,index)=>{ //actually changes selection array\n selection[ele[0][0]][eles1] = ele[1][0][index];\n });\n ele[2][1].forEach((eles1,index)=>{ //actually changes selection array\n selection[ele[0][1]][eles1] = ele[2][0][index];\n });\n console.logc(selection.CreateDetachedCopy());\n \n });\n });\n console.logc(\"MatchingArrayMain\");\n console.logc(MatchingArrayMain);\n }\n \n \n \n \n\n \n\n\n }\n \n function FindCommonalities(array,wholeList,Offset,index1){ //returns common numbers between two arrays and their respective indexes\n var returnMe=[], tempArray=[],tempArray2=[],tempNum, eleTempArray=[], tempNumTempArray=[], indexTempArray=[];\n wholeList.forEach((mainEle,mainIndex)=>{\n tempArray=[];\n tempArray2=[];\n eleTempArray=[], tempNumTempArray=[], indexTempArray=[];\n\n array.forEach((ele,index)=>{\n tempNum = mainEle.indexOf(ele);\n if(tempNum!=-1){\n eleTempArray.push(ele);\n tempNumTempArray.push(tempNum);\n indexTempArray.push(index);\n }\n });\n \n \n \n var j,a,n = eleTempArray.length;\n if(n!=0){\n \n \n tempArray = [eleTempArray.CreateDetachedCopy(),tempNumTempArray];\n tempArray2= [eleTempArray,indexTempArray];\n for (var i = 0; i < n; ++i) //order array\n {\n for (j = i + 1; j < n; ++j)\n {\n if (tempArray[1][i] > tempArray[1][j]) \n {\n a = tempArray[1][i];\n tempArray[1][i] = tempArray[1][j];\n tempArray[1][j] = a;\n\n a = tempArray[0][i];\n tempArray[0][i] = tempArray[0][j];\n tempArray[0][j] = a;\n }\n }\n }\n\n returnMe.push([[mainIndex+Offset,index1],tempArray,tempArray2]);\n }\n });\n\n return returnMe;\n }\n\n function ResolveRedundancy(){\n if (false) {\n console.logh = console.log;\n } else {\n console.logh = function (nothing) {\n\n }\n }\n var resolvedArrays = [];\n var i = 0;\n this.Refresh = function(truthTable, truthTable1){\n while(this.ResolveRedundancy(truthTable,truthTable1)){ //Runs until all reduncies resolved\n \n if(i>500){ //if stuck in infinate loop\n console.log(\"BIG ERROR: \" + i);\n broke = true;\n errorName = \"Initial Truth Array Refinement Failed\";\n break; \n \n }\n i++;\n }\n }\n this.ResolveRedundancy = function(truthTableProtected, truthTable1 = false){\n\n var breakOut = false;\n var scanTruthTempArray;\n var truthTempArray, scanTruthTable, matchesInRow, matchingIndexesArray, v, i, Current, element,tempIndex,iOffset, returned;\n \n var truthTable = truthTableProtected.CreateDetachedCopy();\n var endOffset = 1;\n if(truthTable1!=false){\n truthTable= truthTable1.concat(truthTableProtected);\n endOffset = truthTable1.length;\n }\n for(i = truthTable.length-1; i>endOffset-1; i--){\n scanTruthTable = truthTable.slice(0,i);\n \n \n \n matchingIndexesArray = [];\n \n for(v = 0; v < scanTruthTable.length; v++){\n matchesInRow = 0;\n scanTruthTempArray = scanTruthTable[v];\n truthTempArray = truthTable[i];\n\n for(Current = 0; Current < truthTempArray.length; Current++){\n\n element = truthTempArray[Current];\n \n tempIndex = scanTruthTempArray.indexOf(element);\n if(tempIndex!=-1){\n console.logh(\"Update ME \"+ truthTempArray);\n console.logh(\"Keep ME \"+ scanTruthTempArray);\n \n matchesInRow++;\n console.logh(matchesInRow);\n matchingIndexesArray.push(Current);\n }else {\n matchesInRow=0;\n matchingIndexesArray=[];\n }\n\n if(truthTable1!=false){\n iOffset = i-(endOffset);\n }else{\n iOffset = i;\n }\n if(matchesInRow>=truthTempArray.length){\n console.logh(truthTableProtected.CreateDetachedCopy());\n resolvedArrays.push(truthTableProtected.splice(iOffset,1)[0]);\n console.logh(\"Resoltion\");\n console.logh(resolvedArrays.CreateDetachedCopy());\n breakOut=true;\n break;\n } \n\n };\n console.logh(truthTableProtected);\n if(breakOut){ //if Redundancy Detected and Resolved\n \n break;\n }\n }\n if(breakOut){\n break;\n }\n }\n\n return breakOut;\n }\n this.GetResolvedArrays = function(){\n return resolvedArrays.CreateDetachedCopy();\n }\n this.Reset = function(){\n resolvedArrays = [];\n }\n\n }\n \n \n \n function ArraysEqual(array1,array2, all = true){ //returns true if all are true in arrays, if all is a false then if the second one can be contained in the first\n var index, lastIndex,consecutives = 0,i=0, returnme=-1; \n if(all&&array2.length!=array1.length)\n return false;\n\n for(var z = 0; z<array1.length; z++){\n \n index = array2.indexOf(array1[z]);\n \n \n if(index!=-1){\n if(index==lastIndex+1){\n consecutives++;\n }else{\n consecutives = 0;\n }\n \n if(all&&i==0&&index!=0){\n \n returnme = false;\n break;\n }\n if(!all&&consecutives==array2.length-1){\n returnme = true;\n break;\n }\n\n }else if(all){\n \n returnme = false;\n break;\n \n }else{\n \n consecutives = 0;\n }\n lastIndex = index;\n i++;\n }\n if(returnme!=-1){\n return returnme;\n }\n if(all){\n return true;\n }\n return false;\n\n }\n\n function TestForInternalConflict(num, searchArray, matchArray) { //Tests to see if there is any values that are on opposite sides of an ancher in two arrays\n var errorFound = false;\n var searchArrayExterior = ExteriorValues(searchArray, num);\n var matchArrayExterior = ExteriorValues(matchArray, num);\n var erroredElements = [];\n \n if(matchArrayExterior[1]!=-1&&searchArrayExterior[0]!=-1){\n searchArrayExterior[0].forEach(element => {\n if (matchArrayExterior[1].includes(element)) {\n errorFound = true;\n erroredElements.push(element);\n }\n });\n }\n if(matchArrayExterior[0]!=-1&&searchArrayExterior[1]!=-1){\n searchArrayExterior[1].forEach(element => {\n\n if (matchArrayExterior[0].includes(element)) {\n errorFound = true;\n erroredElements.push(element);\n }\n });\n }\n\n return [errorFound, erroredElements];\n\n }\n\n function TestTheseConditions(num, searchArrayProtected, matchArrayProtected,truthTable, previouslyResolved = []) { //Adds Values to ambiguousRelationships and TruthTable from final search\n var searchArray = searchArrayProtected.slice();\n var matchArray = matchArrayProtected.slice();\n var searchArrayExteriors = ExteriorValues(searchArray,num);\n var matchArrayExteriors = ExteriorValues(matchArray,num);\n var tempMatchArray = matchArray.slice();\n var itemCorrected = false;\n var tempArray = [], tempMatchingArray;\n var PinchCondition = CheckForPinchCondition(tempMatchArray, searchArray)[0];\n if(false){ //log or naw\n console.logt = console.log;\n }else{\n console.logt = function(nothing){\n\n }\n }\n if (PinchCondition != false) { //Check for Pinch Conditions\n console.logt(\"Pinch\");\n truthTable.push(PinchCondition);\n\n } \n if(searchArrayExteriors[1]!=-1&&matchArrayExteriors[0]!=-1){\n \n tempArray = matchArrayExteriors[0].slice();\n tempArray.push(num);\n tempMatchingArray = tempArray.concat(searchArrayExteriors[1]);\n \n if(!ArrayContained(previouslyResolved,tempMatchingArray)){\n truthTable.push(tempMatchingArray);\n itemCorrected = true;\n }\n\n }else if(searchArrayExteriors[0]!=-1&&matchArrayExteriors[1]!=-1){\n tempArray = searchArrayExteriors[0].slice();\n tempArray.push(num);\n tempMatchingArray = tempArray.concat(matchArrayExteriors[1])\n \n if(!ArrayContained(previouslyResolved,tempMatchingArray)){\n truthTable.push(tempMatchingArray);\n itemCorrected = true;\n }\n\n }\n \n return itemCorrected;\n }\n\n function ArrayContained(array1,array2,all = true){ //returns true if found complete match in array one\n var returnMe = false; \n \n for(var i = 0; i<array1.length; i++){\n if(ArraysEqual(array1[i],array2,all)){\n returnMe = true;\n break;\n }\n }\n return returnMe;\n } \n\n function FlipArrayValues(array, num1, num2) { //Flips the location of the values num1 and num2 in the array\n var array1 = array.slice();\n var index1 = array1.indexOf(num1);\n \n array1[array1.indexOf(num2)] = num1;\n array1[index1] = num2;\n \n return array1;\n }\n\n function ExteriorValues(array, num) { // returns values on either side of value in array(doesn't include value)\n var returnNum = [[], []];\n var index = array.indexOf(num);\n if (index > 0) {\n returnNum[0] = array.slice(0, index);\n }else{\n returnNum[0] = -1;\n }\n if (index < array.length - 1) {\n returnNum[1] = array.slice(index + 1);\n }else{\n returnNum[1] = -1;\n }\n return returnNum;\n }\n\n function CheckForPinchCondition(array1, array2) {\n var arrayOfMatchingIndexes = [];\n var returnArray = false;\n var returnArrayNumber = false;\n\n array1.forEach(element => {\n var indexOf = array2.indexOf(element);\n\n if (indexOf != -1) {\n arrayOfMatchingIndexes.push(indexOf);\n }\n\n });\n arrayOfMatchingIndexes.sort((a, b) => a - b);\n if (arrayOfMatchingIndexes.length > 1) {\n var prevElement;\n //console.log(\"Array of Mathcing \");\n //console.log(arrayOfMatchingIndexes);\n arrayOfMatchingIndexes.forEach(element => {\n // console.log(element-prevElement);\n if (Math.abs(element - prevElement) == 1) {\n var endElement = array1.indexOf(array2[element]);\n var startElement = array1.indexOf(array2[prevElement]);\n //console.log(\"Array1 \"+(endElement-startElement));\n if (Math.abs(endElement - startElement) == 2) {\n //console.log(\"Slice 1 \"+ array2.slice(0,prevElement+1));\n //console.log(\"Slice 2 \" +array1[startElement+1]);\n returnArray = array2.slice(0, prevElement + 1).concat(array1[startElement + 1], array2.slice(element));\n returnArrayNumber = 1;\n }\n } else if (Math.abs(element - prevElement) == 2) {\n\n var endElement = array1.indexOf(array2[element]);\n var startElement = array1.indexOf(array2[prevElement]);\n // console.log(\"Array1 \"+(endElement-startElement));\n if (Math.abs(endElement - startElement) == 1) {\n // console.log(\"Slice 1 \"+ array1.slice(0,startElement+1));\n // console.log(\"Slice 2 \" +array2[prevElement+1]);\n returnArray = array1.slice(0, startElement + 1).concat(array2[prevElement + 1], array1.slice(endElement));\n\n returnArrayNumber = 0;\n }\n }\n prevElement = element;\n });\n }\n return [returnArray, returnArrayNumber]\n }\n\n function ArrayEncoder(array){ //Encodes Array into numerics amd decodes back into original format\n var valueMapDecoded = [];\n var valueMapEncoded = [];\n var currentMapValue = 0;\n var tempIndex;\n\n ArrayRecursionCreateEncodingMap(array);\n\n this.Decode = function(array1){\n return ArrayRecursionDecode(array1);\n }\n \n this.GetEncodedArray = function(array1 = false){\n \n return ArrayRecursionEncode(array1);\n \n }\n \n function ArrayRecursionCreateEncodingMap(array){ \n var returnMe = [];\n array.forEach(function(el){\n if(typeof el == 'object'){\n returnMe.push(ArrayRecursionCreateEncodingMap(el));\n }else{\n returnMe = array.map(ele=>{\n tempIndex = valueMapDecoded.indexOf(ele);\n if(tempIndex==-1){\n valueMapEncoded.push(currentMapValue);\n valueMapDecoded.push(ele);\n currentMapValue++;\n return currentMapValue-1;\n }else{\n return valueMapEncoded[tempIndex];\n }\n });\n \n }\n });\n \n return returnMe;\n }\n\n \n function ArrayRecursionEncode(array){ \n var returnMe = [];\n array.forEach(function(el){\n if(typeof el == 'object'){\n returnMe.push(ArrayRecursionEncode(el));\n }else{\n returnMe = array.map(ele=>{\n tempIndex = valueMapDecoded.indexOf(ele);\n if(tempIndex==-1){\n return -1;\n }else{\n return valueMapEncoded[tempIndex];\n }\n });\n \n }\n });\n \n return returnMe;\n }\n\n \n function ArrayRecursionDecode(array){ \n var returnMe = [];\n array.forEach(function(el){\n if(typeof el == 'object'){\n returnMe.push(ArrayRecursionDecode(el));\n }else{\n returnMe = array.map(ele=>{\n tempIndex = valueMapEncoded.indexOf(ele);\n if(tempIndex==-1){\n return -1;\n }else{\n return valueMapDecoded[tempIndex];\n }\n });\n \n }\n });\n \n return returnMe;\n }\n \n \n \n }\n\n}", "function createStudent(name, year) {\n return (() => {\n let courses = [];\n return {\n name,\n year,\n info() {\n console.log(`${name} is a ${year} student`);\n },\n addCourse(course) {\n courses.push(course);\n },\n listCourses() {\n console.log(courses);\n },\n getCourses() {\n return courses;\n },\n addNote(courseNum, note) {\n let course = this.findCourseByCode(courseNum);\n course.note ? course.note.push(note) : course.note = [note];\n },\n updateNote(courseNum, note) {\n let course = this.findCourseByCode(courseNum);\n course.note = [note];\n },\n viewNotes() {\n courses.forEach(course => {\n if (course.hasOwnProperty('note')) {\n console.log(`${course.name}: ${course.note.join(';')}`);\n }\n });\n },\n findCourseByCode(num) {\n for (var i = 0; i < courses.length; i++) {\n if (courses[i].code === num) { return courses[i] }\n }\n },\n findCourseByName(name) {\n for (var i = 0; i < courses.length; i++) {\n if (courses[i].name === name) { return courses[i] }\n }\n }\n };\n })()\n}", "function Pe(){}", "function Rep() {\r\n}", "function Maisons(){\n \n }", "function solution(arr){\n\n}", "function Hj(){}", "people(letter, age, year) {\n if (age < 0) { age = -1 }\n if (year < 0) { year = -1 }\n this.age = age,\n this.year = year,\n this.killed = this.fibonacci(age, year),\n this.substration = this.year - this.age,\n this.answer = \"Person \" + letter + \" born on Year = \" + this.year + \" - \"+ this.age + \" = \" + this.substration + \n \", number of people killed on year \" + this.substration + \" is \" + this.killed + \".\"\n }", "function comportement (){\n\t }", "function Student() {\n \n }", "constructor(name, age, ability, money) {\n this.name = name;\n this.age = age;\n this.ability = ability;\n this.money = money;\n this.isStudent = this.applied(this.money);\n this.graduate = Student.applyGraduate(this.ability);\n this.classCountdown = 10;\n this.results = \"\";\n }", "function getQ1() {\n return securityQuestion1;\n}", "function checkSolution(){\n\t puzzleSolution;\n\t}", "function SAT () { }", "private public function m246() {}", "constructor ()\n\t{\n\t\tthis.elementArray = makePuzzle(); //creates an unambiguous solved puzzle\n\t\tthis.userArray = []; //stores the user's selected solutions\n\t\tfor (var i = 0; i < 81; i++) {\n\t\t\tthis.userArray.push(0);\n\t\t}\n\t\tthis.pencilArray = []; //stores user's penciled numbers for each cell on table\n\t\tthis.inputFlag = this.MANUAL; //Start in solid input\n\n\t\tthis.selectedNumber = 0; //the number user has selected for semiAuto input\n\n\t}", "constructor(name, title, game, role) {\n this.name = name; this.title = title; this.game = game; this.role = role.toString(); this.home = game.getLocationByName(helper.roleToLocation[role]);\n this.location = this.home;\n this.influence = {common:0,noble:0,faithful:0,guard:0};\n this.influence[helper.roleToFaction[role].toLowerCase()] = helper.startingInfluence;\n //console.log(\"LOWERCASE TEST: \" + role);\n if (this.role.toLowerCase() == 'bishop') {\n this.influence.faithful = helper.startingInfluence * 2;\n }\n this.crowns = helper.startingCrowns; this.time = 0; this.beenAccused = false;\n }", "function Ha(){}", "function Answer() {\n //array of randomo words (possible answers)\n this.words = [\"it\", \"can\", \"be\", \"intimidating\", \"to\", \"leave\", \"your\", \"job\", \"and\", \n \"pursue\", \"novel\", \"career\", \"opportunities\", \"but\", \"ultimately\", \"when\", \"given\", \"only\", \n \"one\", \"life\", \"experiencing\", \"more\", \"challenging\", \"oneself\", \"seems\", \"better\", \"than\", \n \"sticking\", \"with\", \"status\", \"quo\", \"ride\", \"tigers\", \"drive\", \"racecars\", \"communicate\", \n \"with\", \"computers\", \"eat\", \"weird\", \"fruit\", \"but\", \"never\", \"stagnate\", \"thinking\", \"up\", \n \"words\", \"tedious\", \"dialogue\", \"quotes\", \"you're\", \"the\", \"same\", \"decaying\", \"organic\", \"matter\", \n \"everything\", \"else\", \"compost\", \"heap\", \"singing\", \"dancing\", \"disappear\", \"zipper\", \"canvas\", \n \"bit-coin\", \"grandiose\", \"gregarious\", \"egregious\", \"narcissistic\", \"earthquake\", \"tornado\", \"monsoon\", \n \"aisle\", \"vile\", \"villain\", \"slain\", \"hero\", \"heroine\", \"sarcastic\", \"serious\", \"cereal\", \"surreal\", \n \"cerebral\", \"inundated\", \"annotate\", \"transcribe\", \"transverse\", \"revise\", \"visor\", \"advisor\", \"survivor\", \n \"blade\", \"runner\", \"speed\", \"racer\", \"persevere\", \"platonic\", \"dexterous\", \"ambidextrous\", \n \"confined\", \"confounded\", \"contraption\", \"giggle\", \"jiggle\", \"juggle\", \"extraneous\"];\n // array of lowercase letters\n this.alphabet = 'abcdefghijklmnopqrstuvwxyz'.split('');\n // select a random word to use as this game's answer\n this.word = chooseRandomElement(this.words);\n //split the word into an array of its component letters\n this.letters = this.word.split(\"\");\n}", "function oi(){}", "function generateEncounter()\r\n{\r\n\t\r\n}", "function solution(A) {\n // write your code in JavaScript (Node.js 8.9.4)\n return sol(A);\n}", "initSolution() {\n\t\t\t// generate random solution to t-SNE\n\t\t\tthis.solution = randn2d(this.N, this.dim); // the solution\n\t\t\tthis.gains = randn2d(this.N, this.dim, 1.0); // step gains to accelerate progress in unchanging directions\n\t\t\tthis.ystep = randn2d(this.N, this.dim, 0.0); // momentum accumulator\n\t\t\tthis.iter = 0;\n\t\t}", "function Carnivorus(){\n\n}", "function DifferentialLigningExercise2() {\n const {\n A, B, C, D,\n } = diffLigningVars();\n this.txt = 'Find den fuldstændige løsning til differentialligningen. I tilfælde af kommatal, indtast 2 decimaler.';\n this.type = 'differentialligning';\n this.point = 10;\n this.tegn = '';\n this.exerciseVars = { Differentialligning: `f'(x)=${A}x^3-${B}x^2-${C}x-${D}` };\n this.facit = differentialLigning2Facit(A, B, C, D);\n this.print = () => {\n console.log(this.txt, this.type, this.point, this.tegn, this.exerciseVars, this.facit);\n };\n}", "function getSchool() {\n return \"Novi Hogeschool\";\n}", "myBestMethod(){\n\n }", "function generateSolution () {\n banner.innerHTML = 'JS-Simon'\n solution.push(Math.floor((Math.random() * 4) + 1))\n timeout -= 25\n animateSolution()\n}", "function badIdea(){\n this.idea = \"bad\";\n}", "function DesignModel(apc,seq,lab) {\n this.apc = apc;\n this.seq = seq;\n this.lab = lab||null;\n this.me1 = 0.0; // mfe for state 1\n this.me2 = 0.0; // mfe for state 2 (no bonus)\n this.ns1 = null; // mfe (natural) shape str for state 1\n this.ns2 = null; // mfe (natural) shape str for state 2\n this.rep = null; // reporter site \n this.apt = null; // aptamer site for state2\n this.con = null; // aptamer constraint for state2\n this.pp1 = null; // pairing probabilities for state 1\n this.pp2 = null; // pairing probabilities for state 2 (with bonus)\n this.dp1 = null; // dotplot for state 1\n this.dp2 = null; // dotplot for state 2\n this.changed = true;\n this.got = null;\n this.snippet = '';\n this.viewers = {}; // who to notify of changes\n this.noInterest = function (viewer) { \n delete this.viewers[viewer];\n return this;\n }\n this.addInterest = function (viewer,cb) { \n if (cb) this.viewers[viewer] = cb;\n else delete this.viewers[viewer];\n return this;\n }\n return this;\n}", "function training() {\n jessica();\n kp();\n john();\n }", "DNA(){\n \n }", "function jessica() {\n $log.debug(\"TODO\");\n }", "function BusinessIntelligenceCheck(){}", "function LanguageUnderstandingModel() {\n }", "async myExercisesRoutine() {\n try {\n const myBag = new Routine(null, \"MagicBag\", \"\", false, \"rookie\",\n {id: parseInt(localStorage.getItem(\"magicCategory\"))});\n\n await RoutineApi.createRoutine(myBag);\n\n\n return myBag.id;\n\n } catch (error) {\n console.log(error)\n }\n }", "function repearFirstClassFunction() {\n let years = [1990, 1965, 1937, 2005, 1998];\n\n function arrCalc(arr, fn) {\n let arrResult = [];\n for (let i = 0; i < arr.length; i++)\n arrResult.push(fn(arr[i]));\n return arrResult;\n }\n\n function calculateAge(el) {\n return 2019 - el;\n }\n\n function isFullAge(el) {\n return el >= 18;\n }\n\n function maxHeartRate(el) {\n if (el >= 18 && el <= 81)\n return Math.round(206.9 - (0.67 * el));\n else\n return -1;\n }\n\n let ages = arrCalc(years, calculateAge);\n let fullAges = arrCalc(ages, isFullAge);\n let rates = arrCalc(ages, maxHeartRate);\n console.log(ages, fullAges, rates);\n\n function interviewQuestion(job) {\n if (job === 'designer') {\n return (name) => {\n console.log(name + ', can you please explain what UX design is?');\n }\n } else if (job === 'teacher') {\n return (name) => {\n console.log('What subject do you teach, ' + name + '?');\n }\n } else {\n return (name) => {\n console.log('Hello ' + name + ', what do you do?');\n }\n }\n }\n let teacherQuestion = interviewQuestion('teacher');\n let designerQuestion = interviewQuestion('designer');\n teacherQuestion('John');\n designerQuestion('John');\n interviewQuestion('developer')('Mark');\n}", "function League() {}", "function coursework(cswork)\n {\n let coursework = cswork + tests(80,80)\n\n console.log(coursework)\nreturn coursework\n\n }", "function idiomaingles() {\n alert('Nivel Alto. Título Superior de la Escuela Oficial de Idiomas');\n }", "decideTeams() {\n\n let teams;\n\n // 1. create team arrays\n let numberOfTeams = this.options.numOfTeams;\n if(numberOfTeams === undefined) { // if private\n let teams = new Set();\n for(let [c, data] of this.playersMap) teams.add(data[2] === 0 ? c : data[2]);\n numberOfTeams = teams.size; // number of teams decided by player's choices\n }\n teams = Array.new(numberOfTeams, ()=>[]); // create array of arrays\n\n // 2. distribute players to their respective teams\n if(this.type == 0) { // if public (automatic dist)\n\n let indexes = Array.new(this.playersMap.size, i => i).shuffle();\n indexes.forEach((index, i) => {\n teams[i % teams.length].push(index);\n });\n\n } else { // if private or practice (manual dist)\n\n let teamsIndex = 0;\n let associations = new Map();\n Array.from(this.playersMap).forEach(([c, data], playersIndex) => {\n\n const playersTeam = data[2];\n if(playersTeam === 0) { // if solo\n teams[teamsIndex++].push(playersIndex);\n } else { // if chose team\n if(associations.get(playersTeam) !== undefined) { // if team prev assoc.\n teams[associations.get(playersTeam)].push(playersIndex)\n } else { // if team not prev assoc.\n associations.set(playersTeam, teamsIndex);\n teams[teamsIndex++].push(playersIndex);\n }\n }\n\n });\n\n }\n\n // 3. done\n console.log(teams);\n return teams;\n\n }", "function puzzle_get_unstuck() {\n return {\n id: \"get_unstuck\",\n name: \"Introducing the goto instruction\",\n\n // TODO: add read-only code mirror boxes to the hint\n hint: \n \"<p>\"\n + \"This level introduces you to <strong>a new instruction</strong>: \"\n + \" the \" + keyword(\"goto\") + \" instruction. \"\n + \"</p>\" \n + \"<h3>Example program</h3>\"\n + \"<pre>\"\n + \"start: \" + keyword(\"move\") + \"<br>\"\n + keyword(\"turn right\") + \"<br>\"\n + keyword(\"goto\") + \" start\"\n + \"</pre>\"\n + \"<p>This program tells the robot to:</p>\"\n + \"<ul>\"\n + \"<li>move forward </li>\"\n + \"<li>turn right</li>\"\n + \"<li>move forward again</li>\"\n + \"<li>turn right again</li>\"\n + \"<li>and so on forever...</li>\"\n + \"</ul>\"\n + \"<h3>How it works</h3>\"\n + \"<ul>\"\n + \"<li>The \" + keyword(\"goto\") + \" instruction tells the robot to \"\n + \"execute <strong>another instruction</strong>, instead of \"\n + \"executing the \" \n + \"instruction that comes next.</li>\"\n + \"<li>To use the \" + keyword(\"goto\") + \" instruction you must \"\n + \"give a <strong><i>label</i></strong> to another instruction.\"\n + \"</li>\"\n + \"<li>You give another instruction a <i>label</i> by prefixing \"\n + \"the instruction with a word followed by the ':' symbol.</li>\"\n + \"<li>In this example, \"\n + \"<pre>\"\n + \"sally: \" + keyword(\"move\")\n + \"</pre>\"\n + \"sally is a label for the \" + keyword(\"move\") + \" instruction.\"\n + \"</li>\"\n + \"<li>The label you give for an instruction doesn't really matter. \"\n + \"It can be almost anything.\"\n + \"</li>\"\n + \"<li>\" + learnMoreGoto() + \"</li>\"\n + \"</ul>\"\n\n ,\n win_conditions: [\n {type: WinCondition.COLLECT_COINS}\n ],\n\n // TODO: add a constraint that you can only use 4 move instructions\n constraints: {\n \"max_instructions\": 2,\n },\n\n solutions: [\n \"start: move\\ngoto start\\n\",\n ],\n num_cols: 9,\n num_rows: 7,\n // BUG: this should be programming_bot_id, not index\n programming_bot_index: 0,\n bots : [\n {\n botColor: BotColor.BLUE,\n cellX: 4,\n cellY: 4,\n facing: Direction.UP,\n program: \"start: turn right\\ngoto start\\n\",\n },\n ],\n coins: [\n {x: 4, y: 1},\n {x: 4, y: 0},\n {x: 4, y: 2},\n {x: 4, y: 3},\n {x: 4, y: 5},\n {x: 4, y: 6},\n ],\n blocks: [\n ],\n traps: [\n ]\n }\n}", "mainLogic() {\n this.apexParser = new ApexParser(this.accessModifiers,this.sourceDirectory);\n const filesArray = this.getClassFilesFromPackageDirectories();\n\n //Create a new array of ClassModels\n const classModels = this.getClassModelsFromFiles(filesArray);\n const mapGroupNameToClassGroup = this.createMapGroupNameToClassGroup(classModels, this.sourceDirectory);\n\n const projectDetail = this.fm.parseHTMLFile(this.bannerFilePath);\n const homeContents = this.fm.parseHTMLFile(this.homefilepath);\n this.fm.createDoc(mapGroupNameToClassGroup, classModels, projectDetail, homeContents, this.hostedSourceUrl);\n console.log('ApexDoc has completed!');\n }", "output(solution) {\n this.solutions.push(solution);\n }", "checkSolution()\n {\n return (this.solutionString == this.givenSolutionString);\n }", "function Programmer(name, position, age, language) {\n this.name = name;\n this.position = position;\n this.age = age;\n this.language = language;\n}", "function generateSolution() {\n\n // first check if a solution already exists in local storage - if not, then create a solution. if it does, do not create a new one. Probably should encrypt the solution (advanced).\n if (localStorage.getItem('solution')) {\n //console.log('do not create a new solution');\n } else {\n\n for (var i = 0; i < 4; i++) {\n var randomIndex = getRandomInt(0, letters.length);\n solution += letters[randomIndex]; //same an concatenating strings, assumes empty starting string\n }\n //store in local storage\n localStorage.setItem('solution', solution);\n //console.log(solution);\n }\n }" ]
[ "0.59806323", "0.58940125", "0.5885296", "0.5830168", "0.58198696", "0.5778452", "0.5748896", "0.56812453", "0.56348085", "0.55590916", "0.55420613", "0.54861474", "0.5482463", "0.5444003", "0.54394394", "0.54287624", "0.542163", "0.54115784", "0.5363302", "0.53616554", "0.53596854", "0.53596854", "0.53330743", "0.5331434", "0.53211296", "0.53211296", "0.5309442", "0.5290367", "0.5282045", "0.5267441", "0.5264384", "0.5251951", "0.52499485", "0.5231898", "0.52104", "0.52098185", "0.52071106", "0.52042705", "0.519358", "0.51894104", "0.51894104", "0.51831186", "0.51818985", "0.5178993", "0.51748955", "0.51675725", "0.5156856", "0.5151596", "0.51500756", "0.51446474", "0.51444536", "0.5138465", "0.5136689", "0.5136331", "0.5133112", "0.5126679", "0.51138794", "0.51130307", "0.5102626", "0.5077965", "0.50776666", "0.50758666", "0.5061629", "0.5060117", "0.5047924", "0.503937", "0.50372845", "0.50330687", "0.50299245", "0.5025365", "0.50225997", "0.50219107", "0.5017918", "0.50172484", "0.50110555", "0.5006567", "0.50029814", "0.49928477", "0.4992285", "0.49839118", "0.49822915", "0.4981427", "0.49693012", "0.4964311", "0.4957813", "0.495404", "0.49522126", "0.4949157", "0.49484915", "0.49473152", "0.49445271", "0.49443933", "0.49428883", "0.4932117", "0.49307013", "0.4930368", "0.4930185", "0.49262398", "0.49186534", "0.4915946", "0.4913233" ]
0.0
-1
SubNav allows user to navigate between shopping list and shopping map
render() { return( <nav className = "subNav"> <ul> <li><Link className={this.props.path==='/shopping-list' ? "bold" : null} to="/shopping-list">list</Link></li> <li><Link className={this.props.path==='/shopping-route' ? "bold" : null} to="/shopping-route">route</Link></li> </ul> </nav> ) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleFlashMenu(main, sub) {\n\t\telemParams.currentPage = 0;\n\n\t\tif (locParams.gloPre) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tmain = main-1;\n\t\tfor (var i = 0; i < theSitetree.length && i <= main; i++) {\n\t\t\tif (theSitetree[i][POS_ISNAVIGATION] == 'false')\n\t\t\t\tmain++;\n\t\t}\n\t\tif (theSitetree && main < theSitetree.length) {\n\n\t\t\telemParams.currentPage = main;\n\n\t\t\tif (sub == 0) {\n\t\t\t\t// Kein Untermenu ausgewaehlt\n\t\t\t\tinternalShowPage(theSitetree[main]);\n\t\t\t} else {\n\t\t\t\tsub = sub-1;\n\t\t\t\tvar childpages = theSitetree[main][POS_CHILDS];\n\t\t\t\t//no more existing sub page\n\t\t\t\tif ( sub >= childpages.length) {\n \thandleNonExistingPage();\n }\n\n\t\t\t\tfor (var j = 0; j < childpages.length && j <= sub; j++) {\n\t\t\t\t\tif (childpages[j][POS_ISNAVIGATION] == 'false')\n\t\t\t\t\t\tsub++;\n\t\t\t\t}\n\n\t\t\t\tinternalShowPage(childpages[sub]);\n\t\t\t}\n\t\t} else {\n\t\t\thandleNonExistingPage();\n\t\t}\n\t}", "function _plmNav(navInfo)\r\n{\t\r\n\tif(navInfo!=null)\r\n\t{\r\n\t\tloadWorkArea(navInfo,\"\",\"\",loadNavigationGrid);\r\n\t}\t\r\n}", "setupSubLinks() {\n for (let subLink in this.subLinks) {\n this.subLinks[subLink].addEventListener(\"click\", (e) => {\n let linkID = e.target.id;\n if (linkID === \"\") {\n linkID = e.target.parentNode.id;\n }\n let subViewToShow = linkID.slice(0, -5);\n this.showSubView(subViewToShow);\n });\n }\n }", "function _addNavigation() {}", "mainNav() {}", "function slidingmenu(item){\r\n subnav = document.getElementById('subnav');\r\n switch(item){\r\n\t default:\r\n\t subnav.innerHTML = '';\r\n\t break;\r\n\t \r\n\t case 'mydouban':\r\n\t subnav.innerHTML = '<a href=\"/mine/notes\">日记</a> <a href=\"/mine/photos\">相册</a> <a href=\"/mine/discussions\">评论和讨论</a> <a href=\"/mine/recs\">推荐</a> <a href=\"/mine/miniblogs\">广播</a> <a href=\"/mine/exchange\">二手</a> <a href=\"/mine/board\">留言板</a> ';\r\n\t break;\r\n\t \r\n\t case 'neighbor':\r\n\t subnav.innerHTML ='<a href=\"/contacts/listfriends\">我的朋友</a> <a href=\"/contacts/list\">我关注的人</a> <a href=\"/contacts/find\">找朋友</a> ';\r\n\t break;\r\n\t \r\n\t case 'groups':\r\n\t subnav.innerHTML ='<a href=\"/group/mine\">我的小组</a> <a href=\"/group/my_topics\">我的发言</a> <a href=\"/group/discover\">更多小组</a> ';\r\n\t break;\r\n\t \r\n\t case 'books':\r\n\t subnav.innerHTML ='<a href=\"/book/mine\">我读</a> <a href=\"/book/recommended\">豆瓣猜</a> <a href=\"/book/review/best/\">热评</a> <a href=\"/book/chart\">排行榜</a> <a href=\"/book/browse\">分类浏览</a> ';\r\n\t break;\r\n\t \r\n\t case 'movies':\r\n\t subnav.innerHTML ='<a href=\"/movie/mine\">我看</a> <a href=\"/movie/recommended\">豆瓣猜</a> <a href=\"/movie/review/best/\">热评</a> <a href=\"/movie/chart\">排行榜</a> <a href=\"/movie/browse\">分类浏览</a> <a href=\"/movie/tv\">电视剧</a> ';\r\n\t break;\r\n\t \r\n\t case 'music':\r\n\t subnav.innerHTML ='<a href=\"/music/mine\">我听</a> <a href=\"/music/recommended\">豆瓣猜</a> <a href=\"/music/review/best/\">热评</a> <a href=\"/music/chart\">排行榜</a> <a href=\"/music/browse\">分类浏览</a> ';\r\n\t break;\r\n\t \r\n\t case 'citys':\r\n\t subnav.innerHTML ='<a href=\"/event/mine\">我的活动</a> <a href=\"/event/\">我的城市</a> <a href=\"/event/friends\">友邻的活动</a> <a href=\"/location/world/\">浏览其他城市</a> ';\r\n\t break;\r\n\t}\r\n}", "function subNav_slideToggle() {\n $(this).toggleClass('nav__item--show-sub');\n }", "function lijstSubMenuItem() {\n\n if ($mLess.text() == \"meer\") {\n $mLess.text(\"minder\")\n } else {\n $mLess.text(\"meer\");\n\n }\n $list.toggleClass('hidden')\n $resum.get(0).scrollIntoView('slow');\n event.preventDefault()\n }", "function setupNav() {\n Alloy.Globals.Menu.setTitle(\"Task Gallery\");\n Alloy.Globals.Menu.setColor(\"#aaa\");\n\n // Add menu\n Alloy.Globals.Menu.setButton({\n button: 'l1',\n image : \"/images/navigation/ic_chevron_left_white_48dp.png\",\n success: function() {\n log.debug('[Gallery] : Redirecting to Detail Page');\n Alloy.Globals.Menu.setMainContent('TodoListDetail', {todo_id: todoItem.get('todo_id')});\n //Alloy.Globals.Menu.goBack();\n }\n });\n\n Alloy.Globals.Menu.setButton({\n button: 'r2',\n image: \"/images/action/ic_search_white_48dp.png\",\n success: function() {\n if ($.search.height == 0) {\n $.search.height = 44;\n } else {\n $.search.height = 0;\n }\n\n }\n });\n\n Alloy.Globals.Menu.setButton({\n button: 'r1',\n image: \"/images/action/ic_add_white_48dp.png\",\n success: function() {\n require('Camera').promptGalleryOrCamera();\n }\n });\n\n Alloy.Globals.Menu.showButton('r1');\n Alloy.Globals.Menu.hideButton('r2');\n Alloy.Globals.Menu.showButton('l1');\n}", "function setupPageNavs () {\n\t\t// For any nested list items, wrap the link text in a span so that we can put a border under the text on hover.\n\t\t$mobilemenu.find(\".ibm-mobilemenu-section li li a\").wrapInner(\"<span>\");\n\n\t\tIBM.common.util.a11y.makeTreeAccessible({\n\t\t\tel: $mobilemenu.find(\".ibm-mobilemenu-pagenav > ul\")\n\t\t});\n\t}", "function toggleSubNav (listObjID, linkObj) {\n var listObj = document.getElementById(listObjID);\n // If sub nav items are hidden, show them\n if (listObj.style.display === \"none\") {\n listObj.style.display = \"block\";\n linkObj.querySelector(\".expandPlusSign\").style.display = \"none\";\n linkObj.querySelector(\".collapseMinusSign\").style.display = \"inline-block\";\n linkObj.querySelector(\".grayArrowLine\").style.display = \"block\";\n linkObj.setAttribute(\"aria-expanded\", true);\n }\n // If sub nav items are shown, hide them\n else {\n listObj.style.display = \"none\";\n linkObj.querySelector(\".expandPlusSign\").style.display = \"inline-block\";\n linkObj.querySelector(\".collapseMinusSign\").style.display = \"none\";\n linkObj.querySelector(\".grayArrowLine\").style.display = \"none\";\n linkObj.setAttribute(\"aria-expanded\", false);\n }\n}", "getPrimaryNavigation() {\r\n const { classes } = this.props;\r\n return (\r\n <List subheader={\r\n <ListSubheader\r\n className={classes.subheader}\r\n style={{\r\n position: 'unset'\r\n }}\r\n >\r\n Monitor\r\n </ListSubheader>\r\n }>\r\n <Divider />\r\n {this.NavigationListItem({\r\n title: 'Alerts',\r\n route: '/alerts',\r\n icon: <MoveToInboxIcon />\r\n })}\r\n {this.NavigationListItem({\r\n title: 'Schedule',\r\n route: '/schedule',\r\n icon: <SendIcon />\r\n })}\r\n {this.NavigationListItem({\r\n title: 'Products',\r\n route: '/products',\r\n icon: <FolderIcon />\r\n })}\r\n {this.NavigationListItem({\r\n title: 'Event Log',\r\n route: '/eventlog',\r\n icon: <InfoIcon />\r\n })}\r\n {this.NavigationListItem({\r\n title: 'Settings',\r\n route: '/settings',\r\n icon: <SettingsIcon />\r\n })}\r\n </List>\r\n );\r\n }", "function subNav_slideDown() {\n $(this).addClass('nav__item--show-sub');\n }", "function Navigation2() {\n return (\n <div>\n <div id=\"nav\">\n \n <Navbar className=\"color-nav\" variant=\"light\">\n <div className=\"mininav\">\n <Nav>\n <Link to={\"products\"}>\n <div className=\"shopbutton\">\n <Button\n variant=\"outline-success\"\n size=\"sm\"\n style={{ width: \"100%\", height: \"100%\" }}\n >\n <b>Shop</b>\n </Button>\n </div>\n </Link>\n <div className=\"checkbutton\">\n \n <Customs/>\n \n </div>\n \n </Nav>\n </div>\n </Navbar>\n </div>\n </div>\n );\n}", "function buildMapNav() {\n var $list = $('#mapNav');\n $list.find('li').remove();\n\n var manager = managerData[currentManager];\n for (j = Math.min(10, manager.locations.length) - 1; j >= 0; j--) {\n var location = manager.locations[j];\n $list.prepend('<li onclick=\"setCurrentLocation(' + j + ')\">' + location.suburb + ', ' + location.state + '</li>');\n }\n }", "function setupNav() {\n setupPageSelector();\n setupRecipeSelector();\n}", "render() {\n\n return (\n <div className=\"settings-subnav\">\n <Tabs.Tabs className=\"grid-one\">\n <Tabs.Tab label=\"General\">\n <section className=\"grid-one\">\n <div className=\"grid-item\"><BasicCard/></div>\n <div className=\"grid-item\"><BasicCard/></div>\n <div className=\"grid-item\"><Toggle label=\"Toggle Stuff\" defaultToggled={true}/></div>\n </section>\n </Tabs.Tab>\n <Tabs.Tab label=\"Design\" >\n </Tabs.Tab>\n <Tabs.Tab label=\"Modules\" />\n <Tabs.Tab label=\"Notify\" />\n <Tabs.Tab label=\"Priveleges\" />\n </Tabs.Tabs>\n </div>\n // <DropDownMenu menuItems={menuItems} onChange={this.transitionToRoute} />\n );\n }", "openMap(route) {\n this.nav.push(Map, {route: route});\n }", "function navAllStories(evt) {\n console.debug(\"navAllStories\");\n hidePageComponents();\n putStoriesOnPage();\n // addStarToStories();\n}", "function navAllStories(evt) {\n hidePageComponents();\n putStoriesOnPage();\n}", "function globalNavOpen() {\n openNav(navBtn);\n openNav(navMenu);\n}", "function DisplayNav() {\n switch (userInfo.accountType) {\n case 'E':\n return (<EmpNav />)\n\n case 'U':\n return (<UserNav />)\n\n default:\n return (<VisitNav />)\n }\n }", "function navAllStories (evt) {\n\tconsole.debug('navAllStories', evt);\n\thidePageComponents(); // located in main.js\n\tputStoriesOnPage(); // located in stories.js\n\tupdateNavOnLogin();\n}", "function sb_writeSubsectionNav () {\n\tvar sHTML = \"\";\n\tvar currentLocation = location.href;\n\tcurrentLocation = currentLocation.slice(currentLocation.lastIndexOf(\"/\")+1);\n\tcurrentSection = -1;\n\tcurrentIndex = -1;\n\t\n\t//alert(\"currentIndex = \"+currentIndex);\n\t\n\tfor (i=0; (i<subsection.length) && (currentSection < 0); i++) {\n\t\tfor (j=0; (j<subsection[i].length) && (currentIndex < 0); j++) {\n\t\t\tif (subsection[i][j].indexOf(currentLocation) != -1) {\n\t\t\t\t//alert (\"index found at \"+j+\" - \"+i);\n\t\t\t\tcurrentIndex = j;\n\t\t\t\tcurrentSection = i;\n\t\t\t}\n\t\t}\n\t}\n\t\n\tsHTML += \"<table border=\\\"0\\\" cellspacing=\\\"0\\\" cellpadding=\\\"0\\\">\";\n\tsHTML += \"<tr>\";\n\tsHTML += \"<td><img src=\\\"/site_images/s.gif\\\" width=\\\"1\\\" height=\\\"10\\\" alt=\\\"\\\"/></td>\"\n\tsHTML += \"<td align=\\\"center\\\" valign=\\\"middle\\\" class=\\\"prevNext\\\" height=\\\"10\\\" nowrap>\";\n\t\n\tif ((currentIndex-1) < 0) {\n\t\tsHTML += \"<img src=\\\"/site_images/s.gif\\\" width=\\\"2\\\" height=\\\"1\\\" alt=\\\"\\\" /><span class=\\\"prevNextArrow\\\">&lt;</span><img src=\\\"/site_images/s.gif\\\" width=\\\"5\\\" height=\\\"1\\\" alt=\\\"\\\" />\" + prevText ;\n\t} else {\n\t\tsHTML += \"<img src=\\\"/site_images/s.gif\\\" width=\\\"2\\\" height=\\\"1\\\" alt=\\\"\\\" /><span class=\\\"prevNextArrow\\\">&lt;</span><img src=\\\"/site_images/s.gif\\\" width=\\\"5\\\" height=\\\"1\\\" alt=\\\"\\\" /><a href=\\\"\" + subsection[currentSection][currentIndex-1] + \"\\\" class=\\\"prevNextLink\\\">\" + prevText + \"</a>\";\n\t}\n\t\n\tif (subsectionIndex == \"\") {\n\t\tsHTML += \"<img src=\\\"/site_images/s.gif\\\" width=\\\"4\\\" height=\\\"1\\\" alt=\\\"\\\" />|<img src=\\\"/site_images/s.gif\\\" width=\\\"5\\\" height=\\\"1\\\" alt=\\\"\\\" />\";\n\t\tsHTML += \"Index\";\n\t\tsHTML += \"<img src=\\\"/site_images/s.gif\\\" width=\\\"4\\\" height=\\\"1\\\" alt=\\\"\\\" />|<img src=\\\"/site_images/s.gif\\\" width=\\\"5\\\" height=\\\"1\\\" alt=\\\"\\\" />\";\n\t} else {\n\t\tsHTML += \"<img src=\\\"/site_images/s.gif\\\" width=\\\"4\\\" height=\\\"1\\\" alt=\\\"\\\" />|<img src=\\\"/site_images/s.gif\\\" width=\\\"5\\\" height=\\\"1\\\" alt=\\\"\\\" />\";\n\t\tsHTML += \"<a href=\\\"\" + subsectionIndex + \"\\\" class=\\\"prevNextLink\\\">\" + indexText + \"</a>\";\n\t\tsHTML += \"<img src=\\\"/site_images/s.gif\\\" width=\\\"4\\\" height=\\\"1\\\" alt=\\\"\\\" />|<img src=\\\"/site_images/s.gif\\\" width=\\\"5\\\" height=\\\"1\\\" alt=\\\"\\\" />\";\n\t}\n\n\tif ( (currentIndex < 0) || (currentIndex > (subsection[currentSection].length - 2)) ) {\t\n\t\tsHTML += nextText + \"<img src=\\\"/site_images/s.gif\\\" width=\\\"4\\\" height=\\\"1\\\" alt=\\\"\\\" /><span class=\\\"prevNextArrow\\\">&gt;</span><img src=\\\"/site_images/s.gif\\\" width=\\\"3\\\" height=\\\"1\\\" alt=\\\"\\\" />\";\n\t} else {\n\t\tsHTML += \"<a href=\\\"\" + subsection[currentSection][currentIndex+1] + \"\\\" class=\\\"prevNextLink\\\">\" + nextText + \"</a><img src=\\\"/site_images/s.gif\\\" width=\\\"4\\\" height=\\\"1\\\" alt=\\\"\\\" /><span class=\\\"prevNextArrow\\\">&gt;</span><img src=\\\"/site_images/s.gif\\\" width=\\\"3\\\" height=\\\"1\\\" alt=\\\"\\\" />\";\n\t}\t\n\tsHTML += \"</td>\";\n\tsHTML += \"</tr>\";\n\tsHTML += \"</table>\";\n\n\t//alert(sHTML);\n\tdocument.write(sHTML);\n}", "function returnSubNav(items) {\n var subMenu = '';\n\n // Function to generate submenu html\n // Defined inside here so it can access submenu variable\n function generateSubNav(item, i, array) {\n\n // Create new list item\n var subItem = document.createElement('Li');\n\n // Set the new list items attributes\n subItem.setAttribute('class', 'navitem secondary');\n subItem.setAttribute('role', 'menuitem');\n subItem.setAttribute('tabindex', '-1');\n\n // Create new link element with item url\n var a = document.createElement('a');\n a.setAttribute('href', item.url);\n\n // Add item label as the text\n a.appendChild(document.createTextNode(item.label));\n\n // Add event listener to a to hide menu card when clicked and navigating to new page\n a.onclick = function() {\n if (isMobile()) {\n console.log('is mobile');\n toggleNavbar();\n }\n };\n\n // Add the link to the new list item\n subItem.appendChild(a);\n\n // Append subItem to subMenu\n subMenu.appendChild(subItem);\n }\n\n // Double check if items exists. Generate the submenu html if so.\n if (items) {\n // Create the ul element\n subMenu = document.createElement('Ul');\n subMenu.setAttribute('class', 'navdropdown');\n subMenu.setAttribute('role', 'menu');\n subMenu.setAttribute('aria-hidden', 'true');\n\n // Populate that ul element with list items\n items.forEach(generateSubNav);\n }\n\n return subMenu;\n}", "function MapStoresHome() {\n MapStoreArray = [];\n StoreLocatorScreen.MapScreen.locationData = MapStoreArray;\n StoreLocatorScreen.SearchTextfield.text = \"\";\n catid = \"cat00000\";\n count = 0;\n getCategeoryData();\n BreadCrumbText = [];\n HomeScreen.LblBreadcrumb.text = kony.i18n.getLocalizedString(\"Home\");\n HomeScreen.BaseHeader.FlexBack.isVisible = false;\n HomeScreen.show();\n}", "function setupPublicNavigation() {\n Navigation.clear();\n Navigation.breadcrumbs.add('Openings', '#!/openings', '#!/openings'); // add a breadcrumb\n Navigation.viewTitle.set('View Opening');\n }", "function navAllStories(evt) {\n console.debug(\"navAllStories\", evt);\n hidePageComponents();\n putStoriesOnPage();\n}", "function navAllStories(evt) {\n console.debug(\"navAllStories\", evt);\n hidePageComponents();\n putStoriesOnPage();\n}", "function currentSubunit()\n {\n var m = my.current.unitNo\n var n = my.current.subunitNo\n\n window.location.href = unitHref(m, n)\n }", "bindEvents () {\r\n this.subnav.forEach((item) => {\r\n item.addEventListener(\"click\", (e) => {\r\n e.stopPropagation();\r\n const selector = this.slugify(item.childNodes[ 0 ].data);\r\n const currTarget = e.currentTarget;\r\n let target = this.parent.querySelector(`#${selector}`);\r\n\r\n if (target) {\r\n this.currentFolder = selector;\r\n this.subnavContainer.classList.toggle(\"active\");\r\n this.currentIndex = this.findSubnavIndex(currTarget);\r\n\r\n this.toggleActiveSubnav(this.currentIndex);\r\n this.toggleActivePages(target);\r\n history.pushState({\r\n selector: `#${selector}`,\r\n index: this.currentIndex\r\n }, null, `/portal?page=${selector}&index=${this.currentIndex}`);\r\n } else {\r\n if (window.innerWidth < 881) {\r\n this.subnavContainer.classList.toggle(\"active\");\r\n }\r\n target = this.parent.querySelector(`#${this.currentFolder}-${selector}`);\r\n this.toggleActivePages(target);\r\n history.pushState({\r\n selector: `#${this.currentFolder}-${selector}`,\r\n index: this.currentIndex\r\n }, null, `/portal?page=${this.currentFolder}-${selector}&index=${this.currentIndex}`);\r\n }\r\n window.scrollTo(0, 0);\r\n });\r\n });\r\n this.subnavMobileToggle.addEventListener(\"click\", () => {\r\n this.subnavContainer.classList.toggle(\"active\");\r\n });\r\n window.addEventListener(\"popstate\", (e) => {\r\n if (e.state) {\r\n events.emit(\"url-change\", { state: e.state });\r\n } else {\r\n history.back();\r\n }\r\n });\r\n }", "constructor(modalService, route, activeRoute, auth, userService) {\n this.modalService = modalService;\n this.route = route;\n this.activeRoute = activeRoute;\n this.auth = auth;\n this.userService = userService;\n this.showMenu = \"\";\n this.showSubMenu = \"\";\n this.sidebarnavItems = [\n {\n path: \"/service\",\n title: \"Dịch vụ tiện ích\",\n icon: \"icon-Car-Wheel\",\n class: \"\",\n extralink: false,\n submenu: [\n {\n path: \"/service/trading-topup\",\n title: \"Nạp tiền điện thoại\",\n icon: \"\",\n class: \"\",\n extralink: false,\n submenu: [],\n },\n {\n path: \"/service/order\",\n title: \"Mua mã thẻ\",\n icon: \"\",\n class: \"\",\n extralink: false,\n submenu: [],\n },\n {\n path: \"/service/recharge\",\n title: \"Đơn nạp tiền\",\n icon: \"\",\n class: \"\",\n extralink: false,\n submenu: [],\n },\n ],\n },\n ];\n this.fullName = \"\";\n this.checkImportCard = false;\n this.avatarUrl = \"assets/images/no-user-icon.png\";\n }", "function navigationClicks()\n{\n navigationBar.addEventListener('click',function(eventInfo)\n {\n var findSection=document.getElementById(eventInfo.target.dataset.nav);\n findSection.scrollIntoView();\n\n\n\n });\n}", "function updateNavigationLinks()\n {\n if (currentSubunitIsTheFirstSubunit()) {\n my.html.previousLink.style.visibility = 'hidden'\n my.html.nextLink.style.visibility = 'visible'\n } else if (currentSubunitIsTheLastSubunit()) {\n my.html.previousLink.style.visibility = 'visible'\n my.html.nextLink.style.visibility = 'hidden'\n } else {\n my.html.previousLink.style.visibility = 'visible'\n my.html.nextLink.style.visibility = 'visible'\n }\n }", "function showSubpages(subpage1, subpage2, subpage3, subpage4, subpage5, subpage6) {\n var subpages = [subpage1, subpage2, subpage3, subpage4, subpage5, subpage6];\n var i = 0;\n var x;\n for(var i = 0; i < subpages.length; i++) {\n if(subpages[i] == null) {\n break;\n }\n x = document.getElementById(subpages[i]);\n if (x.className === \"subpage-button\") {\n x.className += \" open\";\n }\n else {\n x.className = \"subpage-button\";\n }\n }\n}", "function shop() {\n\tshowCategoriesList();\n}", "function OsNavAdditionInfo() {\r\n $('.os-menu a[href=\"#\"]').on('click', function (event) {\r\n event.preventDefault();\r\n });\r\n $('.os-menu li').has('ul').addClass('li-node').parent().addClass('ul-node');\r\n //$('.os-menu .mega-menu:not(.menu-fullwidth)').parent().css('position', 'relative')\r\n }", "function toggleMobileSubnav(e) {\n var clicked = e.currentTarget.parentElement;\n var current = document.querySelectorAll(\".is-open\");\n\n if (clicked.classList.contains(\"is-open\")) {\n clicked.classList.remove(\"is-open\");\n } else if (current.length) {\n current[0].classList.remove(\"is-open\");\n clicked.classList.add(\"is-open\");\n } else {\n clicked.classList.add(\"is-open\");\n }\n e.preventDefault();\n e.stopPropagation();\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 renderSubLinks(){\n if(sublinks.length === 0){\n return null;\n }\n else{\n return(\n <React.Fragment>\n <div className=\"side-menu-links\">\n <SideMenu sublinks={sublinks}/>\n </div>\n <hr/>\n </React.Fragment>\n );\n }\n }", "function initNavShopDropdown() {\n\tvar shop = $('.shop');\n\n\tif ( shop.length == 0 ) return;\n\n\tvar lis = $( '.navigation-bottom-shop li');\n\n\tlis.hover(\n\t\tfunction() {\n\t\t\tvar nav = $( this ).find('.navigation-inner-dropdown');\n\t\t\tnav.stop().slideDown();\n\t\t},\n\t\tfunction() {\n\t\t\tvar nav = $( this ).find('.navigation-inner-dropdown');\n\t\t\tnav.stop().slideUp();\n\t\t}\n\t);\n}", "function navAllStories(evt) {\n\tconsole.debug('navAllStories', evt);\n\thidePageComponents();\n\tputStoriesOnPage();\n}", "function createSubNavigation() {\n\tvar yearSelect = g_year_html; // defined in init.js\n\n\tif (g_data_type == 'hhr') {\n\t\tvar limitSelect = '<table><tr><td class=\"right\">Begrenzen nach <select size=\"1\" name=\"nav_limit_by\"><option value=\"7\" selected=\"selected\">Ist-Betrag</option><option value=\"8\">Haushaltsbetrag</option><option value=\"9\">Differenz</option><option value=\"10\">Rechnung-Ist</option><option value=\"11\">Gesamtsoll</option><option value=\"12\">mehr/weniger</option></select></td></tr><tr><td class=\"right\">ab Betrag <input type=\"text\" size=\"10\" name=\"nav_limit_from\" value=\"\"/></td></tr></table>';\n\t\tvar typeSelect = '';\n\t} else if (g_data_type == 'zr') {\n\t\tvar limitSelect = '<table><tr><td class=\"right\">Auswertung nach Ist-Betrag</td></tr><tr><td class=\"left\">ab Betrag <input type=\"text\" size=\"10\" name=\"nav_limit_from\" value=\"\"/></td></tr></table>';\n\t\tvar typeSelect = '';\n\t} else {\n\t\tvar limitSelect = '<table><tr><td class=\"right\">Begrenzen nach <select size=\"1\" name=\"nav_limit_by\" id=\"nav_limit_by\"><option value=\"7\" selected=\"selected\">Ansatz Neu</option><option value=\"8\">Ansatz Alt</option><option value=\"9\">Differenz</option><option value=\"11\">Ist</option></select></td></tr><tr><td class=\"right\">ab Betrag <input type=\"text\" size=\"10\" name=\"nav_limit_from\" value=\"\"/></td></tr></table>';\n\t\tvar typeSelect = 'Typ <select size=\"1\" name=\"type_limit\" onchange=\"onChangeType(this.value)\"><option value=\"TIT\">TIT</option><option value=\"VE\">VE</option></select>';\n\t}\n\n\tvar showOptions = '<table><tr><td><input type=\"radio\" name=\"nav_show\" value=\"1\"/> mit Detailzeilen</td></tr><tr><td><input type=\"radio\" name=\"nav_show\" value=\"2\" checked=\"checked\"/> nur Summenzeilen</td></tr></table>';\n\n\treturn '<div id=\"subnavigation\"><table><tr><td class=\"year\">' + yearSelect + '</td><td>' + limitSelect + '</td><td>' + typeSelect + '</td><td>' + showOptions + '</td></tr></table></div>';\n}", "function clickOnNav() {\n\t\t//click nav event\n\t\t$('.nav-icon, .left-menu').click(function(){\n\t\t\t//when menu is open\n\t\t\tif ($(this).hasClass('active')) {\n\t\t\t\tcloseSubNav();\n\t\t\t} else {\n\t\t\t//when menu is closed\n\t\t\t\topenSubNav($(this));\n\t\t\t}\n\t\t});\n\t}", "function ConfigurationSubPage() {\r\n\tif(!Form.checkCurrentMode(0, true)) return;\r\n\tForm.addForm();\r\n\tForm.all_or_this = 0;\t// all ****** pages\r\n\tForm.main_or_sub = 1;\t// sub pages\r\n\tForm.option_check = false;\r\n\tLoadCurrentConf();\r\n\tSetCurrentConf();\r\n\tForm.option_check = true;\r\n\tForm.openForm();\r\n}", "navToOverview() {\n\t\tthis.props.history.push(\"/overview\");\n\t}", "function openMainMenu(loginInfoValue, sectionStateValue, extensionValue) {\n let loginInfo = loginInfoValue;\n let sectionState = sectionStateValue;\n let extension = extensionValue;\n // the current value of the menu toggle icon \n let currentToggle = document.getElementById('link-toggle').innerHTML;\n\n // toggle the login info status - remove\n if (loginInfo === 'yes') {\n toggleLoginInfo('none');\n\n }\n \n // remove current section state from the section-nav parent class name\n document.querySelector('.section-nav').classList.remove(sectionState);\n\n // add the menu extension to section-nav parent\n document.querySelector('.section-nav').classList.add(extension);\n\n /** These need to happen at the same time to keep the nav elements still \n - Change toggle\n - Change active\n */\n changeToggleValue(currentToggle);\n setDisplayArray(displayArray); // Get the list of current display\n \n displayArray.forEach(addActive); // Add 'active' to the classnames\n\n}", "function addSubMenus(parentItem, isSubTree) { var submenuHtml = \"\"; if (parentItem.items != undefined && parentItem.items.length > 0) { if (parentItem.type == \"link-list-image\") { submenuHtml += \"<ul class=\\\"mm-product-list\\\">\"; jQueryBuddha.each(parentItem.items, function (pos, subitem) { var href = (subitem.id != undefined && schemaLinksJSON[subitem.link] && schemaLinksJSON[subitem.link][subitem.id]) ? schemaLinksJSON[subitem.link][subitem.id] : schemaLinksJSON[subitem.link]; var useOnClick = \"\"; if (window.self == window.top || (window.self !== window.top && window.name == \"mega-menu-iframe\")) { useOnClick = \"onclick=\\\"return mmGoToPage(this)\\\"\"; } if (subitem.link == \"product\" || subitem.link == \"collection\" || subitem.link == \"article\") { var image = \"\"; if (subitem.link == \"product\" && productImages[subitem.id] != undefined && productImages[subitem.id].indexOf(\"no-image\") == -1) { image = \"<div class=\\\"mm-list-image\\\"><a data-href=\\\"\" + href + \"\\\" href=\\\"\" + href + \"\\\" \" + useOnClick + \"\\\"><img src=\\\"\" + productImages[subitem.id] + \"\\\"></a></div>\"; } else if (subitem.link == \"collection\" && collectionImages[subitem.id] != undefined && collectionImages[subitem.id].indexOf(\"no-image\") == -1) { image = \"<div class=\\\"mm-list-image\\\"><a data-href=\\\"\" + href + \"\\\" href=\\\"\" + href + \"\\\" \" + useOnClick + \"\\\"><img src=\\\"\" + collectionImages[subitem.id] + \"\\\"></a></div>\"; \"<div class=\\\"mm-list-image\\\"><img src=\\\"\" + collectionImages[subitem.id] + \"\\\"></div>\"; } else if (subitem.image != undefined) { if (subitem.link == \"article\" && subitem.image.indexOf(\"/articles/\") !== -1 && subitem.image.indexOf(\"_240x\") == -1) { subitem.image = subitem.image.replace(\".jpg\", \"_240x.jpg\").replace(\".png\", \"_240x.png\"); } image = \"<div class=\\\"mm-list-image\\\"><a data-href=\\\"\" + href + \"\\\" href=\\\"\" + href + \"\\\" \" + useOnClick + \"\\\"><img src=\\\"\" + subitem.image + \"\\\"></a></div>\"; } else { image = \"<div class=\\\"mm-list-image\\\"></div>\"; } var listInfo = \"\"; if (jQueryBuddha.trim(subitem.name) != \"\") { listInfo = \"<div class=\\\"mm-list-info\\\"><a data-href=\\\"\" + href + \"\\\" class=\\\"mm-product-name\\\" href=\\\"\" + href + \"\\\">\" + subitem.name.replace(/&quot;/g, '\"') + \"</a><br>\"; } if (subitem.link == \"product\" && subitem.id != undefined && prices[subitem.id] != undefined) { listInfo += \"<div class=\\\"mega-menu-prices\\\">\" + prices[subitem.id] + \"</div>\"; } submenuHtml += \"<li>\" + image + listInfo + \"</div>\"; } submenuHtml += \"</li>\"; }); submenuHtml += \"</ul>\"; } else { var subMenuType = (parentItem.type != undefined) ? \" \" + parentItem.type : \"\"; submenuHtml += \"<ul class=\\\"mm-submenu\" + subMenuType + \"\\\">\"; jQueryBuddha.each(parentItem.items, function (pos, subitem) { if (subitem.link == \"no-link\") { var dataHref = \"no-link\"; var href = \"#\"; } else if (subitem.link == \"http\") { var dataHref = subitem.http; var href = subitem.http; } else { var dataHref = (subitem.id != undefined && schemaLinksJSON[subitem.link] && schemaLinksJSON[subitem.link][subitem.id]) ? schemaLinksJSON[subitem.link][subitem.id] : schemaLinksJSON[subitem.link]; var href = (subitem.id != undefined && schemaLinksJSON[subitem.link] && schemaLinksJSON[subitem.link][subitem.id]) ? schemaLinksJSON[subitem.link][subitem.id] : schemaLinksJSON[subitem.link]; } var useOnClick = \"\"; if (window.self == window.top || (window.self !== window.top && window.name == \"mega-menu-iframe\")) { useOnClick = \"onclick=\\\"return mmGoToPage(this)\\\"\"; } if (parentItem.type == \"simple\") { if (subitem.link == \"best-sellers\") { submenuHtml += \"<li><div class=\\\"mega-menu-item-container\\\"><div class=\\\"mm-list-name\\\"><span>\" + subitem.name.replace(/&quot;/g, '\"') + \"</span></div>\" + bestSellersHTML + \"</div>\"; } else if (subitem.link == \"newest-products\") { submenuHtml += \"<li><div class=\\\"mega-menu-item-container\\\"><div class=\\\"mm-list-name\\\"><span>\" + subitem.name.replace(/&quot;/g, '\"') + \"</span></div>\" + newestProductsHTML + \"</div>\"; } else if (subitem.link == \"link-list\") { subitem.type = \"link-list\"; var linkList = addSubMenus(subitem); submenuHtml += \"<li><div class=\\\"mega-menu-item-container\\\"><div class=\\\"mm-list-name\\\"><span>\" + subitem.name.replace(/&quot;/g, '\"') + \"</span></div>\" + linkList + \"</div>\"; } else if (subitem.link == \"link-list-image\") { subitem.type = \"link-list-image\"; var linkListImage = addSubMenus(subitem); submenuHtml += \"<li><div class=\\\"mega-menu-item-container\\\"><div class=\\\"mm-list-name\\\"><span class=\\\"name\\\">\" + subitem.name.replace(/&quot;/g, '\"') + \"</span></div>\" + linkListImage + \"</div>\"; } else { var image = \"\"; if (subitem.link == \"product\" && productImages[subitem.id] != undefined && productImages[subitem.id].indexOf(\"no-image\") == -1) { image = \"<div class=\\\"mm-image-container\\\"><div class=\\\"mm-image\\\"><a data-href=\\\"\" + dataHref + \"\\\" href=\\\"\" + href + \"\\\" \" + useOnClick + \" aria-label=\\\"\" + jQueryBuddha(\"<div/>\").html(subitem.name.replace(/&quot;/g, '\"')).text() + \"\\\"><img src=\\\"\" + productImages[subitem.id] + \"\\\"></a></div></div>\"; } else if (subitem.link == \"collection\" && collectionImages[subitem.id] != undefined && collectionImages[subitem.id].indexOf(\"no-image\") == -1) { image = \"<div class=\\\"mm-image-container\\\"><div class=\\\"mm-image\\\"><a data-href=\\\"\" + dataHref + \"\\\" href=\\\"\" + href + \"\\\" \" + useOnClick + \" aria-label=\\\"\" + jQueryBuddha(\"<div/>\").html(subitem.name.replace(/&quot;/g, '\"')).text() + \"\\\"><img src=\\\"\" + collectionImages[subitem.id] + \"\\\"></a></div></div>\"; } else if (subitem.image != undefined) { if (subitem.link == \"article\" && subitem.image.indexOf(\"/articles/\") !== -1 && subitem.image.indexOf(\"_240x\") == -1) { subitem.image = subitem.image.replace(\".jpg\", \"_240x.jpg\").replace(\".png\", \"_240x.png\"); } image = \"<div class=\\\"mm-image-container\\\"><div class=\\\"mm-image\\\"><a data-href=\\\"\" + dataHref + \"\\\" href=\\\"\" + href + \"\\\" \" + useOnClick + \" aria-label=\\\"\" + jQueryBuddha(\"<div/>\").html(subitem.name.replace(/&quot;/g, '\"')).text() + \"\\\"><img src=\\\"\" + subitem.image + \"\\\"></a></div></div>\"; } var pricesHTML = \"\"; if (subitem.link == \"product\" && subitem.id != undefined && prices[subitem.id] != undefined) { pricesHTML = \"<div class=\\\"mega-menu-prices\\\">\" + prices[subitem.id] + \"</div>\"; } var nameHtml = \"\"; if (jQueryBuddha.trim(subitem.name) != \"\") { nameHtml += \"<a class=\\\"mm-featured-title\\\" data-href=\\\"\" + dataHref + \"\\\" href=\\\"\" + href + \"\\\" \" + useOnClick + \" aria-label=\\\"\" + jQueryBuddha(\"<div/>\").html(subitem.name.replace(/&quot;/g, '\"')).text() + \"\\\">\" + subitem.name.replace(/&quot;/g, '\"') + \"</a>\"; } submenuHtml += \"<li><div class=\\\"mega-menu-item-container\\\">\" + image + nameHtml + pricesHTML + \"</div>\"; } } else if (parentItem.type == \"tree\" || isSubTree) { submenuHtml += \"<li data-href=\\\"\" + dataHref + \"\\\" \" + useOnClick + \"><a data-href=\\\"\" + dataHref + \"\\\" href=\\\"\" + href + \"\\\" \" + useOnClick + \" aria-label=\\\"\" + jQueryBuddha(\"<div/>\").html(subitem.name.replace(/&quot;/g, '\"')).text() + \"\\\">\" + subitem.name.replace(/&quot;/g, '\"') + \"</a>\"; } else { submenuHtml += \"<li><a data-href=\\\"\" + dataHref + \"\\\" href=\\\"\" + href + \"\\\" \" + useOnClick + \" aria-label=\\\"\" + jQueryBuddha(\"<div/>\").html(subitem.name.replace(/&quot;/g, '\"')).text() + \"\\\">\" + subitem.name.replace(/&quot;/g, '\"') + \"</a>\"; } /* set the simple menu type for each tab child */ if (parentItem.type == \"tabbed\") { subitem.type = \"simple\"; } if (subitem.link != \"link-list\" && subitem.link != \"link-list-image\") { if (parentItem.type == \"tree\" || isSubTree) { submenuHtml += addSubMenus(subitem, true); } else { submenuHtml += addSubMenus(subitem, false); } } submenuHtml += \"</li>\"; }); submenuHtml += \"</ul>\"; } } return submenuHtml; }", "function toggleNavBar () {\n $('#navigatorbar').toggleClass('show');\n $('.sub-nav').toggleClass('show');\n $('#thumbnail').removeClass('active');\n }", "getUserNavigation() {\r\n const { classes } = this.props;\r\n return (\r\n <List subheader={\r\n <ListSubheader\r\n className={classes.subheader}\r\n style={{\r\n position: 'unset'\r\n }}\r\n >User Account</ListSubheader>\r\n }>\r\n <Divider />\r\n {this.NavigationListItem({\r\n title: 'User Profile',\r\n route: '/profile',\r\n icon: <SettingsIcon />\r\n })}\r\n {this.NavigationListItem({\r\n title: 'Log Out',\r\n route: '/logout',\r\n icon: <SubdirectoryArrowRightIcon />\r\n })}\r\n </List>\r\n );\r\n }", "function MAIN_NAVIGATION$static_(){ToolbarSkin.MAIN_NAVIGATION=( new ToolbarSkin(\"main-navigation\"));}", "function subNavController($scope, $location) {\n $scope.isActive = function (viewLocation) {\n return viewLocation === $location.path();\n };\n}", "function NavItems(props) {\r\n\r\n // states for drop down menu\r\n const [open, setOpen] = useState(false);\r\n\r\n // Drop down menu switch\r\n const openTab = () => setOpen(!open); \r\n\r\n // Case 1: The admin navigation item\r\n if(props.admin === true)\r\n {\r\n return (\r\n <li className=\"navItem\">\r\n <Link to=\"/admin\" className=\"navButton\" onClick={openTab}>\r\n <RemixIcons.RiAdminLine size=\"32\"/> \r\n \r\n {open && props.children}\r\n </Link>\r\n </li>\r\n );\r\n }\r\n\r\n // Case 2: Other admin navigation item\r\n else {\r\n return (\r\n <li className=\"navItem\">\r\n <Link to={props.path || '/#'} className=\"navButton\" onClick={openTab}>\r\n <props.icon size=\"32\"/> \r\n \r\n {open && props.children}\r\n </Link>\r\n </li>\r\n );\r\n }\r\n \r\n}", "function openNav() {\n\t\n\tvar html=\"\";\n\n\n\tStore.treeIterate(function(node){\n\t\thtml+='<li class=\"list-group-item node-treeview4\" data-nodeid=\"0\" style=\"color:undefined;background-color:undefined;\" data-cell=\"'+node.cell+'\">'+node.title+'</li>';\t\t\n\t});\n\t\n\t// Store.iterate(function(index,row){\n\t// \tvar value=row[\"id\"];\n\t//\n\t// \tif (value){\n\t// \t\thtml+='<li class=\"list-group-item node-treeview4\" data-nodeid=\"0\" style=\"color:undefined;background-color:undefined;\">Article '+index+'</li>';\n\t// \t\t// html+=\"<button class='btn btn-default'> Article \"+value+\". </button>\";\n\t// \t}\n\t// });\n\n\tvar el=$(\"#mySidenav\");\n\tel.html('<ul class=\"list-group\">'+\n\t\t\thtml+\n\t\t\t'</ul>');\n\t\n\tel.css(\"width\",\"200px\");\n\t\n document.getElementById(\"main\").style.marginLeft = \"200px\";\n}", "function initMainNavigation(container) {\n\n // Add dropdown toggle that displays child menu items. Used on mobile and screenreaders.\n var dropdownToggle = $('<button />', {'class': 'dropdown-toggle', 'aria-expanded': false})\n //.append(seasaltpressScreenReaderText.icon)\n .append($('<span />', {'class': 'screen-reader-text', text: seasaltpressScreenReaderText.expand}));\n\n container.find('.menu-item-has-children > a, .page_item_has_children > a').after(dropdownToggle);\n\n // Set the active submenu dropdown toggle button initial state.\n container.find('.current-menu-ancestor > button, .current-menu-parent')\n .addClass('toggled-on')\n .attr('aria-expanded', 'true')\n .find('.screen-reader-text')\n .text(seasaltpressScreenReaderText.collapse);\n // Set the active submenu initial state.\n container.find('.current-menu-ancestor > .sub-menu').addClass('toggled-on').slideDown(); //added slidedown\n\n\n container.find('.dropdown-toggle').click(function (e) {\n var _this = $(this),\n screenReaderSpan = _this.find('.screen-reader-text');\n\n e.preventDefault();\n _this.toggleClass('toggled-on');\n _this.closest('li').toggleClass('toggled-on'); //added for styling the item clicked\n _this.closest('li').children('.children, .sub-menu').toggleClass('toggled-on').slideToggle();\n\n _this.attr('aria-expanded', _this.attr('aria-expanded') === 'false' ? 'true' : 'false');\n\n screenReaderSpan.text(screenReaderSpan.text() === seasaltpressScreenReaderText.expand ? seasaltpressScreenReaderText.collapse : seasaltpressScreenReaderText.expand);\n });\n }", "function setupNavigation() {\n\tconsole.log('Rendering Page...');\n\tsetToolTab();\n\tsetContextItem();\n}", "function subMenuOpenClicked(name) {\n categoryClicked(name)\n setTimeout(() => {\n menuOpenClicked();\n document.getElementById('leftSubSideBar').style.left = \"0\"; \n }, 100)\n }", "function setUpSubMenuClick () {\n\t\t mainNavItems.click(function(event){\n\t var subMenu = jQuery(this).children('.sub-menu');\n\t if(subMenu.length > 0 &&!subMenu.hasClass('open')) {\n\t //event.preventDefault();\n\t subMenu.addClass('open');\n\t jQuery(this).addClass('open');\n\t jQuery(this).siblings().removeClass('open');\n\t \tjQuery(this).siblings().children('.sub-menu').removeClass('open');\n\t } else if (subMenu.length > 0 && subMenu.hasClass('open')){\n\t \t//event.preventDefault();\n\t subMenu.removeClass('open');\n\t jQuery(this).removeClass('open');\n\t }\n\t });\n\n\t\t jQuery('.utility-nav').children('.menu-item-has-children').children('a').click(function(e){\n\t\t \tif(!jQuery(this).parent().hasClass('open')) {\n\t\t \t\te.preventDefault();\n\t\t \t\tjQuery(this).parent().addClass('open');\n\t\t\t\tjQuery(this).parent().siblings().removeClass('open');\n\t\t\t\tvar subMenu = jQuery(this).parent().children('.sub-menu');\n\t\t\t\tif(!subMenu.hasClass('open')) {\n\t\t\t \tjQuery(this).addClass('open');\n\t\t\t \tsubMenu.addClass('open');\n\t\t\t \tjQuery(this).siblings().children('.sub-menu').removeClass('open');\n\t\t\t }\n\t\t \t}\n\t\t\t/*jQuery(this).addClass('open');\n\t\t\tjQuery(this).siblings().removeClass('open');\n\t\t\tvar subMenu = jQuery(this).children('.sub-menu');\n\t\t if(!subMenu.hasClass('open')) {\n\t\t \tjQuery(this).addClass('open');\n\t\t \tsubMenu.addClass('open');\n\t\t \tjQuery(this).siblings().children('.sub-menu').removeClass('open');\n\t\t } else {\n\t\t \treturn;\n\t\t }*/\n\t\t});\n\t}", "function renderNavigationMenu() {\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 fetchSubnav(division) {\n const url = `/layout/api/v2/subnav`;\n\n // load from server\n return get(url).then(({ flyouts, cards }) => {\n const noFlyouts = !flyouts || !Object.keys(flyouts).length;\n const noCards = !Array.isArray(cards);\n const transformedCards = transformCards(cards);\n\n if (noFlyouts) flyouts = {}; // just return an empty object\n if (noCards) cards = []; // just return an empty array\n\n if (noFlyouts || noCards) {\n // return and do not cache\n return {\n flyouts,\n cards: transformedCards,\n };\n }\n\n // save to local storage\n saveSubItem(\n SUBNAV_STORAGE,\n division,\n { flyouts, cards },\n CACHE_DURATION_DAY\n );\n\n return { flyouts, cards: transformedCards };\n });\n}", "function partialPage(ops) {\n //var ops = {\n // context, subPage, setUrl, subContainer\n //}\n\n function init() {\n var subPage = ops.subPage;\n var subContainer = ops.subContainer;\n\n\n var loadMainPage = !$(subContainer).is(\"*\") || subPage == \"null\";\n var paramsStr = serialize(ops.params.toHash());\n\n /** check if main id was chagnged*/\n var lastParams = lastPage.split(\"?\")[1];\n var reloadPage = lastParams && splitAndLeave(lastParams, '=', true) != splitAndLeave(paramsStr, '=', true);\n\n /** if only layout loaded || this is not the right page || samepage diffrent main id\n redirect to main page url.*/\n if (loadMainPage || reloadPage) {\n subPage = \"main\";\n subContainer = null;\n\n }\n else {\n $(\".SiteSideMenu\").removeClass(\"selected\");\n $(\".SiteSideMenu[data-id=\" + subPage + \"]\").addClass(\"selected\");\n\n }\n\n var url = ops.setUrl(subPage) + \"?\" + paramsStr;\n\n changeUrl(ops.context, url, subContainer, function success() {\n if (loadMainPage || reloadPage) {\n\n /** if doesnt know sub menu id in advenced (example: \"machinePointId\") get from loaded menu*/\n if (ops.subPage == \"null\") {\n var refurishUrl = location.href.replace(\"null\", $(\".SiteSideMenu.selected\").data(\"id\"));\n /** loaded refbrsh with jobId and notreufbrihrtId*/\n if (ops.params.JobRefubrishPartID!==undefined && ops.params.JobRefubrishPartID == \"0\")\n refurishUrl = refurishUrl.replace(\"/0/\", \"/\" + $(\"#Parts\").val()+ \"/\" );\n\n return location.replace(refurishUrl);\n }\n\n init();\n }\n\n });\n }\n\n init();\n\n }", "static nav(to) {\n console.log(\"main nav to: \" + to)\n $.get(to, function (pageContent) {\n $('.content').html(pageContent);\n }).fail(HTMLHandler.failedGet)\n }", "function leftNav() {\n\tapp.getView().render('content/folder/customerserviceaboutusleftnav');\n}", "function ActivateSubNav(enabled) {\n if (enabled === true) {\n $('.toggle-sub-nav')\n .click(function () {\n $(this).find('i').toggleClass('fa-caret-down fa-caret-up');\n $('.sub-nav-content').slideToggle(250);\n return false;\n });\n } else {\n $('.toggle-sub-nav').find('i').removeClass('fa-caret-down fa-caret-up');\n $('.toggle-sub-nav').removeAttr('href');\n }\n}", "function changeNav(destinationItem) {\n var destination = destinationItem.getAttribute('data-title');\n var elementsToRemoveActive = ['classLink', 'accountLink', 'statLink'];\n for (var i = 0; i < elementsToRemoveActive.length; i++) {\n document.getElementById(elementsToRemoveActive[i]).className = document.getElementById(elementsToRemoveActive[i]).className.replace(/(?:^|\\s)active(?!\\S)/g, '');\n }\n if (destination == 'classes') {\n document.getElementById('classLink').className += 'active';\n $('.container').load('panel-lessons.html', function () {\n getLessons();\n });\n } else if (destination == 'stats') {\n document.getElementById('statLink').className += 'active';\n $('.container').load('panel-stats.html', function () {\n\n });\n } else if (destination == 'account') {\n document.getElementById('accountLink').className += 'active';\n $('.container').load('panel-account.html', function () {\n\n });\n }\n}", "function navigation() {\n\t\n\t/* @TODO: reverse li und stelle angemeldet als nach oben */\n\t//$$('#account ul').insert( $$('#account ul li').reverse() );\n}", "homeClicked() {\n this.props.navChanged(\"Home\");\n }", "function buildNav() {\n var sectionContent = document.getElementsByClassName('section');\n var numberOfSections = sectionContent.length;\n var sideNav = document.getElementsByClassName('sideNav')[0];\n var titleList = [];\n var subSectionList = [];\n\n // Makes a list of all section titles and associated subsection titles\n // There should only be one sectionTitle per section\n for (i=0; i<numberOfSections; i++) {\n titleList.push(sectionContent[i].getElementsByClassName('sectionTitle'));\n subSectionList.push(sectionContent[i].getElementsByClassName('subSectionTitle'));\n }\n\n // Builds the listSection\n for (sec=0; sec<numberOfSections; sec++) {\n if (subSectionList[sec].length > 0) {\n var listSection = build(titleList[sec], 'sn-listSection', true);\n var sublist = build(subSectionList[sec], 'sn-sublist', false);\n\n listSection.appendChild(sublist)\n } else {\n var listSection = build(titleList[sec], 'sn-listSection', false);\n }\n sideNav.appendChild(listSection);\n }\n}", "function goToSubworkflow(node) {\n var matchingTableRow = getTableRow(node);\n var subworkflowLink = $(matchingTableRow).find(\"a.subworkflow\");\n if (subworkflowLink.length > 0) {\n location.href = subworkflowLink.attr(\"href\");\n }\n }", "getSecondaryNavigation() {\r\n const { classes } = this.props;\r\n return (\r\n <List style={{ flex: '0 0 auto' }}\r\n subheader={\r\n <ListSubheader\r\n className={classes.subheader}\r\n style={{\r\n position: 'unset'\r\n }}\r\n >About\r\n <span\r\n style={{\r\n position: 'absolute',\r\n right: '0px',\r\n paddingRight: '16px'\r\n }}\r\n >Software Version v1.0.3</span>\r\n </ListSubheader>\r\n }>\r\n <Divider />\r\n {this.NavigationListItem({\r\n title: 'User Guide',\r\n route: '/userguide',\r\n icon: <FlagIcon />\r\n })}\r\n {this.NavigationListItem({\r\n title: 'License Agreement',\r\n route: '/license',\r\n icon: <LocalOfferIcon />\r\n })}\r\n </List>\r\n );\r\n }", "function ResultsNavBar() {\n return (\n <div className=\"subNavContainer\">\n <NavLink\n testid=\"navigateViewResults\"\n destination=\"/ViewResults\"\n linkName=\"Data log\"\n />\n </div>\n );\n}", "switchBackToShopmanagament() {\n window.location.assign(\"#/eventmgmt/shop\")\n }", "function navAllStories(evt) {\n const $appendedProfile = $(\"#addedProfile\");\n console.debug(\"navAllStories\", evt);\n hidePageComponents();\n putStoriesOnPage();\n $appendedProfile.hide();\n $favoriteList.hide();\n $ownStoriesList.hide();\n}", "getSecondaryNavigation() {\n const { classes } = this.props;\n return (\n <List\n style={{ flex: \"0 0 auto\" }}\n subheader={\n <ListSubheader\n className={classes.subheader}\n style={{\n position: \"unset\"\n }}\n >\n <span\n style={{\n position: \"absolute\",\n right: \"0px\",\n paddingRight: \"16px\"\n }}\n >\n Software Version v1.0.3\n </span>\n </ListSubheader>\n }\n >\n <Divider />\n {this.NavigationListItem({\n title: \"User Guide\",\n route: \"/userguide\",\n icon: <FlagIcon />\n })}\n {this.NavigationListItem({\n title: \"License Agreement\",\n route: \"/license\",\n icon: <LocalOfferIcon />\n })}\n </List>\n );\n }", "function populateMain() {\n directView(\"main-view\");\n id(\"product-list\").innerHTML = \"\";\n let section = this.id;\n let url = URL;\n if(section ===\"all\") {\n id(\"category\").textContent = \"SHOP ALL\"\n url += \"sneaker/all\";\n } else {\n id(\"category\").textContent = section.toUpperCase();\n url += \"category/\" + section;\n }\n fetch(url)\n .then(checkStatus)\n .then(response => response.json())\n .then(appendMain)\n .catch(handleRequestError);\n }", "function jumpToSection(elem, id) {\n window.location.href=id;\n\n var allSections = Array.from(document.getElementsByClassName('sideNav'));\n var allButtons = Array.from(allSections[0].getElementsByClassName('sn-buttons'));\n\n allButtons.forEach(function(btn) {\n // Remove all active classes and close all sublists\n btn.classList.remove('sn-active');\n if (btn.parentNode.classList.contains('sn-listSection')) {\n if (btn.parentNode.lastChild.classList.contains('sn-sublist')) {\n openNav(btn.firstChild, false);\n } else {}\n } else {}\n });\n\n var buttonDiv = elem.parentNode;\n var listTypeDiv = buttonDiv.parentNode;\n\n // Highlights where you are\n buttonDiv.classList.add('sn-active');\n if (listTypeDiv.classList.contains('sn-sublist')) {\n var listSection = listTypeDiv.parentNode;\n listSection.firstChild.classList.add('sn-active');\n openNav(listSection.firstChild.firstChild, true);\n } else {\n if (listTypeDiv.lastChild.classList.contains('sn-sublist')) {\n openNav(listTypeDiv.firstChild.firstChild, true);\n } else { }\n }\n}", "function initScalingNavigation() {\r\n\tinitAutoScalingNav({\r\n\t\tmenuId: 'nav',\r\n\t\tconstant: 12,\r\n\t\tsideClasses: true\r\n\t});\r\n}", "function updateNavigation()\r\n {\r\n $('#linkLogin').hide();\r\n $('#linkRegister').hide(); \r\n $('#linkListBooks').show();\r\n $('#linkCreateBook').show();\r\n $('#linkLogout').show();\r\n showPage('viewBooks');\r\n }", "function suiSideNavBar() {\n const sidebarNav = document.querySelector('.sui-nav-sidebar');\n for (let item of sidebarNav.children) {\n if (item.children[0].nodeName === \"A\") {\n item.children[0].addEventListener('click', (evt) => {\n evt.preventDefault();\n for (let bar of sidebarNav.children) {\n bar.classList.remove('uk-active');\n }\n item.classList.add('uk-active');\n });\n }\n }\n sidebarNav.children[1].classList.add('uk-active');\n}", "function dropDownListSubController() {\n headerView.toggleDropDownList();\n\n if (!appState.registeredClickEvents.dropDownList) {\n dropDownListController(); // Process existing user login and open new session\n } else {\n detachEventListener([DOMelements.navMenuItems.logedIn.dropDownList.myProfile,\n DOMelements.navMenuItems.logedIn.dropDownList.myRuns,\n DOMelements.navMenuItems.logedIn.dropDownList.analytics,\n DOMelements.navMenuItems.logedIn.dropDownList.logout],\n 'click',\n [myProfileViewSubController,\n myRunsViewSubController,\n analyticsViewSubController,\n logoutSubController]\n );\n }\n\n // toggle event state\n appState.registeredClickEvents.dropDownList = !appState.registeredClickEvents.dropDownList;\n}", "function mainMenu(){\n window.location.replace(\"https://stavflix.herokuapp.com/client/\");\n }", "function setUpPage() {\r\n document.querySelector(\"nav ul li:first-of-type\").addEventListener(\"click\", loadSetup, false);\r\n document.querySelector(\"nav ul li:last-of-type\").addEventListener(\"click\", loadDirections, false);\r\n}", "goToSubpage(ISBN) {\n this.props.history.push({\n pathname : '/subpage',\n state :{\n //ISBN: the ISBN of the book that user just clicked\n ISBN:ISBN\n }\n });\n }", "function loadSetup() {\r\n document.querySelector(\"nav ul li:first-of-type\").className = \"current\";\r\n document.querySelector(\"nav ul li:last-of-type\").className = \"\";\r\n document.getElementById(\"setup\").style.display = \"block\";\r\n document.getElementById(\"location\").style.display = \"none\";\r\n location.search = \"\";\r\n}", "function t_store_initRouting() {\n // window.onpopstate = function() {\n // if (window.history.state && window.history.state.productData) {\n // var t = window.history.state.productData;\n // t_store_openProductPopup(t.recid, t.opts, t.productObj, t.isRelevantsShow)\n // }\n // }\n}", "function updateNav(page) {\n // console.log(page);\n if (markers[page - 2]) {\n $(\"a#up\").attr(\"href\", \"#\" + markers[page - 2].id);\n }\n if (markers[page]) {\n $(\"a#down\").attr(\"href\", \"#\" + markers[page].id);\n }\n}", "function generateSubNav(item, i, array) {\n\n // Create new list item\n var subItem = document.createElement('Li');\n\n // Set the new list items attributes\n subItem.setAttribute('class', 'navitem secondary');\n subItem.setAttribute('role', 'menuitem');\n subItem.setAttribute('tabindex', '-1');\n\n // Create new link element with item url\n var a = document.createElement('a');\n a.setAttribute('href', item.url);\n\n // Add item label as the text\n a.appendChild(document.createTextNode(item.label));\n\n // Add event listener to a to hide menu card when clicked and navigating to new page\n a.onclick = function() {\n if (isMobile()) {\n console.log('is mobile');\n toggleNavbar();\n }\n };\n\n // Add the link to the new list item\n subItem.appendChild(a);\n\n // Append subItem to subMenu\n subMenu.appendChild(subItem);\n }", "function showpages_sub(page){\n var p1 = document.getElementById(page).getAttribute(\"id\");\n if (p1==\"page1-sub\"){\t\n document.getElementById(\"page1-sub\").style.display='block';\t\n document.getElementById(\"page2-sub\").style.display='none'; \t\n }\n else if (p1==\"page2-sub\"){\n document.getElementById(\"page1-sub\").style.display='none';\t\n document.getElementById(\"page2-sub\").style.display='block'; \t \n }\n}", "function updatePageNavigation() {\n const Navigation = MonitoringConsole.Model.Settings.Navigation;\n let panelConsole = $('#console');\n if (Navigation.isCollapsed()) {\n panelConsole.removeClass('state-show-nav');\n } else {\n if (!panelConsole.hasClass('state-show-nav')) {\n panelConsole.addClass('state-show-nav'); \n }\n }\n $('#NavSidebar').replaceWith(Components.createNavSidebar(createNavSidebarModel()));\n }", "function SideNavigation() {\n \n return (\n <div className=\"sideNavigation\">\n <ul>\n <Link to={'/catalog'}>\n <li>All</li>\n </Link>\n {categories.map(category =>\n <Link key={category.name} to={`/catalog/${category.name}`}>\n <li>{category.name}</li>\n </Link>)}\n </ul>\n <Switch>\n <Route path={'/catlog/:categoryName'} />\n </Switch>\n </div>\n )\n}", "function showShop() {\n\tmenuHideAll();\n\t$('#shop').show();\n\tmenuResetColors();\n\tmenuSetColor('shopBox');\n}", "function SubMenuClick() {\n $('.navigation.nav .menu-parent').on('click',' > a',function(e) {\n e.preventDefault();\n var $this=$(this);\n if($this.parent().hasClass('active')==false) {\n $this\n .parent('li')\n .siblings()\n .removeClass('active')\n .children('a')\n .siblings('.sub-menu').slideUp();\n }\n $this.parent('li').toggleClass('active');\n $this.siblings('.sub-menu').slideToggle();\n });\n }", "function loadNavigationDetails(divId, indexString, operation, section, docViewId){\r\n\tvar divComponent = divId.substring(0,divId.lastIndexOf(\"-\")+1);\r\n\tvar activeDiv = divId.substring(divId.lastIndexOf(\"-\")+1,divId.length);\r\n\tgetElemnt(divComponent + activeDiv + \"-cell\").className=\"clsNavChildren\";\r\n\tvar i = 0;\r\n\tvar collapse = false;\r\n\tvar arrowComponent = getElemnt(divId+\"-arrow\");\r\n\tvar presentImage = arrowComponent.src;\r\n\tif(operation == 'getChildren'){\r\n\t\tvar imagePath = presentImage.substring(0,presentImage.lastIndexOf(\"/\")+1);\r\n\t\tif(presentImage && presentImage.substring(presentImage.lastIndexOf(\"/\")+1, presentImage.length) == \"right_arrow_black.gif\"){\r\n\t\t\tarrowComponent.src = imagePath + \"down_arrow_black.gif\";\r\n\t\t\tcollapse = false;\r\n\t\t} else {\r\n\t\t\tarrowComponent.src = imagePath + \"right_arrow_black.gif\";\r\n\t\t\tcollapse = true;\r\n\t\t\tgetElemnt(divComponent + activeDiv + \"-cell\").className = \"clsNavChildren\";\r\n\t\t}\r\n\t\twhile(getElemnt(divComponent + i + \"-anchor\") != null){\r\n\t\t\tif(i != activeDiv)\r\n\t\t\t{\r\n\t\t\t\tgetElemnt(divComponent + i + \"-row\").style.display = \"none\";\r\n\t\t\t\tgetElemnt(divComponent + i + \"-anchor\").style.display = \"none\";\r\n\t\t\t\tgetElemnt(divComponent + i + \"-anchor1\").style.display = \"none\";\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t\tgetChildren(divId ,indexString, section, collapse);\r\n\t}\r\n\telse{\r\n\t\tvar imagePath = presentImage.substring(0,presentImage.lastIndexOf(\"/\")+1);\r\n\t\tif(presentImage.substring(presentImage.lastIndexOf(\"/\")+1, presentImage.length) == \"down_arrow_black.gif\"){\r\n\t\t\tarrowComponent.src = imagePath + \"right_arrow_black.gif\";\r\n\t\t}\r\n\t\tgetElemnt(divComponent + activeDiv + \"-cell\").className = \"selectedNodes\";\r\n\t\twhile(getElemnt(divComponent + i + \"-anchor\") != null){\r\n\t\t\tif(i != activeDiv)\r\n\t\t\t{\r\n\t\t\t\tgetElemnt(divComponent + i + \"-row\").style.display = \"none\";\r\n\t\t\t\tgetElemnt(divComponent + i + \"-anchor\").style.display = \"none\";\r\n\t\t\t\tgetElemnt(divComponent + i + \"-anchor1\").style.display = \"none\";\r\n\t\t\t\tvar arrowComponent = getElemnt(divComponent+i+\"-arrow\");\r\n\t\t\t\tarrowComponent.src = imagePath + \"right_arrow_black.gif\";\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t\tvar component = getElemnt(divId);\r\n\t\tcomponent.style.display = \"none\";\r\n\t\tloadWorkArea('menu.do','NAV-MENU&docViewId='+docViewId+'&searchBy='+indexString+'&menu=' + section,'',loadNavigationGrid);\r\n\t}\r\n}", "function buildGlobalNavigation(a) {\n var globalNavigationLength = globalNavigationLinks.links.length;\n var globalNavigation = '';\n for (var i = 0; i < globalNavigationLength; i++) {\n var linkElement = '<a class=\"global-navigation__link\" href=\"' + globalNavigationLinks.addresses[i] + '\">' + globalNavigationLinks.links[i] + '</a>'\n globalNavigation = globalNavigation + linkElement\n }\n\n document.getElementsByTagName(a)[0].innerHTML = \n '<span class=\"global-navigation__link mobile-control\" id=\"mobileNavControl\" href=\"\">MENU</span>\\\n <nav class=\"global-navigation hidden\" id=\"globalNav\" data-active=\"closed\">' + \n globalNavigation + \n '</nav>' + \n document.getElementsByTagName(a)[0].innerHTML;\n\n var mobileNavControl = document.getElementById('mobileNavControl')\n mobileNavControl.addEventListener(\"click\", toggleMobileNav, false);\n}", "gotoDetails(){\n const { navigator } = this.props;\n navigator.push({ name: 'PRODUCT_DETAIL'});\n\n }", "function nav() {\n return (\n <div className=\"nav col-2 flex-column sidee-nav\">\n <div className=\"genre\">\n <div className=\"label\">Genre</div>\n \n <Link className=\"nav-link info\" to=\"/\">\n Romance\n </Link>\n <Link className=\"nav-link info\" to=\"/\">\n Science Fiction\n </Link>\n <Link className=\"nav-link info\" to=\"/\">\n Horror\n </Link>\n <Link className=\"nav-link info\" to=\"/\">\n Poetry\n </Link>\n \n <div className=\"label mt-5\">Popular</div>\n \n <Link className=\"nav-link info\" to=\"/\">\n EXAMPLE\n </Link>\n <Link className=\"nav-link info\" to=\"/\">\n EXAMPLE\n </Link>\n <Link className=\"nav-link info\" to=\"/\">\n EXAMPLE\n </Link>\n <Link className=\"nav-link info\" to=\"/\">\n EXAMPLE\n </Link>\n <Link className=\"nav-link info\" to=\"/\">\n EXAMPLE\n </Link>\n \n </div>\n </div>\n );\n}", "function checkHasSubPage() {\n for (var i in customSubPage) {\n if (customSubPage[i].link === false) {\n subPageList.push(customSubPage[i].name);\n }\n }\n}", "function setNav() {\n\n\t\t\t\tvar $nav = _$parent.find('nav');\n\t\t\t\tvar $contents = _$parent.find('.contents');\n\t\t\t\tvar $btn = $nav.find('p');\n\n\t\t\t\t$btn.on('click',function() {\n\n\t\t\t\t\tvar $target = $(this);\n\n\t\t\t\t\tif ($target.hasClass('active')) return;\n\t\t\t\t\t$contents.removeClass('show');\n\t\t\t\t\t$btn.removeClass('active');\n\t\t\t\t\t$target.addClass('active');\n\t\t\t\t\tvar id = $target.prop('id').split('-')[1];\n\t\t\t\t\t$contents.filter('#contet-' + id).addClass('show');\n\n\t\t\t\t});\n\n\t\t\t\treturn false;\n\t\t\t}", "function loadNavMenu(){\n $('.overlay-menu').append('<h1>Navigation</h1>');\n \n $('.overlay-menu').append('<h2>Arena Mode Comming soon!</h2><h1><i class=\"fa fa-gamepad fa-lg\"></i></h1>')\n //set back button\n createBackBtn(); \n}" ]
[ "0.609147", "0.6020206", "0.6014828", "0.5908754", "0.58745843", "0.58446956", "0.5802636", "0.57593817", "0.5737862", "0.5726527", "0.5713349", "0.5639819", "0.56272644", "0.56181484", "0.55979353", "0.55891716", "0.55837995", "0.5582958", "0.5580003", "0.5571381", "0.5563747", "0.55492973", "0.5530175", "0.5514899", "0.5513898", "0.5510223", "0.5499251", "0.54801893", "0.54801893", "0.54800695", "0.5476317", "0.5472522", "0.5471172", "0.5470953", "0.54651666", "0.5433319", "0.54301196", "0.5428094", "0.5417991", "0.5409709", "0.54093176", "0.5409005", "0.5406376", "0.5395963", "0.5394133", "0.5390496", "0.53844434", "0.5370227", "0.5353996", "0.53518856", "0.5344382", "0.53427655", "0.53327143", "0.53310806", "0.5329679", "0.5329391", "0.53293806", "0.5323032", "0.5320722", "0.531748", "0.53133374", "0.53060514", "0.53029263", "0.53012305", "0.5300625", "0.53002846", "0.5295043", "0.5289479", "0.5284847", "0.5282558", "0.52704656", "0.5267474", "0.52588826", "0.5256575", "0.52560925", "0.5252322", "0.5237333", "0.5235133", "0.5229219", "0.5228854", "0.5223549", "0.52201915", "0.5219243", "0.52177656", "0.5206511", "0.52040553", "0.5202352", "0.5192714", "0.51874757", "0.51815665", "0.51773703", "0.51729304", "0.51721156", "0.51717025", "0.5170809", "0.5169774", "0.5155372", "0.51552004", "0.5154846", "0.5146508" ]
0.5187752
88
anything returned from this will end up on the BookList props.
function mapStateToProps(state){ return { book: state.activeBook } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Booklist() {\n\treturn (\n\t\t<section className='BookList'>\n\t\t\t{Books.map((book) => {\n\t\t\t\treturn <Book key={book.id} {...book}></Book>;\n\t\t\t})}\n\t\t</section>\n\t);\n}", "renderBooks() {\n return _.map(this.props.books, book => {\n return (<li className='list-group-item' key={book.id}>\n {book.book_title} </li>\n );\n });\n }", "render(){\n\n\t\tconst { books, onShelfSelection } = this.props\n\t\treturn (\n\t\t\t<div className=\"bookshelf\">\n\t\t\t\t<h2 className=\"bookshelf-title\">{this.props.listTitle}</h2>\n\t\t\t\t<div className=\"bookshelf-books\">\n\t\t\t\t\t<ol className=\"books-grid\">\n\t\t\t\t\t\t{books.map(book => (\n\t\t\t\t\t\t\t<li key={book.id}>\n\t\t\t\t\t\t\t\t<Book \n\t\t\t\t\t\t\t\t\tbook={book}\n\t\t\t\t\t\t\t\t\tonShelfSelection={onShelfSelection}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t))}\n\t\t\t\t\t\t{books.length === 0 && (\n\t\t\t\t\t\t\t<li>No books found.</li>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</ol>\n\t\t\t\t</div>\n\t\t\t</div>\t\t\t\n\t\t)\n\t}", "buildList() {\n return this.props.books.map((book) => {\n return (\n <li className=\"list-group-item\" key={book.id} onClick={() => this.props.selectBook(book)}>\n {book.title}\n </li>\n );\n });\n }", "render() {\n console.log(this.props.responseItems);\n // Map over the list of books returned to create list of BookItem components\n const results = this.props.responseItems.map((item, idx) => {\n // Construct a call to BookItem\n const title = item.volumeInfo.title;\n const authors = item.volumeInfo.authors;\n // Deal with price issue\n let price = 'NA'\n // const price = item.saleInfo.listPrice.amount;\n if (item.saleInfo.saleability===\"FOR_SALE\"){\n price = item.saleInfo.listPrice.amount\n }\n const description = item.volumeInfo.description;\n // Add some logic because sometimes there is no thumbnail\n const image = item.volumeInfo.imageLinks.smallThumbnail;\n return <BookItem title={title} authors={authors} price={price} description={description} image={image} key={idx}/>\n });\n return (\n <div className=\"BookList\">\n {results}\n </div>\n );\n }", "render(){\n\n\t\treturn (\n <div className=\"bookshelf\">\n <h2 className=\"bookshelf-title\">{this.props.shelf.label}</h2>\n <div className=\"bookshelf-books\">\n <ol className=\"books-grid\">\n {this.props.shelf.books.map((book)=>(\n <li key={book.id}><Book book={book} updateBooks={this.props.updateBooks} options={this.props.shelf.shelfOptions}/></li>\n ))}\n </ol>\n </div>\n </div>\n\n\n );\n\t}", "function Booklist() {\n return (\n <section className='booklist'> \n {data.map((book, index) => { // iterates over each book property in list called data\n return <Book key={book.id} {...book}></Book>;\n })} \n </section>\n )\n}", "renderBooks() {\n return this.props.books.map((book) => {\n return (\n <li \n key={book.title} \n className=\"list-group-item\" \n onClick={()=>this.props.selectBook(book)}>\n {book.title}\n </li>\n );\n })\n }", "function BookList(){\n return(\n <section className='booklist'>\n {books.map((book)=>{\n // const {img, title,author} = book;\n // return (\n // <div>\n // <h3>{title}</h3>\n // <h6>{author}</h6>\n // </div>\n // );\n return(\n // {...book}functional Component - Spread Operator: means all the properties from book objects will be passed to the prop, no longer an object variable\n <Book key={book.id} {...book}></Book>\n )\n })}</section> \n );\n}", "render() {\n let listBook = \"\";\n const category = this.props.getCategory(this.props.id);\n \n if (category) { \n if (category.books) {\n listBook = category.books.map((book) => (\n <div key={book._id} id={book._id} className=\"list-group container\">\n <div className=\"\">\n <div className=\"col-lg-4 bg-light\">\n <h1>Title: {book.title} </h1>\n <ul>\n <li>Author: {book.author}</li>\n <li>Seller: {book.sellerName}</li>\n <li>Category: {book.category}</li>\n <li>Price: {book.price}</li>\n </ul> \n </div>\n </div>\n </div>\n ));\n }\n }\n \n\n\n return (\n <div className=\"m-5\"> \n <div>\n <h3>Book details</h3>\n <div className=\"row list-group-horizontal-md mb-3\"> \n {listBook.length === 0 ? <p>No Book found!</p> : listBook}\n </div> \n </div>\n <div className=\"mt-5\">\n <Link to=\"/\">\n <i className=\"fa fa-long-arrow-left fa-1x circle-icon\"> </i>\n </Link>\n </div>\n </div>\n );\n }", "render() {\n const { books} = this.props\n\n return (\n \n \n <ol className='book-list'>\n {books.filter((book)=>!book.hasOwnProperty(\"shelf\")).map((book) => (\n <li key={book.id} className='book-list-item'>\n <div className='book-avatar' style={{\n backgroundImage: `url(${book.imageLinks.thumbnail? book.imageLinks.thumbnail\n : noCover})`\n }}/>\n <div className='book-details'>\n <p>{book.title? book.title : 'No title available'}</p>\n\t\n <p>{book.hasOwnProperty(\"authors\")?book.authors.join(\", \"):''}</p>\n\t\t\n\n </div>\n\t\t\t\t <div className=\"book-shelf-changer\">\n <select value={book.shelf} onChange={e => this.moveBook(book.id, e)}>\n <option value=\"none\" disabled>\n Move to...\n </option>\n <option value=\"currentlyReading\">Currently Reading</option>\n <option value=\"wantToRead\">Want to Read</option>\n <option value=\"read\">Read</option>\n <option value=\"none\">None</option>\n </select>\n \n </div>\n </li>\n ))}\n </ol>\n \n )\n }", "render() {\r\n\r\n return (\r\n <ol className=\"books-grid\">\r\n {this.props.books.map(book => (\r\n <Book\r\n book={book}\r\n key={book.id}\r\n changeShelf={this.props.changeShelf}\r\n />\r\n ))}\r\n </ol>\r\n );\r\n }", "render() {\n return (\n <div className=\"bookshelf\">\n <h2 className=\"bookshelf-title\">{this.props.shelfName}</h2>\n <div className=\"bookshelf-books\">\n <ol className=\"books-grid\">\n {this.props.books.map((book, key) =>\n <Books\n updateBook={this.props.updateBook}\n book={book}\n key={key}\n />\n )}\n </ol>\n </div>\n </div>\n );\n }", "render(){\n return (\n <div className=\"bookshelf\">\n <h2 className=\"bookshelf-title\">{this.props.title}</h2>\n <div className=\"bookshelf-books\">\n <ol className=\"books-grid\">\n {this.props.books.map((bookItem) => (\n <Book key={bookItem.id} book={bookItem} currentShelf={this.props.shelfValue} changeShelf={this.props.changeShelf}/>\n ))}\n </ol>\n </div>\n </div>\n )\n }", "function BookList() {\n return (\n <div className='container'>\n <section className='booklist row'>\n {books.map((book) => {\n return <Book key={book.id} {...book}></Book>;\n })}\n </section>\n </div>\n );\n}", "render(){\n\n\t\tconst shelves = this.props.shelves;\n\n\t\treturn (\n\t\t\t <div className=\"list-books\">\n\t <div className=\"list-books-title\">\n\t\t <h1>MyReads</h1>\n\t\t </div>\n\t\t \t<div className=\"list-books-content\">\n\t\t <div>\n\t\t \t{shelves.map((shelf) => (\n\t\t \t\t<BookShelf shelf={shelf} key={shelf.title} updateBooks={this.props.updateBooks}/>\n\t\t \t))}\n\t\t </div>\n\t\t </div>\n\t\t <div className=\"open-search\">\n\t\t <Link to=\"/search\">Add a book</Link>\n\t </div>\n \t</div>\n\n\n\t\t\t);\n\n\n \t}", "function BookList() {\n // atribute, eventHandler\n // onClick, onMouseOver\n\n return (\n <article className='booklist'>\n {data.map((book) => {\n return (\n <Book key={book.id} {...book} />\n )\n })}\n </article>\n );\n}", "function mapStateToProps(state) {\n //whatever is returned here will show up as props in bookList\n return {\n books:state.books\n };\n}", "function BookList() {\n return <section className = \"booklist\"> \n <Book \n img={book1.url}\n title = {book1.title}\n author = {book1.author}\n />\n <Book \n img={book2.url}\n title = {book2.title}\n author = {book2.author}\n /> <Book \n img={book3.url}\n title = {book3.title}\n author = {book3.author}\n /> <Book \n img={book4.url}\n title = {book4.title}\n author = {book4.author}\n />\n \n \n </section>;\n}", "render(){//Breaks into a single book profile\n return this.props.books.map( (book)=>{\n //Return each Book as a single profile + Reload\n return <BookProfile book={book} ReloadData={this.props.ReloadData}></BookProfile>\n })\n }", "function BookList (){\nreturn <section>\n<Book/>\n<Book/>\n<Auther />\n<Auther />\n</section>;\n}", "function Book(props) {\n\n const {imageLinks, authors, title, shelves, shelf,onShelfChanged} = props;\n\n return (\n <div className=\"book\">\n <div className=\"book-top\">\n <div className=\"book-cover\" style={{ width: 128, height: 193, backgroundImage: `url(\"${imageLinks.smallThumbnail}\")` }}></div>\n <BookShelfChanger book={props} onShelfChanged={onShelfChanged} shelves={shelves} shelf={shelf} />\n </div>\n <div className=\"book-title\">{title}</div>\n {authors.map((author,index)=>(\n <div key={`author_${index}`} className=\"book-authors\">{author}</div>\n ))}\n </div>\n )\n}", "function BookList() {\n\n const [selected, setSelected] = useState(\"\");\n\n function liBuilder(books) {\n books.map((book) => {\n console.log(\"book author \", book.author);\n })\n return books.map((book) => {\n let new_li;\n if (book.author != null) {\n new_li = <li>Author: { book.author.name }</li>\n } else {\n new_li = <li>Sorry no author available</li>\n }\n return (\n <div key={book.id} onClick={ (e) => {\n setSelected(book.id);\n }}>\n <li>Name: { book.name }</li>\n <li>Genre: { book.genre }</li>\n { new_li }\n <br/>\n </div>\n );\n });\n }\n\n let { loading, data } = useQuery(getBooksQuery);\n if (loading) {\n return (\n <div>Loading books....</div>\n );\n } else {\n console.log(\"This is books\", data.books);\n return (\n <div id=\"book-list\">\n { liBuilder(data.books) }\n <BookDetails bookId={ selected }/>\n </div>\n );\n }\n\n}", "static displayBooksToList() {\n const books = Store.getBooks();\n\n books.forEach((book) => {\n UI.addBookToList(book)\n });\n }", "function BookItem(props) {\n\n/* simplifying some code example */\n/* const title = props.book.title;\n const shelf = props.book.shelf;\n const authors = props.book.authors;*/\n const image = props.book.imageLinks.smallThumbnail;\n const { title, shelf, authors} = props.book;\n \n return (\n <div className=\"book\">\n <div className=\"book-top\">\n \n <img className=\"book-cover\" alt=\"\" style={{\n width: 128,\n height: 193,\n backgroundImage: `url(${image}) ` ,\n }}/>\n <div className=\"book-shelf-changer\">\n <select value={shelf} onChange={e =>\n props.handleListChange(props.book, e.target.value)}>\n <option value=\"none\" disabled>Move to...</option>\n <option value=\"currentlyReading\">Currently Reading</option>\n <option value=\"wantToRead\">Want to Read</option>\n <option value=\"read\">already read</option>\n <option value=\"none\">None</option>\n </select>\n </div>\n\n {/* remove button deactivated since api endpoint not supported for now */}\n <button style={{\"display\": \"none\"}} onClick={() => props.onDeleteBook(props)} >delete book</button>\n \n </div>\n <div className=\"book-title\">{title}</div>\n <div className=\"book-authors\">{authors}</div>\n </div>\n )\n}", "function BookList(props) {\n return (\n <div className=\"list-books\">\n <div className=\"list-books-title\">\n <h1>MyReads</h1>\n </div>\n <div className=\"list-books-content\">\n <div>\n <BookShelf title=\"Currently Reading\"\n books={props.books.sort((a, b) => a.title - b.title).filter(book => book.shelf === 'currentlyReading')}\n handleShelfMove={(newShelf, book) => props.handleShelfMove(newShelf, book)}></BookShelf>\n <BookShelf title=\"Want to Read\"\n books={props.books.sort((a, b) => a.title - b.title).filter(book => book.shelf === 'wantToRead')}\n handleShelfMove={(newShelf, book) => props.handleShelfMove(newShelf, book)}></BookShelf>\n <BookShelf title=\"Read\"\n books={props.books.sort((a, b) => a.title - b.title).filter(book => book.shelf === 'read')}\n handleShelfMove={(newShelf, book) => props.handleShelfMove(newShelf, book)}></BookShelf>\n </div>\n </div>\n <div className=\"open-search\">\n <Link to='/search'>Add a book</Link>\n </div>\n </div>\n );\n}", "static displayBooks () {\n\t\tconst books = Store.getBooks();\n\n\t\t//Loop through each book and call method addBookToList\n\n\t\tbooks.forEach((book) => UI.addBookToList(book));\n\t}", "function BookList() {\n return (\n <div className='list'>\n <Book \n img={firstBook.img} \n title={firstBook.title} \n author={firstBook.author} \n >\n <p>\n Lorem ipsum dolor sit amete consecdr magnum islo contour volumtrous libero ducimus.\n </p>\n </Book>\n <Book \n img={secondBook.img} \n title={secondBook.title} \n author={secondBook.author} />\n </div>\n );\n}", "function listBooks(books){\n books.forEach(book => bookLi(book))\n }", "function displayBooks(data) {\n // console.log('data2: ', data)\n if (data.length > 0) { setSelectedBook(data[0].id) }\n return data.books.map(({ id, name, genre, author }) => (\n <div key={id}>\n <ul className=\"list-group\">\n <li className=\"list-group-item list-group-item-action\" name={id} onClick={e => {\n setSelectedBook(id)\n }}>\n {author.name}: {name}: {genre}\n </li>\n </ul>\n </div>\n\n ));\n }", "function mapStateToProps(state){\r\n // Whatever object is returned will show up as this.props\r\n // inside of BookList\r\n return{\r\n books : state.books\r\n };\r\n}", "bookList() {\n if (this.state.mounted) {\n return this.state.filteredBookList.map(currentBook => {\n if (\n currentBook.unread == true &&\n this.props.location.pathname == \"/books/unread\"\n ) {\n return (\n <BookCover key={currentBook._id} currentBookCover={currentBook} />\n );\n } else if (\n currentBook.unread == false &&\n this.props.location.pathname == \"/books/finished\"\n ) {\n return (\n <BookCover key={currentBook._id} currentBookCover={currentBook} />\n );\n }\n });\n } else {\n return (\n <div className=\"center-align\">\n There have not been any books uploaded yet!\n </div>\n );\n }\n }", "render() {\n return(<div>\n <h1>Books details</h1>\n <li>{this.state.book} : {this.state.price} : {this.state.author} </li>\n </div>)\n }", "componentWillMount() {\n let id = this.props.match.params.id;\n Promise.all([this.props.bookService.show(id), this.props.authorService.index()])\n .then(res => {\n /**\n * Fill book data\n */\n let book = this.state.book;\n book.fillFromResponse(res[0]);\n /**\n * Convert the array of authors\n * to a HashMap of authors\n * this will allow to hide the\n * ones that the book already have\n */\n let dictOfAuthors = {};\n res[1].map((a) =>\n dictOfAuthors[a.id] = a\n );\n /**\n * Iterate the book authors\n * and hide them from the HashMap\n * of authors\n */\n book.authors.map((a) =>\n dictOfAuthors[a.id].visible = false\n );\n this.setState({\n book: book,\n authors: dictOfAuthors\n });\n })\n .catch(err => {\n toast.error('¡Solicitud Fallida!, Inténtalo de nuevo');\n });\n }", "function mapStateToProps(state) {\n //whatever is returned will show up as props inside of BookList\n return {\n books: state.books\n }\n}", "function BookListItem(props){\n const match = props.match\n return(\n <div className='bookList'>\n {props.books.map(book => (\n <div className='book-covers-container' key={book.id}>\n <Link to={`${match.url}/${book.id}`}><img className='book-covers' src={book.image} alt={props.title}/></Link>\n </div>\n ))}\n </div>\n )\n}", "function mapStateToProps(state) { //makes this.props.books used in renderList. need react-redux. takes app state as argument\n return { //whatever is returned will show up as props inside Book-List\n books: state.books //makes this.props.books. value = list of books off of state\n };\n}", "function readingList(){ \n return (\n <section>\n <h2>Title Author</h2>\n <ol>\n {/* <Book/> */}\n </ol>\n </section>\n )\n}", "render(){\n return this.props.books.map((book)=>{\n return <BookItem book={book} RefreshData={this.props.RefreshData}></BookItem> // add reloadData\n })\n }", "static displayBook(){\n // //Imaginary local storage for trial purpose\n // const bookstore=[\n // {\n // title: 'Book One',\n // author: 'John Doe',\n // isbn: '345678'\n // },\n // {\n // title: 'Book Two',\n // author: 'Nobel Reo',\n // isbn: '348982'\n // }\n // ];\n const books = Store.getBooks();\n books.forEach((book) => UI.addBookToList(book));\n }", "static displayBooks(){\n // Taking books from the local Storage\n const books = Store.getBooks();\n\n // Looping through the books and adding it to bookList\n books.forEach((book) => UI.addBookToList(book));\n }", "function ListBooks(props) {\n\n const { books, changeShelf } = props;\n let bookShelvesNames = [\n {type: 'currentlyReading', title: 'Currently Reading'},\n {type: 'read', title: 'Read'},\n {type: 'wantToRead', title: 'Want to Read'}\n ]\n\n /* Use filter to categorize the shelves and present all books in each shelf */\n return (\n <div className=\"list-books\">\n <div className=\"list-books-title\">\n <h1>MyReads</h1>\n </div>\n <div className=\"list-books-content\">\n {bookShelvesNames.map((bookShelf, index) => (\n <BookShelf\n books={books.filter((book) => (book.shelf === bookShelf.type))}\n key={ index }\n title={ bookShelf.title }\n changeShelf={ changeShelf }\n />\n ))}\n </div>\n <div className=\"open-search\">\n <Link\n to='/search'\n >Add a book\n </Link>\n </div>\n </div>\n )\n}", "render() {\r\n return (\r\n <div>\r\n <div className=\"search-books\">\r\n <div className=\"search-books-bar\">\r\n <Link className=\"close-search\" to=\"/\">\r\n {\" \"}\r\n Close{\" \"}\r\n </Link>\r\n <div className=\"search-books-input-wrapper\">\r\n <input\r\n type=\"text\"\r\n placeholder=\"Search by title or author\"\r\n value={this.state.query}\r\n onChange={(event) => this.updateQuery(event.target.value)} />\r\n </div>\r\n </div>\r\n\r\n <div className=\"search-books-results\">\r\n <ol className=\"books-grid\">\r\n {\r\n this.state.searchFinding.map(results =>{\r\n let Shelf = \"none\"\r\n\r\n this.props.books.map(book => (\r\n book.id === results.id ?\r\n Shelf = book.Shelf :\r\n ''\r\n ));\r\n\r\n\r\n return (\r\n <li key={results.id}>\r\n <Book book={results}\r\n changeShelf={this.props.changeShelf}\r\n \r\n currentShelf = {Shelf}\r\n \r\n />\r\n </li>\r\n\r\n )\r\n })\r\n }\r\n\r\n\r\n\r\n \r\n\r\n </ol>\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n }", "render() {\n const { query } = this.state\n const { books } = this.props\n console.warn('The shelf is: ' + this.state.searchedBooks.shelf)\n console.warn(books.shelf)\n \n return(\n <div className=\"search-books\">\n <div className=\"search-books-bar\">\n <Link className=\"close-search\" to='/'>Close</Link>\n \n <div className=\"search-books-input-wrapper\">\n\n <input type=\"text\" placeholder=\"Search by title or author\"\n\t\t\tvalue={query}\n\t\t\tonChange={this.getBooks}\n\t\t\t/>\n </div>\n </div>\n <div className=\"search-books-results\">\n <ol className=\"books-grid\">\n\n {this.state.searchedBooks.filter((book =>\n book.shelf !== \"wantToRead, currentlyReading, read\"\n \n )).map((book) => \n <Book \n book={book} \n key={book.id}\n shelf={book.shelf} \n onUpdate={(shelf) => {this.update_book(book, shelf)}} \n />)}\n\t\t\t</ol>\n </div>\n\n </div>\n\n )\n }", "function mapStateToProps ( state ) {\n //the return here will show up as props in book_list.js\n return {\n books: state.books\n };\n}", "render() {\n //console.log(this.state.books);\n\t\treturn (\n\t\t\t<div className=\"list-books\"> \n <div className=\"list-books-title\">\n <h1>MyReads</h1>\n </div>\n \n <div className=\"list-books-content\">\n \n {\n //pass books to their shelf\n } \n { this.state.books && \n (<div> <Shelf books={ this.state.books.filter((book)=> book.shelf === \"currentlyReading\")} name=\"Currently Reading\" onShelfChange={this.shelfChange}/>\n <Shelf books={ this.state.books.filter((book)=> book.shelf === \"read\")} name=\"Read\" onShelfChange={this.shelfChange}/>\n <Shelf books={ this.state.books.filter((book)=> book.shelf === \"wantToRead\")} name=\"Want To Read\" onShelfChange={this.shelfChange}/>\n </div> )\n }\n \n </div>\n\n <div className=\"open-search\">\n \t<Link to=\"/search\">Add Contact</Link>\n </div>\n </div>\n\t\t\t)\n\t}", "render () {\n let items = []\n if (this.props.isSearchActive === true) {\n if (this.props.records) {\n if (this.props.records.length > 0) {\n items = this.props.records.map(record => {\n const authors = record['artist-credit'][0].name\n return <ListItem key={record.id}\n id={record.id}\n title={record.title}\n fav={this.checkIfFaivorite(record.id)}\n toggle={this.toggleFaivotite.bind(this)}\n authors={authors} />\n })\n\n const totalPages = Math.floor(this.props.count / PER_PAGE)\n const currentPage = Math.floor(this.props.offset / PER_PAGE)\n\n return (\n <>\n <ListArea>\n {items}\n </ListArea>\n {(totalPages > 1) && (this.props.isSearchActive)\n ? <Paginator pageCount={totalPages}\n initialPage={currentPage}\n pageRangeDisplayed={3}\n onPageChange={this.gotoPage}\n disableInitialCallback\n marginPagesDisplayed={1}\n previousLabel={'<'}\n nextLabel={'>'} />\n : null}\n </>\n )\n } else {\n return <BlankResponse />\n }\n } else {\n return null\n }\n } else {\n items = this.props.bookmarks.map(record => {\n return <ListItem key={record.id}\n id={record.id}\n title={record.title}\n fav\n toggle={this.toggleFaivotite.bind(this)}\n authors={record.authors} />\n })\n return (\n <ListArea>\n {items}\n </ListArea>\n )\n }\n }", "getBookTitle() {\n return this.bookTitle;\n }", "render() {\n const { books } = this.props\n\n {/* An array containing three objects, one for each of the shelves.\n Each object holds an array of books for that shelf. */}\n let categorizedBooks = [\n {\n shelf: 'Currently Reading',\n booksOnShelf: books.filter((book) => book.shelf === 'currentlyReading')\n },\n {\n shelf: 'Want To Read',\n booksOnShelf: books.filter((book) => book.shelf === 'wantToRead')\n },\n {\n shelf: 'Read',\n booksOnShelf: books.filter((book) => book.shelf === 'read')\n }\n ]\n\n return (\n <div className=\"list-books\">\n <div className=\"list-books-title\">\n <h1>MyReads</h1>\n </div>\n <div className=\"list-books-content\">\n <div>\n {categorizedBooks.map((category) => (\n <BookShelf\n key = {category.shelf}\n books = {category}\n onUpdateShelf = {(book, shelf) => this.props.onUpdateShelf(book, shelf)}\n />\n ))}\n </div>\n </div>\n <div className=\"open-search\">\n <Link to='/search'>Add a book</Link>\n </div>\n </div>\n )\n }", "function BookInfo(props) {\n\tconst columns = [\n\t\t{ field: 'id', headerName: 'ID', width: 80 },\n\t\t{ field: 'title', headerName: 'Title', width: 300 },\n\t\t{ field: 'authors', headerName: 'Authors', width: 300 },\n\t];\n\n\tlet count = 1;\n\tlet theRows = [];\n\tif (props.myBooks) {\n\t\tconst rows = props.myBooks.map((book) => {\n\t\t\treturn {\n\t\t\t\tid: count++,\n\t\t\t\ttitle: book.Title,\n\t\t\t\tauthors: book.Author,\n\t\t\t};\n\t\t});\n\t\ttheRows = rows;\n\t}\n\tif (!props.myBooks) {\n\t\treturn <h1> </h1>;\n\t}\n\n\tfunction addTo() {\n\t\talert('Item added to collection');\n\t}\n\treturn (\n\t\t<Paper>\n\t\t\t<div style={{ height: 800, width: '100%' }}>\n\t\t\t\t<DataGrid\n\t\t\t\t\trows={theRows}\n\t\t\t\t\tcolumns={columns}\n\t\t\t\t\tpageSize={10}\n\t\t\t\t\t// onRowDoubleClick={addTo}\n\t\t\t\t\t// onRowSelected={somethingElse}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</Paper>\n\t);\n}", "static displayBooks() {\n const books = Store.getBooks();\n\n books.forEach(book => {\n const ui = new UI();\n\n // Add book to UI\n ui.addBookToList(book);\n });\n\n }", "componentWillMount() {\n // use set state method to alter books variables\n this.setState({\n books: books\n });\n }", "function mapStateToProps(state) {\n // Whatever is returned will show up as props inside BookList!\n // This is the glue ties state to props\n // if app state changes this component BookList will auto re-render\n return {\n books: state.books\n };\n}", "displayBook () {\n\n const currentBook = this.state.currentBook;\n\n if (currentBook !== undefined){\n if (currentBook.volumeInfo !== undefined){\n return (\n <div>\n <Button className=\"current-book-button\" onClick={() => window.history.back()} type=\"primary\">Retour</Button>\n {this.state.isLoading ? \n <Loader /> : \n (\n <div>\n <div className=\"current-book-form-container\">\n {currentBook.volumeInfo.imageLinks !== undefined ? \n <img className=\"current-book-cover\" src={currentBook.volumeInfo.imageLinks.thumbnail} alt=\"\"/> :\n <div className=\"current-book-cover\"></div> }\n <div className=\"form-add-book\">\n {this.displayButton(1, 'Bibliothèque', currentBook)}\n {this.displayButton(2, 'Pile à Lire', currentBook)}\n {this.displayButton(3, 'Wish List', currentBook)}\n <Button\n type=\"danger\"\n className=\"search-page-button\"\n onClick={() => this.deleteBook()}>\n Supprimer\n </Button>\n </div>\n </div>\n <div className=\"current-book-informations\">\n <ul className=\"current-book-informations-authors-list\">\n {currentBook.volumeInfo.authors !== undefined ? currentBook.volumeInfo.authors.map(author => <li key={author}><h3>{author}</h3></li>) : null}\n </ul>\n <h4 className=\"current-book-informations-title\">{currentBook.volumeInfo.title}</h4>\n <span className=\"current-book-informations-published-date\">{currentBook.volumeInfo.publishedDate}</span>\n <p className=\"current-book-informations-description\">{currentBook.volumeInfo.description !== undefined ? currentBook.volumeInfo.description : null}</p>\n </div>\n </div>\n )}\n </div>\n );\n }\n }\n \n }", "function BookList() {\n return (\n <section className='booklist'>\n <Book/>\n <Book/>\n <Book/>\n <Book/>\n <Book/>\n <Book/>\n <Book/>\n <Book/>\n </section>\n );\n}", "function mapStateToProps(state) {\n // Whatever gets returned will show up as props inside of this Booklist container, and will be accesible by calling this.props.\n return {\n books: state.books\n };\n}", "renderBooks() {\n if (this.state.error) {\n /*handles search not found*/\n return (\n <CardSection>\n <Text style={{fontWeight: 'bold', alignSelf: 'center'}}>\n Nothing found for {this.state.searchTerm}\n </Text>\n <Text style={{marginBottom: 60}}>\n Try the full book's name. The search is case insensitive.\n </Text>\n <Button\n title=\"See full list\"\n onPress={() =>this.setState({error: false, book: null})}\n />\n </CardSection>\n )\n }\n if (this.state.book) {\n /*if search is good, show result*/\n var book = this.state.book;\n return (\n <SearchResult book={ book } searchTerm={ this.state.searchTerm } />\n )\n } else {\n /*show the full list of books*/\n var data = this.props.booksQuery;\n if (data.loading) {\n return (<Text>Loading list...</Text>);\n } else {\n return data.books.map(book => { \n return (\n <TouchableOpacity\n key={ book._id }\n onPress={ () => this.props.navigation.navigate('BookDetail', { book }) }>\n <BookListInfo\n book={ book }\n />\n </TouchableOpacity>\n )\n });\n }\n }\n }", "function BooksListShelf (props) {\n const { id, title, booksList, onBookChange } = props;\n\n return (\n <div className={`bookshelf ${id}`}>\n <h2 className=\"bookshelf-title\">{title}</h2>\n <div className=\"bookshelf-books\">\n <BooksGrid\n booksList={booksList}\n onBookChange={onBookChange}\n />\n </div>\n </div>\n )\n}", "static displayBooks() {\n const books = Store.getBooks();\n books.forEach(function (book) {\n const ui = new UI();\n ui.addBookToList(book);\n })\n\n }", "display(bookshelf){\n this.bookshelf = bookshelf;\n\n switch(this.bookshelf){\n case 'store':\n this.books = this.searchResults;\n break;\n case 'bookmarks':\n this.books = this.bookmarks;\n break;\n case 'favorites':\n this.books = this.favorites;\n break;\n }\n }", "static displayBooks() {\n //get the books from storage like we did for add book\n const books = Store.getBooks();\n\n // loop through the books\n books.forEach(function(book){\n // Instantiate the UI class to display each book in UI\n const ui = new UI\n\n // Add book to UI\n ui.addBookToList(book);\n });\n\n }", "function getBookList() {\n\t\ttoggleControls(\"on\");\n\t\tif(localStorage.length === 0) {\n\t\t\talert(\"Your bookshelf was empty so example books were added\");\n\t\t\tautofillData();\n\t\t}\n\t\tvar list = $.find('#listOfBooks');\n\t\t$('#bookList').attr('id', 'items');\n\t\tfor (var i = 0, j = localStorage.length; i < j; i++) {\n\t\t\tvar makeLi = $('<li class=\"bookItem\"></li>').appendTo(list);\n\t\t\tvar linksLi = $('<li class=\"bookLink\"></li>').appendTo(list);\n\t\t\tvar key = localStorage.key(i);\n\t\t\tvar value = localStorage.getItem(key);\n\t\t\tvar object = JSON.parse(value);\n\t\t\tfor(var x in object){\n\t\t\t\t$('<p>' + object[x][0] + object[x][1] + '</p>').appendTo(makeLi);\n\t\t\t}\n\t\t\tmakeBookLinks(localStorage.key(i), linksLi);\n\t\t}\n\t\t$('#listOfBooks').listview('refresh');\t\n\t}", "function mapStateToProps(state) {\n // Whatever is returned here will show up as props in BookList\n // If the state ever changes, this container will instantly re-render\n return {\n books: state.books\n };\n}", "async getBooks() {\n if(this.props.currentUser) {\n var bookIdList = this.props.currentUser[\"library\"][\"to_read_list\"];\n if(bookIdList === null) {\n bookIdList = [];\n this.setState({isLoading: false});\n }\n\n var bookList = [];\n\n // Get details from Cache or API and add to list - skip if not available\n for (let i = 0; i < bookIdList.length; i++) {\n var book = await this.props.getBookDetails(bookIdList[i]);\n if(book === null) {\n continue;\n }\n\n if(this.state.searchString === \"\" || (this.state.searchString !== \"\" && ((book.Title.toLowerCase().indexOf(this.state.searchString.toLowerCase()) !== -1) || book.Authors.join(\"\").toLowerCase().indexOf(this.state.searchString.toLowerCase()) !== -1))) {\n bookList.push(book);\n }\n\n }\n await this.setState({toReadList: bookList, isLoading: false});\n\n // Add books to cache\n this.props.addBooksToCache(bookList);\n } else {\n this.setState({isLoading: false});\n }\n\n }", "render() {\n let authorList = this.props.propAuthors.map(author => (\n <AuthorCard authorCardProp={author} />\n ));\n return (\n <div className=\"authors\">\n <div className=\"row\">{authorList}</div>\n </div>\n );\n }", "render() {\n\t\tvar books = this.props.books;\n\t\tvar user = this.props.user.user;\n\t\t// -- FILTERS --\n\t\t// filter user owned books\n\t\tvar myBooks = books && user.books ?\n\t\t\tbooks.filter(e=>e.book.ownerId === user.id) \n\t\t\t:null;\n\n\t\t// - my trade -\n\t\t// filter trade request from user\n\t\tvar myTrade = myBooks ?\n\t\t\tmyBooks.filter(e=>e.book.request.length)\n\t\t\t:null;\n\t\tvar myTradeApproved = myTrade ?\n\t\t\tmyTrade.filter(e=>e.book.traded)\n\t\t\t:null;\n\t\tvar myTradePending = myTrade ?\n\t\t\tmyTrade.filter(e=>!e.book.traded)\n\t\t\t:null;\n\n\t\t// - sent trade -\n\t\t// filter traded request by user\n\t\tvar sentTrade = books && user.books.requested ?\n\t\t\tbooks.filter(e=>e.book.request.filter(f=>f.userId === user.id).length)\n\t\t\t:null;\n\t\tvar sentTradeApproved = sentTrade ?\n\t\t\tsentTrade.filter(e=>e.book.request.filter(f=>f.userId === user.id)[0].accepted)\n\t\t\t:null;\n\t\tvar sentTradeDenied = sentTrade ?\n\t\t\tsentTrade.filter(e=>e.book.request.filter(f=>e.book.traded && (sentTradeApproved ? !sentTradeApproved.filter(ff=>ff.book.bookId === e.book.bookId).length : false)).length)\n\t\t\t:null;\n\t\tvar sentTradePending = sentTrade && sentTradeApproved ?\n\t\t\tsentTrade.filter(e=>!sentTradeApproved.filter(f=>f.book.bookId === e.book.bookId).length)\n\t\t\t:sentTrade;\n\t\tsentTradePending = sentTradePending && sentTradeDenied ?\n\t\t\tsentTradePending.filter(e=>!sentTradeDenied.filter(f=>f.book.bookId === e.book.bookId).length)\n\t\t\t:sentTradePending;\n\n\t\t// - all books duplicate -\n\t\t// filter duplicates from myBooks\n\t\tbooks = books && myBooks ?\n\t\t\tbooks.filter(e=>!myBooks.filter(f=>f.book.bookId === e.book.bookId).length)\n\t\t\t:books;\n\t\t// filter duplicates from sentTrade\n\t\tbooks = books && sentTrade ?\n\t\t\tbooks.filter(e=>!sentTrade.filter(f=>f.book.bookId === e.book.bookId).length)\n\t\t\t:books;\n\t\t// filter out all traded books\n\t\tbooks = books.filter(e=>!e.book.traded);\n\n\t\t// - myBooks duplicate -\n\t\t// filter duplicates from myTrade\n\t\tmyBooks = myBooks && myTrade ?\n\t\t\tmyBooks.filter(e=>!myTrade.filter(f=>f.book.bookId === e.book.bookId).length)\n\t\t\t:myBooks;\n\t\t// -- END OF FILTERS --\n\n\t\t// -- RENDERS --\n\t\tvar renderMyBooks = myBooks ? myBooks.map((e,i)=>\n\t\t <img key={i}\n\t\t\t src={e.book.thumbnail}\n\t\t\t data-value={e.book.bookId}\n\t\t\t onClick={this.removeBook.bind(this)}\n\t\t />)\n\t\t\t:null;\n\t\t// - my trade -\n\t\tvar renderMyTradeApproved = myTradeApproved ? myTradeApproved.map((e,i)=>\n \t\t<div key={i}>\n \t\t\t<img\n\t\t\t\t data-value={e.book.bookId}\n\t\t \t\tsrc={e.book.thumbnail}\n\t\t \t/>\n\t\t \t<p>{e.book.request.filter(f=>f.accepted)[0].username}</p>\n \t\t</div>)\n\t\t\t:null;\n\t\tvar renderMyTradePending = myTradePending ? myTradePending.map((e,i)=>\n \t\t<div key={i}>\n \t\t\t<img\n\t\t\t\t data-value={e.book.bookId}\n\t\t \t\tsrc={e.book.thumbnail}\n\t\t \t\tonClick={this.openRequestModal.bind(this)}\n\t\t \t/>\n \t\t</div>)\n\t\t\t:null;\n\n\t\t// - sent trade -\n\t\tvar renderSentTradeApproved = sentTradeApproved ? sentTradeApproved.map((e,i)=>\n \t<div key={i}>\n \t\t<img\n\t\t\t\t data-value={e.book.bookId}\n\t \tsrc={e.book.thumbnail}\n\t />\n\t <p>{e.book.ownerUsername}</p>\n \t</div>)\n\t\t\t:null;\n\t\tvar renderSentTradeDenied = sentTradeDenied ? sentTradeDenied.map((e,i)=>\n \t<div key={i}>\n \t\t<img\n\t\t\t\t data-value={e.book.bookId}\n\t \tsrc={e.book.thumbnail}\n\t \tonClick={this.removeRequest.bind(this)}\n\t />\n \t</div>)\n\t\t\t:null;\n\t\tvar renderSentTradePending = sentTradePending ? sentTradePending.map((e,i)=>\n \t<div key={i}>\n \t\t<img\n\t\t\t\t data-value={e.book.bookId}\n\t \tsrc={e.book.thumbnail}\n\t \tonClick={this.removeRequest.bind(this)}\n\t />\n \t</div>)\n\t\t\t:null;\n\n\t\tvar renderAllBooks = books ? books.map((e,i)=>\n <img key={i}\n \tsrc={e.book.thumbnail}\n\t\t\t data-value={e.book.bookId}\n \tonClick={this.addRequest.bind(this)}\n />)\n\t\t\t:null;\n\t\t// -- END OF RENDERS --\n\n\t\t// -- MODAL --\n\t\tvar modalBook = myTrade.filter(e=>e.book.bookId === this.state.requestModalId)[0];\n\t\tvar modalRender = modalBook ? (\n\t\t\t<div className=\"modal-div\">\n\t\t\t\t<img src={modalBook.book.thumbnail} />\n\t\t\t\t{modalBook.book.request.map((e,i)=>\n\t\t\t\t\t<div key={i}>\n\t\t\t\t\t\t<span>{e.username}</span>\n\t\t\t\t\t\t<button className=\"modal-btn\"\n\t\t\t\t\t\t\tdata-userId={e.userId}\n\t\t\t\t\t\t\tdata-bookId={modalBook.book.bookId}\n\t\t\t\t\t\t\tonClick={this.acceptRequest.bind(this)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tAccept\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</div>\n \t) :null;\n\t\t// -- END OF MODAL --\n\n\t\t// render\n\t\treturn (\n\t\t\t<section id=\"books\">\n\t\t\t\t<div className=\"book-container\" id=\"my-books\">\n\t\t\t\t\t<h1>My books (click to remove)</h1>\n\t\t\t\t\t<div className=\"book-list\">\n\t\t\t\t\t\t{renderMyBooks}\n\t\t\t\t\t</div>\n\t\t\t\t\t<input type=\"text\" className=\"text-input\" placeholder=\"Search book here\" onKeyDown={this.addBook.bind(this)}/>\n\t\t\t\t</div>\n\t\t\t\t<div className={\"book-container\"\n\t\t\t\t\t+ (myTrade.length ? \"\":\" hidden\")\n\t\t\t\t\t+ (this.state.showReceivedRequest ? \" request-open\":(\" request-closed\" + (myTradePending.length ? \" pending\" : \"\")))\n\t\t\t\t}>\n\t\t\t\t\t<h1 className=\"h1-click\" onClick={()=>this.setState({showReceivedRequest:!this.state.showReceivedRequest})}>\n\t\t\t\t\tReceived request <span className={\"counter\" + (myTradePending.length && !this.state.showReceivedRequest ? \"\":\" hidden\")}>{myTradePending.length ? myTradePending.length : null}</span>\n\t\t\t\t\t<span className={this.state.showReceivedRequest ? \"hidden\" : \"\"}> (click to view)</span></h1>\n\t\t\t\t\t<div className={this.state.showReceivedRequest ? \"\":\"hidden\"}>\n\t\t\t\t\t\t<div className=\"book-outer-container\">\n\t\t\t\t\t\t\t<div className={\"book-inner-container \" + (renderMyTradeApproved.length ? \"\":\"hidden\")}>\n\t\t\t\t\t\t\t\t<h1>Approved</h1>\n\t\t\t\t\t\t\t\t<div className=\"book-list\">\n\t\t\t\t\t\t\t\t\t{renderMyTradeApproved.length ? renderMyTradeApproved :null}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className={\"book-inner-container \" + (renderMyTradePending.length ? \"\":\"hidden\")}>\n\t\t\t\t\t\t\t\t<h1>Pending</h1>\n\t\t\t\t\t\t\t\t<div className=\"book-list\">\n\t\t\t\t\t\t\t\t\t{renderMyTradePending.length ? renderMyTradePending :null}\n\t\t\t\t\t\t\t\t</div>\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</div>\n\t\t\t\t<div className={\"book-container\"\n\t\t\t\t\t+ (sentTrade.length ? \"\":\" hidden\")\n\t\t\t\t\t+ (this.state.showSentRequest ? \" request-open\":(\" request-closed\" + (sentTradePending.length ? \" pending\" : \"\")))\n\t\t\t\t}>\n\t\t\t\t\t<h1 className=\"h1-click\" onClick={()=>this.setState({showSentRequest:!this.state.showSentRequest})}>\n\t\t\t\t\tSent request <span className={\"counter\" + (sentTradePending.length && !this.state.showSentRequest ? \"\":\" hidden\")}>{sentTradePending.length ? sentTradePending.length :null}</span>\n\t\t\t\t\t<span className={this.state.showSentRequest ? \"hidden\" : \"\"}> (click to view)</span></h1>\n\t\t\t\t\t<div className={this.state.showSentRequest ? \"\":\"hidden\"}>\n\t\t\t\t\t\t<div className=\"book-outer-container\">\n\t\t\t\t\t\t\t<div className={\"book-inner-container \" + (renderSentTradeApproved.length ? \"\":\"hidden\")}>\n\t\t\t\t\t\t\t\t<h1>Approved</h1>\n\t\t\t\t\t\t\t\t<div className=\"book-list\">\n\t\t\t\t\t\t\t\t\t{renderSentTradeApproved.length ? renderSentTradeApproved :null}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className={\"book-inner-container \" + (renderSentTradeDenied.length ? \"\":\"hidden\")}>\n\t\t\t\t\t\t\t\t<h1>Denied</h1>\n\t\t\t\t\t\t\t\t<div className=\"book-list\">\n\t\t\t\t\t\t\t\t\t{renderSentTradeDenied.length ? renderSentTradeDenied :null}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className={\"book-inner-container \" + (renderSentTradePending.length ? \"\":\"hidden\")}>\n\t\t\t\t\t\t\t\t<h1>Pending</h1>\n\t\t\t\t\t\t\t\t<div className=\"book-list\">\n\t\t\t\t\t\t\t\t\t{renderSentTradePending.length ? renderSentTradePending :null}\n\t\t\t\t\t\t\t\t</div>\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</div>\n\t\t\t\t<div className=\"book-container\" id=\"all-books\">\n\t\t\t\t\t<h1>Browse books (click to send request)</h1>\n\t\t\t\t\t<div className=\"book-list\">\n\t\t\t\t\t\t{renderAllBooks}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div className={(this.state.requestModalOpen ? \"modal\":\" hidden\")}>\n\t\t\t\t\t{modalRender}\n\t\t\t\t\t<button className=\"modal-btn\"\n\t\t\t\t\t\tonClick={()=>{this.setState({requestModalOpen:false})}}>\n\t\t\t\t\t\tCancel\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t</section>\n )\n }", "function BookList() { // must be capital letter for functionality\n return (\n <section className='booklist'>\n <Book />\n <Book />\n <Book />\n <Book />\n <Book />\n <Book />\n </section>\n );\n}", "render () {\n const { query } = this.state\n const { searchedBooks, onUpdateShelf } = this.props\n console.log('SearchBooks - searchedBooks', searchedBooks)\n\n return (\n <div className='search-books'>\n <div className='search-books-bar'>\n <Link \n className='close-search'\n to='/'>\n Close\n </Link>\n <div className='search-books-input-wrapper'>\n <input\n className='search-books-input'\n type='text'\n placeholder='Search by title or author'\n value={query}\n onChange={ (event) => { if (event.target.value === '') {\n this.clearQuery()\n } else {\n this.updateQuery(event.target.value)\n }\n }\n }\n />\n </div>\n </div>\n \n <div className='search-books-results'>\n <div className='showing-books'> \n <span> Now showing {searchedBooks.length} books </span>\n <button onClick={this.clearQuery}>Clear query</button>\n </div>\n <ol className='books-grid'> \n {searchedBooks.map((book) => (\n <li key={book.id} className='book-list-item'>\n < Book \n book={book}\n onUpdateShelf={onUpdateShelf}\n query={query}\n />\n </li>\n ))}\n </ol>\n </div> \n </div>\n )\n }", "componentWillMount() {\n //use set state method to alter books variable\n this.setState({\n books: books\n });\n}", "static displayBooks() {\n\t\tconst books = Store.getBooks();\n\t\tbooks.forEach(function (book) {\n\t\t\tconst ui = new UI();\n\t\t\tui.addBookToList(book);\n\t\t});\n\t}", "display(book) {\n this._book = book;\n }", "componentDidMount() {\n //TODO maybe change this to only get the bid we care about\n this.props.bidList();\n }", "renderBatmanListings() {\n const { batmanListings } = this.props;\n const listingsArr = [];\n each(batmanListings, (listing) => {\n listingsArr.push(<Listing {...listing} />); \n })\n return listingsArr;\n }", "render() {\n const { results } = this.state;\n const { updateShelf, checkShelf } = this.props;\n\n return (\n <div className=\"search-books\">\n <div className=\"search-books-bar\">\n <Link className=\"close-search\" to=\"/\">\n Close\n </Link>\n <div className=\"search-books-input-wrapper\" />\n <input\n onChange={event => {\n this.handleChange(event.target.value);\n }}\n type=\"text\"\n placeholder=\"Search by title or author\"\n />\n </div>\n\n <div className=\"search-books-results\">\n <ol className=\"books-grid\">\n\n {typeof results === \"string\" && <h2>{this.state.results}</h2>}\n {typeof results === \"object\" &&\n results.map(book => {\n checkShelf(book);\n\n let id;\n if (book.id && book.title && book.authors) {\n id = book.id;\n }\n else if (!book.authors) {\n book.authors = [\"Unknown\"];\n id = book.id;\n } else if (!book.title) {\n book.title = \"Unknown\";\n id = book.id;\n }\n if (book.shelf) {\n return (\n <Book\n key={id}\n shelf={book.shelf}\n updateShelf={updateShelf}\n bookObject={book}\n />\n );\n } else {\n return (\n <Book\n key={book.id}\n shelf=\"none\"\n updateShelf={updateShelf}\n bookObject={book}\n />\n );\n }\n })}\n </ol>\n </div>\n </div>\n );\n }", "updateInfo(books){\n this.setState({\n books: books.items\n })\n }", "function Book({ book, onShelfChange }) {\n const { title, authors = [], imageLinks } = book;\n return (\n <div className=\"book\">\n <div className=\"book-top\">\n <div\n className=\"book-cover\"\n style={{\n width: 128,\n height: 193,\n // some books come without imageLinks proprty\n backgroundImage: `url(${imageLinks && imageLinks.thumbnail})`,\n }}\n />\n <BookShelfChanger book={book} onShelfChange={onShelfChange} />\n </div>\n <div className=\"book-title\">{title}</div>\n {/* authors come as an array with one or more author*/}\n {authors.map((author) => (\n <div key={author} className=\"book-authors\">\n {author}\n </div>\n ))}\n </div>\n );\n}", "render() {\n items.innerHTML = myLibrary.map((book) => {\n return `\n <div id=\"book-item\">\n <p>${book.title}</p>\n <p>${book.author}</p>\n <p>${book.pages}</p>\n <div class=\"item-prop\">\n <button id=\"btnStatus\" class=\"${book.status}\"><i class=\"fas fa-check\"></i></button>\n <button id=\"btnDel\" data-id=\"${book.id}\"><i class=\"fas fa-trash\"></i></button>\n </div>\n </div>`;\n }).join('');\n\n let statusBtn = document.querySelectorAll('#btnStatus');\n let delBtn = document.querySelectorAll('#btnDel');\n\n let bookList = new BookList();\n statusBtn.forEach(btn => {\n btn.addEventListener('click', (e) => bookList.updateBook(e));\n });\n \n delBtn.forEach(btn => {\n btn.addEventListener('click', (e) => bookList.deleteBook(e));\n });\n }", "function App() {\n return (\n <div className='App'>\n <section className='books-list'>\n <h1>Books</h1>\n {books.map((book, index) => {\n // let a = 1\n // const { title, author, image, price } = book\n return (\n <Book key={index} {...book}>\n {/* Children */}\n <p>Children</p>\n </Book>\n )\n })}\n </section>\n </div>\n )\n}", "books(parent) {\n\t\t\tconsole.log('parent!!')\n\t\t\t\treturn dataSources.bookService.getAuthorBooks(parent.id);\n\t\t}", "function Book({ title, subtitle, authors, link, description, image, Button }) {\n // return the component\n return (\n // JSX for the component\n <ListItem>\n <Row className=\"flex-wrap-reverse\">\n <Col size=\"md-8\">\n {/* pass <h3> tag into title prop */}\n <h3 className=\"font-italic\">{title}</h3>\n {/* subtitle prop and <h5> tag with \"font-italic\" className*/}\n {subtitle && <h5 className=\"font-italic\">{subtitle}</h5>}\n </Col>\n <Col size=\"md-4\">\n <div className=\"btn-container\">\n <a className=\"btn btn-light\" target=\"_blank\" rel=\"noopener noreferrer\" href={link}>\n View\n </a>\n <Button />\n </div>\n </Col>\n </Row>\n <Row>\n <Col size=\"md-6\">\n {/* paragraph tag with authors prop */}\n <p className=\"font-italic small\">Written by {authors}</p>\n </Col>\n </Row>\n <Row>\n <Col size=\"12 sm-4 md-2\">\n {/* img with src attribute set to image prop and alt attribute set to title prop */}\n <img className=\"img-thumbnail img-fluid w-100\" src={image} alt={title} />\n </Col>\n <Col size=\"12 sm-8 md-10\">\n {/* <p> tag with description prop passed in */}\n <p>{description}</p>\n </Col>\n </Row>\n </ListItem>\n );\n}", "function returnToList() {\r\n id(\"book-list\").classList.remove(\"hidden\");\r\n id(\"single-book\").classList.add(\"hidden\");\r\n id(\"back\").classList.add(\"hidden\");\r\n }", "render() {\n const bookmarkItems = this.state.bookmarks.map(item => (\n <BookmarkItem\n key={item.id}\n item={item}\n copyUrl={this.copyUrl}\n isCopied={this.state.isCopied}\n displayTooltip={this.displayTooltip}\n />\n ));\n return (\n <div className=\"bookmark-list-container\">\n <div className=\"bookmark-list\">{bookmarkItems}</div>\n </div>\n );\n }", "createMyListForReadList(state, book) {\n\t\t\tstate.takeImgForShowInCreateReadList = book.id;\n\t\t}", "getBooks() {\n return this.service.sendGetRequest(this.books);\n }", "function Book(book) {\n this.title =data.volumeInfo.title ;\n this.author=data.volumeInfo.author;\n this.description=data.volumeInfo.description || *** Description current unavailable ***;\n this.thumbnail = data.volumeInfo.imageLinks.thumbnail || null;\n this.url = ;\n}", "getGrabBookings() {\n return this.grabBooking;\n }", "function Book(obj) {\n this.image = obj.volumeInfo.imageLinks ? obj.volumeInfo.imageLinks.thumbnail : `https://i.imgur.com/J5LVHEL.jpg`;\n this.title = obj.volumeInfo.title ? obj.volumeInfo.title : 'Title not available';\n this.author = obj.volumeInfo.authors ? obj.volumeInfo.authors : 'Author(s) not available';\n this.description = obj.volumeInfo.description ? obj.volumeInfo.description : 'Description not available';\n this.isbn = obj.volumeInfo.industryIdentifiers ? obj.volumeInfo.industryIdentifiers[0].identifier : 'N/A';\n this.bookshelf = obj.volumeInfo.categories ? obj.volumeInfo.categories[0] : 'No Categories';\n}", "getbooks(){\r\n BooksAPI.getAll().then((books) => {\r\n // add books to state\r\n this.setState({ books })\r\n })\r\n }", "componentDidMount() {\n BooksAPI.getAll()\n .then(resp => {\n console.log(resp);\n // Add the resp(onse) to component state which is an array of bookshelf\n // When setState is called, it'll force a rerender; render() runs again\n this.setState({ books: resp });\n });\n }", "render() {\n const {loading, listOfItems} = this.state;\n return (\n <div className='itemsPage'>\n <h1>ITEMS LIST</h1>\n {!loading && listOfItems.map(item => {\n\n if (!item.isBought) {\n return (<ListItem key={item._id} updateList={this.getAllItems} item={item}/>)\n }\n })\n }\n </div>\n )\n }", "function Book(title, pages){\n //call the \"parent\" (LibraryItem) constructor function\n //shares Book's \"this\" with the LibraryItem constructor\n LibraryItem.call(this);\n\n this.title = title;\n this.pages = pages;\n}", "getProps() {\n let result = super.getProps();\n result.items = result.items ? result.items: [];\n result.multiple = result.multiple ? result.multiple : false;\n result.onClose = result.onClose ? result.onClose: () => {}\n return result;\n }", "function Results({booksProp}){\n\n return(\n <Card className=\"my-3\">\n <Card.Body>\n {booksProp.length \n ? (\n <div>\n <h2>Results</h2>\n {booksProp.map((book)=>( //we're defining book here as the argument which is why we can use bookProp to pass into the SaveBookButton below\n <Card \n className=\"my-3\"\n key={book.id}\n >\n <Card.Body>\n <p>{book.title}</p>\n <p>{book.description}</p>\n <SaveBookButton bookProp={book}/>\n </Card.Body>\n </Card>\n ))}\n </div>\n )\n\n :\n <h2>no results</h2>}\n </Card.Body>\n </Card>\n )\n\n\n\n}", "render(){\n \n return (\n <ul>\n {this.props.list} \n </ul>\n );\n }", "render() {\n const {error,isLoaded,items} = this.state\n if(error) {return <div>Error: {error.message} </div>\n } else if(!isLoaded){ return <div>Loading...</div>\n }else {return (\n <div>\n <h2>Results</h2>\n <div>\n {items.map(audiobook =>\n <div>\n <div className='audiobook'>\n <img id={'img'+ audiobook.book} src={audiobook.poster}/>\n <h4 id={'book'+audiobook.book}>{audiobook.book}</h4>\n <h4 id={'description'+audiobook.book}>{audiobook.description}</h4>\n <button onClick={this.audioBookAdd} id={audiobook.book}>My list</button>\n </div>\n </div>\n )}\n </div>\n </div>\n\n )}\n }", "constructor() {\n super()\n this.state = {\n books: null, // we will load the books via the API\n }\n }", "render(){\n return (\n <ol className=\"venue-list\" role=\"ListBox\">\n {this.props.venues && this.props.venues.map((venue) => <VenueItem key={venue.id} {...venue} itemOnClick={this.props.itemOnClick}/>)}\n </ol>\n )\n }", "createListItems() {\n // map the property(Allposts array)\n return this.props.AllPosts.map((post) => {\n return (\n <li key={post.id}>Title: {post.title} <br></br> Body:{post.body}</li>\n )\n })\n }", "function booksInstore() {\n return booksForRent;\n }", "render() {\n let filteredItems = [];\n const selectedCategory = this.props.selectedCategory; // here we get the selected category from the props in app.js\n for (const book of this.state.books) {\n if (book.subjects.includes(selectedCategory)) {\n // we filter the items according to selected category\n filteredItems.push(\n // and then push the filtered ones to the filtereditems\n <BookVal\n key={book.id}\n book={book}\n setSelectedItem={this.setSelectedItem.bind(this)}\n />\n );\n }\n }\n\n return (\n // rendering, we show the filtereditems here.\n <div>\n <div className=\"row bg-dark\">\n <div className=\"col-sm-8\">\n <h3 className=\"text-muted\">Title</h3>\n </div>\n <div className=\"col-sm-4\">\n <h3 className=\"text-muted\">Author</h3>\n </div>\n </div>\n {filteredItems}\n </div>\n );\n }", "renderItems(){\n\t\tconst props = _.omit(this.props,'todos');\n\t\treturn _.map(this.props.todos,\n\t\t\t\t\t(todo,index) => <TodosListItems key={index} {...todo} {...props}/> \n\t\t); \n\t}" ]
[ "0.68963075", "0.68839914", "0.68390006", "0.6826518", "0.6753056", "0.6741753", "0.67388344", "0.67057574", "0.66483325", "0.6616843", "0.65860116", "0.6584993", "0.6563835", "0.6536971", "0.6520957", "0.64713", "0.6434384", "0.6414625", "0.6372261", "0.6366465", "0.6365629", "0.6361028", "0.6326177", "0.6306508", "0.6303895", "0.6283414", "0.6283357", "0.6263504", "0.6260096", "0.6258138", "0.6239032", "0.6239018", "0.6235273", "0.6225399", "0.618353", "0.61779404", "0.6168433", "0.613141", "0.6129397", "0.6109888", "0.60986406", "0.6086653", "0.607197", "0.6062665", "0.6043985", "0.60401237", "0.60055596", "0.5997814", "0.59955037", "0.5978298", "0.59709865", "0.5964849", "0.596288", "0.5948633", "0.5938621", "0.5919738", "0.59161526", "0.5899065", "0.5897692", "0.58897907", "0.5879666", "0.58731633", "0.58697087", "0.58671916", "0.5865533", "0.58552724", "0.58481586", "0.5848096", "0.5834006", "0.5825039", "0.582008", "0.5808777", "0.58078146", "0.57935303", "0.57901835", "0.5789389", "0.5781459", "0.57680345", "0.57676333", "0.5765021", "0.57635444", "0.57382095", "0.57367325", "0.5730495", "0.57199967", "0.57161653", "0.57028335", "0.57024056", "0.56873727", "0.5684088", "0.56633884", "0.56631", "0.5651358", "0.5644581", "0.56412", "0.5636784", "0.56350285", "0.5634922", "0.56196004", "0.5617546", "0.56108874" ]
0.0
-1
Map Redux state to component props
function mapStateToProps(state) { return {}; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mapStateToProps (state) {\n //return object of what you want to pass to component as a prop\n\n}", "function mapStateToProps(state){\n // whatever you return here will be put on the props object for this component;\n // the key in this object will be the key on the props object\n // the value for the key in this object will be the value for the key on the props object\n return{\n name: state.name,\n description: state.description\n }\n}", "function mapStateToProps(state) {\n console.log('App.js mapStateToProps: mapping Redux state <-> React component props');\n return {\n countValue: state.count\n }\n}", "function mapStateToProps(state) {\n // whatever gets returned will show up as props inside of dispatch fun\n return {\n theme: state.theme, \n layout: state.layout, \n weapons: state.weapons,\n targets: state.targets,\n options: state.options,\n history: state.history\n };\n}", "function mapStateToProps(state) {\n return {\n data: state,\n };\n}", "function mapStateToProps(state){\n return {\n //the left side key must be the name of the prop that you want to put info in\n count:state.currentCount\n //the right side value is the name of the state\n }\n }", "function mapStateToProps(state, props) {\n return {\n count: state.count,\n incrValues: state.incrValues\n }\n}", "function mapStateToProps(state) {\r\n return {\r\n // propertyname : stateValue\r\n counter : state.counter\r\n }\r\n}", "function mapStateToProps(state) {\n return {\n // property name: value from state\n counter: state.counter\n }\n}", "function mapStateToProps(state) {\n // whatever is returned will show up as props inside of ThreadList\n return { threads: state.threads }\n}", "function mapStateToProps(state, props) {\r\n return {\r\n loading: state.dataReducer.loading,\r\n data: state.dataReducer.data\r\n }\r\n}", "function mapStateToProps(state) {\r\n\tconst { counter } = state\r\n\treturn {\r\n\t\t// these names will appear on the container props\r\n\t\tcounter\r\n\t}\r\n}", "function mapStateToProps(state, props) {\n return {\n loading: state.dataReducer.loading,\n data: state.dataReducer.data\n }\n}", "function mapStateToProps(state) {\n return {\n Location: state.Location,\n Property: state.Property,\n Income: state.Income,\n IncomeLoading: state.IncomeLoading\n }\n}", "function mapStateToProps(state) {\n // Whatever is returned from here it shows up as props\n return {\n asd: '123',\n books: state.books\n };\n}", "function mapStateToProps(state, ownProps) {\r\n return { categoryList: state.activityCreation.categoryList, projectList: state.documentCreation.projectList, individualList: state.opportunity.individualList, oppList: state.documentCreation.oppList };\r\n}", "function mapStatetoProps(state){\n // this function will return an object\n // property will be the props in this component\n // the value will be the piece of state from the reducer \n return{\n students: state.students\n } \n}", "function mapStateToProps(state, props) {\n return {\n loading: state.dataReducer.loading,\n messages: state.dataReducer.messages,\n cards: state.dataReducer.cards\n }\n}", "function mapStateToProps(state) {\n // Categories is what we want to be available on our props. \n // When you use combine reducers, you have to specify state.categories or state.whatever and \n // not just state or else it gives you error. \n return { categories: state.categories, categoryData: state.categoryData}\n}", "function mapStateToProps(state) {\n return {\n counter: state.counter,\n incrementBy: state.incrementBy,\n clickCount: state.clickCount,\n }\n}", "function mapStateToProps(state) {\n return {\n popupState: state.popupState,\n dataStore: state.dataStore\n }\n}", "function mapStateToProps(state) {\n return {};//just maintain only one level of state/ otherwise you can't get the child obj props\n}", "function mapStateToProps(state){\n return {\n //the left side key must be the name of the prop that you want to put info in\n temp:state.currentTemp\n //the right side value is the name of the state\n }\n }", "function mapStateToProps(state) {\n return {\n stateName: state.name,\n isLogged: state.isLogged,\n stateID: state.id\n };\n}", "function mapStateToProps(state) {\r\n\treturn {\r\n\t\ttree: state.tree,\r\n\t\ttraversed: state.traversed,\r\n\t\tdata: state.dgmData.data\r\n\t};\r\n}", "function mapStateToProps(state) {\n return {\n canvas: state.canvas.data,\n context: state.context.data\n };\n}", "function mapStateToProps(state, props) {\n return state.toJS();\n}", "function mapStateToProps(state) {\n return {msg: state.msg};//just maintain only one level of state/ otherwise you can't get the child obj props\n}", "function mapStateToProps(state){\n\treturn state\n}", "function mapStateToProps(state) {\n return {\n value: state.counter\n };\n}", "function mapStateToProps(state) {\n return {\n height: state.height,\n width: state.width,\n depth: state.depth\n }\n}", "function mapStateToProps (state)\n{\n return state;\n}", "function mapStatetoProps(state) {\n return state;\n}", "function mapStateToProps(state) {\n return {\n context: state.context,\n selected: state.selected,\n sortBy: state.sortBy,\n dex: dex,\n options: options,\n date: date\n }\n}", "function mapStateToProps(state) {\n return {\n // TODO: add state\n };\n}", "function mapStateToProps(state) {\n\treturn {\n\t\tdata: state.page.data,\n\t\tnavigation: state.layout.navigation\n\t};\n}", "function mapStateToProps(state) {\n return {\n category: state.activeCategory,\n meal: state.activeMeal\n };\n}", "function mapStateToProps(reduxStoreState) {\n return { weather: reduxStoreState.weather };\n}", "function mapStateToProps(state, props) {\n return {\n }\n}", "function mapReduxStateToProps(state) {\n const { counter } = state;\n return {\n counter\n };\n}", "function mapStateToProps(state) {\r\n return { tiles: state.map.tiles };\r\n}", "function mapStateToProps(state) {\n return {\n counter: state.counter\n };\n}", "function mapStateToProps (state) {\n return {\n name: state.name,\n address: state.address,\n city: state.city,\n state: state.state,\n zip: state.zip\n }\n}", "function mapStateToProps(state) {\n return {\n\n }\n}", "function mapStateToProps(state) {\n return {\n\n }\n}", "function mapStateToProps() {\r\n return {\r\n };\r\n}", "function mapStateToProps(state, props) {\n return {\n concepts: state.concepts.concepts,\n concept_types: state.concept_types.concept_types,\n };\n}", "function mapStateToProps(state) {\n // every reducer updates one piece of state\n // posts and comment have its own state that has a reducer to update state whenever action occurs\n return {\n posts: state.posts,\n comments: state.comments // this is now an object with Ids\n }\n}", "function mapStateToProps() {\n return {};\n}", "function mapStateToProps(state) {\n\treturn state; \n}", "function mapStateToProps(state) {\n return {\n nodedefs: state.nodedefs,\n graphs: state.graphs,\n editor: state.editor\n };\n}", "function mapReduxToProps(state) {\n\treturn {\n buildings: state.corporation.buildings,\n building: state.selection.current_building,\n staffProfile: state.auth.staff_profile,\n s3_corporation: state.corporation.s3_corporation,\n\t}\n}", "function mapStateToProps(state) {\n return state\n}", "function mapStateToProps(state) {\n return {\n productData : state.productData.ActiveProductData,\n // userData : state.SessionStorage.UserData,\n userData : state.Consumer.GetConsumerDetail\n\n };\n}", "function mapStateToProps(state) {\n return {\n // myState: state.myState,\n }\n}", "function mapStateToProps(state) {\n return {\n name: state.name,\n renaming: state.renaming\n };\n}", "function mapStateToProps(state) {\n return state;\n}", "function mapStateToProps(state) {\n return state;\n}", "function mapStateToProps(state) {\n return state;\n}", "function mapStateToProps(state) {\n return state;\n}", "function mapStateToProps(state) {\n return {\n loadingProgress: state.loadingProgress,\n navState: state.navState,\n emailStore: state.emailStore,\n }\n}", "function mapStateToProps(state){\n const{counter} = state;\n return{\n counter\n }\n }", "function mapStateToProps(state) {\n return {\n value: state.counter.previousValue,\n dataValue: state.counter.dataValue,\n isLoding: state.statusCounter.isLoding\n }\n}", "function mapStateToProps(state) {\n // What ever is returned will show up as props inside of CardList\n return {\n // this is what took me a weekend to figure out...\n card: state.activeCard\n };\n}", "function mapStateToProps(state) {\n return {\n isLoading: state.isLoading,\n fields: state.person,\n people: state.people,\n saveStatus: state.saveStatus,\n };\n}", "function mapStateToProps(state) {\n return {\n counter: state.counter\n };\n}", "function mapStateToProps(state) {\n return {\n table: state.table.table,\n basket: state.basket,\n data: state.data,\n }\n}", "function mapStateToProps(state) {\n return state;\n}", "function mapStateToProps(state) {\n return {};\n}", "function mapStateToProps(state) {\n return {};\n}", "function mapStateToProps(state) {\n return {};\n}", "function mapStateToProps(state) {\n return {};\n}", "function mapStateToProps(state) {\n return {\n redux: state\n };\n}", "function mapStateToProps(state) {\n // mapStateToProps returns an object, with:\n // property is the local prop name to this component\n // value will be the property in the root reducer... ie., a piece of the store\n return {\n frozenData: state.frozen,\n };\n}", "function mapStateToProps(state) {\n return {\n window: state.window,\n instanceId: state.instanceId,\n entityId: state.entityId,\n lorelineId: state.lorelineId,\n };\n}", "function mapStateToProps(state) {\n return {\n \t\n gallery: state.gallery,\n statistics: state.statistics,\n allcategories: state.allcategories,\n filtercategory: state.filtercategory,\n filterfavourites : state.filterfavourites,\n filterrating: state.filterrating\n }\n}", "function mapStateToProps(state) {\n return {\n tiles: state.map.tiles\n }\n}", "function mapStateToProps(state){\n return {\n count: state.count\n };\n}", "function mapStateToProps(state) {\n //Result is shown as props of ModuleDetails\n return {\n moduleDetails: state.moduleDetails,\n selectedModules: state.selectedModules,\n student: state.student\n };\n}", "function mapStateToProps (state) {\n return state;\n}", "function mapStateToProps(state) {\n return state;\n}", "function mapStateToProps(state) {\n return state;\n}", "function mapStateToProps(state) {\n // anything returned here will\n // end up as props on this container\n return {\n recipes: state.intro_recipes.recipes,\n fetching: state.intro_recipes.fetching,\n items: state.fridge.items,\n // recipeDetails: state.recipe_details.recipeDetails\n };\n}", "function mapStateToProps(state) {\n return {\n\n }\n}", "function mapStateToProps(state) {\n return {\n counter: state\n }\n}", "function mapStateToProps(state) {\n return {\n users: state.users,\n background: state.background\n }\n}", "function mapStateToProps(state){\n\n return {\n main_coins_list: state.main_coins_list,\n search_res_list: state.search_res_list,\n compare_list: state.compare_list,\n\n view_sort_obj: state.view_sort_obj\n\n }\n\n}", "function mapStateToProps(state) {\n return { count: state.count }\n}", "function mapStateToProps(state, props) {\n return {\n }\n}", "function mapStateToProps(state) {\n return {\n\n };\n}", "function mapStateToProps(state){\n return {\n }\n}", "function mapStateToProps(state) {\n return {\n allTransactions: state.allTransactions,\n transactions: state.transactionsInRange,\n monthlyTransactionsArray: state.monthlyTransactionsArray,\n monthlyBalanceTransactionsArray: state.monthlyBalanceTransactionsArray,\n income: state.income,\n spending: state.spending,\n net: state.net\n };\n}", "function mapStateToProps() {\n return {\n };\n}", "function mapStateToProps(state) {\n //whatever is returned will show up as props inside of BookList\n return {\n books: state.books\n }\n}", "function mapStateToProps(state) {\n return {\n connectionStatus: state.connectionStatus,\n encouragementEnabled: state.encouragementEnabled,\n scene: state.scene.sceneKey,\n };\n}", "function mapStateToProps(state) {\n //whatever is returned here shows up as props in `this.props`\n return {\n books: state.books\n };\n}", "function mapStateToProps(state) {\n return {\n value: state.count\n }\n}", "function mapStateToProps(state) {\n return {\n connectionStatus: state.connectionStatus,\n session: state.session,\n };\n}" ]
[ "0.7605747", "0.7518505", "0.7467345", "0.7451045", "0.74057394", "0.7394526", "0.73661447", "0.73645", "0.7304719", "0.7303738", "0.7278673", "0.72434896", "0.7215915", "0.71984196", "0.7190983", "0.7183257", "0.7165471", "0.7145838", "0.714331", "0.7131758", "0.7127008", "0.71252084", "0.7084604", "0.7071543", "0.7028906", "0.70158064", "0.7014962", "0.70141363", "0.70138663", "0.7011853", "0.70086145", "0.70008826", "0.69977057", "0.699662", "0.69853437", "0.6967043", "0.6964918", "0.69530696", "0.69482106", "0.6947619", "0.694657", "0.69452226", "0.6930418", "0.69303906", "0.69303906", "0.6930037", "0.69287276", "0.69259566", "0.6918924", "0.691622", "0.6916125", "0.69135", "0.6907009", "0.6905162", "0.69041944", "0.6903911", "0.6899844", "0.6899844", "0.6899844", "0.6899844", "0.6899505", "0.6897615", "0.6894581", "0.6893729", "0.6892619", "0.6889868", "0.6889189", "0.6886115", "0.6884714", "0.6884714", "0.6884714", "0.6884714", "0.6880459", "0.68792987", "0.6879093", "0.6875672", "0.68729496", "0.6872891", "0.68718123", "0.6868864", "0.6865965", "0.6865965", "0.68653613", "0.68615377", "0.6851076", "0.6850665", "0.6850173", "0.68476176", "0.6846938", "0.6846549", "0.68384415", "0.68377215", "0.6828777", "0.6820672", "0.6818808", "0.6812616", "0.6811641", "0.68103844" ]
0.687417
78
Map Redux actions to component props
function mapDispatchToProps(dispatch) { return { updateCard: (card) => dispatch(changeCardView(card)) }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mapActionToProps(dispatch) { return bindActionCreators({ GetActivityAction }, dispatch); }", "function mapDispatchToProps(dispatch) {\n console.log('App.js mapDispatchToProps: mapping Redux actions <-> React component props');\n return {\n increaseCount: function() {\n return dispatch(increaseAction);\n },\n decreaseCount: function() {\n return dispatch(decreaseAction);\n }\n };\n}", "function mapActionToProps(dispatch) { return bindActionCreators({ ConfirmProductInfoAction, }, dispatch); }", "function mapActionToProps(dispatch) { return bindActionCreators({ GoProductAction }, dispatch); }", "mapActionsToComponents() {\n return {\n recipeCardActions: {\n editRecipe: this.props.editRecipe,\n cancelEditingRecipe: this.props.cancelEditingRecipe,\n doneEditingRecipe: this.props.doneEditingRecipe,\n saveRecipe: this.props.saveRecipe,\n ingredientActions: {\n editIngredient: this.props.editIngredient,\n cancelEditingIngredient: this.props.cancelEditingIngredient,\n doneEditingIngredient: this.props.doneEditingIngredient,\n addIngredient: this.props.addIngredient,\n deleteIngredient: this.props.deleteIngredient,\n cancelDeletingIngredient: this.props.cancelDeletingIngredient\n },\n processActions: {\n editStep: this.props.editStep,\n cancelEditingStep: this.props.cancelEditingStep,\n doneEditingStep: this.props.doneEditingStep,\n addStep: this.props.addStep,\n deleteStep: this.props.deleteStep,\n cancelDeletingStep: this.props.cancelDeletingStep\n }\n }\n } \n }", "function mapDispatchToProps(dispatch) {\n\treturn {\n\t\tactions: bindActionCreators(actions, dispatch) //so we don't have to use this.props.dispatch(actionName())\n\t}\n}", "function mapDispachToProps(dispatch) {\n return bindActionCreators(actionCreators, dispatch);\n}", "function mapDispatchToProps(dispatch) {\n return { actions: bindActionCreators(actions, dispatch) };\n}", "function mapDispatchToProps(dispatch) {\n return { actions: bindActionCreators(actions, dispatch) };\n}", "function mapDispatchToProps(dispatch) {\n return bindActionCreators(actions, dispatch);\n}", "function mapDispatchToProps(dispatch){\n\treturn bindActionCreators(ActionCreators, dispatch);\n}", "function mapActionToProps(dispatch) { return bindActionCreators({ SwitchTabAction }, dispatch); }", "function mapDispatchToProps(dispatch) {\n return bindActionCreators(actions, dispatch);\n}", "function mapDispatchToProps(dispatch) {\n return bindActionCreators(ACTIONS, dispatch);\n}", "function mapActionToProps(dispatch) { return bindActionCreators({ SwitchSceneAction }, dispatch); }", "function mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(actions, dispatch)\n };\n}", "function mapDispatchToProps(dispatch) { // whenever <function below> is called result should be passed to all of our\n // reducers\n return bindActionCreators({\n LayoutChange: LayoutChange,\n WeaponChange: WeaponChange,\n FireWeapon: FireWeapon,\n OptionChange: OptionChange\n }, dispatch);\n}", "function mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators({\n }, dispatch)\n };\n}", "function mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(actionsMap, dispatch),\n };\n}", "function mapDispatchToProps(dispatch){\n return bindActionCreators(actionCreators, dispatch)\n}", "function mapDispatchToProps(dispatch) {\n\nreturn bindActionCreators(actionCreators, dispatch);\n}", "function mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(actions, dispatch)\n }\n}", "function mapDispatchToProps(dispatch) {\n return { actions: bindActionCreators(actionCreators, dispatch) };\n}", "function mapDispatchToProps(dispatch) {\r\n\r\n return {\r\n actions: bindActionCreators(documentAction, dispatch),\r\n oppActions: bindActionCreators(opportunityAction, dispatch),\r\n actActions: bindActionCreators(activityAction, dispatch)\r\n };\r\n}", "function mapDispatchToProps(dispatch) {\n return bindActionCreators({},dispatch)\n}", "function mapDispatchToProps(dispatch) {\n return {\n Actions: bindActionCreators(ActionCreators, dispatch),\n };\n}", "function mapDispatchToProps(dispatch) { \n \nreturn bindActionCreators(actionCreators, dispatch);\n}", "function mapDispatchToProps(dispatch) {\n return bindActionCreators(Actions, dispatch);\n}", "function mapDispatchToProps(dispatch) {\n return bindActionCreators(Actions, dispatch);\n}", "function mapDispatchToProps(dispatch) {\n return bindActionCreators(Actions, dispatch);\n}", "function mapDispatchToProps(dispatch) {\n return bindActionCreators(Actions, dispatch);\n}", "function mapActionsToProps(dispatch) {\n return {\n buy: function () {\n dispatch(buyAction);\n },\n sell: function () {\n dispatch(sellAction);\n },\n randomize: function () {\n dispatch(exchangeAction);\n }\n };\n}", "function mapDispatchToProps(dispatch) {\n return bindActionCreators(ActionCreators, dispatch);\n}", "function mapDispatchToProps(dispatch) {\n return bindActionCreators(ActionCreators, dispatch);\n}", "function mapDispatchToProps(dispatch) {\n return bindActionCreators(ActionCreators, dispatch);\n}", "function mapActonToProps(dispatch) {\n return {\n increase: bindActionCreators(increase, dispatch),\n decrease: bindActionCreators(decrease, dispatch)\n }\n}", "function mapDispatchtoProps(dispatch) {\n return {\n // When createCourse is called dispatch this action with property\n //createCourse: course => dispatch(courseActions.createCourse(course))\n // simpler to use bindActionCreators from redux\n // bindActionCreators will go through course actions and find all actions and wrap them in a call to dispatch\n // Better this way as it allows you to manage actions in actions rather than making seperate course actions here\n actions: bindActionCreators(courseActions, dispatch)\n };\n}", "function mapDispatchToProps(dispatch) {\r\n\r\n return {\r\n actions: bindActionCreators(opportunityAction, dispatch),\r\n proActions: bindActionCreators(estimateActions, dispatch),\r\n poAction: bindActionCreators(poActions, dispatch),\r\n itemaction: bindActionCreators(itemActions, dispatch),\r\n contactactions: bindActionCreators(createContactAction, dispatch)\r\n };\r\n}", "function mapDispatchToProps(dispatch) {\n const creators = Map()\n .merge(...actions)\n .filter(value => typeof value === 'function')\n .toObject();\n\n // At this point creators is a giant object containing each action name and\n // the function for it.\n return {\n actions: bindActionCreators(creators, dispatch),\n dispatch\n };\n }", "function mapDispatchToProps(dispatch) {\n //whenever actions are called, the result should be passed to all reducers\n return bindActionCreators({\n selectEntry: selectEntry,\n fetchEntry: fetchEntry,\n fetchMedia: fetchMedia,\n }, dispatch);\n}", "function mapDispatchToProps(dispatch) {\n return bindActionCreators(ActionCreators, dispatch);\n}", "function mapDispatchToProps(dispatch) {\n return bindActionCreators(ActionCreators, dispatch);\n}", "function mapDispatchToProps(dispatch) {\n return bindActionCreators(ActionCreators, dispatch);\n}", "function mapDispatchToProps(dispatch) {\n return bindActionCreators(ActionCreators, dispatch);\n}", "function mapDispatchToProps(dispatch) {\n return bindActionCreators({\n ...PatientsAction,\n }, dispatch);\n}", "function mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(courseActions, dispatch) //will find all actions in courseActions, and map them to dispatch\n //so your component will have access to all of them\n //you could however specify one single action in the bindActionCreators like so: (courseActions.createCourse,..)\n // old way: createCourse: course => dispatch(courseActions.createCourse(course))\n };\n}", "function mapDispatchToProps(dispatch){\n return{\n actions: bindActionCreators(courseActions, dispatch)\n };\n}", "function mapDispatchToProps(dispatch) {\n // take all action and pass it into funnel (dispatch)\n return bindActionCreators({ selectBook: selectBook}, dispatch);\n}", "function mapDispatchToProps(dispatch) {\n return bindActionCreators({\n // TODO: add actions\n }, dispatch);\n}", "function mapDispatchToProps(dispatch) {\n return {};\n}", "function mapDispatchToProps(dispatch) {\n return {};\n}", "function mapDispatchToProps(dispatch) {\n return {};\n}", "function mapDispatchToProps(dispatch) {\n return bindActionCreators(actionCreators, dispatch);\n}", "function mapDispathToProps(dispatch) {\n return {\n actions: bindActionCreators(userActions, dispatch),\n orderActions: bindActionCreators(orderActions, dispatch),\n customerActions: bindActionCreators(customerActions, dispatch),\n };\n}", "function mapDispatchToProps(dispatch)\n {\n return {\n readUpdate: () => dispatch(readUpdate()),\n successUpdate: (id) => dispatch(failureUpdate(id)),\n failureUpdate: (payload) => dispatch(successUpdate(payload)) \n };\n }", "function mapDispatchToProps(dispatch) {\n\treturn {\n\t\tactions: bindActionCreators(dashboardActions, dispatch),\n\t\tproposalactions: bindActionCreators(proposalActions, dispatch)\n\t};\n}", "function mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(Actions, dispatch)\n }\n}", "function matchDispatchToProps(dispatch){\n\nreturn bindActionCreators({pokedexView: pokedexView}, dispatch);\n\n //connect-function\n // prop : action/function\n // dispatch (behind the scenes with redux to call func)\n\n}", "function mapDispatchToProps(dispatch, ownProps) {\n //\n return {};\n}", "function mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(Actions, dispatch)\n }\n}", "function mapDispatchToProps(dispatch) {\n return bindActionCreators(actionCreators, dispatch)\n}", "function mapDispatchToProps(dispatch) {\n return bindActionCreators(actionCreators, dispatch);\n}", "function mapDispatchToProps(dispatch) {\n\treturn {\n\t\tactions: bindActionCreators(actions, dispatch),\n\t\tdispatch\n\t};\n}", "render() {\n return (\n <div>\n {this.actions.map(action => (\n <Action\n handleAction={() => action.run()}\n updateToDo={() => this.props.updateToDo()}\n key={action.key}\n {...action}\n />\n )\n )}\n </div>\n )\n }", "function _mapDispatchToProps(dispatch) {\n return {\n actions: {\n loadCourses: bindActionCreators(courseActions.loadCourses, dispatch), // now only loadCourses will be dipstached actions wrapped by disptach will be returned in an object instead\n loadAuthors: bindActionCreators(authorActions.loadAuthors, dispatch),\n },\n };\n}", "function mapDispatchToProps(dispatch){\n //whenever selectBook is called the result should be passed to all of our reducers.\n return bindActionCreators({selectBook: selectBook}, dispatch);\n //now inside our container we can call this.props.selectBook specifically becoz of the property here.\n}", "function matchDispatchToProps(dispatch){\n return bindActionCreators({\n }, dispatch);\n}", "function mapDispatchToProps(dispatch) {\n return {}\n}", "function mapDispatchToProps(dispatch) {\n return {\n // onIncreaseClick: () => dispatch(increaseAction)\n onIncreaseClick: function() { dispatch(increaseAction) },\n addItem: function(inputt) { return dispatch(increaseAction2(inputt)) },\n\n ChangeDos: function(){ dispatch(dosAction) },\n\n addTodo: function(add){ return dispatch(addTodo(add))},\n deleteSong: function(indexID){ return dispatch(deleteSong(indexID))}\n\n }\n}", "function mapActionCreatorsToProps (dispatch) {\n return bindActionCreators(userActions, dispatch);\n}", "function mapDispatchToProps(dispatch){\n return bindActionCreators(\n //whenever select book is called the result should be passed to\n //all reduxers\n {selectBook: selectBook}, dispatch\n );\n}", "function mapDispatchToProps(dispatch) {\n let bac = bindActionCreators(actions, dispatch);\n return bac;\n}", "function mapDispatchToProps(dispatch) {\n return {\n increaseCount: () => { return dispatch(increaseAction) },\n decreaseCount: () => { return dispatch(decreaseAction) }\n };\n}", "function mapDispatchToProps(dispatch){\n return bindActionCreators({getHotel, getAllHotels, getBooking},dispatch);\n}", "function mapDispatchToProps(dispatch) {\n return {\n //bindActionCreators goes to productActionCreators and find all the actions and wrap them and call the dispatch\n actions: bindActionCreators(productActionCreators, dispatch)\n };\n}", "function mapDispatchToProps(dispatch){\n return {\n actions: {\n loadCourses: bindActionCreators(courseActions.loadCourses, dispatch),\n loadAuthors: bindActionCreators(authorActions.loadAuthors, dispatch),\n deleteCourse: bindActionCreators(courseActions.deleteCourse, dispatch),\n filterCourses: bindActionCreators(courseActions.filterCourses, dispatch),\n }\n };\n}", "function mapDispatchToProps(dispatch) {\n return {\n };\n}", "function mapDispatchToProps(dispatch) {\n return {\n }\n}", "function mapDispatchToProps(dispatch) {\n console.log('ReduxFuncCounter mapDispatchToProps')\n\n return {\n // prop Name: function() {}\n // increment: function() {\n // const action = actions.increment(1);\n // dispatch(action);\n // },\n\n //bindActionCreators create and return a wrapper function\n // while calling wrapper func,\n // 1. call action creator\n // 2. automatically dispatch the action\n //increment: bindActionCreators(actions.increment, dispatch)\n\n // props.actions.{actionFuncName}\n // take group of functions, return group of wrapper functions\n actions: bindActionCreators(actions, dispatch)\n\n //decrement, //reset later\n }\n}", "function mapDispatchToProps(dispatch) {\n return bindActionCreators(\n actionCreators,\n dispatch\n );\n}", "function mapDispatchToProps(dispatch) {\r\n\r\n return {\r\n actions: bindActionCreators(dashboardActions, dispatch)\r\n };\r\n}", "function mapDispatchToProps(dispatch) {\n\treturn {\n\t\tactions: bindActionCreators(courseActions, dispatch),\n\t\tajaxCalls: bindActionCreators(ajaxActions, dispatch),\n\t\tcourseFormActions: bindActionCreators(courseFormActions, dispatch)\n\t};\n}", "function mapDispatchToProps(dispatch) {\n return {\n changeLayout: (payload) => dispatch(actionCreators.changeLayout(payload)),\n changePageText: (payload) => dispatch(actionCreators.changePageText(payload)),\n zoomPage: (payload) => dispatch(actionCreators.zoomPage(payload))\n }\n}", "function mapDispatchToProps(dispatch) {\r\n\treturn {\r\n\t\t// these names will appear on the container props\r\n\t\tdoIncrement: () => dispatch(increment()),\r\n\t\tdoDecrement: () => dispatch(decrement())\r\n\t}\r\n}", "function mapDispatchToProps(dispatch) {\n //whenever select is call, the result should be passed to all reducers\n return bindActionCreators(\n {\n closeAddParamModal,\n updateActiveConfig,\n selectAddParamFormControl,\n addParamFormControlSetValue,\n updateAddParamsListFilter\n },\n dispatch\n );\n}", "function mapDispatchToProps(dispatch){\n return {\n onIncreaseClick: () => dispatch(increaseAction())\n }\n}", "function mapDispatchToProps(dispatch) {\n return {\t//\tUse actions\n // The react-redux function bindActionCreators \n // wraps all of the actions passed to it in a dispatch call for us\n // so we can say for example this.props.actions.nextQuestion\n actions: bindActionCreators(Actions, dispatch)\n };\n}", "function mapDispatchToProps(dispatch){\n return {\n onIncreaseClick: () => dispatch(increaseAction)\n }\n}", "function mapDispatchToProps(dispatch) {\n return {\n //onIncreaseClick: () => dispatch(increaseAction)\n }\n}", "function mapDispatchToProps(dispatch) {\n return bindActionCreators({redirect: redirect, userSignin: userSignin, setMsg: setMsg}, dispatch);\n}", "function mapDispatchToProps(dispatch) {\n return {\n \n };\n}", "function mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators({\n // signUpRequest\n catalogsAddRequest,\n catalogsUpdateRequest,\n categoriesGetRequest\n }, dispatch)\n };\n}", "function mapDispatchToProps(dispatch) {\n\treturn {\n\t\tdefaultActions: bindActionCreators(defaultActions, dispatch),\n\t\tvelibActions: bindActionCreators(velibActions, dispatch),\n\t}\n}", "function mapDispatchToProps(dispatch) {\n\treturn {\n\n\t}\n}", "function mapDispatchToProps(StoreDispatch){\n console.log('mapDispatchToProps ');\n return{//we are returning object literal { onIncrementClick: value, onDecrementtClick: otherValue };\n //':' assigns a function as a property of an object literal. \n onIncrementClick: () => {\n const action = { type: Actions.INCREMENT_REQUESTED};\n StoreDispatch(action);\n },\n onDecrementtClick: () => {\n const action = { type: Actions.DECREMENT_REQUESTED};\n StoreDispatch(action);\n }\n }\n}", "function mapReduxDispatchToReactProps(dispatch) {\n return {\n // component propert\n /*onAddItem: function(item) {\n let action = addItemToCart(item);\n dispatch(action);\n },\n\n /*onEmptyCart: function() {\n dispatch(emptyCart());\n },*/\n\n /*\n onAddItem: bindActionCreators(actions.addItemToCart,\n dispatch),\n \n onEmptyCart: bindActionCreators(actions.emptyCart,\n dispatch)\n */\n\n actions: bindActionCreators(actions,dispatch)\n }\n}", "function mapDispatchToProps(dispatch) {\r\n\r\n return {\r\n actions: bindActionCreators(projectOptionAction, dispatch)\r\n };\r\n}", "function matchDispatchToProps(dispatch) { // dispatch => call a function\n return bindActionCreators({\n // you can register all your actions here\n selectUser: selectUser\n }, dispatch)\n}", "function mapDispatchToProps(dispatch) {\n//Whenever selectBook is called, the result should be passed to all of our reducers.\n return {\n actions: bindActionCreators(actions, dispatch)\n };\n}", "function mapDispatchToProps(dispatch){\n\t// bindActionCreators takes 2 args.\n\t// \t1. object: property of local prp name (this.props.whatever)\n\t// \t\tvalue: the callback or ACTION \n\t// \t2. dispatcher\n\n\treturn bindActionCreators({\n\t\tupdateHome: UpdateHome\n\t}, dispatch)\n\n\n}", "function mapDispatchToProps(dispatch) {\r\n return {\r\n actions: bindActionCreators(contactsactions, dispatch)\r\n };\r\n}" ]
[ "0.7550068", "0.7493547", "0.72580063", "0.72569156", "0.72392106", "0.70193094", "0.6983888", "0.69700646", "0.69700646", "0.6961876", "0.6950038", "0.69492376", "0.69225246", "0.6886943", "0.6883328", "0.6877323", "0.6863439", "0.6849868", "0.68373775", "0.6830345", "0.68296516", "0.68222654", "0.6813683", "0.6810995", "0.6807553", "0.68013436", "0.67860115", "0.67808914", "0.67808914", "0.67808914", "0.67808914", "0.67710894", "0.6767579", "0.6767579", "0.6767579", "0.6752881", "0.6748248", "0.6740086", "0.6738555", "0.67306304", "0.67189634", "0.67189634", "0.67189634", "0.67189634", "0.67178655", "0.67172295", "0.67103004", "0.67046267", "0.6697195", "0.6695185", "0.6694427", "0.6694427", "0.66871333", "0.6680516", "0.6675847", "0.66725606", "0.6659512", "0.6651273", "0.66452265", "0.66429096", "0.6640603", "0.6639155", "0.6626689", "0.66224426", "0.6621987", "0.66210616", "0.6619908", "0.6615004", "0.65843654", "0.6582528", "0.65770614", "0.65766484", "0.657092", "0.65708196", "0.65682435", "0.65609884", "0.6555013", "0.6554693", "0.65538114", "0.6550913", "0.65485203", "0.65459144", "0.65432405", "0.65386355", "0.652989", "0.652596", "0.6521747", "0.6519452", "0.65068287", "0.65054744", "0.65034604", "0.6503344", "0.6500555", "0.65005374", "0.64973265", "0.648357", "0.64769727", "0.6474388", "0.64742607", "0.64720476", "0.6470588" ]
0.0
-1
Requete SQL qui permet d'afficher les articles par ordre descendant
function getAll() { return connSql.then(function(conn){ let resultat = conn.query('SELECT * FROM posts WHERE posted = "1" ORDER BY posts.date DESC'); return resultat }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findArticles() {}", "childrens(node = undefined, filter = undefined){\r\n\t\t\r\n\t\t\r\n\t\tnode = this.node_null(node);\r\n\t\t\r\n\t\tlet listBrothers = node;\r\n\t\tlet datas = [] //list d'objet\r\n\t\t\r\n\t\twhile (listBrothers.length > 0){\r\n\t\t\tlistBrothers = this.cousin(listBrothers,\"children\");\r\n\r\n\t\t\tdatas = datas.concat(listBrothers);\r\n\t\t}\r\n\t\t\r\n\t\t//Pour chaque noeud recuperer ses cousins\r\n\t\t\t//P\r\n\t\t\t//Recuperer ses fils\r\n\t\t\t//O = aux fils\r\n\t\t\r\n\t\t/*\r\n\t\tdatas = datas.flat();\r\n\t\t\r\n\t\tif (filter != undefined){\r\n\t\t\tdatas = datas.filter(f => f.filter[0] == filter[1]);\r\n\t\t}\r\n\t\t*/\r\n\t\treturn datas;\r\n\t}", "function setAllArticles() {\n console.log(\"articlesAll: \");\n console.log(articlesAll);\n\n for (let keyword of articlesAll) {\n addKeyword(keyword.word);\n for (let article of keyword.articles) {\n if(!containsArticle(article, savedArticles) || containsArticle(article, toBeRemovedArticles)){\n addArticle(article ,searchArticlesContainer, \"+\");\n }\n }\n }\n }", "updateDescendants() {\n // delete old Information\n this.descendants = new Map();\n this.all_paths.forEach((p) => {\n p.all_members.forEach((note_path, index) => {\n // make sure it's not the last member of the path\n if (!(index == p.all_members.length - 1)) {\n // create entry in descendants if it doesn't exist\n if (!this.descendants.has(note_path)) {\n this.descendants.set(note_path, []);\n }\n let next_path_member = p.all_members[index + 1];\n // add note as descendant if it isn't already stored in array\n if (!this.descendants.get(note_path).includes(next_path_member)) {\n this.descendants.set(note_path, this.descendants.get(note_path).concat(next_path_member));\n }\n }\n });\n });\n }", "function SelectDescendants(arg0, arg1)\n{\n\treturn 10;\n}", "descendants(f) {\n this.nodesBetween(0, this.content.size, f);\n }", "getArticleContents(data) {\n let numArticles = 0;\n let numLists = 0;\n for (let item of data) {\n if (item instanceof Article) {\n numArticles++;\n }\n if (item instanceof ItemList) {\n numLists++;\n }\n }\n\n if (numArticles == 0 && numLists > 0) {\n return this.getItemLists(data);\n }\n\n return data\n .map(function (element, key) {\n if (element instanceof Article) {\n return <ArticleElement data={element} key={key}/>;\n }\n });\n }", "_updateDirectDescendants() {\n this._allItems.changes\n .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_5__[\"startWith\"])(this._allItems))\n .subscribe((items) => {\n this._directDescendantItems.reset(items.filter(item => item._parentMenu === this));\n this._directDescendantItems.notifyOnChanges();\n });\n }", "branch(node = undefined, filter = undefined){\r\n\r\n\t\tnode = this.node_null(node);\r\n\t\tlet datas = node; //liste d'objet\r\n\t\t\r\n\t\tlet childrens = this.childrens(node,filter);\r\n\t\tdatas = datas.concat(childrens);\r\n\t\treturn datas;\r\n\t}", "function getchapterhtml(el){\n\t\teditCount = parseInt($(el).attr('rel'));\n\t\tcount = editCount != undefined ? editCount + 1 : count;\n\t\t$.ajax({\n\t\t\turl : HOST_PATH + \"admin/article/chapters\",\n\t\t\ttype : \"post\",\n\t\t\tdata : {'partialCounter' : count},\n\t\t\tsuccess : function(data) {\n\t\t\t\t$(\"div#multidiv\").append(data);\n\t\t\t\t$(el).attr('rel',count);\n\t\t\t\tcount++ ;\n\t\t\t}\n\t\t});\n\t}", "async function getChildCategories(parentId) {\n let result;\n try {\n // can be 0 or more results\n const getChildrenQuery = `SELECT CATEGORYTEXT FROM CATEGORIES WHERE PARENT = ?`;\n result = await connection.query(getChildrenQuery, [parentId]);\n \n result.forEach((item, index, arr) => {\n arr[index] = item.CATEGORYTEXT;\n }); \n } catch (e) { \n console.error(e.message); \n }\n return result;\n }", "descendants() {\n return new DescendantsIterator(this, this.keys);\n }", "function setArticles(){\n\t\t\t// Foreach the article tags\n\t\t\tthisElement.children().each(function(_, node) {\n\t\t\t\tarticles[ _ ] = { };\n\t\t\t\tarticles[ _ ][\"data-cols\"]\t\t=\t(node.getAttribute('data-cols') != null)?node.getAttribute('data-cols'):'3';\n\t\t\t\tarticles[ _ ][\"data-theme\"]\t=\t(node.getAttribute('data-theme') != null)?node.getAttribute('data-theme'):'a';\n\t\t\t\tvar count\t=\t0;\n\t\t\t\tvar items\t=\t{ };\n\t\t\t\tvar title;\n\t\t\t\tvar titleFound\t=\tfalse;\n\t\t\t\t$(this).children().each(function(_, node) {\n\t\t\t\t\tif(node.nodeName != '#text' && node.innerHTML.trim() != ''){\n\t\t\t\t\t\titems[ count ] = { };\n\t\t\t\t\t\titems[ count ][\"node\"]\t\t\t=\tnode.nodeName;\n\t\t\t\t\t\titems[ count ][\"value\"]\t\t\t=\tnode.innerHTML;\n\t\t\t\t\t\tif(node.nodeName == \"H1\" && titleFound != true){\n\t\t\t\t\t\t\ttitle = node.textContent;\n\t\t\t\t\t\t\ttitleFound = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tarticles[ _ ][\"title\"]\t\t\t\t\t=\ttitle;\n\t\t\t\tarticles[ _ ][\"article\"]\t\t\t\t=\titems;\n\t\t\t});\n\t\t}", "function list() {\n return db.allDocs({\n /*This tells the server to get all docs that start with article*/\n startkey: 'article',\n endkey: 'article{}',\n inclusive_end: true,\n /*Include not just the key but all fields*/\n include_docs: true\n })\n .then(function(res) {\n console.log(res.rows);\n return res.rows.map(function(r) {\n return r.doc;\n });\n });\n }", "function displayDecendants(person, people, foundChildren = []){\n let findChildren = people.filter(function(el){\n if(person.id === el.parents[0] || person.id === el.parents[1]){\n return true;\n }\n else{\n return false;\n }\n })\n foundChildren = [].concat(findChildren, foundChildren);\n for(let i = 0; i < findChildren.length; i++){ \n foundChildren = displayDecendants(findChildren[i], people, foundChildren);\n }\n return foundChildren;\n}", "function createHTML() {\n\n\n\n //searchBar value to LowerCase\n let value = key.value.toLowerCase();\n\n //Get div#content\n document.getElementById(\"content\").innerHTML = '';\n\n //Artikels loop \n for (let article of articles) {\n\n //titel to lowerCase\n let title = article.title.toLowerCase();\n\n //searchBar filter\n if (title.includes(value)) {\n\n /////Artikels in HTML bewerken/////\n\n let div = document.createElement(\"div\");\n div.className = \"articleClass\";\n\n let hTitle = document.createElement(\"h3\");\n hTitle.innerText = article.title;\n\n let imageWrapper = document.createElement(\"div\");\n imageWrapper.classList.add(\"image_wrapper\");\n\n let img = document.createElement(\"img\");\n img.src = article.imageURI;\n img.className = \"showContent\";\n img.id = article.publicationDate;\n\n let articleContentWrapper = document.createElement(\"div\");\n articleContentWrapper.classList.add(\"article_content_wrapper\");\n\n let hDiv = document.createElement(\"div\");\n\n let introtekst = document.createElement(\"div\");\n\n\n introtekst.id = \"onderTitle\" + article.publicationDate;\n introtekst.className = \"ondertitle\";\n introtekst.hidden = true;\n\n\n introtekst.innerHTML = article.content;\n\n let divPublishlikes = document.createElement(\"div\");\n divPublishlikes.classList.add(\"likes\");\n divPublishlikes.innerText = article.likes;\n divPublishlikes.className = \"likeDiv\";\n\n divPublishlikes.id = article.UUID;\n\n hDiv.appendChild(hTitle);\n hDiv.appendChild(imageWrapper);\n hDiv.appendChild(introtekst);\n imageWrapper.appendChild(img);\n articleContentWrapper.appendChild(hDiv);\n articleContentWrapper.appendChild(divPublishlikes);\n div.appendChild(articleContentWrapper);\n document.getElementById(\"content\").appendChild(div);\n }\n }\n //Show Subtitels\n for (const content of showContent) {\n content.addEventListener(\"click\", function () {\n console.log(\"onderTitle\" + this.id);\n let articleOndertitle = \"onderTitle\" + this.id;\n document.getElementById(articleOndertitle).hidden = false;\n });\n }\n\n //Like toevoegen\n for (const likeBtn of likesBtn) {\n likeBtn.addEventListener(\"click\", function () {\n console.log(\"ID \" + this.id);\n let id = this.id;\n postRequest(id);\n });\n }\n}", "function loadArticle() {\n // obtenemos los detalles del articulo\n var articleId = findGetParameter('id');\n var articleUrl = './data/data-' + articleId + '.json';\n retrieveData(articleUrl);\n}", "getRelated() {}", "function remplirLesDonnees(data) {\n lesDocuments = data.lesDocuments;\n for (const documents of lesDocuments){\n afficherDocument(documents)\n }\n}", "function get_multirel(multinuc_id,exclude_child,nodes){\n found = false;\n for (node_id in nodes){\n if (node_id != exclude_child && nodes[node_id].parent == multinuc_id && nodes[node_id].reltype == \"multinuc\"){\n found ==true;\n return nodes[node_id].relname;\n }\n }\n if (found == false){\n return get_def_multirel();\n }\n}", "buildRelations(td) {\r\n const fkTables = lodash_1.default.keys(td.foreignKeys).sort();\r\n fkTables.forEach(t => {\r\n const fkFields = td.foreignKeys[t];\r\n const fkFieldNames = lodash_1.default.keys(fkFields);\r\n fkFieldNames.forEach(fkFieldName => {\r\n const spec = fkFields[fkFieldName];\r\n if (spec.isForeignKey) {\r\n this.addRelation(t, fkFieldName, spec, fkFields);\r\n }\r\n });\r\n });\r\n td.relations = lodash_1.default.sortBy(this.relations, ['parentTable', 'childTable']);\r\n return td;\r\n }", "function formataDados(tipo) {\r\n for (const entry of itens) {\r\n let redator = {\r\n nome: '',\r\n links: [],\r\n };\r\n redator.nome = entry.author[0].name.$t;\r\n\r\n let link = {\r\n titulo: '',\r\n url: '',\r\n tipo: '',\r\n semana: 0,\r\n };\r\n\r\n link.tipo = tipo;\r\n link.titulo = entry.title.$t;\r\n //TODO alterar\r\n jQuery.each(entry.link, function (i, url) {\r\n if (url.rel == 'alternate') {\r\n link.url = url.href;\r\n return false;\r\n }\r\n });\r\n link.data = entry.published.$t;\r\n\r\n verificaRedator = redatores.find(\r\n (redatores) => redatores['nome'] === redator.nome\r\n );\r\n\r\n if (!verificaRedator) {\r\n redator.links.push(link);\r\n redatores.push(redator);\r\n } else {\r\n verificaRedator.links.push(link);\r\n }\r\n }\r\n redatores.sort(ordenaNomesAsc);\r\n}", "function getDescendants(node) {\n if (isPortal(node)) {\n return getPortalContent(node);\n }\n return node.__k || [];\n}", "onActiveDescendantAssociationChange() {\n this.removeAttributeFromAllElements( 'aria-activedescendant' );\n\n for ( let i = 0; i < this.node.activeDescendantAssociations.length; i++ ) {\n const associationObject = this.node.activeDescendantAssociations[ i ];\n\n // Assert out if the model list is different than the data held in the associationObject\n assert && assert( associationObject.otherNode.nodesThatAreActiveDescendantToThisNode.indexOf( this.node ) >= 0,\n 'unexpected otherNode' );\n\n\n this.setAssociationAttribute( 'aria-activedescendant', associationObject );\n }\n }", "function findChildren(person){\n let foundChildren = people.filter(function(person1){\n if (person1.parents.includes(person.id)){\n return true;\n }\n else{\n return false;\n }\n })\n return foundChildren + findChildren(foundChildren);\n\n }", "function deleteArticles() {\n\tvar articles = document.getElementsByTagName(\"article\");\n\n\tfor (i = articles.length - 1; i >= 0; i--) {\n\t\tarticles[i].parentNode.removeChild(articles[i]);\n\t}\n}", "function _parseDescendants($node) {\r\n\t\t\t$f(\"div.TrN\", $node.next()).each(function() {\r\n\t\t\t\tdataRows.push(getNode(selfUL, this));\r\n\t\t\t});\r\n\t\t}", "function remplirListeNounours(nounours) {\n for (let elem of nounours) {\n const newProduct = document.createElement('div');\n newProduct.setAttribute('class', 'newProduct');\n\n const newLien = document.createElement(\"a\");\n newLien.setAttribute(\"class\", \"lienImg\");\n\n const newImg = document.createElement(\"img\");\n newImg.setAttribute(\"class\", \"detailImg\");\n\n const newParagraph = document.createElement(\"p\");\n newParagraph.innerHTML = elem.name;\n newImg.setAttribute(\"src\", elem.imageUrl);\n newImg.setAttribute(\"class\", \"detailImg\");\n newLien.setAttribute(\"href\", \"produit.html?id=\" + elem._id);//ajout de l'id produit dans l'url de la page de destination\n\n const parentLien = document.getElementById(\"listProducts\");\n parentLien.appendChild(newProduct);\n newProduct.appendChild(newLien);\n newLien.appendChild(newImg);\n newProduct.appendChild(newParagraph);\n }\n}", "function relation(i, items){\n\n\tfor (var j=0; j<jl; j+=2){\n\t\titems[items_relation[j]].classList.remove(\"highlight\");\n\t}\n\n\titems_relation=[];\n\titems_relation=find_related(i, table);\n\n\titems[i].className += \" highlight\";\n\tjl = items_relation.length;\n\n\t// for (var j=0; j<jl; j+=2){\n\t// \titems[items_relation[j]].className += \" highlight\";\n\t// }\n\n\t// for (var z=items_de[0]; z<=items_de[1]; z++){\n\t// \titems[z].classList.remove(\"bright\");\n\t// }\n\n\t// items_de=department_range(i);\n\n\t// for (var z=items_de[0]; z<=items_de[1]; z++){\n\t// \titems[z].className += \" bright\";\n\t// }\n}", "function checkChildren() {\n\n\n $(\"#filter-accordion ul.dynatree-container li\").click(function () {\n $('.linkAll').removeClass('active-link');\n });\n}", "function inicDiscot(){\r\n\tlistaCDs=noRaiz(\"../../Recursos/XML/discot.xml\").childNodes;\r\n\tnumCDs=listaCDs.length;\r\n}", "function sortPrice () {\n ispisArtikla.innerHTML = '';\n article.sort(compare);\n for (var i=0; i<article.length; i++) {\n if (article[i].stanje == true) {\n for (j=0; j<articleCategory.length; j++) {\n for (var k=0; k<articleCategory[j].podCategory.length; k++) {\n if (article[i].type == articleCategory[j].podCategory[k].id) {\n writeElement(i,j,k);\n }\n }\n }\n }\n }\n}", "getTabelasDeBancoDeDadosLinks() {\n let statement = this.statements['tabelasWiki'];\n\n return this._fetchWebApiResults(statement,['query','results'],{},'get', (data) => {\n let results = {'tabelas':[]};\n for (let key in data.query.results) {\n let tabelas = data.query.results[key].printouts['Possui direito de leitura em'];\n tabelas.forEach( (item) => {\n let nomeTabela = item['fulltext'];\n if (!results.tabelas.includes(nomeTabela)) results.tabelas.push(nomeTabela);\n } );\n }\n return results;\n });\n }", "function livrosAugustoCury() {\n let livros = [];\n for (let categoria of livrosPorCategoria) {\n for (let livro of categoria.livros) {\n if (livro.autor === 'Augusto Cury') {\n livros.push(livro.titulo);\n }\n }\n }\n console.log('Livros do Augusto Cury: ' , livros);\n}", "function populateEncyclopediaContents() {\n // Get the id of the page\n var pageid = document.getElementById(\"page-id\");\n // The ul for the encyclopedia contents to go in\n var encyclopediaContentsUL = document.getElementById(\"contents-ul\");\n // List of encyclopedia pages—can be updated later and will apply to the entire site\n var encyclopediaContentsPages = [\n {\n \"id\": \"p01\",\n \"name\": \"Home\",\n \"type\": \"parent\",\n \"url\": \"index.html\",\n \"children\": \"\"\n },\n {\n \"id\": \"p02\",\n \"name\": \"Planetarium\",\n \"type\": \"parent\",\n \"url\": \"planetarium.html\",\n \"children\": \"\"\n },\n {\n \"id\": \"p03\",\n \"name\": \"Path to Salvation\",\n \"type\": \"parent\",\n \"url\": \"#\",\n \"children\": \"\"\n },\n {\n \"id\": \"p04\",\n \"name\": \"Colony Ships\",\n \"type\": \"parent\",\n \"url\": \"#\",\n \"children\": [\n {\n \"id\": \"p04-c01\",\n \"name\": \"Cronus\",\n \"type\": \"child\",\n \"url\": \"#\"\n },\n {\n \"id\": \"p04-c02\",\n \"name\": \"Gaia\",\n \"type\": \"child\",\n \"url\": \"#\"\n },\n {\n \"id\": \"p04-c03\",\n \"name\": \"Prometheus\",\n \"type\": \"child\",\n \"url\": \"#\"\n },\n ]\n },\n {\n \"id\": \"p05\",\n \"name\": \"Salvation System\",\n \"type\": \"parent\",\n \"url\": \"#\",\n \"children\": [\n {\n \"id\": \"p05-c01\",\n \"name\": \"Salvation\",\n \"type\": \"child\",\n \"url\": \"#\"\n },\n {\n \"id\": \"p05-c02\",\n \"name\": \"New Earth\",\n \"type\": \"child\",\n \"url\": \"#\"\n },\n {\n \"id\": \"p05-c03\",\n \"name\": \"Prometheus\",\n \"type\": \"child\",\n \"url\": \"#\"\n },\n {\n \"id\": \"p05-c04\",\n \"name\": \"Demeter\",\n \"type\": \"child\",\n \"url\": \"#\"\n },\n {\n \"id\": \"p05-c05\",\n \"name\": \"Athena\",\n \"type\": \"child\",\n \"url\": \"#\"\n },\n {\n \"id\": \"p05-c06\",\n \"name\": \"Zeus\",\n \"type\": \"child\",\n \"url\": \"#\"\n },\n ]\n },\n {\n \"id\": \"p06\",\n \"name\": \"Factions\",\n \"type\": \"parent\",\n \"url\": \"#\",\n \"children\": [\n {\n \"id\": \"p06-c01\",\n \"name\": \"Governance\",\n \"type\": \"child\",\n \"url\": \"#\"\n },\n {\n \"id\": \"p06-c02\",\n \"name\": \"Promethean Tribes\",\n \"type\": \"child\",\n \"url\": \"#\"\n },\n {\n \"id\": \"p06-c03\",\n \"name\": \"Ever Corporation\",\n \"type\": \"child\",\n \"url\": \"#\"\n },\n {\n \"id\": \"p06-c03\",\n \"name\": \"The Purity\",\n \"type\": \"child\",\n \"url\": \"#\"\n }\n ]\n },\n {\n \"id\": \"p07\",\n \"name\": \"Technology\",\n \"type\": \"parent\",\n \"url\": \"#\",\n \"children\": \"\"\n },\n ];\n\n // Add a li to the ul for each encyclopedia page\n encyclopediaContentsPages.forEach(function(page) {\n // Create li\n var li = document.createElement(\"li\");\n // If the li is for the current page, it gets highlighted\n if (pageid.getAttribute(\"data-pageid\") === page.id) {\n li.innerHTML = '<a href=\"' + page.url + '\"><div class=\"contents-parent contents-parent-highlighted\">' + page.name + '</div></a>';\n }\n else {\n li.innerHTML = '<a href=\"' + page.url + '\"><div class=\"contents-parent\">' + page.name + '</div></a>';\n }\n\n // Add any children\n if (page.children > \"\") {\n // Add dropdown arrow to the parent \n var dropdownArrow = document.createElement(\"div\");\n dropdownArrow.classList.add(\"contents-arrow-box\");\n dropdownArrow.innerHTML = '<img src=\"static/images/arrow.svg\" alt=\"\" class=\"contents-arrow-down\">'; // Default class is down arrow for a collapsed menu\n\n // ul for the child pages\n var children = document.createElement(\"ul\");\n // Add default classes\n children.classList.add(\"contents-children\", \"contents-children-collapsed\");\n\n page.children.forEach(function(child) {\n // Generate child li\n var childli = document.createElement(\"li\");\n // Check to see if child li is the current page. Highlight child li and expand the parent menu if true.\n if (pageid.getAttribute(\"data-pageid\") === child.id) {\n childli.innerHTML = '<a href=\"' + child.url + '\"><div class=\"contents-child contents-child-highlighted\">' + child.name + '</div></a>';\n // Change the dropdown arrow to up for the expanded list\n dropdownArrow.firstElementChild.classList.remove(\"contents-arrow-down\");\n dropdownArrow.firstElementChild.classList.add(\"contents-arrow-up\");\n children.classList.remove(\"contents-children-collapsed\");\n }\n // Add the child and leave the parent menu collapsed if false.\n else {\n childli.innerHTML = '<a href=\"' + child.url + '\"><div class=\"contents-child\">' + child.name + '</div></a>';\n }\n\n // Append the child li\n children.appendChild(childli);\n });\n\n // Append the dropdown arrow and the children ul\n li.appendChild(dropdownArrow);\n li.appendChild(children);\n }\n\n // Append the li\n encyclopediaContentsUL.appendChild(li);\n });\n}", "function getAllArticles(callback)\n{\n db.all(\"SELECT * FROM Articles\",\n \t function(err,results) { callback(results); });\n}", "function inicDiscot(){\n\tlistaCDs=noRaiz(\"../../Recursos/XML/discot.xml\").childNodes;\n\tnumCDs=listaCDs.length;\n}", "findAllSubcategoriesByCategoryId(id) {\n return this\n .findOne({_id: id, enabled: true})\n .populate({\n path: 'subcategories',\n match: {enabled: true},\n select: 'url title'\n })\n .select('subcategories')\n .exec();\n }", "getAllCategoriesAndSubcats() {\n return this\n .find({enabled: true})\n .populate({\n path: 'subcategories',\n select: 'title url',\n match: {enabled: true}\n })\n .select('title url subcategories')\n .exec();\n }", "async getOrgChildren(id) {\n const d2 = this.props.d2;\n let nodes = [id];\n let m = await d2.models.organisationUnits.get(id);\n if (m.id===id){\n if (m.hasOwnProperty('children') && m.children !== undefined){\n if (m.children.size===0){\n return nodes;\n }\n for (let child of m.children){\n let c = await this.getOrgChildren(child[0]);\n nodes = nodes.concat(c);\n }\n return nodes;\n }\n else{ //other way to get no children\n return nodes;\n }\n }\n return nodes;\n }", "function test(){\n registry.byId('placeholder').resize();\n\n return;\n\n\n var filter = {\n \"type\" : \"eq\",\n \"args\" : [\n \"_id\",\n \"57343c283c6d3cd598a5a2e9\"\n ]\n };\n var parentDoc = nqStore.cachingStore.getSync(\"5737875b3c6d3cd598a5a2f3\");\n var childrenFilter = nqStore.buildFilter(parentDoc, filter);\n var childrenCollection = nqStore.filter(childrenFilter);\n childrenCollection.fetch().then(function(childObjects) {\n console.log('childrenFilter', childrenFilter);\n console.dir(childObjects);\n });\n }", "constructor(title) {\n /**\n * All reflections of this category.\n */\n this.children = [];\n this.title = title;\n this.allChildrenHaveOwnDocument = () => this.getAllChildrenHaveOwnDocument();\n }", "function openAncestorCollections(p) {\n statusClear();\n openCols(allAncestorCollections(p));\n}", "descendants(f) {\n this.nodesBetween(0, this.size, f);\n }", "function descendantsFilter(person, people){\n let id = \"id\";\n let foundDescendants = people.filter(function(el){\n if(person[id] == el.parents[0] || person[id] == el.parents[1]){\n return true;\n }\n else{\n return false;\n }\n\n });\n\n displayPeople(foundDescendants);\n return foundDescendants[0];\n}", "function onTargetChildrenClick() {\n console.log(\"Clicked onTargetChildrenClick\");\n // update the UI\n w3.toggleClass('#targetChildren', 'w3-red');\n w3.removeClass('#targetLGTBIQ', 'w3-red');\n w3.removeClass('#targetWomen', 'w3-red');\n w3.removeClass('#targetOrigin', 'w3-red');\n // toggle this filter and disable the others\n targetChildren = !targetChildren;\n targetLGTBIQ = false;\n targetWomen = false;\n targetOrigin = false;\n // trigger the find operation\n findLocationsInDatabase(\"FILTER\", -1);\n}", "function afficherVedette(film, filmDiv) {\n const section = document.createElement('section');\n\n const Vedette = film['vedette']; //Emmagasiner la valeur de la propriété JSON 'Vedette' dans la varaible tableau heroes \n // Récupérer les éléments du tableau Vedette pour remplir notre page html\n for (var i = 0; i < Vedette.length; i++) {\n const myArticle = document.createElement('article');// Pour chaque vedette, créer un article ('article'), une entête h2 ('h2'), 1 paragraphe ('p')\n const myH2 = document.createElement('h2');\n const myPara1 = document.createElement('p');\n\n myH2.textContent = Vedette[i].Nom; // Utiliser la valeur de la propriété JSON 'Nom' retourné par le serveur pour initialiser le texte de notre entête h2\n myPara1.textContent = 'Personnage: ' + Vedette[i].personnage + '\\n age: ' + Vedette[i].age; // Utiliser la valeur de la propriété JSON 'Personnage' retourné par le serveur pour initialiser le paragraphe\n\n // Assigner(associer) l'entête myH2 et le paragraphes myPara1 à l'article myArticle\n myArticle.appendChild(myH2);\n myArticle.appendChild(myPara1);\n\n filmDiv.appendChild(myArticle); // Associer notre article a notre section de la page HTML\n }\n}", "function findNodes(body, parent)\n{\n let newUl = document.createElement('ul');\n \n //maji se zpracovavat Dokumentove, Elementove a Textove uzly, pokud je ale dokument formatovany,\n //tak za textove uzly jsou povaovany i ty formatovaci prazdne radky, mezery, tabulatory....\n // ty se asi jako textove uzly tisknou nemaji a tak je budeme ignorovat... ASI\n for (let node of body.childNodes)\n {\n if (node.nodeType === Node.TEXT_NODE) \n {\n if (isEmpty(node)) //je to prazdne, netiskneme\n continue;\n else \n {\n let newLi = document.createElement('li');\n newLi.textContent = \"Text\";\n newLi.title = node.textContent;\n newUl.appendChild(newLi);\n all.push(node);\n allLi.push(newLi);\n \n findNodes(node, newLi);\n }\n }\n else if (node.nodeType === Node.ELEMENT_NODE)\n {\n if (node.tagName.toLowerCase() === 'script') //SCRIPT tag asi ignorovat\n continue;\n \n let newLi = document.createElement('li');\n newLi.textContent = node.tagName;\n newUl.appendChild(newLi);\n all.push(node);\n allLi.push(newLi);\n \n findNodes(node, newUl);\n }\n else\n alert(\"IDK\");\n \n \n }\n \n parent.appendChild(newUl);\n}", "function Editeur(){\n\n\t//Propriétés de l'éditeur\n\tthis.controlesArray = new Array();\n\t\n\t//Constructeur de la classe\n\tthis.initialiser = function(){\n\t\tthis.controleNouveau();\n\t\tthis.setControlesArray();\n\t\tthis.setParentSelect();\n\t\tthis.elementsAfficher();\n\t\tthis.elementInitialiser();\n\t};//end function\n\t\n\t//Chargement du tableau des controles à partir de la base de données\n\tthis.setControlesArray = function(){\n\t\tvar variables = new Array();\n\t\tvariables['var_requete_code'] = 'rq_zz_gc_007';\n\t\tvariables['var_onglet_code'] = top.af_dev_entete.pc_dev_entete_menu.gl_dev_menuFormulaire_onglet_input.value;\n\t\tvar controlesXml = ajax(\"requete\",\"executer\",variables);\n\t\tvar controle = controlesXml.getElementsByTagName('data')[0].firstChild;\n\t\twhile(controle){\n\t\t\tvar controleCode = controle.getElementsByTagName('code')[0].firstChild.data;\n\t\t\tthis.controlesArray[controleCode] = new Array;\n\t\t\tthis.controlesArray[controleCode]['code'] =controle.getElementsByTagName('code')[0].firstChild.data;controle['code'];\n\t\t\tthis.controlesArray[controleCode]['type'] = (controle.getElementsByTagName('type')[0].firstChild ? controle.getElementsByTagName('type')[0].firstChild.data : '');\n\t\t\tthis.controlesArray[controleCode]['position'] = (controle.getElementsByTagName('position')[0].firstChild ? controle.getElementsByTagName('position')[0].firstChild.data : '');\n\t\t\tthis.controlesArray[controleCode]['top'] = (controle.getElementsByTagName('top')[0].firstChild ? controle.getElementsByTagName('top')[0].firstChild.data : 0);\n\t\t\tthis.controlesArray[controleCode]['left'] = (controle.getElementsByTagName('left')[0].firstChild ? controle.getElementsByTagName('left')[0].firstChild.data : 0);\n\t\t\tthis.controlesArray[controleCode]['width'] = (controle.getElementsByTagName('width')[0].firstChild ? controle.getElementsByTagName('width')[0].firstChild.data : 100);\n\t\t\tthis.controlesArray[controleCode]['height'] = (controle.getElementsByTagName('height')[0].firstChild ? controle.getElementsByTagName('height')[0].firstChild.data : 20);\n\t\t\tthis.controlesArray[controleCode]['libelle'] = (controle.getElementsByTagName('libelle')[0].firstChild ? controle.getElementsByTagName('libelle')[0].firstChild.data :'');\n\t\t\tthis.controlesArray[controleCode]['parent'] = (controle.getElementsByTagName('parent')[0].firstChild ? controle.getElementsByTagName('parent')[0].firstChild.data :'');\n\t\t\tthis.controlesArray[controleCode]['champ'] = (controle.getElementsByTagName('champ')[0].firstChild ? controle.getElementsByTagName('champ')[0].firstChild.data :'');\n\t\t\tthis.controlesArray[controleCode]['multiple'] = (controle.getElementsByTagName('multiple')[0].firstChild ? controle.getElementsByTagName('multiple')[0].firstChild.data :'');\t\t\t\n\t\t\tcontrole = controle.nextSibling;\n\t\t}//end while\n\t};//end function\n\n\t/*******************************************************************************************************************\n\t * EVENEMENTS SOURIS\n\t *******************************************************************************************************************\n\t */\n\n\t//Action déclenchée par le mouseDown sur un élément\n\tthis.elementOnMouseDown = function(elementId){\n\t\tvar element = document.getElementById(elementId);\t\n\t\telement.disabled='disabled';\t\t\t\n\t\tthis.elementDeselectionner();\n\t\tthis.controlesArrayToControle(elementId);\n\t\tthis.deplacementDebut(elementId);\n\t};//end function\n\n\t//Action déclenchée par le mouseUp sur un élément \n\tthis.elementOnMouseUp = function (elementId){\n\t\tdocument.onmousemove = null;\n\t\tthis.elementToControle(elementId);\n\t\tvar element = document.getElementById(elementId);\t\n\t\telement.disabled = '';\n\t};//end function\n\t\n\t//Action déclenchée par le mouseMove sur un élément \n\tthis.elementOnMouseMove = function (elementId,deltaX,deltaY){\n\t\tthis.deplacementExecuter(elementId,deltaX,deltaY);\n\t\tthis.repereAfficher(elementId);\n\t};//end function\n\t\n\t//Action déclenchée au survol d'un élément \t\n\tthis.elementOnMouseOver = function (elementId,p){\n\t\tif(p){\n\t\t\tvar element = document.getElementById(elementId);\t\t\t\n\t\t\telement.parentNode.onmousedown = null;\n\t\t}//end if\n\t};//end function\t\n\t\n\t//Action déclenchée en fin de survol d'un élément \n\tthis.elementOnMouseOut = function (elementId,p){\n\t\tif(p){\t\n\t\t\tvar element = document.getElementById(elementId);\n\t\t\telement.parentNode.onmousedown = function(){editeur.elementOnMouseDown(this.id);};\n\t\t}//end if\n\t};//end function\t\n\n\t/*******************************************************************************************************************\n\t * ELEMENTS CLAVIER\n\t *******************************************************************************************************************\n\t */\t\t\n\tthis.controleOnChange = function(){\n\t\tthis.controleToControlesArray();\n\t\tthis.controleToElement();\n\t};//end function\n\n\t/*******************************************************************************************************************\n\t * ELEMENTS\n\t *******************************************************************************************************************\n\t */\n\t\n\tthis.elementInitialiser = function(){\n\t\tvar controleCode = top.af_dev_entete.pc_dev_entete_menu.gl_dev_menuFormulaire_controle_input.value;\n\t\tif(controleCode != ''){\n\t\t\tthis.controlesArrayToControle(controleCode);\n\t\t\tthis.elementSelectionner(controleCode);\n\t\t\tthis.repereAfficher(controleCode);\n\t\t}//end if\n\t};//end function\n\t\n\t//Affichage de tous les éléments à partir du tableau des controles\n\tthis.elementsAfficher = function(){\n\t\tfor(var controleCode in this.controlesArray){\n\t\t\tthis.elementAfficher(controleCode);\n\t\t}//end for\n\t};//end if\n\t\n\t//Affichage d'un élément\n\tthis.elementAfficher = function(controleCode){\n\t\tswitch(this.controlesArray[controleCode]['type']){\n\t\t\tcase 'a':\t\n\t\t\tcase 'button':\t\n\t\t\tcase 'label':\t\t\t\t\t\n\t\t\tcase 'legend':\n\t\t\tcase 'p':\n\t\t\tcase 'span':\n\t\t\t\tvar element = document.createElement(this.controlesArray[controleCode]['type']);\n\t\t\t\tvar elementLibelle = document.createTextNode(this.controlesArray[controleCode]['libelle']);\n\t\t\t\telement.appendChild(elementLibelle);\n\t\t\t\telement.style.width = this.controlesArray[controleCode]['width'];\n\t\t\t\telement.style.height = this.controlesArray[controleCode]['height'];\n\t\t\t\tbreak;\n\t\t\tcase 'input':\n\t\t\tcase 'textarea':\t\t\t\t\n\t\t\t\tvar element = document.createElement(this.controlesArray[controleCode]['type']);\n\t\t\t\telement.style.width = this.controlesArray[controleCode]['width'];\n\t\t\t\telement.style.height = this.controlesArray[controleCode]['height'];\n\t\t\t\tvar codeArray = controleCode.split('_');\n\t\t\t\telement.value = codeArray[3];\n\t\t\t\tbreak;\n\t\t\tcase 'select':\t\n\t\t\t\tvar element = document.createElement(this.controlesArray[controleCode]['type']);\n\t\t\t\telement.style.width = this.controlesArray[controleCode]['width'];\n\t\t\t\telement.style.height = this.controlesArray[controleCode]['height'];\n\t\t\t\tvar codeArray = controleCode.split('_');\n\t\t\t\telement.length = 1;\n\t\t\t\telement.options[0].text = codeArray[3];\n\t\t\t\tif(this.controlesArray[controleCode]['multiple']) element.multiple = 'multiple';\n\t\t\t\tbreak;\n\t\t\tcase 'checkbox':\n\t\t\t\tvar element = document.createElement('input');\n\t\t\t\telement.type = 'checkbox';\n\t\t\t\tbreak;\n\t\t\tcase 'radio':\n\t\t\t\tvar element = document.createElement('input');\n\t\t\t\telement.type = 'radio';\n\t\t\t\tbreak;\t\n\t\t\tcase 'img':\n\t\t\t\tvar element = document.createElement('img');\n\t\t\t\telement.style.width = this.controlesArray[controleCode]['width'];\n\t\t\t\telement.style.height = this.controlesArray[controleCode]['height'];\t\t\t\t\t\n\t\t\t\telement.src = this.controlesArray[controleCode]['libelle'];\n\t\t\t\tbreak;\t\t\t\t\n\t\t\tcase 'file':\n\t\t\t\tvar element = document.createElement('input');\n\t\t\t\telement.type = 'file';\n\t\t\t\telement.style.width = this.controlesArray[controleCode]['width'];\n\t\t\t\telement.style.height = this.controlesArray[controleCode]['height'];\n\t\t\t\tbreak;\n\t\t\tcase 'fieldset':\n\t\t\tcase 'form':\n\t\t\t\tvar element = document.createElement(this.controlesArray[controleCode]['type']);\n\t\t\t\telement.style.border = 'outset thin black';\n\t\t\t\telement.style.width = this.controlesArray[controleCode]['width'];\n\t\t\t\telement.style.height =this.controlesArray[controleCode]['height'];\n\t\t\t\tbreak;\n\t\t}//end switch\n\t\telement.readOnly = true;\n\t\tvar elementParentId = this.controlesArray[controleCode]['parent'];\n\t\telement.id = this.controlesArray[controleCode]['code'];\n\t\telement.style.position = 'absolute';\n\t\telement.style.top = this.controlesArray[controleCode]['top'];\n\t\telement.style.left = this.controlesArray[controleCode]['left'];\n\t\telement.onmousedown = function(){editeur.elementOnMouseDown(this.id);};\n\t\tif(typeof elementParentId == \"undefined\" || elementParentId == ''){\n\t\t\tdocument.body.appendChild(element);\n\t\t\telement.onmouseover = function(){ editeur.elementOnMouseOver(this.id,0);};\n\t\t\telement.onmouseout = function(){ editeur.elementOnMouseOut(this.id,0);};\t\t\t\t\t\n\t\t}else{\n\t\t\tvar elementParent = document.getElementById(elementParentId);\n\t\t\telementParent.appendChild(element);\n\t\t\telement.onmouseover = function(){ editeur.elementOnMouseOver(this.id,1);};\n\t\t\telement.onmouseout = function(){ editeur.elementOnMouseOut(this.id,1);};\t\n\t\t}//end if\n\t};//end function\n\n\tthis.elementSelectionner = function(elementId){\n\t\tvar element = document.getElementById(elementId);\n\t\tif(element){\n\t\t\telement.style.backgroundColor = 'red';\n\t\t\telement.style.color = 'white';\n\t\t}//end if\n\t};//end if\n\t\n\t//Supprime la sélection d'un élément\n\tthis.elementDeselectionner = function (){\n\t\tvar elementId = parent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_code_input.value;\n\t\tif(elementId != ''){\n\t\t\tvar element = document.getElementById(elementId);\t\n\t\t\tif(element){\n\t\t\t\telement.style.backgroundColor = '';\n\t\t\t\telement.style.color = '';\n\t\t\t}//end if\n\t\t\ttop.af_dev_entete.pc_dev_entete_menu.gl_dev_menuFormulaire_controle_input.value = '';\n\t\t}//end if\n\t};//end function\n\t\n\tthis.elementSupprimer = function(){\n\t\tvar elementId = parent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_code_input.value;\n\t\tif(elementId != ''){\n\t\t\tvar element = document.getElementById(elementId);\n\t\t\telement.parentNode.removeChild(element);\n\t\t\tthis.controlesArray = unset(this.controlesArray,elementId);\n\t\t\tif(elementId.tagName == 'fieldset' || elementId.tagName == 'form') this.setParentSelect();\n\t\t\tthis.controleNouveau();\n\t\t}//end if\n\t};//End function\n\n\t/*******************************************************************************************************************\n\t * AJOUTER\n\t *******************************************************************************************************************\n\t */\n\n\tthis.ajouterChamps = function(){\n\t\tvar champsArray = parent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_champs_input.value.split(',');\n\t\tfor(var i = 0 ; i < champsArray.length ; i++){\n\t\t\tvar champNomArray = champsArray[i].split('_');\n\t\t\tvar controleNom = champNomArray[2].substr(0,1).toLowerCase() + champNomArray[2].substr(1);\n\t\t\tvar controleType = (parent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_type_select.value == '' ? 'input' : parent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_type_select.value);\n\t\t\tvar controleCode = window.top.af_dev_entete.pc_dev_entete_menu.gl_dev_menuFormulaire_onglet_input.value + '_' + controleNom + '_' + controleType;\t\n\t\t\tif(typeof this.controlesArray[controleCode] == 'undefined'){\n\t\t\t\t//Ajout du label\n\t\t\t\tvar labelArray = new Array();\n\t\t\t\tvar labelCode = window.top.af_dev_entete.pc_dev_entete_menu.gl_dev_menuFormulaire_onglet_input.value + '_' + controleNom + '_label';\t\n\t\t\t\tlabelArray['code'] = labelCode;\n\t\t\t\tlabelArray['type'] = 'label';\n\t\t\t\tlabelArray['top'] = 25 * i + 25;\n\t\t\t\tlabelArray['left'] = 1000;\t\t\t\t\n\t\t\t\tlabelArray['libelle'] = controleNom;\n\t\t\t\tlabelArray['parent'] = '';\n\t\t\t\tlabelArray = this.ajouterProprietes(labelArray);\n\t\t\t\tthis.controlesArray[labelCode] = labelArray;\n\t\t\t\tthis.elementAfficher(labelCode);\t\t\t\t\t\n\t\t\t\t//Ajout du controle\n\t\t\t\tvar controleArray = new Array();\n\t\t\t\tcontroleArray['code'] =\tcontroleCode;\n\t\t\t\tcontroleArray['type'] = controleType;\n\t\t\t\tcontroleArray['top'] = 25 * i + 25;\n\t\t\t\tcontroleArray['left'] = 1100;\n\t\t\t\tcontroleArray['champ'] = champsArray[i];\n\t\t\t\tcontroleArray['parent'] = '';\t\t\t\n\t\t\t\tcontroleArray = this.ajouterProprietes(controleArray);\n\t\t\t\tthis.controlesArray[controleCode] = controleArray;\n\t\t\t\tthis.elementAfficher(controleCode);\n\t\t\t}//end if\n\t\t}//end for\n\t};//end function\n\t\n\tthis.ajouterProprietes = function(controleArray){\n\t\tvar controlePosition = 0;\n\t\tfor(var controle in this.controlesArray) if(1 * this.controlesArray[controle]['position'] > controlePosition) controlePosition = 1 * this.controlesArray[controle]['position'];\n\t\tcontroleArray['position'] = controlePosition + 1;\n\t\tswitch(controleArray['type']){\n\t\t\tcase 'a':\n\t\t\tcase 'label':\n\t\t\tcase 'span':\n\t\t\t\tcontroleArray['width'] = 90;\n\t\t\t\tcontroleArray['height'] = 15;\n\t\t\t\tcontroleArray['champ'] = '';\n\t\t\t\tbreak;\n\t\t\tcase 'button':\n\t\t\tcase 'legend':\n\t\t\t\tcontroleArray['width'] = 100;\n\t\t\t\tcontroleArray['height'] = 25;\n\t\t\t\tcontroleArray['champ'] = '';\n\t\t\t\tbreak;\n\t\t\tcase 'select':\n\t\t\tcase 'input':\n\t\t\t\tcontroleArray['libelle'] = '';\n\t\t\t\tcontroleArray['width'] = 100;\n\t\t\t\tcontroleArray['height'] = 20;\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase 'textarea':\n\t\t\t\tcontroleArray['libelle'] = '';\n\t\t\t\tcontroleArray['width'] = 300;\n\t\t\t\tcontroleArray['height'] = 100;\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase 'fieldset':\n\t\t\tcase 'form':\n\t\t\t\tcontroleArray['libelle'] = '';\t\t\t\t\t\n\t\t\t\tcontroleArray['width'] = 300;\n\t\t\t\tcontroleArray['height'] = 100;\n\t\t\t\tcontroleArray['champ'] = '';\t\n\t\t\t\tbreak;\n\t\t\tcase 'img':\n\t\t\t\tcontroleArray['width'] = 20;\n\t\t\t\tcontroleArray['height'] = 20;\n\t\t\t\tcontroleArray['champ'] = '';\t\t\t\t\n\t\t\t\tbreak;\n\t\t}//end switch\n\t\treturn controleArray;\n\t};//end function\t\n\t\n\t/*******************************************************************************************************************\n\t * PARENT\n\t *******************************************************************************************************************\n\t */\t\n\t\n\tthis.setParentSelect = function(){\n\t\tvar parentSelect = parent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_parent_select;\n\t\tparentSelect.options.length = 1;\n\t\tfor(var controle in this.controlesArray){\n\t\t\tvar controleArray = controle.split('_');\n\t\t\tvar controleTagName = controleArray[4];\n\t\t\tif(controleTagName == 'fieldset' || controleTagName == 'form'){\n\t\t\t\tvar optionCode = controle;\n\t\t\t\tvar optionLibelle = controleArray[3] + '_' + controleArray[4];\n\t\t\t\tvar option = new Option(optionLibelle,optionCode);\n\t\t\t\tparentSelect[parentSelect.options.length] = option;\n\t\t\t}//end if\n\t\t}//end for\n\t};//end function\n\t\n\tthis.parentAffecter = function(){\n\t\tvar elementId = parent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_code_input.value;\n\t\tvar element = document.getElementById(elementId);\n\t\tvar elementParentId = parent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_parent_select.value;\n\t\tif(elementId != elementParentId){\n\t\t\tthis.controlesArray[elementId]['parent'] = elementParentId;\t\t\t\t\n\t\t\tif(elementParentId == ''){\n\t\t\t\tdocument.body.appendChild(element);\n\t\t\t\telement.onmouseover = function(){editeur.elementOnMouseOver(this.id,0);};\n\t\t\t\telement.onmouseout = function(){editeur.elementOnMouseOut(this.id,0);};\t\t\t\t\n\t\t\t}else{\n\t\t\t\tvar elementParent = document.getElementById(elementParentId);\n\t\t\t\telementParent.appendChild(element);\n\t\t\t\telement.onmouseover = function(){editeur.elementOnMouseOver(this.id,1);};\n\t\t\t\telement.onmouseout = function(){editeur.elementOnMouseOut(this.id,1);};\t\t\t\n\t\t\t}//end if\n\t\t\telement.style.top = 0;\n\t\t\telement.style.left = 0;\n\t\t\tthis.repereAfficher(elementId);\n\t\t}//end if\n\t};//end function\n\n\t/*******************************************************************************************************************\n\t * DEPLACEMENT\n\t *******************************************************************************************************************\n\t */\t\n\t\n\tthis.deplacementDebut = function(elementId){\n\t\tthis.repereEffacer();\t\n\t\tvar element = document.getElementById(elementId);\n\t\tvar mouseX = event.clientX;\n\t\tvar mouseY = event.clientY;\n\t\tvar deltaX = parseInt(element.style.left) - mouseX;\n\t\tvar deltaY = parseInt(element.style.top) - mouseY;\n\t\tdocument.onmouseup = function(){editeur.elementOnMouseUp(elementId);};\n\t\tdocument.onmousemove = function(){editeur.elementOnMouseMove(elementId,deltaX,deltaY);};\n\t\tthis.repereAfficher(elementId);\n\t\tthis.elementSelectionner(elementId);\t\t\n\t};//end function\n\n\tthis.deplacementExecuter = function(elementId,deltaX,deltaY){\n\t\tvar element = document.getElementById(elementId);\t\n\t\t//Calcul du déplacement\n\t\tvar mouseX = event.clientX;\n\t\tvar mouseY = event.clientY;\n\t\tvar elementX = mouseX + deltaX;\n\t\tvar elementY = mouseY + deltaY;\n\t\telementX = this.aimantationX(elementX);\n\t\telementY = this.aimantationY(elementY);\t\n\t\t//Limite du déplacement\n\t\tvar limiteXsup = 1250;\n\t\tvar limiteYsup = 1000;\n\t\tvar elementParentId = parent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_parent_select.value;\n\t\tif(elementParentId != ''){\n\t\t\tvar elementParent = document.getElementById(elementParentId);\n\t\t\tlimiteXsup = parseInt(elementParent.style.width);\n\t\t\tlimiteYsup = parseInt(elementParent.style.height);\n\t\t}//end if\n\t\tif(elementX < 0) elementX = 0;\n\t\tif(elementY < 0) elementY = 0;\n\t\tvar elementWidth = (element.style.width == '' ? 0 : parseInt(element.style.width));\n\t\tvar elementHeight = (element.style.height == '' ? 0 : parseInt(element.style.height));\t\t\n\t\tif(elementX + elementWidth > limiteXsup) elementX = limiteXsup - elementWidth;\n\t\tif(elementY + elementHeight > limiteYsup) elementY = limiteYsup - elementHeight;\t\t\n\t\t//Déplacement\n\t\telement.style.left = elementX;\n\t\telement.style.top = elementY;\t\t\n\t};//end function\n\t\n\tthis.aimantationX = function(elementX){\n\t\tvar aimantationX = null;\n\t\tvar aimantationHorizontale = parent.pc_dev_editeur_formulaire.gl_dev_editeurAimantation_horizontal_fieldset.value;\n\t\tswitch(aimantationHorizontale){\n\t\t\tcase '1':\n\t\t\t\tvar aimantationGrilleX = 1;\n\t\t\t\taimantationX = (elementX + aimantationGrilleX/2) - (elementX + aimantationGrilleX/2) % aimantationGrilleX;\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase '2':\n\t\t\t\tvar aimantationGrilleX = parent.pc_dev_editeur_formulaire.gl_dev_editeurAimantation_horizontal02_select.value;\n\t\t\t\taimantationX = (elementX + aimantationGrilleX/2) - (elementX + aimantationGrilleX/2) % aimantationGrilleX;\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase '3':\n\t\t\t\tvar elementId = parent.pc_dev_editeur_formulaire.gl_dev_editeurAimantation_horizontal03_input.value;\n\t\t\t\taimantationX = (elementId == '' ? 0 : parseInt(document.getElementById(elementId).style.left));\n\t\t\t\tbreak;\n\t\t}//end switch \t\n\t\treturn aimantationX;\n\t};//end function\n\t\n\tthis.aimantationY = function(elementY){\n\t\tvar aimantationY = null;\n\t\tvar aimantationVerticale = parent.pc_dev_editeur_formulaire.gl_dev_editeurAimantation_vertical_fieldset.value;\n\t\tswitch(aimantationVerticale){\n\t\t\tcase '1':\n\t\t\t\tvar aimantationGrilleY = 1;\n\t\t\t\taimantationY = (elementY + aimantationGrilleY/2) - (elementY + aimantationGrilleY/2) % aimantationGrilleY;\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase '2':\n\t\t\t\tvar aimantationGrilleY = parent.pc_dev_editeur_formulaire.gl_dev_editeurAimantation_vertical02_select.value;\n\t\t\t\taimantationY = (elementY + aimantationGrilleY/2) - (elementY + aimantationGrilleY/2) % aimantationGrilleY;\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase '3':\n\t\t\t\tvar elementId = parent.pc_dev_editeur_formulaire.gl_dev_editeurAimantation_vertical03_input.value;\n\t\t\t\taimantationY = (elementId == '' ? 0 : parseInt(document.getElementById(elementId).style.top));\n\t\t\t\tbreak;\n\t\t}//end switch \t\n\t\treturn aimantationY;\n\t};//end function\t\n\n\t/*******************************************************************************************************************\n\t * REPERES\n\t *******************************************************************************************************************\n\t */\t\n\t\n\tthis.repereAfficher = function(elementId){\n\t\tif(document.getElementById(elementId)){\n\t\t\tif(! document.getElementById('repere_trait_horizontal')) this.repereCreer();\n\t\t\tthis.repereDeplacer(elementId);\n\t\t}//end if\n\t};//end function\n\t\n\tthis.repereCreer = function(){\t\t\t\n\t\tvar traitHorizontal = document.createElement('img');\t\t\n\t\ttraitHorizontal.id = 'repere_trait_horizontal';\n\t\ttraitHorizontal.style.position = 'absolute';\n\t\ttraitHorizontal.style.left = 20;\t\t\n\t\ttraitHorizontal.style.width = 1245;\n\t\ttraitHorizontal.style.height = 0;\n\t\ttraitHorizontal.style.border = 'dotted 1 red';\t\n\t\tdocument.body.appendChild(traitHorizontal);\n\t\t\n\t\tvar traitVertical = document.createElement('img');\n\t\ttraitVertical.id = 'repere_trait_vertical';\t\t\n\t\ttraitVertical.style.position = 'absolute';\n\t\ttraitVertical.style.top = 10;\t\n\t\ttraitVertical.style.height = 995;\n\t\ttraitVertical.style.width = 0;\n\t\ttraitVertical.style.border = 'dotted 1 red';\n\t\tdocument.body.appendChild(traitVertical);\t\t\n\t\t\n\t\tvar etiquetteHorizontal = document.createElement('label');\n\t\tetiquetteHorizontal.id = 'repere_etiquette_horizontal';\t\t\n\t\tvar label = document.createTextNode('');\n\t\tetiquetteHorizontal.appendChild(label);\n\t\tetiquetteHorizontal.style.position = 'absolute';\n\t\tetiquetteHorizontal.style.fontSize = '12';\n\t\tetiquetteHorizontal.style.color = 'red';\t\n\t\tetiquetteHorizontal.style.fontWeight = 'bold';\t\n\t\tdocument.body.appendChild(etiquetteHorizontal);\t\n\t\t\n\t\tvar etiquetteVertical = document.createElement('label');\n\t\tetiquetteVertical.id = 'repere_etiquette_vertical';\t\t\n\t\tvar label = document.createTextNode('');\n\t\tetiquetteVertical.appendChild(label);\n\t\tetiquetteVertical.style.position = 'absolute';\n//\t\tetiquetteVertical.style.writingMode = 'tb-rl';\n\t\tetiquetteVertical.style.fontSize = '12';\n\t\tetiquetteVertical.style.color = 'red';\n\t\tetiquetteVertical.style.fontWeight = 'bold';\n\t\tdocument.body.appendChild(etiquetteVertical);\n\t};//end function\t\n\n\tthis.repereDeplacer = function(elementId){\n\t\tvar element = document.getElementById(elementId);\n\t\tvar elementTop = parseInt(element.style.top);\n\t\tvar elementLeft = parseInt(element.style.left);\t\t\t\n\t\tvar parentId = parent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_parent_select.value;\n\t\tvar repereTop = 0 ; var repereLeft = 0 ; \n\t\tif(parentId == ''){\n\t\t\trepereTop = elementTop;\n\t\t\trepereLeft = elementLeft;\t\t\n\t\t}else{\n\t\t\tvar parentHtml = document.getElementById(parentId);\t\t\t\n\t\t\trepereTop = elementTop + parseInt(parentHtml.style.top);\n\t\t\trepereLeft = elementLeft + parseInt(parentHtml.style.left);\n\t\t}//end if\n\t\tdocument.getElementById('repere_trait_horizontal').style.top = repereTop;\n\t\tdocument.getElementById('repere_trait_vertical').style.left = repereLeft;\t\t\n\t\tdocument.getElementById('repere_etiquette_horizontal').firstChild.data = elementLeft;\n\t\tdocument.getElementById('repere_etiquette_horizontal').style.top = 0;\t\t\n\t\tdocument.getElementById('repere_etiquette_horizontal').style.left = repereLeft - 10;\n\t\tdocument.getElementById('repere_etiquette_vertical').firstChild.data = elementTop;\n\t\tdocument.getElementById('repere_etiquette_vertical').style.top = repereTop - 8 ;\t\t\n\t\tdocument.getElementById('repere_etiquette_vertical').style.left = 0;\t\t\n\t};//end function\n\t\t\t\n\tthis.repereEffacer = function(){\n\t\tif(document.getElementById('repere_trait_horizontal')){\n\t\t\tdocument.body.removeChild(document.getElementById('repere_trait_horizontal'));\n\t\t\tdocument.body.removeChild(document.getElementById('repere_trait_vertical'));\n\t\t\tdocument.body.removeChild(document.getElementById('repere_etiquette_horizontal'));\t\t\n\t\t\tdocument.body.removeChild(document.getElementById('repere_etiquette_vertical'));\t\t\t\t\n\t\t}//end if\n\t};//end function\n\t\n\t/*******************************************************************************************************************\n\t * CONTROLES\n\t *******************************************************************************************************************\n\t */\n\n\tthis.controleInitialiser = function(){\n\t\tvar controleNom = parent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_nom_input.value;\n\t\tvar controleType = parent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_type_select.value;\n\t\tvar controleCode = window.top.af_dev_entete.pc_dev_entete_menu.gl_dev_menuFormulaire_onglet_input.value + '_' + controleNom + '_' + controleType;\n\t\tif(typeof this.controlesArray[controleCode] != 'undefined'){\n\t\t alert('Ajout impossible.\\nCe controle existe déjà.');\n\t\t this.controlesArrayToControle(controleCode);\n\t\t this.elementSelectionner(controleCode);\n\t\t this.repereAfficher(controleCode);\n\t\t}else{\t\t\n\t\t\tparent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_code_input.value = controleCode;\t\t\n\t\t\tparent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_top_input.value = 0;\n\t\t\tparent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_left_input.value = 0;\n\t\t\tparent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_libelle_input.value = parent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_nom_input.value;\n\t\t\tvar controleArray = new Array();\n\t\t\tcontroleArray['type'] = parent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_type_select.value;\n\t\t\tcontroleArray = this.ajouterProprietes(controleArray);\n\t\t\tparent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_width_input.value = controleArray['width'];\n\t\t\tparent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_height_input.value = controleArray['height'];\n\t\t\tparent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_position_input.value = controleArray['position'];\n\t\t\tthis.controleLectureSeule(true);\n\t\t\tvar controleType = parent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_type_select.value;\n\t\t\tthis.controleLectureSeuleType(controleType);\n\t\t}//end if\n\t};//end function\n\n\tthis.controleAjouter = function(){\n\t\tvar controleCode = parent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_code_input.value;\n\t\tif(typeof this.controlesArray[controleCode] == 'undefined'){\t\t\n\t\t\tthis.controleToControlesArray();\n\t\t\tvar controleType = parent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_type_select.value;\t\t\t\n\t\t\tif(controleType == 'fieldset' || controleType == 'form') this.setParentSelect();\n\t\t\tthis.elementAfficher(controleCode);\n\t\t\tthis.elementSelectionner(controleCode);\n\t\t\tthis.repereAfficher(controleCode);\n\t\t}//end if\n\t};//end function\n\t\n\tthis.controleToControlesArray = function(){\n\t\tvar controle = new Array;\n\t\tcontrole['code'] = parent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_code_input.value;\n\t\tcontrole['position'] = parent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_position_input.value;\n\t\tcontrole['top'] = parent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_top_input.value;\n\t\tcontrole['left'] = parent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_left_input.value;\n\t\tcontrole['type'] = parent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_type_select.value;\n\t\tcontrole['libelle'] = parent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_libelle_input.value;\n\t\tcontrole['width'] = parent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_width_input.value;\n\t\tcontrole['height'] = parent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_height_input.value;\n\t\tcontrole['parent'] = parent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_parent_select.value;\n\t\tcontrole['champ'] = parent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_champ_select.value;\t\t\n\t\tthis.controlesArray[controle['code']] = controle;\n\t};//end function\n\n\tthis.controlesArrayToControle = function(controleCode){\n\t\tif(this.controlesArray[controleCode]){\n\t\t\tparent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_code_input.value = this.controlesArray[controleCode]['code'];\n\t\t\tvar codeArray = this.controlesArray[controleCode]['code'].split('_');\n\t\t\tvar controleNom = codeArray[3];\t\t\n\t\t\tvar controleType = codeArray[4];\t\t\n\t\t\tparent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_nom_input.value = controleNom;\n\t\t\tparent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_type_select.value = controleType;\n\t\t\tparent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_position_input.value = this.controlesArray[controleCode]['position'];\n\t\t\tparent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_top_input.value = this.controlesArray[controleCode]['top'];\n\t\t\tparent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_left_input.value = this.controlesArray[controleCode]['left'];\n\t\t\tparent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_width_input.value = this.controlesArray[controleCode]['width'];\t\t\n\t\t\tparent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_height_input.value = this.controlesArray[controleCode]['height'];\n\t\t\tparent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_libelle_input.value = this.controlesArray[controleCode]['libelle'];\t\t\n\t\t\tparent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_parent_select.value = this.controlesArray[controleCode]['parent'];\n\t\t\tparent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_champ_select.value = this.controlesArray[controleCode]['champ'];\t\n\t\t\tthis.controleLectureSeule(true);\n\t\t\tthis.controleLectureSeuleType(controleType);\n\t\t}//end if\n\t};//end function\n\t\n\tthis.controleLectureSeule = function(ok){\n\t\tvar controlesListeOk = new Array('gl_dev_editeurAccueil_nom_input','gl_dev_editeurAccueil_type_select');\n\t\tparent.pc_dev_editeur_formulaire.formulaire.controlesLectureSeule(controlesListeOk,ok);\n\t\tvar controlesListeNok = new Array('gl_dev_editeurAccueil_parent_select','gl_dev_editeurAccueil_top_input','gl_dev_editeurAccueil_left_input','gl_dev_editeurAccueil_width_input','gl_dev_editeurAccueil_height_input','gl_dev_editeurAccueil_position_input','gl_dev_editeurAccueil_libelle_input','gl_dev_editeurAccueil_champ_select');\n\t\tparent.pc_dev_editeur_formulaire.formulaire.controlesLectureSeule(controlesListeNok, ! ok);\n\t};//end function\n\t\n\tthis.controleLectureSeuleType = function(controleType){\n\t\tvar libelle = new Array('gl_dev_editeurAccueil_libelle_input');\n\t\tvar champ = new Array('gl_dev_editeurAccueil_champ_select');\t\t\n\t\tswitch(controleType){\n\t\t\tcase 'a':\n\t\t\tcase 'label':\n\t\t\tcase 'span':\n\t\t\tcase 'button':\n\t\t\tcase 'legend':\n\t\t\tcase 'p':\n\t\t\t\tparent.pc_dev_editeur_formulaire.formulaire.controlesLectureSeule(libelle,false);\n\t\t\t\tparent.pc_dev_editeur_formulaire.formulaire.controlesLectureSeule(champ,true);\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase 'fieldset':\n\t\t\tcase 'form':\t\t\t\t\t\n\t\t\t\tparent.pc_dev_editeur_formulaire.formulaire.controlesLectureSeule(libelle,false);\n\t\t\t\tparent.pc_dev_editeur_formulaire.formulaire.controlesLectureSeule(champ,false);\t\t\n\t\t\t\tbreak;\n\t\t\tcase 'select':\t\n\t\t\tcase 'input':\n\t\t\tcase 'radio':\n\t\t\tcase 'checkbox':\n\t\t\tcase 'textarea':\n\t\t\t\tparent.pc_dev_editeur_formulaire.formulaire.controlesLectureSeule(libelle,true);\n\t\t\t\tparent.pc_dev_editeur_formulaire.formulaire.controlesLectureSeule(champ,false);\t\n\t\t\t\tbreak;\n\t\t}//end switch\n\t};//end function\n\t\n\tthis.controleNouveau = function(){\n\t\tthis.elementDeselectionner();\n\t\tthis.repereEffacer();\t\n\t\tthis.controleLectureSeule(false);\t\n\t\tdocument.onmouseup = null;\n\t\tparent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_code_input.value = '';\n\t\tparent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_nom_input.value = '';\t\t\n\t\tparent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_top_input.value = '';\n\t\tparent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_left_input.value = '';\n\t\tparent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_width_input.value = '';\t\t\n\t\tparent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_height_input.value = '';\n\t\tparent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_position_input.value = '';\t\t\n\t\tparent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_libelle_input.value = '';\t\t\n\t\tparent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_champ_select.value = '';\t\n\t};//end function\t\n\n\tthis.elementToControle = function(elementId){\n\t\tvar element = document.getElementById(elementId);\n\t\tthis.controlesArray[elementId]['top'] = parseInt(element.style.top);\n\t\tthis.controlesArray[elementId]['left'] = parseInt(element.style.left);\n\t\tparent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_top_input.value = parseInt(element.style.top);\n\t\tparent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_left_input.value = parseInt(element.style.left);\n\t\ttop.af_dev_entete.pc_dev_entete_menu.gl_dev_menuFormulaire_controle_input.value = elementId;\n\t};//end function\n\n\tthis.controleToElement = function(){\n\t\tvar elementId = parent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_code_input.value;\n\t\tvar element = document.getElementById(elementId);\n\t\telement.style.top = parent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_top_input.value;\n\t\telement.style.left = parent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_left_input.value;\n\t\telement.style.width = parent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_width_input.value;\t\t\n\t\telement.style.height = parent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_height_input.value;\n\t\tvar elementType = parent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_type_select.value;\n\t\tif(',a,button,label,legend,p,span,'.indexOf(elementType) > -1) document.getElementById(elementId).firstChild.data = parent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_libelle_input.value;\n\t\tif(elementType == 'img') element.src = parent.pc_dev_editeur_formulaire.gl_dev_editeurAccueil_libelle_input.value;\n\t\tthis.repereAfficher(elementId);\n\t};//end function\n\t\n\tthis.controlesArraySauvegarder = function(){\n\t\tvar variables = new Array();\n\t\tvariables['var_onglet_code'] = top.af_dev_entete.pc_dev_entete_menu.gl_dev_menuFormulaire_onglet_input.value;\n\t\tfor(var controleCode in this.controlesArray){\n\t\t\tvariables[controleCode] = this.controlesArray[controleCode]['code'] + '³³'; \n\t\t\tvariables[controleCode] += this.controlesArray[controleCode]['position'] + '³³'; \n\t\t\tvariables[controleCode] += this.controlesArray[controleCode]['champ'] + '³³'; \n\t\t\tvariables[controleCode] += this.controlesArray[controleCode]['libelle'] + '³³'; \n\t\t\tvariables[controleCode] += this.controlesArray[controleCode]['top'] + '³³'; \n\t\t\tvariables[controleCode] += this.controlesArray[controleCode]['left'] + '³³'; \n\t\t\tvariables[controleCode] += this.controlesArray[controleCode]['width'] + '³³'; \n\t\t\tvariables[controleCode] += this.controlesArray[controleCode]['height'] + '³³'; \n\t\t\tvariables[controleCode] += this.controlesArray[controleCode]['parent'] ;\n\t\t}//end for\n\t\tajax(\"editeur\",\"sauvegarder\",variables);\n\t};//end function\n\t\n}", "function _parseDescendantFolders($node) {\r\n\t\t\t$f(\"span.TrH\", $node.next()).each(function() {\r\n\t\t\t\tdataRows.push(getNode(selfUL, $(this).parent()[0]));\r\n\t\t\t});\r\n\t\t}", "function getAncestors(child_id){\n var child_uuid = lookUpTable[child_id].uuid;\n graphApi.getAncestors(child_uuid)\n .success(function(data){\n getNodes(data, child_id);\n renderAgain();\n\n })\n .error(function(){console.log(\"An error occured when tried to get ancestors\");});\n }", "function showArticles() {\n var searchName = d3.select(this).attr(\"name\");\n var articleArray = d3.select(this).attr(\"articles\");\n console.log(articleArray);\n //alert(searchName+\" - \"+articleArray);\n var articles = articleArray.split(\",\");\n var tableArray = [];\n var index = 0;\n for (var i1=0,i2=1, tot=articles.length; i1 < tot; i1+=2,i2+=2) {\n //var link = \"<a href='\"+articles[i2]+\"'>\"+articles[i1]+\"</a>\";\n tableArray.push([[articles[i1],articles[i2]]]);\n }\n createTable(tableArray);\n}", "function descend(start,childlist){\n\tvar curchild = start;\n\t//console.log(start);\n\tfor(index in childlist) {\n\t\tvar i = childlist[index];\n\t\tcurchild = curchild.childNodes[i];\n\t}\n\treturn curchild;\n}", "function reloadParts(){\n var checked = [];\n u('.category input:checked').each(function(data){\n checked.push(u(data).attr('data-type'));\n });\n\n u('article').each(function(article){\n u(article).addClass('hidden');\n\n if(checked.length === 0) {\n u(article).removeClass('hidden');\n }\n\n\n checked.forEach(function(one){\n if(u(article).hasClass(one)){\n lazyload();\n u(article).removeClass('hidden');\n }\n });\n });\n}", "async function collectClades(clade, clade_relatives) {\n if (!clade) {\n return null;\n }\n\n const result = { ids: [], lineage: null };\n\n // Try clade by ID first\n const id = parseInt(clade);\n let record;\n if (!isNaN(id)) {\n record = await dfam.ncbiTaxdbNamesModel.findOne({\n where: { tax_id: id, name_class: 'scientific name' },\n attributes: [ 'tax_id', 'name_txt' ],\n include: [\n { model: dfam.ncbiTaxdbNodesModel, attributes: [ \"parent_id\" ] },\n ],\n });\n }\n\n // Then try by scientific name\n if (!record) {\n record = await dfam.ncbiTaxdbNamesModel.findOne({\n where: { name_class: 'scientific name', name_txt: clade },\n attributes: [ 'tax_id', 'name_txt' ],\n include: [\n { model: dfam.ncbiTaxdbNodesModel, attributes: [ \"parent_id\" ] },\n ],\n });\n }\n\n if (!record) {\n return null;\n }\n\n // Primary results: the given ID and its lineage\n result.ids.push(record.tax_id);\n result.lineage = record.name_txt;\n\n // Secondary query: parent IDs\n const recurseParents = async function(parent_id) {\n const parent = await dfam.ncbiTaxdbNodesModel.findOne({\n attributes: [ 'tax_id', 'parent_id' ],\n where: { tax_id: parent_id },\n include: [\n { model: dfam.ncbiTaxdbNamesModel, where: { name_class: 'scientific name' }, attributes: [ 'name_txt' ] },\n ]\n });\n\n if (parent) {\n if (clade_relatives === \"ancestors\" || clade_relatives === \"both\") {\n result.ids.push(parent.tax_id);\n }\n\n let parent_name = \"\";\n if (parent.ncbi_taxdb_names.length) {\n parent_name = parent.ncbi_taxdb_names[0].name_txt;\n }\n result.lineage = parent_name + \";\" + result.lineage;\n\n if (parent_id !== 1) {\n return recurseParents(parent.parent_id);\n }\n }\n };\n\n let recurseParentsPromise;\n if (record.tax_id !== 1) {\n recurseParentsPromise = recurseParents(record.ncbi_taxdb_node.parent_id);\n } else {\n recurseParentsPromise = Promise.resolve();\n }\n\n await recurseParentsPromise;\n return result;\n}", "addArticles() {\n let articleHtml = \"\";\n for (const article of this.articles) {\n article.price = NumberHelper.priceOf(article.price);\n articleHtml += HtmlParser(articlesHtml, article);\n }\n\n this.elArticles.innerHTML = articleHtml;\n }", "getChildren () {\n const doc = this.getDocument()\n const id = this.id\n const schema = this.getSchema()\n let result = []\n for (let p of schema) {\n const name = p.name\n if (p.isText()) {\n let annos = doc.getAnnotations([id, name])\n forEach(annos, a => result.push(a))\n } else if (p.isReference() && p.isOwned()) {\n let val = this[name]\n if (val) {\n if (p.isArray()) {\n result = result.concat(val.map(id => doc.get(id)))\n } else {\n result.push(doc.get(val))\n }\n }\n }\n }\n return result\n }", "function main() {\n\t// 1st <p> tag surrounds the article's main image. So, add 1 to the # of\n\t// paragraphs you want.\n var maxNumParagraphs = 3;\n\n\n jQ(\".post .entry-content\").each(function (i) {\n // Get the full article's address\n var more = jQ(this).find('a.read_more').attr('href');\n\n // From that address, get the first few <p> tags.\n var query = more + ' .entry-content p:lt(' + maxNumParagraphs.toString() + ')';\n\n jQ(this).load(query, function () {\n\t\t\t// Then, after the content has been fetched and inserted,\n\t\t\t// append the [Read more] link again, since we lost it.\n jQ(this).append('<a href=\"' + more + '\" class=\"read_more\">[Read more]</a>');\n });\n\n });\n}", "function augmenterParent(id){\n setArticles(prevState => {\n \n const articleRecherche = prevState.find((item) => { return item.id === id });\n const index = prevState.indexOf(articleRecherche);\n prevState[index].like = prevState[index].like + 1;\n \n return [...prevState] ;\n }); // refresh de la vue ! \n }", "addContent(articles) {\n let $self = $('#articles');\n let $loadMoreButton = $self.children('#load-more-button');\n let $listEnd = $self.children('#list-end');\n let $articlesContainer = $self.children('#articles-big-list');\n\n if(this.section === 'noisiest') { // Noisiest list do not allow to load other articles\n $loadMoreButton.hide();\n $listEnd.hide();\n } else if(articles.length < this.defaultNewArticlesNum) {\n $loadMoreButton.hide();\n $listEnd.show();\n } else {\n $loadMoreButton.show();\n $listEnd.hide();\n }\n\n if(articles.length === 0) return;\n\n let articlesObj = articles.map(article => new ArticleBig(article));\n articlesObj.forEach(article => article.create($articlesContainer));\n\n this.articles = this.articles.concat(articlesObj);\n }", "function storeParentChildRelation()\n{\n\n}", "function getDescendants(person, people, foundDesc = []) {\n let descendants = [];\n\n descendants = people.filter(function (descendantsEl) {\n for (let i = 0; i < descendantsEl.parents.length; i++) {\n if (person.id === descendantsEl.parents[i]) {\n return true;\n }\n }\n return false;\n });\n\n for (let i = 0; i < descendants.length; i++) {\n if (!foundDesc.includes(descendants[i])) {\n foundDesc.push(descendants[i]);\n }\n getDescendants(descendants[i], people, descendants);\n }\n\n return foundDesc;\n}", "findCategoryBySubcategoryId(id, cb) {\n this\n .findOne({subcategories: id})\n .select('title url')\n .exec(cb);\n }", "function processObject(parent, parentIcicle, column, fullicicle, filtereddata){\n\t\n\t$.each(parent.derivedFrom, function(index, value){\n\t\tvar o = _.select(wordnet, function (obj) {\n\t\t\t return obj.uid === value;\n\t\t\t});\n\t\t\n\t\tif(o.length==0){//reached a leaf (tag)\n\t\t\to = _.select(tags, function (obj) {\n\t\t\t return obj.uid === value;\n\t\t\t});\n\t\t\tchildSemantics = o[0];\n\t\t\t\n\t\t\tvar object = {};\n\t\t\tobject.name = childSemantics.label;\n\t\t\tobject.uid = childSemantics.uid;\n\t\t\tobject.type = \"tag\";\n\t\t\tobject.count = fetchQC(childSemantics.uid,column,selectedTemplateID, filtereddata);\n\t\t\tparentIcicle.push(object);\n\t\t}\n\t\telse{\n\t\t\tchildSemantics = o[0];\n\n\t\t\tvar arr = _.filter(parentIcicle, function(value){ \n\t\t\t if (value.name == childSemantics.label){ \n\t\t\t return value;\n\t\t\t } \n\t\t\t })\n\t\t\tif (arr.length==0) {\n\t\t\t\t\tvar object = {};\n\t\t\t\t\tobject.name = childSemantics.label;\n\t\t\t\t\tobject.uid = childSemantics.uid;\n\t\t\t\t\tobject.abstractionLevel = childSemantics.abstractionLevel;\n\t\t\t\t\tobject.type = \"wordnet\";\n\t\t\t\t\tobject.count = fetchQC(childSemantics.uid,column,selectedTemplateID, filtereddata);\n\t\t\t\t\t\t\n\t\t\t\t\tif(fullicicle){\n\t\t\t\t\t\tobject.children= [];\n\t\t\t\t\t}\n\t\t\t\t\tparentIcicle.push(object);\n\t\t\t\t}\n\t\t\tif(fullicicle){//go on with recursion\n\t\t\t\tvar arrobj = _.filter(parentIcicle, \n\t\t\t\t\t\tfunction(value){ \n\t\t\t\t\t\t if (value.name == childSemantics.label){ \n\t\t\t\t\t\t return value;\n\t\t\t\t\t\t } \n\t\t\t\t\t\t})[0];\n\t\t\t\t// keep extending the branches\n\t\t\t\tprocessObject(childSemantics, arrobj.children, column, fullicicle, filtereddata);\n\t\t\t}\n\n\t\t}\n\t});\n}", "function drawChildrenListFromSnapshot(snapshot) {\n children = [];\n lists.innerHTML = \"\";\n snapshot.forEach((doc) => {\n let child = {id: doc.id, data: doc.data()};\n getWishLists(doc.id, (data)=>{\n var whishlist = [];\n data.docs.forEach((item) => {\n whishlist.push(item.data())\n });;\n drawRow(child, whishlist); \n \n });\n // console.log(wishlists);\n // drawRow(child,wishlists);\n });\n}", "function visUre() {\n container.textContent = \"\";\n alleUre.forEach((ur) => {\n if (filter == ur.Farve || filter == \"alle\") {\n let klon = temp.cloneNode(true).content;\n klon.querySelector(\"img\").src = \"images/\" + ur.Billede + \".webp\";\n klon.querySelector(\".navn\").textContent = ur.Navn;\n klon.querySelector(\".farve\").textContent = ur.Farve;\n klon.querySelector(\".pris\").textContent = ur.Pris + \",-\";\n klon.querySelector(\"article\").addEventListener(\"click\", () => {\n location.href = \"produkter_detaljer.html?id=\" + ur._id;\n });\n\n container.appendChild(klon);\n }\n });\n}", "function getEvenements(){\n\n\t\t\tlet nestedTable = this.nextSibling;\n\t\t\tif (nestedTable.hidden){\n\t\t\t\tnestedTable.hidden = false;\n\t\t\t\tthis.textContent = \"Masquer ▲\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\tnestedTable.hidden = true;\n\t\t\t\tthis.textContent = \"Afficher ▼ \";\n\t\t\t}\n\n\t\t}", "async afficherParRubrique(rubrique) {\n let result =await mongoose.model('Article')\n .find({ rubrique: rubrique})\n .exec();\n console.log(result);\n return result;\n }", "function getChildren(el) {\n\n }", "function gestionArticulo() {\n borrarMarca();\n borrarMarcaCalendario();\n crearTablasArticulos();\n\n let httpRequest = new XMLHttpRequest();\n httpRequest.open('POST', '../consultas_ajax.php', true);\n httpRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');\n httpRequest.onreadystatechange = function () {\n if (httpRequest.readyState === 4) {\n if (httpRequest.status === 200) {\n document.getElementById('dataTable').innerHTML = httpRequest.responseText;\n }\n }\n };\n httpRequest.send('articles=');\n}", "function affichageArticle(users) {\n const positionArticle = document.querySelector(\"#articleContent\");\n for (i = 0; i < users.length; i++) {\n users.forEach((article, i) => {\n id[i] = article.id;\n URLimage[i] = article.URLimage;\n date[i] = article.date;\n button[i] = article.button;\n title[i] = article.title;\n });\n structureArticle += `\n <div class=\"design-item\">\n <div class=\"design-img\">\n <a href=\"articledetails.html?id=${id[i]}\">\n <img src=\"${URLimage[i]}\">\n </a>\n <span>Dormal Corp</span>\n </div>\n <div class=\"design-title\">\n ${button[i]}<i class='fas fa-calendar-alt'style='font-size:15px'></i> <span class=\"dateArticle\">${date[i]}</span> <br>\n <p>${title[i]}</p>\n </div>\n </div> \n `;\n\n positionArticle.innerHTML = structureArticle;\n //console.log(structureArticle);\n }\n}", "get_children_objects() {\n let fc = this.fc\n let children = this.children\n var values = Object.keys(this.children).map(function(key){\n return fc.get_fragment_by_id(children[key][0]).get_node_by_id(children[key][1]);\n });\n return values;\n }", "function getContent(data){\n\tvar pageIDs = Object.getOwnPropertyNames(data.query.pages);\n\tfor(var i = 0; i < pageIDs.length; i++){\n\t\t$(\".searchResults\").append(\"<div class=results><h3><a href='\" + articleURL + pageIDs[i] + \"' target='_blank'>\" + data.query.pages[pageIDs[i]].title + \"</a></h3><p>\" + data.query.pages[pageIDs[i]].extract + \"</p></div>\");\n\t}\n}", "get totalDescendents() {\n let counter = 0;\n for (let descendent of this.offspring) {\n counter += descendent.totalDescendents;\n counter++;\n }\n return counter;\n }", "function getEntriesFromLessons(){\n console.log(\"Getting Lesson Entries\");\n dbShellLessons.transaction(function(tx){\n tx.executeSql(\"select lessonRow_id,teacher_id,lesson_id,exercise_id,exercise_title,exercise_detail,\\\n exercise_voice,exercise_image from lessons group by lesson_id\",[]\n ,renderEntriesForLessons,dberrorhandlerForLessons);\n },dberrorhandlerForLessons);\n}", "_addWheres(whereJoiner, listAdapter, where, tableAlias) {\n for (let path of Object.keys(where)) {\n const condition = this._getQueryConditionByPath(listAdapter, path, tableAlias);\n if (condition) {\n whereJoiner(condition(where[path]));\n } else if (path === 'AND' || path === 'OR') {\n whereJoiner(q => {\n // AND/OR need to traverse both side of the query\n let subJoiner;\n if (path == 'AND') {\n q.whereRaw('true');\n subJoiner = w => q.andWhere(w);\n } else {\n q.whereRaw('false');\n subJoiner = w => q.orWhere(w);\n }\n where[path].forEach(subWhere =>\n this._addWheres(subJoiner, listAdapter, subWhere, tableAlias)\n );\n });\n } else {\n // We have a relationship field\n let fieldAdapter = listAdapter.fieldAdaptersByPath[path];\n if (fieldAdapter) {\n // Non-many relationship. Traverse the sub-query, using the referenced list as a root.\n const otherListAdapter = listAdapter.getListAdapterByKey(fieldAdapter.refListKey);\n this._addWheres(whereJoiner, otherListAdapter, where[path], `${tableAlias}__${path}`);\n } else {\n // Many relationship\n const [p, constraintType] = path.split('_');\n fieldAdapter = listAdapter.fieldAdaptersByPath[p];\n const { rel } = fieldAdapter;\n const { cardinality, tableName, columnName } = rel;\n const subBaseTableAlias = this._getNextBaseTableAlias();\n const otherList = fieldAdapter.refListKey;\n const otherListAdapter = listAdapter.getListAdapterByKey(otherList);\n const subQuery = listAdapter._query();\n let otherTableAlias;\n let selectCol;\n if (cardinality === '1:N' || cardinality === 'N:1') {\n otherTableAlias = subBaseTableAlias;\n selectCol = columnName;\n subQuery\n .select(`${subBaseTableAlias}.${selectCol}`)\n .from(`${tableName} as ${subBaseTableAlias}`);\n // We need to filter out nulls before passing back to the top level query\n // otherwise postgres will give very incorrect answers.\n subQuery.whereNotNull(columnName);\n } else {\n const { near, far } = listAdapter._getNearFar(fieldAdapter);\n otherTableAlias = `${subBaseTableAlias}__${p}`;\n selectCol = near;\n subQuery\n .select(`${subBaseTableAlias}.${selectCol}`)\n .from(`${tableName} as ${subBaseTableAlias}`);\n subQuery.innerJoin(\n `${otherListAdapter.tableName} as ${otherTableAlias}`,\n `${otherTableAlias}.id`,\n `${subBaseTableAlias}.${far}`\n );\n }\n \n this._addJoins(subQuery, otherListAdapter, where[path], otherTableAlias);\n\n // some: the ID is in the examples found\n // none: the ID is not in the examples found\n // every: the ID is not in the counterexamples found\n // FIXME: This works in a general and logical way, but doesn't always generate the queries that PG can best optimise\n // 'some' queries would more efficient as inner joins\n\n if (constraintType === 'every') {\n subQuery.whereNot(q => {\n q.whereRaw('true');\n this._addWheres(w => q.andWhere(w), otherListAdapter, where[path], otherTableAlias);\n });\n } else {\n subQuery.whereRaw('true');\n this._addWheres(\n w => subQuery.andWhere(w),\n otherListAdapter,\n where[path],\n otherTableAlias\n );\n }\n\n // Ensure there therwhereIn/whereNotIn query is run against\n // a table with exactly one column.\n const subSubQuery = listAdapter.parentAdapter.knex\n .select(selectCol)\n .from(subQuery.as('unused_alias'));\n if (constraintType === 'some') {\n whereJoiner(q => q.whereIn(`${tableAlias}.id`, subSubQuery));\n } else {\n whereJoiner(q => q.whereNotIn(`${tableAlias}.id`, subSubQuery));\n }\n }\n }\n }\n }", "static async getPostAuthors(parent, count = 1, offset = 0) {\n const query = aql`\n FOR v IN 1..1 INBOUND ${parent} ${collections.UserPosts}\n LIMIT ${offset}, ${count}\n RETURN v\n `;\n\n const cursor = await db.query(query);\n return cursor.all();\n }", "function listArticles() {\n return _.map(fs.readdirSync('articles/'), readArticleData)\n}", "function removeChildren(_seed_word, d_name, d_parent) {\nvar deferred = Q.defer();\nvar seed_word = _seed_word;\nvar target_name = d_name;\nvar target_parent = d_parent;\n\nwaitAndCall(function(){\ndownloadFile();\n});\n\ndeleteChildren();\n\nfunction deleteChildren() {\n\n if(target_parent === seed_word) {\n db.boards.update({ search_word: seed_word }, { $inc: { children: -1 } },\n function (err, doc) {\n if (err) deferred.reject(err.name + ': ' + err.message);\n deferred.resolve();\n });\n }\n else {\n db.boards.update({ search_word: seed_word, \"links.target\": target_parent}, { $inc: { \"links.$.children\": -1 } },\n function (err, doc) {\n if (err) deferred.reject(err.name + ': ' + err.message);\n deferred.resolve();\n });\n }\n}\nreturn deferred.promise;\n}", "_decorateRead () {\n this.relatedQuery.where(this.toKey, this.parent[this.fromKey])\n }", "function page_descendant(input_){\n //\n //\n //Call the parent page_records (which is also defined in in this same file)\n page_records.call(this, input_);\n //\n //Let x be the querystring of the parent; I will ovrride it in the the\n //implementation of this version's querystring\n this.x = this.get_querystring;\n \n //Returns a query string for supporting CRUD operations on ercros of this \n //page. This extends the page records version by adding a parent table name an dforeign key properties to the\n //parents querysring\n this.get_querystring = function(dom_record=null){//page_descendant\n //\n //Get the querystring of the parent page of records; x is the parent\n //query string before overring it.\n var qstring = this.x(dom_record);\n //\n //Add the parent table ame\n qstring.parent_tname = this.parent_tname;\n qstring.parent_primarykey = this.parent_primarykey;\n //\n //Return the richer query string\n return qstring;\n }; \n \n}", "function getArticle(){\n return fetch(urlProduit) \n .then(function(reponse) {\n if (reponse.ok) {\n return reponse.json();\n }\n })\n .then(function(data) {\n //Affichage du contenu de la page produit\n afficheProduit(data) \n //Affichage du span panier avec le nombre d'article dans le panier\n nombrePanier();\n //Ajout au panier au clic \n bouton.addEventListener('click', () => {\n ajoutPanier(data)\n nombrePanier();\n }) \n })\n .catch(function(err) {\n // Une erreur est survenue\n });\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 obtener_superior() {\n\tcargando('Obteniendo información')\n\tvar superiores = document.getElementsByClassName('refer')\n\tfor (var i = 0; i < superiores.length; i++) {\n\t\tenvio = { numero: i, nombre: superiores[i].innerText }\n\t\t$.ajax({\n\t\t\tmethod: \"POST\",\n\t\t\turl: \"/admin-reportes/cabeza_principal\",\n\t\t\tdata: envio\n\t\t}).done((respuesta) => {\n\t\t\tdocument.getElementsByClassName('superior')[respuesta.numero].innerHTML = respuesta.referido\n\t\t\tvar env = { numero: respuesta.numero, nombre: document.getElementsByClassName('superior')[respuesta.numero].innerHTML }\n\t\t\t$.ajax({\n\t\t\t\tmethod: \"POST\",\n\t\t\t\turl: \"/admin-reportes/cabeza_principal\",\n\t\t\t\tdata: env\n\t\t\t}).done((respuesta) => {\n\t\t\t\tdocument.getElementsByClassName('principal')[respuesta.numero].innerHTML = respuesta.referido\n\t\t\t})\n\t\t})\n\t}\n\tno_cargando()\n}", "get childNodes()\n\t{\n\t\tvar result = [];\n\n\t\tif (this.distLists.length > 0) {\n\t\t\tfor each(var distList in this.distLists) {\n\t\t\t\tresult.push(distList);\n\t\t\t}\n\t\t}\n\t\treturn exchWebService.commonFunctions.CreateSimpleEnumerator(result);\n\t}", "findAll() {\n return db.many(`\n SELECT * FROM recipes\n `);\n }", "function displayArticles(articles) {\n console.log(articles);\n for (let content of articles) {\n\n let div = document.createElement(\"div\");\n div.classList.add(\"col-12\", \"col-sm-6\", \"col-lg-3\", \"my-2\");\n\n section.appendChild(div);\n let article = document.createElement(\"article\");\n article.classList.add(\"card\", \"h-100\");\n\n div.appendChild(article);\n let h = document.createElement(\"h4\");\n h.classList.add(\"card-title\", \"text-center\");\n h.innerText = content.titre;\n article.appendChild(h);\n\n let p = document.createElement(\"p\");\n p.classList.add(\"card-text\", \"text-center\");\n p.innerText = content.contenu;\n article.appendChild(p);\n }\n}", "function addDescendants(definition) {\n /* istanbul ignore if */\n if (!definition.properties) return;\n\n for (let [propertyName, property] of Object.entries(definition.properties)) {\n if (property && property['$ref']) {\n const modelName = _.last(property['$ref'].split('/'));\n if (!writeableModels.has(modelName)) {\n // Add descendants of descendants\n addDescendants(definitionMap[modelName]);\n writeableModels.add(modelName);\n }\n }\n }\n }", "getAll() {\n return new Promise((resolve, reject) =>\n this.db.query(\"SELECT * FROM articles ORDER BY list_id, articles\")\n .then(res => resolve(res.rows))\n .catch(e => reject(e)))\n }", "function includeBibentries(parentElement, query = \"\", source = \"https://webis.de/publications.html\") {\n parentElement.innerText = \"Loading...\";\n\n /* add style sheet if not added already */\n if (document.querySelector('link[href=\"https://webis.de/css/style.css\"]') == null) {\n var linkElement = document.createElement('link');\n linkElement.setAttribute('rel', 'stylesheet');\n linkElement.setAttribute('href', 'https://webis.de/css/style.css');\n document.getElementsByTagName('head')[0].appendChild(linkElement);\n }\n\n const request = new XMLHttpRequest();\n request.onload = function() {\n const publicationsList = this.response.documentElement.querySelector(\".publications-list\");\n const filterFunction = initPublicationsFiltering(publicationsList);\n filterFunction(query);\n publicationsList.classList.remove(\"uk-container\", \"uk-margin-medium\");\n parentElement.innerText = \"\";\n parentElement.appendChild(publicationsList);\n }\n request.open(\"GET\", source);\n request.responseType = \"document\";\n request.send();\n}", "function inserer_dans_arbo(item,idPere,obj=null)\n{ \n\n if(obj==null) obj=jsonObj.fils;\n for (key in obj)\n {\n\n if(key==idPere && !obj[key].estArticle)\n {\n obj[key].child++;\n // item.position=obj[key].child;\n //alert(item.position);\n obj[key].fils[item.id]=item;\n \n return;\n }\n\n else if(key==idPere && obj[key].estArticle) \n { \n for(el in item)\n { \n obj[key].contenu.docs[el]=item[el];\n obj[key].child++;\n }\n \n return; \n } \n \n else \n { \n inserer_dans_arbo(item,idPere,obj[key].fils); \n }\n \n }\n}", "function CargarListado(tx) {\n\tif(busqueda!=null){\t\n\t console.log(\"SELECT sub.id_linea, sub.id_sublinea, art.nom_articulo, art.referencia, art.serie, placa_nueva, placa_anterior, art.id_envio, marca, id_estado, art.id_articulo,art.fecha_fabricacion FROM publicarticulo art LEFT JOIN publicsublinea sub ON sub.id_sublinea = art.id_sublinea WHERE art.rowid ='\"+res[3]+\"'\");\n\t tx.executeSql(\"SELECT sub.id_linea, sub.id_sublinea, art.nom_articulo, art.referencia, art.serie, placa_nueva, placa_anterior, art.id_envio, marca, id_estado, art.id_articulo,art.fecha_fabricacion FROM publicarticulo art LEFT JOIN publicsublinea sub ON sub.id_sublinea = art.id_sublinea WHERE art.rowid ='\"+res[3]+\"'\", [], MuestraItems);\n\t}\n}", "function populateChildren(contentList, depth, limit){\n contentList.forEach(function(content) {\n ContentModel.get({contentModel:content.id, limit:100, skip:0, sort:'createdAt DESC'}).then(function(contentList){\n if (contentList.length > 0){\n depth++ \n content.children = contentList;\n $scope.content.children.push(content);\n if (depth < limit){populateChildren(contentList, depth, limit)}\n }\n });\n });\n }", "function collectUnrelated(nodes) {\r\n var unrelated = [];\r\n $.each(nodes, function (i, n) {\r\n if (!n.searchResult && !n.state.expanded) { // no hit, no parent\r\n unrelated.push(n.nodeId);\r\n }\r\n if (!n.searchResult && n.nodes) { // recurse for non-result children\r\n $.merge(unrelated, collectUnrelated(n.nodes));\r\n }\r\n });\r\n return unrelated;\r\n }", "fetchHierarchy(id) {\n this.fetchData({type: \"FETCH_TREEHIERARCHY\", data: {\"treeRootId\": id}});\n }", "function getArticles() {\n $.getJSON(\"/articles\", function (data) {\n for (var i = 0; i < data.length; i++) {\n $(\"#articles\").append(\"<p data-id='\" + data[i]._id + \"'><b>\" + data[i].title + \"</b><br />\" + data[i].summary + \"<br />\" + data[i].byline + \"<br /><a href=\" + data[i].link + \">View Article </a>\" + \"|\" + \"<a class=\" + \"save-article\" + \"> Save Article</a></p>\");\n }\n });\n }", "function articuloTomado(e) {\n e.preventDefault(); \n\n let articulo;\n if ( e.target.classList.contains(\"llevar-articulo\") ) {\n // toma el elementoHTML del articulo.\n // take the article's htmlElement.\n articulo = e.target.parentElement.parentElement;\n leerDatosDeArticulo(articulo);\n }\n}", "function getDescendantsNodes(selfUL, nodeDIV) {\r\n\t\tvar dataRows = [];\r\n\t\tif (nodeDIV) {\r\n\t\t\t_parseDescendants($(nodeDIV));\r\n\t\t} else {\r\n\t\t\tvar rootNodes = getRootNodes(selfUL);\r\n\t\t\tfor ( var i = 0; i < rootNodes.length; i++) {\r\n\t\t\t\tdataRows.push(rootNodes[i]);\r\n\t\t\t\t_parseDescendants($(rootNodes[i].target));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * add decendants of $node to array\r\n\t\t */\r\n\t\tfunction _parseDescendants($node) {\r\n\t\t\t$f(\"div.TrN\", $node.next()).each(function() {\r\n\t\t\t\tdataRows.push(getNode(selfUL, this));\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn dataRows;\r\n\t}", "function findAll() {\n return fs.readFile(dbPath, \"utf-8\").then((jsonData) => {\n const articles = JSON.parse(jsonData);\n return articles;\n });\n}", "function getRelations(d, i) {\n var links = []\n var linksCount = 0\n for (i in relations) {\n if (nodeHash[d.class] === relations[i].target) {\n links[linksCount] = relations[i]\n linksCount++\n }\n }\n return links\n }", "function isDescendant(relationship){\n return -relationship.depth == relationship.distance\n}" ]
[ "0.60755277", "0.49528927", "0.49398327", "0.48795164", "0.48221403", "0.4820834", "0.48208284", "0.4817964", "0.4786242", "0.47716898", "0.47457314", "0.47356975", "0.4731128", "0.4688601", "0.4670929", "0.467037", "0.46670914", "0.46624735", "0.46552834", "0.46518728", "0.46476397", "0.4647422", "0.46354443", "0.4632524", "0.46319464", "0.46173495", "0.4613917", "0.4603082", "0.4578516", "0.456501", "0.45587945", "0.45573583", "0.4556076", "0.45517385", "0.45466286", "0.45445323", "0.45356202", "0.45240206", "0.45189044", "0.4516796", "0.4509416", "0.45038292", "0.45033282", "0.45010546", "0.44961947", "0.44949657", "0.44869706", "0.44823238", "0.44813353", "0.44646233", "0.44641775", "0.44610795", "0.44574064", "0.4451201", "0.44448394", "0.4444171", "0.44396886", "0.44391754", "0.44325942", "0.44282967", "0.44245586", "0.44235978", "0.441685", "0.4413169", "0.44077688", "0.44003674", "0.43994188", "0.43991286", "0.4398909", "0.43951866", "0.43950287", "0.4394992", "0.43920913", "0.43897843", "0.43862337", "0.43856767", "0.4384253", "0.4378729", "0.4371796", "0.43701357", "0.4363486", "0.43633008", "0.43610662", "0.4358458", "0.4351277", "0.43471894", "0.43426278", "0.43413323", "0.4340184", "0.43365416", "0.4332065", "0.43316254", "0.43270895", "0.4324373", "0.43242842", "0.432235", "0.43193504", "0.43167686", "0.431083", "0.4309911", "0.43096393" ]
0.0
-1
Function to clear existing timeout
function clearExistingTimeout() { if ( timeoutID ) { clearTimeout( timeoutID ); } } // Function to cancel next exec
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clear(){timeoutID=undefined;}", "function clear(){timeoutID=undefined;}", "function clear() {\n timeoutID = undefined;\n }", "function clear() {\n timeoutID = undefined;\n }", "function clear() {\n timeoutID = undefined;\n }", "function clear() {\n timeoutID = undefined;\n }", "function clear() {\n timeoutID = undefined;\n }", "function clear() {\n timeoutID = undefined;\n }", "function clear() {\n timeoutID = undefined;\n }", "function clear() {\n timeoutID = undefined;\n }", "function clear() {\n timeout_id = undefined;\n }", "function clear() {\n timeout_id = undefined;\n }", "function clear() {\n timeout_id = undefined;\n }", "function clear() {\n timeout_id = undefined;\n }", "function clear() {\n\t timeoutID = undefined;\n\t }", "function clear() {\n\t timeoutID = undefined;\n\t }", "function clear() {\n timeoutID = undefined;\n }", "function clear() {\n timeoutID = undefined;\n }", "function clear() {\n\t\t\ttimeoutID = undefined;\n\t\t}", "function clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}", "function clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}", "function clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}", "function clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}", "function clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}", "function clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}", "function clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}", "function clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}", "function clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}", "function clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}", "function clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}", "function clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}", "function clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}", "function clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}", "function clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}", "function clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}", "function clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}", "function clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}", "function clear () {\n\t\t\t\ttimeoutID = undefined;\n\t\t\t}", "function clear () {\n\t\t\t\ttimeoutID = undefined;\n\t\t\t}", "function clearExistingTimeout() {\n if (timeoutID) {\n clearTimeout(timeoutID);\n }\n } // Function to cancel next exec", "function clearExistingTimeout() {\n if (timeoutID) {\n clearTimeout(timeoutID);\n }\n } // Function to cancel next exec", "function clearExistingTimeout() {\n if (timeoutID) {\n clearTimeout(timeoutID);\n }\n } // Function to cancel next exec", "function clearExistingTimeout() {\n if (timeoutID) {\n clearTimeout(timeoutID);\n }\n } // Function to cancel next exec", "function clearExistingTimeout() {\n if (timeoutID) {\n clearTimeout(timeoutID);\n }\n } // Function to cancel next exec", "function clearExistingTimeout() {\n if (timeoutID) {\n clearTimeout(timeoutID);\n }\n } // Function to cancel next exec", "function clearExistingTimeout() {\n if (timeoutID) {\n clearTimeout(timeoutID);\n }\n } // Function to cancel next exec", "function clearExistingTimeout() {\n if (timeoutID) {\n clearTimeout(timeoutID);\n }\n } // Function to cancel next exec", "function clearExistingTimeout() {\n\t if (timeoutID) {\n\t clearTimeout(timeoutID);\n\t }\n\t } // Function to cancel next exec", "function clearExistingTimeout() {\n\t if (timeoutID) {\n\t clearTimeout(timeoutID);\n\t }\n\t } // Function to cancel next exec", "function clear() {\n clearTimeout(myTimeout);\n }", "function resetTimeout() {\n clearTimeout(timeout);\n timeout = setTimeout(function () {\n reset();\n }, options.timeout);\n }", "reset () {\n if (this._timeoutID) {\n window.clearTimeout(this._timeoutID);\n this._timeoutID = null;\n }\n }", "function clear_timeout(){\n\tvar start_time=new Date();\n\tsys.puts('se inicializa timer de 30s y lo detine de inmediato sin disparar una llamada');\n\tvar timeout= setTimeout(function(){\n\t\tvar end_time = new Date();\n\t\tvar diff= end_time.getTime() - start_time.getTime();\n\t\tsys.puts('tiempo detenido despues de' + Math.round(diff/1000)+' segundos');\n\n\n\t},30000);\n\t \n\tclearTimeout(timeout);\n\t \n\tinterval_ejemplo();\n}", "_clearDurationTimeout () {\n if (this._pendingDurationTimeoutId !== null) {\n clearTimeout(this._pendingDurationTimeoutId);\n this._pendingDurationTimeoutId = null;\n this._pendingDurationTimeoutStartTime = null;\n this._pendingDurationTimeoutDelay = null;\n }\n }", "_clearTriggerTimeout() {\n clearTimeout(this._timeoutTrigger);\n this._timeoutTrigger = null;\n }", "clearDelay() {\n clearTimeout(this.openTimeout);\n clearTimeout(this.closeTimeout);\n }", "clearDelay() {\n clearTimeout(this.openTimeout);\n clearTimeout(this.closeTimeout);\n }", "clearDelay() {\n clearTimeout(this.openTimeout);\n clearTimeout(this.closeTimeout);\n }", "clearDelay() {\n clearTimeout(this.openTimeout);\n clearTimeout(this.closeTimeout);\n }", "clearDelay() {\n clearTimeout(this.openTimeout);\n clearTimeout(this.closeTimeout);\n }", "_clearTimer() {\n\t\tconst timer = this.get('_timer');\n\n\t\tif (timer) {\n\t\t\tcancel(timer);\n\n\t\t\tthis.set('_timer');\n\t\t}\n\n\t\tthis.set('_nextDelay');\n\t\tthis.set('_times', 0);\n\t\tthis.set('_timestamp');\n\t}", "_clearTriggerTimeout() {\n clearTimeout(this._timeoutTrigger);\n this._timeoutTrigger = null;\n }", "function clearTimer() {\n\t\t\tif (sys.timer) {\n\t\t\t\twindow.clearTimeout(sys.timer);\n\t\t\t}\n\t\t\tsys.timer = null;\n\t\t}", "function clearTimer() {\n clearTimeout(this._timeout);\n if (callback) {\n self.removeListener(\"timeout\", callback);\n }\n if (!this.socket) {\n self._currentRequest.removeListener(\"socket\", startTimer);\n }\n }", "function clearTimer() {\n clearTimeout(this._timeout);\n if (callback) {\n self.removeListener(\"timeout\", callback);\n }\n if (!this.socket) {\n self._currentRequest.removeListener(\"socket\", startTimer);\n }\n }", "function clearTimer() {\n clearTimeout(this._timeout);\n if (callback) {\n self.removeListener(\"timeout\", callback);\n }\n if (!this.socket) {\n self._currentRequest.removeListener(\"socket\", startTimer);\n }\n }", "resetTimeout(){\n\t\t\n\t\tif(this.timeoutTime){\n\n\t\t\tclearTimeout(this.timeoutTime);\n\n\t\t\tthis.timeoutTime = setTimeout(() => this.gameLoop(), this.tick);\n\n\n\t\t}\n\n\t}", "function clearTimer(){\n clearTimeout(timer);\n clearInterval(interval);\n}", "static reset() {\n updateTimeouts.forEach(clearTimeout);\n updateTimeouts = [];\n improvedTimestampsInitted = false;\n improvedTimestamps = [];\n }", "resetPingTimeout() {\n this.clearTimeoutFn(this.pingTimeoutTimer);\n this.pingTimeoutTimer = this.setTimeoutFn(() => {\n this.onClose(\"ping timeout\");\n }, this.pingInterval + this.pingTimeout);\n if (this.opts.autoUnref) {\n this.pingTimeoutTimer.unref();\n }\n }", "resetPingTimeout() {\n this.clearTimeoutFn(this.pingTimeoutTimer);\n this.pingTimeoutTimer = this.setTimeoutFn(() => {\n this.onClose(\"ping timeout\");\n }, this.pingInterval + this.pingTimeout);\n if (this.opts.autoUnref) {\n this.pingTimeoutTimer.unref();\n }\n }", "static clearTimeout() {\n window.clearTimeout(Setup.timeout);\n Setup.timeout = -1;\n }", "clear() {\n if (this.retryTimer) {\n clearTimeout(this.retryTimer);\n }\n\n this.retryTimer = null;\n }", "function clearTimer() {\n // Clear the timeout\n if (self._timeout) {\n clearTimeout(self._timeout);\n self._timeout = null;\n }\n\n // Clean up all attached listeners\n self.removeListener(\"abort\", clearTimer);\n self.removeListener(\"error\", clearTimer);\n self.removeListener(\"response\", clearTimer);\n if (callback) {\n self.removeListener(\"timeout\", callback);\n }\n if (!self.socket) {\n self._currentRequest.removeListener(\"socket\", startTimer);\n }\n }", "resetTimer() {\n this.timeSelected = 0;\n this.completeElapsed = 0;\n this.complete = false;\n }", "function clearTimer() {\r\n clearInterval(timer);\r\n}", "function _resetTimeout() {\n $timeout.cancel(vm.promiseTimeoutInit);\n vm.promiseTimeoutInit = $timeout(function() {\n $rootScope.flags.isProcessing = false;\n }, C_CONFIG_COMMON.system.tansitionTime);\n }", "resetTimer_() {\n clearTimeout(this.timer);\n this.timer = 0;\n }", "function clearTimer() {\n clearInterval(timer);\n}", "function clearTimer() {\nclearInterval(timer);\n}", "function clear() { // code to clear the current running timer\r\n clearInterval(timer) // this will stop the interval\r\n timer = undefined // remove the reference to the old timer\r\n}", "resetPingTimeout() {\n clearTimeout(this.pingTimeoutTimer);\n this.pingTimeoutTimer = setTimeout(() => {\n this.onClose(\"ping timeout\");\n }, this.pingInterval + this.pingTimeout);\n\n if (this.opts.autoUnref) {\n this.pingTimeoutTimer.unref();\n }\n }", "function clearTimer() {\n if (timerInterval == null) return\n\n clearInterval(timerInterval)\n timerInterval = null\n}", "function clearTimer() {\n clearInterval(clock);\n}", "cancel() {\n clearTimeout(this.timeoutID);\n delete this.timeoutID;\n }", "function clearTimer() {\n debug(\"clearTimer\");\n let timer = document.querySelector('.timer');\n\n stopTime();\n timer.remove();\n }", "function _clearDelayTimeouts() {\n var _ref = this._(key),\n showTimeout = _ref.showTimeout,\n hideTimeout = _ref.hideTimeout;\n\n clearTimeout(showTimeout);\n clearTimeout(hideTimeout);\n }", "function reset_timeout() {\n\n // Get rid of old timeouts (if any)\n window.clearTimeout(receive_timeout);\n window.clearTimeout(unstableTimeout);\n\n // Clear unstable status\n if (tunnel.state === Guacamole.Tunnel.State.UNSTABLE)\n tunnel.setState(Guacamole.Tunnel.State.OPEN);\n\n // Set new timeout for tracking overall connection timeout\n receive_timeout = window.setTimeout(function () {\n close_tunnel(new Guacamole.Status(Guacamole.Status.Code.UPSTREAM_TIMEOUT, \"Server timeout.\"));\n }, tunnel.receiveTimeout);\n\n // Set new timeout for tracking suspected connection instability\n unstableTimeout = window.setTimeout(function() {\n tunnel.setState(Guacamole.Tunnel.State.UNSTABLE);\n }, tunnel.unstableThreshold);\n\n }", "function reset_timeout() {\n\n // Get rid of old timeouts (if any)\n window.clearTimeout(receive_timeout);\n window.clearTimeout(unstableTimeout);\n\n // Clear unstable status\n if (tunnel.state === Guacamole.Tunnel.State.UNSTABLE)\n tunnel.setState(Guacamole.Tunnel.State.OPEN);\n\n // Set new timeout for tracking overall connection timeout\n receive_timeout = window.setTimeout(function () {\n close_tunnel(new Guacamole.Status(Guacamole.Status.Code.UPSTREAM_TIMEOUT, \"Server timeout.\"));\n }, tunnel.receiveTimeout);\n\n // Set new timeout for tracking suspected connection instability\n unstableTimeout = window.setTimeout(function() {\n tunnel.setState(Guacamole.Tunnel.State.UNSTABLE);\n }, tunnel.unstableThreshold);\n\n }", "constructor(timeout) {\n this.initialTimeout = timeout\n this.reset()\n }", "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 }", "function cleanUpTimeout(inv) {\n if (!inv) return;\n delete timeouts[inv.timerKey];\n delete inv.timerKey;\n inv.release(); // return to pool \n}", "function TimeClear() {\n clearInterval(ID);\n}", "function clearTimer() {\n stopTimer();\n seconds = 0; \n minutes = 0;\n timerStatus = false;\n let resetTime = document.querySelector('.timer');\n resetTime.innerHTML = '00:00';\n }", "function alwaysClearStack(fn) {\n\t _global[SET_TIMEOUT](fn, 0);\n\t }", "function clearTime() {\n clearInterval(timeInterval);\n}", "function resetTimeout() {\n if (timeoutTimer) {\n clearTimeout(timeoutTimer);\n }\n timeoutTimer = setTimeout(() => {\n callIFTTT(\"notify\", TEMP_SENSOR_MESSAGE);\n }, ARDUINO_TIMEOUT);\n}", "function resetTimeout(fn,ms) {\n\t\t\t\tif (timer) {\n\t\t\t\t\tclearTimeout(timer);\n\t\t\t\t}\n\t\t\t\tsetTimeout(fn,ms);\n\t\t\t}", "function clearTypingTimer()\n\t{\n\t\t// Clear timer handle\n\t\tif (typingTimer) {\n\t\t\tclearTimeout(typingTimer);\n\t\t\ttypingTimer = null;\n\t\t}\n\t}", "function setupTimeoutTimer() {\n updateTimeoutInfo(undefined);\n }" ]
[ "0.8522396", "0.8522396", "0.8484727", "0.8484727", "0.8484727", "0.8484727", "0.8484727", "0.8484727", "0.8484727", "0.8484727", "0.8452658", "0.8452658", "0.8452658", "0.8452658", "0.8452439", "0.8452439", "0.8433976", "0.8396499", "0.83060086", "0.8267889", "0.8267889", "0.8267889", "0.8267889", "0.8267889", "0.8267889", "0.8267889", "0.8267889", "0.8267889", "0.8267889", "0.8267889", "0.8267889", "0.8267889", "0.8267889", "0.8267889", "0.8267889", "0.8267889", "0.8267889", "0.82407165", "0.82407165", "0.80571973", "0.801791", "0.801791", "0.801791", "0.801791", "0.801791", "0.801791", "0.801791", "0.79416674", "0.79416674", "0.78358924", "0.77434576", "0.77064776", "0.7586598", "0.7466123", "0.7464052", "0.7440304", "0.7440304", "0.7440304", "0.7440304", "0.7440304", "0.7400548", "0.73561054", "0.7353944", "0.72924155", "0.72924155", "0.72924155", "0.7291582", "0.7285982", "0.72837263", "0.7270875", "0.7270875", "0.7233103", "0.7208778", "0.71975684", "0.70996654", "0.7096964", "0.70769906", "0.7040647", "0.7031147", "0.69914716", "0.69752896", "0.6969757", "0.694857", "0.69384205", "0.69319767", "0.6922866", "0.6920998", "0.6901404", "0.6901404", "0.68828666", "0.68705285", "0.68671966", "0.68381125", "0.6832207", "0.68250614", "0.68204725", "0.68110967", "0.6808416", "0.68049645", "0.6785458" ]
0.7962573
47
The `wrapper` function encapsulates all of the throttling / debouncing functionality and when executed will limit the rate at which `callback` is executed.
function wrapper() { const self = this; const elapsed = Date.now() - lastExec; const args = arguments; if ( cancelled ) { return; } // Execute `callback` and update the `lastExec` timestamp. function exec() { lastExec = Date.now(); callback.apply( self, args ); } /* * If `debounceMode` is true (at begin) this is used to clear the flag * to allow future `callback` executions. */ function clear() { timeoutID = undefined; } if ( debounceMode && ! timeoutID ) { /* * Since `wrapper` is being called for the first time and * `debounceMode` is true (at begin), execute `callback`. */ exec(); } clearExistingTimeout(); if ( debounceMode === undefined && elapsed > delay ) { /* * In throttle mode, if `delay` time has been exceeded, execute * `callback`. */ exec(); } else if ( noTrailing !== true ) { /* * In trailing throttle mode, since `delay` time has not been * exceeded, schedule `callback` to execute `delay` ms after most * recent execution. * * If `debounceMode` is true (at begin), schedule `clear` to execute * after `delay` ms. * * If `debounceMode` is false (at end), schedule `callback` to * execute after `delay` ms. */ timeoutID = setTimeout( debounceMode ? clear : exec, debounceMode === 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 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 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 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.72283226", "0.72283226", "0.72283226", "0.7220747", "0.7205905", "0.7198615", "0.71728563", "0.7171839", "0.71267235", "0.7118952", "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.7052312
35
Execute `callback` and update the `lastExec` timestamp.
function exec() { lastExec = Date.now(); callback.apply( self, 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 last_exec = +new Date();\n callback.apply( that, args );\n }", "function exec() {\n last_exec = +new Date();\n callback.apply( that, args );\n }", "function exec() {\n last_exec = +new Date();\n callback.apply( that, args );\n }", "function exec() {\n last_exec = +new Date();\n callback.apply( that, 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 lastExec = Date.now();\n callback.apply(self, args);\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\t lastExec = Date.now();\n\t callback.apply(self, args);\n\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\t\t\tlastExec = Number(new Date());\n\t\t\t\tcallback.apply(self, args);\n\t\t\t}", "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 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 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 exec_callback( args ) {\n if ( callback_func && (callback_force || !con || !con.log) ) {\n callback_func.apply( window, args );\n }\n }", "function callback() {}", "function callback() {}", "function callback() {}", "function callback() {}", "function callback() {}", "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 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(id) { /// Execute callback\n if (!callbacks[id])\n return;\n callbacks[id].call();\n}", "function cb () {\n\t\tcallback();\n\t}", "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 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 callback(){}", "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 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(){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", "registerCallback (callback) {\n this._updates.push(callback);\n }", "registerCallback (callback) {\n this._updates.push(callback);\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\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/*\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\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\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\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 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}", "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 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\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 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 exec() {\n this._throttle[methodID] = {\n previous: (new Date()).getTime()\n };\n func.apply(this, arguments);\n }", "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 callbackDriver() {\n cb();\n }", "function runAfterTxHook(cb) {\n self.emit('afterTx', results, cb);\n }", "function execCallback(error, stdout, stderr) { \n console.log(stdout);\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 recomputeCallback() {\n var len = TO_CALL.length;\n CALL_TIMEOUT = null;\n while (len--) {\n (TO_CALL.shift() || NOOP).call();\n }\n\n TO_CALL.added = {};\n}", "function _callback(err, data) { _call(callback, err, data); }" ]
[ "0.75365394", "0.75365394", "0.74436194", "0.74161553", "0.7291808", "0.7291808", "0.7291808", "0.7291808", "0.72254", "0.72254", "0.72254", "0.72254", "0.72254", "0.722014", "0.7209396", "0.7209396", "0.7209396", "0.7209396", "0.7209396", "0.7209396", "0.7209396", "0.7209396", "0.7209396", "0.7209396", "0.7209396", "0.7209396", "0.7209396", "0.7209396", "0.7209396", "0.7209396", "0.7209396", "0.7209396", "0.7177507", "0.716442", "0.716442", "0.6337668", "0.62578654", "0.5950281", "0.589893", "0.58912456", "0.58912456", "0.58912456", "0.58912456", "0.58912456", "0.58866316", "0.5851198", "0.58309597", "0.5806625", "0.58037186", "0.5799621", "0.5799621", "0.5799621", "0.5799621", "0.5799621", "0.5781344", "0.57723904", "0.5735091", "0.5725701", "0.5718467", "0.5718467", "0.5690958", "0.5690958", "0.5677202", "0.5677202", "0.5677202", "0.5636079", "0.5628926", "0.56019425", "0.558505", "0.558505", "0.558505", "0.558505", "0.558505", "0.558505", "0.558505", "0.558505", "0.558505", "0.558505", "0.558505", "0.558505", "0.558505", "0.558505", "0.558505", "0.558505", "0.558505", "0.55590785", "0.5547395", "0.5529869", "0.5513338", "0.5470904", "0.5464879", "0.54407597", "0.54386", "0.5435774", "0.5417854", "0.54112047", "0.5333246", "0.53326464", "0.5315152", "0.5288359" ]
0.712882
35
If `debounceMode` is true (at begin) this is used to clear the flag to allow future `callback` executions.
function clear() { timeoutID = 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}", "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 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 debounce(f, t) {\n return f;\n}", "get debounce() { return this._debounce; }", "get debounce() { return this._debounce; }", "get debounce() { return this._debounce; }", "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 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 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(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 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}", "get debounce() {\n return this._debounce;\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 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 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() {\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 }", "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,\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, 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(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 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\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 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 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 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(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 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 debounce(fn, threshold) {\n var timeout;\n return function debounced() {\n if (timeout) {\n clearTimeout(timeout);\n }\n\n function delayed() {\n fn();\n timeout = null;\n }\n setTimeout(delayed, threshold || 100);\n }\n } // end used for packery: debounce", "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) {\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(f, delay = 80) {\n let timer\n return function() {\n if (timer) {\n clearTimeout(timer)\n }\n timer = setTimeout(_ => f.apply(this, arguments), delay)\n }\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 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( fn, threshold ) {\r\n var timeout;\r\n return function debounced() {\r\n if ( timeout ) {\r\n clearTimeout( timeout );\r\n }\r\n function delayed() {\r\n fn();\r\n timeout = null;\r\n }\r\n timeout = setTimeout( delayed, threshold || 100 );\r\n }\r\n}", "function debounce( fn, threshold ) {\n var timeout;\n return function debounced() {\n if ( timeout ) {\n clearTimeout( timeout );\n }\n function delayed() {\n fn();\n timeout = null;\n }\n setTimeout( delayed, threshold || 100 );\n };\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 debounce( fn, threshold ) {\n var timeout;\n return function debounced() {\n if ( timeout ) {\n clearTimeout( timeout );\n }\n function delayed() {\n fn();\n timeout = null;\n }\n setTimeout( delayed, threshold || 100 );\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( fn, threshold ) {\n var timeout;\n return function debounced() {\n if ( timeout ) {\n clearTimeout( timeout );\n }\n function delayed() {\n fn();\n timeout = null;\n }\n timeout = setTimeout( delayed, threshold || 100 );\n }\n}", "function debounce( fn, threshold ) {\n var timeout;\n return function debounced() {\n if ( timeout ) {\n clearTimeout( timeout );\n }\n function delayed() {\n fn();\n timeout = null;\n }\n timeout = setTimeout( delayed, threshold || 100 );\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(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 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(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( fn, threshold ) {\n var timeout;\n threshold = threshold || 100;\n return function debounced() {\n clearTimeout( timeout );\n var args = arguments;\n var _this = this;\n function delayed() {\n fn.apply( _this, args );\n }\n timeout = setTimeout( delayed, threshold );\n };\n }", "function debounce( fn, threshold ) {\n var timeout;\n threshold = threshold || 100;\n return function debounced() {\n clearTimeout( timeout );\n var args = arguments;\n var _this = this;\n function delayed() {\n fn.apply( _this, args );\n }\n timeout = setTimeout( delayed, threshold );\n };\n }", "function debounce(f, waitMs) {\n var lastTime = tfjs_core_1.util.now();\n var lastResult;\n var f2 = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var now = tfjs_core_1.util.now();\n if (now - lastTime < waitMs) {\n return lastResult;\n }\n lastTime = now;\n lastResult = f.apply(void 0, args);\n return lastResult;\n };\n return f2;\n}", "function debounce(f, waitMs) {\n var lastTime = tfjs_core_1.util.now();\n var lastResult;\n var f2 = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var now = tfjs_core_1.util.now();\n if (now - lastTime < waitMs) {\n return lastResult;\n }\n lastTime = now;\n lastResult = f.apply(void 0, args);\n return lastResult;\n };\n return f2;\n}", "function debounce(fn, threshold) {\r\n var timeout;\r\n return function debounced() {\r\n if (timeout) {\r\n clearTimeout(timeout);\r\n }\r\n function delayed() {\r\n fn();\r\n timeout = null;\r\n }\r\n timeout = setTimeout(delayed, threshold || 100);\r\n };\r\n}", "function debounce(targetCheck, func, wait, immediate) {\n targetDirtyFlag = targetCheck;\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(fn, delay) {\n\t\tvar timer = null;\n\n\t\treturn function () {\n\t\t\tvar context = this,\n\t\t\targs = arguments;\n\n\t\t\twindow.clearTimeout(timer);\n\n\t\t\ttimer = window.setTimeout(function () {\n\t\t\t\tfn.apply(context, args);\n\t\t\t}, delay);\n\t\t};\n\t}", "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(fn, threshold) {\n var timeout;\n return function debounced() {\n if (timeout) {\n clearTimeout(timeout);\n }\n function delayed() {\n fn();\n timeout = null;\n }\n timeout = setTimeout(delayed, threshold || 100);\n }\n}", "function debounce(func) {\n var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 166;\n var timeout;\n\n function debounced() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n // eslint-disable-next-line consistent-this\n var that = this;\n\n var later = function later() {\n func.apply(that, args);\n };\n\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n }\n\n debounced.clear = function () {\n clearTimeout(timeout);\n };\n\n return debounced;\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 timeout = null;\n if (!immediate) func.apply(context, args);\n }, wait);\n if (immediate && !timeout) func.apply(context, args);\n };\n }", "function debounce(func, opt_threshold_ms) {\n let timeout;\n return function() {\n let context = this, args = arguments;\n let later = function() {\n timeout = null;\n func.apply(context, args);\n };\n clearTimeout(timeout);\n timeout = setTimeout(later, opt_threshold_ms || DEBOUNCE_THRESH_MS);\n };\n}", "function debounce(func) {\n var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 166;\n var timeout;\n\n function debounced() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n } // eslint-disable-next-line consistent-this\n\n\n var that = this;\n\n var later = function later() {\n func.apply(that, args);\n };\n\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n }\n\n debounced.clear = function () {\n clearTimeout(timeout);\n };\n\n return debounced;\n}", "function debounce(func) {\n var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 166;\n var timeout;\n\n function debounced() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n } // eslint-disable-next-line consistent-this\n\n\n var that = this;\n\n var later = function later() {\n func.apply(that, args);\n };\n\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n }\n\n debounced.clear = function () {\n clearTimeout(timeout);\n };\n\n return debounced;\n}", "function debounce(fn, threshold) {\n var timeout;\n return function debounced() {\n if (timeout) {\n clearTimeout(timeout);\n }\n\n function delayed() {\n fn();\n timeout = null;\n }\n timeout = setTimeout(delayed, threshold || 100);\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, 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(fn, threshold) {\n var timeout;\n return function debounced() {\n if (timeout) {\n clearTimeout(timeout);\n }\n\n function delayed() {\n fn();\n timeout = null;\n }\n timeout = setTimeout(delayed, threshold || 1000);\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) {\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(event, method, delay) {\n clearTimeout(method._tId);\n method._tId= setTimeout(function(){\n method(event);\n }, delay);\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 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) { // 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 _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(fn, threshold) {\n var timeout;\n return function debounced() {\n if (timeout) {\n clearTimeout(timeout);\n }\n\n function delayed() {\n fn();\n timeout = null;\n }\n timeout = setTimeout(delayed, threshold || 100);\n }\n }", "function debounce(func, wait, context) {\n var timer;\n return function debounced() {\n var context,\n args = Array.prototype.slice.call(arguments);\n $timeout.cancel(timer);\n timer = $timeout(function() {\n timer = undefined;\n func.apply(context, args);\n }, wait || 10);\n };\n }", "function debounce(quietMillis, fn, ctx) {\n\t ctx = ctx || undefined;\n\t var timeout;\n\t return function () {\n\t var args = arguments;\n\t window.clearTimeout(timeout);\n\t timeout = window.setTimeout(function() {\n\t fn.apply(ctx, args);\n\t }, quietMillis);\n\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}" ]
[ "0.75890416", "0.75890416", "0.7186383", "0.6594032", "0.6559964", "0.65062535", "0.64910924", "0.64910924", "0.64910924", "0.648964", "0.6391983", "0.63768727", "0.6287791", "0.6223064", "0.6152279", "0.6111874", "0.59641314", "0.5955779", "0.59517103", "0.5943719", "0.5937395", "0.5908108", "0.5896951", "0.5876259", "0.58753294", "0.5875194", "0.5875194", "0.5875194", "0.5875194", "0.5875194", "0.5875194", "0.5875194", "0.5875194", "0.5875194", "0.5875194", "0.5875194", "0.5875194", "0.5875194", "0.5875194", "0.5875194", "0.5875194", "0.5875194", "0.58636236", "0.5853148", "0.58496654", "0.58387804", "0.583644", "0.5823001", "0.5819474", "0.5817768", "0.57867163", "0.57866365", "0.57855827", "0.5780155", "0.5770088", "0.5766896", "0.57533085", "0.57498896", "0.5738462", "0.5717247", "0.5717247", "0.5711086", "0.5703613", "0.56898195", "0.5682848", "0.56808895", "0.56808895", "0.5667366", "0.5667366", "0.5664103", "0.56508493", "0.5642036", "0.56400025", "0.5636185", "0.56348956", "0.5627569", "0.56023073", "0.5602075", "0.55966455", "0.55966455", "0.55893373", "0.5587282", "0.55853903", "0.55802023", "0.5578342", "0.5576365", "0.5576365", "0.5576365", "0.5573852", "0.5569881", "0.55689037", "0.55668944", "0.55644816", "0.55644816", "0.5564175", "0.5561269", "0.55584824", "0.5558359", "0.55558735", "0.5553653", "0.5553653" ]
0.0
-1
File: linkify.js Version: 20101010_1000 Copyright: (c) 2010 Jeff Roberson MIT License: Summary: This script linkifys http URLs on a page. Usage: See demonstration page: linkify.html
function linkify(text) { /* Here is a commented version of the regex (in PHP string format): $url_pattern = '/# Rev:20100913_0900 github.com\/jmrware\/LinkifyURL # Match http & ftp URL that is not already linkified. # Alternative 1: URL delimited by (parentheses). (\() # $1 "(" start delimiter. ((?:ht|f)tps?:\/\/[a-z0-9\-._~!$&\'()*+,;=:\/?#[\]@%]+) # $2: URL. (\)) # $3: ")" end delimiter. | # Alternative 2: URL delimited by [square brackets]. (\[) # $4: "[" start delimiter. ((?:ht|f)tps?:\/\/[a-z0-9\-._~!$&\'()*+,;=:\/?#[\]@%]+) # $5: URL. (\]) # $6: "]" end delimiter. | # Alternative 3: URL delimited by {curly braces}. (\{) # $7: "{" start delimiter. ((?:ht|f)tps?:\/\/[a-z0-9\-._~!$&\'()*+,;=:\/?#[\]@%]+) # $8: URL. (\}) # $9: "}" end delimiter. | # Alternative 4: URL delimited by <angle brackets>. (<|&(?:lt|\#60|\#x3c);) # $10: "<" start delimiter (or HTML entity). ((?:ht|f)tps?:\/\/[a-z0-9\-._~!$&\'()*+,;=:\/?#[\]@%]+) # $11: URL. (>|&(?:gt|\#62|\#x3e);) # $12: ">" end delimiter (or HTML entity). | # Alternative 5: URL not delimited by (), [], {} or <>. ( # $13: Prefix proving URL not already linked. (?: ^ # Can be a beginning of line or string, or | [^=\s\'"\]] # a non-"=", non-quote, non-"]", followed by ) \s*[\'"]? # optional whitespace and optional quote; | [^=\s]\s+ # or... a non-equals sign followed by whitespace. ) # End $13. Non-prelinkified-proof prefix. ( \b # $14: Other non-delimited URL. (?:ht|f)tps?:\/\/ # Required literal http, https, ftp or ftps prefix. [a-z0-9\-._~!$\'()*+,;=:\/?#[\]@%]+ # All URI chars except "&" (normal*). (?: # Either on a "&" or at the end of URI. (?! # Allow a "&" char only if not start of an... &(?:gt|\#0*62|\#x0*3e); # HTML ">" entity, or | &(?:amp|apos|quot|\#0*3[49]|\#x0*2[27]); # a [&\'"] entity if [.!&\',:?;]? # followed by optional punctuation then (?:[^a-z0-9\-._~!$&\'()*+,;=:\/?#[\]@%]|$) # a non-URI char or EOS. ) & # If neg-assertion true, match "&" (special). [a-z0-9\-._~!$\'()*+,;=:\/?#[\]@%]* # More non-& URI chars (normal*). )* # Unroll-the-loop (special normal*)*. [a-z0-9\-_~$()*+=\/#[\]@%] # Last char can\'t be [.!&\',;:?] ) # End $14. Other non-delimited URL. /imx'; */ var url_pattern = /(\()((?:ht|f)tps?:\/\/[a-z0-9\-._~!$&'()*+,;=:\/?#[\]@%]+)(\))|(\[)((?:ht|f)tps?:\/\/[a-z0-9\-._~!$&'()*+,;=:\/?#[\]@%]+)(\])|(\{)((?:ht|f)tps?:\/\/[a-z0-9\-._~!$&'()*+,;=:\/?#[\]@%]+)(\})|(<|&(?:lt|#60|#x3c);)((?:ht|f)tps?:\/\/[a-z0-9\-._~!$&'()*+,;=:\/?#[\]@%]+)(>|&(?:gt|#62|#x3e);)|((?:^|[^=\s'"\]])\s*['"]?|[^=\s]\s+)(\b(?:ht|f)tps?:\/\/[a-z0-9\-._~!$'()*+,;=:\/?#[\]@%]+(?:(?!&(?:gt|#0*62|#x0*3e);|&(?:amp|apos|quot|#0*3[49]|#x0*2[27]);[.!&',:?;]?(?:[^a-z0-9\-._~!$&'()*+,;=:\/?#[\]@%]|$))&[a-z0-9\-._~!$'()*+,;=:\/?#[\]@%]*)*[a-z0-9\-_~$()*+=\/#[\]@%])/img; var url_replace = '$1$4$7$10$13<a href="$2$5$8$11$14">$2$5$8$11$14</a>$3$6$9$12'; return text.replace(url_pattern, url_replace); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function linkify(text) {\r\n var replaceText, replacePattern1, replacePattern2, replacePattern3;\r\n\r\n //URLs starting with http://, https://, or ftp://\r\n replacePattern1 = /(\\b(https?|ftp):\\/\\/[\\-A-Z0-9+&@#\\/%?=~_|!:,.;]*[\\-A-Z0-9+&@#\\/%=~_|])/gim;\r\n replacedText = text.replace(replacePattern1, '<a href=\"$1\">$1</a>');\r\n\r\n //URLs starting with \"www.\" (without // before it, or it'd re-link the ones done above).\r\n replacePattern2 = /(^|[^\\/])(www\\.[\\S]+(\\b|$))/gim;\r\n replacedText = replacedText.replace(replacePattern2, '$1<a href=\"http://$2\">$2</a>');\r\n\r\n //Change email addresses to mailto:: links.\r\n replacePattern3 = /(\\w+@[a-zA-Z_]+?\\.[a-zA-Z]{2,6})/gim;\r\n replacedText = replacedText.replace(replacePattern3, '<a href=\"mailto:$1\">$1</a>');\r\n\r\n return replacedText;\r\n}", "function linkify(inputText)\n{\n var replacedText, replacePattern1, replacePattern2, replacePattern3;\n\n //URLs starting with http://, https://, or ftp://\n replacePattern1 = /(\\b(https?|ftp):\\/\\/[-A-Z0-9+&@#\\/%?=~_|!:,.;]*[-A-Z0-9+&@#\\/%=~_|])/gim;\n replacedText = inputText.replace(replacePattern1, '<a href=\"$1\" target=\"_blank\">$1</a>');\n\n //URLs starting with \"www.\" (without // before it, or it'd re-link the ones done above).\n replacePattern2 = /(^|[^\\/])(www\\.[\\S]+(\\b|$))/gim;\n replacedText = replacedText.replace(replacePattern2, '$1<a href=\"http://$2\" target=\"_blank\">$2</a>');\n\n //Change email addresses to mailto:: links.\n replacePattern3 = /(([a-zA-Z0-9\\-\\_\\.])+@[a-zA-Z\\_]+?(\\.[a-zA-Z]{2,6})+)/gim;\n replacedText = replacedText.replace(replacePattern3, '<a href=\"mailto:$1\">$1</a>');\n\n return replacedText;\n}", "function linkify(text) {\n var urlRegex = /(\\b(https?|ftp|file):\\/\\/[-A-Z0-9+&@#\\/%?=~_|!:,.;]*[-A-Z0-9+&@#\\/%=~_|])/ig;\n return text.replace(urlRegex, function (url) {\n return '<a href=\"' + url + '\">' + url + '</a>';\n });\n}", "function lc_Linkify(){\r\n var urlRegex = /_?((h\\S\\Sp)?(:\\/\\/|rapidshare\\.)[^\\s+\\\"\\<\\>]+)/ig;\r\n var snapTextElements = document.evaluate(\"//text()[\"+\r\n \"not(ancestor::a) and not(ancestor::script) and (\"+\r\n \"contains(translate(., 'RAPIDSHE', 'rapidshe'), 'rapidshare.')\"+\r\n \" or contains(translate(., 'RAPIDSFENT', 'rapidsfent'), 'rapidsafe.net/')\"+\r\n \" or contains(translate(., 'LIXN', 'lixn'), '://lix.in/')\"+\r\n \")]\", document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);\r\n for (var i=0; i < snapTextElements.snapshotLength; i++) {\r\n var elmText = snapTextElements.snapshotItem(i);\r\n if (urlRegex.test(elmText.nodeValue)) {\r\n var sURLText = elmText.nodeValue;\r\n var elmSpan = document.createElement(\"span\");\r\n // add class name\r\n elmSpan.className = \"rs_linkcheck_linked\";\r\n elmText.parentNode.replaceChild(elmSpan, elmText);\r\n urlRegex.lastIndex = 0;\r\n for(var match = null, lastLastIndex = 0; (match = urlRegex.exec(sURLText)); ) {\r\n // skip truncated links\r\n if(match[0].indexOf(\"...\") != -1) continue;\r\n // skip bare domains\r\n if(match[0].indexOf(\"/\") == -1) continue;\r\n elmSpan.appendChild(document.createTextNode(sURLText.substring(lastLastIndex, match.index)));\r\n lastLastIndex = urlRegex.lastIndex;\r\n var elmLink = document.createElement(\"a\");\r\n // make sure there's an http:\r\n elmLink.href = match[1].replace(/^((h\\S\\Sp)?:\\/\\/)?rapidshare\\./, \"http://rapidshare.\");\r\n var nextPart = \"\";\r\n // Check if there was a space\r\n if(/\\brapidshare\\.(com|de)\\/files\\/.*[^\\.]{5}$/i .test(match[0]) &&\r\n /^\\s.*\\.\\w/.test(sURLText.substring(urlRegex.lastIndex))){\r\n nextPart = sURLText.substring(urlRegex.lastIndex);\r\n nextPart = nextPart.match(/^\\s[^\\s+\\\"\\<\\>]*\\.\\w+(\\.html)?/i)[0];\r\n lastLastIndex += nextPart.length;\r\n elmLink.href += nextPart.replace(/\\s/, \"\");\r\n }\r\n // open in new window or tab\r\n elmLink.target = \"_blank\";\r\n // tool-tip to indicate Linkified\r\n elmLink.title = \"[linked]\";\r\n elmLink.appendChild(document.createTextNode(match[0] + nextPart));\r\n elmSpan.appendChild(elmLink);\r\n }\r\n elmSpan.appendChild(document.createTextNode(\r\n sURLText.substring(lastLastIndex)));\r\n elmSpan.normalize();\r\n // stop events on new links, like pop-ups and cookies\r\n elmSpan.addEventListener(\"click\", function(e){ e.stopPropagation(); }, true);\r\n }\r\n }\r\n}", "function linkify(inputText) {\n var replacedText, replacePattern1, replacePattern2, replacePattern3;\n\n //URLs starting with http://, https://, or ftp://\n replacePattern1 = /(\\b(https?|ftp):\\/\\/[-A-Z0-9+&@#\\/%?=~_|!:,.;]*[-A-Z0-9+&@#\\/%=~_|])/gim;\n replacedText = inputText.replace(replacePattern1, '<a href=\"$1\" target=\"_blank\">$1</a>');\n\n //URLs starting with \"www.\" (without // before it, or it'd re-link the ones done above).\n replacePattern2 = /(^|[^\\/])(www\\.[\\S]+(\\b|$))/gim;\n replacedText = replacedText.replace(replacePattern2, '$1<a href=\"http://$2\" target=\"_blank\">$2</a>');\n\n //Change email addresses to mailto:: links.\n replacePattern3 = /(([a-zA-Z0-9\\-\\_\\.])+@[a-zA-Z\\_]+?(\\.[a-zA-Z]{2,6})+)/gim;\n replacedText = replacedText.replace(replacePattern3, '<a href=\"mailto:$1\">$1</a>');\n\n return replacedText;\n}", "function linkify(str) {\r\n \tvar response = '';\r\n\t\tfor (var i=0;i<str.length;i++) {\r\n\t\t\tif (str.substring(i,i+7) == \"http://\" || str.substring(i,i+8) == \"https://\") {\r\n\t\t\t\tvar prefix = str.charAt(i-1);\r\n\t\t\t\tif (prefix === ';' && str.substring(i-4,i) === '&lt;') { prefix = '&lt;' } // special case for < \r\n\t\t\t\tvar ei = findURLendIndex(str, i+7, prefix);\r\n\t\t\t\tif (ei !== -1) {\r\n\t\t\t\t\tvar link = str.substring(i,ei);\r\n\t\t\t\t\tif (link.length > 10 &&\r\n\t\t\t\t\t\tlink.indexOf('\\n')===-1 && \r\n\t\t\t\t\t\tlink.indexOf(' ')===-1) {\r\n\t\t\t\t\t\tresponse+='<a href=\"'+link+'\">'+link+'</a>';\r\n\t\t\t\t\t\ti = ei-1; \r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} \r\n\t\t\tresponse+=str.charAt(i);\r\n\t\t}\r\n\t\treturn response; \r\n\t}", "function c0_ReplUrl(str)\t\t// Replaces urls to links...\r\n{\r\nvar str2=str;\r\nfor(;;)\r\n{\r\n var urls='';\r\n var at=str2.indexOf(\"http://\");\r\n if(at>=0) var urls=\"HTTP://\" + str2.substr(at+7);\r\n else\r\n {\r\n at=str2.indexOf(\"https://\");\r\n if(at>=0) urls=\"HTTPS://\" + str2.substr(at+8);\r\n }\r\n if(urls.length>0)\r\n {\r\n at2=urls.indexOf(\" \");\r\n if(at2>=0) urls=urls.substr(0,at2);\r\n\r\n str2=str2.substr(0,at) + '<a href=\"' +urls + '\" target=\"blank\" >link»</a>' + str2.substr(at +urls.length);\r\n }\r\n else break;\r\n}\r\n\r\nstr2= c0_ReplaceAll( str2, 'HTTP://', 'http://' );\r\nstr2= c0_ReplaceAll( str2, 'HTTPS://', 'https://' );\r\n\r\nreturn(str2);\r\n}", "function urlify(text) {\n var urlRegex = /(https?:\\/\\/[^\\s]+)/g;\n return text.replace(urlRegex, function(url) {\n return '<a target=\"_blank\" href=\"' + url + '\">' + url + '</a>';\n })\n}", "function anchorize(text) {\n\treturn text.replace(/((http|https|ftp|ftps|file|smb):\\/{2}[a-zA-Z\\d:\\/.]+)\\b/gim, '<a href=\"$1\">$1</a>');\n}", "function replace_plain_links(input) {\n return input.replace(/([^\"'>]|p>)(https?:\\/\\/[^\\s\"'<]+)/gim, '$1<a href=\"$2\"></a>');\n}", "function urlify(text, method) {\n var urlRegex = /(http|ftp|https):\\/\\/[\\w-]+(\\.[\\w-]+)+([\\w.,@?^=%&amp;:\\/~+#-]*[\\w@?^=%&amp;\\/~+#-])?/;\n \t return text.replace(urlRegex, function(url) {\n\t\t if (method == \"detect\")\n\t\t\treturn '<a href=\"' + url + '\" target=\"_blank\">' + url + '</a>'; //return url\n\t\telse \n\t\t\treturn ''; //return blank\n });\n} //end urlify", "function checkForLinks(text){\n text = replaceUrlWithImage(text);\n text = replaceUrlWithHtml(text);\n return text;\n}", "function autoEdLinks(str) { //MAIN FUNCTION describes list of fixes\n \n str = str.replace(/\\]\\[/g, \"] [\");\n \n //repair bad external links\n str = str.replace(/\\[?\\[http:\\/\\/([^\\]\\n]*?)\\]\\]?/gi, \"[http://$1]\");\n //str = str.replace(/\\[http:\\/\\/([^\\]]*?)\\|([^\\]]*?)\\]/gi, \"[http://$1 $2]\");\n \n return str;\n}", "function cleanLinks (x, url)\r\n {\r\n if (typeof(x) != \"xml\")\r\n {\r\n x = new XML();\r\n return (x);\r\n }\r\n function fixAttrib (y, attrib)\r\n {\r\n if (y.@[attrib] && !((\"\" + y.@[attrib]).match(/\\:\\/\\//)))\r\n {\r\n if ((\"\" + y.@[attrib]).match(/^\\//))\r\n y.@[attrib] = url + y.@[attrib];\r\n else\r\n y.@[attrib] = url + \"/\" + y.@[attrib];\r\n }\r\n return (y);\r\n }\r\n function fixList (list)\r\n {\r\n for each (y in list)\r\n {\r\n y = fixAttrib(y, \"href\");\r\n y = fixAttrib(y, \"src\");\r\n }\r\n }\r\n var r = new Namespace(\"http://www.w3.org/1999/xhtml\");\r\n fixList(x..r::a)\r\n fixList(x..a)\r\n fixList(x..r::img)\r\n fixList(x..img)\r\n return (x);\r\n }", "function findLink(text) {\n var urlRegex =/(\\b(https?|ftp|file):\\/\\/[-A-Z0-9+&@#\\/%?=~_|!:,.;]*[-A-Z0-9+&@#\\/%=~_|])/ig;\n return text.replace(urlRegex, function(url) {\n return '<a href=\"' + url + '\">' + url + '</a>';\n });\n}", "function convertLinks() {\r\n $('a[href]').each(function() {\r\n var link = $(this);\r\n var href = link.attr('href');\r\n if (isSupported(href)) {\r\n link.attr('href', \"http://quietube.com/v.php/\" + href);\r\n }\r\n }); \r\n }", "function ablinks() {\n // Auto Build links list items from bare a-tag source code 20171128\n var k = 0;\n var libs = document.getElementsByClassName('linkpool');\n for (var i = 0; i < libs.length; i++) {\n var lib = libs[i];\n var links = lib.childNodes;\n for (var j = 0; j < links.length; j++) {\n var a = links[j];\n if (a.innerHTML === '') {\n if (a.className !== '') {\n a.className = a.className + ' ali';\n } else {\n a.className = 'ali';\n }\n if (a.title !== '') {\n a.innerHTML = '&bull;&nbsp;' + a.title;\n } else {\n a.innerHTML = a.href;\n }\n a.target = '_blank';\n k = k + 1;\n }\n }\n }\n return k;\n}", "function _convertUrlsToLinks(str) {\n return str.replace(URL_REG_EXP, function(match, url) {\n var punctuation = (url.match(TRAILING_CHAR_REG_EXP) || [])[1] || \"\",\n opening = BRACKETS[punctuation];\n url = url.replace(TRAILING_CHAR_REG_EXP, \"\");\n\n if (url.split(opening).length > url.split(punctuation).length) {\n url = url + punctuation;\n punctuation = \"\";\n }\n var realUrl = url,\n displayUrl = url;\n if (url.length > MAX_DISPLAY_LENGTH) {\n displayUrl = displayUrl.substr(0, MAX_DISPLAY_LENGTH) + \"...\";\n }\n // Add http prefix if necessary\n if (realUrl.substr(0, 4) === \"www.\") {\n realUrl = \"http://\" + realUrl;\n }\n \n return '<a href=\"' + realUrl + '\">' + displayUrl + '</a>' + punctuation;\n });\n }", "function _convertUrlsToLinks(str) {\n return str.replace(URL_REG_EXP, function(match, url) {\n var punctuation = (url.match(TRAILING_CHAR_REG_EXP) || [])[1] || \"\",\n opening = BRACKETS[punctuation];\n url = url.replace(TRAILING_CHAR_REG_EXP, \"\");\n\n if (url.split(opening).length > url.split(punctuation).length) {\n url = url + punctuation;\n punctuation = \"\";\n }\n var realUrl = url,\n displayUrl = url;\n if (url.length > MAX_DISPLAY_LENGTH) {\n displayUrl = displayUrl.substr(0, MAX_DISPLAY_LENGTH) + \"...\";\n }\n // Add http prefix if necessary\n if (realUrl.substr(0, 4) === \"www.\") {\n realUrl = \"http://\" + realUrl;\n }\n\n return '<a href=\"' + realUrl + '\">' + displayUrl + '</a>' + punctuation;\n });\n }", "function _convertUrlsToLinks(str) {\n return str.replace(URL_REG_EXP, function(match, url) {\n var punctuation = (url.match(TRAILING_CHAR_REG_EXP) || [])[1] || \"\",\n opening = BRACKETS[punctuation];\n url = url.replace(TRAILING_CHAR_REG_EXP, \"\");\n\n if (url.split(opening).length > url.split(punctuation).length) {\n url = url + punctuation;\n punctuation = \"\";\n }\n var realUrl = url,\n displayUrl = url;\n if (url.length > MAX_DISPLAY_LENGTH) {\n displayUrl = displayUrl.substr(0, MAX_DISPLAY_LENGTH) + \"...\";\n }\n // Add http prefix if necessary\n if (realUrl.substr(0, 4) === \"www.\") {\n realUrl = \"http://\" + realUrl;\n }\n\n return '<a href=\"' + realUrl + '\">' + displayUrl + '</a>' + punctuation;\n });\n }", "function _convertUrlsToLinks(str) {\n return str.replace(URL_REG_EXP, function(match, url) {\n var punctuation = (url.match(TRAILING_CHAR_REG_EXP) || [])[1] || \"\",\n opening = BRACKETS[punctuation];\n url = url.replace(TRAILING_CHAR_REG_EXP, \"\");\n\n if (url.split(opening).length > url.split(punctuation).length) {\n url = url + punctuation;\n punctuation = \"\";\n }\n var realUrl = url,\n displayUrl = url;\n if (url.length > MAX_DISPLAY_LENGTH) {\n displayUrl = displayUrl.substr(0, MAX_DISPLAY_LENGTH) + \"...\";\n }\n // Add http prefix if necessary\n if (realUrl.substr(0, 4) === \"www.\") {\n realUrl = \"http://\" + realUrl;\n }\n\n return '<a href=\"' + realUrl + '\">' + displayUrl + '</a>' + punctuation;\n });\n }", "function _convertUrlsToLinks(str) {\n return str.replace(URL_REG_EXP, function (match, url) {\n var punctuation = (url.match(TRAILING_CHAR_REG_EXP) || [])[1] || \"\",\n opening = BRACKETS[punctuation];\n url = url.replace(TRAILING_CHAR_REG_EXP, \"\");\n\n if (url.split(opening).length > url.split(punctuation).length) {\n url = url + punctuation;\n punctuation = \"\";\n }\n var realUrl = url,\n displayUrl = url;\n if (url.length > MAX_DISPLAY_LENGTH) {\n displayUrl = displayUrl.substr(0, MAX_DISPLAY_LENGTH) + \"...\";\n }\n // Add http prefix if necessary\n if (realUrl.substr(0, 4) === \"www.\") {\n realUrl = \"http://\" + realUrl;\n }\n\n return '<a href=\"' + realUrl + '\">' + displayUrl + '</a>' + punctuation;\n });\n }", "autolink() {\n const linkRegex = new RegExp(`(https?://\\\\S+\\\\.\\\\S+)\\\\s`, 'ig');\n const editor = this.getEditor();\n const content = editor.getDocument().toString();\n let match;\n while ((match = linkRegex.exec(content))) {\n const url = match[1];\n if (isURL(url)) {\n const position = match.index;\n const range = [position, position + url.length];\n const hrefAtRange = editor.getDocument().getCommonAttributesAtRange(range).href;\n if (hrefAtRange !== url) {\n this.updateInRange(editor, range, 0, () => {\n if (editor.canActivateAttribute('href')) {\n editor.activateAttribute('href', url);\n }\n });\n }\n }\n }\n }", "function linkifyJquery($) {\n\t\t\tvar doc = arguments.length <= 1 || arguments[1] === undefined ? null : arguments[1];\n\n\n\t\t\t$.fn = $.fn || {};\n\n\t\t\ttry {\n\t\t\t\tdoc = doc || window && window.document || global && global.document;\n\t\t\t} catch (e) {/* do nothing for now */}\n\n\t\t\tif (!doc) {\n\t\t\t\tthrow new Error('Cannot find document implementation. ' + 'If you are in a non-browser environment like Node.js, ' + 'pass the document implementation as the second argument to linkify/jquery');\n\t\t\t}\n\n\t\t\tif (typeof $.fn.linkify === 'function') {\n\t\t\t\t// Already applied\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfunction jqLinkify(opts) {\n\t\t\t\topts = linkifyElement.normalize(opts);\n\t\t\t\treturn this.each(function () {\n\t\t\t\t\tlinkifyElement.helper(this, opts, doc);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t$.fn.linkify = jqLinkify;\n\n\t\t\t$(doc).ready(function () {\n\t\t\t\t$('[data-linkify]').each(function () {\n\n\t\t\t\t\tvar $this = $(this),\n\t\t\t\t\t data = $this.data(),\n\t\t\t\t\t target = data.linkify,\n\t\t\t\t\t nl2br = data.linkifyNlbr,\n\t\t\t\t\t options = {\n\t\t\t\t\t\tlinkAttributes: data.linkifyAttributes,\n\t\t\t\t\t\tdefaultProtocol: data.linkifyDefaultProtocol,\n\t\t\t\t\t\tevents: data.linkifyEvents,\n\t\t\t\t\t\tformat: data.linkifyFormat,\n\t\t\t\t\t\tformatHref: data.linkifyFormatHref,\n\t\t\t\t\t\tnewLine: data.linkifyNewline, // deprecated\n\t\t\t\t\t\tnl2br: !!nl2br && nl2br !== 0 && nl2br !== 'false',\n\t\t\t\t\t\ttagName: data.linkifyTagname,\n\t\t\t\t\t\ttarget: data.linkifyTarget,\n\t\t\t\t\t\tlinkClass: data.linkifyLinkclass,\n\t\t\t\t\t\tvalidate: data.linkifyValidate,\n\t\t\t\t\t\tignoreTags: data.linkifyIgnoreTags\n\t\t\t\t\t};\n\t\t\t\t\tvar $target = target === 'this' ? $this : $this.find(target);\n\t\t\t\t\t$target.linkify(options);\n\t\t\t\t});\n\t\t\t});\n\t\t}", "function link(node) {\n var self = this\n var content = self.encode(node.url || '', node)\n var exit = self.enterLink()\n var escaped = self.encode(self.escape(node.url || '', node))\n var value = self.all(node).join('')\n\n exit()\n\n if (node.title == null && protocol.test(content) && escaped === value) {\n // Backslash escapes do not work in autolinks, so we do not escape.\n return uri(self.encode(node.url), true)\n }\n\n content = uri(content)\n\n if (node.title) {\n content += space + title(self.encode(self.escape(node.title, node), node))\n }\n\n return (\n leftSquareBracket +\n value +\n rightSquareBracket +\n leftParenthesis +\n content +\n rightParenthesis\n )\n}", "function decurl(link, reallinkreg, reallinkcorrection)\r\n\t{\r\n\r\n\t\tGM_xmlhttpRequest(\r\n\t\t{\r\n\t\t\tmethod: 'GET',\r\n\t\t\turl: link.href,\r\n\t\t\theaders: {\r\n\t\t\t\t'User-agent': 'Mozilla/4.0 [en] (Windows NT 6.0; U)',\r\n\t\t\t\t'Accept': 'text/xml',\r\n\t\t\t\t'Referer': \"\"\r\n\t\t\t},\r\n\t\t\tonload: function (result)\r\n\t\t\t{\r\n\t\t\t\t// cLinksProcessed++;\r\n\r\n\t\t\t\tvar reallink = result.responseText.match(reallinkreg)[0];\r\n\t\t\t\treallink = reallink.replace(new RegExp(reallinkcorrection, \"g\"), \"\");\r\n\r\n\t\t\t\tlink.href = reallink;\r\n\r\n\t\t\t\tvar i = http_file_hosts.length - 1;\r\n\t\t\t\tdo\r\n\t\t\t\t{\r\n\t\t\t\t\tif ((reallink.match(http_file_hosts[i][0])))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlink.href = link.href.replace(/http:\\/\\/.*?\\?http:\\/\\//, 'http://');\r\n\t\t\t\t\t\tvar isAliveRegex = http_file_hosts[i][1];\r\n\t\t\t\t\t\tvar isDeadRegex = http_file_hosts[i][2];\r\n\t\t\t\t\t\tvar isUnavaRegex = http_file_hosts[i][3];\r\n\r\n\t\t\t\t\t\tgeturl(link, isAliveRegex, isDeadRegex, isUnavaRegex, 50);\r\n\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\twhile (i--);\r\n\t\t\t\t}\r\n\t\t});\r\n\t}", "function e(t){return t.replace(s,function(s,e){var d=(e.match(l)||[])[1]||\"\",m=i[d];e=e.replace(l,\"\"),e.split(m).length>e.split(d).length&&(e+=d,d=\"\");var o=e,p=e;return 100<e.length&&(p=p.substr(0,100)+\"...\"),\"www.\"===o.substr(0,4)&&(o=\"http://\"+o),\"<a href=\\\"\"+o+\"\\\">\"+p+\"</a>\"+d})}", "can_be_linkify(dest) {\n let match = dest.match(/^(https?:|\\/\\/)/i);\n\n if (!match) return false;\n\n let proto = match[0];\n let len = linkify.testSchemaAt(dest, proto, proto.length);\n\n return len && (len === dest.length - proto.length);\n }", "function urlDetect(text) {\n return text.replace(pattern, function(url) {\n return '<a href=\"' + url + '\" class=\"autolink\">' + url + '</a>';\n });\n }", "function mustachifyUrl(href) {\n var url = \"http://mustachify.me/4?src=\" + escape(toAbsoluteURL(href));\n return url;\n}", "function cleanUpLink(link) {\n return link.replace('http:', 'https:');\n}", "function setup() {\r\n link_find_and_replace = function(find, replace) {\r\n $.each($(\"a\"), function(index, item) {\r\n url = item.href;\r\n if (typeof url == \"string\" && url.indexOf(find) != -1){\r\n href = String(url.replace(find, replace));\r\n item.href = href;\r\n }\r\n });\r\n }\r\n \r\n link_find_and_replace(\"thepiratebay.se\", \"pirateproxy.net\");\r\n}", "function link() {\n var LINKY_URL_REGEXP =\n /((ftp|https?):\\/\\/|(www\\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\\S*[^\\s.;,(){}<>\"”’]$/;\n var sub = selection.anchorNode.data.substring(0, selection.anchorOffset - 1);\n if (LINKY_URL_REGEXP.test(sub)) {\n var matchs = sub.match(LINKY_URL_REGEXP);\n if (matchs && matchs.length) {\n var st = selection.anchorOffset - matchs[0].length - 1;\n range.setStart(selection.anchorNode, st);\n scope.doCommand(null, {\n name: 'createLink',\n param: matchs[0]\n });\n }\n }\n }", "function makeLink() {\n // var a=\"http://www.geocodezip.com/v3_MW_example_linktothis.html\"\n var url = window.location.pathname;\n var a = url.substring(url.lastIndexOf(\n '/') + 1) + \"?lat=\" +\n map.getCenter()\n .lat()\n .toFixed(6) + \"&lng=\" +\n map.getCenter()\n .lng()\n .toFixed(6) +\n \"&zoom=\" + map.getZoom() +\n \"&type=\" +\n MapTypeId2UrlValue(map.getMapTypeId());\n if (filename !=\n \"TrashDays40.xml\") a +=\n \"&filename=\" + filename;\n document.getElementById(\n \"link\")\n .innerHTML =\n '<a href=\"' + a +\n '\">Link to this page<\\/a>';\n }", "function link(node) {\n var self = this;\n var content = self.encode(node.url || '', node);\n var exit = self.enterLink();\n var escaped = self.encode(self.escape(node.url || '', node));\n var value = self.all(node).join('');\n\n exit();\n\n if (\n node.title == null &&\n PROTOCOL.test(content) &&\n (escaped === value || escaped === 'mailto:' + value)\n ) {\n /* Backslash escapes do not work in autolinks,\n * so we do not escape. */\n return uri(self.encode(node.url), true);\n }\n\n content = uri(content);\n\n if (node.title) {\n content += ' ' + title(self.encode(self.escape(node.title, node), node));\n }\n\n return '[' + value + '](' + content + ')';\n}", "function updateLinkHref() {\n\tvar codeHeader = \"(function() {\";\n\tvar codeFooter = \"})(); void 0;\";\n\tvar codeBody = editor.getSession().getValue();\n\n\t// minify\n\tvar full_code = codeHeader + codeBody + codeFooter;\n\tfull_code = full_code.replace(/\\n/g, '').replace(/ /g, '');\n\n\tlink.href = 'javascript: ' + full_code;\n\n\tvar baseUrl = '';\n\tstatic_link.href = baseUrl + '#' + utf8_to_b64(codeBody);\n\n}", "function makeHyperlink(url){\n return '<a target=\"_blank\" href=\"'+ url+ '\">' + url + '</a>'\n}", "function resolve_links(line){\n // categories, images, files\n var re= /\\[\\[:?(category|catégorie|Kategorie|Categoría|Categoria|Categorie|Kategoria|تصنيف):[^\\]\\]]{2,80}\\]\\]/gi\n line=line.replace(re, \"\")\n\n // [[Common links]]\n line=line.replace(/\\[\\[:?([^|]{2,80}?)\\]\\](\\w{0,5})/g, \"$1$2\")\n // [[Replaced|Links]]\n line=line.replace(/\\[\\[:?(.{2,80}?)\\|([^\\]]+?)\\]\\](\\w{0,5})/g, \"$2$3\")\n // External links\n line=line.replace(/\\[(https?|news|ftp|mailto|gopher|irc):\\/\\/[^\\]\\| ]{4,1500}([\\| ].*?)?\\]/g, \"$2\")\n return line\n }", "function createLinkifier() {\n var links = [];\n var autolinker = new Autolinker({\n stripPrefix: false,\n url: true,\n email: true,\n twitter: false,\n replaceFn: function (linker, match) {\n // Only collect matched strings but don't change anything.\n switch (match.getType()) {\n /*eslint default-case:0*/\n case 'url':\n links.push({\n text: match.matchedText,\n url: match.getUrl()\n });\n break;\n case 'email':\n links.push({\n text: match.matchedText,\n // normalize email protocol\n url: 'mailto:' + match.getEmail().replace(/^mailto:/i, '')\n });\n break;\n }\n return false;\n }\n });\n\n return {\n links: links,\n autolinker: autolinker\n };\n}", "function createLinkifier() {\n\t var links = [];\n\t var autolinker = new Autolinker({\n\t stripPrefix: false,\n\t url: true,\n\t email: true,\n\t twitter: false,\n\t replaceFn: function (linker, match) {\n\t // Only collect matched strings but don't change anything.\n\t switch (match.getType()) {\n\t /*eslint default-case:0*/\n\t case 'url':\n\t links.push({\n\t text: match.matchedText,\n\t url: match.getUrl()\n\t });\n\t break;\n\t case 'email':\n\t links.push({\n\t text: match.matchedText,\n\t // normalize email protocol\n\t url: 'mailto:' + match.getEmail().replace(/^mailto:/i, '')\n\t });\n\t break;\n\t }\n\t return false;\n\t }\n\t });\n\n\t return {\n\t links: links,\n\t autolinker: autolinker\n\t };\n\t}", "function createLinkifier() {\n\t var links = [];\n\t var autolinker = new Autolinker({\n\t stripPrefix: false,\n\t url: true,\n\t email: true,\n\t twitter: false,\n\t replaceFn: function (linker, match) {\n\t // Only collect matched strings but don't change anything.\n\t switch (match.getType()) {\n\t /*eslint default-case:0*/\n\t case 'url':\n\t links.push({\n\t text: match.matchedText,\n\t url: match.getUrl()\n\t });\n\t break;\n\t case 'email':\n\t links.push({\n\t text: match.matchedText,\n\t // normalize email protocol\n\t url: 'mailto:' + match.getEmail().replace(/^mailto:/i, '')\n\t });\n\t break;\n\t }\n\t return false;\n\t }\n\t });\n\n\t return {\n\t links: links,\n\t autolinker: autolinker\n\t };\n\t}", "function _decorate_urls(text) {\n var pattern = XRegExp('[a-zA-z]+://[^\\\\s]*', 'g');\n return _decorate_process(text, pattern, function(m) {\n return '<span onclick=\"window.open(\\''+m+'\\', \\'_blank\\');\" class=\"content-link\">' + m + '</span>';\n });\n\n\n }", "function linkifyHtml(str) {\n var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var tokens = HTML5Tokenizer.tokenize(str);\n var linkifiedTokens = [];\n var linkified = [];\n var i;\n\n opts = new Options(opts);\n\n // Linkify the tokens given by the parser\n for (i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (token.type === StartTag) {\n linkifiedTokens.push(token);\n\n // Ignore all the contents of ignored tags\n var tagName = token.tagName.toUpperCase();\n var isIgnored = tagName === 'A' || options.contains(opts.ignoreTags, tagName);\n if (!isIgnored) {\n continue;\n }\n\n var preskipLen = linkifiedTokens.length;\n skipTagTokens(tagName, tokens, ++i, linkifiedTokens);\n i += linkifiedTokens.length - preskipLen - 1;\n continue;\n } else if (token.type !== Chars) {\n // Skip this token, it's not important\n linkifiedTokens.push(token);\n continue;\n }\n\n // Valid text token, linkify it!\n var linkifedChars = linkifyChars(token.chars, opts);\n linkifiedTokens.push.apply(linkifiedTokens, linkifedChars);\n }\n\n // Convert the tokens back into a string\n for (i = 0; i < linkifiedTokens.length; i++) {\n var _token = linkifiedTokens[i];\n switch (_token.type) {\n case StartTag:\n {\n var link = '<' + _token.tagName;\n if (_token.attributes.length > 0) {\n var attrs = attrsToStrings(_token.attributes);\n link += ' ' + attrs.join(' ');\n }\n link += '>';\n linkified.push(link);\n break;\n }\n case EndTag:\n linkified.push(\"</\" + _token.tagName + \">\");\n break;\n case Chars:\n linkified.push(escapeText(_token.chars));\n break;\n case Comment:\n linkified.push(\"<!--\" + escapeText(_token.chars) + \"-->\");\n break;\n }\n }\n\n return linkified.join('');\n }", "function createLinkifier() {\n var links = [];\n var autolinker = new Autolinker({\n stripPrefix: false,\n url: true,\n email: true,\n twitter: false,\n replaceFn: function (linker, match) {\n // Only collect matched strings but don't change anything.\n switch (match.getType()) {\n /*eslint default-case:0*/\n case 'url':\n links.push({\n text: match.matchedText,\n url: match.getUrl()\n });\n break;\n case 'email':\n links.push({\n text: match.matchedText,\n // normalize email protocol\n url: 'mailto:' + match.getEmail().replace(/^mailto:/i, '')\n });\n break;\n }\n return false;\n }\n });\n\n return {\n links: links,\n autolinker: autolinker\n };\n }", "function convertToValidLink(link){\n let httpRegex = /^https*:\\/\\/.+/g;\n \n return !httpRegex.test(link) ? \n `http://${link}` :\n link;\n \n}", "function fetch_links(str){\n var links=[]\n var tmp=str.match(/\\[\\[(.{2,80}?)\\]\\](\\w{0,10})/g)//regular links\n if(tmp){\n tmp.forEach(function(s){\n var link, txt;\n if(s.match(/\\|/)){ //replacement link [[link|text]]\n s=s.replace(/\\[\\[(.{2,80}?)\\]\\](\\w{0,10})/g,\"$1$2\") //remove ['s and keep suffix\n link=s.replace(/(.{2,60})\\|.{0,200}/,\"$1\")//replaced links\n txt=s.replace(/.{2,60}?\\|/,'')\n //handle funky case of [[toronto|]]\n if(!txt && link.match(/\\|$/)){\n link=link.replace(/\\|$/,'')\n txt=link\n }\n }else{ // standard link [[link]]\n link=s.replace(/\\[\\[(.{2,60}?)\\]\\](\\w{0,10})/g,\"$1\") //remove ['s\n }\n //kill off non-wikipedia namespaces\n if(link.match(/^:?(category|catégorie|Kategorie|Categoría|Categoria|Categorie|Kategoria|تصنيف|image|file|image|fichier|datei|media|special|wp|wikipedia|help|user|mediawiki|portal|talk|template|book|draft|module|topic|wiktionary|wikisource):/i)){\n return\n }\n //kill off just anchor links [[#history]]\n if(link.match(/^#/i)){\n return\n }\n //remove anchors from end [[toronto#history]]\n link=link.replace(/#[^ ]{1,100}/,'')\n link=helpers.capitalise(link)\n var obj={\n page:link,\n src: txt\n }\n links.push(obj)\n })\n }\n links=links.filter(helpers.onlyUnique)\n if(links.length==0){\n return undefined\n }\n return links\n }", "function urlLink (url) {\n const escaped = escapeHTML(url)\n const shortened = escapeHTML(url.replace(/^https?:\\/\\//, ''))\n const parsed = parseURL(url)\n const logo = hostLogos.find(host => parsed.hostname === host.hostname)\n return html`\n<a href=\"${escaped}\" target=_blank>${\n logo && `<img class=logo alt=logo src=/${logo.icon}.svg>`\n}${shortened}</a>\n `\n}", "function createLinks(txt){\n let xp =/((?:https?|ftp):\\/\\/[\\-A-Z0-9+\\u0026\\u2019@#\\/%?=()~_|!:,.;]*[\\-A-Z0-9+\\u0026@#\\/%=~(_|])/gi\n \n if (_.isString(txt)){\n return txt.replace(xp, \"<br><a target='_blank' href='$1'>$1</a>\") \n }\n}", "function replaceLinks(contents, fn) {\n\n\tvar links = contents.querySelectorAll(\"a[href]\");\n\tvar base = (0, _core.qs)(contents.ownerDocument, \"base\");\n\tvar location = base ? base.href : undefined;\n\tvar replaceLink = function (link) {\n\t\tvar href = link.getAttribute(\"href\");\n\n\t\tif (href.indexOf(\"mailto:\") === 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar absolute = href.indexOf(\"://\") > -1;\n\t\tvar linkUrl = new _url2.default(href, location);\n\n\t\tif (absolute) {\n\n\t\t\tlink.setAttribute(\"target\", \"_blank\");\n\t\t} else {\n\t\t\tlink.onclick = function () {\n\n\t\t\t\tif (linkUrl && linkUrl.hash) {\n\t\t\t\t\tfn(linkUrl.Path.path + linkUrl.hash);\n\t\t\t\t} else if (linkUrl) {\n\t\t\t\t\tfn(linkUrl.Path.path);\n\t\t\t\t} else {\n\t\t\t\t\tfn(href);\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t};\n\t\t}\n\t}.bind(this);\n\n\tfor (var i = 0; i < links.length; i++) {\n\t\treplaceLink(links[i]);\n\t}\n}", "function createLinkifier() {\n var links = [];\n var autolinker = new Autolinker({\n stripPrefix: false,\n url: true,\n email: true,\n replaceFn: function (match) {\n // Only collect matched strings but don't change anything.\n switch (match.getType()) {\n /*eslint default-case:0*/\n case 'url':\n links.push({\n text: match.matchedText,\n url: match.getUrl()\n });\n break;\n case 'email':\n links.push({\n text: match.matchedText,\n // normalize email protocol\n url: 'mailto:' + match.getEmail().replace(/^mailto:/i, '')\n });\n break;\n }\n return false;\n }\n });\n\n return {\n links: links,\n autolinker: autolinker\n };\n}", "escapeLinks(description) {\n\n\t\t// <a href=\";\n\t\tvar aStartPos = description.search(\"<a\"); // Next\n\t\tvar descriptionArr = [];\n\t\tvar key = 0;\n\n\t\t// Contains links\n\t\tif (aStartPos !== -1) {\n\n\t\t\twhile (aStartPos !== -1) {\n\n\t\t\t\t// Add text segment if any\n\t\t\t\tvar textSeg = description.substring(0, aStartPos);\n\t\t\t\tif(aStartPos !== 0) descriptionArr.push(textSeg);\n\n\t\t\t\t// Establishing Positions\n\t\t\t\tvar targetPos = description.search(\"target\");\n\t\t\t\tvar aEndPos = description.search(\"</a>\");\n\n\t\t\t\t// Adding the a tag\n\t\t\t\t// e.g. <a href=\"https://www.straitstimes.com/singapore/health/ip-insurers-losses-raise-possibility-of-premium-hikes\" target=\"_blank\">IP insurers' losses raise </a>\n\t\t\t\tvar link, text;\n\n\t\t\t\tif (targetPos !== -1 && targetPos < aEndPos) { // Contains target\n\n\t\t\t\t\tlink = description.substring(aStartPos + 9, targetPos - 2);\n\t\t\t\t\ttext = description.substring(targetPos + 16, aEndPos);\n\n\t\t\t\t} else { // Doesn;t contain target\n\n\t\t\t\t\tvar aStartBracketPos = description.search(\">\");\n\n\t\t\t\t\tlink = description.substring(aStartPos + 9, aStartBracketPos - 1);\n\t\t\t\t\ttext = description.substring(aStartBracketPos + 1, aEndPos);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdescriptionArr.push(<a href={link} target=\"_blank\" key={key} rel=\"noopener noreferrer\">{text}</a>);\n\n\t\t\t\t// Trim a tag\n\t\t\t\tdescription = description.substring(aEndPos + 4);\n\n\t\t\t\t// Update counters\n\t\t\t\taStartPos = description.search(\"<a\");\n\t\t\t\tkey++;\n\t\t\t}\n\n\t\t\t// Add text segment if any\n\t\t\tif(description !== \"\") descriptionArr.push(description);\n\t\t\treturn descriptionArr;\n\n\t\t// No links\n\t\t} else {\n\n\t\t\tdescriptionArr.push(description);\n\t\t\treturn descriptionArr;\n\t\t}\n\n\t}", "function linkURL(formula){\n return formula.match(/=hyperlink\\(\"([^\"]+)\"/i)[1]\n}", "function AttachLinkEvents() {\n var aElements = document.getElementsByTagName(\"a\");\n for (i = 0; i < aElements.length; i++) {\n if (aElements[i].rel == \"contents\") {\n aElements[i].onclick = function() {\n var todomain = getDomain(this.href);\n var thisdomain = getDomain(window.location);\n if(todomain == thisdomain) {\n ShowPage(this);\n return false;\n } else {\n window.open(this.href); return false;\n }\n }\n }\n } \n}", "function qualifyURL(url) {\n var a = document.createElement('a');\n a.href = url;\n return a.href;\n}", "function linkReference(h, node) {\n var def = h.definition(node.identifier);\n var props = {href: normalize((def && def.url) || '')};\n\n if (def && def.title !== null && def.title !== undefined) {\n props.title = def.title;\n }\n\n return failsafe(h, node, def) || h(node, 'a', props, all(h, node));\n}", "function drawLink() {\n var stat = getState(cm);\n var url = \"http://\";\n _replaceSelection(cm, stat.link, insertTexts.link, url);\n}", "function apply($) {\n\t\t\tvar doc = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n\n\t\t\t$.fn = $.fn || {};\n\n\t\t\ttry {\n\t\t\t\tdoc = doc || document || window && window.document || global && global.document;\n\t\t\t} catch (e) {/* do nothing for now */}\n\n\t\t\tif (!doc) {\n\t\t\t\tthrow new Error('Cannot find document implementation. ' + 'If you are in a non-browser environment like Node.js, ' + 'pass the document implementation as the second argument to linkify/jquery');\n\t\t\t}\n\n\t\t\tif (typeof $.fn.linkify === 'function') {\n\t\t\t\t// Already applied\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfunction jqLinkify(opts) {\n\t\t\t\topts = linkifyElement.normalize(opts);\n\t\t\t\treturn this.each(function () {\n\t\t\t\t\tlinkifyElement.helper(this, opts, doc);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t$.fn.linkify = jqLinkify;\n\n\t\t\t$(doc).ready(function () {\n\t\t\t\t$('[data-linkify]').each(function () {\n\t\t\t\t\tvar $this = $(this);\n\t\t\t\t\tvar data = $this.data();\n\t\t\t\t\tvar target = data.linkify;\n\t\t\t\t\tvar nl2br = data.linkifyNlbr;\n\n\t\t\t\t\tvar options = {\n\t\t\t\t\t\tnl2br: !!nl2br && nl2br !== 0 && nl2br !== 'false'\n\t\t\t\t\t};\n\n\t\t\t\t\tif ('linkifyAttributes' in data) {\n\t\t\t\t\t\toptions.attributes = data.linkifyAttributes;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ('linkifyDefaultProtocol' in data) {\n\t\t\t\t\t\toptions.defaultProtocol = data.linkifyDefaultProtocol;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ('linkifyEvents' in data) {\n\t\t\t\t\t\toptions.events = data.linkifyEvents;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ('linkifyFormat' in data) {\n\t\t\t\t\t\toptions.format = data.linkifyFormat;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ('linkifyFormatHref' in data) {\n\t\t\t\t\t\toptions.formatHref = data.linkifyFormatHref;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ('linkifyTagname' in data) {\n\t\t\t\t\t\toptions.tagName = data.linkifyTagname;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ('linkifyTarget' in data) {\n\t\t\t\t\t\toptions.target = data.linkifyTarget;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ('linkifyValidate' in data) {\n\t\t\t\t\t\toptions.validate = data.linkifyValidate;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ('linkifyIgnoreTags' in data) {\n\t\t\t\t\t\toptions.ignoreTags = data.linkifyIgnoreTags;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ('linkifyClassName' in data) {\n\t\t\t\t\t\toptions.className = data.linkifyClassName;\n\t\t\t\t\t} else if ('linkifyLinkclass' in data) {\n\t\t\t\t\t\t// linkClass is deprecated\n\t\t\t\t\t\toptions.className = data.linkifyLinkclass;\n\t\t\t\t\t}\n\n\t\t\t\t\toptions = linkifyElement.normalize(options);\n\n\t\t\t\t\tvar $target = target === 'this' ? $this : $this.find(target);\n\t\t\t\t\t$target.linkify(options);\n\t\t\t\t});\n\t\t\t});\n\t\t}", "function addLink (target, link) {\n\torgHtml = document.getElementById(target).innerHTML;\n\tnewHtml = link + orgHtml + \"</a>\";\n\tdocument.getElementById(target).innerHTML = newHtml;\n}", "function makeOrChangeLink()\n{\n var dom = dw.getDocumentDOM(); \n\n if (typeof dom[\"setLinkHref\"] != 'undefined') //CONTRIBUTE ALERT\n dom.setLinkHref();\n}", "function createLink(url,text){\r\n\treturn \"<a href=\\\"\"+url+\"\\\"\"+Target+\">\"+text+\"</a>\";\r\n}", "function markupHyperLinks(str){\n\t\t\t\tvar reg = new RegExp(/[-a-zA-Z0-9@:%_\\+.~#?&//=]{2,256}\\.[a-z]{2,4}\\b(\\/[-a-zA-Z0-9@:%_\\+.~#?&//=]*)?/gi);\n\t\t\t\tvar match = str.match(reg);\n\t\t\t\tvar res = \"\";\n\t\t\t\tif(match != null)\n\t\t\t\t\tmatch.forEach(\n\t\t\t\t\t\tfunction(e){\n\t\t\t\t\t\t\tvar tmp = str.split(e)[0];\n\t\t\t\t\t\t\tif(tmp != \"\")\n\t\t\t\t\t\t\t\tres += \"<pre>\" + tmp + \"</pre>\";\n\t\t\t\t\t\t\tvar m = e.match(new RegExp(/.*jpg|.*bmp|.*gif|.*png|.*jpeg/));\n\t\t\t\t\t\t\tif(m != null && m.indexOf(e) != -1)\n\t\t\t\t\t\t\t\tres += \"<img style='width:100px; height:auto' src='\" + e + \"'></img>\";\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tres += \"<a href='\" + e + \"'>\" + e + \"</a>\";\n\t\t\t\t\t\t\tvar i = str.indexOf(tmp + e) + (tmp + e).length;\n\t\t\t\t\t\t\tstr = str.substring(i,str.length);\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\tif(str != \"\")\n\t\t\t\t\tres += \"<pre>\" + str + \"</pre>\"\n\t\t\t\tconsole.log(res);\n\t\t\t\treturn res;\n\t\t\t}", "function externalLinks() { \n if (!document.getElementsByTagName) return; \n var anchors = document.getElementsByTagName(\"a\"); \n for (var n=0; n<anchors.length; n++) { \n var anchor = anchors[n]; \n if (anchor.getAttribute(\"href\") && \n anchor.getAttribute(\"rel\") == \"external\") \n anchor.target = \"_blank\"; \n } \n}", "function createLinkifier() {\n var links = [];\n var autolinker = new autolinker__WEBPACK_IMPORTED_MODULE_0__[\"default\"]({\n stripPrefix: false,\n url: true,\n email: true,\n replaceFn: function (match) {\n // Only collect matched strings but don't change anything.\n switch (match.getType()) {\n /*eslint default-case:0*/\n case 'url':\n links.push({\n text: match.matchedText,\n url: match.getUrl()\n });\n break;\n case 'email':\n links.push({\n text: match.matchedText,\n // normalize email protocol\n url: 'mailto:' + match.getEmail().replace(/^mailto:/i, '')\n });\n break;\n }\n return false;\n }\n });\n\n return {\n links: links,\n autolinker: autolinker\n };\n}", "function reLink() {\r\n const linkList = document.querySelectorAll('a');\r\n\r\n linkList.forEach((link) => {\r\n const linkAttribute = link.getAttribute('href');\r\n\r\n if (linkAttribute.startsWith('/p/')) {\r\n const linkFormatted = 'https://instagram.com' + linkAttribute + 'media/?size=l'\r\n\r\n link.setAttribute('href', linkFormatted);\r\n\r\n // Log to the console the thumbnail and respective link for hover/click.\r\n\t\t\tconsole.log('-=-=-=-=-=-=-');\r\n \tconsole.log('Image: ', link.firstElementChild);\r\n \tconsole.log('Direct Link: ', linkFormatted);\r\n };\r\n });\r\n}", "function fixLinks(){\r\n\tvar allLinks, thisLink;\r\n\tallLinks = document.evaluate(\r\n\t '//a[@target]',\r\n\t document,\r\n\t null,\r\n\t XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,\r\n\t null);\r\n\tfor (var i = 0; i < allLinks.snapshotLength; i++) {\r\n\t thisLink = allLinks.snapshotItem(i);\r\n\t thisLink.target = \"_self\";\r\n\t}\r\n}", "function fixLinks() {\n\tvar allLinks = document.getElementsByTagName(\"a\") || document.links;\n\tfor (var i = 0, len = allLinks.length; i < len; i++) {\n\t\tvar link = allLinks[i];\n\t\tif (!jsExceptionsRe.test(link)) { // =~ /[;?]js=[01]$/;\n\t\t\tlink.href +=\n\t\t\t\t(link.href.indexOf('?') === -1 ? '?' : ';') + 'js=1';\n\t\t}\n\t}\n}", "function vivocha_getLinkTarget(l) {\r\n var target = '_blank';\r\n var internalPageRegex = new RegExp(\"^http[s]?://\" + (vivocha.domain ? (\"[a-zA-Z0-9\\-_.]*\" + vivocha.domain) : window.location.hostname) + \"(/.*)?$\");\r\n if (l.match(internalPageRegex)) {\r\n target = '_self';\r\n }\r\n return target;\r\n}", "function LinkHandler(that, lineBuf) {\n // Merge text so we can scan it.\n if (!lineBuf.length) {\n return;\n }\n\n var line = '';\n for (var ii = 0, ilen = lineBuf.length; ii < ilen; ++ii) {\n line += lineBuf[ii].nodeValue;\n }\n\n // Scan the merged text for links.\n var links = LinkHandler.scan(line);\n if (!links.length) {\n return;\n }\n\n // Find the start and end text nodes.\n var nodeIdx = 0, nodeStart = 0, nodeEnd = lineBuf[0].nodeValue.length;\n for (var ii = 0, ilen = links.length; ii < ilen; ++ii) {\n var info = links[ii], startOff, startNode, endOff, endNode;\n\n while (nodeEnd <= info.start) {\n nodeStart = nodeEnd;\n nodeEnd += lineBuf[++nodeIdx].nodeValue.length;\n }\n\n startOff = info.start - nodeStart;\n startNode = lineBuf[nodeIdx];\n\n while (nodeEnd < info.end) {\n nodeStart = nodeEnd;\n nodeEnd += lineBuf[++nodeIdx].nodeValue.length;\n }\n\n endOff = info.end - nodeStart;\n endNode = lineBuf[nodeIdx];\n\n // Wrap the link text.\n // TODO: In this version, we won't try to cross text nodes.\n // TODO: Discard any text nodes that are already part of links?\n if (startNode !== endNode) {\n window.console && window.console.warn('link', info);\n continue;\n }\n\n lineBuf[nodeIdx] = endNode.splitText(endOff);\n nodeStart += endOff;\n\n var middleNode = startNode.splitText(startOff);\n var anchor = document.createElement('a');\n middleNode.parentNode.replaceChild(anchor, middleNode);\n\n anchor.target = '_blank';\n if (info.url === '' && info.xch_cmd !== '') {\n anchor.setAttribute('onClick', 'this.onCommand(\"'+info.xch_cmd+'\");');\n anchor.onCommand = that.onCommand;\n } else {\n anchor.href = info.url;\n }\n anchor.appendChild(middleNode);\n }\n }", "function delinkifyLink(link)\r\n\t{\r\n\t\tvar spanElm = document.createElement(\"span\");\r\n\t\tspanElm.className = link.className;\r\n\t\tspanElm.innerHTML = link.innerHTML;\r\n\r\n\t\tif (Display_tooltip_info)\r\n\t\t{\r\n\t\t\tspanElm.href = link.href;\r\n\t\t\tspanElm.warlc_error = link.warlc_error;\r\n\t\t\t\r\n\t\t\tswitch (link.className){\r\n\t\t\tcase \"alive_link\": spanElm.addEventListener(\"mouseover\", displayTooltipInfo, false); break\r\n\t\t\tcase \"adead_link\": spanElm.addEventListener(\"mouseover\", displayTooltipError, false); break;\r\n\t\t\tcase \"unava_link\": //reserved\r\n\t\t\tdefault: \r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tlink.parentNode.replaceChild(spanElm, link);\r\n\t}", "function render_url(text) {\n if (text.includes(\"http\")) {\n return \"<a href=\\\"\" + text + \"\\\" target=\\\"_blank\\\">Buy Here</a>\";\n } else {\n return text;\n }\n }", "function startLinkStatus(){\n var a = document.createElement('a'); // Hack to extract absolute url\n $jQ('a[href]').each(function() {\n if ($jQ(this).attr('href').length > 0 &&\n $jQ(this).attr('href').search('javascript:')==-1 &&\n $jQ(this).attr('href').search('mailto:')==-1 &&\n $jQ(this).attr('href').search('#')!=0) {\n a.href = $jQ(this).attr('href');\n setLink($jQ(this),'href', a.href);\n }\n });\n}", "function convertImageAddressToAnchorTag(text) {\n const regex = /(https?:\\/\\/.*\\.(?:png|jpg))/i;\n const replacement = '<a href=\"$&\" target=\"_blank\">$&</a>';\n const result = text.replace(regex, replacement);\n console.log(result);\n return result;\n}", "function externalLinks() {\n if (document.getElementsByTagName) {\n var anchors = document.getElementsByTagName('a');\n for (var i = 0; i < anchors.length; i++) {\n var anchor = anchors[i];\n if (anchor.getAttribute('href') &&\n anchor.getAttribute('rel') == 'external')\n anchor.target = '_blank';\n }\n }\n} // externalLinks", "function qualifyUrl(url) {\n var element = document.createElement(\"span\");\n element.innerHTML = '<a href=\"' + url + '\">&nbsp;</a>';\n return element.firstChild.href;\n}", "function linkify(input_text,user_name) {\n\n var replaced_text, replace_pattern;\t\n\n replace_pattern = /\\(?([0-9]{3})\\)?[- ]([0-9]{3})[- ]([0-9]{4})/; // regex for (999) 999-9999\n \n\t/**\n\t*\n\t* replaced_text uses the replace() function to add the phone number to the output '($1) $2-$3', \n\t* create an <A> link tag. add the user name to the URL as 'user=user_name' as well as the number: 'num=$1$2$3'\n\t* then a little phone icon is added as the linked object on the page. \n\t*\n\t*/\n\treplaced_text = input_text.replace(replace_pattern, '($1) $2-$3 <a href=\"http://yourdomain.com/make_call.php?user='+user_name+'&num=$1$2$3\" onclick=\"return makeCall(\\'http://yourdomain.com/make_call.php?user='+user_name+'&num=$1$2$3\\')\"><img src=\"\tphone_icon_grey_15_15.png\" border=\"0\" /></a>');\n\t\n\treturn replaced_text;\n\t\n}", "function externalLinks() {\n\tif (!document.getElementsByTagName) {return;}\n\tvar anchors = document.getElementsByTagName(\"a\");\n\tfor (var i=0; i<anchors.length; i++) {\n\t\tvar anchor = anchors[i];\n\t\tif (anchor.getAttribute(\"href\")) {\n\t\t\tif (anchor.getAttribute(\"rel\") == \"external\" || anchor.getAttribute(\"rel\") == \"noopener\" || anchor.getAttribute(\"rel\") == \"noopener external\") {\n\t\t\t\tanchor.target = \"_blank\";\n\t\t\t}\n\t\t}\n\t}\n}", "function directLink(link) {\r\n\tlink.href = link.href.replace(/\\/gp/, \"\");\r\n}", "function atLinks() {\n linklist = [\"239MTG\", \"affinityforartifacts\", \"alliesmtg\", \"AllStandards\", \"Alphabetter\", \"Amonkhet\", \"architectMTG\", \"ArclightPhoenixMTG\", \"aristocratsMTG\", \"BadMTGCombos\", \"basementboardgames\", \"BaSE_MtG\", \"BudgetBrews\", \"budgetdecks\", \"BulkMagic\", \"cardsphere\", \"casualmtg\", \"CatsPlayingMTG\", \"CircuitContest\", \"cocomtg\", \"CompetitiveEDH\", \"custommagic\", \"DeckbuildingPrompts\", \"edh\", \"EDHug\", \"EggsMTG\", \"ElvesMTG\", \"enchantress\", \"EsperMagic\", \"findmycard\", \"fishmtg\", \"FlickerMTG\", \"freemagic\", \"goblinsMTG\", \"HamiltonMTG\", \"HardenedScales\", \"humansmtg\", \"infect\", \"johnnys\", \"kikichord\", \"lanternmtg\", \"lavaspike\", \"locketstorm\", \"lrcast\", \"magicarena\", \"Magicdeckbuilding\", \"MagicDuels\", \"magicTCG\", \"magicTCG101\", \"MakingMagic\", \"marchesatheblackrose\", \"marduMTG\", \"MentalMentalMagic\", \"millMTG\", \"ModernLoam\", \"modernmagic\", \"ModernRecMTG\", \"modernspikes\", \"ModernZombies\", \"monobluemagic\", \"mtg\", \"MTGAngels\", \"mtgbattlebox\", \"mtgbracket\", \"mtgbrawl\", \"mtgbudgetmodern\", \"mtgcardfetcher\", \"mtgcube\", \"MTGDredge\", \"mtgfinalfrontier\", \"mtgfinance\", \"mtgfrontier\", \"mtglegacy\", \"MTGManalessDredge\", \"MTGMaverick\", \"mtgmel\", \"mtgrules\", \"mtgspirits\", \"mtgtreefolk\", \"mtgvorthos\", \"neobrand\", \"nicfitmtg\", \"oathbreaker_mtg\", \"oldschoolmtg\", \"pauper\", \"PauperArena\", \"PauperEDH\", \"peasantcube\", \"PennyDreadfulMTG\", \"PioneerMTG\", \"planeshiftmtg\", \"ponzamtg\", \"RatsMTG\", \"RealLifeMTG\", \"RecklessBrewery\", \"rpg_brasil\", \"scapeshift\", \"shittyjudgequestions\", \"sistersmtg\", \"skredred\", \"Sligh\", \"spikes\", \"stoneblade\", \"StrangeBrewEDH\", \"SuperUltraBudgetEDH\", \"therandomclub\", \"Thoptersword\", \"threecardblind\", \"TinyLeaders\", \"TronMTG\", \"UBFaeries\", \"uwcontrol\", \"xmage\", \"reddit.com/message\", \"reddit.com/user/MTGCardFetcher\"]\n\n for (j = 0; j < linklist.length; j++) {\n if (location.href.toLowerCase().includes(linklist[j].toLowerCase()))\n return true;\n }\n return false;\n}", "function parseReferenceLinks()\n{\n\tlet labels = getLabels(), startPos;\n\tfor (startPos in labels)\n\t{\n\t\tlet id = labels[startPos],\n\t\t\tlabelPos = +startPos + 2 + id.length,\n\t\t\tendPos = labelPos - 1,\n\t\t\tendLen = 1;\n\n\t\tif (text[labelPos] === ' ')\n\t\t{\n\t\t\t++labelPos;\n\t\t}\n\t\tif (labels[labelPos] > '' && linkReferences[labels[labelPos]])\n\t\t{\n\t\t\tid = labels[labelPos];\n\t\t\tendLen = labelPos + 2 + id.length - endPos;\n\t\t}\n\t\tif (linkReferences[id])\n\t\t{\n\t\t\taddLinkTag(+startPos, endPos, endLen, linkReferences[id]);\n\t\t}\n\t}\n}", "function change_links(a){\r\n\tx = a.href.indexOf('gid=');\r\n\ta.innerHTML = eval('gid'+a.href.substr(a.href.indexOf('gid=')+4));\r\n}", "function formatHyperlink(text, url) {\n return `<a href=\"${url}\">${text}</a>`;\n}", "function qualifyURL(url) {\n var a = document.createElement('a');\n a.href = url;\n return a.href;\n }", "function apply($) {\n\t\t\tvar doc = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n\n\t\t\t$.fn = $.fn || {};\n\n\t\t\ttry {\n\t\t\t\tdoc = doc || document || window && window.document || global && global.document;\n\t\t\t} catch (e) {/* do nothing for now */}\n\n\t\t\tif (!doc) {\n\t\t\t\tthrow new Error('Cannot find document implementation. ' + 'If you are in a non-browser environment like Node.js, ' + 'pass the document implementation as the second argument to linkify/jquery');\n\t\t\t}\n\n\t\t\tif (typeof $.fn.linkify === 'function') {\n\t\t\t\t// Already applied\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfunction jqLinkify(opts) {\n\t\t\t\topts = linkifyElement.normalize(opts);\n\t\t\t\treturn this.each(function () {\n\t\t\t\t\tlinkifyElement.helper(this, opts, doc);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t$.fn.linkify = jqLinkify;\n\n\t\t\t$(doc).ready(function () {\n\t\t\t\t$('[data-linkify]').each(function () {\n\t\t\t\t\tvar $this = $(this);\n\t\t\t\t\tvar data = $this.data();\n\t\t\t\t\tvar target = data.linkify;\n\t\t\t\t\tvar nl2br = data.linkifyNlbr;\n\t\t\t\t\tvar options = {\n\t\t\t\t\t\tattributes: data.linkifyAttributes,\n\t\t\t\t\t\tdefaultProtocol: data.linkifyDefaultProtocol,\n\t\t\t\t\t\tevents: data.linkifyEvents,\n\t\t\t\t\t\tformat: data.linkifyFormat,\n\t\t\t\t\t\tformatHref: data.linkifyFormatHref,\n\t\t\t\t\t\tnl2br: !!nl2br && nl2br !== 0 && nl2br !== 'false',\n\t\t\t\t\t\ttagName: data.linkifyTagname,\n\t\t\t\t\t\ttarget: data.linkifyTarget,\n\t\t\t\t\t\tclassName: data.linkifyClassName || data.linkifyLinkclass, // linkClass is deprecated\n\t\t\t\t\t\tvalidate: data.linkifyValidate,\n\t\t\t\t\t\tignoreTags: data.linkifyIgnoreTags\n\t\t\t\t\t};\n\t\t\t\t\tvar $target = target === 'this' ? $this : $this.find(target);\n\t\t\t\t\t$target.linkify(options);\n\t\t\t\t});\n\t\t\t});\n\t\t}", "function Linker(targetDoc, pageTitleList)\n{\n this.targetDoc = targetDoc;\n this.treatAsLeafNodeNameList = [\"A\", \"SCRIPT\", \"STYLE\"];\n this.textNodeIterator = new TextNodeIterator(targetDoc.body, this.treatAsLeafNodeNameList);\n this.nextTextNode = this.textNodeIterator.next();\n this.textNodeLinker = new TextNodeLinker(pageTitleList);\n this.doLinking = false;\n this.startDelayMs = 10;\n this.delayMs = 50;\n}", "function pne_url2a(url)\n{\n var urlstr;\n\n if (url.length > 57)\n {\n var _url = url.replace(\"&amp;\", \"&\");\n\n if (_url.length > 57)\n {\n _url = _url.substr(0, 57) + '...';\n urlstr = _url.replace(\"&\", \"&amp;\");\n }\n }\n\n if (!urlstr)\n {\n urlstr = url;\n }\n\n document.write('<a href=\"'+url+'\" target=\"_blank\">'+urlstr+'</a>');\n}", "function hookLinks() {\n\n\t\t//alert('hookLinks()');\n\t\t// do not allow to open external links\n\t\tdocument.addEventListener('click', function (ev) {\n\t\t\t//alert('click ' + ev.target.tagName);\n\t\t\tvar target = ev.target;\n\t\t\tif (ev.target.tagName && ev.target.tagName.toLowerCase() !== 'a') {\n\t\t\t\ttarget = ev.target.closest('a');\n\t\t\t}\n\n\t\t\tif (target && target.getAttribute('href')) {\n\n\t\t\t\t// if there's http or https it can be redirect to other page\n\t\t\t\tvar href = target.getAttribute('href');\n\t\t\t\tconsole.log('HREF:', href);\n\t\t\t\tconsole.log('RESULT:', /^https?:\\/\\//.test(href) && getDomain(href) !== getDomain(location.href));\n\t\t\t\tif (/^https?:\\/\\//.test(href) && getDomain(href) !== getDomain(location.href)) {\n\t\t\t\t\tev.preventDefault();\n\t\t\t\t\tev.stopPropagation();\n\t\t\t\t\tsend('NOT_ALLOWED_URL', href);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t}", "function lc_GetLixLinks(){\r\n var lxlinks = document.evaluate(\"//a[contains(@href, 'http://lix.in/')]\",\r\n document, null, 6, null);\r\n for(var i=0, lxlink; i < lxlinks.snapshotLength; i++){\r\n // changed in 2.0 to match if a redirect\r\n if( lxlink = lxlinks.snapshotItem(i).href.match(/http:\\/\\/lix\\.in\\/(\\w+)/i) ){\r\n if(lc_FindDupe(lxlink[0], lxURLs)){\r\n lc_SetClassDupe(lxlinks.snapshotItem(i));\r\n continue;\r\n }\r\n logit(\"lxlink[1] = \"+lxlink[1]);\r\n lxURLs.push(lxlink[0]);\r\n lc_post(lxlink[0], \"tiny=\"+lxlink[1]+\"&submit=continue\", lc_DeLixLink, lxlinks.snapshotItem(i));\r\n }\r\n }\r\n}", "function tweaklinks(doc)\n{\n // Do not touch these link titles\n let ignoreTitles=[\"Lägg till\",\"Ta Bort\"];\n let mapfixedlinks = [\n { href: 'https://www.avanza.se/hall-koll/min-borsskarm.html', name: 'borsskarm' },\n { href: 'https://www.avanza.se/min-ekonomi/oversikt.html', name: 'oversikt' },\n { href: 'https://www.avanza.se/hem/senaste.html', name: 'senaste' },\n { href: 'https://www.avanza.se/min-profil/installningar.html', name: 'installningar' }\n ];\n // find all links, add external attribute if not set.\n for (let a,i=0; a=doc.getElementsByTagName(\"a\")[i]; ++i) {\n if (a.target === \"\") {\n if (a.title === \"\") {\n // console.log(\"AH:\" + a.href);\n\n let ml = mapfixedlinks.find(function(element) {\n return a.href == element.href;\n });\n\n if ( ml != null ){\n a.target = ml.name;\n }\n\n }else {\n let ignore = false;\n ignoreTitles.forEach(function(value){\n let t = a.title.search(value);\n if (t != -1) {\n console.info(\"Ignoring:\" + value + \" for title:\" + a.title);\n ignore = true;\n }\n });\n if ( ! ignore ) {\n a.target = a.title;\n }\n }\n }\n }\n}", "function external_links()\n{\n\tif (!document.getElementsByTagName)\n\t \treturn;\n\tvar anchors = document.getElementsByTagName(\"a\");\n\tfor (var i=0; i<anchors.length; i++)\n\t{\n\t\tvar anchor = anchors[i];\n\t\tif (anchor.getAttribute(\"href\") && anchor.getAttribute(\"rel\") == \"external\")\n\t\t\tanchor.target = \"_blank\";\n\t}\n}", "function magnifyLinks(rootNode) {\n\n if (!rootNode) {\n rootNode = document.body;\n }\n\n // Check if we already added links for this content\n if (rootNode.hasAttribute('mlink_processed'))\n return;\n rootNode.setAttribute('mlink_processed', ++mlink_processed);\n\n var elems = rootNode.getElementsByTagName('a');\n for (var i = 0; i < elems.length; i++) {\n var elem = elems[i];\n\n // Ignore empty links\n if (!elem.href || $.trim(elem.textContent) == '' || elem.textContent.substring(4,0) == 'http')\n continue;\n if (!elem.hasAttribute('mlink')) {\n elem.setAttribute('mlink', getDiscogsLinkKey(elem.href));\n }\n }\n}", "function externalLink(service, link, linkName) {\n console.log(service + link + linkName);\n if (link !== null && link !== \"\") {\n return `<a href=\"${service}${link}\">${linkName}</a>`;\n } else {\n return \"\";\n }\n}", "function updateURL() {\n var link = baseUrl,\n delim = \"?\";\n\n /* Appends all the query parameters to the link (a query parameter can be\n * excluded by setting it to null) */\n UtilDict.forEachEntry(parameters, function (key, value) {\n if (value) { // Value cannot be null or the empty String\n link += delim + value;\n if (delim === \"?\") {\n //first param has a question mark in front of it. all others have an &\n delim = \"&\";\n }\n }\n });\n\n // Need to add an extra \"&\" to the query if we have an anchor, otherwise\n // the last query will contain the anchors\n if (!UtilDict.isEmpty(anchors)) {\n link += \"&\";\n }\n\n // Anchors have to be at the end\n UtilDict.forEachEntry(anchors, function (key, value) {\n link += \"#\" + value;\n });\n\n if (isShortLinkMode) {\n if (linkPaneTextbox.is(\":visible\")) {\n getlinkloadinganimation.show();\n\n jQuery.urlShortener({\n longUrl: link,\n success: function (shortUrl) {\n setNewUrl(shortUrl);\n getlinkloadinganimation.hide();\n },\n error: function (err) {\n console.error(JSON.stringify(err));\n getlinkloadinganimation.hide();\n }\n });\n }\n } else {\n setNewUrl(link);\n }\n\n //update lang href with current bookmark url\n updateLangHref(link);\n\n //trigger event indicating bookmark is complete. pass bookmark as arg\n topic.publish(EventManager.BookmarkLink.BOOKMARK_GENERATED, {\n link: link\n });\n }", "function linkify(arr, options) {\n return arr.reduce(function(acc, pkg) {\n pkg.homepage = utils.homepage(pkg);\n\n var link = typeof options.template !== 'function'\n ? utils.reference(pkg.name, pkg.homepage)\n : options.template(pkg, options);\n\n if (link) {\n acc.push(link.replace(/#readme$/, ''));\n }\n return acc;\n }, []);\n}", "function linkDelicious()\n{\n var done = $( 'verboseStatus' );\n if(!done )\n { // reddish debug flashing:\n // $('body').style.background = '#F' + pad(parseInt(100*Math.random()));\n return setTimeout( linkDelicious, 200 );\n }\n var base = getLinkByText( /View Blog/i );\n var urls = done.innerHTML.split( /\\s*<br *\\/?>\\s*/i );\n var keep = /^([^:]*:..[^\\/]*.[^\\/]*).*/; // keeps the first path segment\n var icio = GM_getValue( 'url-'+myid, site ).replace( keep, '$1' );\n var url, i;\n for( i=0; i<urls.length; i++ )\n if( urls[i].match( '/' ) )\n url = base.replace(/\\/$/,'') +'/'+ urls[i].replace( /^\\//, '' );\n if( url )\n {\n var img = document.createElement( 'img' );\n img.src = 'http://del.icio.us/static/img/delicious.small.gif';\n img.alt = 'Del.icio.us icon';\n var tag = document.createElement( 'a' );\n tag.href = icio +'?v=3&url='+ url + GM_getValue( 'postdata-'+myid, '' );\n tag.title = 'Tag this post at Del.icio.us';\n var node = done.nextSibling;\n if( node.nodeName == '#text' )\n node = node.nextSibling; // the <p> tag containing View Blog\n var perm = document.createElement( 'a' );\n perm.href = url;\n perm.appendChild( document.createTextNode( 'View Post' ) );\n node.insertBefore( perm, node.firstChild );\n node.insertBefore( document.createTextNode( ' ' ), node.firstChild );\n node.insertBefore( tag, node.firstChild );\n img.style.paddingRight = '4px';\n tag.appendChild( img );\n tag.appendChild( document.createTextNode( 'Link at Del.icio.us' ) );\n }\n}", "function externalLinks() {\n if (!document.getElementsByTagName) return;\n var anchors = document.getElementsByTagName(\"a\");\n for (var i = 0; i < anchors.length; i++) {\n var anchor = anchors[i];\n if (anchor.getAttribute(\"href\") &&\n anchor.getAttribute(\"rel\") == \"external\")\n anchor.target = \"_blank\";\n }\n}", "function vivify_log_links(element) {\n element.innerHTML = element.innerHTML.replace(/ (https:\\S+\\.log\\.html)/,\n function(match, url) {\n return \" <a href=\\\"\" + url + \"\\\" target=\\\"_blank\\\">\" + url + \"</a>\";\n });\n}", "function gimmeHostName2(link) {\r\n\tlink = link.replace(/http:\\/\\/.*?\\?http:\\/\\//, 'http://'); //anonymizers\r\n if (/(?:https?:\\/\\/)?(?:www\\.|[\\w\\.])*?([\\w-\\s~]+)(?:\\.(?:co\\.(?:uk|nz|il)|com\\.\\w{2}|\\w{2,4})|~)(?::\\d+)?\\//.test(link)) return link.match(/(?:https?:\\/\\/)?(?:www\\.|[\\w\\.])*?([\\w-~\\s]+(\\.(?:co\\.(?:uk|nz|il)|in\\.ua|com\\.\\w{2}|\\w{2,4})|\\.?~))(?::\\d+)?\\//);\r\n else {\r\n console.log(\"gimmeHostName error.\");\r\n console.log(link);\r\n return -1;\r\n }\r\n}", "addLinks(jq) {\n const enabled = config.settings.markup.links;\n\n const linkRegex = /\\b((?:https?|s?ftp):\\/\\/[^\\s\"']+[^\\s.,;:()\"'>])(\\)*)/g;\n const link = (url, closeParens) => {\n // Allow URLs to finish with a parenthesized part.\n const open = Array.from(url).reduce((open, c) => {\n if (c == '(') return open + 1;\n else if (c == ')') return Math.max(0, open - 1);\n else return open;\n }, 0);\n\n url += closeParens.substring(0, open);\n closeParens = closeParens.substring(open);\n\n const link = enabled ?\n $('<a class=\"url-link\"></a>').attr('href', url)\n : $('<span class=\"url-link\"></span>');\n\n return [link.text(url), closeParens];\n }\n\n // First discard the whole thing if it's a link,\n // then add all elements that are not links,\n // then discard all of those that have a link as a parent.\n const contexts = jq.not('a').add(':not(a)', jq).filter(function() {\n return $(this).parents('a').length < 1;\n });\n contexts.replaceText(linkRegex, link);\n }", "function url(href) {\n return /^([a-z]{2,}):/.test(href) ? href : ('http://' + href)\n}", "function link(elem) {\n // check if we have a footnote backref\n if (hasClass(elem, \"footnote-backref\")) return \"\";\n\n // otherwise parse the link as usual\n var result = \" [\";\n result += parseChildren(elem);\n return result + \"](\" + elem.getAttribute(\"href\") + \") \";\n}" ]
[ "0.73212177", "0.7284751", "0.7234442", "0.7212285", "0.7210462", "0.7128047", "0.69046366", "0.6873047", "0.6612578", "0.6440961", "0.642403", "0.6311282", "0.630552", "0.6294974", "0.6288601", "0.6206067", "0.61951596", "0.6171151", "0.6165195", "0.6165195", "0.6165195", "0.61513335", "0.61377376", "0.60381967", "0.6002641", "0.6001701", "0.5988714", "0.5978925", "0.5927476", "0.5924442", "0.59237957", "0.590536", "0.5897664", "0.58881235", "0.58822346", "0.58749896", "0.58746445", "0.5871054", "0.5829575", "0.5826095", "0.5826095", "0.580813", "0.57607704", "0.57516104", "0.5736248", "0.5734149", "0.57288015", "0.5724653", "0.5724452", "0.5720322", "0.56946987", "0.5692098", "0.56608754", "0.5651926", "0.56513715", "0.56408525", "0.5633415", "0.5633293", "0.56117433", "0.5609827", "0.56088233", "0.5606307", "0.5603963", "0.5600579", "0.55728114", "0.55582434", "0.5556382", "0.5554171", "0.5549197", "0.5548472", "0.55457467", "0.5544634", "0.5540514", "0.5526725", "0.5520116", "0.55192626", "0.55173403", "0.55165434", "0.55147505", "0.5507853", "0.55006737", "0.5499846", "0.5497444", "0.54914093", "0.54911876", "0.5490131", "0.54814005", "0.54803926", "0.54750717", "0.547496", "0.54712194", "0.546982", "0.5466913", "0.54610264", "0.5455838", "0.54279035", "0.5426827", "0.5426451", "0.5426212", "0.54258364" ]
0.76830006
0
Boot the component. This method is triggered after the user's webpack.mix.js file has executed.
boot() { console.log("WebpackConfig:"); console.log("-------------- \n"); console.dir(Config, {depth: 1}); console.log("----------------------------------------------- \n"); console.log("Mix Object:"); console.log("------------- \n"); console.dir(Mix, {depth: this.dumpDepth}); console.log("----------------------------------------------- \n"); if (this.die) { process.exit(0); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boot() {\n let workboxPlugin = require('workbox-webpack-plugin');\n\n this.plugin = new workboxPlugin[this.pluginName](Object.assign({\n swDest: 'service-worker.js'\n }, this.config));\n }", "boot() {\n //\n }", "onBoot() {}", "boot() {\n\n }", "async afterBootstrap () {}", "boot() {\n const Events = this.app.getInstance('Events')\n this.app\n .make('AutoLoader')\n .context(require.context('@listeners', true, /\\.js$/))\n .each((alias, abstract)=>{\n this.app.bind(alias, abstract,false)\n Events.$on((abstract.event || alias), (payload)=>{\n try{\n this.app.make(alias).handle(payload)\n }catch (e) {\n this.app.handleError(e)\n }\n })\n })\n }", "function boot() {\n config();\n\n require([\"app\", \"modules/common/histogram\",\n \"modules/common/listTab\",\n \"modules/common/list\",\n \"modules/common/modal\",\n \"modules/common/region\",\n \"modules/common/iconbutton\",\n \"modules/common/togglebutton\",\n \"modules/common/toggleiconbutton\",\n \"modules/common/nativehtml\",\n \"modules/common/textArea\",\n \"modules/common/codeArea\",\n \"modules/common/gradient\",\n \"modules/common/color\"\n ], function (app) {\n app.start();\n })\n }", "constructor() {\n this.bootstrap();\n }", "boot() {\n\t}", "bootstrapLoaded() {\n this.client_.sendMessage('bootstrap-loaded');\n }", "boot() {\n const eventEmitter = this.systems.events;\n eventEmitter.on(Phaser.Scenes.Events.UPDATE, this.update, this);\n eventEmitter.on(Phaser.Core.Events.DESTROY, this.destroy, this);\n }", "addMixScripts() {\n\t\tconsole.log(`3. Add mix scripts into package.json`);\n\t\tconst packageJson = JSON.parse(fs.readFileSync(this.workingDir + 'package.json'))\n\t\tpackageJson.scripts.dev = \"npm run development\";\n\t\tpackageJson.scripts.development = \"cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js\";\n\t\tpackageJson.scripts.watch = \"npm run development -- --watch\";\n\t\tpackageJson.scripts.hot = \"cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js\";\n\t\tpackageJson.scripts.prod = \"npm run production\";\n\t\tpackageJson.scripts.production = \"cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js\";\n\n\t\t// Write package.json.\n\t\tfs.writeFile(this.workingDir + 'package.json', JSON.stringify(packageJson, null, 4), 'utf8', (err) => {\n\t\t\tif (err) {\n\t\t\t\tthrow err;\n\t\t\t}\n\t\t});\n\t}", "function Bootstrapper() {\n\tBootstrapperBase.call(this, Catberry);\n}", "bootstrap() { }", "function Boot() {\n // empty, maybe inherit config file or something\n}", "bootstrap( opts ) {\n let key = APP_STATES.get( 'BOOTSTRAP' )\n\n return <Bootstrap key={ key } state={ key } />\n }", "async boot() {\n try {\n this.shutdownManager = new shutDownManager_1.ShutdownManager({ finUUID: this.finUUID, manifest: this.manifest });\n this.serviceLauncher = new serviceLauncher_1.ServiceLauncher({ finUUID: this.finUUID, manifest: this.manifest, shutdownManager: this.shutdownManager });\n window.bootEngine = this.bootEngine = new bootEngine_1.BootEngine(this.manifest, this.serviceLauncher, this.shutdownManager);\n this.registerBootTasks(this.bootEngine, this.manifest, this.serviceLauncher);\n this.bootEngine.run();\n }\n catch (err) {\n systemLog_1.default.error({ leadingBlankLine: true }, err);\n }\n }", "boot() {\n\t\tthis.createPolicies();\n\t\tthis.bootDefaultControllers();\n\t\tthis.loadCommands([\n\t\t\tMakeControllerCommand,\n\t\t\tServeCommand\n\t\t]);\n\t}", "apply(compiler) {\n //webpack刚开始运行时\n compiler.hooks.run.tap(pluginName, compilation => {\n console.log('🍊🍊🍊The webpack build process is starting!!!');\n });\n }", "componentDidMount() {\n\t\tthis.startup();\n\t}", "static boot ({ schema }) {\n\n }", "function boot() {\n\tPhaser.State.call(this);\n}", "boot() {\n this.createPolicies();\n this.bootDefaultControllers();\n this.loadCommands([_MakeControllerCommand.default, _ServeCommand.default]);\n }", "componentDidMount() {\n $('head').append('<link rel=\"stylesheet\" type=\"text/css\" href=\"https://cdnjs.cloudflare.com/ajax/libs/bootstrap-tour/0.10.3/css/bootstrap-tour-standalone.css\">');\n $(\".button-collapse\").sideNav({\n closeOnClick: true //closes when we click things\n });\n\n $('head').append('<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0\">');\n $('head').append('<link rel=\"shortcut icon\" type=\"image/png\" href=\"favicon.png\">');\n $.getScript(\"https://cdnjs.cloudflare.com/ajax/libs/bootstrap-tour/0.10.3/js/bootstrap-tour-standalone.js\", function(){\n\n });\n }", "function bootstrap(RootComponent) {\n const zone = initializeZones();\n const root = compileComponent(RootComponent);\n \n const tag = getTagName(RootComponent);\n const rootEl = document.querySelector(tag);\n if(!rootEl) {\n throw Error(`couldn't find ${tag} element for app bootstrap`);\n }\n\n attachComponent(rootEl, root, zone);\n}", "componentDidMount() {\n setTimeout(() => {\n this._bootstrapAsync()\n }, 3000)\n }", "function Bundler () {\n}", "getBootstrap() {\n return {};\n }", "_setBoot() {\n this.config.scene = [Boot];\n }", "boot() {\n\t\tthis.createPolicies();\n\t\tthis.loadAppModelFactories();\n\t\tthis.loadCommands([\n\t\t\tMakeFactoryCommand,\n\t\t\tMakeMigrationCommand,\n\t\t\tMakeModelCommand,\n\t\t\tMakeSeederCommand,\n\t\t\tMigrateCommand,\n\t\t\tMigrateFreshCommand,\n\t\t\tMigrateRefreshCommand,\n\t\t\tMigrateRollbackCommand,\n\t\t\tMigrateStatusCommand,\n\t\t\tSeedCommand\n\t\t]);\n\t}", "function bootstrap({\n router,\n store,\n i18n,\n message\n}) {\n // Set application configuration\n setAppOptions({\n router,\n store,\n i18n\n })\n // Load route\n loadRoutes()\n // Load routing guard\n loadGuards(guards, {\n router,\n store,\n i18n,\n message\n })\n}", "function boot () {\n const game = SkeletonGame.create('Advanced Videogame Skeleton')\n\n // this part is optional but useful for debugging the game from the browser console\n // --\n window.$debug = window.$debug || {}\n window.$debug.game = game\n\n // this part is also optional but gives you the ability to work with the Videogame API\n // from the browser console\n window.$debug.vg = {\n Animation,\n BaseTile,\n BaseTransition,\n Color,\n Command,\n FontFamily,\n FontSprite,\n Frame,\n Point,\n Rect,\n Scene,\n Sprite,\n TextSprite,\n Videogame,\n ClickableSprite,\n CursorSprite,\n ControllableSprite,\n Fog,\n JumperSprite,\n Starfield\n }\n\n // --\n\n // start the game\n game.start()\n}", "boot () {\n\n // Description of the clients' environment\n this.deviceDetect = new DeviceDetect();\n\n // populate main data model, which describes the application structure\n this.model = new Model();\n this.model.loadJSON(config.json_url, this.bootContinued.bind(this));\n }", "beforeMount(){\n console.log('beforeMount');\n }", "function component() {\n let element = document.createElement('div');\n\n // Lodash, now imported by this script\n element.innerHTML = \"webpack 自动部署 热启动成功啦!\";\n element.classList.add(\"example\");\n return element;\n}", "chainWebpack(chain) {}", "component() {\n return import(/* webpackChunkName: \"about\" */ '../views/About.vue');\n }", "initializing() {\n this.initializeBoilerplate();\n }", "function bootstrap() {\n MODULE.Controller.init(MODULE.Model, MODULE.View);\n }", "componentDidMount() {\n // alert(\"se acaba de cargar el componente\")\n }", "function bootstrap(mainModule){\n return mainModule.main();\n console.log('booted')\n }", "componentDidMount() {\n\t\tthis.init();\n\t}", "async function start() {\n await new Promise(resolve => {\n // Patch the client-side bundle configurations\n // to enable Hot Module Replacement (HMR) and React Transform\n\n webpackConfig[0].entry.index.unshift('webpack-dev-server/client?http://localhost:' + config.apps.frontend.api_port + '/'); // WebpackDevServer host and port\n webpackConfig[0].entry.index.unshift('webpack/hot/dev-server'); // \"only\" prevents reload on syntax errors\n\n webpackConfig[0].plugins.splice(1, 0, new webpack.optimize.OccurenceOrderPlugin());\n webpackConfig[0].plugins.splice(2, 0, new webpack.HotModuleReplacementPlugin());\n webpackConfig[0].plugins.splice(3, 0, new webpack.NoErrorsPlugin());\n\n webpackConfig[0]\n .module\n .loaders\n .filter(x => x.loader === 'babel-loader')\n .forEach(x => (x.query = { // eslint-disable-line no-param-reassign\n // Wraps all React components into arbitrary transforms\n // https://github.com/gaearon/babel-plugin-react-transform\n presets: [\n \"es2015\",\n \"react\",\n \"stage-0\",\n \"react-hmre\"\n ],\n }));\n\n // First we fire up Webpack an pass in the configuration we\n // created\n var bundleStart = null;\n var compiler = webpack(webpackConfig[0]);\n\n // TODO : better use https://www.npmjs.com/package/browser-sync-webpack-plugin for browserSync integration\n // const wpMiddleware = webpackMiddleware(compiler, {\n // // IMPORTANT: webpack middleware can't access config,\n // // so we should provide publicPath by ourselves\n // publicPath: webpackConfig[0].output.publicPath,\n // quiet: true,\n // noInfo: true,\n // // Pretty colored output\n // stats: webpackConfig[0].stats,\n //\n // // For other settings see\n // // https://webpack.github.io/docs/webpack-dev-middleware\n // });\n // const hotMiddleware = webpackHotMiddleware(compiler);\n\n // We give notice in the terminal when it starts bundling and\n // set the time it started\n compiler.plugin('compile', function () {\n console.log('Bundling...');\n bundleStart = Date.now();\n });\n\n // We also give notice when it is done compiling, including the\n // time it took. Nice to have\n compiler.plugin('done', function () {\n console.log('Bundled in ' + (Date.now() - bundleStart) + 'ms!');\n resolve();\n });\n\n new WebpackDevServer(compiler, {\n publicPath: webpackConfig[0].output.publicPath,\n hot: true,\n watchOptions: {\n aggregateTimeout: 300,\n poll: 1000\n },\n quiet: false,\n noInfo: false,\n // Pretty colored output\n stats: webpackConfig[0].stats,\n historyApiFallback: true\n }).listen(config.apps.frontend.api_port, 'localhost', function (err, result) {\n if (err) {\n return console.log(err);\n }\n\n const bs = Browsersync.create();\n bs.init({\n open: false,\n proxy: {\n target: 'localhost:' + config.apps.frontend.api_port,\n //middleware: [wpMiddleware, hotMiddleware],\n },\n // no need to watch '*.js' here, webpack will take care of it for us,\n // including full page reloads if HMR won't work\n files: ['build/frontend/**/*.*'],\n }, resolve);\n\n console.log('Bundling project, please wait...');\n console.log('Listening at http://localhost:' + config.apps.frontend.api_port + '/');\n });\n });\n}", "boot () {\n const ace = require('@adonisjs/ace')\n ace.addCommand('Adonis/Commands/Schema:Build')\n }", "onComponentMount() {\n\n }", "function boot() {\n // inject kitten data into document as HTML\n cats.forEach((cat) => {\n if (!isCatInPlayground(cat.index)) {\n const catEl = makeCat(cat, catDragStarted);\n window.clowder.appendChild(catEl);\n }\n });\n\n // show which cats have been treated\n updateTreatmentHistory();\n\n // prepare box image for use when dragging cats\n catCarrierBox = document.createElement('img');\n catCarrierBox.src = 'i/carrier.png';\n\n window.vet.addEventListener('drop', catDropped);\n window.clowder.addEventListener('drop', catDropped);\n window.vet.addEventListener('dragover', dragHandler);\n window.clowder.addEventListener('dragover', dragHandler);\n window.vet.addEventListener('dragleave', dragLeave);\n window.clowder.addEventListener('dragleave', dragLeave);\n window.vet.addEventListener('dragend', catDragEnded);\n window.clowder.addEventListener('dragend', catDragEnded);\n\n window.setInterval(checkOut, 1000);\n}", "componentWillMount() {\n const script = document.createElement(\"script\");\n const realScript = `function getUUID() { \n return (Math.random().toString(36).substring(2)+(new Date()).getTime().toString(36)); }`;\n const scriptText = document.createTextNode(realScript);\n script.appendChild(scriptText);\n document.head.appendChild(script);\n\n // Mount JQuery script\n const scriptJQ = document.createElement(\"script\");\n scriptJQ.src = \"https://code.jquery.com/jquery-3.2.1.min.js\";\n scriptJQ.async = true;\n document.body.appendChild(scriptJQ);\n\n // Mount Materialize script\n const scriptMaterialize = document.createElement(\"script\");\n scriptMaterialize.src = \"https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/js/materialize.min.js\";\n scriptMaterialize.async = true;\n document.body.appendChild(scriptMaterialize); \n \n // Mount Readable script\n const scriptReadable = document.createElement(\"script\");\n scriptReadable.src = \"../js/readable.js\";\n scriptReadable.async = true;\n document.body.appendChild(scriptReadable);\n \n }", "extend(config, ctx) {\n // config.plugins.push(new HtmlWebpackPlugin({\n // })),\n // config.plugins.push(new SkeletonWebpackPlugin({\n // webpackConfig: {\n // entry: {\n // app: path.join(__dirname, './Skeleton.js'),\n // }\n // },\n // quiet: true\n // }))\n }", "function bundle() {\n stream.push(watcher.bundle())\n if (fs.once) {\n stream.push(null)\n }\n }", "async function bundle() {\n const since = lastRun(bundle);\n const polyfillPath = path.join(config.buildBase, 'js', 'polyfill.js');\n const factorBundlePath = path.join(\n config.buildBase,\n 'js',\n 'factor-bundle.js'\n );\n\n await makeDir(path.join(config.buildBase, 'js'));\n\n async function getFactorBundle() {\n const paths = await globby('**/*.js', { cwd: 'assets/js' });\n const factorBundle = await new Promise((resolve, reject) => {\n browserify({\n entries: paths.map((string) => `assets/js/${string}`),\n debug: true\n })\n .plugin('bundle-collapser/plugin')\n .plugin('factor-bundle', {\n outputs: paths.map((string) =>\n path.join(config.buildBase, 'js', string)\n )\n })\n .bundle((err, data) => {\n if (err) return reject(err);\n resolve(data);\n });\n });\n await fs.promises.writeFile(factorBundlePath, factorBundle);\n }\n\n await Promise.all([\n fs.promises.copyFile(\n path.join(\n __dirname,\n 'node_modules',\n '@babel',\n 'polyfill',\n 'dist',\n 'polyfill.js'\n ),\n polyfillPath\n ),\n getFactorBundle()\n ]);\n\n // concatenate files\n await getStream(\n src([\n 'build/js/polyfill.js',\n 'build/js/factor-bundle.js',\n 'build/js/uncaught.js',\n 'build/js/core.js'\n ])\n .pipe(sourcemaps.init({ loadMaps: true }))\n .pipe(concat('build.js'))\n .pipe(sourcemaps.write('./'))\n .pipe(dest(path.join(config.buildBase, 'js')))\n .pipe(through2.obj((chunk, enc, cb) => cb()))\n );\n\n let stream = src('build/js/**/*.js', { base: 'build', since })\n .pipe(sourcemaps.init({ loadMaps: true }))\n .pipe(unassert())\n .pipe(envify())\n .pipe(babel());\n\n if (PROD) stream = stream.pipe(terser());\n\n stream = stream.pipe(sourcemaps.write('./')).pipe(dest(config.buildBase));\n\n if (DEV) stream = stream.pipe(lr(config.livereload));\n\n stream = stream.pipe(dest(config.buildBase));\n\n // convert to conventional stream\n stream = stream.pipe(through2.obj((chunk, enc, cb) => cb()));\n\n await getStream(stream);\n}", "componentDidMount() {\n this.componentLoaded = true;\n }", "attached(){\n angular.bootstrap(this.element, ['pdb.component.library']);\n }", "function BuildCleanerWebpackPlugin() {}", "function jsProd() {\n return src([\n 'js/**/*.js',\n 'node_modules/bootstrap/dist/js/bootstrap.js'\n ])\n .pipe(\n babel({\n presets: ['@babel/env']\n })\n )\n .pipe(concat('scripts.js'))\n .pipe(uglify())\n .pipe(rename({ suffix: '.min' }))\n .pipe(dest('dist'));\n}", "function createMount() {\r\n\r\n const config = webpackBase(outputPath, srcPath, '/');\r\n\r\n // remove source maps\r\n delete config.devtool;\r\n\r\n // clear plugins\r\n config.plugins.length = 0;\r\n\r\n // emit css to an external file\r\n var cssExtractPlugin = new miniCssExtractPlugin({\r\n filename: \"mount.css\"\r\n })\r\n\r\n config.plugins.push(cssExtractPlugin);\r\n\r\n // switch entry point to be built\r\n config.entry = {\r\n mount: [\r\n path.resolve(srcPath, './mount/mount.ts')\r\n ]\r\n };\r\n\r\n return config;\r\n}", "boot() {\n\n this.getServerInstance().loadStoredCredentials();\n\n singletonAddEventListener(document.body, 'click', handleGlobalClick, false);\n singletonAddEventListener(window, 'resize', pageHasResized, false);\n singletonAddEventListener(window, 'hashchange', pageHasChanged, false);\n\n this.pageNavigate();\n }", "function bundle () {\n return new Promise((resolve, reject) => {\n webpack(webpackConfig).run((err, stats) => {\n if (err) {\n return reject(err)\n }\n\n console.log(stats.toString(webpackConfig[0].stats))\n return resolve()\n })\n })\n}", "componentDidMount() {\n const { name, host, document } = this.props;\n const scriptId = `micro-frontend-script-${name}`;\n /* Check if the relevant script, which has a unique ID, has already been downloaded,\n If yes, render it immediately */\n if (document.getElementById(scriptId)) {\n this.renderMicroFrontend();\n return;\n }\n\n const assetManifestFile = `${host}/asset-manifest.json`;\n\n /* Fetch the asset-manifest.json file in order to look up the full URL of the main script asset.\n (react-scripts outputs compiled JavaScript files that have hashes in their filename to facilitate caching) */\n console.log('Fetch ' + assetManifestFile);\n fetch(assetManifestFile)\n .then(res => res.json())\n .then(manifest => {\n console.log('Manifest: ' + JSON.stringify(manifest));\n const script = document.createElement('script');\n script.id = scriptId;\n script.crossOrigin = '';\n /* Use the manifest to set this document script full URL */\n script.src = `${host}${manifest['main.js']}`;\n console.log('script.src: ' + script.src);\n /* Attach the script to the document, with an onload handler that renders the micro frontend */\n script.onload = this.renderMicroFrontend;\n document.head.appendChild(script);\n });\n }", "loadDependencies() {\n gulpWebpack = require('webpack-stream');\n }", "componentDidMount() {\n this.setup();\n }", "function boot() {\n\n // call the parent's constructor\n events.EventEmitter.call(this);\n this.emitter = new events.EventEmitter();\n this.emitter.setMaxListeners(2);\n\n var self = this;\n\n /**\n * runs the main config loader\n * @param none\n */\n this.run = function () {\n async.waterfall([\n wf0Info,\n wf1ConfigurationFromMongo,\n wf2ConfigurationFromMagento,\n wf3ConfigurationToMongo\n ], waterFallLastCb);\n }\n\n /**\n * emits the loaded config on end\n * @param theMageConfig object\n */\n function waterFallLastCb(theMageConfig) {\n\n if (theMageConfig && theMageConfig.hasOwnProperty('general')) {\n util.log('Initialised XMLConnect config from DB or Magento System');\n self.emitter.emit('config', theMageConfig);\n } else {\n self.emitter.emit('error', 'Unable to initialise XMLConnect config from DB or Magento System');\n }\n\n }\n}", "function boot() {\n var locale = getBootLocale();\n var region = getBootRegion(locale);\n invalidateBootstapCache();\n if (!Util.isOnline()) {\n Log.warn(\"No network connection detected.\");\n return bootHardcoded();\n }\n var urls = getBootSequence(region);\n return runBootSequence(urls);\n}", "didMount() {\n }", "function preBootstrap() {\n setTimeout(bootstrap, 200);\n}", "function bootstrap() {\n _deck = new Deck();\n window.Decss = _deck;\n _deck.init();\n }", "function main() {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_platform_browser_dynamic__[\"platformBrowserDynamic\"])()\n .bootstrapModule(__WEBPACK_IMPORTED_MODULE_3__app__[\"a\" /* AppModule */]).then(function(MODULE_REF) {\n if (false) {\n module[\"hot\"][\"accept\"]();\n \n if (MODULE_REF.instance[\"hmrOnInit\"]) {\n module[\"hot\"][\"data\"] && MODULE_REF.instance[\"hmrOnInit\"](module[\"hot\"][\"data\"]);\n }\n if (MODULE_REF.instance[\"hmrOnStatus\"]) {\n module[\"hot\"][\"apply\"](function(status) {\n MODULE_REF.instance[\"hmrOnStatus\"](status);\n });\n }\n if (MODULE_REF.instance[\"hmrOnCheck\"]) {\n module[\"hot\"][\"check\"](function(err, outdatedModules) {\n MODULE_REF.instance[\"hmrOnCheck\"](err, outdatedModules);\n });\n }\n if (MODULE_REF.instance[\"hmrOnDecline\"]) {\n module[\"hot\"][\"decline\"](function(dependencies) {\n MODULE_REF.instance[\"hmrOnDecline\"](dependencies);\n });\n }\n module[\"hot\"][\"dispose\"](function(store) {\n MODULE_REF.instance[\"hmrOnDestroy\"] && MODULE_REF.instance[\"hmrOnDestroy\"](store);\n MODULE_REF.destroy();\n MODULE_REF.instance[\"hmrAfterDestroy\"] && MODULE_REF.instance[\"hmrAfterDestroy\"](store);\n });\n }\n return MODULE_REF;\n})\n .then(__WEBPACK_IMPORTED_MODULE_1__app_environment__[\"a\" /* decorateModuleRef */])\n .catch(function (err) { return console.error(err); });\n}", "ready() {\n this.vm = new Vue({\n el: 'body',\n components: {\n rootvue: require('./vue'),\n },\n });\n }", "constructor() {\n this.config = {\n path: {\n version: {\n manifest: \"public/mix-manifest.json\",\n build: \"public/build/\"\n },\n dist: {\n images: \"public/images\",\n styles: \"public/css/\",\n scripts: \"public/js/\",\n fonts: \"public/fonts/\"\n },\n assets: {\n images: \"resources/assets/images/\",\n styles: \"resources/assets/sass/\",\n scripts: \"resources/assets/js/\",\n fonts: \"resources/assets/public/fonts/\"\n }\n },\n files: {\n styles: \"styles.json\",\n scripts: \"scripts.json\",\n assets: \"assets.json\"\n },\n other: {\n DISABLE_NOTIFIER: false,\n RegExp: null,\n chmod: \"off\"\n },\n alias: {},\n fakeTask: {\n filesIn: \"node_modules/laravel-mix-api/src/successfully-completed-task.js\",\n fileOut: \"../node_modules/laravel-mix-api/src/successfully-completed.js\",\n chmod: 666\n }\n };\n }", "componenetWillMount() { }", "start() {\n // Add your logic here to be invoked when the application is started\n }", "function render ({ appContent, loading }) {\n /*\n packages for vue\n */\n // if (!app) {\n // window.onload = function () {\n // app = new Vue({\n // el: '#container',\n // // render: h => h(Framework),\n // components: { Framework },\n // data: {\n // content: appContent,\n // loading\n // },\n // mounted () { console.log(this.content, 8) },\n // render (h) {\n // return h(Framework, {\n // props: {\n // content: this.content,\n // loading: this.loading,\n // },\n // });\n // },\n // });\n // }\n // } else {\n // app.content = appContent;\n // app.loading = loading;\n // }\n\n const container = document.getElementById('container');\n ReactDOM.render(<Framework loading={loading} content={appContent} />, container);\n}", "function boot(err, cesData, wageData) {\n if (cesData)\n window.originalCesData = cesData;\n if (wageData)\n window.originalWageData = wageData;\n processCesData();\n addFilterDropShadow();\n// renderTable(); //not needed\n renderGraphic();\n// renderSparkline(); //not needed\n bindEvents(); //TODO\n// startFixie(); //not needed\n transitionBetween(true); //TODO\n// toggleKey(); //not needed\n renderKey(); //not needed\n// cloneToStaticSpots(); //not needed\n}", "chainWebpack (config, isServer) {\n if (isServer) {\n config\n .entry('app')\n .clear()\n .add(path.resolve(__dirname, 'lib/webpack/serverEntry.js'))\n } else {\n config\n .entry('app')\n .clear()\n .add(path.resolve(__dirname, 'lib/webpack/clientEntry.js'))\n }\n }", "willMount() {\n }", "function scripts(done) {\n gulp.src(path.src.js)\n .pipe(babel({\n presets: ['@babel/preset-env']\n }))\n .pipe(plumber())\n .pipe(webpackstream(webpackconfig, webpack))\n // folder only, filename is specified in webpack config\n .pipe(gulp.dest(path.build.js))\n .pipe(browsersync.stream());\n done();\n}", "_boot(){\r\n\t\tvar core = this;\r\n\t\tif(core._app_conf._template_dir != -1){\r\n\t\t\t\tcore._app_initialized = true;\r\n\t\t} else {\r\n\t\t\t\tcore._rest(\"POST\", core._app_conf._api_url, [[\"api\", \"template_get_dir\"]], core._app_conf, \"_template_dir\");\r\n\r\n\t\t\t// Wait until all the config variables are all retrieved\r\n\t\t\tvar _tmpVarCheck = setInterval(function(){\r\n\r\n\t\t\t\tif(core._app_verbose) console.log(\"Initializing application...\");\r\n\t\t\t\tif(core._app_conf._template_dir != -1){\r\n\t\t\t\t\tcore._app_initialized = true;\r\n\t\t\t\t\tclearInterval(_tmpVarCheck);\r\n\t\t\t\t}\r\n\t\t\t}, 1);\r\n\t\t}\r\n\t}", "function mount(component) {\n app.use(require(\"./lib/\" + component));\n}", "_bootstrap() {\n global.Console.log(global.Console.color('Gorgon Server' + ' v' + this.GorgonConfig.data.version, 'green'));\n global.Console.log('Author: Ryan Rentfro <rrentfro at gmail dot com>');\n global.Console.log('Project: https://github.com/manufacturing-industry/gorgon');\n this._motd();\n global.Console.log('Press ' + global.Console.color('cntrl+c', 'yellow') + ' to exit the server');\n global.Version = this.GorgonConfig.data.version;\n }", "static activate() {\n \n }", "async function core() {\n const bundle = await rollup({\n input: 'src/index.js',\n plugins: [\n nodeResolve(), // tells Rollup how to find date-fns in node_modules\n commonjs(), // converts date-fns to ES modules\n // postcss({\n // \tplugins: [],\n // \textract: true,\n // \t// minimize: isProductionEnv,\n // }),\n production && terser(), // minify, but only in production\n babel(babelConfig)\n ],\n });\n\n bundle.write({\n file: 'dist/luckysheet.umd.js',\n format: 'umd',\n name: 'luckysheet',\n sourcemap: true,\n inlineDynamicImports:true,\n\n });\n\n if(production){\n bundle.write({\n file: 'dist/luckysheet.esm.js',\n format: 'esm',\n name: 'luckysheet',\n sourcemap: true,\n inlineDynamicImports:true,\n });\n }\n\n}", "bootstrap() {\n this._initHelmet();\n this._initCompress();\n this._initCookieParser();\n this._initCors();\n this._initJsonParser();\n this._initMethodOverride();\n\n return this;\n }", "postInitialize() {\n // Take component initialize asynchronously to take care\n // about constructor of extending component class\n setTimeout(() => {this.initialize()}, 1);\n }", "boot() {\n\t\tthis.defineBasicPolicies();\n\t\tthis.loadCommands([\n\t\t\tMakePolicyCommand\n\t\t]);\n\t}", "function webpack(cb, watch=false) {\n const cmd = path.join(__dirname, './node_modules/.bin/', 'webpack');\n const params = ['--color'];\n if (watch) {\n params.push('--watch');\n }\n\n // Spawn process\n const webpackProcess = spawn(cmd, params, { cwd: __dirname });\n\n // Callback can only be called once.\n // Make it a no-op when it's been called.\n function callback(){\n cb();\n callback = ()=>{};\n }\n\n // Respond to stream events\n webpackProcess.stdout.on('data', (data) => {\n data = data.toString();\n console.log(data);\n\n // Initial pass of packing done when it outputs time\n if (watch && data.includes('Time:')) {\n callback();\n }\n });\n webpackProcess.stderr.on('data', (data) => {\n const err = data.toString();\n console.log(err);\n notify.onError({\n title: \"Error building JS\",\n message: \"<%= err.message %>\"\n });\n });\n webpackProcess.on('close', () => {\n callback();\n });\n}", "function webpackJS() {\n return gulp\n .src('./packages/nhsuk.js')\n .pipe(\n webpack({\n mode: 'production',\n module: {\n rules: [\n {\n use: {\n loader: 'babel-loader',\n options: {\n presets: ['@babel/preset-env']\n }\n }\n }\n ]\n },\n output: {\n filename: 'nhsuk.js'\n },\n target: 'web'\n })\n )\n .pipe(gulp.dest('./dist'))\n}", "componentDidMount() {\n\n console.log(\"componentDidMount()\");\n\n window.readyForStuff = this.readyForStuff.bind(this);\n\n }", "componentDidMount() {\n\t\tthis.props.showAppMount && console.log('APP DID MOUNT');\n\t\tthis.displayBodyText();\n\t\tthis.getScripts();\n\t\t// this.getTitle();\n\t}", "async function start() {\n await new Promise((resolve) => {\n // Patch the client-side bundle configurations\n // to enable Hot Module Replacement (HMR) and React Transform\n webpackConfig[0].entry.index = [\n 'react-hot-loader/patch',\n `webpack-dev-server/client?http://localhost:${config.apps.frontend.api_port}/`, // WebpackDevServer host and port\n 'webpack/hot/only-dev-server', // \"only\" prevents reload on syntax errors\n ...webpackConfig[0].entry.index,\n ];\n\n webpackConfig[0].plugins = [\n new webpack.HotModuleReplacementPlugin(),\n new webpack.NoEmitOnErrorsPlugin(),\n\n new BrowserSyncPlugin(\n // BrowserSync options\n {\n // browse to http://localhost:3000/ during development\n open: false,\n // proxy the Webpack Dev Server endpoint\n // (which should be serving on http://localhost:3100/)\n // through BrowserSync\n proxy: {\n target: `localhost:${config.apps.frontend.api_port}`,\n },\n ghostMode: false,\n },\n // plugin options\n {\n // prevent BrowserSync from reloading the page\n // and let Webpack Dev Server take care of this\n reload: false,\n callback: () => console.log('Finished proxifying...'),\n },\n ),\n ...webpackConfig[0].plugins,\n ];\n\n const compiler = webpack(webpackConfig[0]);\n\n // First we fire up Webpack an pass in the configuration we\n // created\n let bundleStart = null;\n // We give notice in the terminal when it starts bundling and\n // set the time it started\n compiler.plugin('compile', () => {\n console.log('Bundling...');\n bundleStart = Date.now();\n });\n // We also give notice when it is done compiling, including the\n // time it took. Nice to have\n compiler.plugin('done', () => {\n console.log(`Bundled in ${(Date.now() - bundleStart)}ms!`);\n resolve();\n });\n\n\n new WebpackDevServer(compiler, {\n publicPath: webpackConfig[0].output.publicPath,\n hot: true,\n watchOptions: {\n aggregateTimeout: 300,\n poll: 1000,\n },\n quiet: false,\n noInfo: false,\n // Pretty colored output\n stats: webpackConfig[0].stats,\n historyApiFallback: webpackConfig[0].devServer.historyApiFallback,\n headers: webpackConfig[0].devServer.headers,\n }).listen(config.apps.frontend.api_port, 'localhost', (err, result) => {\n if (err) {\n return console.log(err);\n }\n console.log(`Listening at http://localhost:${config.apps.frontend.api_port}/`);\n });\n });\n}", "componentDidMount() {\n document.addEventListener('DOMContentLoaded', function() {\n var elems = document.querySelectorAll('.dropdown-button');\n var instances = window.M.Dropdown.init(elems, {});\n }); \n }", "componentDidMount() {\n M.AutoInit();\n }", "function startup() {\n // Set initial UI data for our app and Vue\n // App data will be populated after updateUI is called in onMessage EVENT_BRIDGE_OPEN_MESSAGE \n dynamicData = deepCopy(CONFIG.INITIAL_DYNAMIC_DATA);\n defaultMaterialProperties = {\n shadeless: deepCopy(CONFIG.INITIAL_DYNAMIC_DATA[STRING_MATERIAL].shadeless),\n pbr: deepCopy(CONFIG.INITIAL_DYNAMIC_DATA[STRING_MATERIAL].pbr)\n };\n \n // Create the tablet app\n ui = new AppUi({\n buttonName: CONFIG.BUTTON_NAME,\n home: URL,\n onMessage: onMessage, // UI event listener \n // Icons are located in graphicsDirectory\n // AppUI is looking for icons named with the BUTTON_NAME \"avatar-101\" \n // For example: avatar-101-a.svg for active button icon, avatar-101-i.svg for inactive button icon\n graphicsDirectory: Script.resolvePath(\"./resources/icons/\"), \n onOpened: onOpened,\n onClosed: onClosed\n });\n\n // Connect unload function to the script ending\n Script.scriptEnding.connect(unload);\n // Connect function callback to model url changed signal\n MyAvatar.skeletonModelURLChanged.connect(onAvatarModelURLChanged);\n }", "startServer() {\n require(path.resolve(this.libRoot, \"src/server/webpack-start.js\"));\n }", "init() {\n this._super(...arguments);\n this.set('dependencies', {\n services: [\n 'themeChanger'\n ]\n });\n }", "static define() {\n Akili.component('component', Component);\n }", "componentDidMount() {\n // console.log(\"currentUserContainer Mounted\")\n this.init()\n }", "initializing() {\n // Have Yeoman greet the user.\n this.log(chalk.bold.green(`JHipster db-helper generator v${packagejs.version}`));\n\n // note : before this line we can't use jhipsterVar or jhipsterFunc\n this.composeWith('jhipster:modules',\n { jhipsterVar, jhipsterFunc },\n this.options.testmode ? { local: require.resolve('generator-jhipster/generators/modules') } : null\n );\n }", "componentDidMount () {\n this.init();\n }", "componentDidMount () {\n this.init();\n }", "componentDidMount () {\n this.init();\n }", "start() {\r\n // Add your logic here to be invoked when the application is started\r\n }" ]
[ "0.6334365", "0.59990925", "0.5923069", "0.58922476", "0.58356553", "0.58034647", "0.5646825", "0.5618756", "0.5604551", "0.54944116", "0.54641694", "0.54373395", "0.5397692", "0.5389931", "0.53733677", "0.53467876", "0.53372073", "0.53238165", "0.5284397", "0.5238695", "0.52229416", "0.5201879", "0.5158688", "0.5154509", "0.51407427", "0.510495", "0.5097075", "0.50864077", "0.5078643", "0.5059949", "0.5057506", "0.5053799", "0.5041049", "0.5018654", "0.5011598", "0.4974963", "0.49712557", "0.49610978", "0.4938601", "0.49374643", "0.49323356", "0.4903732", "0.49028024", "0.49011227", "0.489304", "0.4884871", "0.4883062", "0.48804587", "0.48731726", "0.48387194", "0.48382792", "0.48334393", "0.48057896", "0.48046952", "0.48025024", "0.48023784", "0.47990847", "0.4798285", "0.4795214", "0.47937295", "0.47909424", "0.47855687", "0.47847316", "0.47677347", "0.47638097", "0.47620684", "0.47586396", "0.47547728", "0.4751014", "0.47368422", "0.47336975", "0.473065", "0.4724902", "0.47112143", "0.47087282", "0.47053546", "0.47032714", "0.47012374", "0.46982276", "0.46781436", "0.4677216", "0.4672015", "0.46632728", "0.46578866", "0.46391776", "0.46331552", "0.4632484", "0.46314195", "0.462823", "0.46217242", "0.4620713", "0.4618163", "0.46129733", "0.46080288", "0.45950687", "0.45899248", "0.45887253", "0.45887253", "0.45887253", "0.45823276" ]
0.6398949
0
Split all rows into group and then add delay in between each group
function processAll(rows, callback) { var groups = [], i = 0, len = rows.length; while (rows.length > 0) { groups.push({ id: i, rows: rows.splice(0, NUM_ROWS_IN_GROUP) }); i += 1; } pconsole.log('Processing ' + len + ' rows in ' + groups.length + ' groups'); async.eachSeries(groups, function (group, cb) { processRowGroup(group, function (err, queries) { if (err) throw err; conn.execTransaction(queries).then(function () { pconsole.inline(' ... Done'); setTimeout(function () { cb(); }, DELAY); }, function (err) { cb(err); }); }); }, function (err) { if (err) throw err; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function insertTimelineGroupBasedOnTimeStamp(group, items){\n\t\t\tfor (var i = 0; i < items.length; i++) {\n\t\t\t\tif(group.timeStamp > items[i].timeStamp){\n\t\t\t\t\t// Insert above current position in items\n\t\t\t\t\titems.splice(i, 0, group);\n\t\t\t\t\treturn;\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\t// Add to the end\n\t\t\titems.push(group);\n\t\t}", "function linearSequence(groups) {\n groups.forEach((group) => {\n if (group.length) {\n const groupWrap = gsap.utils.wrap(group);\n const colorWrap = gsap.utils.wrap(0, 360);\n let groupIndex = 1;\n const groupFunction = () => {\n const currentIndex = groupIndex;\n const randomDuration = Utils.getRandomFloat(0.05, 0.1);\n groupIndex += 1;\n gsap.to(groupWrap(currentIndex - 1), {\n fill: '#000000',\n duration: randomDuration * (group.length / 1.5),\n ease: 'linear',\n });\n gsap.to(groupWrap(currentIndex), {\n fill: () => Utils.getRandomColor({ hue: colorWrap(groupIndex * 4) }),\n duration: randomDuration,\n ease: 'linear',\n onComplete: groupFunction,\n });\n };\n // Start it running.\n groupFunction();\n }\n });\n}", "function insertDelayInfo(data) {\n Object.keys(data).map(function(order_id) {\n $('.delay_td_' + order_id).text('' + Math.max(0, data[order_id] / 60) + ' mins');\n });\n }", "function groupPerformance(row){\n const groupHeader=['timestamp','php_duration','CacheDate','CacheAge','supercache','cloudflare','uid','domain','url','Network','Interactive','Total','Server','Browser1','Browser2','duration','gaClientID','queryCount','errorCount'];\n\n\tinput_header=Object.keys(row);\t//these are input headers, not output headers!!\n\n\tlet output = {};\n\tlet lastgroup='';\n\tlet total=0;\n\tlet interactive=0;\n\n\tfor(key of input_header){\n\t group='';\n\t group_interactive=false;\n\t group_total=false;\n\t switch(key){\n\t\tcase \"fetchStart\":\n\t\tcase \"domainLookupStart\":\n\t\tcase \"domainLookupEnd\":\n\t\tcase \"connectStart\":\n\t\tcase \"secureConnectionStart\":\n\t\tcase \"connectEnd\":\n\t\t group='Network';\n group_interactive=true;\n group_total=true;\n\t\tbreak;\n\n\t\tcase \"requestStart\":\n\t\tcase \"responseStart\":\n\t\tcase \"responseEnd\":\n\t\t group='Server'; // Time to download from server, basically.\n group_interactive=true;\n group_total=true;\n\t\tbreak;\n\n\t\tcase \"domLoading\":\n\t\tcase \"domInteractive\":\n\t\t group='Browser1';\n group_interactive=true;\n group_total=true;\n\t\tbreak;\n\n\t\tcase \"domContentLoadedEventStart\":\n\t\tcase \"domContentLoadedEventEnd\":\n\t\tcase \"loadEventStart\":\n\t\tcase \"loadEventEnd\":\n\t\tcase \"domComplete\":\n\t\t group='Browser2';\n group_total=true;\n\t\tbreak;\n\t\tcase \"navigationStart\":\n\t\tcase \"unloadEventStart\":\n\t\tcase \"unloadEventEnd\":\n\t\tcase \"redirectStart\":\n\t\tcase \"redirectEnd\":\n\t\t group='ignore';\n\t\tbreak;\n\t\tdefault:\n\t\t group='';\n\n\t }//switch\n\n // Non-Timing key. @context: domain,url,uid, etc\n if(group==''){\n output[key]=row[key];\n }\n\n //Default Timing: Sum to the Group\n if(group!=='' && group!=='ignore'){\n if(typeof output[group] =='undefined') output[group]=0;\n output[group]+=parseInt(row[key]);\n }\n\n //Extra: Add up Time-toInteractive/Total\n if(group_interactive){\n if(typeof output[\"Interactive\"] =='undefined') output[\"Interactive\"]=0;\n output[\"Interactive\"] += parseInt(row[key]);\n }\n if(group_total){\n if(typeof output[\"Total\"] =='undefined') output[\"Total\"]=0;\n output[\"Total\"]+= parseInt(row[key]);\n }\n\n }//fe\n\n return output;\n\n} // fx", "function delayArrIteration(arr, delay) {\n\t\t// need to add time after first time run to allow for fadeaway on next array iteration\n\t\tvar delay = firstTime ? delay : delay + 6000\n\t\tfirstTime = false;\n\t\tarrTimeoutId = setTimeout(iterateArr, delay, arr);\n\t\t// setTimeout(codeContainerChildrenFade, delay + 500);\n\t\tvar addToDelay = (arr.length - 1) * intervalTime;\n\t\tvar delayTime = delay + addToDelay;\n\t\tlastDelay = addToDelay;\n\t\treturn delayTime;\n\t}", "function transitionSplit(d, i) {\n d3.select(this)\n .transition().duration(1000)\n .attrTween(\"d\", tweenArc({\n innerRadius: i & 1 ? innerRadius : (innerRadius + outerRadius) / 2,\n outerRadius: i & 1 ? (innerRadius + outerRadius) / 2 : outerRadius\n }))\n .each(\"end\", transitionRotate);\n }", "function animateGrouping(group) {\n //Calculate the total change that needs to occur, even though we'll only move a small step size towards the hotspot every time.\n var deltaX = group.obj2x - group.obj1x;\n var deltaY = group.obj2y - group.obj1y;\n \n //Check to see whether there is more animation to be done (assume that deltaX and deltaY will both be 0 if no more animation needs to occur.\n if((deltaX != 0) || (deltaY != 0)) {\n //used for the specific change that occurs on this animation turn.\n var changeX = 0;\n var changeY = 0;\n \n //Check to see if delta change is greater than the step size (currently 5 pixels), and whether it's positive or negative.\n //Use this information to determine how much to move on this turn.\n if(deltaX < -STEP)\n changeX = -STEP;\n else if(deltaX < 0)\n changeX = deltaX;\n else if(deltaX > STEP)\n changeX = STEP;\n else if(deltaX > 0)\n changeX = deltaX;\n \n if(deltaY < -STEP)\n changeY = -STEP;\n else if(deltaY < 0)\n changeY = deltaY;\n else if(deltaY > STEP)\n changeY = STEP;\n else if(deltaY > 0)\n changeY = deltaY;\n \n //Update the x,y coordinates of the connection point for obj1 based on the new location.\n //Why is it that if these two lines of code get commented out with the added nested for loop in the move function\n //the code freezes?\n group.obj1x = group.obj1x + changeX;\n group.obj1y = group.obj1y + changeY;\n \n //Move the object using the move function so that all other objects it's already connected to are moved with it.\n move(group.obj1, group.obj1.offsetLeft + changeX, group.obj1.offsetTop + changeY, false);\n \n //Call the function again after a 200 ms delay. TODO: Figure out why the delay isn't working.\n setTimeout(animateGrouping(group), 5000);\n }\n}", "applyDelay() {\n for(var i=0; i<this.sections.length; i++) {\n this.sections[i].setDelay(this.startDelay);\n }\n }", "sliceGroup( group, start, end ) {\n var newGroup = new BABYLON.AnimationGroup(group.name+\":\"+start+\"-\"+end);\n for ( var i = 0; i < group.targetedAnimations.length; i++ ) {\n var slice = this.sliceAnimation( group.targetedAnimations[i].animation, start, end );\n if ( slice.getKeys().length > 0 ) {\n newGroup.addTargetedAnimation( slice, group.targetedAnimations[i].target );\n }\n }\n return newGroup;\n }", "static reduceConsecutiveSameStyleBlocksToOne(groups) {\n var newLineOp = DeltaInsertOp.createNewLineOp();\n return groups.map(function (elm) {\n if (!Array.isArray(elm)) {\n if (elm instanceof BlockGroup && !elm.ops.length) {\n elm.ops.push(newLineOp);\n }\n return elm;\n }\n var groupsLastInd = elm.length - 1;\n elm[0].ops = flatten(elm.map((g, i) => {\n if (!g.ops.length) {\n return [newLineOp];\n }\n return g.ops.concat(i < groupsLastInd ? [newLineOp] : []);\n }));\n return elm[0];\n });\n }", "function move_movegroup(move_group, placement, trigger_start, spacing, gp_layer) {\n str += `1,901,2,${trigger_start.toFixed(3)},3,${get_trigger_y(Math.round(trigger_start / 30))},51,${move_group},28,${(\n (200 + 15 * scale + 30 * scale * gp_layer) *\n (placement == 0 || placement == 3 ? 1 : -1)\n ).toFixed(3)},30,${placement == 1 || placement == 3 ? 14 : 15},10,${5.25 / 2};`\n\n str += `1,901,2,${(trigger_start + time_to_units(5.25 / 2)).toFixed(3)},3,${get_trigger_y(\n Math.round(trigger_start / 30)\n )},51,${move_group},28,${\n //move back\n (-(200 + 15 * scale + 30 * scale * gp_layer) * (placement == 0 || placement == 3 ? 1 : -1) - spacing).toFixed(3)\n },10,0;`\n\n obj_count += 2\n}", "function separate_one_by_one(){\nvar left = 0;\nvar card_width = $('.card').width();\nvar card_height = $('.card').height();\n//initial top margin for card placement\nvar top = card_height;\n//initial left margin for card placement\nvar left_step = card_width + card_spacing;\n\t\n\t//time lag between each card placement\n\tvar sec_step = 100;\n\tvar time = 0;\n\n\t//loop through all cards\n\t$('.card').each(function(){\n\t\tvar card = $(this);\n\t\tsetTimeout(function(){\n\t\t\tcard.css({\n\t\t\t\t'margin-top':top+'px',\n\t\t\t\t'margin-left':left+'px',\n\t\t\t});\n\n\t\t\tleft = left + left_step;\n\t\t\t//if card cannot fit in current row then place it card in next row\n\t\t\tif(left+card_width + card_spacing > card_container_width)\n\t\t\t{\n\t\t\t\tleft = 0;\n\t\t\t\ttop += card_height + card_spacing;\n\t\t\t}\n\t\t},time);\n\t\t//add time lag for next card placement\n\t\ttime += sec_step;\n\t});\n}", "fillBeats() {\n let prevBeat, nextBeat, currentInterval, beats;\n prevBeat = 0;\n if (this.events.length > 2) {\n prevBeat = this.events[0];\n }\n\n for (let i = 0; i < this.events.length; i++) {\n nextBeat = this.events[i];\n beats = Math.round((nextBeat - prevBeat) / this.beatInterval - 0.01);\n currentInterval = (nextBeat - prevBeat) / beats;\n let k = 0;\n for (; beats > 1; beats--) {\n prevBeat += currentInterval;\n this.events.splice(i + k, 0, prevBeat);\n k++;\n }\n prevBeat = nextBeat;\n }\n }", "getGroupAfterSurface (startGroup, duration) {\n let lineIndex = this.RDP1b.lineHeaders.indexOf(startGroup);\n let colIndex = ArrayUtil.getIndexMaxFit(duration, this.RDP1b.getLine(lineIndex));\n //< min => return startGroup: built-in\n //> max => return group 0: manual\n if (colIndex == undefined) { colIndex = 0; }\n \n return this.RDP1b.colHeaders[colIndex];\n }", "async throttle(pinCodesArr) {\n let counter = 0;\n const batch = 60;\n const self = this;\n return async function () {\n return new Promise((resolve, reject) => {\n const interval = setInterval(async () => {\n await self.requestBatch(pinCodesArr.slice(counter, counter + batch));\n counter += batch;\n if (counter >= pinCodesArr.length) {\n clearInterval(interval);\n // console.log(\"clearing interval\");\n resolve(self.finalCsvRows);\n } else console.log(\"sleeping for 1 secs\");\n }, 1000);\n });\n };\n }", "function parseGroupedInterval(){\n var options = Array.prototype.slice.call(arguments);\n return function(res){\n var dataset = new Dataset();\n each(res.result, function(record, i){\n var index = options[0] && options[0] === 'timeframe.end' ? record.timeframe.end : record.timeframe.start;\n if (record.value.length) {\n each(record.value, function(group, j){\n var label;\n each(group, function(value, key){\n if (key !== 'result') {\n label = key;\n }\n });\n dataset.set([ String(group[label]) || '', index ], group.result);\n });\n }\n else {\n dataset.appendRow(index);\n }\n });\n dataset.data.input = res;\n dataset.parser = {\n name: 'grouped-interval',\n options: options\n };\n return dataset;\n }\n}", "function toggleGroup($ele) {\r\n\tvar $parent = $ele.closest(\"[data-transition='parent']\");\r\n\tvar transClass = $ele.attr(\"data-transition\");\r\n\tvar removeClass = $ele.attr(\"data-remove\").split(\"|\");\r\n\tfor(index in removeClass) {\r\n\t\t$parent.removeClass(removeClass[index]);\r\n\t}\r\n\tsetTimeout(function(){ $parent.addClass(transClass); },0);\r\n}", "group( state, pattern, phase, duration, overrideIncr=null ) {\n const start = phase.clone(),\n end = start.add( duration ),\n phaseIncr = overrideIncr === null \n ? getPhaseIncr( pattern ) \n : overrideIncr\n \n let eventList = []\n\n //console.log( \n // 'type:', pattern.type, \n // 'phase:', phase.toFraction(),\n // 'incr:', phaseIncr.toFraction(),\n // 'dur:', duration.toFraction()\n //)\n \n while( phase.compare( end ) < 0 ) {\n // if pattern is a list, read using current phase, else read directly\n const member = Array.isArray( pattern.values ) === true \n ? pattern.values[ getIndex( pattern, phase ) ] \n : pattern.value\n\n // get duration of current event being processed\n const dur = calculateDuration( phase, phaseIncr, end )\n\n // if value is not a numeric or string constant (if it's a pattern)...\n if( member === undefined || (isNaN( member.value ) && typeof member.value !== 'string') ) {\n // query the pattern and remap time values appropriately \n if( member !== undefined ) member.parent = pattern\n //console.log( 'processing ', pattern.type, member.type, dur.toFraction(), phaseIncr.toFraction() )\n const events = processPattern( \n member, \n Fraction(1), \n //member.type !== 'slow' ? Fraction(0) : phase.clone(), \n Fraction(0),\n null, //getPhaseIncr(member),\n null, \n false//shouldRemap( member )\n )\n .map( evt => {\n evt.arc.start = evt.arc.start.mul( dur ).add( phase )\n evt.arc.end = evt.arc.end.mul( dur ).add( phase )\n return evt\n })\n\n eventList = eventList.concat( events )\n }else{\n // XXX shouldn't we just process all patterns???\n // member does not need further processing, so add to event list\n const evt = { \n value:member.value, \n arc:Arc( phase, phase.add( dur ) ),\n }\n if( member.uid !== undefined ) evt.uid = member.uid \n\n eventList.push( evt )\n }\n\n // assuming we are starting / ending at a regular phase increment value...\n \n if( phase.mod( phaseIncr ).valueOf() === 0 ) {\n phase = advancePhase( phase, phaseIncr, end )\n }else{\n // advance phase to next phase increment\n phase = phase.add( phaseIncr.sub( phase.mod( phaseIncr ) ) ) \n }\n }\n\n // prune any events that fall before our start phase or after our end phase\n eventList = eventList.filter( evt => {\n return evt.arc.start.valueOf() >= start.valueOf() && evt.arc.start.valueOf() < end.valueOf()\n })\n \n return state.concat( eventList )\n }", "function attachProducts() {\n //3 each column (totally 3) has the same numbers of shuffled items\n columns.forEach(async (column, index) => {\n //2 shuffle 3 times, different order of products in one column\n onlyProducts = shuffleProducts(onlyProducts);\n const productList = column.querySelector('.product-details');\n if (productList.childNodes.length >= 1) {\n productList.innerHTML = '';\n for (let i = 0; i < onlyProducts.length; i++) {\n let node = document.createElement('div');\n node.classList.add('single-product');\n node.setAttribute('id', i + 1);\n node.innerHTML = onlyProducts[i].innerHTML;\n const clnItem = node.cloneNode(true);\n //append array products into parent div\n productList.appendChild(clnItem);\n }\n }\n //introduce a bit delay to each column's transform;\n await sleep(index);\n productList.style.transform = `translateY(-${column.clientHeight * (onlyProducts.length - 1)}px)`;\n let transitionEndEventName = getTransitionEndEventName();\n //Add the end of transform,do spinning\n productList.addEventListener(transitionEndEventName, function () {\n justSpin(2);\n })\n })\n}", "function iterateArr(arr) {\n\n\t\tarrItemTimeoutIds = [];\n\t\tvar currTimeoutId = 0;\n\n\t\tarr.forEach(function(v, i, a) {\n\t\t\tcurrTimeoutId = setTimeout(function(value, index, arr) {\n\t\t\t\treturn function() {\n\t\t\t\t\tparseArrayItems(value, index, arr)\n\t\t\t\t}\n\t\t\t}(v, i, a), (i * intervalTime));\n\t\t\tarrItemTimeoutIds.push(currTimeoutId);\n\t\t});\n\t\tconsole.log(arrItemTimeoutIds);\n\t}", "glitchShiftLine(duration=1, rows=6) {\n const rangeH = this.img.height;\n\n for (let i = 0; i < rows; i++) {\n const yMin = floor(random(0, rangeH));\n const yMax = yMin + floor(random(1, rangeH - yMin));\n const xOffset = this.channelLen * floor(random(-40, 40));\n const config = { yMin, yMax, xOffset };\n\n this.shiftLineImg = this.shiftLine(config);\n ImgUtil.copyPixels(this.shiftLineImg, this.img);\n }\n\n this.holdShiftLine = true;\n\n setTimeout(() => this.holdShiftLine = false, duration);\n }", "function reduce_layer_group_by_time(visible, group_layer, mark_list, whole_list, mark_data, new_date, new_time, start_check) {\n map.removeLayer(group_layer);\n var timestamp, cur_timestamp;\n var j=0;\n if (visible) {\n for (var i=0; i<whole_list.length; i++) {\n if (new_date != null && new_time == null) {\n timestamp = new_date.getTime();\n cur_timestamp = mark_data[i]['date'].getTime();\n } else if (new_date == null && new_time != null){\n timestamp = new_time.getTime();\n cur_timestamp = mark_data[i]['time'].getTime();\n } else if (new_date != null && new_time != null) {\n timestamp = new_date.getTime() + new_time.getTime();\n cur_timestamp = mark_data[i]['date'].getTime() + mark_data[i]['time'].getTime();\n }\n j += check_timestamp_valid(mark_list, j, whole_list, i, cur_timestamp, timestamp, start_check);\n }\n }\n console.log(mark_list.length);\n group_layer = L.layerGroup(mark_list);\n map.addLayer(group_layer);\n return group_layer;\n}", "function doChunk(){\n\t\tvar time=+new Date(),i,len=$tds.length,$td,stringdata,arr,data,chart;\n\t\tfor(i=0; i < len; i += 1){\n\t\t\t$td=$($tds[i]);\n\t\t\tstringdata=$td.data('sparkline');\n\t\t\tarr=stringdata.split('; ');\n\t\t\tdata=$.map(arr[0].split(', '),parseFloat);\n\t\t\tchart={};\n\t\t\tif(arr[1]){chart.type=arr[1];}\n\t\t\t$td.highcharts('SparkLine',{\n\t\t\t\tseries:[{\n\t\t\t\t\tdata:data,\n\t\t\t\t\tpointStart:1\n\t\t\t\t}],\n\t\t\t\ttooltip:{\n\t\t\t\t\theaderFormat:'<span style=\"font-size:10px\">' + $td.parent().find('th').html() + ':</span><br/>',\n\t\t\t\t\tpointFormat:'<b>{point.y}</b>'\n\t\t\t\t},\n\t\t\t\tchart:chart\n\t\t\t});\n\t\t\tn += 1;\n\t\t\t// If the process takes too much time, run a timeout to allow interaction with the browser\n\t\t\tif (new Date() - time > 500){\n\t\t\t\t$tds.splice(0,i + 1);\n\t\t\t\tsetTimeout(doChunk,0);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// Print a feedback on the performance\n\t\t\tif (n === fullLen){\n\t\t\t\t$('#result').html('Generated ' + fullLen + ' sparklines in ' + (new Date() - start) + ' ms');\n\t\t\t}\n\t\t}\n\t}", "async function insertionSort() {\n if (delay && typeof delay !== \"number\") {\n alert(\"sort: First argument must be a typeof Number\");\n return;\n }\n \n blocks = htmlElementToArray(\".block\");\n\n for (let i = 1; i < blocks.length; i += 1) {\n let valueToInsert = getValue(blocks[i]);\n let j=i-1;\n while (j >= 0 && getValue(blocks[j]) > valueToInsert) {\n\n blocks[j].style.backgroundColor = bar_colours.selectedColour;\n blocks[j + 1].style.backgroundColor = bar_colours.selectedColour2;\n\n blocks = await swap(blocks, j, j+1);\n\n await new Promise(resolve =>\n setTimeout(() => {\n resolve();\n }, delay)\n );\n\n blocks[j].style.backgroundColor = bar_colours.initColour;\n blocks[j + 1].style.backgroundColor = bar_colours.initColour;\n\n j -= 1;\n }\n }\n\n blocks.forEach((item, index) => {\n blocks[index].style.transition = \"background-color 0.7s\";\n blocks[index].style.backgroundColor = bar_colours.doneColour;\n })\n}", "async round() {\n // Randomize groups\n this._make_groups();\n // Flash and wait\n this.io.event('round_begins', {groups: this.groups});\n for (let group of this.groups) {\n if (this._interrupt()) break;\n await this.flash(group, this._rand_range(\n this.options.durations.flash.expectation,\n this.options.durations.flash.min,\n this.options.durations.flash.max\n ));\n await sleep(this._rand_range(\n this.options.durations.inter_flash.expectation,\n this.options.durations.inter_flash.min,\n this.options.durations.inter_flash.max\n ));\n }\n this.io.event('round_ends');\n }", "function sortFinshAnimate(){\n for(var i = 0;i<arrayBlock.length;i++){\n arrayBlock.children[i].classList = ['sorted-element']\n }\n var counter = 0;\n var timer = setInterval(()=>{\n for(var i =0 ;i<arr.length;i++){ \n toggleCurrentArrayElementClass(i)\n }\n counter++;\n if(counter ===5){\n clearInterval(timer)\n }\n },500)\n // unfreeze button once sorting is completed\n toggleFreeze(false)\n}", "AdjustBreakTime(i) {\n console.log(\"adjusting break time\");\n this.BreakTime = this._adjustTime(this.BreakTime,i);\n if (this.mode===\"BREAK\") {\n this._initBreakTimer();\n }\n }", "function delay(els) {\n els.each((i, el) => {\n $(el).addClass(\"delay-\" + (i + 1));\n })\n}", "function doChunk() {\n const time = +new Date(),\n len = tds.length;\n\n for (let i = 0; i < len; i += 1) {\n const td = tds[i];\n const stringdata = td.dataset.sparkline;\n const arr = stringdata.split(\"; \");\n const data = arr[0].split(\", \").map(parseFloat);\n const chart = {};\n\n if (arr[1]) {\n chart.type = arr[1];\n }\n\n Highcharts.SparkLine(td, {\n series: [\n {\n data: data,\n pointStart: 1,\n },\n ],\n tooltip: {\n headerFormat:\n '<span style=\"font-size: 10px\">' +\n td.parentElement.querySelector(\"th\").innerText +\n \", Q{point.x}:</span><br/>\",\n pointFormat: \"<b>{point.y}.000</b> USD\",\n },\n chart: chart,\n });\n\n n += 1;\n\n // If the process takes too much time, run a timeout to allow interaction with the browser\n if (new Date() - time > 500) {\n tds.splice(0, i + 1);\n setTimeout(doChunk, 0);\n break;\n }\n\n // Print a feedback on the performance\n if (n === fullLen) {\n document.getElementById(\"result\").innerHTML =\n \"Generated \" +\n fullLen +\n \" sparklines in \" +\n (new Date() - start) +\n \" ms\";\n }\n }\n }", "function sanitizeGroups() {\n const sanitizedGroups = [];\n noteGroups.forEach(group => {\n let tempGroup = [];\n group.forEach((note, index, group) => {\n const isFirstOrLast = index === 0 || index === group.length - 1;\n const prevNote = group[index - 1];\n\n const breaksOnEachRest = !config.beam_rests && note.isRest();\n const breaksOnFirstOrLastRest = (config.beam_rests &&\n config.beam_middle_only && note.isRest() && isFirstOrLast);\n\n let breakOnStemChange = false;\n if (config.maintain_stem_directions && prevNote &&\n !note.isRest() && !prevNote.isRest()) {\n const prevDirection = prevNote.getStemDirection();\n const currentDirection = note.getStemDirection();\n breakOnStemChange = currentDirection !== prevDirection;\n }\n\n const isUnbeamableDuration = parseInt(note.duration, 10) < 8;\n\n // Determine if the group should be broken at this note\n const shouldBreak = breaksOnEachRest || breaksOnFirstOrLastRest ||\n breakOnStemChange || isUnbeamableDuration;\n\n if (shouldBreak) {\n // Add current group\n if (tempGroup.length > 0) {\n sanitizedGroups.push(tempGroup);\n }\n\n // Start a new group. Include the current note if the group\n // was broken up by stem direction, as that note needs to start\n // the next group of notes\n tempGroup = breakOnStemChange ? [note] : [];\n } else {\n // Add note to group\n tempGroup.push(note);\n }\n });\n\n // If there is a remaining group, add it as well\n if (tempGroup.length > 0) {\n sanitizedGroups.push(tempGroup);\n }\n });\n\n noteGroups = sanitizedGroups;\n }", "function parseGroupedInterval() {\n var options = Array.prototype.slice.call(arguments);\n return function (res) {\n var dataset = new Dataset().type('grouped-interval');\n Object(each[\"a\" /* each */])(res.result, function (record, i) {\n var index = options[0] && options[0] === 'timeframe.end' ? record.timeframe.end : record.timeframe.start;\n if (record.value.length) {\n Object(each[\"a\" /* each */])(record.value, function (group, j) {\n var label;\n Object(each[\"a\" /* each */])(group, function (value, key) {\n if (key !== 'result') {\n label = key;\n }\n });\n dataset.set([String(group[label]), index], group.result);\n });\n } else {\n dataset.appendRow(index);\n }\n });\n return dataset;\n };\n}", "function reduceBreak() {\n setBreakTime(prevTime => prevTime > 1 ? prevTime - 1 : prevTime);\n }", "function parseGroupedInterval() {\n var options = Array.prototype.slice.call(arguments);\n return function (res) {\n var dataset = new Dataset().type('grouped-interval');\n (0, _each.each)(res.result, function (record, i) {\n var index = options[0] && options[0] === 'timeframe.end' ? record.timeframe.end : record.timeframe.start;\n if (record.value.length) {\n (0, _each.each)(record.value, function (group, j) {\n var label;\n (0, _each.each)(group, function (value, key) {\n if (key !== 'result') {\n label = key;\n }\n });\n dataset.set([String(group[label]), index], group.result);\n });\n } else {\n dataset.appendRow(index);\n }\n });\n return dataset;\n };\n}", "function addBreak() {\n setBreakTime(prevTime => prevTime < 15 ? prevTime + 1 : prevTime);\n }", "onStoreGroupingOff() {\n const me = this,\n grid = me.grid,\n curGroupHeaders = DomHelper.children(grid.element, '.b-grid-header.b-group');\n\n for (let header of curGroupHeaders) {\n // IE11 doesnt support this\n //header.classList.remove('b-group', 'b-asc', 'b-desc');\n header.classList.remove('b-group');\n header.classList.remove('b-asc');\n header.classList.remove('b-desc');\n }\n\n grid.refreshRows();\n }", "function chunk(datapoints) {\n var orig = _.initial(datapoints); // drop last\n var shifted = _.rest(datapoints); // drop first\n\n return _.zip(orig, shifted);\n }", "function animateArray() {\n\tgame.simonSequence.forEach(function(element, index, array) {\n\tsetTimeout(function(){\n\t\tselectAnimation('[data-id=\"' + element + '\"]');\n\t}, 500 * index);\n\tsetTimeout(function(){\n\t\tyourTurnIndicator();\n\t}, 600 * game.simonSequence.length);\n});\n}", "function groupEvents() {\n\tvar continueGroupping = true;\n\tthetaGrouped = theta;\n\tvar thetaSorted = theta;\n\t\n\tthetaGrouped.sort(function(a, b)\n\t\t\t{\n\t\t\t return a - b;\t\n\t\t\t});\n\tthetaSorted.sort(function(a, b)\n\t\t\t{\n\t\t\t return a - b;\t\n\t\t\t});\n\tvar i = 0;\n\twhile (continueGroupping) {\n\t\tvar array;\n\t\tif (i == 0) {\n\t\t\tarray = thetaSorted;\n\t\t\ti++;\n\t\t} else {\n\t\t\tarray = thetaGrouped;\n\t\t}\n\t\tfor (i = 0; i < array.length; i++) {\n\t\t\tvar first = i;\n\t\t\tvar second = i + 1;\n\t\t\tif (second == array.length) {\n\t\t\t\tsecond = 0;\n\t\t\t}\n\t\t\tif (Math.abs(array[first] - array[second]) < 3) {\n\t\t\t\tconsole.log(\"happening\");\n\t\t\t\tthetaFinal[first] = thetaFinal[second];\n\t\t\t\tthetaGrouped.splice(second, 1);\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tcontinueGroupping = false;\n\t\tvar i;\n\t\tfor (i = 0; i < thetaGrouped.length; i++) {\n\t\t\tvar first = i;\n\t\t\tvar second = i + 1;\n\t\t\tif (second == thetaGrouped.length) {\n\t\t\t\tsecond = 0;\n\t\t\t}\n\t\t\tif (Math.abs(thetaGrouped[first] - thetaGrouped[second]) < 3) {\n\t\t\t\tcontinueGroupping = true;\n\t\t\t} \n\t\t}\n\t}\t\n}", "function timeIncrements() {\n const quantity = 10;\n const granularity = 5;\n let data = [];\n var i = 0;\n for (i; i <= quantity; i++) {\n let minutes = i * granularity;\n data.push({ id: `${i}`, value: minutes + ' minutes' })\n }\n return data;\n }", "function transfer(id,delay,starting,ending){\n\tgrouptransferengine(id,delay,starting,ending);\n}", "function fixGaps(data) {\n var fixed_data = new Array();\n $.each(data, function(index, sensor_data) {\n var next_timestamp;\n if (index+1 < data.length) next_timestamp = data[index+1][0];\n fixed_data.push(sensor_data);\n // push a zero point 1ms before and after the gap\n if (next_timestamp - sensor_data[0] > 60000) {\n fixed_data.push([sensor_data[0]+1,0]);\n fixed_data.push([next_timestamp-1, 0]);\n }\n });\n return fixed_data;\n}", "splitMessage(){\n //hide element with style\n //takes the text inserted into the message and seperates it into letters\n let root = document.documentElement;\n let bubble = document.querySelector(\".message\");\n let bubbleUp = bubble.innerHTML;\n let bubbleSplit = bubbleUp.split(\"\")\n let bassage = []\n //take each letter and 'thurns it into' a tspan object---targetable with css\n bubbleSplit.forEach((letter)=>{bassage.push(`<tspan class='bubbleLetter'>${letter}</tspan>`)})\n //this dictates the spaces between off and on letters \n setTimeout(()=>{\n //inserts our new tspaned letters\n // this.bubbleMsg.\n this.bubbleMsg.innerHTML= bassage.join(\"\");\n }, 200)\n }", "function addSpans(sequence) {\n var rslt = \"\";\n var count_div =\"<div class='row'><div class='col-md-1'>\";\n var start_inn = \"<div class='col-md-11'>\";\n var start_row = \"<div class='row'>\";\n var start_div = \"<div class='col-md-2'>\"; \n var end = \"</div>\"; \n rslt = count_div + \"1\" +end+start_inn + start_row + start_div;\n for (var i = 0; i < sequence.length; i++){ \n var j = i+1; \n if(i%60==0 && i!=0) {\n rslt = rslt + end + end + end + end + count_div + j + end + start_inn + start_row + start_div;\n } else\tif(i%10==0 && i!=0) {\n rslt = rslt + end + start_div ;\n }\n rslt = rslt + \"<span id=feature\"+j+\">\"+sequence[i]+\"</span>\";\n\t\n }\n sequenceLength = sequence.length;\n return rslt;\n}", "function modifyRunningOrder(ro)\n{\n for (var i = 0; i < ro.length; ++i)\n {\n if (i % 24 == 1\n && i > 23\n && i < 250)\n {\n ro[i].push(new DynamicElement(\n \"Message\",\n {html: \"<p>Vă rugăm să luaţi o mică pauză. Apăsaţi orice tastă când sunteţi gata să începeţi din nou.</p>\", transfer: \"keypress\"},\n true));\n ro[i].push(new DynamicElement(\n \"Separator\",\n {transfer: 4000, normalMessage: \"Atenţie! Primul fragment de propoziţie din acest set va apărea pe ecran în curând.\"},\n true));\n }\n }\n return ro;\n}", "function modifyRunningOrder(ro)\n{\n for (var i = 0; i < ro.length; ++i)\n {\n if (i % 24 == 1\n && i > 23\n && i < 250)\n {\n ro[i].push(new DynamicElement(\n \"Message\",\n {html: \"<p>Vă rugăm să luaţi o mică pauză. Apăsaţi orice tastă când sunteţi gata să începeţi din nou.</p>\", transfer: \"keypress\"},\n true));\n ro[i].push(new DynamicElement(\n \"Separator\",\n {transfer: 4000, normalMessage: \"Atenţie! Primul fragment de propoziţie din acest set va apărea pe ecran în curând.\"},\n true));\n }\n }\n return ro;\n}", "function reaper() {\n //console.log(\"Reaping started..\");\n\n // Look for planes where we have seen no messages for >300 seconds\n var newPlanes = [];\n for (var i = 0; i < PlanesOrdered.length; ++i) {\n var plane = PlanesOrdered[i];\n if (plane.seen > 300) {\n // Reap it. \n plane.tr.parentNode.removeChild(plane.tr);\n plane.tr = null;\n delete Planes[plane.icao];\n plane.destroy();\n } else {\n // Keep it.\n newPlanes.push(plane);\n }\n };\n\n PlanesOrdered = newPlanes;\n refreshTableInfo();\n refreshSelected();\n refreshHighlighted();\n}", "function doChunk() {\n\t\t\tvar time = +new Date(),\n\t\t\t\ti,\n\t\t\t\tlen = $spans.length,\n\t\t\t\t$span,\n\t\t\t\tstringdata,\n\t\t\t\tstringlabels,\n\t\t\t\tstringsubindex,\n\t\t\t\tsubindex_colors = [\"#FFCD00\", \"#6DF5D7\", \"#BE8FE7\"],\n\t\t\t\tcolums_color,\n\t\t\t\tlabels = new Array(),\n\t\t\t\tarr,\n\t\t\t\tdata,\n\t\t\t\tchart;\n\n\t\t\tfor (i=0; i<len; i++) {\n\t\t\t\t$span = $($spans[i]);\n\t\t\t\tstringlabels = $span.data('labels');\n\t\t\t\tstringsubindex = $span.data('subindex');\n\t\t\t\tstringdata = $span.data('sparkline');\n\t\t\t\tarr = stringdata.split('; ');\n\t\t\t\tlabels = [\" \"];\n\t\t\t\tlabels = labels.concat(stringlabels.split(','));\n\t\t\t\tswitch(stringsubindex){\n\t\t\t\t\tcase \"readiness\": \t colums_color = subindex_colors[0];\n\t\t\t\t\t\t\t\t\t\t break;\n\t\t\t\t\tcase \"implementation\":colums_color = subindex_colors[1];\n\t\t\t\t\t\t\t\t\t\t break;\n\t\t\t\t\tcase \"impact\": colums_color = subindex_colors[2];\n\t\t\t\t\t\t\t\t\t\t break;\n\t\t\t\t}\n\n\t\t\t\t//var labels = new Function(\"return [\" + stringlabels + \"];\")();\n\t\t\t\t//var labels = (new Function(\"return [\" + stringlabels+ \"];\")());\n\t\t\t\t//console.log(labels);\n\t\t\t\tdata = $.map(arr[0].split(','), parseFloat);\n\t\t\t\t//console.log(data);\n\t\t\t\t//labels = $.map(stringlabels.split(','));\n\t\t\t\tchart = {};\n\n\t\t\t\tif (arr[1]) {\n\t\t\t\t\tchart.type = arr[1];\n\t\t\t\t}\n\t\t\t\t$span.highcharts('SparkLine', {\n\t\t\t\t\tseries: [{\n\t\t\t\t\t\tdata: data,\n\t\t\t\t\t\tcolor:colums_color,\n\t\t\t\t\t\tpointStart: 1\n\t\t\t\t\t}],\n\t\t\t\t\txAxis: {\n\t\t\t\t\t type: 'category',\n\t\t\t\t\t // minRange: 1,\n\t\t\t\t\t\tcategories: labels,//countries,\n\t\t\t\t\t\tlineColor:colums_color\n\t\t\t\t\t\t/*labels: {\n\t\t\t\t\t\t\tenabled:false\n\t\t\t\t\t\t}*/\n\t\t\t\t\t},\n\t\t\t\t\ttooltip: {\n\t\t\t\t\t\theaderFormat: '<span style=\"font-size: 10px\">{point.x}:</span>',\n\t\t\t\t\t\tpointFormat: '<b>{point.y}</b>'\n\t\t\t\t\t},\n\t\t\t\t\tchart: chart\n\t\t\t\t});\n\n\t\t\t\tn += 1;\n\n\t\t\t\t// If the process takes too much time, run a timeout to allow interaction with the browser\n\t\t\t\tif (new Date() - time > 500) {\n\t\t\t\t\t$spans.splice(0, i + 1);\n\t\t\t\t\tsetTimeout(doChunk, 0);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t}\n\t\t}", "function doChunk() {\n\t\t\tvar time = +new Date(),\n\t\t\t\ti,\n\t\t\t\tlen = $spans.length,\n\t\t\t\t$span,\n\t\t\t\tstringdata,\n\t\t\t\tstringlabels,\n\t\t\t\tstringsubindex,\n\t\t\t\tsubindex_colors = [\"#FFCD00\", \"#6DF5D7\", \"#BE8FE7\"],\n\t\t\t\tcolums_color,\n\t\t\t\tlabels = new Array(),\n\t\t\t\tarr,\n\t\t\t\tdata,\n\t\t\t\tchart;\n\n\t\t\tfor (i=0; i<len; i++) {\n\t\t\t\t$span = $($spans[i]);\n\t\t\t\tstringlabels = $span.data('labels');\n\t\t\t\tstringsubindex = $span.data('subindex');\n\t\t\t\tstringdata = $span.data('sparkline');\n\t\t\t\tarr = stringdata.split('; ');\n\t\t\t\tlabels = [\" \"];\n\t\t\t\tlabels = labels.concat(stringlabels.split(','));\n\t\t\t\tswitch(stringsubindex){\n\t\t\t\t\tcase \"readiness\": \t colums_color = subindex_colors[0];\n\t\t\t\t\t\t\t\t\t\t break;\n\t\t\t\t\tcase \"implementation\":colums_color = subindex_colors[1];\n\t\t\t\t\t\t\t\t\t\t break;\n\t\t\t\t\tcase \"impact\": colums_color = subindex_colors[2];\n\t\t\t\t\t\t\t\t\t\t break;\n\t\t\t\t}\n\n\t\t\t\t//var labels = new Function(\"return [\" + stringlabels + \"];\")();\n\t\t\t\t//var labels = (new Function(\"return [\" + stringlabels+ \"];\")());\n\t\t\t\t//console.log(labels);\n\t\t\t\tdata = $.map(arr[0].split(','), parseFloat);\n\t\t\t\t//console.log(data);\n\t\t\t\t//labels = $.map(stringlabels.split(','));\n\t\t\t\tchart = {};\n\n\t\t\t\tif (arr[1]) {\n\t\t\t\t\tchart.type = arr[1];\n\t\t\t\t}\n\t\t\t\t$span.highcharts('SparkLine', {\n\t\t\t\t\tseries: [{\n\t\t\t\t\t\tdata: data,\n\t\t\t\t\t\tcolor:colums_color,\n\t\t\t\t\t\tpointStart: 1\n\t\t\t\t\t}],\n\t\t\t\t\txAxis: {\n\t\t\t\t\t type: 'category',\n\t\t\t\t\t // minRange: 1,\n\t\t\t\t\t\tcategories: labels,//countries,\n\t\t\t\t\t\tlineColor:colums_color\n\t\t\t\t\t\t/*labels: {\n\t\t\t\t\t\t\tenabled:false\n\t\t\t\t\t\t}*/\n\t\t\t\t\t},\n\t\t\t\t\ttooltip: {\n\t\t\t\t\t\theaderFormat: '<span style=\"font-size: 10px\">{point.x}:</span>',\n\t\t\t\t\t\tpointFormat: '<b>{point.y}</b>'\n\t\t\t\t\t},\n\t\t\t\t\tchart: chart\n\t\t\t\t});\n\n\t\t\t\tn += 1;\n\n\t\t\t\t// If the process takes too much time, run a timeout to allow interaction with the browser\n\t\t\t\tif (new Date() - time > 500) {\n\t\t\t\t\t$spans.splice(0, i + 1);\n\t\t\t\t\tsetTimeout(doChunk, 0);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t// Print a feedback on the performance\n\t\t\t\t//if (n === fullLen) {\n\t\t\t\t// $('#result').html('Generated ' + fullLen + ' sparklines in ' + (new Date() - start) + ' ms');\n\t\t\t\t//}\n\t\t\t}\n\t\t}", "function sectionsCollapser(sections) {\n const collapsed = [...sections.reduce((result, section) => {\n const key = `${section.key}-${section.mode}-${section.timeSignature}`\n const value = result.get(key) || Object.assign({}, section, { duration: 0 })\n value.duration += section.duration\n return result.set(key, value)\n }, new Map).values()]\n return collapsed\n}", "buildWalletEmissor(){\n this.walletPocketUpdatedEventEmitter$\n .pipe(\n groupBy(business => business._id),\n mergeMap(group$ => group$.pipe(debounceTime(5000))),\n mergeMap(business => this.sendWalletPocketUpdatedEvent$(business))\n )\n .subscribe(\n (result) => {},\n (err) => { console.log(err) },\n () => { }\n );\n }", "function chgrp (n = [], r = []) {\n\t\tvar ret_arr = [],\n\t\t\tcur_arr = [];\n\t\tr = qra(r); //quantize using one setting\n\t\tr.forEach(function(time, index) {\n\t\t\tif(n[index] && !cur_arr.find(function(x){return x == n[index];})) {\n\t\t\t\tcur_arr.push(n[index]);\n\t\t\t}\n\t\t\tif(cur_arr.length > 0 && !(time == 0)) {\n\t\t\t\tret_arr.push([cur_arr, time/1000]);\n\t\t\t\tcur_arr = [];\n\t\t\t}\n\t\t})\n\t\treturn ret_arr;\n\t}", "function insertRepetition(element) {\n for (let i = 0; i < 100; i++) {\n timeline.push(element);\n }\n}", "function chunkArrayInGroups(arr, size) {\n let oldArr = [...arr];\n let newArr = []\n // in order to break this problem down,\n // first we consider an example case and we use methods to get our test specific result\n // 1st Approach\n // join the arr into a string\n // split the string into chunks from its size\n let string1 = oldArr.join(\"\").split(\"\",size)\n oldArr.splice(0,size)\n newArr.push(string1);\n let string2 = oldArr.join(\"\").split(\"\",size)\n newArr.push(string2);\n // in the above, we created a string,\n // spliced our arr, from 0 to max-size of chunk ,\n // pushed the string into our newArr\n // to automate this as a generic we can do a while loop to check if arr.length >= size\n let copyArr = [...arr];\n let testArr = [];\n while(copyArr.length >= size) {\n let startingIndex = 0;\n let tempString = copyArr.splice(startingIndex,size);\n //copyArr.join(\"\").split(\"\",size);\n testArr.push(tempString);\n if(copyArr.length < size && copyArr.length != 0) {\n let tempString = copyArr;\n testArr.push(tempString);\n }\n }\n \n return testArr;\n}", "function replicateChunk() {\n while (i < replications) {\n i++\n simulations.push(new Simulation(steps, showPath))\n if (i % chunkSize == 0) { // Chunk ended\n break\n }\n }\n \n if (i < replications) { // There are still chunks left\n gui.updateProgress(i/replications*100)\n setTimeout(replicateChunk, 0)\n }\n \n else { // No more chunks left\n Object.freeze(simulations)\n gui.updateCharts(simulations)\n // Hide progress bar\n gui.updateProgress(null)\n }\n }", "_rescheduleSequence(sequence, subdivision, startOffset) {\n sequence.forEach((value, index) => {\n const eventOffset = index * (subdivision) + startOffset;\n if (isArray(value)) {\n this._rescheduleSequence(value, subdivision / value.length, eventOffset);\n }\n else {\n const startTime = new TicksClass(this.context, eventOffset, \"i\").toSeconds();\n this._part.add(startTime, value);\n }\n });\n }", "function transitionGroup() {\n vis.selectAll(\"g.layer rect\")\n .transition()\n .duration(500)\n .delay(function(d, i) { return (i % m) * 10; })\n .attr(\"x\", function(d, i) { return x({x: .9 * ~~(i / m) / n}); })\n .attr(\"width\", x({x: .9 / n}))\n .each(\"end\", transitionEnd);\n\n function transitionEnd() {\n d3.select(this)\n .transition()\n .duration(500)\n .attr(\"y\", function(d) { return height - y2(d); })\n .attr(\"height\", y2);\n }\n }", "function groupBy(interval, groupByCallback, datapoints) {\n var ms_interval = utils.parseInterval(interval);\n\n // Calculate frame timestamps\n var frames = _.groupBy(datapoints, function(point) {\n // Calculate time for group of points\n return Math.floor(point[1] / ms_interval) * ms_interval;\n });\n\n // frame: { '<unixtime>': [[<value>, <unixtime>], ...] }\n // return [{ '<unixtime>': <value> }, { '<unixtime>': <value> }, ...]\n var grouped = _.mapValues(frames, function(frame) {\n var points = _.map(frame, function(point) {\n return point[0];\n });\n return groupByCallback(points);\n });\n\n // Convert points to Grafana format\n return sortByTime(_.map(grouped, function(value, timestamp) {\n return [Number(value), Number(timestamp)];\n }));\n}", "function buildTimelineGroups(groups) {\n\t\t\t\t\tvar lowestTime = format(d3.min(groups, function(d) { return format.parse(d.key); })),\n\t\t\t\t\t\t\thighestTime = format(d3.max(groups, function(d) { return format.parse(d.key); })),\n\t\t\t\t\t\t\tgroupPosition = 0,\n\t\t\t\t\t\t\tdefaultGroups = d3.map(),\n\t\t\t\t\t\t\tfilledGroups = null,\n\t\t\t\t\t\t\ttempDate = null;\n\n\t\t\t\t\t// Hack to include end-dates that are not UTC. Need to do this for month/year\n\t\t\t\t\t// as well, if the format dictates that.\n\t\t\t\t\tvar interimHT = format.parse(highestTime);\n\t\t\t\t\tinterimHT.setUTCDate(interimHT.getUTCDate() + 1);\n\t\t\t\t\thighestTime = format(interimHT);\n\n\t\t\t\t\tvar divisions = [highestTime];\n\n\t\t\t\t\t// Populate empty countByGroups\n\t\t\t\t\tstackGroups.forEach(function(d) {\n\t\t\t\t\t\tdefaultGroups.set(d, { count: 0, agg: 0 });\n\t\t\t\t\t});\n\n\t\t\t\t\tif( type === 'numeric' ) {\n\n\t\t\t\t\t\t// Fill in empty groupings to force the area between groups to 0.\n\n\t\t\t\t\t\twhile(divisions[0] > lowestTime) {\n\t\t\t\t\t\t\tdivisions.unshift(divisions[0] - 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// For Date-based timelines, we have to figure out the granularity first.\n\n\t\t\t\t\t\tif(format.toString().length === 8) {\n\t\t\t\t\t\t\t// Day-based\n\t\t\t\t\t\t\twhile(format.parse(divisions[0]) > format.parse(lowestTime)) {\n\t\t\t\t\t\t\t\ttempDate = format.parse(divisions[0]);\n\t\t\t\t\t\t\t\ttempDate.setUTCDate(tempDate.getUTCDate() - 1);\n\t\t\t\t\t\t\t\tdivisions.unshift(format(tempDate));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif(format.toString().length === 5) {\n\t\t\t\t\t\t\t\t// Month-based\n\t\t\t\t\t\t\t\tinterimHT = format.parse(highestTime);\n\t\t\t\t\t\t\t\tinterimHT.setUTCMonth(interimHT.getUTCMonth()+1);\n\t\t\t\t\t\t\t\thighestTime = format(interimHT)\n\t\t\t\t\t\t\t\tdivisions = [highestTime];\n\t\t\t\t\t\t\t\twhile(format.parse(divisions[0]) > format.parse(lowestTime)) {\n\t\t\t\t\t\t\t\t\ttempDate = format.parse(divisions[0]);\n\t\t\t\t\t\t\t\t\ttempDate.setUTCMonth(tempDate.getUTCMonth() - 1);\n\t\t\t\t\t\t\t\t\tdivisions.unshift(format(tempDate));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// Year-based\n\t\t\t\t\t\t\t\tinterimHT = format.parse(highestTime);\n\t\t\t\t\t\t\t\tinterimHT.setUTCFullYear(interimHT.getUTCFullYear()+1);\n\t\t\t\t\t\t\t\thighestTime = format(interimHT)\n\t\t\t\t\t\t\t\tdivisions = [highestTime];\n\t\t\t\t\t\t\t\twhile(format.parse(divisions[0]) > format.parse(lowestTime)) {\n\t\t\t\t\t\t\t\t\ttempDate = format.parse(divisions[0]);\n\t\t\t\t\t\t\t\t\ttempDate.setUTCFullYear(tempDate.getUTCFullYear() - 1);\n\t\t\t\t\t\t\t\t\tdivisions.unshift(format(tempDate));\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\t}\n\n\t\t\t\t\tfilledGroups = divisions.map(function(d) {\n\t\t\t\t\t\tif(groups[groupPosition] && groups[groupPosition].key === d) {\n\t\t\t\t\t\t\tgroupPosition++;\n\t\t\t\t\t\t\treturn { key: d, value: groups[groupPosition-1].value };\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn { key: d, value: { count: 0, data: { countByGroup: defaultGroups, agg: 0 } } };\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\treturn stackGroups.map(function(d, i) {\n\t\t\t\t\t\treturn filledGroups.map( function(g) {\n\t\t\t\t\t\t\treturn { \"x\": format.parse(g.key), \"y\": g.value.data.countByGroup.get(d).agg, \"total\": g.value.data.agg, \"i\": i };\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t}", "function chunks(chunks) {\n let prefix = '\\t ';\n chunks.forEach((chunk, i) => {\n let groupLn = colors.underline(`Group ${i + 1}:`)\n console.log('\\n\\t' + groupLn);\n console.log(`${prefix}${chunk.join('\\n' + prefix)}`);\n });\n console.log();\n}", "function assignToGroup(events) {\n \n var i, \n end = -1,\n groupIndex = -1;\n \n for (i=0; i<events.length; i++) {\n \n // current event overlaps with previous event - add to same group\n if (events[i].start < end) {\n events[i].groupIndex = groupIndex;\n // keep the end time of the event that ends the latest.\n end = Math.max(events[i].end, end);\n }\n // no overlap - create a new group, and add the current event to that group\n else {\n groupIndex++;\n events[i].groupIndex = groupIndex;\n columnWidths[groupIndex] = 0;\n end = events[i].end;\n }\n }\n }", "function splitBubbles() {\n showContinents();\n\n force.on('tick', function (e) {\n bubbles.each(moveToContinents(e.alpha))\n .attr('cx', function (d) { return d.x; })\n .attr('cy', function (d) { return d.y; });\n });\n\n force.start();\n }", "function applyOffset(data)\n{\n var startingTimes = [];\n computeOffset(data, startingTimes);\n for (var i = 0; i < data.length/6; i++) { // timeline num\n for (var j = i*6; j < i*6+5; j++) { // each row for the corresponding timeline\n for (var k = 0; k < data[j][\"times\"].length; k++) { // each event in the row\n data[j][\"times\"][k][\"starting_time\"] -= startingTimes[i];\n data[j][\"times\"][k][\"ending_time\"] -= startingTimes[i];\n }\n }\n }\n return data;\n}", "function ProcessArrayPacked(data, handler, callback,interval,callbackInterval) {\n var maxtime = 100;\t\t// chunk processing time\n var delay = 20;\t\t// delay between processes\n var queue = data.concat();\t// clone original array\n setTimeout(function() {\n var i = 0;\n var endtime = +new Date() + maxtime;\n\n do {\n handler(queue.shift());\n } while (queue.length > 0 && endtime > +new Date() && i++ < interval );\n if (queue.length > 0) {\n\n if(i >= interval){\n i=0;\n if (callbackInterval) callbackInterval();\n }\n setTimeout(arguments.callee, delay);\n }\n else {\n if (callback) callback();\n }\n\n }, delay);\n}", "async __START_LINES() {\n let full_line = false;\n\n let timer = await setInterval(()=>{\n this.fields.forEach(el => {\n if (el.value === 0) { \n el.value = this.__RANDOM_VALUE();\n full_line = true;\n }\n });\n\n if (full_line) {\n full_line = false;\n clearInterval(timer);\n return this.fields;\n }\n\n }, levelSettings[this.level].speed );\n }", "function insertDelayedTweets() {\n\n if (newTweets.length > 0) {\n var nextTweet = newTweets[0];\n newTweets.shift(); // remove the first one\n insertNewTweet(nextTweet);\n\n //more left? do a delay and repeat, 1500ms to prevent clashing of css class transitions\n if (newTweets.length > 0) {\n setTimeout(function () {\n insertDelayedTweets()\n }, 2000)\n }\n\n }\n\n }", "function hideSequentially(el, gap, callback) {\n // Store elements in a variable.\n var $items = $(el);\n\n // Set interval and gap between animations.\n var interval = 0;\n var increment = gap;\n\n // On each one of the items.\n $items.each(function() {\n\n // Store this specific item o a new variable.\n var $item = $(this);\n\n // Increment the interval to cause delay between animations.\n interval = interval + increment;\n\n // Set a timeout for this item once its interval has finished.\n setTimeout(function() {\n $item.addClass('out');\n\n if($items.index($item) == $items.length - 1) {\n if(callback) {\n setTimeout(function() {\n callback();\n }, interval);\n }\n }\n\n }, interval);\n\n });\n\n}", "getBeamLines(duration) {\n const tick_of_duration = Flow.durationToTicks(duration);\n const beam_lines = [];\n let beam_started = false;\n let current_beam = null;\n const partial_beam_length = this.render_options.partial_beam_length;\n let previous_should_break = false;\n let tick_tally = 0;\n for (let i = 0; i < this.notes.length; ++i) {\n const note = this.notes[i];\n\n // See if we need to break secondary beams on this note.\n const ticks = note.ticks.value();\n tick_tally += ticks;\n let should_break = false;\n\n // 8th note beams are always drawn.\n if (parseInt(duration, 10) >= 8) {\n // First, check to see if any indices were set up through breakSecondaryAt()\n should_break = this.break_on_indices.indexOf(i) !== -1;\n\n // If the secondary breaks were auto-configured in the render options,\n // handle that as well.\n if (this.render_options.secondary_break_ticks && tick_tally >=\n this.render_options.secondary_break_ticks) {\n tick_tally = 0;\n should_break = true;\n }\n }\n const note_gets_beam = note.getIntrinsicTicks() < tick_of_duration;\n\n const stem_x = note.getStemX() - (Stem.WIDTH / 2);\n\n // Check to see if the next note in the group will get a beam at this\n // level. This will help to inform the partial beam logic below.\n const prev_note = this.notes[i - 1];\n const next_note = this.notes[i + 1];\n const next_note_gets_beam = next_note && next_note.getIntrinsicTicks() < tick_of_duration;\n const prev_note_gets_beam = prev_note && prev_note.getIntrinsicTicks() < tick_of_duration;\n const beam_alone = prev_note && next_note &&\n note_gets_beam && !prev_note_gets_beam && !next_note_gets_beam;\n // const beam_alone = note_gets_beam && !prev_note_gets_beam && !next_note_gets_beam;\n if (note_gets_beam) {\n // This note gets a beam at the current level\n if (beam_started) {\n // We're currently in the middle of a beam. Just continue it on to\n // the stem X of the current note.\n current_beam = beam_lines[beam_lines.length - 1];\n current_beam.end = stem_x;\n\n // If a secondary beam break is set up, end the beam right now.\n if (should_break) {\n beam_started = false;\n if (next_note && !next_note_gets_beam && current_beam.end === null) {\n // This note gets a beam,.but the next one does not. This means\n // we need a partial pointing right.\n current_beam.end = current_beam.start - partial_beam_length;\n }\n }\n } else {\n // No beam started yet. Start a new one.\n current_beam = { start: stem_x, end: null, start_note: note };\n beam_started = true;\n\n if (beam_alone) {\n // previous and next beam exists and does not get a beam but current gets it.\n const prev_tick = prev_note.getIntrinsicTicks();\n const next_tick = next_note.getIntrinsicTicks();\n const tick = note.getIntrinsicTicks();\n const beam_direction = this.lookupBeamDirection(duration, prev_tick, tick, next_tick);\n\n if ([BEAM_LEFT, BEAM_BOTH].includes(beam_direction)) {\n current_beam.end = current_beam.start - partial_beam_length;\n } else {\n current_beam.end = current_beam.start + partial_beam_length;\n }\n } else if (!next_note_gets_beam) {\n // The next note doesn't get a beam. Draw a partial.\n if ((previous_should_break || i === 0) && next_note) {\n // This is the first note (but not the last one), or it is\n // following a secondary break. Draw a partial to the right.\n current_beam.end = current_beam.start + partial_beam_length;\n } else {\n // By default, draw a partial to the left.\n current_beam.end = current_beam.start - partial_beam_length;\n }\n } else if (should_break) {\n // This note should have a secondary break after it. Even though\n // we just started a beam, it needs to end immediately.\n current_beam.end = current_beam.start - partial_beam_length;\n beam_started = false;\n }\n beam_lines.push(current_beam);\n }\n } else {\n // The current note does not get a beam.\n beam_started = false;\n }\n\n // Store the secondary break flag to inform the partial beam logic in\n // the next iteration of the loop.\n previous_should_break = should_break;\n }\n\n // Add a partial beam pointing left if this is the last note in the group\n const last_beam = beam_lines[beam_lines.length - 1];\n if (last_beam && last_beam.end === null) {\n last_beam.end = last_beam.start - partial_beam_length;\n }\n return beam_lines;\n }", "function joinLineGroup(items) {\n const itemsOrderByX = items.sort((a, b) => (a.x < b.x ? -1 : 1));\n // console.log(itemsOrderByX);\n let lastX = 0;\n let line = itemsOrderByX.reduce((s, i) => {\n // console.log(i);\n // eyeballing spaces from the data!\n const xdiff = i.x - lastX;\n // console.log(`xdiff: ${xdiff}`);\n const separator = xdiff < 1 ? '' : ' ';\n lastX = i.x;\n\n return s + separator + i.text;\n }, '');\n\n // Comma separator.\n line = line.replace(/%2C/g, ',');\n\n // PDF xdiff seems to be off when separating numbers from text.\n line = line.replace(/(\\d)([a-zA-Z])/g, function(m, a, b) {\n return `${a} ${b}`;\n });\n line = line.replace(/([a-zA-Z])(\\d)/g, function(m, a, b) {\n return `${a} ${b}`;\n });\n\n // Remove comma separator between numbers.\n line = line.replace(/(\\d),(\\d)/g, function(m, a, b) {\n return `${a}${b}`;\n });\n\n return line;\n }", "function groupTicks(d, step) {\n\t var k = (d.endAngle - d.startAngle) / d.value;\n\t return d4.range(0, d.value, step).map(function(value) {\n\t return {value: value, angle: value * k + d.startAngle};\n\t });\n\t}", "removeTransitionDelays_() {\n const numItems = this.adapter_.getNumberOfItems();\n for (let i = 0; i < numItems; i++) {\n this.adapter_.setTransitionDelayForItemAtIndex(i, null);\n }\n }", "function meleeRangedGrouping (str) {\n let arrStr = [];\n let dataArr = '';\n\n //memisahkan data tanpa split\n for(let i = 0; i < str.length; i++){\n if(str[i] === ','){\n arrStr.push(dataArr);\n dataArr = '';\n }else{\n dataArr += str[i];\n }\n }\n arrStr.push(dataArr);\n //return arrStr;\n let arrHasil = [[], []];\n let heroClass = '';\n let namaHero = '';\n //Memisahkan hero yang memiliki class berbeda tanpa split\n for(let i = 0; i < arrStr.length; i++){\n for(let j = 0; j < arrStr[i].length; j++){\n if(arrStr[i][j-1] === '-'){\n heroClass = arrStr[i].slice(j);\n namaHero = arrStr[i].slice(0, j-1);\n }\n }\n //console.log(heroClass);\n //console.log(namaHero);\n if(heroClass === 'Ranged'){\n arrHasil[0].push(namaHero);\n }else if(heroClass === 'Melee'){\n arrHasil[1].push(namaHero);\n }else{\n arrHasil.splice(0,2);\n }\n }\n\n return arrHasil;\n}", "function show_percentage_split_of_under_40_seconds(ndx) {\n var percentageUnder40 = ndx.groupAll().reduce(\n function(p, v) {\n p.count++;\n if (v.PizzaTime <= 40) {\n p.under_40++;\n }\n return p;\n },\n function(p, v) {\n p.count--;\n if (v.PizzaTime <= 40) {\n p.under_40--;\n }\n return p;\n },\n function(p, v) {\n return { count: 0, under_40: 0 };\n }\n );\n\n dc.numberDisplay(\"#under40Secs\")\n .formatNumber(d3.format(\".2%\"))\n .valueAccessor(function(d) {\n if (d.count == 0) {\n return 0;\n }\n else {\n return (d.under_40 / d.count);\n }\n })\n .group(percentageUnder40);\n\n var percentageOver40 = ndx.groupAll().reduce(\n function(p, v) {\n p.count++;\n if (v.PizzaTime > 40) {\n p.over_40++;\n }\n return p;\n },\n function(p, v) {\n p.count--;\n if (v.PizzaTime > 40) {\n p.over_40--;\n }\n return p;\n },\n function(p, v) {\n return { count: 0, over_40: 0 };\n }\n );\n\n dc.numberDisplay(\"#over40Secs\")\n .formatNumber(d3.format(\".2%\"))\n .valueAccessor(function(d) {\n if (d.count == 0) {\n return 0;\n }\n else {\n return (d.over_40 / d.count);\n }\n })\n .group(percentageOver40);\n}", "split(by = 1) {\n return new Iterator(iterator => {\n let start = this.start;\n let end = this.moveEnd(this.end, by - this.size);\n for (let i = 0; i < this.size; i++) {\n let calendar = new Calendar(start, end, this.type, by, this.moveStart, this.moveEnd, this);\n if (iterator.act(calendar) === IteratorAction.Stop) {\n return;\n }\n start = this.moveStart(start, by);\n end = this.moveEnd(end, by);\n }\n });\n }", "buildWalletEmissor(){\n\n this.walletPocketUpdatedEventEmitter$\n .pipe(\n groupBy(walletId => walletId),\n mergeMap(group$ => group$.pipe(debounceTime(5000))),\n mergeMap(walletId => this.sendWalletPocketUpdatedEvent$(walletId))\n )\n .subscribe(\n (result) => {},\n (err) => { console.log(err) },\n () => { }\n );\n }", "setRowGrouping() {\n const groupSettings = this.settings.groupable;\n if (!groupSettings) {\n return;\n }\n\n if (!this.originalDataset) {\n this.originalDataset = this.settings.dataset.slice();\n } else if (!this.settings.dataset || this.settings.dataset.length > 0) {\n this.settings.dataset = this.originalDataset;\n }\n\n if (!groupSettings.aggregator || groupSettings.aggregator === 'none') {\n this.settings.dataset = GroupBy.none(this.settings.dataset, groupSettings.fields);\n return;\n }\n\n if (groupSettings.aggregator === 'sum') {\n this.settings.dataset = GroupBy.sum(\n this.settings.dataset,\n groupSettings.fields,\n groupSettings.aggregate\n );\n return;\n }\n\n if (groupSettings.aggregator === 'max') {\n this.settings.dataset = GroupBy.max(\n this.settings.dataset,\n groupSettings.fields,\n groupSettings.aggregate\n );\n return;\n }\n\n if (groupSettings.aggregator === 'min') {\n this.settings.dataset = GroupBy.min(\n this.settings.dataset,\n groupSettings.fields,\n groupSettings.aggregate\n );\n return;\n }\n\n if (groupSettings.aggregator === 'avg') {\n this.settings.dataset = GroupBy.avg(\n this.settings.dataset,\n groupSettings.fields,\n groupSettings.aggregate\n );\n return;\n }\n\n if (groupSettings.aggregator === 'count') {\n this.settings.dataset = GroupBy.count(\n this.settings.dataset,\n groupSettings.fields,\n groupSettings.aggregate\n );\n return;\n }\n\n if (groupSettings.aggregator === 'list') {\n this.settings.dataset = GroupBy.list(\n this.settings.dataset,\n groupSettings.fields,\n groupSettings.aggregatorOptions\n );\n return;\n }\n\n this.settings.dataset = GroupBy(this.settings.dataset, groupSettings.fields);\n }", "function moreTime(elementID){\n var i, j;\n //Get the index of the selected element id\n for (i = 0; i < diagram.length; i++) {\n var cur = diagram[i];\n if (cur._id == elementID) {\n break;\n }\n }\n\n // increase the time of all the elements\n for (var j = i; j < diagram.length; j++) {\n var cur = diagram[j];\n if (j == i) {\n if (diagram[i].end_time - diagram[i].start_time == 10) {\n return;\n }\n diagram[j].end_time = diagram[j].end_time + 1; // Increase end time of current element by 1\n $(\"#time_\"+diagram[j]._id).text(diagram[j].end_time - diagram[j].start_time);\n totalTime++;\n //alert(diagram[j].end_time);\n continue;\n }\n diagram[j].start_time = diagram[j].start_time + 1;\n diagram[j].end_time = diagram[j].end_time + 1; \n //alert(diagram[j]._id);\n $(\"#time_\"+diagram[j]._id).text(diagram[j].end_time - diagram[j].start_time);\n }\n}", "function chunkArrayInGroups(arr, n) {\n\t// define array to hold the groups\n\tvar result = [];\n\t// while the source array is not empty\n\twhile(arr.length != 0)\n\t\t// push an array formed by the first n elements to \n\t\t// the results array\n\t\tresult.push(arr.splice(0, n));\n\treturn result;\n}", "function fixColorsAndGroups() {\n\tvar colorClasses = ['light', 'dark'];\n\tvar linenum = 1;\n\tvar tr, prev_group;\n\tvar colorClass = 0;\n\tvar table =\n\t\tdocument.getElementById('blame_table') ||\n\t\tdocument.getElementsByTagName('table')[0];\n\n\twhile ((tr = document.getElementById('l'+linenum))) {\n\t// index origin is 0, which is table header; start from 1\n\t//while ((tr = table.rows[linenum])) { // <- it is slower\n\t\tif (isStartOfGroup(tr, linenum, document)) {\n\t\t\tif (prev_group &&\n\t\t\t prev_group.firstChild.firstChild.href ===\n\t\t\t tr.firstChild.firstChild.href) {\n\t\t\t\t// we have to concatenate groups\n\t\t\t\tvar prev_rows = prev_group.firstChild.rowSpan || 1;\n\t\t\t\tvar curr_rows = tr.firstChild.rowSpan || 1;\n\t\t\t\tprev_group.firstChild.rowSpan = prev_rows + curr_rows;\n\t\t\t\t//tr.removeChild(tr.firstChild);\n\t\t\t\ttr.deleteCell(0); // DOM2 HTML way\n\t\t\t} else {\n\t\t\t\tcolorClass = (colorClass + 1) % 2;\n\t\t\t\tprev_group = tr;\n\t\t\t}\n\t\t}\n\t\tvar tr_class = tr.className;\n\t\ttr.className = tr_class.replace(colorRe, colorClasses[colorClass]);\n\t\tlinenum++;\n\t}\n}", "awaitedInserts (n) {\n var ops = this.waiting.splice(this.waiting.length - n)\n for (var oid = 0; oid < ops.length; oid++) {\n var op = ops[oid]\n if (op.struct === 'Insert') {\n for (var i = this.waiting.length - 1; i >= 0; i--) {\n let w = this.waiting[i]\n // TODO: do I handle split operations correctly here? Super unlikely, but yeah..\n // Also: can this case happen? Can op be inserted in the middle of a larger op that is in $waiting?\n if (w.struct === 'Insert') {\n if (Y.utils.matchesId(w, op.left)) {\n // include the effect of op in w\n w.right = op.id\n // exclude the effect of w in op\n op.left = w.left\n } else if (Y.utils.compareIds(w.id, op.right)) {\n // similar..\n w.left = Y.utils.getLastId(op)\n op.right = w.right\n }\n }\n }\n } else {\n throw new Error('Expected Insert Operation!')\n }\n }\n this._tryCallEvents(n)\n }", "function chunk(array,size) {\n var mid = (array.length/size), chunks = [], start = 0;\n for(var i=0; i<size; i++) {\n var last = Math.floor(start+mid);\n if (array.length%size <= i) last = last-1;\n chunks.push(\"<div id='group\"+i+\"'>\"+array.slice(start,Math.floor(last+1)).join(' ')+\"</div><br>\");\n start = Math.floor(last+1);\n }\n return chunks;\n}", "function groupTicks(d, step, senses) {\n var k = (d.endAngle - d.startAngle) / d.value;\n return d3.range(0, d.value, step).map(function(value) {\n return {value: senses[d.index], angle: value * k + d.startAngle};\n });\n }", "function lessTime(elementID){\n var i, j;\n //Get the index of the selected element id\n for (i = 0; i < diagram.length; i++) {\n var cur = diagram[i];\n if (cur._id == elementID) {\n break;\n }\n }\n\n // reduce the time of all the elements\n for (var j = i; j < diagram.length; j++) {\n var cur = diagram[j];\n \n if (j == i) {\n if (diagram[i].end_time - diagram[i].start_time == 1) {\n return;\n }\n diagram[j].end_time = diagram[j].end_time - 1; // Decrease end time of current element by 1\n $(\"#time_\"+diagram[j]._id).text(diagram[j].end_time - diagram[j].start_time);\n totalTime--;\n continue;\n }\n diagram[j].start_time = diagram[j].start_time - 1;\n diagram[j].end_time = diagram[j].end_time - 1; \n //alert(diagram[j]._id);\n $(\"#time_\"+diagram[j]._id).text(diagram[j].end_time - diagram[j].start_time);\n }\n}", "function groupConsecutiveElementsWhile(arr, predicate) {\n var groups = [];\n var currElm, currGroup;\n for (var i = 0; i < arr.length; i++) {\n currElm = arr[i];\n if (i > 0 && predicate(currElm, arr[i - 1])) {\n currGroup = groups[groups.length - 1];\n currGroup.push(currElm);\n }\n else {\n groups.push([currElm]);\n }\n }\n return groups.map((g) => g.length === 1 ? g[0] : g);\n}", "function groupTicks(d, step) {\n var k = (d.endAngle - d.startAngle) / d.value;\n return d3.range(0, d.value, step).map(function(value) {\n return {value: value, angle: value * k + d.startAngle};\n });\n }", "function groupTicks(d) {\n var k = (d.endAngle - d.startAngle) / d.value;\n return d3.range(0, d.value, 1000).map(function (v, i) {\n return {\n angle: v * k + d.startAngle,\n //label: i % 5 ? null : v / 1000 + \"k\"\n label: chordData.header[d.index]\n };\n });\n }", "function chunkArrayInGroup(arr, size){\n var group = []; \n// while array.length is greater than zero group stop push array dot slice in zero size \n while (arr.length > 0) {\n group.push(arr.slice(0, size)); \n\t}\n}", "function timeOutSet(track, prevDelay, i){\n if(i < track.strokeList.length) {\n var delayTime = track.strokeList[i].time - prevDelay;\n setTimeout(function () {\n showStroke(track.strokeList[i]);\n timeOutSet(track, track.strokeList[i].time, ++i);\n }, delayTime);\n }\n}", "function parseDoubleGroupedInterval(){\n var options = Array.prototype.slice.call(arguments);\n if (!options[0]) throw 'Requested parser requires a sequential list (array) of properties to target as a second argument';\n return function(res){\n var dataset = new Dataset();\n each(res.result, function(record, i){\n var index = options[1] && options[1] === 'timeframe.end' ? record.timeframe.end : record.timeframe.start;\n each(record['value'], function(value, j){\n var label = String(value[options[0][0]]) + ' ' + String(value[options[0][1]]);\n dataset.set([ label, index ], value.result);\n });\n });\n dataset.data.input = res;\n dataset.parser = {\n name: 'double-grouped-interval',\n options: options\n };\n return dataset;\n }\n}", "async function passDelayMintTime(){\n // time passes\n await time.advanceBlock();\n await time.increase(2 * delayDuration);\n await time.advanceBlock();\n }", "async function passDelayMintTime(){\n // time passes\n await time.advanceBlock();\n await time.increase(2 * delayDuration);\n await time.advanceBlock();\n }", "function foldGroupTable() { doGroupTableOperations('fold'); }", "function chunkArrayInGroups(arr, size) {\n // Break it up.\n // My code\n let newArr = [];\n for (let i = 0; i < arr.length; i += size) {\n newArr.push(arr.slice(i, size));\n }\n return newArr;\n // My code\n}", "function chunkArrayInGroups(arr, size) {\n\n var final = [];\n var iterTimes = arr.length / size;\n\n for (var j = 0; j < iterTimes; j++) {\n var intermed = [];\n\n for (var i = 0; i < size; i++) {\n\n if (arr.length > 0) {\n intermed.push(arr.shift());\n }\n }\n\n final.push(intermed);\n\n }\n\n return final;\n}", "illuminateSequence(){\r\n for (let i = 0; i < this.level; i++) {\r\n const color=this.numberToColor(this.sequence[i])\r\n setTimeout(()=>this.illuminateColor(color),1000*i)\r\n }\r\n}", "function chunkArrayInGroups(arr, size) {\n let newArr = [];\n for (let i = 0; i < arr.length; i += size) {\n newArr.push(arr.slice(i, i + size));\n console.log(i + \" <--i\");\n console.log(i+size + \" <--i+size\");\n }\n return newArr;\n}", "function removeRowspanPlaceholders(table) {\n table.find('> tbody [rowspan-group]').each(function () {\n var $this = $(this);\n var id = $this.attr('rowspan-group');\n var parentRow = $this.parent('tr');\n var index = parentRow.children().index($this);\n\n while(true) {\n var nextRow = parentRow.next('tr');\n if (!nextRow.is('tr'))\n break;\n var nextCell = nextRow.children().eq(index);\n\n if (nextCell.attr('rowspan-group') === id) {\n var rowspan = parseFloat($this.attr('rowspan')) || 1;\n $this.attr('rowspan', rowspan + 1);\n nextCell.remove();\n } else {\n break;\n }\n parentRow = nextRow;\n }\n });\n }", "illuminateSequence() {\n for (let i = 0; i < this.level; i++) {\n const color = this.changeNumberToColor(this.sequence[i]);\n setTimeout(() => this.illuminateColor(color), 1000 * i);\n }\n }", "function animateUngrouping(group) {\n var GAP = 10; //we want a 10 pixel gap between objects to show that they're no longer grouped together.\n //Figure out which is the left most and which is the right most object. The left most object will move left and the right most object will move right. TODO: What implications does this have for the rest of the scene? For example, when the left most object is also one connected to an object to its right. Do we want to put in additional rules to deal with this, or are we going to calculate the \"left-most\" and \"right-most\" objects as whatever groups of objects we'll need to move. Should we instead move the smaller of the two objects away from the larger of the two. What about generalizability? What happens when we've got 2 groups of objects that need to ungroup, or alternately what if the object is connected to multiple things at once, how do we move it away from the object that it was just ungrouped from, while keeping it connected to the objects it's still grouped with. Do we animate both sets of objects or just one set of objects?\n \n //Lets start with the simplest case and go from there. 2 objects are grouped together and we just want to move them apart.\n //There are 2 possibilities. Either they are partially overlapping (or connected on the edges), or one object is contained within the other.\n //Figure out which one is the correct one. Then figure out which direction to move them and which object we're moving if we're not moving both.\n //If object 1 is contained within object 2.\n if(objectContainedInObject(group.obj1, group.obj2)) {\n //alert(\"check 1\" + group.obj1.id + \" contained in \" + group.obj2.id);\n //For now just move the object that's contained within the other object toward the left until it's no longer overlapping.\n //Also make sure you're not moving it off screen.\n while((group.obj1.offsetLeft + group.obj1.offsetWidth + GAP > group.obj2.offsetLeft) &&\n (group.obj1.offsetLeft - STEP > 0)) {\n move(group.obj1, group.obj1.offsetLeft - STEP, group.obj1.offsetTop, false);\n }\n }\n //If object 2 is contained within object 1.\n else if(objectContainedInObject(group.obj2, group.obj1)) {\n //alert(\"check 2\" + group.obj2.id + \" contained in \" + group.obj1.id);\n //For now just move the object that's contained within the other object toward the left until it's no longer overlapping.\n //Also make sure you're not moving it off screen.\n \n while((group.obj2.offsetLeft + group.obj2.offsetWidth + GAP > group.obj1.offsetLeft) &&\n (group.obj2.offsetLeft - STEP > 0)) {\n move(group.obj2, group.obj2.offsetLeft - STEP, group.obj2.offsetTop, false);\n }\n }\n //Otherwise, partially overlapping or connected on the edges.\n else {\n //Figure out which is the leftmost object.\n if(group.obj1.offsetLeft < group.obj2.offsetLeft) {\n //Move obj1 left by STEP and obj2 right by STEP until there's a distance of 10 pixels between them.\n //Also make sure you're not moving either object offscreen.\n while(group.obj1.offsetLeft + group.obj1.offsetWidth + GAP > group.obj2.offsetLeft) {\n if(group.obj1.offsetLeft - STEP > 0)\n move(group.obj1, group.obj1.offsetLeft - STEP, group.obj1.offsetTop, false);\n \n if(group.obj2.offsetLeft + group.obj2.offsetWidth + STEP < window.innerWidth)\n move(group.obj2, group.obj2.offsetLeft + STEP, group.obj1.offsetTop, false);\n }\n }\n else {\n //Move obj2 left by STEP and obj1 right by STEP until there's a distance of 10 pixels between them.\n //Change the location of the object.\n while(group.obj2.offsetLeft + group.obj2.offsetWidth + GAP > group.obj1.offsetLeft) {\n if(group.obj1.offsetLeft + group.obj1.offsetWidth + STEP < window.innerWidth)\n move(group.obj1, group.obj1.offsetLeft + STEP, group.obj1.offsetTop, false);\n \n if(group.obj2.offsetLeft - STEP > 0)\n move(group.obj2, group.obj2.offsetLeft - STEP, group.obj2.offsetTop, false);\n }\n }\n }\n}", "function MoveLiveToRemaining(new_live_tasks,new_remaining_tasks){\n var tmp_live_tasks = [];\n for (var i =0 ; i<new_live_tasks.length; i++){\n tmp_live_tasks.push(new_live_tasks[i]);\n }\n\n\n for (var j=0;j<tmp_live_tasks.length;j++){\n // console.log(tmp_live_tasks.length);\n var groupNum = parseInt(tmp_live_tasks[j]);\n var ev = flashTeamsJSON[\"events\"][getEventJSONIndex(groupNum)];\n var start_x = ev.x;\n\n\n if(prevTasksDelayed(start_x)){\n new_remaining_tasks.push(groupNum);\n\n //remove task from live array\n new_live_tasks.splice(new_live_tasks.indexOf(tmp_live_tasks[j]), 1);\n\n }\n }\n\n\n return {\"live\":new_live_tasks, \"remaining\":new_remaining_tasks};\n\n}", "function chunkArrayInGroups(arr, size) {\n // Break it up.\n // My code\n let newArr = [];\n for (let i = 0; i < arr.length; i += size) {\n newArr.push(arr.slice(i, i + size)); // The elusive thing was here(i + size)\n }\n return newArr;\n // My code\n}" ]
[ "0.5423795", "0.5313414", "0.522866", "0.51041", "0.5065098", "0.5016538", "0.49963775", "0.4985667", "0.49688765", "0.49503952", "0.49046758", "0.48976097", "0.48775336", "0.4864892", "0.4848283", "0.48421898", "0.4838542", "0.482665", "0.47969696", "0.47967136", "0.47802675", "0.47703582", "0.4764592", "0.4751204", "0.47356045", "0.47284877", "0.4723506", "0.47198948", "0.4715908", "0.47024605", "0.46899185", "0.4674658", "0.46681848", "0.4667287", "0.4659643", "0.4654176", "0.4619986", "0.46022245", "0.45997393", "0.45891097", "0.4580521", "0.45793235", "0.456661", "0.4560319", "0.4560319", "0.4536494", "0.4535543", "0.4535543", "0.453229", "0.45295617", "0.45198363", "0.45182133", "0.4516897", "0.45038", "0.44995165", "0.44914475", "0.44860727", "0.44852504", "0.448221", "0.44797543", "0.447946", "0.44728225", "0.44681153", "0.44633952", "0.4463341", "0.4462491", "0.4456202", "0.44484147", "0.4447599", "0.4443933", "0.44437635", "0.4439174", "0.44267714", "0.44241038", "0.44236013", "0.44178456", "0.44030216", "0.44012478", "0.43982533", "0.4394736", "0.43944398", "0.4393912", "0.4392683", "0.43908498", "0.43905923", "0.43887442", "0.4383327", "0.438192", "0.4380599", "0.4380599", "0.4378606", "0.43774816", "0.43756485", "0.43741676", "0.43739837", "0.437337", "0.4372722", "0.43672308", "0.43656772", "0.43639392" ]
0.45090157
53